Reputation: 11
Im working on an object detector using tensorflow, and I have some problems. Im training a model to deploy on the android example application (applied to TFDetect activity) with 120 images, 20k steps and the ssd_mobilenet_v2. Im on Windows 10 using Android Studio. I can train it successfully and works fine, but the time between detections is too large, like 4 to 5 seconds:
09-26 12:24:56.904 7986-7986/org.tensorflow.demo I/tensorflow: DetectorActivity: Preparing image 192 for detection in bg thread.
09-26 12:24:56.999 7986-8002/org.tensorflow.demo I/tensorflow: DetectorActivity: Running detection on image 192
09-26 12:25:00.439 7986-8002/org.tensorflow.demo I/tensorflow: MultiBoxTracker: Processing 0 results from 192
09-26 12:25:00.508 7986-7986/org.tensorflow.demo I/tensorflow: DetectorActivity: Preparing image 225 for detection in bg thread.
09-26 12:25:00.595 7986-8002/org.tensorflow.demo I/tensorflow: DetectorActivity: Running detection on image 225
09-26 12:25:04.059 7986-8002/org.tensorflow.demo I/tensorflow: MultiBoxTracker: Processing 0 results from 225
09-26 12:25:04.060 7986-7986/org.tensorflow.demo I/tensorflow: DetectorActivity: Preparing image 258 for detection in bg thread.
09-26 12:25:04.154 7986-8002/org.tensorflow.demo I/tensorflow: DetectorActivity: Running detection on image 258
09-26 12:25:07.559 7986-8002/org.tensorflow.demo I/tensorflow: MultiBoxTracker: Processing 0 results from 258
When I run it on a newer phone. the time decreases to 2 or 3 seconds. Also, when I started using the MobileNet model it gets a bit better. I was searching to find opitimizing methods or something that can decrease that time.
What factors affect the detection speed? (More images? More training steps?) and what optimization methods can I use?
I have reading this and that, but most of the examples are for image classifiers or are deprecated and give me a lot of errors. Im really confused about it.
Upvotes: 1
Views: 183
Reputation: 134
There are multiple ways to decrease detection times. You could for example try to feed to neural network smaller images (less pixels is less calculations) or do your training and classifying in grayscale. (less colours == less data == less calculations).
Upvotes: 1