Train an R-CNN deep learning object detector
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 with compute capability 3.0 or higher.
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)
This implementation of R-CNN does not train an SVM classifier for each object class.
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 pretrained resnet50
(Deep Learning Toolbox) model.
Alternatively, manually specify a custom R-CNN network using the LayerGraph
(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.
[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.
objectDetectorTrainingData
| trainFasterRCNNObjectDetector
| trainFastRCNNObjectDetector
| trainYOLOv2ObjectDetector
| resnet50
(Deep Learning Toolbox) | trainingOptions
(Deep Learning Toolbox)imageCategoryClassifier
| rcnnObjectDetector
| Layer
(Deep Learning Toolbox) | SeriesNetwork
(Deep Learning Toolbox)