Hard Negative Mning
对于hard negative mining的解释,引用一波知乎:
来源:知乎
先要理解什么是hard negative
R-CNN关于hard negative mining的部分引用了两篇论文:
[17] P. Felzenszwalb, R. Girshick, D. McAllester, and D. Ramanan. Object detection with discriminatively trained part based models. TPAMI, 2010.
[37] K. Sung and T. Poggio. Example-based learning for viewbased human face detection. Technical Report A.I. Memo No. 1521, Massachussets Institute of Technology, 1994. 4
Bootstrapping methods train a model with an initial subset of negative examples, and then collect negative examples that are incorrectly classified by this initial model to form a set of hard negatives. A new model is trained with the hard negative examples, and the process may be repeated a few times.
we use the following “bootstrap” strategy that incrementally selects only those “nonface” patterns with high utility value:
1) Start with a small set of “nonface” examples in the training database.
2) Train the MLP classifier with the current database of examples.
3) Run the face detector on a sequence of random images. Collect all the “nonface” patterns that the current system wrongly classifies as “faces” (see Fig. 5b).Add these “nonface” patterns to the training database as new negative examples.
4) Return to Step 2.
在bootstrapping方法中,我们先用初始的正负样本(一般是正样本+与正样本同规模的负样本的一个子集)训练分类器,然后再用训练出的分类器对样本进行分类,把其中错误分类的那些样本(hard negative)放入负样本集合,再继续训练分类器,如此反复,直到达到停止条件(比如分类器性能不再提升).
we expect these new examples to help steer the classifier away from its current mistakes.
hard negative就是每次把那些顽固的棘手的错误,再送回去继续练,练到你的成绩不再提升为止.这一个过程就叫做'hard negative mining'.
“Let’s say I give you a bunch of images that contain one or more people, and I give you bounding boxes for each one. Your classifier will need both positive training examples (person) and negative training examples (not person).
For each person, you create a positive training example by looking inside that bounding box. But how do you create useful negative examples?
A good way to start is to generate a bunch of random bounding boxes, and for each that doesn’t overlap with any of your positives, keep that new box as a negative.
Ok, so you have positives and negatives, so you train a classifier, and to test it out, you run it on your training images again with a sliding window. But it turns out that your classifier isn’t very good, because it throws a bunch of false positives (people detected where there aren’t actually people).
A hard negative is when you take that falsely detected patch, and explicitly create a negative example out of that patch, and add that negative to your training set. When you retrain your classifier, it should perform better with this extra knowledge, and not make as many false positives.
a) Positive samples: apply the existing detection a t all positions and scales with a 50% overlap wit h the given bounding box and then select the hi ghest scoring placement.
b) Negative samples:
hard negative, selected by finding high scoring detections in images not containing the target object.”
R-CNN的实现直接看代码:
rcnn/rcnn_train.m at master · rbgirshick/rcnn Line:214开始的函数定义
Hard Negative Mning的更多相关文章
- CVPR2019 | Libra R-CNN 论文解读
作者 | 文永亮 学校 | 哈尔滨工业大学(深圳) 研究方向 | 目标检测.GAN 推荐理由 这是一篇发表于CVPR2019的paper,是浙江大学和香港中文大学的工作,这篇文章十分有趣,网友戏称 ...
- 探究负边距(negative margin)原理
W3C规范在介绍margin时有这样一句话: Negative values for margin properties are allowed, but there may be implement ...
- hdu 1231, dp ,maximum consecutive sum of integers, find the boundaries, possibly all negative, C++ 分类: hdoj 2015-07-12 03:24 87人阅读 评论(0) 收藏
the algorithm of three version below is essentially the same, namely, Kadane's algorithm, which is o ...
- 基本概率分布Basic Concept of Probability Distributions 4: Negative Binomial Distribution
PDF version PMF Suppose there is a sequence of independent Bernoulli trials, each trial having two p ...
- Negative log-likelihood function
Softmax function Softmax 函数 \(y=[y_1,\cdots,y_m]\) 定义如下: \[y_i=\frac{exp(z_i)}{\sum\limits_{j=1}^m{e ...
- Interleaving Positive and Negative Numbers
Given an array with positive and negative integers. Re-range it to interleaving with positive and ne ...
- 编程范式 epesode2 negative values, float 精度
episode2 //it is very interesting,an excellect teacher, I love it 1,why negative is indicated the w ...
- hdu 5183. Negative and Positive (哈希表)
Negative and Positive (NP) Time Limit: 3000/1500 MS (Java/Others) Memory Limit: 65536/65536 K (Ja ...
- [LintCode] Interleaving Positive and Negative Numbers
Given an array with positive and negative integers. Re-range it to interleaving with positive and ne ...
随机推荐
- 说说Java 位运算
前言 我们都知道,在计算机世界里,再复杂,再美的程序,到最后都会变成0与1.也就是我们常说的:二进制.二进制相信大家都很熟悉.与现实世界不同的是,在现实世界里,我们通常都是用十进制来表示的,也就是遇十 ...
- 自学Python1.8-python input/print用法 格式化输出
自学Python之路 自学Python1.8-python input/print用法 格式化输出 1.input函数 Python3.x 中 input() 函数接受一个标准输入数据,返回为 str ...
- 【BZOJ3456】城市规划(生成函数,多项式运算)
[BZOJ3456]城市规划(生成函数,多项式运算) 题面 求\(n\)个点的无向连通图个数. \(n<=130000\) 题解 \(n\)个点的无向图的个数\(g(n)=2^{C_n^2}\) ...
- es某个分片受损或卡在INITIALIZING状态时解决办法
参考这篇文章 # OK last warning: you will probably lose data. Don't do this if you can't risk that. CLUSTER ...
- JDK源码分析(1)ArrayList
JDK版本 ArrayList简介 ArrayList 是一个数组队列,相当于 动态数组.与Java中的数组相比,它的容量能动态增长.它继承于AbstractList,实现了List, RandomA ...
- BSGS&EXBSGS 大手拉小手,大步小步走
大步小步走算法处理这样的问题: A^x = B (mod C) 求满足条件的最小的x(可能无解) 其中,A/B/C都可以是很大的数(long long以内) 先分类考虑一下: 当(A,C)==1 即A ...
- (转)Maven仓库——私服介绍
背景:对Maven私服一直想做个深入的总结,因为不了解,所以感觉很陌生. 转载地址:http://blog.csdn.net/catoop/article/details/62312477 常用功能和 ...
- img标签浏览器缓存图片问题
问题:项目中用的img标签及其src属性,但是发现浏览器会缓存图片,这样每次如果修改了图片,再重新打开预览发现图片还是原来的. 原因:因为src后面的请求路径不变,所以浏览器就认为是同一个图片,就不会 ...
- DOJO常用的函数
DOJO常用的: 1,通过dojo.require以类似C编程中#include或者Java中import的方式加载所需的部件如dojo.require("dojo.parser" ...
- LR和SVM的区别
一.相同点 第一,LR和SVM都是分类算法(SVM也可以用与回归) 第二,如果不考虑核函数,LR和SVM都是线性分类算法,也就是说他们的分类决策面都是线性的. 这里要先说明一点,那就是LR也是可以用核 ...