Giter Site home page Giter Site logo

mrobert3456 / traffic_sign_recognition Goto Github PK

View Code? Open in Web Editor NEW
4.0 2.0 0.0 64.97 MB

Traffic sign detection and recognition using Yolov3 and Convolutional Neural Networks

Python 16.84% Jupyter Notebook 83.16%
neural-network traffic-sign-classification yolov3

traffic_sign_recognition's Introduction

Traffic Sign Recognition

project_video_clip

โš™ How it works

  1. Traffic sign detection using YoloV3, trained with GTSDB dataset using Darknet framework
  2. Traffic sign detection trained with GTSRB dataset using Convolutional Neural Network

For detailed description of how it works, please check out my publication on IEEE: https://ieeexplore.ieee.org/abstract/document/10158539

๐Ÿ“ฆ Installation

This Repository

Download this repository by running:

git clone https://github.com/mrobert3456/Traffic_sign_recognition.git
cd Traffic_sign_recognition

โšก Software Dependencies

This project utilizes the following packages:

To setup the environment,you need to install conda, then run the following commands:

conda env create -f environment.yaml
conda activate GPU_ENV

๐Ÿš€ Usage

Traffic sign recognition

  1. Before you run the preprocessing methods and training, create a folder called GTSRB in the root folder

  2. Download the GTSRB dataset, which contains the following zip files, that you need to unzip in the GTSRB folder:

    • GTSRB_Final_Test_Images.zip
    • GTSRB_Final_Training_Images.zip
  3. Unzip the GTSRB_Final_Test_GT.zip file into the GTSRB/Final_Test/Images folder

  4. In the root folder, create a folder called 'ts'

    • Inside the 'ts' folder create two subfolders 'aug' and 'orig'
      • This is where the preprocessing and the training results will be saved

To run the preprocessing for the GTSRB dataset, just run the following command:

python preprocess_tsr_dataset.py

To create and train the recognition model, run the following jupyter notebook file:

Build_Train_TSR.ipynb

Traffic sign detection

  1. Create a folder called GTSDB under the root folder
  2. Download the GTSDB dataset, unzip the FullIJCNN2013.zip file under the GTSDB folder
  3. To run the preprocess method for the GTSDB dataset, just run the following command:
python prepare_tsd_dataset.py

After the process is finished, the following files will be generated:

  • test.txt
  • train.txt
  • classes.names
  • ts_data.data

The classes.names, ts_data.data, yolov3_ts_test.cfg and the yolov3_ts_train.cfg files needs to be placed under the darknet-master/build/darknet/x64/cfg folder, where you installed the Darknet framework

  • yolov3_ts_test.cfg and the yolov3_ts_train.cfg files can be found under 'ts' folder
  1. Create a 'weights' folder under darknet-master/build/darknet/x64
    • Copy the darknet53.conv.74 file under it

To start the training process run the following command:

darknet.exe detector train cfg\ts_data.data 
cfg\yolov3_ts_train.cfg weights\darknet53.conv.74

The necessary model and weight files can be found here: https://drive.google.com/file/d/1nLjbzzL77rTNSduE5hl7cByP0lgvai2i/view?usp=sharing

These files need to be placed under ts folder

python detect_recogn.py <input_file.mp4> <output_file.mp4>

The output file will be saved as output.mp4

traffic_sign_recognition's People

Contributors

mrobert3456 avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.