Main Content

lidarLaneDetector

Create lane detector for lidar data

Since R2023b

Description

The lidarLaneDetector object creates a lidar lane detection network utilizing global feature correlation (LLDN-GFC) lane detector. Using this object, you can:

  • Create a pretrained lidar lane detector by using LLDN-GFC deep learning network trained on the K-Lane data set.

  • Create a custom lidar lane detector by using a pretrained or untrained LLDN-GFC deep learning network.

Creation

Description

Pretrained LLDN-GFC Lane Detector

detector = lidarLaneDetector creates a pretrained lidar lane detector object by using an LLDN-GFC deep learning network trained on the K-Lane data set.

Custom LLDN-GFC Lane Detector

example

detector = lidarLaneDetector(name) creates a pretrained or untrained lidar lane detector object by using the LLDN-GFC deep learning network.

If name is "lldn-gfc-klane", the function creates a pretrained LLDN-GFC lane detector by using an LLDN-GFC deep learning network trained on the K-Lane data set.

If name is "lldn-gfc-untrained", the function creates an untrained LLDN-GFC lane detector by using an untrained LLDN-GFC deep learning network, to use for training and inference. Use the trainLidarLaneDetector function to train the network before performing lane detection.

detector = lidarLaneDetector(name,classes) creates a pretrained or untrained lidar lane detector object by using the LLDN-GFC deep learning network and configures it to detect a specified set of lane classes, classes.

If name is "lldn-gfc-klane", the function creates a pretrained LLDN-GFC lane detector by using an LLDN-GFC deep learning network trained on the K-Lane data set and configures it to perform transfer learning using the specified set of lane classes. For optimal results, you must train the detector on new training data before performing detection. Use the trainLidarLaneDetector function to train the detector.

If name is "lldn-gfc-untrained", the function creates an untrained LLDN-GFC lane detector by using an untrained LLDN-GFC deep learning network, to use for training and inference. Use the trainLidarLaneDetector function to train the network to detect the specified classes before performing object detection.

detector = lidarLaneDetector(name,classes,PointCloudRange=range) sets the PointCloudRange property of the lane detector.

detector = lidarLaneDetector(___,ModelName=modelName) sets the ModelName property of the lane detector in addition to any combination of input arguments from previous syntaxes.

Note

This functionality requires Deep Learning Toolbox™, Lidar Toolbox™, and the Automated Driving Toolbox™ Model for Lidar Lane Detection support package. You can download and install the Automated Driving Toolbox Model for Lidar Lane Detection from Add-On Explorer. For more information about installing add-ons, see Get and Manage Add-Ons.

Input Arguments

expand all

Name of the LLDN-GFC deep learning network, specified as one of these options:

  • "lldn-gfc-klane" — A pretrained LLDN-GFC deep learning network trained on the K-Lane data set.

  • "lldn-gfc-untrained" — An untrained LLDN-GFC deep learning network.

Data Types: char | string

Names of lane classes for training the detector, specified as a vector of strings, cell array of character vectors, or categorical vector. This argument sets the ClassNames property of the lidarLaneDetector object.

Note

The pretrained LLDN-GFC lane detector model can detect a maximum of six lanes, and it assumes that the ego vehicle is placed such that there are three lanes on either the left or right side of it. Thus, the class labels for the left and right lane boundaries of the ego vehicle must be lane3 and lane4, respectively.

Data Types: string | cell | categorical

Properties

expand all

Name for the lane detector, specified as a character vector or string scalar. To set this property, use the modelName input argument at object creation.

Example: lidarLaneDetector("lldn-gfc-klane",ModelName="laneDetector") sets the name for the detector to "laneDetector".

This property is read-only.

Names of the lane classes to detect, stored as a categorical vector. By default, the object sets this property to a categorical vector of the form [lane1 lane2 lane3 lane4 lane5 lane6], which specifies that the lidar lane detector can detect six lanes.

Note

The pretrained LLDN-GFC lane detector model can detect a maximum of six lanes, and it assumes that the ego vehicle is placed such that there are three lanes on either the left or right side of it. Thus, the class labels for the left and right lane boundaries of the ego vehicle must be lane3 and lane4, respectively.

To set this property, specify the classes input argument at object creation.

This property is read-only.

Range of the input point cloud, stored as a six-element vector of the form [xmin xmax ymin ymax zmin zmax].

  • xmin and xmax are the minimum and the maximum limits along the x-axis, respectively.

  • ymin and ymax are the minimum and the maximum limits along the y-axis, respectively.

  • zmin and zmax are the minimum and the maximum limits along the z-axis, respectively.

To set this property, use the range input argument at object creation.

Example: lidarLaneDetector("lldn-gfc-klane",classNames,PointCloudRange=[0 40 -10 10 -3 2]) sets the range of input point cloud to [0 40 -10 10 -3 2].

Object Functions

detectDetect lanes in lidar point clouds
evaluateEvaluate performance of lidar lane detector

Examples

collapse all

Specify the name of the pretrained LLDN-GFC lane detector.

name = "lldn-gfc-klane";

Create a lane detector by using the pretrained LLDN-GFC deep learning network.

detector = lidarLaneDetector(name);

Read a test point cloud and detect lanes in it.

ptCloud = pcread("highway.pcd");
laneDetections = detect(detector,ptCloud);

Display the detection results.

figure
ax = pcshow(ptCloud);
set(ax,XLim=[-80 80],YLim=[-40 40])
zoom(ax,3);
hold on
plot3(laneDetections(:,1),laneDetections(:,2),laneDetections(:,3),'*',MarkerSize=2,Color="r")

References

[1] Paek, Dong-Hee, Seung-Hyun Kong, and Kevin Tirta Wijaya. “K-Lane: Lidar Lane Dataset and Benchmark for Urban Roads and Highways.” In 2022 IEEE/CVF Conference on Computer Vision and Pattern Recognition Workshops (CVPRW), 4449–58. New Orleans, LA, USA: IEEE, 2022. https://doi.org/10.1109/CVPRW56347.2022.00491.

Version History

Introduced in R2023b