我使用以下命令编译了文件。
protoc object_detection/protos/*.proto --python_out=.
结果编译成 .py 文件。
但是,我收到以下错误代码。
~/Documents/imgmlreport/inception/classification_inception/models/research/object_detection/utils/label_map_util.py in ()
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'
所以我检查了 utils,我已经有了一个 string_int_label_map_pb2.py
为什么不能导入 string_int_label_map_pb2.py ?