Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ImportError: cannot import name 'string_int_label_map_pb2' from 'object_detection.protos' #21

Open
Simon1059770342 opened this issue Mar 5, 2022 · 8 comments

Comments

@Simon1059770342
Copy link

evn: Win10+Anaconda
Traceback (most recent call last):
File "F:\SSD-MobileNet\Python\sign_language\RealTimeObjectDetection\Tensorflow\scripts\generate_tfrecord.py", line 29, in
from object_detection.utils import dataset_util, label_map_util
File "C:\ProgramData\Anaconda3\lib\site-packages\object_detection\utils\label_map_util.py", line 21, in
from object_detection.protos import string_int_label_map_pb2
ImportError: cannot import name 'string_int_label_map_pb2' from 'object_detection.protos' (C:\ProgramData\Anaconda3\lib\site-packages\object_detection\protos_init_.py)
Traceback (most recent call last):
File "F:\SSD-MobileNet\Python\sign_language\RealTimeObjectDetection\Tensorflow\scripts\generate_tfrecord.py", line 29, in
from object_detection.utils import dataset_util, label_map_util
File "C:\ProgramData\Anaconda3\lib\site-packages\object_detection\utils\label_map_util.py", line 21, in
from object_detection.protos import string_int_label_map_pb2
ImportError: cannot import name 'string_int_label_map_pb2' from 'object_detection.protos' (C:\ProgramData\Anaconda3\lib\site-packages\object_detection\protos_init_.py)

@Simon1059770342
Copy link
Author

when I run

@Simon1059770342
Copy link
Author

!python {SCRIPTS_PATH + '/generate_tfrecord.py'} -x {IMAGE_PATH + '/train'} -l {ANNOTATION_PATH + '/label_map.pbtxt'} -o {ANNOTATION_PATH + '/train.record'}
!python {SCRIPTS_PATH + '/generate_tfrecord.py'} -x{IMAGE_PATH + '/test'} -l {ANNOTATION_PATH + '/label_map.pbtxt'} -o {ANNOTATION_PATH + '/test.record'}

@Simon1059770342
Copy link
Author

I got this error

@Simon1059770342
Copy link
Author

PLZ Help me!

@hello-world1019
Copy link

got this problem too :(
running on mac
anyone got a solution? thanks!

@hello-world1019
Copy link

I found a thread about installing a protoc thing on GitHub (as well as stack overflow)
here is the url to the GitHub thread tensorflow/models#1595
I am not sure if it works, cuz rlly new to such programming stuff concerned with terminals (or command prompts) n I hv no idea what I should do even after reading them, but I guess u could try it out :)
hope it works for u!

@being-invincible
Copy link

Why is this object detection have to be this hard??

can anyone provide a solution to this problem....

@ayushitiwari3032
Copy link

did anyone got the way to correct this error??

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants