관리 메뉴

ComputerVision Jack

SSD: Single Shot MultiBox Detector 본문

Reading Paper/Object Detection

SSD: Single Shot MultiBox Detector

JackYoon 2022. 3. 30. 13:33
반응형

SSD: Single Shot MultiBox Detector

Abstract

  • single deep neural network 사용하여 image에서 object detection 진행하는 방법을 제시한다. SSD 해당 접근 방법은 bounding box의 output space에 대해 feature map 위치에서 다른 ratiosscales 갖는 default box 연산한다.
  • prediction time에 network는 각 default box안의 object category에 대한 scores 발생 시키고, object의 shape에 잘 부합하는 box 생산한다.
  • 추가적으로 network는 multiple feature maps에서 prediction 값을 결합한다. 이는 다양한 object sizes 다루기 위함이며 다른 resolution 단계에서 진행한다.
  • SSD는 object proposals 사용하는 방법 보다 간단하다. 왜냐하면 proposal generation과 subsequent pixel, feature resampling stages 제거하여 모든 연산을 single network 통합하였기 때문이다. 이는 SSD가 쉽게 학습하고 detection component가 필요한 시스템이 강인하게 통합할 수 있게 만든다.

Introduction

  • 정확도 관점에서 (Fast R-CNN)과 같은 접근은 너무 연산이 방대하여 embedded system에서 사용할 수 없다. 또한 real time 동작하기엔 너무 느리다.
  • detection pipeline의 단계를 수정하여 빠른 detector 만들려는 시도가 진행되었다. 하지만 중요한 점은 speed에 이점이 있을 수록 accuracy에 대한 비용이 증가한다는 것이다.
  • 논문에선 object detector 기반인 deep network 제안한다. 이 network는 resample pixels 할 필요가 없고 bounding box hypothesis 구체화할 필요도 없다. 그리고 accuracy는 비슷하게 나온다.
  • 속도 측면에서 근본적인 향상은 bounding box 제거와 subsequent pixel, feature resampling stage 제거하였다는 점이다.
  • 저자의 향상은 small convolutional filter 사용하여 object categoriesbounding box locations offset 예측하는 것이고, 분리된 predictors(filters)에 다른 ratio 적용하여 다양한 scale에 대해 수행하도록 적용 시켰다는 점이다.

Figure 1

The Single Shot Detector (SSD)

Model

  • SSD는 feed-forward convolution network에 기반을 두고 있다. 이를 통해 고정된 크기의 bounding box와 각 instance가 class에 대한 존재 여부를 나타내는 score 생산한다. 그 다음 non-maximum suppression 단계를 통해 최종 detection 만든다.
  • 해당 network의 layer는 image classification에서 높은 성능을 나타내는 것으로 기반을 삼는다.

Multi-scale feature maps for detection

  • base network가 변환되는 부분 하단에 convolutional feature layers 추가한다. 이러한 layers 점진적으로 크기가 감소되며 다양한 크기에서 객체를 예측할 수 있게 한다.

Convolutional predictors for detection

  • 각각의 추가된 feature layer는 고정된 detection 예측을 생산한다. feature layer $m * n * p (channels)$에 대해, 잠재적 detection 예측 parameter의 기본 요소는 $3 * 3 * p$ small kernel이다. 이는 categroy에 대한 score와 default box에 대한 offset 생산한다.

Default boxes and aspect ratios

  • network 상단의 다수의 feature map 안에서 각 feature map cell에 default bounding box 집합을 연결 시킨다.
  • 각 feature map cell에서 cell에 대한 default box의 상대적인 shape offset 예측하고 뿐만 아니라 이 box의 instance에 대한 class score 예측한다. 이 결과로 m x n feature map에 대해서 $(c + 4) k * m * n$의 output 생산하게 된다.

Figure 2

Training

  • SSD와 region proposal의 전형적인 방식의 가장 큰 차이점은 ground truth 정보가 detector output의 고정된 집합으로 할당되는 작업이 필요하다는 것이다. 일단 이러한 할당이 결정되면, loss functionback progation이 end-to-end 실행된다.
  • 학습은 또한 default box의 군집과 detection 크기를 포함한다. 뿐만 아니라 hard negative miningdata augmentation 전략이 사용된다.

Matching strategy

  • 학습 동안 어떤 default box 중 어떤 box가 ground truth와 상응 하는지 결정하는 단계가 필요하고 그에 따라 학습을 진행한다. 각 ground truth box에 대해 다양한 위치크기비율의 default box 선택한다.
  • ground truth에 대해 높은 jaccard overlap 발생하는 default box 연결한다. multi-box와 다르게 threshold가 0.5 이상이면 된다.

Training objective

  • 전체적인 objective loss functionlocalization loss(loc)confidence loss(conf)의 가중 합이다.

Loss Function

  • 해당 수식에서 N은 연결된 default boxes 수이고, 만약 N=0이면 loss 값을 0으로 보낸다. predicted box와 ground truth box의 localization lossSmooth L1 loss 이다.

localization loss

  • confidence loss는 multi classes confidence에 사용하는 softmax loss 사용한다.

confidence loss

  • validation 과정에서 weight 표기인 α 값은 1이다.

Choosing scales and aspect ratios for default boxes

  • lower layers는 semantic segmentation에서 향상을 가져온다. 왜냐하면 lower layers는 input object에 대해 더 많은 구체적인 정보를 담고 있기 때문이다. 이러한 방법에 영감을 받아 lowerupper feature map 둘 다 detection에서 사용한다.
  • network의 다른 단계에서 추출된 feature map은 다른 receptive field size 갖고 있기 때문에 잘 파악할 수 있다.
  • 저자들은 defult box에 tiling 적용한다 그래야 구체적인 feature map이 object의 특정한 규모에 대해 잘 배울 수 있기 때문이다.

Anchor Size

  • 많은 feature map의 모든 위치 정보로부터 다른 크기와 비율을 갖는 default box 예측을 결합하면서, input object의 크기와 모양에 대한 다양한 예측 값을 얻을 수 있다.

Hard negative mining

  • matching 단계에서 대부분의 default box는 negative이다. 사용 가능한 default box가 많을 수록 더 그 값이 크다. 이는 positive와 negative 사이의 중요한 불균형을 초래한다.
  • 모든 negative example 사용하는 것 대신에, 각 default box에 대해 높은 confidence loss 사용하여 그것을 정렬하고 가장 큰 값을 뽑는다. 그래야 positive와 negative 사이의 비율이 3 :1 이 된다.

Data Augmentation

  • 모델이 다양한 input object의 크기와 모양에 반응할 수 있도록, 학습 시 image에 대해 무작위로 augmentation 적용 하였다.
    • Use the entire original input image
    • Sample a patch so that the minimum jaccard overlap with the objects is 0.1, 0.3, 0.5, 0.7, 0.9
    • Randomly sample a patch

Conclusion

Figure 5

  • 해당 논문에선 SSD 제시한다. 이는 fast single-shot object detector for multiple categories이다. 이 모델의 중요한 특징은 network 상단의 multiple feature map 부착하여 multi-scale convolutional bounding box output 사용한다는 것이다.
  • SSD model 생성하면서 존재하는 방법 보다 더 많은 박스들이 location, scale, aspect ratio 대해 척도로 사용될 수 있다는 것이다.
반응형
Comments