svpino / tf_object_detection_cm

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

IndexError: index 5 is out of bounds for axis 0 with size 5 #9

Closed mohammadakz closed 5 years ago

mohammadakz commented 5 years ago

Hello, I have checked the closed issues but I still have the following error what could be a reason? I am running my model on a cluster Also, to run infer_detections.py I am adding train.record and test.record files that I have created for training the model first. then I identify the output path as "inference/inference.record" to save the file as a ".record" file. Correct me please if I am mistaken

Due to MODULEPATH changes, the following have been reloaded: 1) openmpi/2.1.1

WARNING:tensorflow:From ./Confusion.py:36: 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.py", line 133, in tf.app.run(main) File "/scratch/moakbarz/models/research/object_detection/tensorflowm/lib/python2.7/site-packages/tensorflow/python/platform/app.py", line 125, in run _sys.exit(main(argv)) File "./Confusion.py", line 128, in main confusion_matrix = process_detections(FLAGS.detections_record, categories) File "./Confusion.py", line 87, in process_detections confusion_matrix[groundtruth_classes[i] - 1][detection_classes[int(matches[matches[:,0] == i, 1][0])] - 1] += 1 IndexError: index 5 is out of bounds for axis 0 with size 5