nicknochnack / RealTimeObjectDetection

370 stars 587 forks source link

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

Open Simon1059770342 opened 2 years ago

Simon1059770342 commented 2 years ago

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 commented 2 years ago

when I run

Simon1059770342 commented 2 years ago

!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 commented 2 years ago

I got this error

Simon1059770342 commented 2 years ago

PLZ Help me!

hello-world1019 commented 2 years ago

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

hello-world1019 commented 2 years ago

I found a thread about installing a protoc thing on GitHub (as well as stack overflow) here is the url to the GitHub thread https://github.com/tensorflow/models/issues/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 commented 1 year ago

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

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

ayushitiwari3032 commented 7 months ago

did anyone got the way to correct this error??