The goal of this project is to detect Road Objects using YOLOv4. The network is trained on Berkley DeepDrive Dataset.
Berkley DeepDrive Dataset [Link]:
The Berkely DeepDrive Dataset is a dataset for evaluating image recognition algorithms' exciting progress on autonomous driving. The dataset possesses geographic, environmental, and weather diversity, which is useful for training models that are less likely to be surprised by new conditions. The dataset is the largest driving video dataset with 100K videos and 10 tasks. The video sequences also include GPS locations, IMU data, and timestamps. The 2D Bounding Boxes are annotated on the images for bus, traffic light, traffic sign, person, bike, truck, motor, car, train, and rider.
- Full Dataset and Annotations: https://bdd-data.berkeley.edu/index.html#download-section
Important: The videos, images and the labels are only used for educational, research and not-for-profit purposes.
The code is based on Python3 (>=3.8) and only supports GPU. There are a few dependencies to run the code. The major libraries are listed as follows:
- OpenCV (>=4.5)
To install the anaconda environment, navigate to the repository folder, and run the following command in the terminal:
$conda env create -f environment.yml
-
Train the YOLOv4 network in the Conda environment using by the following the instructions here.
-
Test the YOLOv4 network in the Conda environment using by the following the instructions here.
To train the YOLOv4 network on the Berkley DeepDrive dataset in the Conda environment, please update the paths and flags in the script train.sh
and run the following command in the terminal:
$bash train.sh
To test the YOLOv4 network on an image in the Conda environment, please update the paths and flags in the script test_image.sh
and run the following command in the terminal:
$bash test_image.sh
The output image would be generated in the output
folder.
To test the YOLOv4 network on a video in the Conda environment, please update the paths and flags in the script test_video.sh
and run the following command in the terminal:
$bash test_video.sh
The output video would be generated in the output
folder.
To remove the anaconda environment, navigate to the repository folder, and run the following command in the terminal:
$conda remove --name yolo --all
- Sourab Bapu Sridhar
This project is inspired from the BDD100k-YOLOV3-tiny project.
This project is released under the terms of MIT License.