Lane Detection Project Report
Lane Detection Project Report
Lane Detection Project Report
Your Name
Your Company
1
Abstract
This research proposes a novel method of accurate and robust lane detection in adverse
conditions such as low lighting at night and snowy roads that are partly covered. We collect
a data set of images where each clear image has corresponding images in adverse
circumstances. For example if we have an image of a road at day, we also have a
corresponding image of the same portion of the road from the same perspective at night
time. This data set is collected using a realistic open world virtual simulation. In the first
step; Computer Vision techniques are applied on images of roads with prominent lane lines
to get lane boundary coordinates. Then we use these output coordinates in combination
with the corresponding images in adverse conditions to train a Convolutional Neural
Network. Once trained the CNN will be able to detect lanes accurately in adverse
conditions.
Introduction
Need
Lane detection is present in almost all modern vehicles and is an indispensable part of
today’s semi-automatic vehicles. It is also quintessential in development of self-driving
vehicles. In today’s vehicle’s lane detection is used as a warning system to notify the driver
when they are about to get into a dangerous predicament, such as, if they fall asleep or
simply not paying attention to the road ahead.
In semi-automatic vehicles it can be a great tool for safety and path planning. In terms of
safety, it allows the vehicle to determine the safe zone where it should lie in while driving
and behave in a manner in which it is less likely to collide with other vehicles. The lanes also
guide the planning algorithm of the vehicle, allowing it localize itself on the road and
helping it make decisions about overtaking other vehicles or staying in one’s own lane.
In order to improve performance of current systems and get closer to level 5 autonomous
vehicles lane detection needs to be flawless. In that direction we have seen that deep
learning algorithms although require a lot of training data at first but when trained have
show superhuman results on image recognition problems. We want to apply these same
algorithms to the domain of detecting lanes, and in order to overcome the problem of
getting data, we have devised a process for generating labeled images with a diverse range
of scenarios on roads with lane markings.
2
We are confident that this data is enough to make a highly robust system which can detect
lanes accurately in a broad range of weather and road wear.
Goals
The goals of the project will focus on producing efficient solutions for robust lane detection
in adverse conditions using combined techniques of computer vision and deep learning in
tensorflow/ OpenCV. The objectives will be:
1. Collection of data from GTA-V Desktop Game in two forms with same perspective: 1)
Normal Sunny conditions and 2) Adverse conditions.
2. Refinement of the produced data to convert it into standard data-set for testing of
lane algorithms.
3. Detection of lanes in two forms of data-sets using well known lane detection
algorithms used for standard detection of lanes.
4. Detection of lanes in two forms of data-set using deep learning algorithm for lane
detection.
5. Calculation of mean-squared error using the results from the step 2 and 3 and
determination of accuracy of detected lanes in deep learning model. Afterwards,
these result are compared other state of the art lane detection systems.
Literature Review
[1] Robust Lane Detection Based On Convolutional Neural Network and Random
Sample Consensus, [Jihun Kim, Minho Lee, Neural Information Processing. ICONIP
2014]
Random sample consensus is combined with CNN's to get a robust way of detecting lanes
lines. First edges are extracted from the image and then if the road scene is simple only the
RANSAC algorithm is applied but if it is complex than a CNN is applied before and after
doing RANSAC.
[2] DeepLanes: End-To-End Lane Position Estimation using Deep Neural Networks
[Alexandru Gurghian, Tejaswi Koduri, Smita V. Bailur, Kyle J. Carey, Vidya N. Murali
Ford Research and Innovation Center, July 2016]
This research proposes a deep learning approach for lane detection. Camera setup is
different from traditional front camera behind the windscreen. Instead two lateral cameras
are mounted on the side of the car:
3
Each image from the side camera is split into rows and the row which is closest to the
bottom (closest to the car) is considered as the correct estimation. The problem is setup as
a classification problem where we classify each row from the image, (y1, y2, y3, ….y316
where yk is the probability for the kth being the row containing the lane line), as either the
lane or not lane. The network is give a 240x360x3 image as an input and it gives out
softmax probabilities for each row of the image as an output. Images containing no lane
markings are classified to a default class.
Fig 2: The label ti ∈ [0, . . . , 316] for image Xi corresponds to the row with the pixel of the lane marking
that is closest to the bottom border of the image. The arrows point to the image row containing the border
of the marking facing the car.
[3] Deep Learning Lane Detection for Autonomous Vehicle Localization [Joel
Pazhayampallil Kai Yuan Kuan December 13, 2013]
This research discusses a methodology for using lane detection and GPS estimations to
make a high accuracy map of Roads. Basically the lane data, High Accuracy GPS data of the
current position of the vehicle and data from the internal sensor of the vehicle are fused to
create a high accuracy map of a road.
4
[4] Lane Estimation for Autonomous Vehicles using Vision and LIDAR by [Albert S.
Huang February 2010]
This is a comparison research of different researches in lane detection methods and their
pros and cons. Various conditions are considered such as bad lighting, rain, snow, e.t.c.
[6] Real time Detection of Lane Markers in Urban Streets [Mohamed Aly
Computational Vision Lab Electrical Engineering California Institute of Technology]
[7] Z.Kim, "Robust lane detection and tracking in challenging scenarios," IEEE Trans.
Intell. Transp. Syst. , [vol. 9, no. 1, pp] [16-26, Mar. 2008]
Lane regions are Identified using gradient detector and intensity bump detector. Then
Artificial Neural Networks are applied to these regions to detect lane pixels and then
RANSAC algorithm is used to get the lane curve.
A hierarchical approach is used for robust detection of lanes first of all the road image is
classified into two different types; structured roads and unstructured roads. Structured
roads have obvious lane markings while unstructured roads don’t have obvious lane
markings or lane boundaries. For structured roads, edge/intensity based lane detection
techniques are used, while for unstructured roads color/texture based methods are
employed.
[9] ROBUST LANE DETECTION AND TRACKING WITH RANSAC AND KALMAN FILTER
Amol Borkar, [Monson Hayes Center for Signal and Image Processing (CSIP) Georgia
Institute of Technology Atlanta, Mark T. Smith Institute for Till]
5
Bird's eye view of the road is taken using a perspective transform. Hough Transform and
random sample consensus are used to detect lane and Kalman filter is used to smoothly
detect lanes over multiple frames.
[11] A.Borkar, M. Hayes, M. Smith, and S. Pankanti, "A layered approach to robust
lane detection at night," in [Proc. IEEE Workshop Comput. Intell. Vehicles Veh. Syst.,
2009]
First a region of interest is defined in the Image and sky and other irrelevant regions are
ignored. Then in the next step the image is converted to grayscale. Temporal blurring is
used to elongate dashed lines. Then adaptive thresholding is used to extract bright object
and Hough Transform is used to extract lines. Finally a Gaussian kernel is used to define
lane lines.
[12] G.Liu, F.Wörgötter, and I.Markeli´c, "Combining statistical hough transform and
particle filter for robust lane detection and tracking," in [Proc. IEEE IV, Jun. 2010]
Perspective is mapped to a different one. Properties such as color, position, gradient are
used to detect lane markers. Then various other techniques such as Statistical Hough
Transform, Sobel Edge extraction and Particle Filters are used to extract lines.
[13] A.Borkar, M.Hayes, and M.T.Smith, "Polar randomized hough transform for lane
detection using loose constraints of parallel lines." Acoustics, Speech and Signal
Processing (ICASSP), [2011 IEEE International Conference on. IEEE, 2011]
Takes into consideration the parallel nature of lane lines. Top View of road is obtained
using IPM(Inverse perspective mapping). Polar Randomized Hough Transform is used to
detect lines and their parallel nature is verified. A tolerance window is incorporated for
loosening the parallel constraint slightly.
[14] T.T. Tran, H.M.Cho, S.B.Cho, "A robust method for detecting lane boundary in
challenging scenes." [Information Technology Journal 2011]
6
Region of Interest is defined in the lower region of the image where the road lies. Then, this
algorithm uses Canny Edge Detector and then applies random selection
consensus(RANSAC) to detect lane lines.
Vanishing point of the road is detected based on the Gabor Texture analysis. After
vanishing point is obtained the width and orientation of the lane is estimated. Road
boundaries are detected using Canny Edge Detection and Hough Transform. Multiple lane
model are compared to the the obtained boundaries and the one with the most votes is
selected.
[16] P.Daigavane and P. Bajaj, "Road Lane Detection with Improved Canny Edges
Using Ant Colony Optimization," in [3rd International Conference on Emerging Trends
in Engineering and Technology International Journal of Computer Science &
Information Technology (IJCSIT) 2015]
[17] C.Guo, S.Mita, and D.McAllester, "Lane detection and tracking in challenging
environments based on a weighted graph and integrated cues," in [Proc. Int. Conf. on
IEEE/RSJ Intelligent Robots and Systems,Taipei, Taiwan, Oct. 2010]
[18] Y.-C. Leng and C.-L. Chen, "Vision-based lane departure detection system in
urban traffic scenes," in [Control Automation Robotics Vision (ICARCV ), 2010]
[19] R.Gopalan, T.Hong, M.Shneier, and R. Chellappa, "A Learning Approach Towards
Detection and Tracking of Lane Markings," [Intelligent Transportation Systems, IEEE,
2012]
Lane detection is done using a learning approach. It is treated as a classification problem
where each block falls in one of two classes. “Lane” and “Non-Lane”. A pixel hierarchy based
descriptor is used to analyse features such as intensity, edges, patterns and textures on the
region surrounding each pixel. For tracking lane markings in several frames, a particle filter
is used.
[20] G.Liu, F.Wörgötter, and I.Markeli´c, "Stochastic Lane Shape Estimation Using
Local Image Descriptors," [IEEE Transactions on Intelligent Transportation Systems
2013]
[21] H.Jung, J. Min, and J.Kim,"An efficient lane detection algorithm for lane departure
detection," In [Intelligent Vehicles Symposium (IV ), 2013]
[22] M.Tan, B. Paula, and C.R.Jung, "Real-time detection and classification of road lane
markings," [In Graphics, Patterns and Images (SIBGRAPI), 2013 IEEE]
[23] S.C.Tsai, B.Y.Huang, Y.H.Lin, C. W. Lin, C. S. Tseng, and J. H. Wang, "Novel
boundary determination algorithm for lane detection," [In Connected Vehicles and
Expo (ICCVE), 2013 IEEE International Conference]
A Sobel filter is used for find the local gradient direction. Histograms of oriented gradients
are used to detect the highest gradient which is used are gradient for that section of the
image. (2 citations)
Most of the rest of the researches discussed in this paper [3] are image processing based
techniques with similar methodologies as discussed earlier. In order to it brief we have
avoided to mention their details.
8
[25] Zhao, H., Teng, Z., Kim, H.H., and Kang, D. J. , "Annealed Particle Filter Algorithm
Used for Lane Detection and Tracking." [Journal of Automation and Control
Engineering 2013]
[26] U.Ozgunalp, and N.Dahnoun, "Robust lane detection and tracking based on novel
feature extraction and lane categorization," [In Acoustics, Speech and Signal
Processing (ICASSP) International Conference, IEEE, 2014]
[27] Y.Li, A.Iqbal, and N.R.Gans, “Multiple lane boundary detection using a
combination of low-level image features.” [In Intelligent Transportation Systems
(ITSC), 2014 IEEE 17th International Conference. IEEE, 2014]
[28] V.S.Bottazzi, P.V.Borges, B.Stantic,“Adaptive regions of interest based on HSV
histograms for lane marks detection.” [In Robot Intelligence Technology and
Applications.Springer International Publishing, 2014]
[29] J.Wang, T.Mei, B. Kong, and H.Wei, “An approach of lane detection based on
Inverse Perspective Mapping,” [In Intelligent Transportation Systems (ITSC), 2014 IEEE
17th International Conference]
[30] H.Tan, Y. Zhou, Y.Zhu, D.Yao, and K. Li, “A novel curve lane detection based on
Improved River Flow and RANSAC,” [In Intelligent Transportation Systems (ITSC), 2014
IEEE 17th International Conference]
[31] An Adaptive Method for Detecting Lane Boundary in [Night Scene Trung-Thien
Tra , Jin-Ho Son , Byung-Jae Uk , Jeong-Hwa Lee , and Hyo-Moon Cho]
9
Working
The scope of the project covers tools of OpenCV and TensorFlow to design a deep learning
model for detection of lanes on a road in highly adverse conditions with high accuracy. To
determine the results, the project was completed in five major steps.
2) Refinement of Data
The data generated in step 1 is then refined by cutting unnecessary frames
and parallel streams of images with favourable and adverse road conditions are
made. In these parallel streams a set of images with multiple environmental
conditions has lanes at the exact same position. The streams are optimized such
that each set has one image on which a computer vision lane detection algorithm
can be used for labelling and others are of adverse nature where current computer
vision algorithms would fail.
10
- Perspective Transform:
All the images are captured from a dash cam view but the ideal situation for
our computer vision algorithm is a top view of lanes, so in order get that we
apply a perspective transform to the images in order to get a bird’s eye view
of the road.
- Emphasizing Lane Lines:
Using a combination of color and gradient threshold we get a binarized
image where lanes are emphasized and rest of the image is faded out.
11
- Detecting the Lane Pixels:
Using Histogram on vertical levels of the image, I find the maximum
values in the Histogram and define a region around them and consider those
pixels to be lanes.
Afterwards a 2nd order polynomial is fit through the left and right lane points
to get the estimated lanes.
12
The curvature of the lanes is found by calculating the radius of curvature
from the two polynomials.
An in detail explanation of this algorithm with accompanying code is
available on github.
14
Code
https://github.com/usmanwardag/bad_lanes