diyjac / sdc-p5 Goto Github PK
View Code? Open in Web Editor NEWUdacity Self-Driving Car Project 5: Vehicle Detection and Tracking
License: MIT License
Udacity Self-Driving Car Project 5: Vehicle Detection and Tracking
License: MIT License
It is giving error:
ImportError: cannot import name 'joblib' from 'sklearn.externals' (/usr/local/lib/python3.7/dist-packages/sklearn/externals/__init__.py)
Fix,
In pylib/vehicleDetection.py change to import joblib
Colab Link:
https://colab.research.google.com/drive/1TGWisevUpECP7hOOzca8fA1o9dlyWj29?usp=sharing
when I use this command python3 P5pipeline.py test_images/test1.jpg output_images/test1.jpg
i get
Camera Calibration data restored from camera_cal/calibrationdata.p
image processing test_images/test1.jpg...
Traceback (most recent call last):
File "P5pipeline.py", line 229, in <module>
imageout = process_image(image)
File "P5pipeline.py", line 115, in process_image
image, roadMgr, diagMgr, scrType=scrType, debug=debug, resized=resized)
File "P5pipeline.py", line 63, in process_road_image
roadMgr.findLanes(img, resized=resized)
File "/media/bignrz/World/projects/self driving car/SDC-P5/p5lib/roadManager.py", line 493, in findLanes
self.vehicleScan, self.roadGrid)
File "/media/bignrz/World/projects/self driving car/SDC-P5/p5lib/vehicleDetection.py", line 321, in detectVehicles
hist_bins=32, hist_range=(0, 256))
File "/media/bignrz/World/projects/self driving car/SDC-P5/p5lib/vehicleDetection.py", line 159, in extract_features
cell_per_block, vis=False, feature_vec=True)
File "/media/bignrz/World/projects/self driving car/SDC-P5/p5lib/vehicleDetection.py", line 99, in get_hog_features
feature_vector=feature_vec)
TypeError: hog() got an unexpected keyword argument 'visualise'
and when using python3 P5pipeline.py v.mp4 v_out.mp4
(the same as #4) I get
Camera Calibration data restored from camera_cal/calibrationdata.p
video processing v.mp4...
Traceback (most recent call last):
File "P5pipeline.py", line 238, in <module>
video_clip = clip1.fl_image(process_image)
File "/home/bignrz/.local/lib/python3.7/site-packages/moviepy/video/VideoClip.py", line 490, in fl_image
return self.fl(lambda gf, t: image_func(gf(t)), apply_to)
File "/home/bignrz/.local/lib/python3.7/site-packages/moviepy/Clip.py", line 136, in fl
newclip = self.set_make_frame(lambda t: fun(self.get_frame, t))
File "</home/bignrz/anaconda3/lib/python3.7/site-packages/decorator.py:decorator-gen-61>", line 2, in set_make_frame
File "/home/bignrz/.local/lib/python3.7/site-packages/moviepy/decorators.py", line 14, in outplace
f(newclip, *a, **k)
File "/home/bignrz/.local/lib/python3.7/site-packages/moviepy/video/VideoClip.py", line 644, in set_make_frame
self.size = self.get_frame(0).shape[:2][::-1]
File "</home/bignrz/anaconda3/lib/python3.7/site-packages/decorator.py:decorator-gen-11>", line 2, in get_frame
File "/home/bignrz/.local/lib/python3.7/site-packages/moviepy/decorators.py", line 89, in wrapper
return f(*new_a, **new_kw)
File "/home/bignrz/.local/lib/python3.7/site-packages/moviepy/Clip.py", line 93, in get_frame
return self.make_frame(t)
File "/home/bignrz/.local/lib/python3.7/site-packages/moviepy/Clip.py", line 136, in <lambda>
newclip = self.set_make_frame(lambda t: fun(self.get_frame, t))
File "/home/bignrz/.local/lib/python3.7/site-packages/moviepy/video/VideoClip.py", line 490, in <lambda>
return self.fl(lambda gf, t: image_func(gf(t)), apply_to)
File "P5pipeline.py", line 115, in process_image
image, roadMgr, diagMgr, scrType=scrType, debug=debug, resized=resized)
File "P5pipeline.py", line 63, in process_road_image
roadMgr.findLanes(img, resized=resized)
File "/media/bignrz/World/projects/self driving car/SDC-P5/p5lib/roadManager.py", line 361, in findLanes
self.addLaneLeft(curLane)
File "/media/bignrz/World/projects/self driving car/SDC-P5/p5lib/roadManager.py", line 172, in addLaneLeft
self.curImgFtr, curLane, faint=faint, resized=self.resized)
File "/media/bignrz/World/projects/self driving car/SDC-P5/p5lib/line.py", line 102, in createPolyFitLeft
rightLane.lines[rightLane.right].currentFit)
File "<__array_function__ internals>", line 6, in polysub
File "/home/bignrz/anaconda3/lib/python3.7/site-packages/numpy/lib/polynomial.py", line 842, in polysub
val = a1 - a2
TypeError: unsupported operand type(s) for -: 'NoneType' and 'NoneType'
I tried on both python3.7, python 3.6 and python3.5 and do not know what is the problem
Hi,
for "python3 P5pipeline.py test_image/test1.jpg output_image/test1.jpg"
it is successful.
but for "python3 P5pipeline.py test_video/test1.mp4 output_video/test1.mp4"
Camera Calibration data restored from camera_cal/calibrationdata.p
video processing test_video/test1.mp4...
Traceback (most recent call last):
File "P5pipeline.py", line 238, in
video_clip = clip1.fl_image(process_image)
File "/usr/local/lib/python3.5/dist-packages/moviepy/video/VideoClip.py", line 514, in fl_image
return self.fl(lambda gf, t: image_func(gf(t)), apply_to)
File "/usr/local/lib/python3.5/dist-packages/moviepy/Clip.py", line 137, in fl
newclip = self.set_make_frame(lambda t: fun(self.get_frame, t))
File "", line 2, in set_make_frame
File "/usr/local/lib/python3.5/dist-packages/moviepy/decorators.py", line 14, in outplace
f(newclip, *a, **k)
File "/usr/local/lib/python3.5/dist-packages/moviepy/video/VideoClip.py", line 669, in set_make_frame
self.size = self.get_frame(0).shape[:2][::-1]
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 94, in get_frame
return self.make_frame(t)
File "/usr/local/lib/python3.5/dist-packages/moviepy/Clip.py", line 137, 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 514, in
return self.fl(lambda gf, t: image_func(gf(t)), apply_to)
File "P5pipeline.py", line 115, in process_image
image, roadMgr, diagMgr, scrType=scrType, debug=debug, resized=resized)
File "P5pipeline.py", line 63, in process_road_image
roadMgr.findLanes(img, resized=resized)
File "/home/cetc28/Program/SDC-P5-master/p5lib/roadManager.py", line 361, in findLanes
self.addLaneLeft(curLane)
File "/home/cetc28/Program/SDC-P5-master/p5lib/roadManager.py", line 172, in addLaneLeft
self.curImgFtr, curLane, faint=faint, resized=self.resized)
File "/home/cetc28/Program/SDC-P5-master/p5lib/line.py", line 102, in createPolyFitLeft
rightLane.lines[rightLane.right].currentFit)
File "/usr/local/lib/python3.5/dist-packages/numpy/lib/polynomial.py", line 778, in polysub
val = a1 - a2
TypeError: unsupported operand type(s) for -: 'NoneType' and 'NoneType'
Tank you!
Hi,
python3 P5pipeline.py test_images/test1.jpg output_images/test1.jpg
Camera Calibration data restored from camera_cal/calibrationdata.p
Traceback (most recent call last):
File "P5pipeline.py", line 218, in
roadMgr = RoadManager(camCal, debug=debug, scrType=scrType)
File "/mnt/hgfs/study/123/Vehicle-Detection/SDC-P5/p5lib/roadManager.py", line 130, in init
self.threshold)
File "/mnt/hgfs/study/123/Vehicle-Detection/SDC-P5/p5lib/vehicleDetection.py", line 44, in init
self.svc = joblib.load(self.trained_model)
File "/usr/local/lib/python3.5/dist-packages/sklearn/externals/joblib/numpy_pickle.py", line 570, in load
with open(filename, 'rb') as f:
NotADirectoryError: [Errno 20] Not a directory: './trained/CHOGRGB4.pkl'
Tank you!
Hi. thank you for sharing this valuable information. I m now completing opencv cources. and I found this great work. actually I want to create a small gadget for my car with Raspberry pi. I want to modify your code that uses live camera and shows processed cameare video on the screen. I examined your codes but could not get opinion where to modify to accomplish my idea. any clue could you provide me. best regards.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.