0

I'm very new to tensorflow so I hope my question is ok.

What I'm trying to do is to make a tensorflow application in Unity to detect whether an object is a book or not a book, and that's it.

I've used this unity implementation of tensorflow lite for unity: https://github.com/asus4/tf-lite-unity-sample

It uses files with .tflite extensions and detects many objects and the accuracy is not bad but it's super laggy.

I don't care about other objects. All I want is to know if it's a book or not. Maybe that'll help reduce the lag too. Since I'm new to Tenserflow, I have no idea where to start. Can someone please point me in the right direction?

Thanks a lot

poorya79
  • 21
  • 1
  • 4

1 Answers1

0

If you want to accelerate your model, you can consider the following options.

(1) Choosing a model with smaller weights or a smaller image size input. This helps to reduce the overall computations by selecting a smaller model.

(2) Utilizing model optimization techniques, for example, quantizations and sparsity. These techniques can reduce the footprint and improve overall performance in the latency. https://www.tensorflow.org/lite/performance/model_optimization

(3) Enabling the mobile hardware acceleration option on mobile, for example, GPU delegate or NNAPI delegate, which can save the model's computation time by using the special hardware's capability. https://www.tensorflow.org/lite/performance/delegates

Jae sung Chung
  • 835
  • 1
  • 6
  • 7
  • Thanks for the answer Jae, but as I'm not that much familiar with tensorflow yet, it made me a little confused. How can I choose another model that's lighter? I didn't find much options online. The 3rd option would not work also, because this is supposed to be an app that people can download, so we cant' force all users to change their phone settings. – poorya79 Mar 17 '21 at 15:51
  • Please read the following document about the image classification task on mobile. https://www.tensorflow.org/lite/tutorials/model_maker_image_classification to find out some available options. FYI, Both GPU/NNAPI options are available from the most of the android phones. – Jae sung Chung Mar 18 '21 at 00:30