mAP - BD-SEARCH/MLtutorial GitHub Wiki

IoU (Intersection over Union)

  • Ground Truth ์˜์—ญ๊ณผ Prediction ์˜์—ญ์ด ์žˆ์„ ๋•Œ, ์•„๋ž˜์™€ ๊ฐ™์ด ์ •์˜ํ•œ๋‹ค.
    • (๋‘ ์˜์—ญ์˜ ๊ต์ง‘ํ•ฉ) / (๋‘ ์˜์—ญ์˜ ํ•ฉ์ง‘ํ•ฉ)

image

precision-recall curve (PR curve)

  • threshold ์กฐ์ ˆ์— ๋”ฐ๋ฅธ precision๊ณผ recall ๊ฐ’์˜ ๋ณ€ํ™”๋ฅผ ํ‘œํ˜„ํ•œ ๊ทธ๋ž˜ํ”„.

image

AP (Average Precision)

  • ์—ฌ๋Ÿฌ ์•Œ๊ณ ๋ฆฌ์ฆ˜์˜ ์„ฑ๋Šฅ์„ ์ •๋Ÿ‰์ ์œผ๋กœ ๋น„๊ตํ•˜๊ธฐ ์œ„ํ•ด ์‚ฌ์šฉํ•˜๋Š” ๊ฐ’.
  • threshold์— ๋”ฐ๋ผ precision๊ณผ recall์€ ๋ณ€ํ•˜๊ฒŒ ๋˜๋Š”๋ฐ, threshold์™€ ์ƒ๊ด€ ์—†์ด ๋‘˜ ๋‹ค ์ข‹์œผ๋ฉด ์ด ๋ชจ๋ธ์˜ ์„ฑ๋Šฅ์ด ์ข‹๋‹ค๋Š” ๊ฒƒ์„ ์˜๋ฏธํ•œ๋‹ค.
  • ์ฃผ๋กœ ์ปดํ“จํ„ฐ ๋น„์ „์˜ object detection์˜ ์„ฑ๋Šฅ ํ‰๊ฐ€์— ์‚ฌ์šฉํ•œ๋‹ค.
    • IoU๊ฐ€ 0.5 ์ด์ƒ์ด๋ฉด ๋ฌผ์ฒด๊ฐ€ ๊ฒ€์ถœ๋˜์—ˆ๋‹ค๊ณ  ๋ณธ๋‹ค.

๊ตฌํ•˜๋Š” ๋ฐฉ๋ฒ•

  1. recall-precision ๊ทธ๋ž˜ํ”„๋ฅผ ๊ทธ๋ฆฐ๋‹ค.
  2. recall์ด ์ฆ๊ฐ€ํ•˜๋ฉด precision์€ ํ•ญ์ƒ ๊ฐ์†Œํ•˜๋„๋ก, ์•„๋ž˜ ๊ทธ๋ฆผ๊ณผ ๊ฐ™์ด ๊ทธ๋ž˜ํ”„๋ฅผ ๊ทธ๋ฆฐ๋‹ค.
  3. ๊ทธ๋ž˜ํ”„ ์•„๋ž˜ ๋ฉด์ ์ด AP์ด๋‹ค.

image

mAP (mean Average Precision)

  • AP๋ฅผ class๋ณ„๋กœ ๊ตฌํ•ด์„œ ํ‰๊ท ๋‚ธ ๊ฐ’.
  • class๊ฐ€ ์—ฌ๋Ÿฌ ๊ฐœ์ธ ๋ถ„๋ฅ˜ ๋ฌธ์ œ์—์„œ๋Š” AP ๊ฐ’์ด ์—ฌ๋Ÿฌ ๊ฐœ ๋‚˜์˜ค๊ฒŒ ๋˜๋ฏ€๋กœ, ์ด๋ฅผ ํ‰๊ท ๋‚ด์–ด ์‚ฌ์šฉํ•œ๋‹ค.
  • example code: https://github.com/Cartucho/mAP

reference