Commit 462636ed authored by babaudmath's avatar babaudmath
Browse files

Add bdd to test nvidia model

1 merge request!1Test model ia
Showing with 23 additions and 0 deletions
+23 -0
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])
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment