ImportError:无法导入名称“ string_int_label_map_pb2”(尝试了网络上的所有解决方案)

时间:2019-08-24 19:27:26

标签: python tensorflow object-detection-api

我在64位Windows 10和Python 3.6上使用tensorflow object_detection api。我已经安装了protobuf和所有其他必要的软件包,并且在我的路径中安装了protoc和所有其他/model/research files。我的string_int_label_map_pb2.py文件夹中有object_detection/protos,但是我仍然遇到ImportError: cannot import name 'string_int_label_map_pb2'错误。有趣的是,当我打开一个新的Python窗口时,仍然无法使用命令from object_detection.protos import (random file in protos here)导入任何protos文件。我尝试了所有可以在网上找到的解决方案。

错误代码:

Traceback (most recent call last): File "model_main.py", line 26, in <module> from object_detection import model_lib File "C:\Users\f3d0m\AppData\Local\Programs\Python\Python36\lib\site-packages\object_detection\model_lib.py", line 27, in <module> from object_detection import eval_util File "C:\Users\f3d0m\AppData\Local\Programs\Python\Python36\lib\site-packages\object_detection\eval_util.py", line 27, in <module> from object_detection.metrics import coco_evaluation File "C:\Users\f3d0m\AppData\Local\Programs\Python\Python36\lib\site-packages\object_detection\metrics\coco_evaluation.py", line 22, in <module> from object_detection.utils import object_detection_evaluation File "C:\Users\f3d0m\AppData\Local\Programs\Python\Python36\lib\site-packages\object_detection\utils\object_detection_evaluation.py", line 39, in <module> from object_detection.utils import label_map_util File "C:\Users\f3d0m\AppData\Local\Programs\Python\Python36\lib\site-packages\object_detection\utils\label_map_util.py", line 21, in <module> from object_detection.protos import string_int_label_map_pb2 ImportError: cannot import name 'string_int_label_map_pb2'

0 个答案:

没有答案