Train YOLO v2 object 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.
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.
continues training a YOLO v2 object detector. Use this syntax for fine-tuning a
detector.detector
= trainYOLOv2ObjectDetector(trainingData
,detector
,options
)
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
)
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 of trainYOLOv2ObjectDetector
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.
[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.
objectDetectorTrainingData
| trainFasterRCNNObjectDetector
| trainFastRCNNObjectDetector
| trainRCNNObjectDetector
| yolov2Layers
| trainingOptions
(Deep Learning Toolbox)