trainYOLOv4ObjectDetector
Syntax
Description
returns an object detector trained using you only look once version 4 (YOLO v4) network
specified by the input detector
= trainYOLOv4ObjectDetector(trainingData
,detector
,options
)detector
. The input
detector
can be an untrained or pretrained YOLO v4 object detector.
The options
input specifies training parameters for the detection
network.
You can also use this syntax for fine-tuning a pretrained YOLO v4 object detector.
resumes training from the saved detector checkpoint.detector
= trainYOLOv4ObjectDetector(trainingData
,checkpoint
,options
)
You can use this syntax to:
Add more training data and continue the training.
Improve training accuracy by increasing the maximum number of iterations.
___ = trainYOLOv4ObjectDetector(___,
uses additional options specified by one or more Name,Value
)Name,Value
pair
arguments and any of the previous inputs.
Note
To run this function, you will require the Deep Learning Toolbox™.
Examples
Input Arguments
Output Arguments
Tips
To generate the ground truth, use the Image Labeler or Video Labeler app. To create a table of training data from the generated ground truth, use the
objectDetectorTrainingData
function.To improve prediction accuracy,
Increase the number of images you can use to train the network. You can expand the training dataset through data augmentation. For information on how to apply data augmentation for preprocessing, see Preprocess Images for Deep Learning (Deep Learning Toolbox).
Choose anchor boxes appropriate to the dataset for training the network. You can use the
estimateAnchorBoxes
function to compute anchor boxes directly from the training data.
Version History
Introduced in R2022a
See Also
Apps
Functions
trainingOptions
(Deep Learning Toolbox) |yolov4ObjectDetector
|objectDetectorTrainingData
|trainYOLOv2ObjectDetector