svpino / tf_object_detection_cm

Confusion Matrix in Object Detection with TensorFlow
78 stars 36 forks source link

TypeError: sequence item 0: expected str instance, bytes found #4

Closed MariAmon closed 5 years ago

MariAmon commented 5 years ago

I ran the script with the command: python confusion_matrix.py --detections_record=infer_fasterrcnn.record --label_map=training_fasterrcnn/LP_label_map.pbtxt

It resulted to this error: /home/mari/anaconda3/lib/python3.6/site-packages/h5py/init.py:36: FutureWarning: Conversion of the second argument of issubdtype from float to np.floating is deprecated. In future, it will be treated as np.float64 == np.dtype(float).type. from ._conv import register_converters as _register_converters Traceback (most recent call last): File "confusion_matrix.py", line 133, in tf.app.run(main) File "/home/mari/anaconda3/lib/python3.6/site-packages/tensorflow/python/platform/app.py", line 125, in run _sys.exit(main(argv)) File "confusion_matrix.py", line 128, in main confusion_matrix = process_detections(FLAGS.detections_record, categories) File "confusion_matrix.py", line 45, in process_detections decoded_dict = data_parser.parse(example) File "/home/mari/anaconda3/lib/python3.6/site-packages/object_detection-0.1-py3.6.egg/object_detection/metrics/tf_example_parser.py", line 153, in parse results_dict[key] = parser.parse(tf_example) File "/home/mari/anaconda3/lib/python3.6/site-packages/object_detection-0.1-py3.6.egg/object_detection/metrics/tf_example_parser.py", line 49, in parse self.field_name].HasField("bytes_list") else None TypeError: sequence item 0: expected str instance, bytes found mari@mari-Lenovo-ideapad-320-15IKB:~/Documents/models/research/object_detection$ python confusion_matrix.py --detections_record=infer_fasterrcnn.record --label_map=training_fasterrcnn/LP_label_map.pbtxt /home/mari/anaconda3/lib/python3.6/site-packages/h5py/init.py:36: FutureWarning: Conversion of the second argument of issubdtype from float to np.floating is deprecated. In future, it will be treated as np.float64 == np.dtype(float).type. from ._conv import register_converters as _register_converters Traceback (most recent call last): File "confusion_matrix.py", line 133, in tf.app.run(main) File "/home/mari/anaconda3/lib/python3.6/site-packages/tensorflow/python/platform/app.py", line 125, in run _sys.exit(main(argv)) File "confusion_matrix.py", line 128, in main confusion_matrix = process_detections(FLAGS.detections_record, categories) File "confusion_matrix.py", line 45, in process_detections decoded_dict = data_parser.parse(example) File "/home/mari/anaconda3/lib/python3.6/site-packages/object_detection-0.1-py3.6.egg/object_detection/metrics/tf_example_parser.py", line 153, in parse results_dict[key] = parser.parse(tf_example) File "/home/mari/anaconda3/lib/python3.6/site-packages/object_detection-0.1-py3.6.egg/object_detection/metrics/tf_example_parser.py", line 49, in parse self.field_name].HasField("bytes_list") else None TypeError: sequence item 0: expected str instance, bytes found

I would appreciate all kinds of help.

MariAmon commented 5 years ago

Sorry, I just saw issue#1. This was already resolved.