简体   繁体   English

基于两个边界框列表计算精度和召回率

[英]computing precision and recall based on two list of bounding box

does anyone know, given two lists of the bounding box, one is predicted, the other is the ground truth, is there some existing python library or code I can use to compute the accuracy?有谁知道,给定两个边界框列表,一个是预测的,另一个是基本事实,是否有一些现有的 python 库或代码可以用来计算准确性? There are many existing codes for first calculating the lou, and I know I can compute it on my own.有许多用于先计算 lou 的现有代码,我知道我可以自己计算。 But I thought there should also be some existing tools I can use to directly get the accuracy indexes so that I finish my project in a smarter way than coding by myself.但我认为也应该有一些现有的工具可以用来直接获取准确度指标,以便我以比自己编码更聪明的方式完成我的项目。

Thanks!谢谢!

Yes there is a lot of love from sklearn.metrics是的from sklearn.metrics

Heres a link: http://scikit-learn.org/stable/modules/classes.html#sklearn-metrics-metrics这是一个链接: http : //scikit-learn.org/stable/modules/classes.html#sklearn-metrics-metrics

Here's a basic example:这是一个基本示例:

from sklearn.metrics import accuracy_score
pr_score = accuracy_score(y_test, y_pred)
print(pr_score)

Where y_pred is the predictions and y_test is the so called "ground truth"其中 y_pred 是预测,y_test 是所谓的“基本事实”

In the above link you can read and chose the evaluation metric that suits you.在上面的链接中,您可以阅读并选择适合您的评估指标。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM