This project requires Python 3.10
or above.
- Create a virtual environment
python3 -m venv .venv
- Activate the environment
source ./.venv/bin/activate
- Install packages
pip install -r requirements.txt
- Run the following command to download the dataset.
python3 download_dataset.py
- You can see the visualization of sample images from the dataset by running the following command
python3 plot_dataset.py
Run the following commands to train each model
# Nano model
python3 train_nano.py
# Small model
python3 train_small.py
# Medium model
python3 train_medium.py
Run the following command to evaluate the model
python3 model_evaluation.py
General command:
python3 process_video.py --input <path/to/input/file> --model <path/to/model> --output <path/to/output/folder>
Example usages:
# Yolov11 nano model
python3 process_video.py --input video_input/warsaw.mp4 --model runs/detect/yolo11n_b64_e50/weights/bests.pt
# Yolov11 small model
python3 process_video.py --input video_input/warsaw.mp4 --model runs/detect/yolo11s_b32_e50/weights/best.pt
# Yolov11 medium model
python3 process_video.py --input video_input/warsaw.mp4 --model runs/detect/yolo11m_b16_e50/weights/best.pt
General command:
python3 process_camera.py --model <path/to/model>
Example usages:
# Yolov11 nano model
python3 process_camera.py --model runs/detect/yolo11n_b64_e50/weights/best.pt
# Yolov11 small model
python3 process_camera.py --model runs/detect/yolo11s_b32_e50/weights/best.pt
# Yolov11 medium model
python3 process_camera.py --model runs/detect/yolo11m_b16_e50/weights/best.pt