Skip to content
GitLab
Explore
Projects
Groups
Topics
Snippets
Projects
Groups
Topics
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Tom
DeepPiCar
Commits
462636ed
Commit
462636ed
authored
4 years ago
by
babaudmath
Browse files
Options
Download
Patches
Plain Diff
Add bdd to test nvidia model
parent
7eb360cf
master
testModelIA
1 merge request
!1
Test model ia
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
driver/code/test.py
+23
-0
driver/code/test.py
with
23 additions
and
0 deletions
+23
-0
driver/code/test.py
0 → 100644
+
23
−
0
View file @
462636ed
import
sys
import
cv2
from
hand_coded_lane_follower
import
HandCodedLaneFollower
def
save_image_and_steering_angle
(
video_file
):
lane_follower
=
HandCodedLaneFollower
()
cap
=
cv2
.
VideoCapture
(
video_file
+
'.avi'
)
try
:
i
=
0
while
cap
.
isOpened
():
_
,
frame
=
cap
.
read
()
lane_follower
.
follow_lane
(
frame
)
cv2
.
imwrite
(
"test_%03d_%03d.png"
%
(
i
,
lane_follower
.
curr_steering_angle
),
frame
)
i
+=
1
if
cv2
.
waitKey
(
1
)
&
0xFF
==
ord
(
'q'
):
break
finally
:
cap
.
release
()
cv2
.
destroyAllWindows
()
if
__name__
==
'__main__'
:
save_image_and_steering_angle
(
sys
.
argv
[
1
])
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Topics
Snippets