GithubHelp home page GithubHelp logo

yuhao000 / speedsignrecognition Goto Github PK

View Code? Open in Web Editor NEW

This project forked from galme/speedsignrecognition

0.0 1.0 0.0 78.32 MB

Speed traffic sign (+ complementary board) detection and recognition algorithm

License: GNU General Public License v3.0

C++ 100.00%

speedsignrecognition's Introduction

SpeedSignRecognition

Speed traffic sign (+ complementary board) detection and recognition algorithm

Uses:

  • C++
  • OpenCV 3.2

Algorithm:

  1. Canny edge detection
  2. Ellipse detection with conditions:
    • valid size
    • x, y axis comparison
    • ellipse, contour comparison
  3. Ellipse interior rectification (using affine transform)
  4. Number detection using a NN + filtering:
    • size filtering
    • gibberish NN result filtering
  5. Complementary board detection and rectification under the speed sign:
    • aproximation of contours with polygons
    • finding proper 4 point polygons
    • rectification
  6. Cropping of the speed sign and its complementary board(s), printing of detected speed limit

There's also a "backup" procedure doing dilation on Canny edges, which works when the sign is quite close to the camera but the picture quality is bad.

NN:

The NN was trained on digits from The Chars74K dataset by T. de Campos, with 1016 samples per digit (total of 10160 samples). Accuracy on the learning dataset was 99.94 %.

Topology:

  • layer 1: 784 neurons (28x28 img size)
  • layer 2: 160 neurons
  • layer 3: 10 neurons (10 output digits)

Performance:

On a i7 4700MQ, processing for 1 frame requires 9-23 ms for video with downsizing to 1000xN or Nx1000, where N <= 1000.

The real-life speed limit detection accuracy is quite good.

Output example:

input image:

input image

output image:

output image

Detected speed limit: 30

speedsignrecognition's People

Contributors

galme avatar

Watchers

 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.