Advanced Lane Finding Project for Self-Driving Car ND
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


Advanced Lane Finding Project for Self-Driving Car ND

Udacity - Self-Driving Car NanoDegree

Video output

The goal of this project is to write a software pipeline to identify the lane boundaries in a video.

The Project

The goals / steps of this project are the following:

  • Compute the camera calibration matrix and distortion coefficients given a set of chessboard images.
  • Apply a distortion correction to raw images.
  • Use color transforms, gradients, etc., to create a thresholded binary image.
  • Apply a perspective transform to rectify binary image ("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 center.
  • Warp the detected lane boundaries back onto the original image.
  • Output visual display of the lane boundaries and numerical estimation of lane curvature and vehicle position.

The images for camera calibration are stored in the folder called camera_cal. The images in test_images are for testing your pipeline on single frames.

Some examples of the output from each stage of the pipeline can be found in the folder called images_output.


Starting to work on this project consists of the following steps:

  1. Install miniconda on your computer
  2. Create a new conda environment using this project
  3. Each time you wish to work, activate your conda environment
  4. Launch python


Download the latest version of miniconda that matches your system.

NOTE: There have been reports of issues creating an environment using miniconda v4.3.13. If it gives you issues try versions 4.3.11 or 4.2.12 from here.

Linux Mac Windows
64-bit 64-bit (bash installer) 64-bit (bash installer) 64-bit (exe installer)
32-bit 32-bit (bash installer) 32-bit (exe installer)

Install miniconda on your machine. Detailed instructions:

Clone the project:

git clone
cd CarND-Advanced-Lane-Lines

Setup your carnd environment.

If you are on Windows, rename meta_windows_patch.yml to meta.yml

Create carnd. Running this command will create a new conda environment that is provisioned with all libraries you need to be successful in this program.

conda env create -f environment.yml

Note: Some Mac users have reported issues installing TensorFlow using this method. The cause is unknown but seems to be related to pip. For the time being, we recommend opening environment.yml in a text editor and swapping

    - tensorflow==0.12.1



Verify that the carnd environment was created in your environments:

conda info --envs

Cleanup downloaded libraries (remove tarballs, zip files, etc):

conda clean -tp


To uninstall the environment:

conda env remove -n carnd


Now that you have created an environment, in order to use it, you will need to activate the environment. This must be done each time you begin a new working session i.e. open a new terminal window.

Activate the carnd environment:

OS X and Linux

$ source activate carnd


Depending on shell either:

$ source activate carnd


$ activate carnd

Now all of the carnd libraries are available to you.

Launch the main python file:

$ python

That's it.

Questions or Feedback

Contact me anytime for anything about my projects or machine learning in general. I'd be happy to help you 😉