当前位置:网站首页>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
边栏推荐
- Scrapy教程 - (2)寫一個簡單爬蟲
- Still using listview? Use animatedlist to make list elements move
- Scripy tutorial - (2) write a simple crawler
- Thirty What are VM and VC?
- Actual measurement of automatic ticket grabbing script of barley network based on selenium (the first part of the new year)
- Customize timeline component styles
- Rt-1052 learning notes - GPIO architecture analysis
- How to protect ECs from hacker attacks?
- 堡垒机、跳板机JumpServer的搭建,以及使用,图文详细
- LeetCode 1346、检查整数及其两倍数是否存在
猜你喜欢
![[PTA] l1-002 printing hourglass](/img/9e/dc715f7debf7edb7a40e9ecfa69cef.png)
[PTA] l1-002 printing hourglass

Don't bother tensorflow learning notes (10-12) -- Constructing a simple neural network and its visualization

【PTA】整除光棍

【栈和队列专题】—— 滑动窗口
Handwritten Google's first generation distributed computing framework MapReduce

上海回應“面粉官網是非法網站”:疏於運維被“黑”,警方已立案

內網滲透之DOS命令

Identification of bolt points in aerial photography based on perception

Wave field Dao new species end up, how does usdd break the situation and stabilize the currency market?

Installation and use of NVM
随机推荐
LeetCode 1346、检查整数及其两倍数是否存在
ArcGIS js api 4. X submergence analysis and water submergence analysis
Commande dos pour la pénétration de l'Intranet
Numpy mathematical function & logical function
LeetCode 232、用栈实现队列
Introduction to link database function of cadence OrCAD capture CIS replacement components, graphic tutorial and video demonstration
Recommend an open source free drawing software draw IO exportable vector graph
PCA based geometric feature calculation of PCL point cloud processing (52)
Sqoop imports data from Mysql to HDFS using lzop compression format and reports NullPointerException
C migration project record: modify namespace and folder name
The second method of file upload in form form is implemented by fileitem class, servletfileupload class and diskfileitemfactory class.
Identification of bolt points in aerial photography based on perception
Leetcode dynamic planning training camp (1-5 days)
一. js的深拷贝和浅拷贝
LeetCode 116. Populate the next right node pointer for each node
DNS cloud school rising posture! Three advanced uses of authoritative DNS
Linux64Bit下安装MySQL5.6-不能修改root密码
SQL: query duplicate data and delete duplicate data
R language uses the preprocess function of caret package for data preprocessing: BoxCox transform all data columns (convert non normal distribution data columns to normal distribution data and can not
Automatically fill in body temperature and win10 task plan