Object Detection - mAP

박정재·2022년 3월 22일
0

Mean Average Precision(mAP)

  • 각 클래스 AP의 평균

mAP를 계산하기 위해 필요한 개념

  • Precision & Recall
  • PR Curve
  • AP (Average Precision)
  • IOU(Intersection Over Union)

Precision & Recall


PR Curve

  1. Confidence 기준으로 내림차순으로 정렬한다.
  2. 누적 TP와 FP를 계산한다.
  3. 누적된 TP와 FP를 통해 Precision과 Recall을 순차적으로 계산한다.

예시

CategoryConfidenceTP / FP누적 TP누적 FPPrecisionRecall
8Plastic95%TP1-1/1 = 11/10 = 0.1
9Plastic90%TP2-2/2 = 12/10 = 0.2
7Plastic82%FP212/3 = 0.662/10 = 0.2
6Plastic80%TP313/4 = 0.753/10 = 0.3
1Plastic72%TP414/5 = 0.84/10 = 0.4
10Plastic70%FP424/6 = 0.664/10 = 0.4
5Plastic60%TP525/7 = 0.715/10 = 0.5
3Plastic41%FP535/8 = 0.635/10 = 0.5
6Plastic32%FP545/9 = 0.565/10 = 0.5
4Plastic10%TP646/10 = 0.606/10 = 0.6

PR Curve는 누적 TP와 FP를 이용하여 다음과 같이 그릴 수 있다.


다음과 같이 그래프를 변형하여 면적을 구해 AP를 구할 수 있다.


mAP

  • mAP는 각 클래스의 AP를 구해 평균을 구하면 된다.

IOU

  • Object Detection에서 TP와 FP를 판단하는 방법
  • 특정 값을 threshold로 정해 IOU가 threshold 이상일 때 bounding box를 TP라고 판단할 수 있다.
profile
Keep on dreaming and dreaming

0개의 댓글