Main Content

rcnnBoxRegressionLayer

(Not recommended) Box regression layer for Fast and Faster R-CNN

RCNNBoxRegressionLayer is not recommended. Instead, use a different type of object detector, such as a yoloxObjectDetector or yolov4ObjectDetector detector. For more information, see Version History.

Description

A box regression layer refines bounding box locations by using a smooth L1 loss function. Use this layer to create a Fast or Faster R-CNN object detection network.

Creation

Description

layer = rcnnBoxRegressionLayer creates a box regression layer for a Fast or Faster R-CNN object detection network.

layer = rcnnBoxRegressionLayer('Name',Name) creates a box regression layer and sets the optional Name property.

example

Properties

expand all

Layer name, specified as a character vector or a string scalar. For Layer array input, the trainnet (Deep Learning Toolbox) and dlnetwork (Deep Learning Toolbox) functions automatically assign names to unnamed layers.

The RCNNBoxRegressionLayer object stores this property as a character vector.

Data Types: char | string

This property is read-only.

Number of inputs to the layer, stored as 1. This layer accepts a single input only.

Data Types: double

This property is read-only.

Input names, stored as {'in'}. This layer accepts a single input only.

Data Types: cell

Examples

collapse all

Create an R-CNN box regression layer with the name 'rcnn_box_reg'.

rcnnBoxRegression = rcnnBoxRegressionLayer('Name','rcnn_box_reg');

Extended Capabilities

expand all

C/C++ Code Generation
Generate C and C++ code using MATLAB® Coder™.

Version History

Introduced in R2018b

collapse all