Skip to content

In this project we are going to create a simple perception stack for self-driving cars (SDCs.). Our only data source will be video streams from cameras for simplicity. We’re mainly going to be analyzing the road ahead, detecting the lane lines, detecting other cars/agents on the road, and estimating some useful information that may help other SD…

Notifications You must be signed in to change notification settings

ahmedalycess/Simple-Perception-Stack-for-Self-Driving-Cars

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

54 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simple-Perception-Stack-for-Self-Driving-Cars

In this project we are going to create a simple perception stack for self-driving cars (SDCs.). Our only data source will be video streams from cameras for simplicity. We’re mainly going to be analyzing the road ahead, detecting the lane lines, detecting other cars/agents on the road, and estimating some useful information that may help other SDCs stacks.

How to run the code:

After cloning the repositery and adding test images/videos in their directory

run script.sh

  • Type either 1 for lane detection or 2 for lane and car detection start

Part 1 (input 1 -> lane detection)

  • Select either 1 for image or 2 for video input lane photo or vid

Lane notebook (input 1 -> image):

  • Choose photo from directory and set DEBUGGING_MODE to either true or false lane image selection
Output (if DEBUGGING_MODE = True):
  • original image: orig

  • Region of interest: roi

  • Applied thresholding to region of interest then transformed the image to birdeye view transformed_img

  • Warped binary image and histogram of intensity of white pixels in the image histogram

  • Using sliding windows technique, we can detect White Pixel in the warped image then we apply polynomial best-fit line through the pixels. sliding_win

  • Filling the lane lines in the search window fill_line

  • Overlaying the lane lines with red and blue and the lane with green overlayed_lane

  • last step we calculate center offset and the road curvature radius center_pos_and_curve_rad

  • A new directoy should be created called 'output images' and the output image should be saved automatically to this directory test1_thresholded

  • Finally we can repeat the process using anyother image in the test_images directory and if you want to quit you can simply type 'q' shell_4

Lane_video notebook (input: Video):

  • Run script.sh and select video instead

  • Choose video from test_videos directory lane video selection

  • The output is a video with overlayed lane lines with red and blue colors and the lane itself with green color output_saved_video

  • The output video should be saved in output_videos directory.

Link to output video: https://drive.google.com/drive/folders/17ZdWBvtGSpbW7l-AJb6H5U5nit9g6d_m?usp=sharing

Part 2 (input 2 -> lane and car detection)

Before running this code you will need to download yolov3.cfg, yolov3.weights, and coco.names then put them in 'part1' directory

  • Select either 1 for image or 2 for video input

YOLO_object_detection notebook (input 1 -> image):

  • Choose image from directory

lane  and car image

Output:

  • original image:

orig

  • Lane detected image

lane_detected_image

  • Final image:

result

  • Result image is stored in the output_images directory

YOLO_object_detection_video notebook (input 2 -> video):

  • Choose video from directory

car detection video

Output:

  • Result image is stored in the output_videos directory

output video

Link to output video: https://drive.google.com/drive/folders/17ZdWBvtGSpbW7l-AJb6H5U5nit9g6d_m?usp=sharing

About

In this project we are going to create a simple perception stack for self-driving cars (SDCs.). Our only data source will be video streams from cameras for simplicity. We’re mainly going to be analyzing the road ahead, detecting the lane lines, detecting other cars/agents on the road, and estimating some useful information that may help other SD…

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published