trainRCNNObjectDetector
(Not recommended) Train R-CNN deep learning object detector
trainRCNNObjectDetector
is not recommended. Instead, use a different
type of object detector, such as a yoloxObjectDetector
or yolov4ObjectDetector
detector. For more information, see Version History.
Syntax
Description
trains an R-CNN (regions with convolutional neural networks) based object detector. The
function uses deep learning to train the detector to detect multiple object classes. detector
= trainRCNNObjectDetector(trainingData
,network
,options
)
This implementation of R-CNN does not train an SVM classifier for each object class.
This function requires that you have Deep Learning Toolbox™ and Statistics and Machine Learning Toolbox™. It is recommended that you also have Parallel Computing Toolbox™ to use with a CUDA®-enabled NVIDIA® GPU. For information about the supported compute capabilities, see GPU Computing Requirements (Parallel Computing Toolbox).
returns a detector
= trainRCNNObjectDetector(___,Name,Value
)detector
object with optional input properties specified by
one or more Name,Value
pair arguments.
optionally trains an R-CNN detector using a custom region proposal function.detector
= trainRCNNObjectDetector(___,'RegionProposalFcn
',proposalFcn)
uses additional options specified by one or more name-value pair arguments and any of the
previous inputs.detector
= trainRCNNObjectDetector(___,Name=Value
)
Examples
Input Arguments
Output Arguments
Limitations
This implementation of R-CNN does not train an SVM classifier for each object class.
Tips
To accelerate data preprocessing for training,
trainRCNNObjectDetector
automatically creates and uses a parallel pool based on your parallel preference settings. This requires Parallel Computing Toolbox.VGG-16, VGG-19, ResNet-101, and Inception-ResNet-v2 are large models. Training with large images may produce "Out of Memory" errors. To mitigate these errors, manually resize the images along with the bounding box ground truth data before calling
trainRCNNObjectDetector
.This function supports transfer learning. When a network is input by name, such as
'resnet50'
, then the software automatically transforms the network into a valid R-CNN network model based on the pretrainedresnet50
(Deep Learning Toolbox) model. Alternatively, manually specify a custom R-CNN network using theLayerGraph
(Deep Learning Toolbox) extracted from a pretrained DAG network. See Create R-CNN Object Detection Network.Use the
trainingOptions
(Deep Learning Toolbox) function to enable or disable verbose printing.
References
[1] Girshick, R., J. Donahue, T. Darrell, and J. Malik. “Rich Feature Hierarchies for Accurate Object Detection and Semantic Segmentation.”Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition. 2014, pp. 580–587.
[2] Girshick, R. “Fast R-CNN.” Proceedings of the IEEE International Conference on Computer Vision. 2015, pp. 1440–1448.
[3] Zitnick, C. Lawrence, and P. Dollar. “Edge Boxes: Locating Object Proposals from Edges.” Computer Vision-ECCV, Springer International Publishing. 2014, pp. 391–405.
Extended Capabilities
Version History
Introduced in R2016bSee Also
Apps
Functions
trainingOptions
(Deep Learning Toolbox) |trainFastRCNNObjectDetector
|trainYOLOv2ObjectDetector
|objectDetectorTrainingData
Objects
Layer
(Deep Learning Toolbox) |rcnnObjectDetector
|imageCategoryClassifier