python - 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]
解决方案
推荐阅读
- mariadb - “总连接数”太多。是正常状态吗?MaxScale 2.3.9
- python - 如何在python中使用标准分割字符串数据?
- php - 如何在我的数据库中存储 $_SESSION 值
- opencv - OpenCV基于红色和绿色标记分离图像的背景和前景
- html - 我的字体很小,但我的突出显示大小很大?
- kubernetes - 在我的 VPC 中启用私有访问时无法访问 EKS 终端节点
- clojure - 在 Clojure 中迭代地图
- r - 森伯斯特图 - 生成超过 2 个环时出错
- unity3d - PlayMode 中的 Unity3D 测试运行程序不提供测试反馈
- mysql - 如何获取查询以在 MYSQL 中返回数组?