Skip to content

boostcampaitech6/level2-objectdetection-cv-01

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

54 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿ“– Overview

๋ณธ ํ”„๋กœ์ ํŠธ๋Š” ํ˜„๋Œ€ ์‚ฌํšŒ์˜ ์“ฐ๋ ˆ๊ธฐ ์ฒ˜๋ฆฌ ๋ฌธ์ œ์™€ ํ™˜๊ฒฝ ์œ„๊ธฐ์— ๋Œ€์‘ํ•˜๊ธฐ ์œ„ํ•ด 2์ฐจ์› ์ด๋ฏธ์ง€ ๊ธฐ๋ฐ˜์˜ ์“ฐ๋ ˆ๊ธฐ ๋ถ„๋ฅ˜ ๋ชจ๋ธ์„ ๊ฐœ๋ฐœ์„ ๋ชฉํ‘œ๋กœ ํ•จ. EDA๋ฅผ ํ†ตํ•ด ๋ฐ์ดํ„ฐ ํ’ˆ์งˆ ๋ฐ ํด๋ž˜์Šค ๊ฐ„ ๋ถˆ๊ท ํ˜• ๋ฌธ์ œ๋ฅผ ํŒŒ์•…ํ•จ. ์ด๋ฅผ ํ•ด๊ฒฐํ•˜๊ณ ์ž ์ „๋žต์  ํ•™์Šต ๋ฐ์ดํ„ฐ ๋ถ„๋ฅ˜, ๋ฐ์ดํ„ฐ ์ •์ œ, ๋ฐ์ดํ„ฐ ์ฆ๊ฐ•, ์ดˆํ•ด์ƒ๋„, ๋””๋ธ”๋Ÿฌ๋ง, ํด๋ž˜์Šค ์žฌ๋ถ„๋ฅ˜, ๋‹ค์–‘ํ•œ ๋ชจ๋ธ ํ•™์Šต ๋ฐ ์•™์ƒ๋ธ” ๋“ฑ์˜ ์ „๋žต ์ˆ˜๋ฆฝ ํ›„ ๊ฐ ์‹คํ—˜์„ ํƒ์ƒ‰์ ์œผ๋กœ ์ˆ˜ํ–‰ ํ›„ ๊ฐ ์ „๋žต์— ๋Œ€ํ•œ ๊ฒฐ๊ณผ๋ฅผ ๋น„๊ต ๋ถ„์„ํ•จ. ์ด ์ค‘ ๊ฐ€์žฅ ์œ ์˜๋ฏธํ•œ ๊ฒฐ๊ณผ๋ฅผ ์–ป์€ ์ „๋žต์„ ์ตœ์ข…์ ์œผ๋กœ ์ ์šฉํ•˜์—ฌ ์ตœ์ข… 2์œ„์˜ ์„ฑ์ ์„ ๊ฑฐ๋‘ .

๐Ÿ† Rank

Test dataset(Public)
Test dataset(Private)

๐Ÿ—‚ Dataset

Example image data w/ 2D Bounding Boxes, annotation data
  • Images & Size : (Train), 4871 (Test), (1024, 1024)
  • classes : General trash, Paper, Paper pack, Metal, Glass, Plastic, Styrofoam, Plastic bag, Battery, Clothing

Team CV-01

๐Ÿ‘ฌ๐Ÿผ Members


๊น€๋ฏผ์œค

๊น€์ฑ„์•„

๋ฐฐ์ข…์šฑ

๋ฐ•์ฐฌ์ข…

์กฐ๋ช…ํ˜„

์ตœ์‹œํ˜„

๐Ÿ‘ฉโ€๐Ÿ’ป Roles

