roiAlignLayer
Description
An ROI align layer outputs fixed size feature maps for every rectangular ROI within an input feature map. Use this layer to create a Mask R-CNN network.
Given an input feature map of size [H
W
C
N], where C is the number of channels and
N is the number of observations, the output feature map size is
[h
w
C
sum
(M)], where h and
w are the specified output size. M is a vector of
length N and M(i) is the number of
ROIs associated with the i-th input feature map.
There are two inputs to this layer:
'in'
— The input feature map'roi'
— A list of ROIs to pool
Use the input names when connecting or disconnecting the ROI align layer to other layers
using connectLayers
(Deep Learning Toolbox) or
disconnectLayers
(Deep Learning Toolbox)
(requires Deep Learning Toolbox™).
Creation
Description
layer = roiAlignLayer(outputSize)
creates an ROI align layer with
pooled output size outputSize
. The outputSize
input
sets the OutputSize property.
layer = roiAlignLayer(outputSize,Name,Value)
set properties of
the ROI align layer by using one or more name-value pair arguments. Enclose each property
name in quotes.
For example, roiAlignLayer([7 7],'Name','roialignlayer')
creates an
ROI align layer with a pooled output size of 7-by-7 pixels and name
'roialignlayer'
.
Properties
Examples
More About
Version History
Introduced in R2020b