Git Product home page Git Product logo

carnd-lanelines-p1's Introduction

Finding Lane Lines on the Road

Udacity - Self-Driving Car NanoDegree

Combined Image

Overview

When we drive, we use our eyes to decide where to go. The lines on the road that show us where the lanes are act as our constant reference for where to steer the vehicle. Naturally, one of the first things we would like to do in developing a self-driving car is to automatically detect lane lines using an algorithm.

In this project you will detect lane lines in images using Python and OpenCV. OpenCV means "Open-Source Computer Vision", which is a package that has many useful tools for analyzing images.

To complete the project, two files will be submitted: a file containing project code and a file containing a brief write up explaining your solution. We have included template files to be used both for the code and the writeup.The code file is called P1.ipynb and the writeup template is writeup_template.md

To meet specifications in the project, take a look at the requirements in the project rubric

Creating a Great Writeup

For this project, a great writeup should provide a detailed response to the "Reflection" section of the project rubric. There are three parts to the reflection:

  1. Describe the pipeline

  2. Identify any shortcomings

  3. Suggest possible improvements

We encourage using images in your writeup to demonstrate how your pipeline works.

All that said, please be concise! We're not looking for you to write a book here: just a brief description.

You're not required to use markdown for your writeup. If you use another method please just submit a pdf of your writeup. Here is a link to a writeup template file.

The Project

If you have already installed the CarND Term1 Starter Kit you should be good to go! If not, you should install the starter kit to get started on this project.

Step 1: Set up the CarND Term1 Starter Kit if you haven't already.

Step 2: Open the code in a Jupyter Notebook

You will complete the project code in a Jupyter notebook. If you are unfamiliar with Jupyter Notebooks, check out Udacity's free course on Anaconda and Jupyter Notebooks to get started.

