This repository trains and evaluates a YOLOv8 object detection model using synthetic data and validates it on real-world images. The primary execution path is the Colab notebook syntheticDataWorks_multiclass.ipynb.
- Trains YOLOv8 on synthetic training images under
Output/train - Validates using
Output/val - Tests the model on real-world images under
testImages - Saves annotated predictions to
Output/predictions - Generates a summary report using
report/report.py
- Open
syntheticDataWorks_multiclass.ipynbin Google Colab - Mount Google Drive when prompted
- Enable GPU:
Edit > Notebook settings > Hardware accelerator > GPU - Run all notebook cells from top to bottom
The notebook is designed to:
- mount the signed-in user’s Google Drive
- locate the shared source dataset folder under
MyDrive - copy the source project into the user's own Drive folder at
MyDrive/syntheticDataWorks_multiclass - then proceed with training, prediction, and report generation
If your Drive folder contains the shared project under MyDrive/Multiple_object_detection, the notebook should use:
SOURCE_PROJECT_ROOT = DRIVE_ROOT / 'Multiple_object_detection'If the source folder path changes, update that line before running.
- Loads the YOLOv8 model from
Output/yolov8s.pt - Uses dataset configuration from
Output/yolo_params.yaml - Trains the model and saves results to
Output/runs/detect/train
- Loads the best model from the latest training run
- Predicts on images defined by the
testfield inOutput/yolo_params.yaml - Saves annotated prediction images to
Output/predictions/images - Saves prediction labels to
Output/predictions/labels
- Reads training and validation metrics from
Output/runs/detect - Copies example prediction images
- Generates
report/generatedreport.md
Output/runs/detect/train— training results and metricsOutput/predictions/images— annotated real-world predictionsOutput/predictions/labels— predicted label filesreport/generatedreport.md— report summary
- Runs: Training and validation runs stored in
Output/runs/detect/ - Training Logs: Metrics and loss curves in CSV and text formats within run directories
- README Files: This README.md and generated report in
report/ - Codes:
syntheticDataWorks_multiclass.ipynb— Main Colab notebookOutput/train.py— Training scriptOutput/predict.py— Prediction scriptOutput/visualize.py— Visualization utilitiesreport/report.py— Report generation script
- Configuration:
Output/yolo_params.yaml— Dataset and model parameters - Datasets: Synthetic training/validation data and real-world test images with labels
├── Output/
│ ├── classes.txt
│ ├── predict.py
│ ├── train.py
│ ├── visualize.py
│ ├── yolo_params.yaml
│ ├── train/
│ ├── val/
│ └── runs/
├── report/
│ └── report.py
├── testImages/
│ ├── images/
│ └── labels/
└── syntheticDataWorks_multiclass.ipynb
- The notebook assumes the shared folder is accessible from the signed-in Google account.
- If the path is wrong, update
SOURCE_PROJECT_ROOTin the notebook. - The notebook no longer depends on a GitHub clone and uses local Drive storage instead.