Tensorflow 对象检测 API 中的 Precision-Recall 曲线 [英] Precision-Recall Curve in Tensorflow Object Detection API

查看:58
本文介绍了Tensorflow 对象检测 API 中的 Precision-Recall 曲线的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法在 Tensorflow 对象检测 API 中可视化 Precision-Recall 曲线?我知道 mAP 代表曲线下面积的绝对值,但我认为实际曲线更能代表我的应用程序?我已经在 utils/metrics1 中找到了一些精度和召回值,但我不知道它们究竟代表什么,或者更好地说,如何从中生成 Prec/Recall 曲线.有人可以帮我吗,怎么做?

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?

推荐答案

compute_precision_recall 输出两个相同长度的 numpy 数组,即.准确率和召回率.您可以使用 matplotlib 轻松绘制这些值:

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()

这篇关于Tensorflow 对象检测 API 中的 Precision-Recall 曲线的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