Main Content

roiInputLayer

ROI input layer for Fast R-CNN

Description

An ROI input layer inputs images to a Fast R-CNN object detection network.

Creation

Description

layer = roiInputLayer creates an ROI input layer.

example

layer = roiInputLayer('Name',Name) creates an ROI input layer and sets the optional Name property.

Properties

expand all

Layer name, specified as a character vector or a string scalar. For Layer array input, the trainNetwork, assembleNetwork, layerGraph, and dlnetwork functions automatically assign names to layers with Name set to ''.

Data Types: char | string

This property is read-only.

Number of outputs of the layer. This layer has a single output only.

Data Types: double

This property is read-only.

Output names of the layer. This layer has a single output only.

Data Types: cell

Examples

collapse all

Create an ROI input layer.

roiInput = roiInputLayer('Name','roi_input');

Create an ROI max pooling layer with output size [4 4].

outputSize = [4 4];
roiPool = roiMaxPooling2dLayer(outputSize,'Name','roi_pool');

Add the layers to a LayerGraph.

lgraph = layerGraph;
lgraph = addLayers(lgraph,roiInput);
lgraph = addLayers(lgraph,roiPool);

Specify that the output of the ROI input layer is the 'roi' input of the ROI max pooling layer.

lgraph = connectLayers(lgraph,'roi_input','roi_pool/roi');
plot(lgraph)

Figure contains an axes object. The axes object contains an object of type graphplot.

Introduced in R2018b