主要内容

rpnClassificationLayer

区域提议网络分类层

描述

区域建议网络(RPN)分类层将图像区域分为两种对象背景通过交叉熵损失函数。使用这一层创建一个更快的R-CNN对象检测网络。

创建

描述

层= rpnClassificationLayer为更快的R-CNN对象检测网络创建两类分类层。

例子

层= rpnClassificationLayer(“名字”,名称)创建一个两类分类层并设置可选的的名字财产。

属性

全部展开

层名,指定为字符向量或字符串标量。为数组输入,trainNetworkassembleNetworklayerGraph,dlnetwork函数自动为层分配名称的名字设置为''

数据类型:字符|字符串

此属性是只读的。

层的输入数。这一层只接受单个输入。

数据类型:

此属性是只读的。

输入层名。这一层只接受单个输入。

数据类型:细胞

例子

全部折叠

创建一个带有名称的RPN softmax层“rpn_softmax”

rpnSoftmax = rpnSoftmaxLayer (“名字”“rpn_softmax”
rpnSoftmax = RPNSoftmaxLayer with properties: Name: 'rpn_softmax'

使用名称创建一个RPN分类层“rpn_cls”

rpnClassification = rpnClassificationLayer (“名字”“rpn_cls”
rnclassification = rnclassificationlayer with properties: Name: 'rpn_cls'

将RPN softmax和RPN分类层添加到数组,以形成RPN的分类分支。

numAnchors = 3;rpnClassLayers =[卷积2dlayer (1,numAnchors*2,“名字”“conv1x1_box_cls”) rpnSoftmax rpnClassification]
rpnClassLayers = 3x1 Layer array with layers: 1 'conv1x1_box_cls' Convolution 6 1x1卷积与stride[1 1]和padding [0 0 0] 2 'rpn_softmax' RPN Softmax RPN Softmax 3 'rpn_cls' RPN Classification Output cross-entropy loss with 'object' and 'background' classes
介绍了R2018b