datitran / object_detector_app

Real-Time Object Recognition App with Tensorflow and OpenCV

Home Page:https://medium.com/towards-data-science/building-a-real-time-object-recognition-app-with-tensorflow-and-opencv-b7a2b4ebdc32

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

about fps

wm901115nwpu opened this issue · comments

My fps rate is1.36 using cpu,is it normal?Why are your implement is 0.11?

Hey that's very low. You should look into it. My approx. FPS rate is on average 6. If I adjust this for the overhead time of Tensorflow starting the session, it is 10. I'm working on increasing the fps rate as I said in my article, it is not optimal but I basically started with a very low FPS rate when doing a naive implementation. So the rate I have now is actually pretty good compared to what I had at the beginning.

Here are some ideas that I have to improve the performance:

  1. Skip frames of the video stream could help since there are moments where nothing is happening
  2. Resizing the input image aka video stream and then rescaling the boxes. For a current project where I use dlib and its face detector, I use this trick and the performance is super awesome
  3. Use TF Queues instead of sess.run but not sure if this will help for CPU, for GPU this definitely should help

Yeh, I hope to find some time to do it or some others could also implement it.