Tensorflow Object Detection API with GPU on Windows and real-time detection

风格不统一 提交于 2019-12-24 07:01:48

问题


I am testing the new Tensorflow Object Detection API in Python, and I succeeded in installing it on Windows using docker. However, my trained model (Faster RCNN resnet101 COCO) takes up to 15 seconds to make a prediction (with very good accuracy though), probably because I only use Tensorflow CPU.

My three questions are:

  • Considering the latency, where is the problem? I heard Faster RCNN was a good model for low latency visual detection, is it because of the CPU-only execution?
  • With such latency, is it possible to make efficient realtime video processing by using tensorflow GPU, or should I use a more popular model like YOLO?
  • The popular mean to use tensorflow GPU in docker is nvidia-docker but is not supported on windows. Should I continue to look for a docker (or conda) solution for local prediction, or should I deploy my model directly to a virtual instance with GPU (I am comfortable with Google Cloud Platform)?

Any advice and/or good practice concerning real-time video processing with Tensorflow is very welcome!


回答1:


Considering the latency, where is the problem ? I heard Faster RCNN was a good model for low latency visual detection, is it because of the CPU-only execution ?

Of course, it's because you are using CPU.

With such latency, is it possible to make efficient realtime video processing by using tensorflow GPU, or should I use a more popular model like YOLO ?

Yolo is fast, but I once used it for face and accuracy was not that great. But a good alternative.

The popular mean to use tensorflow GPU in docker is nvidia-docker but is not supported on windows. Should I continue to look for a docker (or conda) solution for local prediction, or should I deploy my model directly to a virtual instance with GPU (I am comfortable with Google Cloud Platform) ?

I think you can still use your local GPU in windows, as Tensorflow supports GPU on python.

And here is an example, simply to do that. It has a client which can read webcam or IP cam stream. The server is using Tensorflow python GPU version and ready to use pre-trained model for predictions.

Unfortunately, Tensoflow does not support tensorflow-serving on windows. Also as you said Nvidia-Docker is not supported on windows. Bash on windows has no support for GPU either. So I think this is the only easy way to go for now.



来源:https://stackoverflow.com/questions/45266720/tensorflow-object-detection-api-with-gpu-on-windows-and-real-time-detection

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!