Reputation: 53
Is there a way to visualize the Precision-Recall Curve in the Tensorflow Object Detection API? I know that the mAP represents absolute value of the area under the curve, but i think the actual curve would be more representable for my application? I already found some precision and recall values within the utils/metrics1, but I don't know what they represent exactly, or better said, how to generate a Prec/Recall Curve out of them. Can somebody help me, how to do that?
Upvotes: 3
Views: 4972
Reputation: 462
compute_precision_recall
outputs two numpy arrays of the same length, ie. precision and recall. You can easily plot these values with matplotlib:
import matplotlib.pyplot as plt
...
precision, recall = compute_precision_recall(scores, labels, num_gt)
plt.figure()
plt.step(recall, precision, where='post' )
plt.xlabel('Recall')
plt.ylabel('Precision')
plt.xlim((0, 1))
plt.ylim((0, 1))
plt.show()
plt.close()
Upvotes: 3