当前位置:网站首页>bounding box iou
bounding box iou
2022-04-23 20:22:00 【ujn20161222】
https://gist.github.com/meyerjo/dd3533edc97c81258898f60d8978eddc
def bb_intersection_over_union(boxA, boxB):
# determine the (x, y)-coordinates of the intersection rectangle
xA = max(boxA[0], boxB[0])
yA = max(boxA[1], boxB[1])
xB = min(boxA[2], boxB[2])
yB = min(boxA[3], boxB[3])
# compute the area of intersection rectangle
interArea = abs(max((xB - xA, 0)) * max((yB - yA), 0))
if interArea == 0:
return 0
# compute the area of both the prediction and ground-truth
# rectangles
boxAArea = abs((boxA[2] - boxA[0]) * (boxA[3] - boxA[1]))
boxBArea = abs((boxB[2] - boxB[0]) * (boxB[3] - boxB[1]))
# compute the intersection over union by taking the intersection
# area and dividing it by the sum of prediction + ground-truth
# areas - the interesection area
iou = interArea / float(boxAArea + boxBArea - interArea)
# return the intersection over union value
return iou
版权声明
本文为[ujn20161222]所创,转载请带上原文链接,感谢
https://blog.csdn.net/ujn20161222/article/details/124339748
边栏推荐
- JDBC database addition, deletion, query and modification tool class
- SIGIR'22 "Microsoft" CTR estimation: using context information to promote feature representation learning
- Zdns was invited to attend the annual conference of Tencent cloud basic resources and share the 2020 domain name industry development report
- R语言使用timeROC包计算无竞争风险情况下的生存资料多时间AUC值、使用confint函数计算无竞争风险情况下的生存资料多时间AUC指标的置信区间值
- DTMF双音多频信号仿真演示系统
- star
- Solution to PowerDesigner's failure to connect to MySQL in x64 system
- 論文寫作 19: 會議論文與期刊論文的區別
- [graph theory brush question-4] force deduction 778 Swimming in a rising pool
- 16MySQL之DCL 中 COMMIT和ROllBACK
猜你喜欢
Scrapy教程 - (2)寫一個簡單爬蟲
Tensorflow 2 basic operation dictionary
Actual measurement of automatic ticket grabbing script of barley network based on selenium (the first part of the new year)
Monte Carlo py solves the area problem! (save pupils Series)
LeetCode动态规划训练营(1~5天)
go-zero框架数据库方面避坑指南
Browser - learning notes
PCL点云处理之计算两平面交线(五十一)
[latex] 5 how to quickly write out the latex formula corresponding to the formula
Commit and rollback in DCL of 16 MySQL
随机推荐
波场DAO新物种下场,USDD如何破局稳定币市场?
STM32 Basics
Numpy Index & slice & iteration
Record: call mapper to report null pointer Foreach > the usage of not removing repetition;
【栈和队列专题】—— 滑动窗口
論文寫作 19: 會議論文與期刊論文的區別
nc基础用法
Numpy mathematical function & logical function
Development of Matlab GUI bridge auxiliary Designer (functional introduction)
DNS cloud school | analysis of hidden tunnel attacks in the hidden corner of DNS
R语言使用econocharts包创建微观经济或宏观经济图、indifference函数可视化无差异曲线、自定义计算交叉点、自定义配置indifference函数的参数丰富可视化效果
star
Redis的安装(CentOS7命令行安装)
Intersection calculation of straight line and plane in PCL point cloud processing (53)
[latex] 5 how to quickly write out the latex formula corresponding to the formula
CVPR 2022 | querydet: use cascaded sparse query to accelerate small target detection under high resolution
Cadence Orcad Capture CIS更换元器件之Link Database 功能介绍图文教程及视频演示
SQL Server Connectors By Thread Pool | DTSQLServerTP plugin instructions
Redis installation (centos7 command line installation)
Notes of Tang Shu's grammar class in postgraduate entrance examination English