Train PointPillars object detector
Train a Detector
trains a PointPillars object detector using deep learning and the specified training
options for the detection network.
detector = trainPointPillarsObjectDetector(
returns information on the training progress of the object detector, such as the training
accuracy for each iteration.
info] = trainPointPillarsObjectDetector(
___ = trainPointPillarsObjectDetector(___,
uses additional options specified by one or more name-value arguments and any of the
Resume Training a Detector
resumes training from the saved detector checkpoint.
detector = trainPointPillarsObjectDetector(
You can use this syntax to:
Add more training data and continue the training.
Improve training accuracy by increasing the maximum number of iterations.
trainingData — Input training data
valid datastore object | table
Training data, specified as a valid datastore object or table.
If you use a datastore object, your data must be set up such that using the
readfunction on the datastore object returns a cell array or table with three columns. Each row corresponds to a point cloud, and the columns must follow this format.
First column — Organized or unorganized point cloud data, specified as a
Second column — Bounding boxes, specified as a cell array containing an M-by-9 matrix. Each row of the matrix is of the form [x y z length width height roll pitch yaw], representing the location and dimension of a bounding box. M is the number of bounding boxes.
Third column — Labels, specified as a cell array containing an M-by-1 categorical vector with object class names. All categorical data returned by the datastore must use the same pool of categories.
You can use the
combinefunction to combine two or more datastores. For more information on creating datastore objects, see the
If you use a table, the table must have two or more columns. The first column must contain point cloud file names. The point cloud files can be in any format supported by
pcreadfunction. Each of the remaining columns represent a single object class such as Car, or Truck containing cell vectors. Each cell contains an M-by-9 matrix, M is the number of bounding boxes. The columns of the each matrix are of the form [x y z length width height roll pitch yaw], specifying the location and dimensions of the bounding box in the corresponding point cloud.
You can generate the input training data from labeled ground truth samples by using
detector — PointPillars object detector
PointPillars object detector, specified as a
You can train an untrained object detector using the training options.
You can continue training a pretrained detector with additional training data, or perform more training iterations to improve detector accuracy.
options — Training options
TrainingOptionsSGDM object |
TrainingOptionsRMSProp object |
Training options, specified as a
object returned by the
trainingOptions (Deep Learning Toolbox) function. To specify the
solver name and other options for network training, use the
trainingOptions (Deep Learning Toolbox) function.
trainPointPillarsObjectDetector function supports these
|Name-Value Arguments||Supported Options|
checkpoint — Saved detector checkpoint
Saved detector checkpoint, specified as a
pointPillarsObjectDetector object. To periodically save a detector
checkpoint during training, specify
CheckpointPath. To control how
frequently check points are saved see the
CheckPointFrequencyUnit training options.
To load a checkpoint for a previously trained detector, first load the corresponding
MAT file from the checkpoint path. Then extract the object detector from the loaded
data. For example, if the
CheckpointPath property of your
options object is
'/checkpath', you can load a
checkpoint MAT file by using this code.
data = load("/checkpath/pointpillars_checkpoint__216__2018_11_16__13_34_30.mat"); checkpoint = data.detector;
The name of the MAT file includes the iteration number and timestamp of when the
detector checkpoint was saved. The MAT file saves the detector in the
detector variable. Use the
trainPointPillarsObjectDetector function to train the
pointPillarsDetector = trainPointPillarsObjectDetector(trainingData,checkpoint,options);
Specify optional pairs of arguments as
the argument name and
Value is the corresponding value.
Name-value arguments must appear after other arguments, but the order of the
pairs does not matter.
ExperimentManger value by using an
experiments.Monitor (Deep Learning Toolbox) object,
ExperimentManager — Detector training experiment monitoring
'none' (default) |
Detector training experiment monitoring, specified as an
experiments.Monitor (Deep Learning Toolbox) object for
use with the Experiment
Manager (Deep Learning Toolbox) app. You can use this object to track the progress of training, update
information fields in the training results table, record values of the metrics used by
the training, and to produce training plots. For an example using this app, see Train Object Detectors in Experiment Manager.
Information monitored during training:
Training loss at each iteration.
Learning rate at each iteration.
Validation information when the training
contains validation data:
Validation loss at each iteration.
detector — Trained PointPillars object detector
Trained PointPillars object detector, returned as
info — Training progress information
Training progress information, returned as a structure array with these fields. Each field corresponds to a stage of training.
TrainingLoss— Training loss at each iteration. The training loss is the mean squared error (MSE), calculated as the sum of the localization error, confidence loss, and classification loss.
ValidationLoss— Validation loss at each iteration.
Each field is a numeric vector with one element per training iteration. If the
function does not calculate a value at a specific iteration, it returns a value of
NaN for that iteration. The structure contains
ValidationLoss only when
Version HistoryIntroduced in R2021b
R2022b: Support for Experiment Manager App
You can now specify the
ExperimentManager value by using an
experiments.Monitor (Deep Learning Toolbox) object as a name-value argument to the function. You can use
experiments.Monitor (Deep Learning Toolbox) object with the
Experiment Manager (Deep Learning Toolbox)
For more information on using this app, see Train Object Detectors in Experiment Manager.
trainingOptions(Deep Learning Toolbox) |
- Lidar 3-D Object Detection Using PointPillars Deep Learning
- Code Generation For Lidar Object Detection Using PointPillars Deep Learning
- Unorganized to Organized Conversion of Point Clouds Using Spherical Projection
- Getting Started with PointPillars
- Getting Started with Point Clouds Using Deep Learning
- Datastores for Deep Learning (Deep Learning Toolbox)