Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how can i use this decect my dataset??? #2

Open
zhaohuaqing1993 opened this issue Jul 10, 2017 · 5 comments
Open

how can i use this decect my dataset??? #2

zhaohuaqing1993 opened this issue Jul 10, 2017 · 5 comments

Comments

@zhaohuaqing1993
Copy link

how can i use this decect my dataset???
I just replace the project_video and it failed.

@Afeihan
Copy link

Afeihan commented Sep 12, 2017

I met the same problem, ,have you solved it?

@georgesung
Copy link
Owner

What was the error? Was the input video formatted in mp4 format?

@Afeihan
Copy link

Afeihan commented Sep 12, 2017

@georgesung
It is the mp4 format, but when I test the code with the input video that recorded with my phone,I failed. the error is:

TypeError: 'NoneType' object is not subscriptable

[MoviePy] >>>> Building video project_out.mp4
[MoviePy] Writing video project_out.mp4
0%| | 0/3861 [00:00<?, ?it/s]Traceback (most recent call last):
File "/home/han/lane-detection/advanced_lane_detection-master/line_fit_video.py", line 104, in
annotate_video('project.mp4', 'project_out.mp4')
File "/home/han/lane-detection/advanced_lane_detection-master/line_fit_video.py", line 99, in annotate_video
annotated_video.write_videofile(output_file, audio=False)
File "", line 2, in write_videofile
File "/usr/local/lib/python3.5/dist-packages/moviepy/decorators.py", line 54, in requires_duration
return f(clip, *a, **k)
File "", line 2, in write_videofile
File "/usr/local/lib/python3.5/dist-packages/moviepy/decorators.py", line 137, in use_clip_fps_by_default
return f(clip, *new_a, **new_kw)
File "", line 2, in write_videofile
File "/usr/local/lib/python3.5/dist-packages/moviepy/decorators.py", line 22, in convert_masks_to_RGB
return f(clip, *a, **k)
File "/usr/local/lib/python3.5/dist-packages/moviepy/video/VideoClip.py", line 349, in write_videofile
progress_bar=progress_bar)
File "/usr/local/lib/python3.5/dist-packages/moviepy/video/io/ffmpeg_writer.py", line 209, in ffmpeg_write_video
fps=fps, dtype="uint8"):
File "/usr/local/lib/python3.5/dist-packages/tqdm/_tqdm.py", line 833, in iter
for obj in iterable:
File "/usr/local/lib/python3.5/dist-packages/moviepy/Clip.py", line 475, in generator
frame = self.get_frame(t)
File "", line 2, in get_frame
File "/usr/local/lib/python3.5/dist-packages/moviepy/decorators.py", line 89, in wrapper
return f(*new_a, **new_kw)
File "/usr/local/lib/python3.5/dist-packages/moviepy/Clip.py", line 95, in get_frame
return self.make_frame(t)
File "/usr/local/lib/python3.5/dist-packages/moviepy/Clip.py", line 136, in
newclip = self.set_make_frame(lambda t: fun(self.get_frame, t))
File "/usr/local/lib/python3.5/dist-packages/moviepy/video/VideoClip.py", line 533, in
return self.fl(lambda gf, t: image_func(gf(t)), apply_to)
File "/home/han/lane-detection/advanced_lane_detection-master/line_fit_video.py", line 65, in annotate_image
left_fit = ret['left_fit']
TypeError: 'NoneType' object is not subscriptable
Process finished with exit code 1

and I found that in the file of line_fit.py, in the line of 79,the value of lefty and leftx is 0.

Do you have any method to solve this problem?
or Is it because there is a demand for camera placement or the pixels of the vedio ?

I'm looking forward your reply!

@georgesung
Copy link
Owner

Thanks for the info about the error. Sometimes it's possible that the filters create an empty binary image (i.e. all 0's), because the scene does not fit under the assumptions of the hard-coded parameters. Can you check if left_lane_inds and right_lane_inds are empty lists? If so, then the above may be the issue.

There are a couple ways to handle this issue:

  1. Tweak the filter parameters to fit your scene
  2. Build in error tolerance logic to tolerate empty left_lane_inds/right_lane_inds (maybe just don't display any lane lines in that scenario)

@Afeihan
Copy link

Afeihan commented Sep 12, 2017

@georgesung
Thanks for your reply!I will check the code as you siad.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants