Practical overview
When it fits
Use it when you can work with a Python repository and want to adapt a YOLOv5 vehicle detector to image data, or apply an existing trained weights file to test images.
Who it is for
- Python users preparing a custom vehicle-image dataset for model fine-tuning.
- Practitioners who need image-based vehicle detections from trained YOLOv5 weights.
- Developers exploring vehicle counting from object-detection outputs.
Documented uses
- Fine-tune pretrained YOLOv5 weights using a vehicle dataset.
- Run detection on a test image with trained weights.
- Track training mAP, loss, confusion matrix and other metrics using the documented Weights & Biases option.
Requirements & limits
- The project expects users to supply or find vehicle images and prepare a dataset configuration.
- The README provides command-line examples for training and image detection.
- Weights & Biases is an additional option for training metrics and requires its package and sign-in.
- The maintainer offers access to a cited vehicle dataset by email; this is distinct from preparing a custom dataset.
Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.
Install the repository and its Python requirements
Prepare the cloned project environment before using the documented training or detection scripts.
Before you start
- Git
- Python and pip
Steps
Clone https://github.com/MaryamBoneh/Vehicle-Detection.
Change into the Vehicle-Detection directory.
Install the listed requirements with pip install -r requirements.txt.
Expected outcome
The repository is cloned and its requirements are installed; training and detection are documented as subsequent stages.
Guide limitations
- The installation instructions do not specify Python version or hardware requirements.
Fine-tune YOLOv5 and detect vehicles in a test image
Train on a prepared vehicle dataset and use the resulting weights on a test image.
Before you start
- The cloned repository with its requirements installed
- Vehicle images organized into training, validation and test portions; the README suggests 70%, 20% and 10%
- A dataset.yaml file and a test image
Steps
Run the documented training command: python train.py --img 640 --batch 16 --epochs 50 --data dataset.yaml --weights yolov5m.pt.
Use the resulting weights with the detection script, substituting the actual weights path and test image path as needed; the README example is python detect.py --weights runs/train/exp12/weights/best.pt --source test_images/imtest13.JPG.
Expected outcome
The workflow is intended to produce trained weights and run vehicle detection on a test image.
Guide limitations
- The README does not provide the contents or format of dataset.yaml.
- The example weights path is specific to an example training run; the README does not establish it as the output path for every run.
Sources & review
Source record details
- Source availability
- Active
- Sources checked
- 21 November 2026
- Original website title
- MaryamBoneh/Vehicle-Detection · Official homepage title · retained in its source language

