Giter Club home page Giter Club logo

object-detection-for-recycling's Introduction

Object Detection for Recycling


Project Summary

목표

이미지에 존재하는 재활용 쓰레기 10 개 클래스의 Object Detection Task의 mIoU 향상

데이터셋의 구조

  • 전체 이미지 개수 : 9754장(train: 4883, test: 4871)
  • 클래스: General trash, Paper, Paper pack, Metal, Glass, Plastic, Styrofoam, Plastic bag, Battery, Clothing
  • 이미지 크기 : (1024, 1024)
  • annotation: coco format

Result

  • 단일 모델 성능 : 0.6103→0.5987 (Swin_transformer-ATSS)
  • Ensemble 후 (public → private)
  • 0.6810 → 0.6635 : swin-l, yoloV5, yoloV7의 f0~4와 pseudo label 총 30개 WBF Ensemble
  • 0.6776 → 0.6602 : swin-l, yoloV5, yoloV7의 f0~4 총 15개 WBF Ensemble
  • 0.6756 → 0.6587 : swin-l f0,f2,f4와 yoloV5 f04 yoloV7 f04 총 13개 WBF Ensemble

Folder Structure 📂

📂 level2_objectdetection_cv-level2-cv-01
│      
├── 📂 mmdetection
│      │
│      ├── 📂 config
│      │     │ 
│      │     ├── 📂 __base__
│      │     │    ├── 📂 datasets
│      │     │    │    ├── 📑 coco_detection.py
│      │     │    │    ├── 📑 coco_detection_classbalanceddataset.py
│      │     │    │    ├── 📑 coco_detection_cutout.py
│      │     │    │    ├── 📑 coco_detection_heavy.py
│      │     │    │    ├── 📑 coco_detection_mixup.py
│      │     │    │    ├── 📑 coco_detection_mosaic.py
│      │     │    │    └── ...
│      │     │    ├── 📂 models
│      │     │    │    ├── 📑 faster_rcnn_r50_fpn.py
│      │     │    │    ├── 📑 faster_rcnn_r50_fpn_ciou.py
│      │     │    │    ├── 📑 faster_rcnn_r50_fpn_diou.py
│      │     │    │    └── ...
│      │     │    ├── 📂 schedules
│      │     │    │    └── 📑 schedule_1x.py
│      │     │    └── 📑 default_runtime.py
│      │     │ 
│      │     ├── 📑 atss_swin-l-p4-w12_fpn_dyhead_mstrain_2x_coco.py
│      │     ├── 📑 faster_rcnn_r50.py
│      │     ├── 📑 faster_rcnn_swin.py
│      │     ├── 📑 swin_large_dyhead_base.py
│      │     └── ...
│      │
│      ├── 📂 mmdet
│      │
│      └── 📂 tools
│           ├── 📑 train.py
│           ├── 📑 test.py
│           ├── 📑 test_csv.py
│           └── ...
│
├── 📂 utils
│     ├── 📂 convert2Yolo
│     │     ├── example.py
│     │     └──...
│     ├── 📑 CV_strategy.ipynb
│     ├── 📑 EDA.ipynb
│     ├── 📑 confusion_matrix.py
│     ├── 📑 csv_csv.ipynb
│     ├── 📑 csv_json.ipynb
│     ├── 📑 ensemble.ipynb
│     ├── 📑 image_split.ipynb
│     ├── 📑 modify_precision.ipynb
│     ├── 📑 pseudolabeling.ipynb
│     ├── 📑 split_for_yolodata.ipynb
│     └── 📑 tile_combine.ipynb
│      
├── 📂 yolov5
│    │
│    ├── 📂 data
│    │    ├── 📂 hyps
│    │    │    ├── 📑 hyp.scratch_high.yaml
│    │    │    ├── 📑 hyp.custom.yaml
│    │    │    └── ...
│    │    ├── 📑 custom_data.yaml
│    │    ├── 📑 custom_data_fold1.yaml
│    │    └── ...
│    │ 
│    ├── 📂 models
│    │    ├── 📑 yolo.py
│    │    ├── 📑 yolo5l-custom.yaml
│    │    └── ...
│    │    
│    ├── 📂 utils
│    │    └── ...
│    │    
│    ├── 📑 train.py
│    ├── 📑 hubconf.py
│    ├── 📑 inference.ipynb
│    └── ...
│
└── 📂 yolov7
     │
     ├── 📂 cfg
     │    ├── 📂 baseline
     │    │    ├── 📑 yolor-w6.yaml
     │    │    ├── 📑 yolov3.yaml
     │    │    └── ...
     │    ├── 📂 deploy
     │    │    ├── 📑 yolov7-w6.yaml
     │    │    ├── 📑 yolov7.yaml
     │    │    │    └── ...
     │    └── 📂 training
     │         ├── 📑 yolov7-w6.yaml
     │         ├── 📑 yolov7.yaml
     │         └── ...
     ├── 📂 data
     │    ├── 📑 coco.yaml
     │    ├── 📑 hyp.scratch.custom.yaml
     │    └── ...
     ├── 📂 models
     │    ├── 📑 yolo.py
     │    └── ...
     │    
     ├── 📂 utils
     │    └── ...
     │    
     ├── 📑 train.py
     ├── 📑 train_aux.py
     ├── 📑 hubconf.py
     ├── 📑 inference.ipynb
     └── ...    

How to Run

MMDetection

https://github.com/open-mmlab/mmdetection

Step 1.

cd mmdetection
pip install -r requirements.txt

Step 2. : Train

python tools/train.py \
        configs/{config 파일명}

Step 3. : Test

python tools/test_csv.py \
        configs/{config 파일명} \
        work_dirs/{config 파일명}/{checkpoint 파일명} \
        --eval bbox

YoloV5

https://github.com/ultralytics/yolov5

Step 1.

cd yolov5

Step 2. Train

python train.py --weights {pretrained_weight} --cfg {custom_model_config} --data{custom_data} --hyp {custom_hyp_yaml}

YoloV7

https://github.com/WongKinYiu/yolov7

Step 1.

cd yolov7

Step 2. Train

Default

python train.py --weights {pretrained_weight} --cfg {custom_model_config} --data{custom_data} --hyp {custom_hyp_yaml} 

Training with bigger yolov7 models

python train_aux.py --weights {pretrained_weight} --cfg {custom_model_config} --data{custom_data} --hyp {custom_hyp_yaml}

Contributors

김범준 백우열 조용재 조윤재 최명헌

object-detection-for-recycling's People

Contributors

quasar529 avatar wooyeolbaek avatar myeongheonchoi avatar yyongjae avatar kidsarebornstars avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.