Name Roles
Common EDA, Data Relabeling, SGK-Fold, ๋ชจ๋ธ ํ•™์Šต, ์•„์ด๋””์–ด ๊ฒ€์ฆ
๊น€๋ฏผ์œค MMDetection ๋ชจ๋ธ baseline ์ž‘์„ฑ, ๋ชจ๋ธ ์‹คํ—˜ ๋ฐ ํ‰๊ฐ€
๊น€์ฑ„์•„ Deblurring, Super Resolution
๋ฐฐ์ข…์šฑ ํ”„๋กœ์ ํŠธ ๊ธฐํš, General class reclassifcation, Super Resolution
๋ฐ•์ฐฌ์ข… Framework ๋ณ„ Baseline ์ž‘์„ฑ, RandAugment ์‹คํ—˜, ๋ชจ๋ธ ์‹คํ—˜ ๋ฐ ํ‰๊ฐ€
์กฐ๋ช…ํ˜„ wandb ์„ธํŒ…, General trash class reclassification
์ตœ์‹œํ˜„ MMDetection ๋ชจ๋ธ ์‹คํ—˜, Augmentation ์‹คํ—˜, Ensemble ์‹คํ—˜

๐Ÿ’ป Enviroments

  • Language: Python 3.10
  • Hardwares: Intel(R) Xeon(R) Gold 5120, Tesla V100-SXM2 32GB ร— 6
  • Framework: Pytorch, Detectron2 v0.6, Ultralytics v8.1, MMDetection v3.3.0
  • Cowork Tools: Github, Weight and Bias, Notion, Discord, Zoom, Google calendar
  • Labeling Tool: Supervisely

๐Ÿ“Š Project

๐Ÿ”Ž EDA

Class Imbalance, Object Size

Distribution of Bbox area as % of Image area by class
  • ์ „์ฒด ๋ฐ์ดํ„ฐ์—์„œ Paper, Plastic bag, General trash๊ฐ€ ๋†’์€ ๋น„์œจ์„ ์ฐจ์ง€ํ•˜๊ณ  ์žˆ์œผ๋ฉฐ ๋ฐ์ดํ„ฐ์˜ ๋ถ„ํฌ๊ฐ€ ๋ถˆ๊ท ํ˜•์„ ์ด๋ฃธ
  • ๊ฐ ํด๋ž˜์Šค ๋ณ„ ๊ฐ์ฒด์˜ ํฌ๊ธฐ ๋ถ„ํฌ๋Š” ์ž‘์€ ์ˆœ์œผ๋กœ ํฐ ๊ฐ์ฒด๋กœ ๊ฐˆ ์ˆ˜๋ก ์ค„์–ด๋“ฆ

Object Position

Object Bounding Box distribution of each class
  • ์ด๋ฏธ์ง€ ์ƒ์˜ ๊ฐ์ฒด๋“ค์ด ์ด๋ฏธ์ง€์˜ ์ค‘์‹ฌ๋ถ€์— ์ฃผ๋กœ ์œ„์น˜ํ•˜๊ณ  ์žˆ์Œ

๐Ÿ”— Pipeline

Pipeline of Applied Methods

๐Ÿ”ฌ Methods

Data Cleaning

  • ๋ฐ์ดํ„ฐ ์‹œ๊ฐํ™”๋ฅผ ํ†ตํ•ด ๋‹ค์ˆ˜์˜ ๋ ˆ์ด๋ธ” ์˜ค๋ฅ˜๊ฐ€ ๋ฐœ๊ฒฌ๋˜์–ด Supervisely๋ฅผ ํ™œ์šฉํ•ด ๋ฐ์ดํ„ฐ ๋ ˆ์ด๋ธ” ์ˆ˜์ • ํ›„ ์‹คํ—˜ ์ง„ํ–‰
  • ์‹คํ—˜ ๊ฒฐ๊ณผ ์ˆ˜์ •ํ•œ ๋ฐ์ดํ„ฐ์…‹์ด ๊ธฐ์กด์˜ ๋ฐ์ดํ„ฐ์…‹๋ณด๋‹ค ๋‚ฎ์€ ์„ฑ๋Šฅ ๊ฒฐ๊ณผ๋ฅผ ๋ณด์ž„
  • ์ด๋Š” Test dataset๊ณผ train dataset ๋ชจ๋‘ ์œ ์‚ฌํ•œ ์˜ค๋ฅ˜ ๊ฒฝํ–ฅ์„ฑ์„ ๊ฐ€์ง€๋Š” ๊ฒƒ์œผ๋กœ ์ถ”์ •๋˜์–ด ์ˆ˜์ •ํ•˜์ง€ ์•Š์€ Original dataset์œผ๋กœ ์ดํ›„ ์‹คํ—˜์„ ์ง„ํ–‰
