首页 > 解决方案 > Tensorflow 网络摄像头对象检测未启动

问题描述

当我尝试启动我的 object_detection.py 时,它给了我这个错误

C:\Users\Tensorflow\tensorflow1\models\research\object_detection>python object_detection.py
Traceback (most recent call last):
  File "object_detection.py", line 26, in <module>
    from utils import label_map_util
  File "C:\Users\Tensorflow\tensorflow1\models\research\object_detection\utils\label_map_util.py", line 27, in <module>
    from object_detection.protos import string_int_label_map_pb2
  File "C:\Users\Tensorflow\tensorflow1\models\research\object_detection\object_detection.py", line 28, in <module>
    from utils import visualization_utils as vis_util
  File "C:\Users\Tensorflow\tensorflow1\models\research\object_detection\utils\visualization_utils.py", line 41, in <module>
    from object_detection.core import keypoint_ops
ModuleNotFoundError: No module named 'object_detection.core'; 'object_detection' is not a package
[ WARN:0] global C:\projects\opencv-python\opencv\modules\videoio\src\cap_msmf.cpp (674) SourceReaderCB::~SourceReaderCB terminating async callback
[ WARN:0] global C:\projects\opencv-python\opencv\modules\videoio\src\cap_msmf.cpp (674) SourceReaderCB::~SourceReaderCB terminating async callback

我试图解决这个问题的事情

Executing this: setx OPENCV_VIDEOIO_PRIORITY_MSMF 0                  (no result)
Executing this: SET PYTHONPATH=%cd%:%cd%\slim                        (no result)
Using the installer to add Python to environment variables           (no result)
Executing this: pip install object-detection     (Requirement already satisfied)
Using python3 to execute                                             (no result)
[Using Python3 to execute][1]

标签: pythonpython-3.xopencvtensorflow

解决方案


推荐阅读