trainYOLOv2ObjectDetector
Train YOLO v2 object detector
Syntax
Description
Train a Detector
returns an object detector trained using you only look once version 2 (YOLO v2) network
architecture specified by the input detector
= trainYOLOv2ObjectDetector(trainingData
,lgraph
,options
)lgraph
. The
options
input specifies training parameters for the detection
network.
Resume Training a Detector
resumes training from the saved detector checkpoint.detector
= trainYOLOv2ObjectDetector(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.
Fine Tune a Detector
continues training a YOLO v2 object detector. Use this syntax for fine-tuning a
detector.detector
= trainYOLOv2ObjectDetector(trainingData
,detector
,options
)
Multiscale Training
specifies the image sizes for multiscale training by using a name-value pair in addition
to the input arguments in any of the preceding syntaxes.detector
= trainYOLOv2ObjectDetector(___,"TrainingImageSize",trainingSizes
)
Additional Properties
uses additional options specified by one or more detector
= trainYOLOv2ObjectDetector(___,Name=Value
)Name=Value
pair
arguments and any of the previous inputs.
Examples
Input Arguments
Output Arguments
More About
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).
Perform multiscale training by using the
trainYOLOv2ObjectDetector
function. To do so, specify the 'TrainingImageSize
' argument oftrainYOLOv2ObjectDetector
function for training the network.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.
References
[1] Joseph. R, S. K. Divvala, R. B. Girshick, and F. Ali. "You Only Look Once: Unified, Real-Time Object Detection." In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pp. 779–788. Las Vegas, NV: CVPR, 2016.
[2] Joseph. R and F. Ali. "YOLO 9000: Better, Faster, Stronger." In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pp. 6517–6525. Honolulu, HI: CVPR, 2017.
Version History
Introduced in R2019a
See Also
Apps
Functions
trainingOptions
(Deep Learning Toolbox) |trainRCNNObjectDetector
|trainFastRCNNObjectDetector
|trainFasterRCNNObjectDetector
|objectDetectorTrainingData
|yolov2Layers
Objects
Topics
- Create YOLO v2 Object Detection Network
- Object Detection Using YOLO v2 Deep Learning
- Estimate Anchor Boxes From Training Data
- Code Generation for Object Detection by Using YOLO v2
- Train Object Detectors in Experiment Manager
- Getting Started with YOLO v2
- Anchor Boxes for Object Detection
- Datastores for Deep Learning (Deep Learning Toolbox)