Object detection realtime using tensorflow

China☆狼群 提交于 2019-12-13 10:12:57

问题


Im trying to detect objects in realtime using tensorflow. . I ran jupyter notebook in object_detection directory. then I opened the notebook file. It is firing the following error

Im getting the following error

--------------------------------------------------------------------------- 
ImportError                               Traceback (most recent call last) <ipython-input-7-956de605e8fe> in <module>()
----> 1 from utils import label_map_util
      2 
      3 from utils import visualization_utils as vis_util

C:\Users\Documents\models-master\models-master\object_detection\utils\label_map_util.py in <module>()
     20 import tensorflow as tf
     21 from google.protobuf import text_format
---> 22 from object_detection.protos import string_int_label_map_pb2
     23 
     24 

ImportError: cannot import name 'string_int_label_map_pb2'

How do I do object detection realtime using tensorflow in windows?


回答1:


A little google search would already help or just reading the Readme...

You forgot to run this:

#From tensorflow/models/
protoc object_detection/protos/*.proto --python_out=.



回答2:


follow readme in g3doc named as installation.md.

export your path by running command

"export PYTHONPATH=$PYTHONPATH:`pwd`:`pwd`/slim" by being in research folder 

# From tensorflow/models/research/

OPTIONALLY: after running the above command you can try to run notebook from different folder by copying it to right directory such that its pointing correctly to utils folder



来源:https://stackoverflow.com/questions/45140283/object-detection-realtime-using-tensorflow

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