본문으로 바로가기

YOLOv3: An Incremental Improvement

category Research/Paper 2021. 10. 5. 21:21

  1. Introduction - 특별한 내용은 없다.
  1. The Deal - 처음부터 시스템 전부까지 설명할테니 잘 따라오길 바란다는 메시지가 담겨있다.

    2.1 Bounding Box Prediction - YOLO9000 (YOLOv2 기반 9000개의 objects를 detect 하는 모델)에 따르면 YOLO system은 dimension clusters를 anchor boxes 사용하여 bounding boxes를 예측한다. - Bounding box는 4개의 좌표로 구성되며 tx,ty,tw,tht_x,\, t_y,\, t_w,\, t_h 이다. 이를 계산하는 방법은, 만약 cell이 이미지의 좌상단(left top of the image)으로부터 offset이 cx,cyc_x,\,c_y 만큼 있고 bounding box prior (anchor box)의 height와 width를 pw,php_w,\,p_h라고 할 때 아래와 같이 계산된다. - cx,cyc_x, \, c_y 추가설명: YOLO는 이미지를 S*S grid (가로 * 세로)로 나누며, 해당 셀의 offset을 의미한다.

    bx=σ(tx)+cxby=σ(ty)+cybw=pwetwbh=phethb_x = \sigma(t_x)+c_x\\ b_y = \sigma(t_y)+c_y\\ b_w = p_we^{t_w}\\ b_h = p_he^{t_h}

    - Sum of squared error loss를 사용하며 예측해야하는 좌표의 ground truth가 t^\hat{t}_*이면 기울기는 t^t\hat{t}_*-t_*가 된다. - YOLOv3는 각 bounding box를 logistic regression을 사용해서 objectness score를 예측한다. 이 값이 1에 가까울수록 bounding box prior은 다른 bounding box prior에 보다 더 ground truth object와 overlap 된다. - 즉, 여러개의 bounding box prior 중에 objectness score가 threshold인 0.5를 넘으면서 1에 가장 가까운 것을 제외하고 나머지는 무시된다. ground truth당 한 개의 bounding box prior만 선정된다. - 만약 threshold를 넘는 bounding box가 전혀 존재하지 않으면 coordinate나 class predictions에는 loss가 발생하지 않고 objectness score에만 loss가 발생한다.

    2.2 Class Prediction - 각 box는 multilabel classification을 수행하여 박스 내에 어떠한 classes가 포함되어 있는지 예측한다. - class prediction에서 softmax를 사용할 경우 성능에 좋지 않은 것을 발견하여 binary cross-entropy loss를 사용한다. - 이러한 방식은 Open Images Dataset [7] 처럼 복잡한 domains을 학습할 때 도움이 된다. Softmax는 박스 안에 1개의 class가 있을 것으로 가정하는데 실제로 이런 경우는 흔한 케이스가 아니다. Multilabel classification으로 접근하는 게 좋다.

    2.3 Predictions Across Scales - YOLOv3는 3개의 서로다른 scales에서 boxes를 예측한다. 이 시스템에서는 feature pyramid networks와 비슷한 개념의 모델을 사용해서 각 scale에서 features를 추출한다. - Base feature extractor에 몇개의 convolutional layers를 추가한 것을 사용하며, 3-d tensor를 예측하는데 bounding box, objectness, class prediction이 포함되어 있다 (논문에는 3-d tensor encoding bounding box, objectness, and class predictions 라고 표한한다). - 실험에서 (with COCO) 각 scale 에서 3개의 boxes를 예측하였고, 각 tensor는 N×N×[3(4+1+80)]N \times N \times [3\,*\,(4+1+80)] 이다 (N: grid, 3: 바운딩 박스 개수, 4: bounding box 좌표(x, y, w, h), 1: objectness score, 80: COCO의 class 개수). - 다음 단계로 feature map을 얻는데 2 layers previous 에서 얻고 이를 2배 크기로 upsample 한다. 그리고 upsampled features를 network의 초기 부분에서 추출한 feature map과 concatenation하여 merge한다. - 이 방법은 upsampled features에서 semantic information을 얻고 earlier feature map에서 fine-grained information을 얻어서 더 의미있는 결과를 얻게한다. - 그 다음에 이 feature map을 처리하기 위한 몇개의 convolutional layers를 추가한 model로 tensor를 예측한다. - Bounding box priors (anchor box의 크기)를 예측하기 위해 k-means clustering 방법을 사용한다. 따라서, 학습환경이 달라지면 anchor box의 크기도 바꿔주어야 할 필요가 있다. - We just sort of chose 9 clusters and 3 scales arbitrarily and then divide up the clusters evenly across scales. On the COCO dataset the 9 clusters were: (10×13),(16×30),(33×23),(30×61),(62×45),(59×119),(116×90),(156×198),(373×326)(10\times13),\,(16\times30),\,(33\times23),\,(30\times61),\,(62\times45),\,(59\times119),\,(116\times90),\,(156\times198),\,(373\times326).

    2.4 Feature Extractor

    - 이 논문에서는 사용한 새로운 feature extractor는 YOLOv2와 Darknet-19에서 사용하는 네트워크들 간의 하이브리드 방식이다 (YOLOv2와 Darknet-19의 장점을 합친거라고 볼 수 있다). 이 네트워크의 이름은 Draknet-53 이다. - 이 network는 연속적인 3×33\times3 1×11\times1 convolutional layers과 shortcut connections으로 구성되어 있으며 기존보다 훨씬 크다. - 아마도 이 네트워크가 2.3에서 사용된 네트워크인데 소스코드를 보고 더 자세하게 살펴볼 필요가 있다.

    - Darknet-53은 Darknet-19보다 성능이 좋으며, ResNet-101과 ResNet-152보다 효율이 여전히 좋다. ResNet-152와 유사한 성능인데 속도는 두배 빠르다(Top-1 유사, FPS 두배 차이).

참고 URL: https://ropiens.tistory.com/76?category=896592 https://ganghee-lee.tistory.com/40 (나중에 읽어볼)


자유로운 공방
블로그 이미지 Freeable 님의 블로그
MENU
VISITOR 오늘 / 전체