主要内容

rpnClassificationLayer

区域提议网络(RPNs)分类层

描述

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

创建

描述

层= rpnClassificationLayer为Faster R-CNN对象检测网络创建一个两类分类层。

例子

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

属性

全部展开

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

数据类型:字符|字符串

此属性是只读的。

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

数据类型:

此属性是只读的。

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

数据类型:细胞

例子

全部折叠

用名称创建一个RPN softmax层“rpn_softmax”

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

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

rpnClassification = rpnClassificationLayer (“名字”“rpn_cls”
rpnClassification = RPNClassificationLayer with properties:名称:'rpn_cls'

a中添加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 convolutions with stride[1 1]和padding [0 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