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 string scalar. For Layer array input, the trainnet (Deep Learning Toolbox) and dlnetwork (Deep Learning Toolbox) functions automatically assign names to layers with the name "".

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, returned as 1. This layer accepts a single input only.

Data Types: double

This property is read-only.

Input names, returned 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

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

Version History

Introduced in R2018b

collapse all

R2024b: Not Recommended

Starting in R2024b, R-CNN object detectors are no longer recommended. Instead, use a different type of object detector, such as a yoloxObjectDetector or yolov4ObjectDetector object. These object detectors are faster than R-CNN object detectors. For more information, see Choose an Object Detector.