<Daedalus: Breaking Non-Maximum Suppression in Object Detection via Adversarial Examples>
라는 논문에서 NMS의 오작동을 유발하는 적대적 예시 공격을 제안한다.
이 논문을 정확히 이해하기 위해서 NMS에 대한 내용을 자세히 알아보고자 한다.
★ NMS란?
→ object detector가 예측한 bounding box 중에서 정확한 bounding box를 선택하도록 하는 기법
비-최대 억제를 뜻하는 NMS(Non-Maximum Suppression)을 알기 전에 IoU에 대한 내용을 살펴봐야 한다.
▶ IoU란 무엇일까?
IoU(Intersection over Union)은 object detector의 정확도를 측정하는데 이용되는 평가 지표이다.
→ object detector가 예측한 bounding box는 IoU를 이용해서 평가될 수 있다.
IoU를 적용하기 위해서는 두 가지가 필요하다.
① ground-truth bounding boxes : testing set에서 object 위치를 labeling한 것
② prediceted bounding boxes : model이 출력한 object 위치 예측값
위 그림에서 predicted bounding box는 빨간색, ground-truth bounding box는 녹색으로 그려진다.
object detector가 얼마나 정확하게 객체 위치를 탐지했는지 알아보기 위한 IoU 계산법은 다음과 같다.
Area of Overlap : prediceted bounding box와 ground-truth bounding box가 겹치는 부분
Area of Union : prediceted bounding box와 ground-truth bounding box를 둘러싸는 영역
→ 겹치는 영역을 합집합 영역으로 나누면 합집합에 대한 교차 점수를 알아낼 수 있다.
→ Intersection over Union 점수 > 0.5는 일반적으로 좋은 예측으로 간주된다.
▶ 그렇다면 왜 IoU를 사용할까?
predicted bounding box가 ground-truth bounding box와 얼마나 일치하는지 측정하기 위해 평가 지표를 정의해야 함
위처럼 정확한 일치는 아니더라도 predicted bounding box가 얼마나 가깝게 일치하는지 확인할 수 있음
▶ NMS란 무엇일까?
이미지에서 객체는 다양한 크기와 형태로 존재하고,
이를 완벽하게 검출하기 위해 object detection 알고리즘은 여러 개의 bounding boxes를 생성한다.
이때 하나의 정확한 bounding box만을 선택하도록 하는 기법이 Non-Maximum Suppression이다.
위와 같이 여러 개의 boxes 중 NMS를 이용하여 하나의 box를 생성해준다.
▶ Non-Maximum Suppression 알고리즘
<input>
- bounding box list
- bounding box confidence scores
- threshold
<output>
- filtered bounding box list
① 하나의 클래스에 대한 bounding boxes 목록에서 가장 높은 점수를 갖고 있는 bounding box를 선택하고 목록에서 제거한 후 final box에 추가한다.
② 선택된 bounding box를 bounding boxes 목록에 있는 모든 bounding box와 IoU를 계산하여 비교한 후 IoU가 threshold(임계값)보다 높으면 bounding boxes 목록에서 제거한다.
③ bounding boxes에 아무것도 남아 있지 않을 때까지 반복
④ 각각의 클래스에 대해 위 과정 반복
※ 참고자료
https://www.pyimagesearch.com/2016/11/07/intersection-over-union-iou-for-object-detection/
Intersection over Union (IoU) for object detection - PyImageSearch
Discover how to apply the Intersection over Union metric (Python code included) to evaluate custom object detectors.
www.pyimagesearch.com
docs.google.com/presentation/d/1aeRvtKG21KHdD5lg6Hgyhx5rPq_ZOsGjG5rJ1HP7BbA/pub?
YOLO
YOLO You Only Look Once: Unified, Real-Time Object Detection Joseph Redmon, Santosh Divvala, Ross Girshick, Ali Farhadi
docs.google.com
https://inspace4u.github.io/dllab/lecture/2017/09/27/NMS_Algorithm.html
비최대값 억제 (NMS) 알고리즘
본 포스트에서는 영상 처리 및 객체 검출에서 흔히 사용되는 비최대값 억제(Non maximum supression) 알고리즘에 대해서 설명하겠습니다. 캐니 엣지 비최대값 억제 알고리즘은 국지적인 최대값을 찾아
inspace4u.github.io
https://www.youtube.com/watch?v=XXYG5ZWtjj0
'2021 INCOGNITO > Object Detection' 카테고리의 다른 글
<Daedalus: Breaking Non-Maximum Suppression in Object Detection via Adversarial Examples> 논문 분석 (1) | 2021.07.14 |
---|---|
Perception (0) | 2021.07.13 |