gt_overlaps的源头来自于如下代码:

def evaluate_recall(self, candidate_boxes=None, thresholds=None,area='all', limit=None):"""Evaluate detection proposal recall metrics.Returns:results: dictionary of results with keys'ar': average recall'recalls': vector recalls at each IoU overlap threshold'thresholds': vector of IoU overlap thresholds'gt_overlaps': vector of all ground-truth overlaps"""# Record max overlap value for each gt box# Return vector of overlap valuesareas = {'all': 0, 'small': 1, 'medium': 2, 'large': 3,'96-128': 4, '128-256': 5, '256-512': 6, '512-inf': 7}area_ranges = [[0 ** 2, 1e5 ** 2],  # all[0 ** 2, 32 ** 2],  # small[32 ** 2, 96 ** 2],  # medium[96 ** 2, 1e5 ** 2],  # large[96 ** 2, 128 ** 2],  # 96-128[128 ** 2, 256 ** 2],  # 128-256[256 ** 2, 512 ** 2],  # 256-512[512 ** 2, 1e5 ** 2],  # 512-inf]assert area in areas, 'unknown area range: {}'.format(area)area_range = area_ranges[areas[area]]gt_overlaps = np.zeros(0)num_pos = 0for i in range(self.num_images):# Checking for max_overlaps == 1 avoids including crowd annotations# (...pretty hacking :/)max_gt_overlaps = self.roidb[i]['gt_overlaps'].toarray().max(axis=1)gt_inds = np.where((self.roidb[i]['gt_classes'] > 0) &(max_gt_overlaps == 1))[0]gt_boxes = self.roidb[i]['boxes'][gt_inds, :]gt_areas = self.roidb[i]['seg_areas'][gt_inds]valid_gt_inds = np.where((gt_areas >= area_range[0]) &(gt_areas <= area_range[1]))[0]gt_boxes = gt_boxes[valid_gt_inds, :]num_pos += len(valid_gt_inds)if candidate_boxes is None:# If candidate_boxes is not supplied, the default is to use the# non-ground-truth boxes from this roidbnon_gt_inds = np.where(self.roidb[i]['gt_classes'] == 0)[0]boxes = self.roidb[i]['boxes'][non_gt_inds, :]else:boxes = candidate_boxes[i]if boxes.shape[0] == 0:continueif limit is not None and boxes.shape[0] > limit:boxes = boxes[:limit, :]overlaps = bbox_overlaps(boxes.astype(np.float),gt_boxes.astype(np.float))_gt_overlaps = np.zeros((gt_boxes.shape[0]))for j in range(gt_boxes.shape[0]):# find which proposal box maximally covers each gt boxargmax_overlaps = overlaps.argmax(axis=0)# and get the iou amount of coverage for each gt boxmax_overlaps = overlaps.max(axis=0)# find which gt box is 'best' covered (i.e. 'best' = most iou)gt_ind = max_overlaps.argmax()gt_ovr = max_overlaps.max()assert (gt_ovr >= 0)# find the proposal box that covers the best covered gt boxbox_ind = argmax_overlaps[gt_ind]# record the iou coverage of this gt box_gt_overlaps[j] = overlaps[box_ind, gt_ind]assert (_gt_overlaps[j] == gt_ovr)# mark the proposal box and the gt box as usedoverlaps[box_ind, :] = -1overlaps[:, gt_ind] = -1# append recorded iou coverage levelgt_overlaps = np.hstack((gt_overlaps, _gt_overlaps))gt_overlaps = np.sort(gt_overlaps)if thresholds is None:step = 0.05thresholds = np.arange(0.5, 0.95 + 1e-5, step)recalls = np.zeros_like(thresholds)# compute recall for each iou thresholdfor i, t in enumerate(thresholds):recalls[i] = (gt_overlaps >= t).sum() / float(num_pos)# ar = 2 * np.trapz(recalls, thresholds)ar = recalls.mean()return {'ar': ar, 'recalls': recalls, 'thresholds': thresholds,'gt_overlaps': gt_overlaps}

从改代码中可以看出:gt_overlaps记录的是candidate_boxes(假定数量为M)与gt_boxes(假定数量为N)之间的IoU的值,这些值构成的是一个MxN的矩阵。上述代码的作用就在M个candidate框当中取出与每个gt_boxes的IoU最大的那个框,这时有两种情况,如下图所示:

COCO gt_overlaps

从上图的分析中可以看到,存在gt_overlaps=-1的请框,这就意味着candidate box的数量大于gt_boxes的数量,这也就是is_crowded这个标记的来源。