Dataset Model Backbone mAP_50(Val) mAP_50(Test)
Original Dino Swin-l 0.716 0.6938
Relabeled Dino Swin-l 0.582 0.6488

Reclassify General Trash Class

Annotation per class in Class-20 Train Dataset

  • EDA๋ฅผ ํ†ตํ•ด General Trash ํด๋ž˜์Šค ์ด๋ฏธ์ง€๋“ค์ด ๋‹ค์–‘ํ•œ ๊ฐ์ฒด๋กœ ์ด๋ฃจ์–ด์ ธ ์žˆ์Œ์„ ๋ฐœ๊ฒฌ
  • General Trash ํด๋ž˜์Šค๋ฅผ 10๊ฐœ์˜ ํด๋ž˜์Šค๋กœ ์ถ”๊ฐ€ ๋ถ„๋ฅ˜ํ•˜์—ฌ ์ด20๊ฐœ์˜ ํด๋ž˜์Šค๋กœ ์ด๋ฃจ์–ด์ง„ Class-20 ๋ฐ์ดํ„ฐ์…‹์œผ๋กœ ์žฌ๊ตฌ์„ฑํ•จ
  • Class-20์˜ General trash ํด๋ž˜์Šค ์ค‘ ๋†’์€ mAP๋ฅผ ๋ณด์ธ 3๊ฐœ์˜ ํด๋ž˜์Šค๋ฅผ ์„ ์ •ํ•ด 12๊ฐœ์˜ ํด๋ž˜์Šค๋กœ ์ด๋ฃจ์–ด์ง„ Class-12, 13๊ฐœ์˜ ํด๋ž˜์Šค๋กœ ์ด๋ฃจ์–ด์ง„ Class-13 ๋ฐ์ดํ„ฐ์…‹์œผ๋กœ ์žฌ๊ตฌ์„ฑํ•จ
  • ์‹คํ—˜ ๊ฒฐ๊ณผ ํด๋ž˜์Šค๋ฅผ ์ถ”๊ฐ€ํ•˜์—ฌ ๊ฒ€์ถœํ•œ ๊ฒฝ์šฐ๋ณด๋‹ค ๊ธฐ์กด์˜ Original ์„ฑ๋Šฅ๊ณผ ๋น„์Šทํ•˜๊ฑฐ๋‚˜ ๋‚ฎ์Œ
  • ์ด๋Š” General class์— ๋‹ค์–‘ํ•œ ์ข…๋ฅ˜์˜ ๊ฐ์ฒด๋“ค์ด ์žˆ์Œ์—๋„ ๋ถˆ๊ตฌํ•˜๊ณ  ๋ชจ๋ธ์ด ์ถฉ๋ถ„ํžˆ ํ•™์Šต ๋ฐ ์ถ”๋ก ์ด ๊ฐ€๋Šฅํ•œ ๊ฒƒ์œผ๋กœ ํŒ๋‹จ
Dataset Model Backbone Epochs mAP_50(Test)
Original Dino Swin-l 23 0.717
Class-20 Dino Swin-l 23 0.679
Class-12 Dino Swin-l 23 0.673
Class-13 Dino Swin-l 23 0.711

