This repository provides scripts for training and evaluating YOLOv8 models on a car-object detection dataset. The project is built using the Ultralytics YOLOv8 library and integrates with WandB for experiment tracking.
-
Clone the repository:
git clone https://github.com/your-username/yolov8-car-object-detection.git cd yolov8-car-object-detection -
Install dependencies:
pip install -r requirements.txt
-
Download the car-object-detection dataset on google drive and extract:
This dataset downloaded from Kaggle and have formatted into YOLO format.
-
Configure your WandB API key:
Open
config.confand replaceYOUR WANDB KEYwith your actual WandB API key. Replace {/path/to/data}/car-object-detection with data path downloaded above.
To train the YOLOv8 model, run:
python trainer.pyAdjust the configuration in config.conf to suit your needs.
To evaluate the trained model and visualize predictions, run:
python evaluate.py --yolo_model runs/detect/train/weights/best.pt --testing_paths "runs/detect/predict"Replace yolov8m.pt with the desired trained model weights file.
data: Directory for storing the car-object-detection dataset.runs: Directory for storing training and evaluation results.

