Skip to content

Commit d95afc2

Browse files
committed
docs(ssd): 负样本挖掘
1 parent 43b0b08 commit d95afc2

File tree

3 files changed

+23
-3
lines changed

3 files changed

+23
-3
lines changed

docs/index.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,5 @@
1818
* 基础网络
1919
* 先验框
2020
* 匹配策略
21-
* 损失函数
21+
* 损失函数
22+
* Hard Negative Mining

docs/ssd/hard_negative_mining.md

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,20 @@
11

2-
# Hard Negative Mining
2+
# Hard Negative Mining
3+
4+
在单个图像的先验框中,属于负样本(背景类别)的数目远远大于属于正样本的数目,所以论文通过`HNM`的方式进一步降低负样本的比例
5+
6+
## 实现策略
7+
8+
* 给定正负样本比率$a=\frac {1}{3}$
9+
* 计算正样本数目$N_{p}$,计算保留的负样本数目$N_{n}=3\times N_{p}$
10+
* 计算预测得到的边界框的置信度损失
11+
* 根据背景类别的置信度损失对负样本预测框从大到小排序,保留前$N_{n}$个
12+
13+
## 具体实现
14+
15+
* `py/ssd/utils/box_utils.py`
16+
17+
```
18+
def hard_negative_mining(loss, labels, neg_pos_ratio):
19+
。。。
20+
```

mkdocs.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,4 +68,5 @@ nav:
6868
- 基础网络: ssd/base_network.md
6969
- 先验框: ssd/prior_boxes.md
7070
- 匹配策略: ssd/matching_strategy.md
71-
- 损失函数: ssd/loss_function.md
71+
- 损失函数: ssd/loss_function.md
72+
- 'Hard Negative Mining': ssd/hard_negative_mining.md

0 commit comments

Comments
 (0)