Skip to content

taeyoung1005/level2-objectdetection-cv-01

 
 

Repository files navigation

BoostCamp AI Tech 7th CV-01 Object Detection Project

Team Members

동준 경윤 영석 태영 태성 세린

Contribute

Member Roles
동준 EDA, Detectron2 k-fold, 빠른 테스트 위한 RT-DETR 선정, Class 세부 분리 실험, 결과 시각화
영석 EDA, Streamlit으로 데이터 시각화 및 양상블, detectron2 Albumentation, mmdetection k-fold
경윤 EDA, 라이브러리 구조파악, Model 선택, 가설 설정 및 실험
태영 EDA, 라이브러리 구조파악, Data 정제, Model 선택, 가설 설정 및 augmentation 실험
세린 EDA, Detectron2 k-fold
태성 Model 선택, 템플릿 코드 작성, 가설 설정 및 실험, 결과 시각화

Overview

This project is part of BoostCamp AI Tech and focuses on developing an object detection model specifically designed to identify and classify various types of trash. The primary goal is to enhance waste sorting efficiency by accurately detecting different categories of waste materials in images.

Dataset

This project utilizes a dataset specifically designed for trash classification. The dataset contains labeled images of various types of waste, divided into training and test sets.

  • Training Images: 4883
  • Test Images: 4871
  • Classes: 10 categories of trash items, with counts as follows:
    • General trash: 3966
    • Paper: 6352
    • Paper pack: 897
    • Metal: 936
    • Glass: 982
    • Plastic: 2943
    • Styrofoam: 1263
    • Plastic bag: 5178
    • Battery: 159
    • Clothing: 468

Each image in the dataset is annotated with bounding boxes for these categories to facilitate the training of an object detection model.

Development Environment

Category Details Category Details
Hardware GPU: V100 32GB × 4 Python 3.10
CUDA 11.6 PyTorch 1.12
PyTorch Lightning 1.8 Libraries MMDetection(3.3.0), Detectron2(0.6), Ultralytics(8.3.23)
Collaboration Tools Notion, WandB

Results

Usage

MMDetection

Data Preprocessing and Model Architecture

  • please refer to the configuration file in mmDetection/configs for details.

Train & Test

  • To train the model, run the following command:
    python tools/train.py configs/faster_rcnn/faster-rcnn_r50_fpn_1x_coco.py
  • To test the model, run the following command:
      python tools/test.py --work-dir "save/dir" "path/pth"

Additional Settings

  • seemmdetection/configs/ to adjust various training and model parameters
Detectron2

Data Preprocessing

  • please refer to the configuration file in detectron2/configs for details.

Model Architecture

  • Detectron2 provides pre-defined model architectures. Customize by modifying config.yaml and adding models to the backbone folder.

Train & Test

  • Run the following command to train and test the model:
    python lightning_train_net_custom.py --config-file ../configs/COCO-Detection/faster_rcnn_R_101_FPN_3x_TRASH.yaml --num-gpus 1
Ultralytics

Data Preprocessing

  • Data Augmentation
    Use OpenCV-based augmentation methods and specify additional transformations in select_transforms.py.

Model Architecture

  • Ultralytics models (like YOLOv5/YOLOv8) are configured using ultralytics/config.yaml. You can adjust the architecture by changing the model type and parameters in this file.

Train & Test

  • Use the following command to start training and testing:
    python train.py --data data.yaml --cfg cfg/yolov5.yaml --weights weights/yolov5s.pt

Additional Settings

  • Customize ultralytics.yaml for batch size, epochs, learning rate, and other parameters.

    batch_size: 64
    epochs: 50
    data: ./data.yaml
    weights: yolov5s.pt
    imgsz: 640
    device: 0
    project: yolov5
    name: exp
    cache: True
    optimizer: SGD

Tree Structure

Structure

About

level2-objectdetection-cv-01 created by GitHub Classroom

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Jupyter Notebook 76.4%
  • Python 23.0%
  • C++ 0.2%
  • Cuda 0.2%
  • Shell 0.1%
  • Rust 0.1%