svpino / tf_object_detection_cm

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

Confusion Matrix is all zeros #39

Closed sbetts2 closed 3 years ago

sbetts2 commented 3 years ago

Hi, after running your code at first I got the error

confusion_matrix.py:115: RuntimeWarning: invalid value encountered in double_scalars precision = (confusion_matrix[id, id] / total_predicted) confusion_matrix.py:116: RuntimeWarning: invalid value encountered in double_scalars recall = (confusion_matrix[id, id] / total_target)

using @muhammadAliShahzad's fix I now only get zeros for everything like follows image

Is there somehow to fix this or am I doing something wrong?

Help is much appreciated, thank you!