Skip to content

๐Ÿ•ต๏ธโ€โ™€๏ธ Computer Vision Object Detection Competition

Notifications You must be signed in to change notification settings

swkim-sm/object-detection-level2-cv-02

ย 
ย 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Boostcamp Recycle Trash Object Detection Challenge

Code for 4th place solution in Boostcamp AI Tech Recycle Trash Object detection Challenge.

๋Œ€๋Ÿ‰ ์ƒ์‚ฐ, ๋Œ€๋Ÿ‰ ์†Œ๋น„์˜ ์‹œ๋Œ€์— ์‚ด๋ฉฐ '์“ฐ๋ ˆ๊ธฐ ๋Œ€๋ž€', '๋งค๋ฆฝ์ง€ ๋ถ€์กฑ'๊ณผ ๊ฐ™์€ ์—ฌ๋Ÿฌ ์‚ฌํšŒ ๋ฌธ์ œ๋ฅผ ๋‚ณ๊ณ  ์žˆ๋‹ค.
๋ถ„๋ฆฌ์ˆ˜๊ฑฐ๋Š” ์ด๋Ÿฌํ•œ ํ™˜๊ฒฝ๋ถ€๋‹ด์„ ์ค„์ผ ์ˆ˜ ์žˆ๋Š” ๋ฐฉ๋ฒ•์ด๋‹ค. ํ•ด๋‹น ๋Œ€ํšŒ๋Š” ์“ฐ๋ ˆ๊ธฐ๋ฅผ detectionํ•˜๋Š” ๋ชจ๋ธ์„ ๋งŒ๋“ค์–ด ์ •ํ™•ํ•œ ๋ถ„๋ฆฌ์ˆ˜๊ฑฐ๋ฅผ ๋•๋Š” ๊ฒƒ์— ๊ธฐ์—ฌํ•œ๋‹ค.

Contributors
๊น€์„œ์›_T2036, ์ด์œ ์ง„_T2167, ์ดํ•œ๋นˆ_T2176, ์ •์„ธ์ข…_T2201, ์กฐํ˜„๋™_T2215, ํ—ˆ์ง€ํ›ˆ_T2241, ํ—ˆ์ •ํ›ˆ_T2240

Archive contents

detection
โ”œโ”€โ”€ dataset
โ”œโ”€โ”€ template
โ”‚   โ”œโ”€โ”€mmdetection
โ”‚   โ”‚  โ”œโ”€โ”€configs
โ”‚   โ”‚  โ”‚  โ””โ”€โ”€custom
โ”‚   โ”‚  โ”‚     โ”œโ”€โ”€helper
โ”‚   โ”‚  โ”‚     โ”‚  โ”œโ”€โ”€dateset.py
โ”‚   โ”‚  โ”‚     โ”‚  โ”œโ”€โ”€runtime.py
โ”‚   โ”‚  โ”‚     โ”‚  โ””โ”€โ”€schedule.py
โ”‚   โ”‚  โ”‚     โ””โ”€โ”€models
โ”‚   โ”‚  โ”‚        โ”œโ”€โ”€cascade_rcnn
โ”‚   โ”‚  โ”‚        โ”œโ”€โ”€faster_rcnn
โ”‚   โ”‚  โ”‚        โ””โ”€โ”€htc
โ”‚   โ”‚  โ”œโ”€โ”€tools
โ”‚   โ”‚  โ”‚  โ”œโ”€โ”€train.py
โ”‚   โ”‚  โ”‚  โ”œโ”€โ”€inference.py
โ”‚   โ”‚  โ”‚  โ”œโ”€โ”€ensemble.py
โ”‚   โ”‚  โ”‚  โ”œโ”€โ”€make_fold_annotation.py
โ”‚   โ”‚  โ”‚  โ””โ”€โ”€vis_submission.ipynb
โ”‚   โ”‚  โ””โ”€โ”€submission
โ”‚   โ”‚     โ”œโ”€โ”€ensemble_inference.py
โ”‚   โ”‚     โ””โ”€โ”€ensemble_inf_cfg.json
โ”‚   โ”œโ”€โ”€live
โ””โ”€โ”€ โ””โ”€โ”€detectron

Train

cd mmdetection
  1. vanilla train
python tools/train.py [config path]
  1. k-fold train
python tools/make_fold_annotation.py [original_train_json_path]
python tools/train_cv.py [config path]
  1. pseudo labeling train & inference
python tools/inference_with_pseudo_labeling.py [config path]
  1. optimization with wandb sweeps
  • Setting
    • change sweep.yaml file
  • Command
    • create sweep graph

      wandb sweep sweep.yaml
      
    • then you can get url

    • you have to change sweepID

      wandb agent ProjectName/sweepID
      

inference

cd mmdetection
  1. vanilla inference
python tools/inference.py [config path]
  1. k-fold inference
python tools/inference_cv.py [config names] [work_dir]

visualization result

  • Make submission csv file after training
  • Change PRED_CSV in vis_submission.ipynb
  • Run cells

ensemble

cd submission
  1. Modify ensemble_inf_cfg.json
  2. Run ensemble_inference.py
python ensemble_inference.py ensemble_inf_cfg.json

yolo

https://github.com/ultralytics/yolov5

EfficeintDet

https://github.com/zylo117/Yet-Another-EfficientDet-Pytorch

final ensemble model

ensemble_method : Weighted Boxes Fusion

Model and Experiments

  • "htc_swin_b_384.csv"
  • "hsbfm_with_psudolabilng_8.csv"
  • "htc_pvt_finetune_mosaic_final.csv"
  • "htc_swin_b_finetune_mosaic.csv"
  • "htc_swin_b.csv"
  • "htc_swin_b_kfold.csv"
  • "cascadercnn_pvt.csv"
  • "faster_rcnn_pvtv2_b5_final.csv"
Model(detector) Exepriments Result
Hybrid Task Cascade README
CasCade R-CNN README
Faster R-CNN READEM

About

๐Ÿ•ต๏ธโ€โ™€๏ธ Computer Vision Object Detection Competition

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages

  • Python 52.2%
  • Jupyter Notebook 45.6%
  • Cuda 1.0%
  • C++ 0.7%
  • Shell 0.5%
  • Dockerfile 0.0%