Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using NnApiDelegate in TFLite 2.11.0 returns same embeddings for all images. It works fine for 2.6.0 #171

Open
gaikwadrahul8 opened this issue Nov 28, 2024 · 2 comments

Comments

@gaikwadrahul8
Copy link
Contributor

System information

  • Have I written custom code (as opposed to using a stock example script
    provided in TensorFlow)
    : Yes
  • OS Platform and Distribution (e.g., Linux Ubuntu 16.04): MacOS 13.3.1
  • Mobile device (e.g. iPhone 8, Pixel 2, Samsung Galaxy) if the issue
    happens on a mobile device
    : Xiaomi Poco F1
  • TensorFlow Lite version: 2.11.0

Describe the problem

In my android app I'm using Facenet model to recognize faces. I have added NnApiDelegate to the interpreterOptions.
My app has been working with TFLite version 2.6.0. When I upgraded the TFLite version to 2.10.0 or 2.11.0, I see that the model returns the same embeddings for any image I provide.
Removing the NnApiDelegate works in 2.11.0, but it slows down the face recognition considerably, so I do not want to remove NnApiDelegate.

Source code / logs

Code for setting up the interpreter in Kotlin:

val interpreterOptions = Interpreter.Options()
interpreterOptions.addDelegate(NnApiDelegate())
interpreter = Interpreter(FileUtil.loadMappedFile(context, model.assetsFilename ) , interpreterOptions)

@gaikwadrahul8
Copy link
Contributor Author

This issue originally reported by @shuaga has been moved to this dedicated repository for LiteRT to enhance issue tracking and prioritization. To ensure continuity, we have created this new issue on your behalf.

We appreciate your understanding and look forward to your continued involvement.

@pkgoogle
Copy link

pkgoogle commented Dec 2, 2024

Original Issue: tensorflow/tensorflow#60653

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants