All Projects → hoanglehaithanh → Traffic Sign Detection

hoanglehaithanh / Traffic Sign Detection

Licence: mit
Traffic signs detection and classification in real time

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Traffic Sign Detection

Grabcutweb
Full web grabcut example using opencvjs
Stars: ✭ 40 (-58.33%)
Mutual labels:  opencv, image-processing
Catt
Detecting the temperature from an infrared image
Stars: ✭ 60 (-37.5%)
Mutual labels:  opencv, image-processing
Seeds Revised
Implementation of the superpixel algorithm called SEEDS [1].
Stars: ✭ 48 (-50%)
Mutual labels:  opencv, image-processing
Tensorflow object counting api
🚀 The TensorFlow Object Counting API is an open source framework built on top of TensorFlow and Keras that makes it easy to develop object counting systems!
Stars: ✭ 956 (+895.83%)
Mutual labels:  opencv, image-processing
Pyscenedetect
🎥 Python and OpenCV-based scene cut/transition detection program & library.
Stars: ✭ 1,203 (+1153.13%)
Mutual labels:  opencv, image-processing
Graph Based Image Segmentation
Implementation of efficient graph-based image segmentation as proposed by Felzenswalb and Huttenlocher [1] that can be used to generate oversegmentations.
Stars: ✭ 31 (-67.71%)
Mutual labels:  opencv, image-processing
Opencv Face Filters
Snapchat-like Face Filters in OpenCV
Stars: ✭ 51 (-46.87%)
Mutual labels:  opencv, image-processing
Qupath
QuPath - Bioimage analysis & digital pathology
Stars: ✭ 503 (+423.96%)
Mutual labels:  opencv, image-processing
Retina Features
Project for segmentation of blood vessels, microaneurysm and hardexudates in fundus images.
Stars: ✭ 95 (-1.04%)
Mutual labels:  opencv, image-processing
Go Cv
Computer Vision package in pure Go taking advantage of SIMD acceleration
Stars: ✭ 66 (-31.25%)
Mutual labels:  opencv, image-processing
Prlib
Pre-Recognition Library - library with algorithms for improving OCR quality.
Stars: ✭ 18 (-81.25%)
Mutual labels:  opencv, image-processing
The bilateral solver
Fast Bilateral Solver implementation with C++ and demos
Stars: ✭ 87 (-9.37%)
Mutual labels:  opencv, image-processing
Road Detection And Tracking
Involves the OpenCV based C++ implementation to detect and track roads for almost realtime performance
Stars: ✭ 17 (-82.29%)
Mutual labels:  opencv, image-processing
Opencv Tutorials
Tutorials for learning OpenCV in Python from Scratch
Stars: ✭ 36 (-62.5%)
Mutual labels:  opencv, image-processing
Vehicle counting tensorflow
🚘 "MORE THAN VEHICLE COUNTING!" This project provides prediction for speed, color and size of the vehicles with TensorFlow Object Counting API.
Stars: ✭ 582 (+506.25%)
Mutual labels:  opencv, image-processing
Facer
Simple (🤞) face averaging (🙂) in Python (🐍)
Stars: ✭ 49 (-48.96%)
Mutual labels:  opencv, image-processing
Caer
High-performance Vision library in Python. Scale your research, not boilerplate.
Stars: ✭ 452 (+370.83%)
Mutual labels:  opencv, image-processing
Tiler
Tiler is a tool to create an image using all kinds of other smaller images (tiles). It is different from other mosaic tools since it can adapt to tiles with multiple shapes and sizes (i.e. not limited to squares).
Stars: ✭ 4,681 (+4776.04%)
Mutual labels:  opencv, image-processing
Colorfilters
Image thresholding in multiple colorspaces.
Stars: ✭ 60 (-37.5%)
Mutual labels:  opencv, image-processing
Litiv
C++ implementation pool for computer vision R&D projects.
Stars: ✭ 82 (-14.58%)
Mutual labels:  opencv, image-processing

Traffic signs detection and classification in real time

A new version using SSD will be released this summer for anyone need higher accuracy detection method. Stay tuned for new update!

1. Description

This project is a traffic signs detection and classification system on videos using OpenCV. The detection phase uses Image Processing techniques that create contours on each video frame and find all ellipses or circles among those contours. They are marked as candidates for traffic signs.

Detection strategy:

  1. Increase the contrast and dynamic range of the video frame
  2. Remove unnecessary colors like green with HSV Color range
  3. Use Laplacian of Gaussian to display border of objects
  4. Make contours by Binarization.
  5. Detect ellipse-like and circle-like contours

In the next phase - classification phase, a list of images are created by cropping from the original frame based on candidates' coordinate. A pre-trained SVM model will classify these images to find out which type of traffic sign they are.

Currently supported traffic signs (The name of each sign's file is corresponding to their class in SVM): Note:

  • All signs which belong to class 8 and above are marked as OTHERS because a competition requires this. There is also a class 0 which are marked as non-traffic-sign
  • Only the biggest sign in the current frame is cropped and classified

The SVM Model is trained each time the main.py called, before the detection phase but I still save the model in data_svm.dat to implement the model-reload function in the future to avoid retraining phase.

If a traffic sign is detected, it will be tracked until it disappears or there is another bigger sign in the frame. The tracking method is Dense Optical Flow.

2. Prerequisites:

  • Python 3.5
  • OpenCV3
  • Imutils (usepip3 install imutils to install)

3. System structure

a. There are 3 python files as 3 modules:

Other files:

b. Dataset

The Dataset folder contains images for training SVM models. There are 12 folders contains cropped images of traffic signs. Each folder is named as the class of the traffic signs it contains. The special 0 folder contains non-traffic-sign cropped images which can be recognized as traffic signs in the detection phase. Wrong detected traffic signs

The dataset is created by applying the detection phase on many videos with various parameters to mark all traffic signs and then manually separating them into their right classes.

Each time run the program, the dataset can be updated by checking all generated cropped images of detected traffic signs, then find all misclassified traffic signs.

4. Installation

There are two ways of running the program:

Use default arguments:

$python3 main.py

Use custom arguments:

$python3 main.py
optional arguments:
  -h, --help            show this help message and exit
  --file_name FILE_NAME
                        Video to be analyzed
  --min_size_components MIN_SIZE_COMPONENTS
                        Min size component to be reserved
  --similitary_contour_with_circle SIMILITARY_CONTOUR_WITH_CIRCLE
                        Similarly to a circle

5. Result

6. Disadvantages

  • Static image processing, this means parameters must be updated for each video with different lighting conditions
  • The accuracy of the detection phase is not high, still, miss signs or detect wrong areas.
  • The dataset is a little bit overfitting for classification phase.

7. Future developments

  • Better performance with higher framerate
  • Use other approaches like YOLO or SSD
  • Dynamic image processing
  • Use CNN to classification
  • No need to retrain the model when running the program
  • Make a bigger dataset

8. License

MIT License © 2018 Hoàng Lê Hải Thanh (Thanh Hoang Le Hai) aka GhostBB

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].