How to perform Lane Detection on custom videos using the pretrained "laneNet" series network?

13 views (last 30 days)
How to perform Lane Detection on custom videos using the pretrained "laneNet" series network?
I am referring to the following example:
When I try to adapt the example of lane detection on my own video, the lane detection is not correct. Specifically, when I use the pretrained "laneNet" and the default pretrained parameters "laneCoeffMeans" and the "laneCoeffStds" for my own videos, the detected lane is incorrect.

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 1 Nov 2021
Edited: MathWorks Support Team on 1 Nov 2021
This behavior is expected, as the trained network and the trained parameters are specifically trained for the training data. There could be many parameters that may vary in your test videos from the training data set. There is no direct way to use the pretrained "laneNet" series network on the custom videos.
You can also take the pretrained network and use it as a starting point to learn a new task by performing transfer learning. Fine-tuning the pretrained network with transfer learning is usually much faster and easier than training a network with randomly initialized weights from scratch. You can quickly transfer the learned features to a new task using a smaller number of training data.
You can refer to the following link for more information on how to use transfer learning to retrain AlexNet, a pretrained convolutional neural network, to classify a new set of images:
Another possible solution for lane detection is you can use the Ground Truth Labeler app in Automated Driving System Toolbox to label a set of your custom training data with the ground truth representing the right and left lane boundaries.
You can refer to the following links for more information on Deep Learning for lane detection and automating the ground truth labeling of lane boundaries respectively:
Also, you can define camera configurations to perform lane detection correctly on your video. You can refer to the following link for an example that shows how to construct a monocular camera sensor simulation capable of lane boundary detection:
 

More Answers (1)

David Willingham
David Willingham on 2 Nov 2021
Hi, there is a pretrained model for lane detection available on GitHub here.This repository implements a pretrained Spatial-CNN (SCNN) lane detection model in MATLAB.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!