wvangansbeke / LaneDetection_End2End

End-to-end Lane Detection for Self-Driving Cars (ICCV 2019 Workshop)
https://arxiv.org/pdf/1902.00293.pdf
Other
643 stars 216 forks source link

How to get image output #46

Closed heshamnimri closed 4 years ago

heshamnimri commented 5 years ago

Hey Wouter, After completing the training using python main.py --image_dir /path/to/image/folder --gt_dir /path/to/ground_truth/folder --end_to_end True How can do you use the weights to evaluate the model on images to get outputs similar to the ones in the readme ?

ie: image

wvangansbeke commented 5 years ago

Hey MHN-II,

You can simply load the weights of the trained network using torch.load. The network will predict the coefficient of the polynomial for each lane line. Opencv was used to visualize these curves. Take a look the function cv2.polylines or cv2.circle. This allows you draw the lane lines as in the figure. This should be fairly straightforward.

Best, Wouter