AI시작

YOLO v1~v3 퀵 리뷰

케이트쌤 2020. 9. 3. 01:19

급할때 보려고 만든 YOLO v1~v3 퀵 리뷰 입니다.

YOLO

You only look once: Unified, real-time object detection

* 하지만 만약 필요하다면 앞 블로그 참조하고 오셔도 좋습니다.

 

1. 딥러닝 영상분석 3총사를 구분하시나요

 

6-1 Faster RCNN, YOLO, SSD 심플 차이점

 

... 그럼 시작합니다.

 

Detection without Proposals: YOLO

Go from input image to tensor of scores with one big convolutional network!

https://pjreddie.com/darknet/yolo/?utm_source=next.36kr.com

 

이미지를 일정크기 그리드셀로 나누어 예측

x, y 는 중심점

inpit을 S x S 그리드로 나눈다. (논문 S=7)

각 그리드 셀은 B개의 Bbox정보 (x,y,w,h,conf)를 예측 (논문 B=2)

각 그리드 셀은 C개의 클래스 확률을 예측(논문 C=20)

-> 98개의 Bbox가 물체의 위치와 20개의 클래스를 분류한다.

 

Bbpx 두개에 대한 텐서값

Loss Function

Yolo v1 은 최초의 one-stage object detection network 라는 점이 중요.

 

YOLO v2

 

성능향상의 요인

 

1 Batch Normalization
2 High Resolution Classifier
3 Convolutional
4 Anchor Boxes
5 new network
6 Dimension Clusters
7 Location prediction
8 passthrough
9 Multi-Scale Training
10 Fine-Grained Features

 

High Resolution Classifier

2단계 학습 방법 - Fine Tuning

mAP 4% 향상

 

Convolutional & Multi-Scale Training

Fully Convolutional Network 방식을 도입 - 다양한 해상도로 입력 이미지를 취할 수 있습니다.

최종 특징맵의 크기가 홀수가 되도록 함.

228x228 입력의 경우 90 FPS 이고 mAP Fast R-CNN 과 비슷합니다.

 

Anchor Boxes & Dimension Clusters

앵커박스를 사용하면서 성능은 69.5 mAP 에서 69.2 mAP 로 조금 떨어졌으나 재현율(recall) 81%에서 88%로 크게 상승되는 효과

좋은 IOU 점수로 이어지는 k-평균 클러스터링 이용

 

Direct Location Prediction

New network & Passthrough    

그리드맵을 13x13 으로 증가 -> small object 예측에 효과적

hight resolution feature map 과 low  resolution feature map 을 concaternation 해서 다양한 크기 예측

 

출력 형태 

7x7x (5 x B+C) -> 13x13x (B x (5+C))

 

최종 성능

 

YOLO v3

https://pjreddie.com/darknet/yolo/

Bounding Box Prediction

Class Prediction

multi-label이 있을 수 있으므로 class prediction으로 softmax를 쓰지 않고 independent logistic classifiers를 썼다.

loss termbinary cross-entropy로 바꾸었다.

 

Predictions Across Scales

3개의 bounding box
3개의 feature map 활용 (다른 scale, 각각 2배씩 차이)

 

Feature Extractor : Darknet-53

그 외..

full image 사용
no hard negative mining (IOU 낮은값들: Best IOU 값 비율 조정 안해주고 그냥 학습)
multi-scale training
data augmentation
batch normalization

 

* 2 랑 3 비교 테스트..

 

 

이상입니다. ☆

 

참고로 YOLOv4 는 아직 리얼 심플 리뷰만 있습니다. (추후 업뎃 예정)

 

Yolo v4 - 왜 어메이징한 네트워크인가