2. Contents
• Object Detection
• Task에 대하여
• R-CNN
• Faster R-CNN
• Region Proposal Networkのしくみ
• SSD: Single Shot Multibox Detector
• Instance Segmentation
• Task에 대하여
• End-to-End Instance Segmentation and Counting with Recurrent
Attention
2
3. 일반 물체 인식 분야에서의 Deep Learning
• 정지 분류 작업은 CNN에 의한 특징량 추출 및 학습을 통해 발전
• 보다 고 난이도의 작업인 물체 감지, 물체 영역 추출로 발전
Classification Object Detection Semantic
Segmentation
Instance
Segmentation
Plants
http://www.nlab.ci.i.u-tokyo.ac.jp/pdf/CNN_survey.pdf
http://host.robots.ox.ac.uk/pascal/VOC/voc2012/segexamples/index.html
Plants
Plants Plants
고난이도
3
5. Object Detection
• 이미지 속의 여러 물체를 빠짐없이/중복없이 검출하는 것이 목적
• 물체의 검출정확도(Precision)와 빠짐없이 검출 할 수 있는지의 지표인 적합율
(Recall)의 관계 (Precision-recall curve)에서 산출한 Average Precision (AP)가 주요 지표.
• 실제 문제에 응용이 기대되고 AP 외에 예측시의 계산 시간도 중요하여, 실시간
성이 요구되고있다.
http://host.robots.ox.ac.uk/pascal/VOC/voc2007/
Precision
Recall1
1
면적= AP
5
6. 주요모델(1): Regions with CNN
• R-CNN (Regions with CNN)
• 물체 영역 후보의 생성에 Selective Search (SS) 등의 방법을 이용
• 생성한 영역을 이미지 분류를 위한 CNN에 입력하여 각 영역에 무엇이 담겨
있는지 (또는 배경인가)을 분류한다.
• Recall을 확보하기 위해서는 영역 후보가 2,000 정도 필요하며, 전체를 CNN에
입력하고 계산하는데, 상당한 시간이 걸림
• 또한 다단계의 학습이 필요하므로 복잡
R-CNN: http://arxiv.org/abs/1311.2524 6
7. 주요모델(2): Faster R-CNN
• Faster R-CNN
• 특징 추출 부분을 공통화(이것은 Fast R-CNN에서 제안 된 방법)
• 특징 맵을 입력하여 물체 영역 후보를 생성하는 Region Proposal Network를 제안
• 300개 정도의 공간 후보로 충분한 정확도가 확보 가능
• 1 장당 0.2 ~ 0.3 초에 처리 가능
Region Proposal Net
(RPN)
CNN
(특징추출)
Classifier
물체 영역후보를 생성
(~300개 정도)
각 영역후보에 해당하는
물체를 분류
Faster R-CNN: http://arxiv.org/abs/1506.014977
8. Region Proposal Network
• 특징 맵에 Anchor를 정의 (방안지에 비유하여 각 질량의 중심 이미지)
• 각 Anchor당 k 개의 Anchor Box를 정의 (Scale과 Aspect ratio의 조합)
• 각 Anchor Box마다 물체 유사성 점수와 위치 · 크기의 수정 사항을 예측하도록 훈련
Faster R-CNN: http://arxiv.org/abs/1506.01497
이미지
특징
맵
CNN
(특징추출)
・・・
Scale Aspect ratio
×
각 Anchor당 k개의 Box
(예: k = 3 × 3)
2k scores
(물체 또는 배경)
4k coordinates
(x, y, w, h의
수정항)
H x W x 3 H/16 x W/16 x 3
8
9. SSD: Single Shot Multibox Detector
Region Proposal Net
(RPN)
CNN
(특징추출)
Classifier
① 물체 영역후보를 생성
(물체 유사성 점수)
② 각 클래스로
분류
CNN
(특징추출)
Region
Proposal
+
Classifier
물체 영역후보를 생성
(클래스 별 점수)SSD
Faster
R-CNN
• Faster RCNN보다 빠르고 정확도도 좋은 모델
• 입력 이미지 크기가 작은 모델(정밀도는 적당히)는 58FPS를 달성
• Faster에서 ① 영역 후보 생성 ② 각 영역 특징 벡터를 잘라 분류하는, 2 단계로
수행되던 작업을 한번에 처리
• 깊이가 다른 복수의 특징 맵을 사용. 얕은 쪽은 작은 물체를 깊은 쪽은 큰 물체를 감지
SSD: http://arxiv.org/abs/1512.02325
9
10. SSD: Single Shot Multibox Detector
• Faster RCNN보다 빠르고 정확도도 좋은 모델
• 입력 이미지 크기가 작은 모델(정밀도는 적당히)는 58FPS를 달성
• Faster에서 ① 영역 후보 생성 ② 각 영역 특징 벡터를 잘라 분류하는, 2 단계로
수행되던 작업을 한번에 처리
• 깊이가 다른 복수의 특징 맵을 사용. 얕은 쪽은 작은 물체를 깊은 쪽은 큰 물체를
감지 (깊이에 따라 기본 Box 크기가 바뀜)
얕은 쪽 특징맵에서는
작은 물체를 검출
깊은 쪽 특징맵에서는
큰 물체를 검출
SSD: http://arxiv.org/abs/1512.02325
10
11. SSD: Single Shot Multibox Detector
• Pascal VOC 2007의 Detection 결과
• 입력 이미지 크기가 300x300 모델(SSD300)에서는 58FPS를 달성하고、
mean AP도 70%를 초과
• 입력 이미지 크기가 500x500 모델(SSD500)에서는 Faster R-CNN보다
정확하면서도 처리 속도도 빠름
SSD: http://arxiv.org/abs/1512.02325
11
13. Instance Segmentation
• 영역분활(Segmentation)
• 픽셀마다의 label을 예측
• 형상이나 면적등의 정보를 얻을 수 있어서 응용분야가 많고 활발히 연구중
• Task 분류
• Semantic Segmentation
• 각 필셀에 클라스의 라벨을 붙이는 문제
• 병이 4개인 경우에도 모두 [병 class]의 라벨을 붙임
• Instance Segmentation
• 개개 물체마다 별도 레벨을 붙이는 문제
• 병이 4개인 경우, 별도의 라벨을 붙임
(b) Instance ~ (a) Semantic ~Raw Image
http://host.robots.ox.ac.uk/pascal/VOC/voc2012/segexamples/index.html 13
14. 잎은 몇 개일까요 ?
http://juser.fz-juelich.de/record/154525/files/FZJ-2014-03837.pdf 14
16. End-to-End Instance Segmentation and
Counting with Recurrent Attention
• Instance Segmentation용 뉴럴 넷
• 스텝마다 1개의 물체를 주목하여 영역을 분활
• 한번 본 영역은 기억해 놓고
(인간이 세는 방법을 참고)
End-to-End Instance Segmentation and Counting with Recurrent Attention: https://arxiv.org/abs/1605.09410
16
17. End-to-End Instance Segmentation and
Counting with Recurrent Attention
End-to-End Instance Segmentation and Counting with Recurrent Attention: https://arxiv.org/abs/1605.09410
• 모델의 전체 형상 :
17
18. End-to-End Instance Segmentation and
Counting with Recurrent Attention
End-to-End Instance Segmentation and Counting with Recurrent Attention: https://arxiv.org/abs/1605.09410
한번 본 영역을 기억해놓는 부품
18
19. End-to-End Instance Segmentation and
Counting with Recurrent Attention
End-to-End Instance Segmentation and Counting with Recurrent Attention: https://arxiv.org/abs/1605.09410
어디에 주목할까를 결정
19
20. End-to-End Instance Segmentation and
Counting with Recurrent Attention
End-to-End Instance Segmentation and Counting with Recurrent Attention: https://arxiv.org/abs/1605.09410
주목한 영역의 Segmentation을 실행
20
21. End-to-End Instance Segmentation and
Counting with Recurrent Attention
End-to-End Instance Segmentation and Counting with Recurrent Attention: https://arxiv.org/abs/1605.09410
물체가 발견되었는지 판정을 실행
(점수가 0.5이하가 되면 종료)
21
22. End-to-End Instance Segmentation and
Counting with Recurrent Attention
End-to-End Instance Segmentation and Counting with Recurrent Attention: https://arxiv.org/abs/1605.09410
한번 본 부분은 기억
(이하 반복)
22
23. End-to-End Instance Segmentation and
Counting with Recurrent Attention
End-to-End Instance Segmentation and Counting with Recurrent Attention: https://arxiv.org/abs/1605.09410
• 결과(1) 잎의 영역분활
23
24. End-to-End Instance Segmentation and
Counting with Recurrent Attention
End-to-End Instance Segmentation and Counting with Recurrent Attention: https://arxiv.org/abs/1605.09410
• 결과(2) 차량의 영역분활
24