-
Notifications
You must be signed in to change notification settings - Fork 924
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
TypeError: expected bytes, str found #148
Comments
Traceback (most recent call last): During handling of the above exception, another exception occurred: Traceback (most recent call last): During handling of the above exception, another exception occurred: Traceback (most recent call last): |
Same Problem here :( |
What's the python version? |
When trying to execute: TF_RECORD_SCRIPT file
!python {files['TF_RECORD_SCRIPT']} -x {os.path.join(paths['IMAGE_PATH'], 'train')} -l {files['LABELMAP']} -o {os.path.join(paths['ANNOTATION_PATH'], 'train.record')}
!python {files['TF_RECORD_SCRIPT']} -x {os.path.join(paths['IMAGE_PATH'], 'test')} -l {files['LABELMAP']} -o {os.path.join(paths['ANNOTATION_PATH'], 'test.record')}
facing this issue. Can anyone guide me?
Traceback (most recent call last):
File "/home/abdul-qadir/Desktop/Computer/Tensorflow Object Detection/TFOD/tfod/lib/python3.11/site-packages/object_detection/utils/label_map_util.py", line 175, in load_labelmap
text_format.Merge(label_map_string, label_map)
File "/home/abdul-qadir/Desktop/Computer/Tensorflow Object Detection/TFOD/tfod/lib/python3.11/site-packages/google/protobuf/text_format.py", line 744, in Merge
return MergeLines(
^^^^^^^^^^^
File "/home/abdul-qadir/Desktop/Computer/Tensorflow Object Detection/TFOD/tfod/lib/python3.11/site-packages/google/protobuf/text_format.py", line 818, in MergeLines
return parser.MergeLines(lines, message)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/abdul-qadir/Desktop/Computer/Tensorflow Object Detection/TFOD/tfod/lib/python3.11/site-packages/google/protobuf/text_format.py", line 843, in MergeLines
self._ParseOrMerge(lines, message)
File "/home/abdul-qadir/Desktop/Computer/Tensorflow Object Detection/TFOD/tfod/lib/python3.11/site-packages/google/protobuf/text_format.py", line 867, in _ParseOrMerge
self._MergeField(tokenizer, message)
File "/home/abdul-qadir/Desktop/Computer/Tensorflow Object Detection/TFOD/tfod/lib/python3.11/site-packages/google/protobuf/text_format.py", line 1004, in _MergeField
merger(tokenizer, message, field)
File "/home/abdul-qadir/Desktop/Computer/Tensorflow Object Detection/TFOD/tfod/lib/python3.11/site-packages/google/protobuf/text_format.py", line 1085, in _MergeMessageField
self._MergeField(tokenizer, sub_message)
File "/home/abdul-qadir/Desktop/Computer/Tensorflow Object Detection/TFOD/tfod/lib/python3.11/site-packages/google/protobuf/text_format.py", line 965, in _MergeField
raise tokenizer.ParseErrorPreviousToken(
google.protobuf.text_format.ParseError: 3:1 : Message type "object_detection.protos.StringIntLabelMapItem" has no field named "tid".
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/abdul-qadir/Desktop/Computer/Tensorflow Object Detection/TFOD/Tensorflow/scripts/generate_tfrecord.py", line 61, in
label_map = label_map_util.load_labelmap(args.labels_path)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/abdul-qadir/Desktop/Computer/Tensorflow Object Detection/TFOD/tfod/lib/python3.11/site-packages/object_detection/utils/label_map_util.py", line 177, in load_labelmap
label_map.ParseFromString(label_map_string)
TypeError: expected bytes, str found
Traceback (most recent call last):
File "/home/abdul-qadir/Desktop/Computer/Tensorflow Object Detection/TFOD/tfod/lib/python3.11/site-packages/object_detection/utils/label_map_util.py", line 175, in load_labelmap
text_format.Merge(label_map_string, label_map)
File "/home/abdul-qadir/Desktop/Computer/Tensorflow Object Detection/TFOD/tfod/lib/python3.11/site-packages/google/protobuf/text_format.py", line 744, in Merge
return MergeLines(
^^^^^^^^^^^
File "/home/abdul-qadir/Desktop/Computer/Tensorflow Object Detection/TFOD/tfod/lib/python3.11/site-packages/google/protobuf/text_format.py", line 818, in MergeLines
return parser.MergeLines(lines, message)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/abdul-qadir/Desktop/Computer/Tensorflow Object Detection/TFOD/tfod/lib/python3.11/site-packages/google/protobuf/text_format.py", line 843, in MergeLines
self._ParseOrMerge(lines, message)
File "/home/abdul-qadir/Desktop/Computer/Tensorflow Object Detection/TFOD/tfod/lib/python3.11/site-packages/google/protobuf/text_format.py", line 867, in _ParseOrMerge
self._MergeField(tokenizer, message)
File "/home/abdul-qadir/Desktop/Computer/Tensorflow Object Detection/TFOD/tfod/lib/python3.11/site-packages/google/protobuf/text_format.py", line 1004, in _MergeField
merger(tokenizer, message, field)
File "/home/abdul-qadir/Desktop/Computer/Tensorflow Object Detection/TFOD/tfod/lib/python3.11/site-packages/google/protobuf/text_format.py", line 1085, in _MergeMessageField
self._MergeField(tokenizer, sub_message)
File "/home/abdul-qadir/Desktop/Computer/Tensorflow Object Detection/TFOD/tfod/lib/python3.11/site-packages/google/protobuf/text_format.py", line 965, in _MergeField
raise tokenizer.ParseErrorPreviousToken(
google.protobuf.text_format.ParseError: 3:1 : Message type "object_detection.protos.StringIntLabelMapItem" has no field named "tid".
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/abdul-qadir/Desktop/Computer/Tensorflow Object Detection/TFOD/Tensorflow/scripts/generate_tfrecord.py", line 61, in
label_map = label_map_util.load_labelmap(args.labels_path)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/abdul-qadir/Desktop/Computer/Tensorflow Object Detection/TFOD/tfod/lib/python3.11/site-packages/object_detection/utils/label_map_util.py", line 177, in load_labelmap
label_map.ParseFromString(label_map_string)
TypeError: expected bytes, str found
The text was updated successfully, but these errors were encountered: