Compact traffic-sign detection project for an Automated Driving System capstone.
The model is trained on TT100K (50 classes) with YOLOv8n and exported to ONNX.
- YOLOv8n training pipeline for TT100K (50 classes)
- Config-driven workflow via YAML
- Validation and single-image inference commands
- ONNX export script for Raspberry Pi CPU deployment
- Kaggle notebook + modular Python pipeline
- CI + tests scaffolding
traffic-sign-detection-model/
├── .github/workflows/ci.yml
├── configs/
│ ├── default.yaml
│ └── kaggle.yaml
├── data/
├── notebooks/
├── scripts/
│ ├── export_onnx.py
│ └── infer_image.py
├── src/
│ ├── __init__.py
│ ├── pipeline/
│ │ ├── __init__.py
│ │ ├── evaluate.py
│ │ └── train.py
│ └── utils/
│ ├── __init__.py
│ └── io.py
├── tests/
│ └── test_config.py
├── .gitignore
├── LICENSE
├── requirements.txt
└── run.py
For local training, place the dataset under:
data/tt100k/mydata
Expected layout:
data/tt100k/mydata/
├── images/
│ ├── train/
│ └── val/
└── labels/
├── train/
└── val/
If you want to download the Kaggle version manually, use the Kaggle API and unzip it into data/tt100k/mydata. The Kaggle notebook can still use the Kaggle-hosted path directly through configs/kaggle.yaml.
Kaggle path used by the notebook:
/kaggle/input/datasets/braunge/tt100k/mydata
- Install dependencies:
pip install -r requirements.txt-
Download or copy the dataset so it exists at
data/tt100k/mydata. -
Train locally:
python run.py --config configs/default.yaml --mode train- Validate:
python run.py --config configs/default.yaml --mode validate- Export ONNX:
python run.py --config configs/default.yaml --mode export- Inference on one image:
python run.py --config configs/default.yaml --mode infer --image /path/to/image.jpg --conf 0.25- The default config auto-selects the device when possible, so it works on GPU machines and CPU-only machines.
- If you are on Kaggle, use
configs/kaggle.yamlinstead of the local default. - Training resumes from the latest checkpoint in
runs/detect/tt100k_training/yolov8n_30e/weights/last.ptwhen that file exists.
Apache-2.0. See LICENSE.