티스토리 뷰

[업데이트 2018.07.14 19:36] 


열여섯번째 요약할 논문은 "Faster R-CNN: Towards Real-Time Object Detection with Region Proposal Networks"(https://arxiv.org/pdf/1506.01497.pdf) 입니다. 기존 Fast R-CNN 대비 새롭게 추가된 부분은 아래에서 볼 수 있듯이 RPN(Region Proposal Network) 입니다. RPN의 경우 sliding window 적용후 생성된 intermediate layer에 Fully Convolutional Network(FCN)를 사용하며, 기존의 region proposals를 CNN에 통합하여 shared computation을 통해 성능 향상을 시킬 수 있었습니다. 



RPN의 경우 전 단계 convolution layer를 통해 생성된 feature map(14x14x512, VGG 기준)에서 n x n sliding window(본 논문에서 n = 3, 1 stride/1 padding)를 통해 intermediate layer(14x14x512)를 생성하고, 여기에 각각 cls layer, reg layer에 대해 FCN을 적용하여 최종적으로 다음과 같이 feature vector를 추출하게 됩니다. 


- cls layer

1x1 filter, 1 stide, 0 padding => 14x14x9x2 (9 = # of anchor box, 2 = object or not)                      ; W x H x k x 2


- reg layer

1x1 filter, 1 stide, 0 padding => 14x14x9x4 (9 = # of anchor box, 4 = bounding box coordinates) ; W x H x k x 4


결국 각 sliding window별 k개의 다양한 크기와 비율의 anchor box를 생생하며, 각 anchor box별 bounding box 4개 좌표와 2개의 object 존재 여부에 대한 값을 생성하게 됩니다. anchor box의 경우 각 sliding window별 bounding box를 위한 후보로 사용되는데, 기존에 SPP Net 등에서 제안 되었던 image/feature pyramid 방식처럼 runtime에 크기/비율을 조정하여 만들기보다, pre-defined된 anchor box를 사용함으로써 성능 향상을 시킬 수 있었습니다. 본 논문에서는 3개의 scale과 3개의 비율 총 9개의 anchor box를 사용하였습니다. 


이제 각각에 대해 classification과 regression problem을 풀기 위해 cost함수를 정의하고 학습 및 추론을 진행하게 됩니다. 각 anchor box별 positive label은 아래와 같이 판단됩니다.


1. 가장 높은 IoU를 가지는 anchor box

2. IoU >= 0.7


negative lebeld 경우 IoU <= 0.3 인 경우로 판단합니다.


Faster R-CNN의 경우 Fast R-CNN과 동일하게 multi-task loss function을 가지며 다음과 같습니다.




bounding box regression의 경우 아래와 같이 좌표에 대해 계산 후, L1 loss function을 통해 계산합니다



* 참고

[1] https://arxiv.org/pdf/1506.01497.pdf

[2] https://lilianweng.github.io/lil-log/2017/12/31/object-recognition-for-dummies-part-3.html

[3] https://curt-park.github.io/2017-03-17/faster-rcnn

댓글
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
«   2024/05   »
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31
글 보관함