Deblur

  • EDA๋ฅผ ํ†ตํ•ด Train ๋ฐ Test dataset์— blur image ๋‹ค์ˆ˜ ๋ฐœ๊ฒฌํ•จ
  • ์ด๋ฅผ ๋ถ„๋ฅ˜ ํ•œ ๊ฒฐ๊ณผ Train 21.89% Test 22.02% blurred image ์กด์žฌํ•จ
  • ์ด๋“ค์„ deblurr๋ฅผ ํ†ตํ•ด ๋ณด์ • ํ›„ ํ•™์Šต์— ์‚ฌ์šฉํ•˜์˜€์œผ๋‚˜ ์œ ์˜๋ฏธํ•œ ์„ฑ๋Šฅ ํ–ฅ์ƒ ์—†์Œ

Dataset Model Backbone mAP_50(Val) mAP_50(Test)
Original Dino Swin-l 0.716 0.6938
Deblurred Dino Swin-l 0.704 0.6825

Super Resolution

  • EDA๋ฅผ ํ†ตํ•ด ์ž‘๊ณ  ํ๋ฆฟํ•œ ์ด๋ฏธ์ง€๋“ค์„ ๋‹ค์ˆ˜ ๋ฐœ๊ฒฌํ•จ
  • Enhanced Deep Residual Networks for Single Image Super-Resolution์— ์ œ์•ˆ๋œ SR ๊ธฐ๋ฒ•์„ ์ ์šฉํ•˜์—ฌ 2๋ฐฐ ํ•ด์ƒ๋„์˜ ์ด๋ฏธ์ง€๋กœ ๋ณ€ํ™˜ํ•จ
  • ํ•ด๋‹น ์ด๋ฏธ์ง€๋ฅผ Center-crop ๋˜๋Š” Multi-crop ์ˆ˜ํ–‰ํ•œ ๋’ค ์ด๋ฅผ ๊ธฐ์กด ๋ฐ์ดํ„ฐ์…‹๊ณผ ํ•ฉ๊ป˜ ํ•™์Šต ๋ฐ์ดํ„ฐ๋กœ ํ™œ์šฉํ•จ
  • ์‹คํ—˜ ๊ฒฐ๊ณผ 1๊ฐœ์˜ ์ด๋ฏธ์ง€๋งŒ ์ถ”๊ฐ€๋กœ ์‚ฌ์šฉํ•˜๋Š” Center-crop์— ๋น„ํ•ด 4๋ฐฐ์˜ ํ•™์Šต ๋ฐ์ดํ„ฐ๋ฅผ ์‚ฌ์šฉํ•˜๋Š” Multi-crop ๋ฐฉ์‹์—์„œ ๋†’์€ ์„ฑ๋Šฅ ๊ฐœ์„ ์„ ํ™•์ธํ•  ์ˆ˜ ์žˆ์Œ
Center-Crop
Multi-Crop
Dataset Model Backbone Epoch mAP_50(Val) mAP_50(Test)
Original DINO Swin-l 20 0.731 0.7172
Original+SR(Center-Crop) DINO Swin-l 25 0.802 0.721
Original+SR(Multi-Crop) DINO Swin-l 25 0.817 0.7398

