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. #21

Closed viniciusov closed 4 years ago

viniciusov commented 4 years ago

After running

python confusion_matrix.py --detections_record=data/train.record --label_map=data/object_detection.pbtxt --output_path=confusion_matrix.csv

I got this error:

WARNING:tensorflow:From confusion_matrix.py:38: tf_record_iterator (from tensorflow.python.lib.io.tf_record) is deprecated and will be removed in a future version.
Instructions for updating:
Use eager execution and:
`tf.data.TFRecordDataset(path)`
Traceback (most recent call last):
  File "confusion_matrix.py", line 142, in <module>
    tf.app.run(main)
  File "C:\Users\vinicius\Anaconda3\lib\site-packages\tensorflow\python\platform\app.py", line 125, in run
    _sys.exit(main(argv))
  File "confusion_matrix.py", line 137, in main
    confusion_matrix = process_detections(FLAGS.detections_record, categories)
  File "confusion_matrix.py", line 47, in process_detections
    decoded_dict = data_parser.parse(example)
  File "C:\Users\vinicius\object_detection\models\research\object_detection\metrics\tf_example_parser.py", line 153, in parse
    results_dict[key] = parser.parse(tf_example)
  File "C:\Users\vinicius\object_detection\models\research\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'm Using Tensorflow object Detection API and TF==1.13.1.

svpino commented 4 years ago

Check issue #1