๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ
TIL/Boostcamp AI tech

[Boostcamp Lv2][P stage] Week9-Day37. Object Detection :: seoftware

by seowit 2021. 9. 27.

๐Ÿ“œ ๊ฐ•์˜ ์ •๋ฆฌ 


Obeject Detection Overview

 

1. Task

  • classification : ์ด๋ฏธ์ง€๋ฅผ ๋ณด๊ณ  ์–ด๋–ค ๊ฐ์ฒด์ธ์ง€ ๋ถ„๋ฅ˜ํ•˜๋Š” ๊ฒƒ
  • object detection : bbox๋กœ ๊ฐ์ฒด์˜ ์œ„์น˜๋ฅผ ์ฐพ๊ณ  ์ข…๋ฅ˜๋ฅผ ๋ถ„๋ฅ˜ํ•˜๋Š” ๊ฒƒ
  • semantic segmentation : ๊ฐ์ฒด์˜ ์œ„์น˜์™€ ์ข…๋ฅ˜๋ฅผ ํ”ฝ์…€ ๋‹จ์œ„๋กœ ๋ถ„๋ฅ˜ํ•˜๋Š” ๊ฒƒ
  • instance segmentation : semantic segmentation์— object detection์˜ ๊ธฐ๋Šฅ์„ ๋”ํ•ด์„œ ๊ฐ™์€ ์ข…๋ฅ˜์˜ ๊ฐ์ฒด๋ผ๋„ ๋‹ค๋ฅธ ๊ฐ์ฒด๋กœ ๋ถ„๋ฅ˜ํ•˜๋Š” ๊ฒƒ

 

2. History

 

3. Evaluation

๋ชจ๋ธ์˜ ํ‰๊ฐ€ ์ง€ํ‘œ๋กœ ์„ฑ๋Šฅ๊ณผ ์†๋„๋ฅผ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ๋‹ค. ์„ฑ๋Šฅ์˜ ํ‰๊ฐ€ ์ง€ํ‘œ๋กœ๋Š” mAP, ์†๋„์˜ ํ‰๊ฐ€ ์ง€ํ‘œ๋กœ๋Š” FPS, Flops๊ฐ€ ์žˆ๋‹ค.

โœ” mAP(mean Average Precision)

mAP๋Š” ๊ฐ ํด๋ž˜์Šค๋‹น AP์˜ ํ‰๊ท ์ด๋‹ค. mAP๋ฅผ ์ดํ•ดํ•˜๊ธฐ ์œ„ํ•ด์„œ๋Š” confusion matrix, precision&recall, PR curve, AP, IoU ๋“ฑ์— ๋Œ€ํ•œ ๊ฐœ๋…์„ ์•Œ์•„์•ผ ํ•œ๋‹ค.

  • confusion matrix
  • precision & recall
    • precision์€ True๋กœ ์˜ˆ์ธกํ•œ ๊ฒƒ ์ค‘์— ๋งž์ถ˜ ๊ฒƒ(True์ธ ๊ฒƒ), Recall์€ ์ •๋‹ต(True) ์ค‘์— True๋ผ๊ณ  ์˜ˆ์ธกํ•œ ๊ฒƒ์„ ์˜๋ฏธ 

  • PR curve
    • confidence ์ˆœ์œผ๋กœ ์ •๋ ฌํ•œ ํ›„์— ๋ˆ„์  precision๊ณผ ๋ˆ„์  recall์„ ๊ตฌํ•˜์—ฌ (recall, precision)์˜ ํ‘œ๋กœ ํ‘œํ˜„ํ•œ ๊ฒƒ.

  • AP
    • PR curve์—์„œ ์ตœ์†Œ ํฌ๊ธฐ๋Š” 0์ด๊ณ  ์ตœ๋Œ€ ํฌ๊ธฐ๋Š” 1์ด๋ฏ€๋กœ PR curve์˜ ์•„๋ž˜ ๋ฉด์ ์— ํ•ด๋‹นํ•˜๋Š” ๋ถ€๋ถ„์ด AP์ด๋‹ค.

  • mAP
    • AP์˜ ํ‰๊ท 

  • IoU

 

โœ” FPS(Frames Per Second)

FPS๋Š” ๋ชจ๋ธ์˜ ์†๋„๋ฅผ ์ธก์ •ํ•˜๋Š” ๋ฉ”ํŠธ๋ฆญ์œผ๋กœ, ์ดˆ๋‹น ์ฒ˜๋ฆฌํ•˜๋Š” frame ์ˆ˜๋ฅผ ์˜๋ฏธํ•œ๋‹ค. FPS๊ฐ€ ํด์ˆ˜๋ก ๋ชจ๋ธ์ด ๋น ๋ฆ„.

 

โœ” FLOPs (Floating Point Operations)

FLOPS๋Š” ๋ชจ๋ธ์˜ ์†๋„๋ฅผ ์ธก์ •ํ•˜๋Š” ๋ฉ”ํŠธ๋ฆญ์œผ๋กœ, ์—ฐ์‚ฐ๋Ÿ‰์˜ ํšŸ์ˆ˜๋ฅผ ์˜๋ฏธํ•œ๋‹ค. Flops๊ฐ€ ์ž‘์„์ˆ˜๋ก ๋น ๋ฅธ ๋ชจ๋ธ.

 

4. Library

โœ” MMDetection

• pytorch ๊ธฐ๋ฐ˜์˜ object detection library. ๋งŽ์€ ์—ฐ๊ตฌ๊ฐ€ MMDetection์„ ์‚ฌ์šฉํ•ด์„œ ์ง„ํ–‰๋˜๊ณ  ์žˆ์œผ๋‹ˆ, github์—์„œ ๋ณด๋ฉด ์ข‹์Œ.

โœ” Detectron2

• Detectron 2 ๋Š” ํŽ˜์ด์Šค๋ถ AI ๋ฆฌ์„œ์น˜์˜ ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ๋กœ pytorch ๊ธฐ๋ฐ˜์˜ Object detection๊ณผ segmentation ์˜ ์•Œ๊ณ ๋ฆฌ์ฆ˜ ์ œ๊ณต

โœ” YOLOv5

• coco ๋ฐ์ดํ„ฐ์…‹์œผ๋กœ ์‚ฌ์ „ ํ•™์Šต๋œ ๋ชจ๋ธ๋กœ ์ˆ˜์ฒœ ์‹œ๊ฐ„์˜ ์—ฐ๊ตฌ์™€ ๊ฐœ๋ฐœ์— ๊ฑธ์ณ ๋ฐœ์ „๋œ Object Detection ๋ชจ๋ธ

• Colab kaggle Docker, AWS, Google Cloud Platform ๋“ฑ ์—์„œ ์˜คํ”ˆ ์†Œ์Šค๋ฅผ ์ œ๊ณต

โœ” EfficientDet

• EfficientDet ์€ Google Research Brain ์—์„œ ์—ฐ๊ตฌํ•œ ๋ชจ๋ธ๋กœ EfficientNet ์„ ์‘์šฉํ•ด ๋งŒ๋“  Object Detection ๋ชจ๋ธ
• Tensorflow ๋กœ ์ œ๊ณต๋˜๋Š” EfficientDet ์„ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ์œผ๋ฉฐ ๊นƒํ—™์— pytorch ๊ธฐ๋ฐ˜์œผ๋กœ ๊ตฌํ˜„๋œ ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ ์—ญ์‹œ ์กด์žฌ

๋Œ“๊ธ€