On the journey of
YOLOX: Exceeding YOLO Series(2021) 본문
https://arxiv.org/abs/2103.14259 : YOLOX: Exceeding YOLO Series in 2021 (Zheng Ge, Songtao Liu, Feng Wang, Zeming Li, Jian Sun)
YOLOX: Exceeding YOLO Series in 2021
In this report, we present some experienced improvements to YOLO series, forming a new high-performance detector -- YOLOX. We switch the YOLO detector to an anchor-free manner and conduct other advanced detection techniques, i.e., a decoupled head and the
arxiv.org
YOLO 시리즈는 real-time object detection을 가능하게 하는 발전된 기술을 사용해 온 바 있다. 버전이 여러 가지인데, YOLO v2에서는 anchor box를 도입, YOLOv3에서는 Residual Net을 도입하면서 Multilabel classification을 적용했다. 그리고 현재 YOLOv5는 속도와 정확도 측면에서 가장 좋은 퍼포먼스를 나타내는 SOTA 기술 중 하나로 꼽힌다.
Introduction
최근 객체탐지(Object Detection) 분야에서 anchor-free detectors, advanced label assignment strategy, end-to-end detector 등에 주목하고는 있지만, YOLOv4, v5는 여전히 training rule를 직접 지정해줘야하는 anchor-based detector이다. 단점이 아닐 수 없는데, Yolo X는 이런 Yolo의 anchor-free 버전이라고 생각하면 된다!
보다 간단한 구조와 더 나은 성능을 보인다고 한다. 실제 Stream Perception Challenge (Workshop on Autonomous Driving at CVPR 2021)에서 1등을 차지한 바 있는 모델이기에 어떠한 변화와 성능 개선이 있는지 살펴보자.
Key concepts
위 논문에 따르면 핵심 콘셉트(주요 변화)는 크게 2가지라고 할 수 있다.
- Anchor-free 방식의 YOLO 구조
- Object Detection을 위한 최신 고급 기술 적용
- Decoupled head
- 발전된 label 지정 기법 사용: **SimOTA**
- 강력한 data augmentation: **Mosaic, MixUp**
Network design
Architecture
- Backbone: Darknet53
- Neck: SPP(Spatial Pyramid Pooling) + FPN(Feature Pyramid Network)
- Head: YOLOv3 + Decoupled head
YOLOv3 Baseline
- YOLOv4, v5가 anchor-based 파이프라인에 과도하게 최적화될 수 있음을 고려하여 YOLOv3-SPP를 base architecture로 선정 아래 기법을 각각 적용, test 진행
Anchor-free 구조
- YOLOX는 anchor-based design를 사용하지 않음
- anchor-based design의 단점은 아래와 같은데.:
- anchor box 구성을 직접 선택하거나 clustering analysis를 사용하여 최적의 anchor box세트를 결정해야 함
- 그렇다면 domain에 specific해서 다른 데이터에 generalization 어려움이 있다.
- 헤드의 복잡성과 예측의 수를 증가시킨다.
- 임베디드 시스템이나 모바일 장치에서와 같이 리소스가 제한된 시스템에서 후처리를 수행하는 경우에 자원 친화적이지 않다.
; FCOS 방식의 Anchor-free design을 적용
- 어떤 포인트가 예측되면 그 포인트와 실제 ground truth와의 거리(즉 왼쪽 사진에서 t,l,r,b)를 학습하여 예측하는 방식.
- Bounding box regression의 범위를 feature level 따라 pre-define되어 있어서 높은 feature level(ex. 13x13)에서는 range가 크고, 낮은 feature level(ex. 52x52)에서는 range가 작게 regress 한다.
Decoupled head
- Object detection에서 Classification과 Regression이 서로 상충한다는 건 객체탐지 필드에서의 고전적인 문제이다. (Rethinking Classification and Localization for Object Detection) 논문에 보면 Fully connected head(for classification task)와 convolutional head가(for localization task) 서로 상충된다는 것에 대한 연구가 잘 되어 있다.)
- Head를 Classification과 Regression으로 분리하고 IoU를 추가하였으며, YOLOX는 YOLO의 head를 decoupled로 바꾸면서 수렴 속도와 end-to-end의 AP를 향상시켰다.
Training strategies
Strong data augmentation
- Mosaic와 MixUp 기법을 더한 데이터 증강 기법을 사용하여 성능을 개선시켰다.
Mosaic (출처: YOLOv4: Optimal Speed and Accuracy of Object Detection)
MixUp (출처: BoF ( https://arxiv.org/pdf/1902.04103.pdf ))
Multiple positives
- Training 시에 Positive과 Negative의 심한 imbalance를 줄이기 위해서 3x3의 positive를 주는 방법을 사용
- FCOS에서 "center sampling" 이라 불리는 방법을 사용했다.
SimOTA
Label assignment는 어떤것이 positive이고 negative인지 샘플 데이터의 ground truth object에 할당해주는 것.FCOS와 같은 anchor-free 방법은 ground truth object의 '중앙 박스 영역'을 해당하는 positive로 처리하는데, 이는 Label이 애매한 부분을 할당하는 경우 문제가 (아래 그림의 붉은 점선 부분)
따라서 단순히 중앙 부분을 positive로 할당한는 것이 아니라, simOTA라는 기법 사용해서 좀 더 정교하게 labeling합니다.
OTA(Optimal Transportation Algorithm)는 위처럼 optimal을 찾는 최적화 문제를 푸는 것인데, 아래 사진에서 붉은 점선처럼 아이인지 엄마인지 labeling이 애매한 부분을 cost plane을 사용해서 최적화시킨다. 그리고 이 OTA를 iteration없이 simple하게 적용한 것이 simOTA로 아래 cost function을 사용한다.
참고: OTA: Optimal Transport Assignment for Object Detection(2021); https://arxiv.org/abs/2103.14259
OTA: Optimal Transport Assignment for Object Detection
Recent advances in label assignment in object detection mainly seek to independently define positive/negative training samples for each ground-truth (gt) object. In this paper, we innovatively revisit the label assignment from a global perspective and prop
arxiv.org
Experimental results
COCO 2017로 비교한 성능 결과표이다. SOTA 모델 중 정확도와 속도 측면에서 전반적으로 높은 성능을 보이며, 특히 YOLOX-X의 AP가 51.2%로 가장 높음을 알 수 있었다 :)
Conclusion
- 이 논문에서는 anchor-free detector를 사용하여 YOLO 시리즈의 업데이트 버전을 제안한 것
- 최근 고도화된 detection 기술인 decoupled head, advanced label assigning strategy 등을 사용해 속도와 정확성이 전반적으로 훌륭한 성능을 보임
- 가장 널리 쓰이는 YOLOv3의 아키텍쳐를 사용해서 AP(COCO)를 SOTA 최고로 개선시킴
- 기업과 학계의 갭을 줄이는 방법론이 되길 희망