COCO数据集之gt_overlaps之分析相关推荐

  1. 【caffe-Windows】关于LSTM的使用-coco数据集

    前言 建议大家使用Linux,因为Linux下的配置就没这么麻烦,各种make就行啦.Linux用户请绕道,因为此博客只针对Windows,可能比Linux麻烦很多倍. 在caffe-Windows新 ...

  2. MS COCO数据集人体关键点评估(Keypoint Evaluation)(来自官网)

    COCO系列文章: MS COCO数据集目标检测评估(Detection Evaluation)(来自官网) MS COCO数据集人体关键点评估(Keypoint Evaluation)(来自官网) ...

  3. COCO数据集的介绍和使用

    这篇文章是我研究生阶段入学期间学习所记,主要供自己使用,结合了论文原作和源码,中间借鉴的一些b站的视频以及他人博客的解释,会在文章末尾贴出链接. 目录 COCO数据集的介绍 COCO数据集标注格式 p ...

  4. voc数据集格式转coco数据集格式

    小白AI:VOC数据集史上最实用的介绍和使用(1) 刚入门目标检测时,用的都是VOC格式的数据集,简单且评价标准单一.目前cv领域用的都是COCO格式的评价标准,前期使用Labelimg自制的数据集格 ...

  5. 目标检测coco数据集点滴介绍

    目标检测coco数据集点滴介绍 COCO数据集介绍 MS COCO 是google 开源的大型数据集, 分为目标检测.分割.关键点检测三大任务, 数据集主要由图片和json 标签文件组成. coco数 ...

  6. CBNet和DetectoRS:COCO数据集霸榜模型

    点击蓝字  关注我们 作者丨张佳程@知乎 来源丨https://zhuanlan.zhihu.com/p/146447810 整理 | 极市平台 公众号 CBNet和DetectoRS -- COCO ...

  7. 如何正确使用COCO数据集

    点击上方"小白学视觉",选择加"星标"或"置顶" 重磅干货,第一时间送达 简介 COCO数据集,意为"Common Objects ...

  8. R语言关联规则挖掘数据集预览、分析、筛选:项目数的分布形态(分位数、密度图)、itemFrequency函数统计每一项目在所有事务中出现的次数、最常发生的项目、数据筛选(交易的集合项目大于1)

    R语言关联规则挖掘数据集预览.分析.筛选:项目数的分布形态(分位数.密度图).itemFrequency函数统计每一项目在所有事务中出现的次数.最常发生的项目.数据筛选(交易的集合项目大于1) 目录

  9. coco数据集大小分类_MicroSoft COCO数据集

    安装错误 no such file or directory: 'pycocotools/_mask.c' 解决办法: pip install cython 评价标准 COCO数据集介绍 COCO数据 ...

  10. Microsoft COCO 数据集

    篇博客主要以介绍MS COCO数据集为目标,分为3个部分:COCO介绍,数据集分类和COCO展示. 本人主要下载了其2014年版本的数据,一共有20G左右的图片和500M左右的标签文件.标签文件标记了 ...

最新文章

  1. html扩展名用于保存清单文件,HTML5 manifest ApplicationCache
  2. An Error Correction and DeNovo Assembly Approach for Nanopore Reads Using Short Reads
  3. Java 洛谷 P1464 Function
  4. 配置Memcache服务器并实现主从复制功能(repcached)
  5. View、Text、Button的drawableLeft左侧图片自定义大小
  6. ListView控件 1130
  7. 使用负边距创建自适应宽度的流体布局
  8. 使用该JavaBean可以将数据在JSP页面中以表格的形式显示出来 并具有动态排序 动态生成查询 自动分页功能
  9. 谈卢梭的《爱弥尔》及其对于教育的现实意义
  10. node.js中的文件系统
  11. 求求你,别再叫我 X 工了!!!
  12. 打车软件是不是一个市场泡沫?
  13. JAVA流程图——主要用于循环
  14. 这是 iPhone 6主板?包含 802.11ac WiFi、NFC 芯片
  15. 零基础安卓手游辅助开发入门视频教程
  16. 一元二次方程解法最新研究成果,秒算任何方程
  17. 学号在java是什么意思_在JAVA程序中增加姓名学号
  18. 点餐系统——数据库设计
  19. jquery案例11——模拟小说阅读器
  20. matlab单点弦截法求解,弦截法求根c语言

热门文章

  1. 【题解】codeforces 1023G. Pisces 最长反链 数据结构维护差分 启发式合并
  2. 一个twitter puddles的算法实现
  3. 王者荣耀游戏高清壁纸(手机|电脑),来袭
  4. 计算机不认2t移动硬盘,高手指导win7系统无法识别2T希捷的硬盘的还原技巧
  5. c语言保龄球计分系统课程设计,[C语言课程设计保龄球积分.doc
  6. 移动安全-移动App漏洞检测平台
  7. python交互式怎么保存_如何保存一个Python交互式会话?
  8. 2018.8.14 李开复重返 TED 演讲稿双语版
  9. 自己搭建服务器提供IOS IPA包下载
  10. 《场景革命》读书笔记