Skip to content

alirezashadmani/TDD-xView2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

TDD-xView2

This repository contains tools and pipelines to train Object Detection and Segmentation models using YOLO, Detectron2, and HuggingFace DETR on the TDD-xView2 (or other COCO/YOLO formatted) datasets.

The monolithic Google Colab notebooks have been refactored into a clean, modular Python src/ package to ensure portability and ease of use across different machines.

Project Structure

├── run_pipeline.ipynb      # Main orchestrator notebook providing step-by-step instructions
├── src/
│   ├── dataset.py          # Data utilities (e.g., Roboflow downloader, path patching)
│   ├── train_detectron2.py # Detectron2 training wrapper
│   ├── train_huggingface.py# HuggingFace DETR training wrapper (PyTorch Lightning)
│   ├── train_yolo.py       # YOLOv8 training wrapper
│   └── utils/
│       ├── mask.py         # SLIC / Object masking utility
│       └── post_process.py # Evaluation metric plotting utility

Quick Start

  1. Install Dependencies Ensure you have Python 3.8+ installed, then install the required packages:

    pip install ultralytics roboflow transformers pytorch_lightning scikit-image
    python -m pip install 'git+https://github.com/facebookresearch/detectron2.git'
  2. Run Pipeline Launch Jupyter Notebook or JupyterLab and open run_pipeline.ipynb. From there, you can:

    • Prepare and download datasets via Roboflow.
    • Train the models utilizing the independent src/train_*.py wrappers.
    • Run post-processing plotting scripts in src/utils/.

Local Execution

All hardcoded Colab Paths (/content/drive/MyDrive/...) have been parameterized. When training models, point the dataset_dir or dataset_root arguments to your locally downloaded datasets. For example, to train YOLO:

python src/train_yolo.py --model yolov8n.pt \\
                         --data_yaml ./datasets/data.yaml \\
                         --dataset_root ./datasets/ \\
                         --epochs 100

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors