当前位置:网站首页>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
边栏推荐
- ArcGIS JS version military landmark drawing (dovetail arrow, pincer arrow, assembly area) fan and other custom graphics
- Numpy - creation of data type and array
- SIGIR'22「微软」CTR估计:利用上下文信息促进特征表征学习
- JDBC tool class jdbcconutil gets the connection to the database
- R语言ggplot2可视化:ggplot2可视化散点图并使用geom_mark_ellipse函数在数据簇或数据分组的数据点周围添加椭圆进行注释
- Why does ES6 need to introduce map when JS already has object type
- Some basic configurations in interlij idea
- Building the tide, building the foundation and winning the future -- the successful holding of zdns Partner Conference
- PIP installation package reports an error. Could not find a version that satisfies the requirement pymysql (from versions: none)
- Leetcode dynamic planning training camp (1-5 days)
猜你喜欢
Livego + ffmpeg + RTMP + flvjs to realize live video
WordPress plug-in: WP CHINA Yes solution to slow domestic access to the official website
SIGIR'22「微软」CTR估计:利用上下文信息促进特征表征学习
Numpy mathematical function & logical function
Sqoop imports tinyint type fields to boolean type
Automatically fill in body temperature and win10 task plan
AQS learning
Building the tide, building the foundation and winning the future -- the successful holding of zdns Partner Conference
Numpy Index & slice & iteration
How can matlab obtain the truncated image in trainingimagelabeler
随机推荐
Five minutes to show you what JWT is
Redis的安装(CentOS7命令行安装)
Computing the intersection of two planes in PCL point cloud processing (51)
Recognition of high-speed road signs by Matlab using alexnet
Intersection calculation of straight line and plane in PCL point cloud processing (53)
[graph theory brush question-4] force deduction 778 Swimming in a rising pool
Building the tide, building the foundation and winning the future -- the successful holding of zdns Partner Conference
Zdns was invited to attend the annual conference of Tencent cloud basic resources and share the 2020 domain name industry development report
Numpy mathematical function & logical function
nc基础用法
【PTA】L2-011 玩转二叉树
Commit and ROLLBACK in DCL of 16mysql
R语言ggplot2可视化分面图(facet_wrap)、使用lineheight参数自定义设置分面图标签栏(灰色标签栏)的高度
CVPR 2022 | QueryDet:使用级联稀疏query加速高分辨率下的小目标检测
Tencent Qiu Dongyang: techniques and ways of accelerating deep model reasoning
Introduction to link database function of cadence OrCAD capture CIS replacement components, graphic tutorial and video demonstration
Still using listview? Use animatedlist to make list elements move
Commit and rollback in DCL of 16 MySQL
考研英语唐叔的语法课笔记
R language uses timeroc package to calculate the multi time AUC value of survival data under competitive risk, uses Cox model and adds covariates, and R language uses the plotauccurve function of time