Jupyter is an Ipython notebook where you can run blocks of code and see results interactively. All the code for this project is contained in a Jupyter notebook. To start Jupyter in your browser, use terminal to navigate to your project directory and then run the following command at the terminal prompt (be sure you've activated your Python 3 carnd-term1 environment as described in the CarND Term1 Starter Kit installation instructions!):

> jupyter notebook

A browser window will appear showing the contents of the current directory. Click on the file called "P1.ipynb". Another browser window will appear displaying the notebook. Follow the instructions in the notebook to complete the project.

Step 3: Complete the project and submit both the Ipython notebook and the project writeup

How to write a README

A well written README file can enhance your project and portfolio. Develop your abilities to create professional README files by completing this free course.

carnd-lanelines-p1's People

Contributors

andrewpaster avatar austinjalexander avatar baumanab avatar bayne avatar brok-bucholtz avatar citlaligm avatar dmlicht avatar domluna avatar jeremy-shannon avatar kokosabu avatar mhorga avatar mikaelcarpenter avatar moe-elsadig avatar mvirgo avatar norman-thomas avatar quadhd avatar rajatgoyal715 avatar rasphilco avatar ryan-keenan avatar sudkul avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

carnd-lanelines-p1's Issues

runtume error

----> 8 white_clip = clip1.fl_image(process_image)

Name error.

I guess this line have a problem "clip1 = VideoFileClip("test_videos/solidWhiteRight.mp4")"
it was look like not finding solidWhileRight.mp4.

what is the solution about this complie error . not found solidWhiteRight.mp4

Thanks

region_of_interest() fillpoly

Hello,

So while I was trying to work through this assignment I came across a weird issue, when I am trying to run the region_of_interest() function it is giving me an error message that is

error Traceback (most recent call last)
in
7
8 vertices = np.array([[0,0],[300,450],[530,230]],dtype=np.int32)
----> 9 img = region_of_interest(img,vertices)
10 img = gaussian_blur(img,3)
11

in region_of_interest(img, vertices)
39 #filling pixels inside the polygon defined by "vertices" with the fill color
40
---> 41 cv2.fillPoly(mask, vertices, ignore_mask_color)
42
43 #returning the image only where mask pixels are nonzero

error: OpenCV(4.1.2) C:\projects\opencv-python\opencv\modules\imgproc\src\drawing.cpp:2403: error: (-215:Assertion failed) p.checkVector(2, CV_32S) >= 0 in function 'cv::fillPoly'

Initially I thought the issue is because of the datatype and not using correct datatype but as you can see that even after using the numpy int32 the issue still remains.

Undefined Var

In P1.ipynb, there are two places where you write: "plt.imshow(gray, cmap='gray')," what is gray (the variable, not the string)? Isn't that just an undefined variable? Did you mean to write "plt.imshow(image, cmap='gray')" in the first instance and "plt.imshow(img, cmap='gray')" in the second?

Reflections Section Removed

Hello, I am a code reviewer, and I would like to make sure that the removal of the Reflection section was intentional (as shown in this commit).

Maybe the reviewers should be warned about this update. The section is still shown as a requirement in the Reviewer Dashboard,

Issue with conda install -c menpo opencv3=3.1.0

With Windows 7 , after the condo install -c menpo opencv3=3.1.0 step,
I get UnsatisfiableError: The following specifications were found to be in conflict:

  • opencv3 3.1.0* -> python 2.7*
  • python 3.6*

conda info opencv3=3.1.0 returns

NoPackagesFoundError: Package missing in current win-64 channels:

  • opencv3 3.1.0*

Using anaconda search -t conda opencv3, the menpo/opencv3 version 3.2.0 should have a win-64 version available. but changing the top statement to use opencv3=3.2.0 but that doesnt seem to work either. Does anyone have some insight on how to solve this issue I'm having with the included instructions?

Typo erron

There is a typo in the comment of following:

TODO: Build your pipeline that will draw lane lines on the test_images

then save them to the test_images directory.

It shall be "test_images_output" instead of "test_images".

No filename as test.ipynb

The project description on udacity says to open test.ipynb but it is not present in this repository. Do we need to work with P1.ipynb?

ctrl+d , in windows, cannot exit.

in README.md:
exit python:

SyntaxError: invalid syntax

exit
Use exit() or Ctrl-Z plus Return to exit
^Z

right exit method is: Use exit() or Ctrl-Z plus Return to exit

link broken

' Cyrille Rossant's Basics of Jupyter Notebook and Python' link is broken.

Simplifying calling Docker on this project and also getting upstream fixes

The way that you have laid this out is great and it is easy to get the docker container running, but there
are two improvements that would make things easier:

  1. run.sh. Having a simple script which will allow calling that very long docker string in this directory. And at least on MacOS making sure that Docker for Mac is started
  2. upstream.sh. Having a simple way to make sure that when you fork this repo, you are getting the upstream changes that Udacity is making.

I created a fork with these two simple shell scripts, is this interesting for you guys. I can issue a PR if you like.

The project doesn't have a license

Hi @ryan-keenan, @andrewpaster,
Notice that our project doesn't have license, that's a little unprofessional for a open source project, especially there has much extends adoption and development in an online education project. "No license terms" means users don't know it can be used freely. Another reference is Can I call my program "Open Source" even if I don't use an approved license?.

So here I suggest the project add license, recommend we choose one of the below license, firstly because they're all Permissive Licenses, but they have different redistribution disclaimer:

Regards,
Brandon

Students confused about where to put their code

So a few of the students that I am mentoring have mentioned that they're not sure where they should be putting their code for the first project. The section that asks students to test on images doesn't have a clear spot to put the code.

There's two reasonable solutions:

  1. Add a cell in the "Test on Images" section with a note to the student.
  2. Move the cell that contains process_image up to the "Test on Images" section and have students use that.

Project Structure Is Inconsistent

There are several inconsistencies that make this project feel a bit messy:

  1. The examples folder only contains one of the five examples files
  2. There is a sub directory for test images, but not one for test videos. Test videos are all kept in the root directory for some reason?
  3. The project is requesting students write images back into the test image source directory, instead of a destination directory. This will give students the extra task of keeping track of which images are which if they run their pipeline on images more than once (which it seems like they should).

I would be happy to clean this up in a PR (including update the ipython notebook) if you guys are comfortable with it.

openCV with GPU

I was looking to use OpenCV with Cuda8. I have Cuda8, but have not been successful with getting openCV working with it. Is there any guidelines for that?

region_of_interest issue with fillPoly()

The region_of_interest() function says it takes vertices which it passes to cv2.fillPoly(), but it seems like what that function is supposed to take is an Array of shapes.

I think that function should be updated like so:

-cv2.fillPoly(mask, vertices, ignore_mask_color)
+# We need to pass in an array of shapes (each shape is an array of vertices)
+cv2.fillPoly(mask, [vertices], ignore_mask_color)

Causes error: error: /home/travis/miniconda/conda-bld/conda_1486587071158/work/opencv-3.1.0/modules/imgproc/src/drawing.cpp:2276: error: (-215) p.checkVector(2, CV_32S) >= 0 in function fillPoly

See related error http://stackoverflow.com/questions/17241830/opencv-polylines-function-in-python-throws-exception/18817152#18817152

line fit

Traceback (most recent call last):
File "C:\Users\Ali\Desktop\Lane Detection\Line_Fit\line_fit_video.py", line 114, in
annotate_video('project_video.mp4', 'out.mp4')
File "C:\Users\Ali\Desktop\Lane Detection\Line_Fit\line_fit_video.py", line 108, in annotate_video
annotated_video = video.fl_image(annotate_image)
File "C:\Python27\lib\site-packages\moviepy\video\VideoClip.py", line 533, in fl_image
return self.fl(lambda gf, t: image_func(gf(t)), apply_to)
File "C:\Python27\lib\site-packages\moviepy\Clip.py", line 136, in fl
newclip = self.set_make_frame(lambda t: fun(self.get_frame, t))
File "", line 2, in set_make_frame
File "C:\Python27\lib\site-packages\moviepy\decorators.py", line 14, in outplace
f(newclip, a, **k)
File "C:\Python27\lib\site-packages\moviepy\video\VideoClip.py", line 694, in set_make_frame
self.size = self.get_frame(0).shape[:2][::-1]
File "", line 2, in get_frame
File "C:\Python27\lib\site-packages\moviepy\decorators.py", line 89, in wrapper
return f(new_a, **new_kw)
File "C:\Python27\lib\site-packages\moviepy\Clip.py", line 95, in get_frame
return self.make_frame(t)
File "C:\Python27\lib\site-packages\moviepy\Clip.py", line 136, in
newclip = self.set_make_frame(lambda t: fun(self.get_frame, t))
File "C:\Python27\lib\site-packages\moviepy\video\VideoClip.py", line 533, in
return self.fl(lambda gf, t: image_func(gf(t)), apply_to)
File "C:\Users\Ali\Desktop\Lane Detection\Line_Fit\line_fit_video.py", line 66, in annotate_image
left_curve, right_curve = calc_curve(left_lane_inds, right_lane_inds, nonzerox, nonzeroy)
File "C:\Users\Ali\Desktop\Lane Detection\Line_Fit\line_fit.py", line 241, in calc_curve
left_fit_cr = np.polyfit(lefty
ym_per_pix, leftx
xm_per_pix, 2)
File "C:\Python27\lib\site-packages\numpy\lib\polynomial.py", line 588, in polyfit
c, resids, rank, s = lstsq(lhs, rhs, rcond)
File "C:\Python27\lib\site-packages\numpy\linalg\linalg.py", line 1921, in lstsq
raise LinAlgError('SVD did not converge in Linear Least Squares')
LinAlgError: SVD did not converge in Linear Least Squares

Better guide for moviepy

Hi, I'm jiho in Nov cohort.

Even if people finish install moviepy, there might be error when import the library.
because of ffmpeg exe.

image

solution is simple:
install it

image

So, I thinks it is better to add these to read.md

Thanks

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.