본문 바로가기

Data-science/deep learning

detection 연구 Anchor box ? region proposal 자세한 원리

반응형

training RPNs, we assign a binary class label (of being an object or not) to each anchor. We assign a positive label to two kinds of anchors: (i) the anchor/anchors with the highest Intersection-overUnion (IoU) overlap with a ground-truth box, or (ii) an anchor that has an IoU overlap higher than 0.7 with 5 any ground-truth box.

 

각각의 anchor마다 이진 분류 label을 할당하고 anchor의 positive label을 두 종류로 판단한다!!!

 

1) anchor들 중 ground-truth box와 가장 많이 곂치는, 즉 IOU(Intersection Over Union)가 가장 높게 나오는 anchor

2) 5개의 임의의 ground-truth box와의 IOU overlap이 0.7보다 큰 anchor

-> 하나의 ground-truth box는 여러개의 anchor들에 positive label을 할당 할 수 있다.

Faster R-CNN은 -> 첫번째 조건을 채택하고 있다고 한다. 그 이유는 두번째 조건에서 positive sample을 찾는 경우가 드물어서라고 한다.

but we still adopt the first condition for the reason that in some rare cases the second condition may find no positive sample. We assign a negative label to a non-positive anchor if its IoU ratio is lower than 0.3 for all ground-truth boxes. Anchors that are neither positive nor negative do not contribute to the training objective.

 

  •  positive가 아닌 anchor에 negative label을 할당하는데, 만약 모든 ground truth box에 대해서 IoU가 0.3보다 작을 경우 non-positive이므로 negative label을 할당한다. anchor중 negative도 아니고, positive도 아닌 anchor들은 학습하는 물체에 기여를 하지 못한다.
    • The term p ∗ i Lreg means the regression loss is activated only for positive anchors (p ∗ i = 1) and is disabled otherwise (p ∗ i = 0).
    • loss항에서 ground-truth label p*가 positive일 경우에는 1이고 negative일 경우 0이 된다.
  • Some RPN proposals highly overlap with each other. To reduce redundancy, we adopt non-maximum suppression (NMS) on the proposal regions based on their cls scores. We fix the IoU threshold for NMS at 0.7, which leaves us about 2000 proposal regions per image.
  • NMS does not harm the ultimate detection accuracy, but substantially reduces the number of proposal

NMS ?? 

Non Maximum Suppression

Non Maximum Suppression은 edge thinning 기법으로, 여러 box가 겹치게 되면 가장 확실한 것만 고르는 방법.

딥러닝을 이용한 Object Detection에서는 대부분 각종 boundingbox + 각 box에 object가 있을 확률 (class별 확률)들이 나오게 되는데, 이중 겹치는 부분 

(차 한대에 여러가지 boundingbox가 그려지는 경우와 같은)을 제거하기 위한 방법으로 사용된다. 

 

1. 동일한 클래스에 대해 높은-낮은 confidence 순서로 정렬한다. (line 13)

2. 가장 confidence가 높은 boundingbox와 IOU가 일정 이상인 boundingbox는 동일한 물체를 detect했다고 판단하여 지운다.(16~20) 보통 50%(0.5)이상인 경우 지우는 경우를 종종 보았다.

 

NMS 적용 전
NMS 적용 후



출처: https://dyndy.tistory.com/275 [DY N DY]

출처: https://dyndy.tistory.com/275 [DY N DY]

rf)https://jamiekang.github.io/2017/05/28/faster-r-cnn/

http://kaiminghe.com/iccv15tutorial/iccv2015_tutorial_convolutional_feature_maps_kaiminghe.pdf

https://dyndy.tistory.com/275

불러오는 중입니다...
 

Faster R-CNN: Towards Real-Time Object Detection with Region Proposal Networks · Pull Requests to Tomorrow

Faster R-CNN: Towards Real-Time Object Detection with Region Proposal Networks 28 May 2017 | PR12, Paper, Machine Learning, CNN 이번 논문은 Microsoft Research에서 2015년 NIPS에 발표한 “Faster R-CNN: Towards Real-Time Object Detection with Region Proposal Networks”입니다.

jamiekang.github.io

https://docs.google.com/presentation/d/1aeRvtKG21KHdD5lg6Hgyhx5rPq_ZOsGjG5rJ1HP7BbA/pub?start=false&loop=false&delayms=3000&slide=id.g137784ab86_4_5544

반응형