当前位置:网站首页>bounding box iou
bounding box iou
2022-04-23 20:27: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://yzsam.com/2022/04/202204232022188212.html
边栏推荐
- 【PTA】L2-011 玩转二叉树
- Browser - learning notes
- BMP JPEG picture to vector image contourtrace
- . Ren -- the intimate artifact in the field of vertical Recruitment!
- Devexpress 14.1 installation record
- Paper writing 19: the difference between conference papers and journal papers
- LeetCode 116. 填充每个节点的下一个右侧节点指针
- The construction and use of Fortress machine and springboard machine jumpserver are detailed in pictures and texts
- 內網滲透之DOS命令
- Shanghai a répondu que « le site officiel de la farine est illégal »: l'exploitation et l'entretien négligents ont été « noirs » et la police a déposé une plainte
猜你喜欢
Some basic knowledge of devexpress report development
Matlab analytic hierarchy process to quickly calculate the weight
Handwritten Google's first generation distributed computing framework MapReduce
An error is reported when sqoop imports data from Mysql to HDFS: sqlexception in nextkeyvalue
. Ren -- the intimate artifact in the field of vertical Recruitment!
Operation of numpy array
Livego + ffmpeg + RTMP + flvjs to realize live video
Recognition of high-speed road signs by Matlab using alexnet
Actual measurement of automatic ticket grabbing script of barley network based on selenium (the first part of the new year)
ArcGIS JS version military landmark drawing (dovetail arrow, pincer arrow, assembly area) fan and other custom graphics
随机推荐
【问题解决】‘ascii‘ codec can‘t encode characters in position xx-xx: ordinal not in range(128)
Thirty What are VM and VC?
考研英语唐叔的语法课笔记
The second method of file upload in form form is implemented by fileitem class, servletfileupload class and diskfileitemfactory class.
Mysql database and table building: the difference between utf8 and utf8mb4
DNS cloud school | quickly locate DNS resolution exceptions and keep these four DNS status codes in mind
LeetCode 20、有效的括号
Leetcode dynamic planning training camp (1-5 days)
JDBC tool class jdbcconutil gets the connection to the database
Implementation of mypromise
【PTA】整除光棍
Numpy Index & slice & iteration
三十一. `prototype`显示原型属性和`__proto__`隐式原型属性
How does onlyoffice solve no route to host
Sqoop imports tinyint type fields to boolean type
Cadence OrCAD capture batch change component packaging function introduction graphic tutorial and video demonstration
What is the difference between a host and a server?
ArcGIS JS version military landmark drawing (dovetail arrow, pincer arrow, assembly area) fan and other custom graphics
Livego + ffmpeg + RTMP + flvjs to realize live video
[talkative cloud native] load balancing - the passenger flow of small restaurants has increased