trainVoxelRCNNObjectDetector - Train Voxel R-CNN object detector for lidar data - MATLAB (original) (raw)

Train Voxel R-CNN object detector for lidar data

Since R2024b

Syntax

Description

Train a Detector

[trainedDetector](#mw%5F063a1649-1ed5-4fb7-9fdd-32d54f8be798) = trainVoxelRCNNObjectDetector([trainingData](#mw%5F14093dec-93a5-43a4-92ea-ba442267fad3),[detector](#mw%5F302e6c0c-03a6-41f2-a314-178169d27d11),[options](#mw%5F358f3085-e032-4ed1-962f-e4db609bc506)) trains an untrained or pretrained voxel region-based convolutional neural network (Voxel R-CNN) object detector, specified by detector, on the training datatrainingData, and returns the trained detectortrainedDetector. The options input specifies training parameters for the detection network. You can use this syntax to fine-tune a pretrained Voxel R-CNN object detector.

To use this function, your system must have a CUDA® enabled NVIDIA® GPU. For information on the supported compute capabilities, see GPU Computing Requirements (Parallel Computing Toolbox).

Resume Training a Detector

[trainedDetector](#mw%5F063a1649-1ed5-4fb7-9fdd-32d54f8be798) = trainVoxelRCNNObjectDetector([trainingData](#mw%5F14093dec-93a5-43a4-92ea-ba442267fad3),[checkpoint](#mw%5F435cc7ec-2a88-481f-a3de-68d5b118bb61),[options](#mw%5F358f3085-e032-4ed1-962f-e4db609bc506)) resumes training from the saved checkpoint specified bycheckpoint.

You can use this syntax to:

Additional Option

[[trainedDetector](#mw%5F063a1649-1ed5-4fb7-9fdd-32d54f8be798),[info](#mw%5Fdb3bdfb7-54ce-4830-a083-7b21b8ed1aa1)] = trainVoxelRCNNObjectDetector(___) additionally returns information on the training progress of the object detector, such as the training loss for each iteration, using any combination of input arguments from previous syntaxes.

Note

This functionality requires Deep Learning Toolbox™, Parallel Computing Toolbox™, Lidar Toolbox™, and the Lidar Toolbox Interface for OpenPCDet Library support package. You can download and install the Lidar Toolbox Interface for OpenPCDet Library from Add-On Explorer. For more information about installing add-ons, see Get and Manage Add-Ons.

Input Arguments

collapse all

Training data, specified as a valid datastore object. You must configure datastore object such that using the read function on the datastore object returns a cell array with three columns. Each row corresponds to a point cloud, and the columns must follow this format.

You can use the combine function to combine two or more datastores. For more information on creating datastore objects, see the datastore function.

You can generate input training data from labeled ground truth samples by using thelidarObjectDetectorTrainingData function.

Voxel R-CNN object detector, specified as a voxelRCNNObjectDetector object.

Training options, specified as a TrainingOptionsADAM 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.

The voxelRCNNObjectDetector function supports only these training options for the trainingOptions name-value arguments:

Saved detector checkpoint, specified as a voxelRCNNObjectDetector object. To periodically save a detector checkpoint during training, specify theCheckpointPath name-value argument oftrainingOptions when creating your training options object. To control how frequently the function saves checkpoints, use theCheckPointFrequency and CheckPointFrequencyUnit name-value arguments when creating your 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 youroptions object is '/checkpath', you can load a checkpoint MAT file by using this code.

data = load("/checkpath/detector-2.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 thedetector variable. To continue training, specify the network extracted from the file to the trainVoxelRCNNObjectDetector function.

trainedDetector = trainVoxelRCNNObjectDetector(trainingData,checkpoint,options);

Output Arguments

collapse all

Training progress information, returned as a structure array with these fields. Each field corresponds to a stage of training.

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 ofNaN for that iteration. The structure contains theValidationLoss field only when options specifies validation data.

Version History

Introduced in R2024b

expand all

The trainVoxelRCNNObjectDetector function is no longer supported with MATLAB® Compiler™.