본문 바로가기
Studies & Courses/Machine Learning & Vision

[Object Detection] 1-Stage Detector와 2-Stage Detector 차이

by Air’s Big Data 2021. 3. 2.

Deepfashion2 dataset과 EfficientDet을 사용한 Multiple-Clothing Detection and Fashion Landmark Estimation Using a Single-Stage Detector  논문을 읽다가 1-Stage Detector로 하나의 single GPU로 빠른 fast inference time(42 ms)을 도달했다고 하여 1-Stage Detector와 2-Stage Detector의 차이를 다른 분의 블로그 포스팅을 참고하여 이번에 정리하고 넘어가려고 합니다. 

 

1-Stage Detector와 2-Stage Detector milestone

https://www.slideshare.net/JinwonLee9/pr132-ssd-single-shot-multibox-detector


2-Stage Detector

Regional Proposal과 Classification이 순차적으로 이루어집니다.

 

Regional Proposal 이란?

기존에는 이미지에서 object detection을 위해 sliding window방식을 이용했었는데 Sliding window 방식의 비효율성을 개선하기 위해 '물체가 있을만한' 영역을 빠르게 찾아내는 알고리즘이 region proposal입니다. 대표적으로 Selective search, Edge boxes들이 있습니다. 즉, regional proposal은 object의 위치를 찾는 localization문제입니다.

 

따라서 2-stage detector에서 regional proposal과 classification이 순차적으로 이루어진다는 것은 classification과 localization문제를 순차적으로 해결한다는 것입니다.

R-CNN계열 (R-CNN, Fast R-CNN, Faster R-CNN, Mask R-CNN ...)

 

위 그림은 2-stage detector의 동작과정인데 Selective search, Region proposal network와 같은 알고리즘을 및 네트워크를 통해 object가 있을만한 영역을 우선 뽑아냅니다. 이 영역을 RoI(Region of Interest)라고 하며, 이런 영역들을 우선 뽑아내고 나면 각 영역들을 convolution network를 통해 classification, box regression(localization)을 수행합니다.

 


1-Stage Detector

2-stage detector와 반대로 regional proposal와 classification이 동시에 이루어집니다. 즉, classification과 localization문제를 동시에 해결하는 방법입니다. 따라서 1-stage detector는 비교적 빠르지만 정확도가 낮고 2-stage detector는 비교적 느리지만 정확도가 높습니다.

YOLO 계열, SSD 계열 (SSD, RetinaNet, RefineDet ...)

 

 

RoI영역을 먼저 추출하지 않고 전체 image에 대해서 convolution network로 classification, box regression(localization)을 수행합니다. 당연히 특정 object 하나만 담고있는 RoI에서 classification, localization을 수행하는 것보다 여러 noise 즉, 여러 object가 섞여있는 전체 image에서 이를 수행하는게 더 정확도는 떨어지지만 간단하고 쉬운만큼 속도가 빠르다는 장점이 있습니다.

댓글