Giter Site home page Giter Site logo

sezan92 / carnd-advanced-lane-lines Goto Github PK

View Code? Open in Web Editor NEW
7.0 2.0 0.0 145.76 MB

Advanced Lane Detection

License: MIT License

Shell 0.01% Jupyter Notebook 99.61% Python 0.38%
autonomous-vehicles self-driving-car udacity-nanodegree udacity-self-driving-car

carnd-advanced-lane-lines's Introduction

Advanced Lane Finding

Udacity - Self-Driving Car NanoDegree Lanes Image

HOW TO USE

1. Camera Calibration

python src/camera.py --cal_img_dir /path/to/calibration/chessboard/images --calibration_output_dir /path/to/directory/to/store/calibrated/images

more arguments

--input_img, input image to undistort
--output_dir, directory to save undistorted image
--cfg_filename, camera configuration file name

2. Perspective Transform

After calibrating the camera, we need to get the perspective transform of the road. This script helps us getting the transformation , and inverse transformation matrix.

python src/perspective_transform.py --image /path/to/image --cfg_filename /path/to/configuratio/file/to/save/configuration --camera_cfg_filename /path/to/camera/configuration/file

more arguments:

--threshold, threshold for perspective transformation. default: 400
--plot, to plot or not to plot.

3. Binary Transform

After transforming the perspective, we have to get tune the binary thresholds. So that we can get the binary images.

python  src/binary_transform.py --image_dir /path/to/images/to/get/binary/thresholds --cfg_filename /path/to/binary/threshold/configuration/file --camera_cfg_file /path/to/camera/configuration/file --pt_cfg_filename /path/to/perspective/transform/configuration/file 

more argument:

--img_size, image size, default: 720,1280

4. Lane Detection

After getting all the configuration files, i.e. Camera Calibration, Perspective Transformation, and Binary transformation , it is time to detect the lane.

From Directory of images

python src/lane_detection.py --input test_images --camera_cfg_filename config/camera_config.yaml --pt_cfg_filename config/pt_config.yaml --binary_cfg_filename config/camera_config.yaml --img_size 720 1280

It will save the output images in test_images/lane_detected folder detected image

From Video

python src/lane_detection.py --input project_video.mp4 --camera_cfg_filename config/camera_config.yaml --pt_cfg_filename config/pt_config.yaml --binary_cfg_filename config/camera_config.yaml --img_size 720 1280

Video Link

It will save the output video as project_video_output.avi .

Notebook

I have also written Notebook on this project. That is available here

TODO:

  • Tune more to get better results
  • Work on Challenge Videos
  • Make a Docker environment
  • Refactor
  • Make a package
  • Refactor test scripts

carnd-advanced-lane-lines's People

Contributors

baumanab avatar brok-bucholtz avatar citlaligm avatar harveenchadha avatar mreichelt avatar mvirgo avatar ryan-keenan avatar sezan92 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

carnd-advanced-lane-lines's Issues

TODO

  • Sobel Y
  • Combine Gradients

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.