Hello, thanks for putting this together! I've been really struggling to find a reliable way to train a custom model and this looks like it's almost perfect for what I need.
I followed your instructions exactly and everything goes fine just until step 11. I get the following error. I did double check the folder locations are as required. Also, I made sure that the label map capitalization is the same as the XML files.
/content/gdrive/My Drive/TensorFlow/scripts/preprocessing
Traceback (most recent call last):
File "/usr/local/lib/python3.6/dist-packages/object_detection-0.1-py3.6.egg/object_detection/utils/label_map_util.py", line 171, in load_labelmap
text_format.Merge(label_map_string, label_map)
File "/usr/local/lib/python3.6/dist-packages/google/protobuf/text_format.py", line 734, in Merge
allow_unknown_field=allow_unknown_field)
File "/usr/local/lib/python3.6/dist-packages/google/protobuf/text_format.py", line 802, in MergeLines
return parser.MergeLines(lines, message)
File "/usr/local/lib/python3.6/dist-packages/google/protobuf/text_format.py", line 827, in MergeLines
self._ParseOrMerge(lines, message)
File "/usr/local/lib/python3.6/dist-packages/google/protobuf/text_format.py", line 849, in _ParseOrMerge
self._MergeField(tokenizer, message)
File "/usr/local/lib/python3.6/dist-packages/google/protobuf/text_format.py", line 974, in _MergeField
merger(tokenizer, message, field)
File "/usr/local/lib/python3.6/dist-packages/google/protobuf/text_format.py", line 1048, in _MergeMessageField
self._MergeField(tokenizer, sub_message)
File "/usr/local/lib/python3.6/dist-packages/google/protobuf/text_format.py", line 974, in _MergeField
merger(tokenizer, message, field)
File "/usr/local/lib/python3.6/dist-packages/google/protobuf/text_format.py", line 1099, in _MergeScalarField
value = tokenizer.ConsumeString()
File "/usr/local/lib/python3.6/dist-packages/google/protobuf/text_format.py", line 1470, in ConsumeString
the_bytes = self.ConsumeByteString()
File "/usr/local/lib/python3.6/dist-packages/google/protobuf/text_format.py", line 1485, in ConsumeByteString
the_list = [self._ConsumeSingleByteString()]
File "/usr/local/lib/python3.6/dist-packages/google/protobuf/text_format.py", line 1504, in _ConsumeSingleByteString
raise self.ParseError('Expected string but found: %r' % (text,))
google.protobuf.text_format.ParseError: 3:13 : ' name: ‘Bird’': Expected string but found: '‘'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "generate_tfrecord.py", line 59, in
label_map = label_map_util.load_labelmap(args.labels_path)
File "/usr/local/lib/python3.6/dist-packages/object_detection-0.1-py3.6.egg/object_detection/utils/label_map_util.py", line 173, in load_labelmap
label_map.ParseFromString(label_map_string)
TypeError: a bytes-like object is required, not 'str'
Traceback (most recent call last):
File "/usr/local/lib/python3.6/dist-packages/object_detection-0.1-py3.6.egg/object_detection/utils/label_map_util.py", line 171, in load_labelmap
text_format.Merge(label_map_string, label_map)
File "/usr/local/lib/python3.6/dist-packages/google/protobuf/text_format.py", line 734, in Merge
allow_unknown_field=allow_unknown_field)
File "/usr/local/lib/python3.6/dist-packages/google/protobuf/text_format.py", line 802, in MergeLines
return parser.MergeLines(lines, message)
File "/usr/local/lib/python3.6/dist-packages/google/protobuf/text_format.py", line 827, in MergeLines
self._ParseOrMerge(lines, message)
File "/usr/local/lib/python3.6/dist-packages/google/protobuf/text_format.py", line 849, in _ParseOrMerge
self._MergeField(tokenizer, message)
File "/usr/local/lib/python3.6/dist-packages/google/protobuf/text_format.py", line 974, in _MergeField
merger(tokenizer, message, field)
File "/usr/local/lib/python3.6/dist-packages/google/protobuf/text_format.py", line 1048, in _MergeMessageField
self._MergeField(tokenizer, sub_message)
File "/usr/local/lib/python3.6/dist-packages/google/protobuf/text_format.py", line 974, in _MergeField
merger(tokenizer, message, field)
File "/usr/local/lib/python3.6/dist-packages/google/protobuf/text_format.py", line 1099, in _MergeScalarField
value = tokenizer.ConsumeString()
File "/usr/local/lib/python3.6/dist-packages/google/protobuf/text_format.py", line 1470, in ConsumeString
the_bytes = self.ConsumeByteString()
File "/usr/local/lib/python3.6/dist-packages/google/protobuf/text_format.py", line 1485, in ConsumeByteString
the_list = [self._ConsumeSingleByteString()]
File "/usr/local/lib/python3.6/dist-packages/google/protobuf/text_format.py", line 1504, in _ConsumeSingleByteString
raise self.ParseError('Expected string but found: %r' % (text,))
google.protobuf.text_format.ParseError: 3:13 : ' name: ‘Bird’': Expected string but found: '‘'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "generate_tfrecord.py", line 59, in
label_map = label_map_util.load_labelmap(args.labels_path)
File "/usr/local/lib/python3.6/dist-packages/object_detection-0.1-py3.6.egg/object_detection/utils/label_map_util.py", line 173, in load_labelmap
label_map.ParseFromString(label_map_string)
TypeError: a bytes-like object is required, not 'str'