VL_NNROIPOOL - CNN region of interest pooling.

Y = VL_NNROIPOOL(X, ROIS) pools each feature channel in X in the specified regions of interest ROIS. ROIS is a 5 x K array containing K regions. Each region has five coordinates [t, u0, v0, u1, v1] where u0, v0 is the upper-left corner of a ROI, u1, v1 is the bottom-right corner, and t is the index of the image that contains the region. Spatial coordiantes start at (1,1), with u indexing the horizontal axis and v the vertical one. The image indeces ranges from 1 to the number of images stored in the tensor X.

If X has C feature channels, then the output Y is a 1 x 1 x C x K array, with one image instance per region. Arguments can be SINGLE or DOUBLE and CPU or GPU arrays; however, they must all be of the same type (unless empty).

DZDX = VL_NNROIPOOL(X, ROIS, DZDY) computes the derivative of the layer projected on DZDY with respect to X.

VL_NNROIPOOL(___, 'opt', value, ...) accepts the following options:

See also: VL_NNPOOL().