hello all,
when i run the create_pascal_tf_record.py,it shows that
from protos import string_int_label_map_pb2
ImportError: cannot import name string_int_label_map_pb2
i want to konw where is the string_int_label_map_pb2 ?
thank you very much
I had the same issue. The protobuf libraries need to be compiled
protoc object_detection/protos/*.proto --python_out=.
you will have to install protoc first though. Look in the installation instructions for other things to do before running.
thank you very much ,
but when I run the commond ,it shows anthoer worng,
hc@hc-PC:/media/media_share/linkfile/models$ protoc object_detection/protos/*.proto --python_out=.
object_detection/protos/anchor_generator.proto:11:3: Expected "required", "optional", or "repeated".
object_detection/protos/anchor_generator.proto:11:32: Missing field number.
what is wrong ?
Could you help me?
thank you very much
I am not sure what is wrong in your specific example. This type of question is also better suited to stackoverflow, you can ask, there and may get more responses.
Solved by updating protobuf
@10183308 as mentioned, this issue is most likely caused an outdated version of the protobuf compiler. You can download a more recent version of the protobuf compiler here: https://github.com/google/protobuf/releases
We recommend using protobuf 2.6.1 or higher.
Should the object detection tutorial mention the installation in the beginning? Issues #1562, #1591, #1595 and this one are all related to not knowing that such installation (especially the Protobuf compilation step) is required. This would make the tutorial clearer and avoid future confusion.
@danzelmo your comment fixed the issue for me.
@korrawat I do agree these commands should be in the README.
But when i do...
"protoc object_detection/protos/*.proto--python_out=."
The terminal responds as "Missing output directives."
You to add a space. Use protoc object_detection/protos/*.proto --python_out=. instead of
protoc object_detection/protos/*.proto--python_out=.
Thanks @danzelmo, problem solved!
Looks like the installation instructions on the object detection tutorial do include a mention of the Protobuf requirement. Closing this issue.
You to add a space. Use
protoc object_detection/protos/*.proto --python_out=.instead of
protoc object_detection/protos/*.proto--python_out=.
Hi, I have the same problem and I did as you said : now I have the file string_int_label_map_pb2, in the right place, but he still says that he can not find it :/
ImportError: cannot import name 'string_int_label_map_pb2'
Do you have any idea?
Most helpful comment
Should the object detection tutorial mention the installation in the beginning? Issues #1562, #1591, #1595 and this one are all related to not knowing that such installation (especially the Protobuf compilation step) is required. This would make the tutorial clearer and avoid future confusion.