Augmentation

  • ๊ฐ์ฒด๋“ค์˜ ํฌ๊ธฐ ๋ฐ ์œ„์น˜๋ฅผ ๊ณ ๋ คํ–ˆ์„ ๋•Œ RandomResize, RandomCrop, RandomAugment ๋ฐฉ๋ฒ•์„ ์ ์šฉํ–ˆ์„ ๋•Œ ์„ฑ๋Šฅ ๊ฐœ์„ ์„ ๊ธฐ๋Œ€ํ•จ
  • ํ•™์Šต์‹œ ๋ชจ๋ธ์˜ ์ผ๋ฐ˜ํ™”๋ฅผ ๋†’์ด๊ธฐ ์œ„ํ•œ ๋ฐฉ๋ฒ•์œผ๋กœ ๋‹ค์–‘ํ•œ ์ฆ๊ฐ• ๊ธฐ๋ฒ•์„ ์ ์šฉํ•œ ๋’ค, ์—ฌ๋Ÿฌ ํ‰๊ฐ€ ์ง€ํ‘œ๋ฅผ ๊ธฐ๋ฐ˜์œผ๋กœ ์ฆ๊ฐ• ๊ธฐ๋ฒ•์„ ์„ ์ •ํ•จ
  • ๊ธฐํ•˜ํ•™์  ๋ณ€ํ™˜์„ ์ ์šฉํ•  ๊ฒฝ์šฐ IoU ์ž„๊ณ„๊ฐ’์— ๋”ฐ๋ผ mAP๊ฐ€ ํฌ๊ฒŒ ๋‹ฌ๋ผ์ง€๋Š” ๊ฒฝํ–ฅ์„ ๋ณด์—ฌ์คŒ
  • ์ƒ‰์ƒ ๋ณ€ํ™˜์— ๋Œ€ํ•œ RandAugment ๊ธฐ๋ฒ•์„ ์ ์šฉํ•œ ๊ฒฐ๊ณผ ๊ฐ•๊ฑดํ•˜๊ณ  ๋†’์€ ์„ฑ๋Šฅ ํ–ฅ์ƒ์„ ๋ณด์—ฌ์คŒ
Augmentation Info mAP_50(Val)
None - 0.554
RandomCrop RandomCrop 0.565
RandomCenterCropPad CenterCrop + pad 0.568
RandomAffine Geometric transformation 0.561
PhotoMetricDistortion Color Jitter 0.564
RandAugment Color transformation 0.571

Models

  • 1-stage, 2-stage ๋ชจ๋ธ๋ถ€ํ„ฐ ๋ ˆ๊ฑฐ์‹œ ๋ฐ ์ตœ์‹  ๋ชจ๋ธ์„ ํ™œ์šฉํ•จ
  • YOLO ๋“ฑ์˜ 1-stage ๋ชจ๋ธ์˜ ๊ฒฝ์šฐ ๋‚ฎ์€ ๊ฐ์ฒด ๊ฒ€์ถœ ์„ฑ๋Šฅ์„ ๋ณด์ž„
  • ์ตœ๊ทผ ์—ฐ๊ตฌ๋กœ ์ œ์•ˆ๋œ DINO, Co-Detr๊ณผ ๊ฐ™์€ ๋ชจ๋ธ๋“ค์„ ํ•™์Šต ๋ฐ ํ‰๊ฐ€ํ•จ
Frameworks : Detectron2 v0.6, Ultralytics v8.1, mmDetection v3.3.0

Ensemble

  • Confusion Matrix๋กœ ๋ชจ๋ธ๋ณ„ ํŠน์ง•์„ ํŒŒ์•…ํ•˜์—ฌ ๋ชจ๋ธ ์กฐํ•ฉ์„ ํŒ๋‹จํ•จ
  • WBF (Weighted Box Fusion) ๊ธฐ๋ฒ• ์ ์šฉ ํ•˜์˜€์œผ๋‚˜ ์œ ์˜๋ฏธํ•œ ์„ฑ๋Šฅ ํ–ฅ์ƒ ์—†์Œ
  • ๋‹จ์ผ ๋ชจ๋ธ์˜ ์„ฑ๋Šฅ์ด ์•™์ƒ๋ธ” ๊ธฐ๋ฒ•๋ณด๋‹ค ๋†’์Œ
Models Average mAP_50(Val) Ensemble mAP_50(Test)
YOLO + Cascade (R50 + ConvNeXt) 0.5123 0.6061
DINO + DDQ + Co-detr 0.6761 0.5911

๐Ÿ“ˆ Experimental Result

mAP_50 Test dataset(Public)