matlab中的IoU计算函数
来源:互联网 发布:免费签名设计软件 编辑:程序博客网 时间:2024/05/14 06:00
突然在代码中撇到了Faster R-CNN中的IoU计算函数,计算两个bounding box之间的IoU值。IoU计算很简单但是很常用,因为看过多次代码都没有注意过,因此记录一下。
该函数比较简单,转载自Faster R-CNN代码,作者Pedro Felzenszwalb, Ross Girshick。
function o = boxoverlap(a, b)% Compute the symmetric intersection over union overlap between a set of% bounding boxes in a and a single bounding box in b.%% a a matrix where each row specifies a bounding box% b a matrix where each row specifies a bounding box% AUTORIGHTS% -------------------------------------------------------% Copyright (C) 2011-2012 Ross Girshick% Copyright (C) 2008, 2009, 2010 Pedro Felzenszwalb, Ross Girshick% % This file is part of the voc-releaseX code% (http://people.cs.uchicago.edu/~rbg/latent/)% and is available under the terms of an MIT-like license% provided in COPYING. Please retain this notice and% COPYING if you use this file (or a portion of it) in% your project.% -------------------------------------------------------o = cell(1, size(b, 1));for i = 1:size(b, 1) x1 = max(a(:,1), b(i,1)); y1 = max(a(:,2), b(i,2)); x2 = min(a(:,3), b(i,3)); y2 = min(a(:,4), b(i,4)); w = x2-x1+1; h = y2-y1+1; inter = w.*h; aarea = (a(:,3)-a(:,1)+1) .* (a(:,4)-a(:,2)+1); barea = (b(i,3)-b(i,1)+1) * (b(i,4)-b(i,2)+1); % intersection over union overlap o{i} = inter ./ (aarea+barea-inter); % set invalid entries to 0 overlap o{i}(w <= 0) = 0; o{i}(h <= 0) = 0;endo = cell2mat(o);
0 0
- matlab中的IoU计算函数
- 目标检测中的IOU计算问题
- MATLAB中的cumsum()函数 计算…
- IOU
- iou
- Matlab中的符号计算
- Matlab中的FFT计算
- 计算两个矩形IOU的算法
- 【YOLO】用 Python 来计算 IOU
- Python计算机视觉里的IOU计算
- 计算图片中矩形间的IOU
- MATLAB---matlab 中的bwlabel函数
- matlab科学计算常用函数
- Matlab中的有限域计算
- IoU 检测评价函数 intersection-over-union
- MATLAB中的S函数
- matlab中的mean函数
- MATLAB中的filter函数
- centos配置ssh免密钥登录但是仍提示需要输入密码的解决办法
- 解决多进程或多线程同时读写同一个文件的问题
- perl:verilog dummy module
- PHP基础知识部分-个人学习笔记
- 协同过滤推荐算法
- matlab中的IoU计算函数
- stl容器list部分实现
- n个球有一个假冒(重量不足),如果给你一个天平允许你测3次找出那个假冒的,问n可能的数值?
- Dreamweaver功能及站点的创建
- Mac下安装Spark开发环境(Linux系统可参照)
- git更新文件冲突 Please,commit your changes or stash them before you can merge.
- media 常用库描述 库描述
- 网易招聘试题
- Session的实现原理。