|
| 1 | +--- |
| 2 | +title: "Rich feature hierarchies for accurate object detection and semantic segmentation" |
| 3 | +date: "2020-05-07" |
| 4 | +tags: ["Etc", "Study"] |
| 5 | +summary: "Review of R-CNN Papers with Deep Learning for the First Time in Object Detection" |
| 6 | +description: "Object Detection 분야에 최초로 Deep Learning 을 적용시킨 R-CNN 논문 리뷰" |
| 7 | +--- |
| 8 | + |
| 9 | + |
| 10 | +:::info |
| 11 | +Object Detection 분야에 최초로 Deep Learning을 적용시킨 [R-CNN](https://arxiv.org/pdf/1311.2524.pdf) 논문 리뷰 내용 |
| 12 | +::: |
| 13 | + |
| 14 | +:::quote |
| 15 | +<b>요약</b> |
| 16 | +VOC2012(Visual Object Classes Challenge) mAP(mean average precision)에 있어서 30% 향상(mAP 53.3%) 시켰다. |
| 17 | +OverFeat 이라는 CNN에 기반한 `sliding-window detector` 아키텍쳐와 비교해도, 200-class ILSVRC 2013 detection dataset 에서 성능에 있어서 큰 차이가 었는데, 논문에서는 두 가지 인사이트를 조합하여 성능 향상을 하였다. |
| 18 | +첫 번째, CNN is a powerful classifier |
| 19 | +두 번째, Supervised pre-training for detection |
| 20 | +::: |
| 21 | + |
| 22 | +--- |
| 23 | + |
| 24 | +### R-CNN 구조 |
| 25 | + |
| 26 | +1. 이미지를 input으로 넣는다. |
| 27 | +2. 2000개의 영역(Bounding Box)를 Selective Search 알고리즘을 통해 추출하여 잘라낸다.(Cropping) |
| 28 | +3. CNN모델에 넣기 위해 같은 사이즈(227 x 227 pixel size)로 찌그러뜨린다(Warping) |
| 29 | +4. 2000개의 Warped image를 각각 CNN 모델에 넣는다. |
| 30 | +5. 각각 Classification을 진행하여 결과를 도출 |
| 31 | + |
| 32 | + |
| 33 | +--- |
| 34 | + |
| 35 | +### R-CNN 의 세가지 모듈 |
| 36 | + |
| 37 | +<div style={{ textAlign: 'center' }}> |
| 38 | + <img src="/img/post/etc/r-cnn/r-cnn.jpg" alt="r-cnn" style={{ display: 'inline-block' }} /> |
| 39 | +</div> |
| 40 | + |
| 41 | +1. Grenerating category independent `region proposals` |
| 42 | +* 카테고리와 무관하게 물체의 영역을 찾는 모듈 |
| 43 | + |
| 44 | +2. Extracts a fixed length feature vector from `CNN` |
| 45 | +* 각각의 영역으로부터 고정된 크기의 `Feature Vector` 를 뽑아내는 `Large Convolutional Network` |
| 46 | + |
| 47 | +3. Class specific linear `SVMs` |
| 48 | +* Classification 을 위한 선형 지도 학습 모델 `Support Vector Machine(SVM)` |
| 49 | + |
| 50 | +--- |
| 51 | + |
| 52 | +### Region Proposals |
| 53 | + |
| 54 | +<div style={{ textAlign: 'center' }}> |
| 55 | + <img src="/img/post/etc/r-cnn/region-proposals.jpg" alt="Region-Proposals" style={{ display: 'inline-block' }} /> |
| 56 | +</div> |
| 57 | + |
| 58 | ++ `R-CNN`은 `Region Proposal` 단계에서 `Selective Search` 알고리즘을 사용한다. |
| 59 | ++ `Selective Search` 알고리즘은 `Segmentation` 분야에서 많이 쓰이는 알고리즘이다. |
| 60 | + - Selective Search` 알고리즘은 객체와 주변간의 색감(Color), 질감(Texture)차이, 다른 물체에 애워쌓여있는지(Enclosed) 여부 등을 파악해서 다양한 전략으로 물체의 위치를 파악하는 알고리즘이다. |
| 61 | ++ `R-CNN`에서는 `Selective Search` 알고리즘을 통해 한 이미지에서 2000개의 Region을 뽑아내고, 모두 CNN에 넣기 위해 227 x 227 로 `resize` 하는 작업을 거친다. |
| 62 | + |
| 63 | +--- |
| 64 | + |
| 65 | +### CNN(based AlexNet) |
| 66 | + |
| 67 | +<div style={{ textAlign: 'center' }}> |
| 68 | + <img src="/img/post/etc/r-cnn/cnn.jpg" alt="cnn" style={{ display: 'inline-block' }} /> |
| 69 | +</div> |
| 70 | + |
| 71 | ++ CNN은 `AlexNet`의 구조을 base로 사용하였다. |
| 72 | ++ AlexNet Network 마지막 부분을 Detection을 위한 Class 수 만큼 바꾼다. |
| 73 | ++ Object Detection용 Dataset을 넣어 `Fine-Tuning`을 진행한다. |
| 74 | ++ 각각의 region proposal로부터 4096-dimentional feature vector를 뽑아내고, `Fixed-length Feature Vector`를 만들어 내는 과정을 거친다. |
| 75 | + |
| 76 | +--- |
| 77 | + |
| 78 | +### Bounding box regression |
| 79 | + |
| 80 | +<div style={{ textAlign: 'center' }}> |
| 81 | + <img src="/img/post/etc/r-cnn/bounding-box-regression.jpg" alt="Bounding-box-regression" style={{ display: 'inline-block' }} /> |
| 82 | +</div> |
| 83 | + |
| 84 | ++ Selective Search로 만들어낸 Bounding Box는 정확하지 않기 때문에 물체를 정확히 감싸도록 조정하는 `선형회귀 모델(Bounding Box Regression)`을 사용한다. |
| 85 | + |
| 86 | +<div style={{ textAlign: 'center' }}> |
| 87 | + <img src="/img/post/etc/r-cnn/bounding-box-regression2.jpg" alt="Bounding-box-regression2" style={{ display: 'inline-block' }} /> |
| 88 | +</div> |
| 89 | + |
| 90 | +--- |
| 91 | + |
| 92 | +### R-CNN의 Speed bottleneck |
| 93 | + |
| 94 | +1. 모든 입력 이미지 N에 대해서 region proposals 2000개 생성한다. |
| 95 | +2. 2000개의 region proposals 각각에 대해 CNN feature vector추출(N imags*2000)한다. |
| 96 | +3. 다음 3가지 과정에 대해 분리 되어 동작한다. |
| 97 | +* CNN을 통한 feature vector 추출 |
| 98 | +* SVM classifier를 통한 image classification |
| 99 | +* Bounding box regression |
| 100 | + |
| 101 | +--- |
| 102 | + |
| 103 | +:::success |
| 104 | +<b>결론</b> |
| 105 | +✔ 오래걸린다. |
| 106 | +➤ Selective Search 2000개의 영역에 대해서 모두 CNN 모델에 넣는다. |
| 107 | +➤ Training Time(84시간), Testing Time(GPU K40기준, frame당 14초) |
| 108 | +✔ 복잡하다. |
| 109 | +➤ CNN, SVM, Bounding Box Regression 세 가지 모델을 필요한 구조이다. |
| 110 | +✔ Back Propagation이 안된다. |
| 111 | +➤ SVM, Bounding Box Regression에서 학습한 결과가 CNN을 업데이트 못한다. |
| 112 | +✔ R-CNN은 최초로 Object Detection에 Deep Learning 방법인 CNN을 적용하여, `2-stage detector`들의 구조에 막대한 영향을 미쳤다. |
| 113 | +::: |
| 114 | + |
0 commit comments