Classify objects in image regions using Fast R-CNN object detector configured for monocular camera
classifies objects within the regions of interest of image
I, using a
Fast R-CNN (regions with convolutional neural networks) object detector configured for a
monocular camera. For each region,
classifyRegions returns the class
label with the corresponding highest classification score.
When using this function, use of a CUDA® enabled NVIDIA® GPU is highly recommended. The GPU reduces computation time significantly. Usage of the GPU requires Parallel Computing Toolbox™. For information about the supported compute capabilities, see GPU Support by Release (Parallel Computing Toolbox).
[___] = classifyRegions(___,'ExecutionEnvironment',
specifies the hardware resource used to classify objects within image regions. You can use
this name-value pair with any of the preceding syntaxes.
detector— Fast R-CNN object detector configured for monocular camera
I— Input image
Input image, specified as a real, nonsparse, grayscale or RGB image.
rois— Regions of interest
Regions of interest within the image, specified as an M-by-4 matrix defining M rectangular regions. Each row contains a four-element vector of the form [x y width height]. This vector specifies the upper left corner and size of a region in pixels.
resource— Hardware resource
Hardware resource used to classify image regions, specified as
'auto' — Use a GPU if it is available. Otherwise, use the
'gpu' — Use the GPU. To use a GPU, you must have
Parallel Computing Toolbox and a CUDA enabled NVIDIA GPU. If a suitable GPU is not available, the function returns an
error. For information about the supported compute capabilities, see GPU Support by Release (Parallel Computing Toolbox).
'cpu' — Use the CPU.
labels— Classification labels of regions
scores— Highest classification score per region
Highest classification score per region, returned as an M-by-1 vector of values in the range [0, 1]. M is the number of regions of interest in
rois. Each classification score in
scores corresponds to a class name in
labels and a region of interest in
rois. A higher score indicates higher confidence in the classification.
allScores— All classification scores per region
All classification scores per region, returned as an
M-by-N matrix of values in the range
[0, 1]. M is the number of regions in
rois. N is the number of class names
stored in the input
detector. Each row of classification
allscores corresponds to a region of interest in
rois. A higher score indicates higher confidence in the