Giter VIP home page Giter VIP logo

lanerecognition's Introduction

Algorithms for automotive lane markings recognition

Deployment and sample data

Environment

It is recommended to use a virtual Python environment - created with e. g. Conda.

chmod +x install_dependencies.sh && ./install_dependencies.sh

List of methods

1D-Line fitting to edge detection results under triangular mask

Exemplary lane recognition algorithm results 001

Inside one frame (image) on a video stream, lanes are detected via edges. Thus, this algorithm depends on visible lane markings. By discarding short edges and averaging all kept edge positions, a 1D-polynomial fit (line) is used to determine slope and position of a single, averaged edge.

Based on both line parameters, the edge's length is increased from the lower horizontal image border to the image's vanishing point. To exclude long but irrelevant edges surrounding the actual lane, the area between the lower image boundary and the vanishing points is masked.

A triangular mask excludes everything outside this region of interest (ROI). Inside the ROI, the approach is applied as described above. Furthermore, general filter techniques like gradient limitation and sliding average considering the line parameters where used.

Warped image edge detection and windowed 2D-polynomial fit

Exemplary lane recognition algorithm results 002

Inspired by Ross Kippenbrock.

As well as in the first method, Canny edge detection is applied to the image. In addition, a color filter is applied to the results. Thus, only bright image parts yielding edges are taken into consideration. The edges are represented by gray or white pixels while any other image parts are black.

The resulting image is warped (a perspective transformation is performed) and hence, the lane can be regarded from bird's-eye-view within the original image boundaries. By this method, bright lane markings are now aligned vertically along the image. This algorithm does not work without visible lane markings.

Along the image width, non-black image points are counted vertically resulting in a brightness histogram. The maximum of the histogram values in each image half is, in theory, the center of a lane marking. Rectangular masks are then applied onto the image on both sides, left and right, to reduce the image to the lane marking areas. Since this algorithm was designed with curved roads in mind, the rectangular mask is vertically separated into so-called windows. Each individual window is shifted to the current lane marking center along the image height for higher accuracy.

In each window, bright image points are considered and their coordinates are stored. As a result, a set of point coordinates in x and y for each lane marking, left and right, can be used to fit a 2D-polynomial along the lane marking. Between the fitted lane data plots, a polygon is spanned to denote the lane. Finally, the perspective transformation is inverted again to recover the actual traffic scene.

Post-processed convolutional neural network with Encoder-Decoder architecture

Exemplary lane recognition algorithm results 003

Inspired by Michael Virgo.

Based on an input dataset, a convolutional neural network is trained. Therefore, Keras is used due to its simple network architecture definition methods. The structure is almost symmetric, contains several dropouts and is purely convolutional. Based on a different training set, it is also possible to not only learn the position of the ego-lane but so segment the image partly and separate all lane areas.

lanerecognition's People

Contributors

rwschubert avatar

Stargazers

JAGADEESH 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.