[2021.10.07] Object Detection in Kaggle

Seryoungยท2021๋…„ 10์›” 7์ผ
0

Boostcamp AI Tech Level2 P-stage Object Detection

๋ชฉ๋ก ๋ณด๊ธฐ
5/7
post-thumbnail

๐Ÿ’ก Review Top Solutions in Kaggle (Object Detection Competition)

1. Global Wheat Detection

#1 Solution

Augmentation

  • Custom mosaic (Random crop X. ๊ฒฝ๊ณ„์„  ์œ ์ง€ํ•˜๋ฉด์„œ Crop)
  • MixUp
  • Heavy Augmentation (RandomCrop, HorizontalFlip, VerticalFlip, ToGray, GaussNoise, MotionBlur, MedianBlur, Blur, CLAHE, Sharpen, Emboss, RandomBrightnessContrast, HueSaturationValue)

Data Preprocessing

  • Data Cleaning
    • ๋†’์ด, ๋„ˆ๋น„ 10px ์ดํ•˜ box ์‚ญ์ œ

Model

  • Models: EfficientDet, Faster R-CNN + FPN
  • Stratified Kfold
    • 5 folds
    • Image source ๊ธฐ์ค€
  • Optimizer
    • EfficientDet: Adam lr=5e-4
    • Faster RCNN: SGD lr=5e-3
  • LR scheduler: cosine-annealing
  • Mixed precision (16fp, 32fp)

Post-process

  • Ensemble multi-scale model => WBF
  • Test time augmentation (HorizontalFlip, VerticalFlip, Rotate90)
  • Pseudo labeling
    • ํ˜„์—…์—์„  ์‚ฌ์šฉ ๋ถˆ๊ฐ€. kaggle์—์„œ๋งŒ ์‚ฌ์šฉ ๊ฐ€๋Šฅ
    • ์ฃผ์–ด์ง„ test dataset์„ ์ด์šฉํ•ด pseudo labeling ํ•ด์„œ ์‚ฌ์šฉ

#9 Solution

  • Model: DetectoRS + UniverseNet(Retina based)
  • MultilabelStratifiedKFold with 5 folds
    • # of boxes, Median of box areas, Image Source ๊ธฐ์ค€
  • Heavy Augmentation
  • Multi-scale training & Multi-scale testing (TTA)

2.VinBigData Chest X ray Abnormalities Detection

#1 Solution

๊ฐœ์ธ ์ฐธ์—ฌ

  • Baseline: Faster RCNN + FPN
  • WBF ensemble + YOLOv5
  • Ensemble with other yolo fold + other yolo hyperparameter
    ** No validations

ํŒ€ ์ฐธ์—ฌ

  • Pre-processing
    • ๊ฒน์น˜๋Š” box WBF๋กœ ์•™์ƒ๋ธ”
  • CV strategy
    • ๊ฐœ์ธ ์ฐธ๊ฐ€ -> ๋งˆ์ง€๋ง‰์— team up -> CV ๋ชจ๋‘ ๋‹ค๋ฆ„
    • Public LB๋ฅผ CV strategy๋กœ ์‚ฌ์šฉ
    • ๊ฐœ์ธ submissions ์•™์ƒ๋ธ” => ์„ฑ๋Šฅ ํ–ฅ์ƒ
  • Ensemble
    • (YOLO ์—ฌ๋Ÿฌ version, EffDet, Public Notebooks) ์•™์ƒ๋ธ” -> ์•™์ƒ๋ธ” -> ์•™์ƒ๋ธ” + Public Notebooks -> ์•™์ƒ๋ธ”

** ์ •๋ง ๋งŽ์€ ์‹คํ—˜ + ์•™์ƒ๋ธ”์ด ์ค‘์š”

#2 Solution

  • MMDetection Grid Search๋กœ ์—ฌ๋Ÿฌ ๋ชจ๋ธ ์ฐพ์Œ
    • ATSS, Cascade RFP(ResNet50), GFL, RetinaNet(ResNext101), UniverseNet
  • Training Trick
    • Albumentation
    • 1024x1024 ํ•™์Šต -> ์ž‘์€ ๋ฐ•์Šค ์žก๊ธฐ ์œ„ํ•ด 2048x2048 fine-tuning
    • FP16 -> speed & batch size ์ฆ๊ฐ€
    • StepLR
    • Class balanced Dataset ์•„์šฉ -> ์„ฑ๋Šฅ ํ–ฅ์ƒ X
  • 2 Step Training
    • ๋ชจ๋“  box -> 30 epoch train -> best checkpoint ์ €์žฅ
    • ์ „๋ฌธ๊ฐ€๋ณ„ ๋ช‡ ๊ฐœ ๋ฐ•์Šค ๋ผ๋ฒจ๋ง ํ–ˆ๋Š”์ง€ ํ™•์ธ
    • ๋ฐ•์Šค ์ ๊ฒŒ ๋ผ๋ฒจ๋งํ•œ ์ „๋ฌธ๊ฐ€ ์ด๋ฏธ์ง€ -> ํ•™์Šต ๋ฐ์ดํ„ฐ๋กœ fine-tuning

#2 ZFTurbo's Solution

  • Pre-processing: WBF
  • Ensemble: YOLOv5, RetinaNet101, RetinaNet512, CenterNet, Faster RCNN
  • Investigation mAP
    • OOF(Out of folds) -> ๊ฐ class๋ณ„ AP
    • AP ๋‚ฎ์€ class ์กฐ์‚ฌ
      • ํ•ด๋‹น class ๋ผ๋ฒจ๋ง ์ „๋ฌธ๊ฐ€๋ณ„ ์–ด๋–ป๊ฒŒ ๋ผ๋ฒจ๋ง ํ–ˆ๋Š”์ง€ EDA
      • AP ๋‚ฎ์€ ์ „๋ฌธ๊ฐ€ - ์‹ค์ œ ๊ฐ์ฒด๋ณด๋‹ค ๋” ํฐ box
      • ์œ„์˜ ์ „๋ฌธ๊ฐ€ ๋ผ๋ฒจ๋ง ๋ฐ•์Šค ํฌ๊ธฐ ์ค„์ž„
      • ํŠน์ • ์ „๋ฌธ๊ฐ€ box -> ๋งค์šฐ ํฐ resolution => ์•™์ƒ๋ธ”
  • CV strategy
    • Class: ํ•œ ์ด๋ฏธ์ง€ ์—ฌ๋Ÿฌ ๊ฐœ์˜ class
    • ํ•œ ์ด๋ฏธ์ง€ ๋‹น object ๊ฐœ์ˆ˜
    • ๊ฐ์ฒด ํฌ๊ธฐ

Summary

  • ๋ชจ๋ธ ๋‹ค์–‘์„ฑ
    : Resolution, Model(YOLO, EffDet,...), Library, Framework, Seed, ...
  • Heavy augmentation ํ”ผ๋ฆฌ์ˆ˜
  • CV strategy -> shakeup ๋ฐฉ์ง€
  • ์ฒด๊ณ„์ ์ธ ์‹คํ—˜
  • Team up -> ์„œ๋กœ ๋‹ค๋ฅธ baseline ๊ฐ–๋Š” ๊ฒฝ์šฐ ์•™์ƒ๋ธ”์— ์ข‹์Œ

0๊ฐœ์˜ ๋Œ“๊ธ€