tensorflow / tensorflow/models
Android Tensorflow ObjectDetection lib_task_api default number of threads?
@pkulzc is already working on this.
Since Jan 18, 2022.
- Dominant language
- Python
- Stars
- 77.7k
- Forks
- 44.8k
- PR merge metrics
- No merged PRs in 30d
Description
Hello,
We are working on implementing Tensorflow object detection based on the example provided here:
https://github.com/tensorflow/examples/tree/eb925e460f761f5ed643d17f0c449e040ac2ac45/lite/examples/object_detection/android
It seems that there are 2 implementations for that one:
(1) lib_task_api that leverages the out-of-box API from the TensorFlow Lite Task Library;
(2) lib_interpreter that creates the custom inference pipleline using the TensorFlow Lite Interpreter Java API.
We are using lib_task_api and we don't see the way how we can set the number of threads with it?
For the lib_interpreter - there is a variable that is being set up for that.
https://github.com/tensorflow/examples/blob/a228a3460f3fdd8edee9e8b061a08ffc92629907/lite/examples/object_detection/android/lib_interpreter/src/main/java/org/tensorflow/lite/examples/detection/tflite/TFLiteObjectDetectionAPIModel.java#L138
On the other hand - for lib_task_api i see that this method is deprecated and it is not set up
https://github.com/tensorflow/examples/blob/eb925e460f761f5ed643d17f0c449e040ac2ac45/lite/examples/object_detection/android/lib_task_api/src/main/java/org/tensorflow/lite/examples/detection/tflite/TFLiteObjectDetectionAPIModel.java#L87
My question being - what is the default number of threads for lib_task_api?
I am asking this one because i would like to tune it up for different set of devices.
Best Regards
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.