Skip to content

erminkev1/road-object-detection-using-yolov4

 
 

Repository files navigation

Road Object Detection Using YOLOv4

Project Status: Active – The project has reached a stable, usable state and is being actively developed. Open In Colab

The goal of this project is to detect Road Objects using YOLOv4. The network is trained on Berkley DeepDrive Dataset.

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.

Important: The videos, images and the labels are only used for educational, research and not-for-profit purposes.

Requirements

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)

Installation Guide

To install the anaconda environment, navigate to the repository folder, and run the following command in the terminal:

$conda env create -f environment.yml

Execution Guide

  1. Train the YOLOv4 network in the Conda environment using by the following the instructions here.

  2. Test the YOLOv4 network in the Conda environment using by the following the instructions here.

Training the YOLOv4 network

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

Testing the YOLOv4 network

Testing on an image

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.

Testing on a video

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.

Clean-up Guide

To remove the anaconda environment, navigate to the repository folder, and run the following command in the terminal:

$conda remove --name yolo --all

Authors

  • Sourab Bapu Sridhar

Acknowledgements

This project is inspired from the BDD100k-YOLOV3-tiny project.

License

This project is released under the terms of MIT License.

About

Design and implementation of road object detection using Yolov4.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%