Top Banner
Object Detection & Instance Segmentation Toshinori Hanya
24

Single Shot MultiBox Detector와 Recurrent Instance Segmentation

Apr 16, 2017

Download

Technology

Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Single Shot MultiBox Detector와 Recurrent Instance Segmentation

Object Detection & Instance Segmentation

Toshinori Hanya

Page 2: Single Shot MultiBox Detector와 Recurrent Instance Segmentation

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

Page 3: Single Shot MultiBox Detector와 Recurrent Instance Segmentation

일반 물체 인식 분야에서의 Deep Learning

• 정지 분류 작업은 CNN 에 의한 특징량 추출 및 학습을 통해 발전• 보다 고 난이도의 작업인 물체 감지 , 물체 영역 추출로 발전

Classification Object Detection Semantic Segmentation

Instance Segmentation

Plants

http://www.nlab.ci.i.u-tokyo.ac.jp/pdf/CNN_survey.pdfhttp://host.robots.ox.ac.uk/pascal/VOC/voc2012/segexamples/index.html

PlantsPlants Plants

고난이도

3

Page 4: Single Shot MultiBox Detector와 Recurrent Instance Segmentation

Object Detection소개 논문:SSD: Single Shot MultiBox Detector

Page 5: Single Shot MultiBox Detector와 Recurrent Instance Segmentation

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

Page 6: Single Shot MultiBox Detector와 Recurrent Instance Segmentation

주요모델 (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

Page 7: Single Shot MultiBox Detector와 Recurrent Instance Segmentation

주요모델 (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

Page 8: Single Shot MultiBox Detector와 Recurrent Instance Segmentation

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

Page 9: Single Shot MultiBox Detector와 Recurrent Instance Segmentation

SSD: Single Shot Multibox Detector

Region Proposal Net(RPN)

CNN( 특징추

출)Classifier

① 물체 영역후보를 생성(물체 유사성 점수)

② 각 클래스로 분류

CNN( 특징추

출)

Region Proposal

+Classifier

물체 영역후보를 생성(클래스 별 점수)SSD

FasterR-CNN

• Faster RCNN 보다 빠르고 정확도도 좋은 모델• 입력 이미지 크기가 작은 모델 ( 정밀도는 적당히 ) 는 58FPS 를 달성

• Faster 에서 ① 영역 후보 생성 ② 각 영역 특징 벡터를 잘라 분류하는 , 2 단계로 수행되던 작업을 한번에 처리

• 깊이가 다른 복수의 특징 맵을 사용 . 얕은 쪽은 작은 물체를 깊은 쪽은 큰 물체를 감지

SSD: http://arxiv.org/abs/1512.023259

Page 10: Single Shot MultiBox Detector와 Recurrent Instance Segmentation

SSD: Single Shot Multibox Detector

• Faster RCNN 보다 빠르고 정확도도 좋은 모델• 입력 이미지 크기가 작은 모델 ( 정밀도는 적당히 ) 는 58FPS 를 달성

• Faster 에서 ① 영역 후보 생성 ② 각 영역 특징 벡터를 잘라 분류하는 , 2 단계로 수행되던 작업을 한번에 처리

• 깊이가 다른 복수의 특징 맵을 사용 . 얕은 쪽은 작은 물체를 깊은 쪽은 큰 물체를 감지 ( 깊이에 따라 기본 Box 크기가 바뀜 )

얕은 쪽 특징맵에서는 작은 물체를 검출

깊은 쪽 특징맵에서는 큰 물체를 검출

SSD: http://arxiv.org/abs/1512.02325 10

Page 11: Single Shot MultiBox Detector와 Recurrent Instance Segmentation

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

Page 12: Single Shot MultiBox Detector와 Recurrent Instance Segmentation

Instance Segmentation소개논문:End-to-End Instance Segmentation and Counting with Recurrent Attention

Page 13: Single Shot MultiBox Detector와 Recurrent Instance Segmentation

Instance Segmentation

• 영역분활 (Segmentation )• 픽셀마다의 label 을 예측• 형상이나 면적등의 정보를 얻을 수 있어서 응용분야가 많고 활발히 연구중

• Task 분류• Semantic Segmentation

• 각 필셀에 클라스의 라벨을 붙이는 문제• 병이 4 개인 경우에도 모두 [ 병 class] 의 라벨을 붙임

• Instance Segmentation• 개개 물체마다 별도 레벨을 붙이는 문제 • 병이 4 개인 경우 , 별도의 라벨을 붙임

(b) Instance ~ (a) Semantic ~Raw Imagehttp://host.robots.ox.ac.uk/pascal/VOC/voc2012/segexamples/index.html 13

Page 14: Single Shot MultiBox Detector와 Recurrent Instance Segmentation

잎은 몇 개일까요 ?

http://juser.fz-juelich.de/record/154525/files/FZJ-2014-03837.pdf 14

Page 15: Single Shot MultiBox Detector와 Recurrent Instance Segmentation

어떻게 셀까요 ?

http://juser.fz-juelich.de/record/154525/files/FZJ-2014-03837.pdf

• 시선을 옮기며 한장한장 주목하면서 • 한번 본 것은 기억해 놓는 느낌으로 세면 되지 않을까 ?

15

Page 16: Single Shot MultiBox Detector와 Recurrent Instance Segmentation

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

Page 17: Single Shot MultiBox Detector와 Recurrent Instance Segmentation

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

Page 18: Single Shot MultiBox Detector와 Recurrent Instance Segmentation

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

Page 19: Single Shot MultiBox Detector와 Recurrent Instance Segmentation

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

Page 20: Single Shot MultiBox Detector와 Recurrent Instance Segmentation

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

Page 21: Single Shot MultiBox Detector와 Recurrent Instance Segmentation

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

Page 22: Single Shot MultiBox Detector와 Recurrent Instance Segmentation

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

Page 23: Single Shot MultiBox Detector와 Recurrent Instance Segmentation

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

Page 24: Single Shot MultiBox Detector와 Recurrent Instance Segmentation

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