Pairing Lane Detection with Object Detection

Motivation:

Lane Detection Pipeline

  • Calibrate the camera using a chess/checkerboard to prevent distortion.
  • Apply a distortion correction to these images.
  • Use colour transforms to create a binary image.
  • Apply a perspective transform to get a “birds-eye view”
  • Detect lane pixels and fit to find the lane boundary.
  • Determine the curvature of the lane and vehicle position with respect to the center.
  • Output visual display of the lane boundaries and numerical estimation of lane curvature and vehicle position.

Calibrate the camera using a chess/checkerboard to prevent distortion.

Input, raw image of the camera taking a picture of a chessboard.
Here’s how the camera looks after we undistort it.
Input image
Output image, after undistortion

Creating a binary image using advanced colour transformation techniques

Perspective transformation — getting that bird's eye view

Input image
Trapezoidal image

The fun part — Lane Line Detection

Input image
We’ve gotten some really smooth, beautiful lines!!

Boom! Lane Detection

Part 2: Object Detection

  • Preprocess the data and extract the features from it
  • Build an AI model that can detect cars vs not a car
  • Create a sliding window algorithm that’ll slide across the image and make predictions
  • Create a heatmap for false positives
  • Limit the false positives by merging them into 1 collective prediction
  • Merge them all together and get our final object detection pipeline!

Data preprocessing

Building an AI model that can detect cars

Creating a sliding window for object detection

Credit: Udacity
Examples of car detection given this input image

False positives

Obviously, there is room for improvement but not bad!

The final part: Putting this all together

--

--

--

Building Self-Driving Cars as a 15yo. srianumakonda.com

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

2 Things You Need To Know About Multi-armed Bandit — a gentle touch on Beta and Thompson

Implementation of DQN,Double DQN and Dueling DQN with keras-rl 2020

Two techniques you need to know to handle imbalance data

Automating Breast Cancer Detection with Deep Learning

10 lessons from Machine Learning in a start-up

Understanding a TensorFlow program in simple steps.

What Is A Decision Tree Algorithm?

Shuffling an out of box large data file in python

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Sri Anumakonda

Sri Anumakonda

Building Self-Driving Cars as a 15yo. srianumakonda.com

More from Medium

Show, Attend and Tell

Face Detection

Lets use Active Learning to train YoloV5 on Autonomous driving data.

Computer Vision — Making the machines see