Print

发布时间: 2022-08-16
摘要点击次数:
全文下载次数:
DOI: 10.11834/jig.210157
2022 | Volume 27 | Number 8




    遥感图像处理    




  <<上一篇 




  下一篇>> 





一阶全卷积遥感影像倾斜目标检测
expand article info 周院, 杨庆庆, 马强, 薛博维, 孔祥楠
中科星图空间技术有限公司, 西安 710000

摘要

目的 主流深度学习的目标检测技术对自然影像的识别精度依赖于锚框设置的好坏,并使用平行于坐标轴的正框表示物体位置,而遥感影像中地物目标具有尺寸多变、分布密集、长宽比悬殊且朝向不定的特点,更宜通过与物体朝向一致的斜框表示其位置。本文试图结合无锚框和斜框检测技术,在遥感影像上实现高精度目标识别。方法 使用斜框标注能够更为紧密地贴合目标边缘,有效减少识别干扰因素。本文基于单阶段无锚框目标检测算法:一阶全卷积目标检测网络(fully convolutional one-stage object detector, FCOS),通过引入滑动点结构,在遥感影像上实现高效率、高精度的斜框目标检测。与FCOS的不同之处在于,本文改进的检测算法增加了用于斜框检测的两个分支,通过在正框的两邻边上回归滑动顶点比率产生斜框,并预测斜框与正框的面积比以减少极端情况下的检测误差。结果 在当前最大、最复杂的斜框遥感目标检测数据集DOTA(object detection in aerial images)上对本文方法进行评测,使用ResNet50作为骨干网络,平均精确率(mean average precision, mAP)达到74.84%,相比原始正框FCOS算法精度提升了33.02%,相比于YOLOv3(you only look once)效率提升了38.82%,比斜框检测算法R3Det(refined rotation RetinaNet)精度提升了1.53%。结论 实验结果说明改进的FCOS算法能够很好地适应高分辨率遥感倾斜目标识别场景。

关键词

深度学习; 遥感影像; 无锚框; 特征提取; 多尺度特征融合; 倾斜目标检测

Improved one-stage fully convolutional network for oblique object detection in remote sensing imagery
expand article info Zhou Yuan, Yang Qingqing, Ma Qiang, Xue Bowei, Kong Xiangnan
Geovis Spatial Technology Co., Ltd., Xi′an 710000, China

Abstract

Objective Most object detection techniques identify potential regions through well-designed anchors. The recognition accuracy is related to the setting of anchors intensively. It usually leads to sub-optimal results with no fine tunings when applying to unclear scenarios due to domain gap. The use of anchors constrains the generalization ability of object detection techniques on aerial imagery, and increases the cost of model training and parameter tuning. Moreover, object detection approaches designed for natural scenes represent objects using axis-aligned rectangles (horizontal boxes) that are inadequate when applied to aerial images since objects may have arbitrary orientation when observed from the overhead perspective. A horizontal bounding box involves multiple object instances and redundant background information in common that may confuse the learning algorithm and reduce recognition accuracy in aerial imagery. A better option tends to use oblique rectangles (oriented boxes) in aerial images. Oriented boxes are more compact compared to horizontal boxes, as they have the same direction with objects and closely adhere to objects' boundaries. We propose a novel object detection approach that is anchor-free and is capable to generate oriented bounding boxes in terms of gliding vertices of horizontal ones. Our algorithm is developed based on designated anchor-free detector fully convolutional one-stage object detector (FCOS). FCOS achieves comparable accuracy with anchor-based methods while totally eliminates the need for calibrating anchors and the complex pre and post-processing associated with anchors. It also requires less memory and can leverage more positive samples than its anchor-based counterparts. FCOS was originally designed for object detection in natural scenes observation, we adopt FCOS as our baseline and extend it for oblique object detection in aerial images. Our research contributions are mentioned as below 1) to extend FCOS for oblique object detection; 2) to weak the shape distortion issue of gliding vertex based representation of oriented boxes; and 3) to benchmark the extended FCOS on object detection in aerial images (DOTA). Method Our method integrates FCOS with gliding vertex approach to realize anchor-free oblique object detection. The following part describes our oriented object detection method on three aspects: network architecture, parameterization of oriented boxes, and experiments we conducted to evaluate the proposed network. Our network consists of a backbone for feature extraction, a feature pyramid network for feature fusion, and multiple detection heads for object recognition. Instead of using an orientation angle to represent the box direction, we adopt the gliding vertex representation for simplicity and robustness. We use ResNets as our backbone as FCOS does. The feature pyramid network fuses multi-level features from the backbone convolutional neural networks (CNN) to detect objects of various scales. Specifically, the C3, C4 and C5 feature maps are taken to produce P3, P4 and P5 by 1×1 convolution and lateral connection. P5 is fed into two subsequent convolutional layers with the stride parameter set to 2 to get P6 and P7. Unlike FCOS, we concatenate feature maps along the channel dimension followed by a 1×1 convolution and batch normalization for feature fusion. For each location on P3, P4, P5, P6 and P7, the network predicts if an object exists at that location as well as the object category. For oriented box regression, we parameterize a box using a 7D real vector: (l, t, r, b, α1, α2, k). The l, t, r, b are the distances from the location to the four sides of the object's horizontal box. These four parameters together demine the size and location of the horizontal bounding box. (α1, α2) denote the gliding offsets on the top and left side of the horizontal bounding box that could be used to derive the coordinates of the first and second vertices of the oriented object. k is the obliquity factor that represents the area ratio between an oriented object and its horizontal bounding box. The obliquity factor describes the tilt degree of an object and guides the network to approximate nearly horizontal objects with the horizontal boxes. With this design, we can generate horizontal and oriented bounding box simultaneously with minimal increase in computing time and complexity. It is worth noting that we only predict gliding distances on two sides of the horizontal bounding box other than four with the assumption that the predicted boxes are parallelograms other than arbitrary quadrilaterals. We use fully convolutional sub-networks for target category classification and location regression that is consistent with FCOS. The detection heads are implemented using four convolutional layers, and take feature maps produced by the feature pyramid network as input. The network outputs are decoded to fetch classification scores as well as box locations. Result To illustrate the effectiveness of the proposed object detection approach, we evaluated the extended FCOS on the challenging oriented object detection dataset DOTA with various backbones and inference strategies. Without bells and whistles, our proposed network outperforms the horizontal detection baseline with 33.02% increase in mean average precision (mAP). Compared to you only look once (YOLOv3), it achieves a performance boost of 38.82% in terms of frames per second (FPS). Compared to refined rotation RetinaNet(R3Det), the proposed method improves detection accuracy by 1.53% in terms of mAP. We achieve an mAP of 74.84% on DOTA using ResNet50, that is higher than most one-stage and two-stage detectors. Conclusion The proposed method has its potentials to optimize single-stage and two-stage detectors in terms of recognition accuracy and time efficiency.

Key words

deep learning; remote sensing image; anchor free; feature extraction; multi-scale feature fusion; oblique object detection

0 引言

目标检测是计算机视觉中一项基本而又具有挑战的任务,其主要目的是准确定位图像中全部前景物体并识别它们的类别。经典的目标检测方法可分为双阶段方法(Girshick,2015Ren等,2017Azimi等,2019)和单阶段方法(Redmon等,2016Liu等,2016Lin等,2017丁鹏,2019史文旭等,2020)。

现有的双阶段和单阶段目标检测算法大都借助锚框(anchor box)定位物体位置。例如,Faster R-CNN(faster region-based convolutional network)方法(Ren等,2017)需要在区域建议网络中使用锚框产生候选区域;经典的单阶段检测器YOLOv3(you only look once)(Redmon和Farhadi,2018)则在多个特征图尺度上通过3组锚框检索真实物体(赵永强等,2020)。此外,比较经典的方法,如SSD(single shot multibox detector)(Liu,2016)、RetinaNet(Lin等,2017)等,也都是基于锚框的目标检测。

锚框的引入有助于提升目标检测精度,但也带来了如下问题:1)锚框的设置引入了额外的超参数,在不同数据集通常需要针对性地调整以取得最高的识别效果;2)锚框的匹配机制使得极端尺寸目标被匹配到的频率相对于大小适中的目标被匹配到的频率更低;3)大量的锚框多数为负样本,使得正负样本出现严重的不平衡问题。

无锚框检测算法是最近较新的研究方向。一般可分为两大类,一类是基于关键点的算法,典型代表为CornerNet(Law和Deng,2018),一类是基于密集预测的算法,主要代表有DenseBox(Huang等,2015)和FCOS(fully convolutional one-stage object detection)(Tian等,2020)。FCOS目标检测算法在特征图的每个像素上直接预测目标框和类别,通过预测目标框与像素中心点的上、下、左、右距离描述目标框边界。为检测相近位置不同大小的目标,FCOS使用特征金字塔结构(feature pyramid network)(Lin等,2016),在不同尺度的特征图上检测不同尺寸的目标,并加入中心度(centerness)制约因子大大减少了网络输出中的低质量目标框,使得其检测精度超越了单阶段基于锚框的目标检测算法(高鑫等,2018)。

上述算法均是基于自然影像研发的目标检测方法,自然场景中物体几乎总是以正向朝上的方式呈现,且一幅图像中的物体数量非常有限。遥感影像与自然影像相比,有非常明显的特点:1)存在大量密集排列的小尺寸目标;2)目标物体没有统一的朝向,可能在各个方向上旋转;3)图像中前景物体数量庞大。针对遥感影像特点,有学者针对性地设计了目标检测流程(付琨等,2019),或从不同数据源成像特点出发设计算法,例如王思雨等人(2017)张跃等人(2018)研究了合成孔径雷达(synthetic aperture radar,SAR)影像下的目标检测方法。本文则以目标框标注方式为切入点构造适合于遥感目标检测的算法。

传统的目标框标注使用与坐标轴平行的矩形框,即正框表示物体位置。这种表示方法无法满足遥感影像目标识别需求,例如对于密集排列的近岸舰船目标,如果使用正框标注,则目标实例之间将存在大量重叠区域,其检测框内部将包含大量不属于该实例的前景物体(侯彪等,2020王彦情等,2011)。

针对正框检测的不足,许多研究尝试在遥感影像上通过与目标实例朝向一致的倾斜目标框(简称斜框)检测提升算法表现(冯卫东等,2013)。倾斜目标是指像素坐标下,矩形目标框的边不与水平或垂直轴平行,而是呈一定夹角的倾斜现象。斜框能够更紧致地贴合目标边界,基于斜框标注的检测框能够大大减少框内冗余信息。

近年来已经提出了多种基于斜框的目标检测算法,如Liu等人(2017)提出了带有区域生成网络的Faster R-CNN,Yang等人(2019)提出了专门针对密集小目标的斜框目标检测,Pan等人(2020)提出了动态精细化网络(dynamic refinement network, DRN)(Pan等,2020),能根据目标的形状、方向和位置调整感受野,有效缓解目标和感受野之间的失调。Xu等人(2021)提出的滑动顶点方法在正框的边界上寻找斜框顶点,无锚框的遥感影像检测算法有张筱晗等人(2020)在CornerNet的基础上提出的通过中心点进行回归的方法。

综上,本文试图结合FCOS目标检测和滑动端点技术实现一种快速稳健的遥感目标识别方法,一方面解决滑动端点方法中出现的任意四边形和训练耗时长的问题;另一方面,摒弃角度参数预测,推理出最终的斜框结果,算法不仅很好地保持了无锚框检测的速度优势,还通过改进中心点预测提升了算法的检测精度。

1 模型

1.1 整体网络框架

网络整体结构由3部分组成,如图 1所示,首先利用带有残差模块(deep residual networks, ResNet) (He等,2016)的骨干网络对输入影像进行特征提取,然后将提取到的特征输入第2部分的特征金字塔模块,通过该模块对不同尺度的特征信息进行融合,得到鲁棒的融合特征,最后将该特征送入检测分支进行目标类别和目标边框位置预测。其中,检测的第1个分支预测目标类别和中心度,第2个分支预测回归目标边框4个方向的距离,在回归四边距离的前提下,加入斜框部分,分别预测目标的邻边比率和正框与斜框的面积比率。

图 1 模型整体框架
Fig. 1 The framework of overall model

1.2 特征提取网络

特征提取网络使用ResNet系列,如ResNet50,整个特征提取网络分为4个卷积模块,每个卷积模块结构如图 2所示,将若干个卷积模块堆叠起来,提取到不同粒度的特征信息,此外,残差网络巧妙的跳跃连接方式,能够有效避免由网络深度增加导致的网络梯度爆炸和梯度消失问题(唐玮等,2019)。

图 2 卷积模块示意图
Fig. 2 The structure of convolution block

ResNet50网络中共有4类卷积模块,每一类的卷积结构相同,特征图通道数不同,图 2表示ResNet50网络的一个卷积模块的卷积结构图,每个方框代表一种操作。

1.3 多尺度特征融合

目标检测任务中,常常由于不同尺度的目标难以检测,导致网络检测精度不理想,残差网络中,每类卷积模块之后,特征图都是不同尺度的,低层次的卷积模块提取到的特征包含更多的图像局部信息和低层次特征,如边缘、轮廓等,高层次的卷积模块提取到的特征通常是更高层的全局、抽象特征(李湘眷等,2016)。在目标检测任务中,低层和高层特征都至关重要,因此在特征提取之后,取不同层级的残差提取特征图进行特征融合,整合不同层级的特征信息。在原始FCOS的基础上,改进了特征融合的方式,不仅仅是将多个尺度的特征图进行通道维度拼接,还增加了1×1卷积核的卷积操作和批量归一化操作,有效提升算法速度和精度,具体的多尺度特征融合结构如图 3所示。

图 3 多尺度特征融合结构
Fig. 3 The fusion structure of multi-scale feature
((a) multi-scale feature extraction; (b) feature fusion)

图 3(a)中,左边一列是残差网络,以ResNet50为例, 网络共包含4类卷积模块(block), 取后3类卷积模块输出分别进行$1 \times 1$卷积, 得到$C 3, C 4, C 5$, 接着将$C 5$进行$1 \times 1$卷积得到$P 5, P 4$由经过$1 \times 1$卷积的$C 4$和上采样之后的$P 5$融合得到; 同理得到$P 3$$P 6$$P 5$经过步长为2的卷积得到, 同理得到$P 7$图 3(b)是以$P 3$为例, 展示了多尺度特征融合的方式, 图中$C 3^{\prime}$代表经过$1 \times 1$卷积的$C 3, P 4^{\prime}$代表经过上采样的$P 4$, 先把$C 3^{\prime}$$P 4^{\prime}$按照通道维度进行拼接, 然后使用$1 \times 1$卷积进行降维, 再归一化得到$P 3$。考虑到相邻层级之间的特征差异更平滑, 因此只对相邻两层特征进行融合。融合拼接之后的特征图经过$1 \times 1$卷积核的操作可以针对通道维度进行跨通道信息交互, 降低特征通道维度, 有效减少计算量, 批量归一化操作可以加快网络收敛, 控制梯度爆炸并防止梯度消失,避免网络过拟合。这种金字塔特征融合模块一方面可以保证特征空间分辨率不下降,另一方面也可以有效扩大感受野,提升网络鲁棒性。

1.4 目标回归检测框优化策略

回归检测分支的输出主要有两个分支: 第1分支计算目标类别和中心度$(c t)$, 第2分支回归目标框参数$\left(l, t, r, b, \alpha_{1}, \alpha_{2}, k\right)$。改进的部分主要体现在第2分支上, $(l, t, r, b)$是前景点至目标框的左边、上边、右边和下边之间的距离, $\left(\alpha_{1}, \alpha_{2}\right)$表示两条邻边的斜框在正框边上的比率。$k$表示斜框面积与正框面积的比率, 具体目标回归检测框优化分支如图 4所示。

图 4 回归检测分支结构
Fig. 4 The branch structure of regression detection

在第1分支上, 通过卷积回归将特征图映射成$c$个通道的分类结果, $c$代表目标类别数, 即映射成每类目标的分类结果。特征上的位置可以通过换算映射到输人图像位置, 从而建立特征图上点的位置和输人图像上点的位置之间的关系, 为计算特征图上每个点的分类提供基础。第1分支的另一个输出是中心度$c_{t}$, 用于衡量特征图上每个点与目标中心点之间的距离, 目的是减少距离目标中心较远的预测框, 约束预测框尽可能靠近目标中心点。计算为

$ c_{t}=\sqrt{\frac{\min (l, r)}{\max (l, r)} \times \frac{\min (t, b)}{\max (t, b)}} $ (1)

改进的第2分支上, 回归斜框的参数为$(l, t, r$, $\left.b, \alpha_{1}, \alpha_{2}, k\right)$, 通过推理正框四边距离、斜框邻边比率和面积比率预测任意方向的倾斜目标框位置。

假设对于给定的目标, 其倾斜目标框为$O$ (图 5中的蓝框), 对应的正框为$B$ (图 5中的黑框), 设$\boldsymbol{v}_{i}$, $i \in\{1, 2, 3, 4\}$分别表示两种目标框在上边、右边、下边和左边的交点, 其正框分别用4点坐标$\boldsymbol{v}_{i}^{\prime}, i \in$ $\{1, 2, 3, 4\}$表示。正框通常也用$(x, y, w, h)$表示, 其中$(x, y)$表示中心点坐标, $w$$h$分别是宽度和高度(陈华杰等, 2021), 额外变量$\left(\alpha_{1}, \alpha_{2}\right)$定义为

图 5 多尺度特征融合结构
Fig. 5 The fusion structure of multi-scale feature
((a) multi-scale feature extraction; (b) feature fusion)

$ \begin{aligned} &\alpha_{1}=\left\|s_{1}\right\| / w \\ &\alpha_{2}=\left\|s_{2}\right\| / h \end{aligned} $ (2)

式中, $\left\| {{\mathit{\boldsymbol{s}}_i}} \right\| = \left\| {{\mathit{\boldsymbol{v}}_i} - \mathit{\boldsymbol{v}}_i^\prime } \right\|$表示${\mathit{\boldsymbol{v}}_i}$$\mathit{\boldsymbol{v}}_i^\prime $之间的距离。得到目标框上边和右边的交点之后, 考虑到遥感影像与自然影像目标的区别, 遥感影像中的目标通常为对称结构, 不适合用任意四边形进行标注, 因此遥感影像倾斜目标框默认为平行四边形, 即要求目标框上边的滑动偏移量等于目标框下边的滑动偏移量, 目标框左边的偏移量等于目标框右边的偏移量, 因而不会产生任意四边形目标框。除了以$(l, t, r, b$, $\left.\alpha_{1}, \alpha_{2}, k\right)$表示有向目标外, 还引人表示倾斜程度的倾斜因子, 由$O$$B$之间的面积比$k$表示

$ k=|O| /|B| $ (3)

式中, $|\cdot|$表示基数。接近水平目标的倾斜度系数$k$较大, 趋近于1, 目标框窄长(长宽比例大) 且倾斜目标的倾斜度系数$k$趋近于0。因此, 可以根据倾斜度因子$k$选择正框或斜框作为最终结果, 有效避免了极端情况的检测误差。最后通过回归$(l, t, r$, $\left.b, \alpha_{1}, \alpha_{2}, k\right)$来求出目标的倾斜框位置。

通过回归两个边的长度比,有效表征了正框每侧的相对滑动偏移量,与滑动点网络提出的斜框表示中的角度预测误差相比,这种表示对偏移预测误差的敏感性更小。通过限制正框四边的偏移量,可以方便地进行偏移量学习,同时也避免了直接回归定向目标的4个顶点时顺序标记点的混淆。为了进一步消除近水平目标的小角度倾斜,还引入了一种基于倾斜目标框与正框面积比的倾斜因子,该倾斜因子指导网络选择近水平目标的正框检测或倾斜目标的斜框检测。

1.5 损失函数

训练过程中,网络损失函数由两个分支损失函数组成,第1个分支损失包含类别损失和中心度损失;第2个分支损失主要是四边距离损失和斜框预测损失。

训练中第1分支的类别和中心度的损失函数为

$ L_{1}=\frac{1}{N_{\mathrm{pos}}} \sum L_{\mathrm{cls}}\left(p_{x, y}, c_{x, y}^{*}\right)+L_{\text {center_ness }} $ (4)

式中, $N_{\mathrm{pos}}$是正样本的数量, $L_{\mathrm{cls}}$表示分类分支的损失, $p_{x, y}$$(x, y)$位置的预测类别, $c_{x, y}^{*}$$(x, y)$位置真实label的类别, 采用焦点损失。$L_{\text {center_ness }}$使用的是二分类交叉熵损失。

第2分支的四边距离损失函数为

$ L_{2}=\frac{\lambda}{N_{\mathrm{pos}}} \sum\limits_{x, y} 1_{\left\{c_{x, y}^{*}>0\right\}} L_{\mathrm{iou}}\left(t_{x, y}, t_{x, y}^{*}\right) $ (5)

式中, $\lambda$用来平衡回归损失, 本文中取$\lambda=1$, $1_{\left\{c_{x, y}^{*}>0\right\}}$是一个标记函数, 如果$c_{x, y}^{*}>0$则为1, 否则为0。$t_{x, y}$$(x, y)$坐标的预测位置, $t_{x, y}^{*}$$(x, y)$坐标的真实位置, 与FCOS相同, 4个距离的损失计算使用的是交并比(intersection over union, IoU)损失。

与FCOS不同的是第2分支的斜框预测损失函数, 为了计算预测斜框两邻边上的比率$\left(\alpha_{1}, \alpha_{2}\right)$和倾斜度系数$k$的损失, 计算为

$ L_{3}=\frac{1}{N_{\mathrm{pos}}} \sum p^{*} \times L_{\mathrm{reg}} $ (6)

$ L_{\mathrm{reg}}=\lambda_{1} L_{\alpha}+\lambda_{2} L_{k} $ (7)

$ {L_\alpha } = \sum\limits_{i = 1}^2 {\mathit{smoot}{\mathit{h}_{{L_1}}}} \left({{\alpha _i}, {{\tilde \alpha }_i}} \right) $ (8)

$ {L_k} = \mathit{smoot}{\mathit{h}_{{L_1}}}(k, \tilde k) $ (9)

式中, $ \lambda_{1}, \lambda_{2}$是平衡每个损失项重要性的超参数, $ \mathit{smoot}{\mathit{h}_{{L_1}}}\left({x, {x^\prime }} \right) = \sum\limits_{i = 1}^n {\left({\left| {x - {x^\prime }} \right|} \right)} $

因此,训练第2分支的总损失为

$ L_{2}^{\prime}=L_{2}+L_{3} $ (10)

综上,训练过程中网络的总损失函数为

$ L=L_{1}+L_{2}+L_{3} $ (11)

1.6 训练与推理

本文提出的改进FCOS的倾斜目标检测方法在网络训练过程中,将像素点作为训练样本,并且尽可能多地选择正样本来训练探测器,通过特征提取网络得到特征图之后,进入分类和回归模块进行网络参数回归,最终得到预测的目标框位置(伍颖佳,2015)。最后,通过损失函数约束来优化网络参数,直至训练结束。

在模型的测试推理中,使用了逐像素回归策略,借助中心度来抑制低质量检测到的边界框,且不引入任何超参数,该中心度的主要作用是找到目标的中心点,离目标中心越近,中心度越大,反之越小,网络通过前向传播之后,将第1分支中推测得到的中心度的值与分类的输出值相乘,这样可以有效地过滤掉一批误检框,提高识别准确度。

网络推理得到的$ \left(l, t, r, b, \alpha_{1}, \alpha_{2}, k\right)$参数,可以用来计算预测目标包围框的4点坐标。具体推理过程如下。

设特征图为$\boldsymbol{F}_{i} \in \bf{R}^{H \times W \times C},s$为特征图至该层的总步长, 对于特征图$\boldsymbol{F}_{i}$上的每个位置$(x, y)$, 可以通过下式将其映射回输人图像上的邻近位置$\left(x_{0}, y_{0}\right)$

$ \left\{\begin{array}{l} x_{0}=\left\lfloor\frac{s}{2}\right\rfloor+x \cdot s \\ y_{0}=\left\lfloor\frac{s}{2}\right\rfloor+y \cdot s \end{array}\right. $ (12)

式中, $ \lfloor\cdot\rfloor$代表向下取整。

根据推理得到的四边距离值$(l, t, r, b)$和式(12)得到的中心坐标联合计算, 可以得到目标正框的左上角和右下角的坐标$\left(x_{\text {min }}, y_{\text {min }}\right), \left(x_{\text {max }}, y_{\text {max }}\right)$

$ \begin{aligned} x_{\min } &=x_{0}-l, & y_{\min } &=y_{0}-t \\ x_{\max } &=x_{0}+r, & y_{\max } &=y_{0}+b \end{aligned} $ (13)

根据网络推理得到的$\left(\alpha_{1}, \alpha_{2}\right)$和式(13) 得到的正框坐标联合计算, 便得到斜框的4点坐标$\left(p_{1}\right.$, $p_{2}, p_{3}, p_{4}$) 为

$ \begin{gathered} w=x_{\max }-x_{\min } \\ h=y_{\max }-y_{\min } \\ s_{1}=\alpha_{1} \times w, \quad s_{2}=\alpha_{2} \times h \\ p_{1}=\left(x_{1}, y_{1}\right), \quad x_{1}=x_{\min }+s_{1}, \quad y_{1}=y_{\max } \\ p_{2}=\left(x_{2}, y_{2}\right), \quad x_{2}=x_{\max }, \quad y_{2}=y_{\max }-s_{2} \\ p_{3}=\left(x_{3}, y_{4}\right), \quad x_{3}=x_{\max }-s_{1}, \quad y_{3}=y_{\min } \\ p_{4}=\left(x_{4}, y_{4}\right), \quad x_{4}=x_{\min }, \quad y_{4}=y_{\min }+s_{2} \end{gathered} $ (14)

对于推理得到的参数$k$, 主要用于正框和斜框的选择, 不是所有情况都选择推理出来的斜框。当参数$k$大于设定的阈值, 则目标使用正框检测, 如果小于阈值则直接用式(13) 得到的正框作为推理结果, 本文该阈值取0.8。

2 实验

2.1 数据集与实验环境

为验证本文方法的有效性,选择公开遥感目标检测数据集DOTA(object detection in aerial images)(Xia等,2018)进行实验验证。DOTA数据集包含15类目标,188 282个实例,每个实例均由4个顶点的8个坐标的任意四边形进行标记,由武汉大学测绘遥感信息工程国家重点实验室发布。这些图像来源包含不同传感器和载荷,包括谷歌影像、吉林一号以及中国资源卫星数据和高分二号卫星拍摄。数据集共计2 806幅航拍图,每幅图像的像素尺寸为800×800~4 000×4 000像素,其中包含不同尺度、方向和形状的目标,非常适合多方向的目标检测(杨建秀和刘桂枝,2020)。DOTA图像经由专家对15个常见目标类别进行标记注释,包括:飞机、轮船、储罐、棒球场、网球场、篮球场、地面跑道、港口、桥梁、大型车辆、小型车辆、直升机、环形交叉路口、足球场和篮球场。

实验环境如下:服务器选择64位Linux的操作系统,搭载4块TeslaP100显卡(16 GB),CUDA版本选择10.0,cuDNN版本选择7.0,网络搭建基于Pytorch框架进行python语言编程。在实验中,超参设置为:训练中的迭代次数为50 000,初始学习率为0.01,batchsize为12。学习率调整采用warmup方式,在训练过程中,网络分别在38 000和46 000轮时变为原来学习率的10%,本文实验使用多尺度训练和预测。

2.2 评价指标

本文采用平均准确率(mean average precision, $\mathrm{mAP})$作为算法评价指标。其中检测结果像素数与真值目标像素数交并比大于0.5, 则认为正确, 否则认为预测错误。采用$\mathrm{AP}$作为评价指标即要求在获取较高的精确率时, 也要获取较高的召回率, 弥补了单一准确率或召回率评价方法的不足。$\mathrm{mAP}$为所有类别的$\mathrm{AP}$均值, 具体计算为

$ \begin{array}{l} AP = \int_0^1 p (r){\rm{d}}r\\ mAP = \frac{{\sum\limits_{q = 1}^Q A P(q)}}{Q} \end{array} $ (15)

式中, $p(r)$代表准确率, $r$代表召回率, $q$代表某个类别。mAP能很好地平衡准确率和召回率。

3 实验结果分析

3.1 不同特征提取网络对结果的影响

为了对比不同骨干网络的特征提取效果,本文分别采用ResNet50和ResNet101网络进行特征提取,并对比算法精度。在特征提取过程中,输入图像大小为1 024×1 024像素,测试结果如表 1

表 1 不同特征提取网络检测结果对比
Table 1 The detection results of different feature extraction networks

下载CSV
整体网络 特征提取网络 mAP/%
FCOS ResNet50 73.22
FCOS ResNet101 73.93
注:加粗字体表示最优结果。

表 1中可以看出,在DOTA数据集上,本文方法在骨干网络ResNet101上比ResNet50的特征提取能力强,表明在本文实验数据集上,ResNet101残差网络的特征表征能力比ResNet50网络更好,但网络训练时长也随着网络层数加深而变长。

3.2 基于不同模型的目标检测结果对比

为了进一步验证本文斜框目标检测方法的效果,本文与其他经典斜框目标检测方法在相同数据集DOTA上进行效果对比,其中包括以SSD、YOLOv3为代表的单阶段目标检测(Redmon和Farhadi,2018),以R-DFPN(rotation dense feature pyramid network)(Yang等,2018)、RRPN(rotation region proposal network)(Ma等,2018)、SCRDet(Yang等,2019)等为代表的双阶段目标检测方法,还有最新的DRN无锚框目标检测方法。实验结果如表 2所示。为评估算法速度,采用FPS(frames per second)作为效率指标。

表 2 不同模型目标检测结果对比
Table 2 The detection results of different models

下载CSV
方法 特征提取网络 mAP/% FPS/(帧/s)
双阶段方法 R2CNN ResNet101 60.67 3.0
R-DFPN ResNet101 57.94 6.9
RRPN VGG16 61.01 0.92
SCRDet ResNet101 72.61 -
单阶段方法 SSD(正框) VGG16 10.59 7.7
YOLOv3(正框) DarkNet-53 33.80 17.0
R3Det ResNet101 71.69 7.3
无锚框方法 DRN Hourglass104 73.23 -
原始FCOS(正框) ResNet50 40.20 22.9
改进FCOS(斜框) ResNet50 73.22 23.6
注:“-”表示无此结果。

表 2中可以明显看出,本文方法在DOTA数据集上表现突出,并且无锚框的斜框目标检测方法比基于锚框的目标检测方法有着明显优势。本文方法在基于FCOS正框检测的基础上,通过由2条邻边的滑动距离计算出另外两边的滑动距离,减少了回归参数,本文提出的改进FCOS斜框目标检测方法取得了最佳精度。表 2中改进后的斜框

FCOS的mAP达到73.22%,比原始正框FCOS在相同数据集和相同的特征提取网络情况下精度提升了33.02%,FPS比YOLOv3提升了38.82%,改进的FCOS算法FPS均高于其他单阶段方法和双阶段方法。结果说明改进后的斜框FCOS在保持了FCOS无锚框算法的速度特性的前提下,比原始正框FCOS精度提升明显。

不同模型斜框目标检测算法的详细精度对比如表 3所示。可以看到,每个类别的AP值不一定都是本文方法表现最优,但本文算法的mAP高于其他单阶段和双阶段的斜框目标检测算法,比R3Det在相同骨干网络情况下精度提升1.53%,在加载Resnet50骨干网络时,最优效果达到74.84%。

表 3 DOTA数据集15类斜框目标检测精度对比
Table 3 The Comparison of 15 types of oblique object detection accuracy on DOTA dataset 

下载CSV
/%
类别 方法及骨干网络
双阶段方法 单阶段方法 无锚框方法
FR-O Azimi R2CNN R2CNN++ SCRDet RetinaNet DRN R3Det R3Det FCOS FCOS FCOS*
R-101 R-101-FPN R-101-FPN R-101-FPN R-101-FPN R-101-FPN H-104 R-101-FPN R-152-FPN R-50-FPN R-101-FPN R-50-FPN
PL 79.42 81.36 80.94 89.66 89.98 88.82 89.71 89.54 89.94 89.59 90.05 89.47
BD 77.13 74.30 65.67 81.22 80.65 81.74 82.34 81.99 81.17 82.48 83.23 81.66
BR 17.70 47.70 35.34 45.50 52.09 44.44 47.22 48.46 50.53 45.47 44.47 47.51
GTF 64.05 70.32 67.44 75.10 68.36 65.72 64.10 62.52 66.10 69.25 70.83 71.84
SV 35.30 64.89 59.92 68.27 68.36 67.11 76.22 70.48 70.92 76.73 77.19 79.92
LV 38.02 67.82 50.91 60.17 60.32 55.82 74.43 74.29 78.66 73.82 73.17 81.15
SH 37.16 69.98 55.81 66.83 72.41 72.77 85.84 77.54 78.21 86.35 86.24 87.93
TC 89.41 90.76 90.67 90.90 90.85 90.55 90.57 90.80 90.81 90.75 90.71 90.61
BC 69.64 79.06 66.92 80.69 87.94 82.83 86.18 81.39 85.26 76.53 79.90 80.18
ST 59.28 78.20 72.39 86.15 86.86 76.30 84.89 83.54 84.23 84.60 84.90 85.21
SBF 50.30 53.64 55.06 64.05 65.02 54.19 57.65 61.97 61.81 61.17 65.80 59.33
RA 52.91 62.90 52.23 63.48 66.68 63.64 61.93 59.82 63.77 64.25 65.33 67.24
HA 47.89 67.02 55.14 65.34 66.25 63.71 69.30 65.44 68.16 71.32 72.56 72.25
SP 47.40 64.17 53.35 68.01 68.24 69.73 69.63 67.46 69.83 71.64 72.42 71.54
HC 46.30 50.23 48.22 62.05 65.21 53.37 58.48 60.05 67.17 54.29 52.20 56.66
mAP 54.13 68.16 60.67 71.16 72.61 68.72 73.23 71.69 73.77 73.22 73.93 74.84
注:加粗字体为每行最优值,FCOS*代表多尺度训练和多尺度测试方法。类名中PL为飞机, BD为棒球场, BR为桥梁, GTF为地面跑道, SV为小型车辆, LV为大型车辆, SH为轮船, TC为网球场, BC为篮球场, ST为储罐, SBF为足球场, RA为环形路口, HA为港口,SP为泳池,HC为直升机。

3.3 检测结果展示分析与比较

本文方法利用DOTA数据集进行训练,采用1/2样本做训练,1/6样本做验证,剩下1/3为测试集。图 6为部分测试结果。

图 6 改进后FCOS目标检测结果
Fig. 6 The results of improved FCOS on target detection

图 6中,蓝色方框代表误识别目标,红色方框为漏提目标。其中不同角度、不同尺度、不同分辨率和不同场景的目标均能很好地识别,且识别框能紧致地贴合目标,与真实目标方向一致,尤其是在整齐密集排布的目标场景下,能达到较高的识别精度。但结果中,仍然有少量目标错提和漏提,尤其是在目标周边阴影区域容易产生误识别,对特殊目标容易发生漏提问题。

为比较原始正框FCOS与改进后的斜框FCOS算法在DOTA数据集上的表现,结果如图 7所示。对密集排列的窄长型目标来说,原始FCOS检测结果冗余信息较多,且存在大量重叠目标框。本文方法表现良好,对密集排列的目标识别框排布较规则,能紧致地贴合真实目标,有效满足遥感影像对目标检测的要求,尤其对舰船、车辆等目标识别效果较好,重叠信息较少。

图 7 原始FCOS与改进后FCOS结果对比
Fig. 7 The comparison of the results of the original FCOS and the improved FCOS
((a)original FCOS; (b)improved FCOS)

4 结论

本文提出的一阶全卷积遥感影像倾斜目标检测方法,在原始FCOS算法的基础上,结合金字塔多尺度特征融合思想和目标边框滑动点思想对遥感影像进行目标斜框检测,使网络能够对任意朝向的物体进行建模,有效消除了正框标注下目标干扰和背景冗余问题,对遥感影像中密集排列目标具有良好的适应性。在当前最大的遥感斜框检测公开数据集上,对比了当前先进的单阶段和双阶段检测器,本文方法mAP达到74.84%,获得了较高的评价指标,证明了本文方法在斜框检测上的优越性。

本文的贡献主要在于:1)建立了高精度无锚框单阶段斜框目标检测器,在效率与精度两方面均具有良好的表现,以更简洁的方式描述了斜框目标;2)避免了有锚框检测算法中,需要针对特定数据进行锚框参数配置所可能导致的检测器性能下降;3)在当前公开的最大的斜框目标检测数据集DOTA上进行了广泛评测,验证了所提算法的性能。本文提出的斜框目标检测方法还存在较大的改进空间,将在如下几个方面继续开展研究:1)多尺度特征融合和特征筛选;2)改进样本选择策略,取得更好的正负样本平衡;3)优化斜框交并比损失函数,提升检测精度和稳定性。

致谢 此次DOTA实验数据获取得到了武汉大学测绘遥感信息工程国家重点实验室的支持,在此表示感谢。

参考文献

  • Azimi S M, Vig E, Bahmanyar R, Krner M and Reinartz P. 2019. Towards multi-class object detection in unconstrained remote sensing imagery//Proceedings of the 14th Asian Conference on Computer Vision. Perth, Australia: Springer: 150-165 [DOI: 10.1007/978-3-030-20893-6_10]
  • Chen H J, Wu D, Hou X Y and Wei Y T. 2021. A remote sensing image rotating ship target detection method based on dense sub-region cutting. China, CN201910816272.1 (陈华杰, 吴栋, 侯新雨, 韦玉谭. 2021. 一种密集子区域切割的遥感图像旋转舰船目标检测方法. 中国, CN201910816272.1)
  • Ding P. 2019. Research on Object Detection Technology in Optical Remote based on Deep Convolutional Neural Networks. Changchun: University of Chinese Academy of Sciences (Changchun Institute of Optics, Fine Mechanics and Physics, Chinese Academy of Sciences (丁鹏. 2019. 基于深度卷积神经网络的光学遥感目标检测技术研究. 长春: 中国科学院大学(中国科学院长春光学精密机械与物理研究所))
  • Feng W D, Sun X, Wang Q. 2013. Spatial semantic model based geo-objects detection method for high resolution remote sensing images. Journal of Electronics and Information Technology, 35(10): 2518-2523 (冯卫东, 孙显, 王宏琦. 2013. 基于空间语义模型的高分辨率遥感图像目标检测方法. 电子与信息学报, 35(10): 2518-2523) [DOI:10.3724/SP.J.1146.2013.00033]
  • Fu K, Xu G L, Sun X, Sun H, Zheng X W, Yan M L and Diao W H. 2019. A method for automatically recognizing large-scale remote sensing image targets based on deep learning. China, CN201511026790.1 (付琨, 许光銮, 孙显, 孙皓, 郑歆慰, 闫梦龙, 刁文辉. 2019. 一种基于深度学习的大规模遥感影像目标自动识别方法. 中国, CN201511026790.1)
  • Gao X, Li H, Zhang Y, Yan M L, Zhang Z S, Sun X, Sun H, Yu H F. 2018. Vehicle detection in remote sensing images of dense areas based on deformable convolution neural network. Journal of Electronics and Information Technology, 40(12): 2812-2819 (高鑫, 李慧, 张义, 闫梦龙, 张宗朔, 孙显, 孙皓, 于泓峰. 2018. 基于可变形卷积神经网络的遥感影像密集区域车辆检测方法. 电子与信息学报, 40(12): 2812-2819) [DOI:10.11999/JEIT180209]
  • Girshick R. 2015. Fast R-CNN//Proceedings of 2015 IEEE International Conference on Computer Vision (ICCV). Santiago, Chile: IEEE: 1440-1448 [DOI: 10.1109/ICCV.2015.169]
  • He K M, Zhang X Y, Ren S Q and Sun J. 2016. Deep residual learning for image recognition//Proceedings of 2016 IEEE Conference on Computer Vision and Pattern Recognition (CVPR). Las Vegas, USA: IEEE: 770-778 [DOI: 10.1109/CVPR.2016.90]
  • Hou B, Zhou Y R, Jiao L C, Ma W P, Ma J J and Yang S J. 2020. Remote sensing image aircraft target detection method based on bounding box correction algorithm. China, CN201911017055.2 (侯彪, 周育榕, 焦李成, 马文萍, 马晶晶, 杨淑媛. 2020. 基于边界框修正算法的遥感图像飞机目标检测方法. 中国, CN201911017055.2)
  • Huang L C, Yang Y, Deng Y F and Yu Y. 2015. DenseBox: unifying landmark localization with end to end object detection. [2021-03-03]. https://arxiv.org/pdf/1509.04874.pdf
  • Law H and Deng J. 2018. CornerNet: detecting objects as paired keypoints//Proceedings of the 15th European Conference on Computer Vision. Munich, Germany: Springer: 765-781 [DOI: 10.1007/978-3-030-01264-9_45]
  • Li X J, Wang C L, Li Y, Sun H. 2016. Optical remote sensing object detection based on fused feature contrast of subwindows. Optics and Precision Engineering, 24(8): 2067-2077 (李湘眷, 王彩玲, 李宇, 孙皓. 2016. 窗口融合特征对比度的光学遥感目标检测. 光学精密工程, 24(8): 2067-2077) [DOI:10.3788/OPE.20162408.2067]
  • Lin T Y, Dollr P, Girshick R, He K M, Hariharan B and Belongie S. 2016. Feature pyramid networks for object detection. [EB/OL]. [2021-03-18]. https://arxiv.org/pdf/1612.03144.pdf
  • Lin T Y, Goyal P, Girshick R, He K M and Dollr P. 2017. Focal loss for dense object detection//Proceedings of 2017 IEEE International Conference on Computer Vision (ICCV). Venice, Italy: IEEE: 2999-3007 [DOI: 10.1109/ICCV.2017.324]
  • Liu W, Anguelov D, Erhan D, Szegedy C, Reed S, Fu C Y and Berg A C. 2016. SSD: single shot MultiBox detector//Proceedings of the 14th European Conference on Computer Vision. Amsterdam, the Netherlands: Springer: 21-37 [DOI: 10.1007/978-3-319-46448-0_2]
  • Liu Z K, Hu J G, Weng L B and Yang Y P. 2017. Rotated region based CNN for ship detection//Proceedings of 2017 IEEE International Conference on Image Processing. Beijing, China: IEEE: 900-904 [DOI: 0.1109/ICIP.2017.8296411]
  • Ma J Q, Shao W Y, Ye H, Wang L, Wang H, Zheng Y B, Xue X Y. 2018. Arbitrary-oriented scene text detection via rotation proposals. IEEE Transactions on Multimedia, 20(11): 3111-3122 [DOI:10.1109/TMM.2018.2818020]
  • Pan X J, Ren Y Q, Sheng K K, Dong W M, Yuan H L, Guo X W, Ma C Y and Xu C S. 2020. Dynamic refinement network for oriented and densely packed object detection//Proceedings of 2020 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR). Seattle, USA: IEEE: 11204-11213 [DOI: 10.1109/CVPR42600.2020.01122]
  • Redmon J, Divvala S, Girshick R and Farhadi A. 2016. You only look once: unified, real-time object detection//Proceedings of 2016 IEEE Conference on Computer Vision and Pattern Recognition. Las Vegas, USA: IEEE: 779-788 [DOI: 10.1109/CVPR.2016.91]
  • Redmon J and Farhadi A. 2018. YOLOv3: an incremental improvement. [2021-03-03]. https://arxiv.org/pdf/1804.02767.pdf
  • Ren S Q, He K M, Girshick R, Sun J. 2017. Faster R-CNN: towards real-time object detection with region proposal networks. IEEE Transactions on Pattern Analysis and Machine Intelligence, 39(6): 1137-1149 [DOI:10.1109/TPAMI.2016.2577031]
  • Shi W X, Tan D L, Bao S L. 2020. Feature enhancement SSD algorithm and its application in remote sensing images target detection. Acta Photonica Sinica, 49(1): #0128002 (史文旭, 谭代伦, 鲍胜利. 2020. 特征增强SSD算法及其在遥感目标检测中的应用. 光子学报, 49(1): #0128002) [DOI:10.3788/gzxb20204901.0128002]
  • Tang W, Zhao B J, Long T. 2019. Aircraft detection in remote sensing image based on lightweight network. Journal of Signal Processing, 35(5): 768-774 (唐玮, 赵保军, 龙腾. 2019. 基于轻量化网络的光学遥感图像飞机目标检测. 信号处理, 35(5): 768-774) [DOI:10.16798/j.issn.1003-0530.2019.05.005]
  • Tian Z, Shen C H, Chen H and He T. 2019. FCOS: fully convolutional one-stage object detection//Proceedings of 2019 IEEE/CVF International Conference on Computer Vision (ICCV). Seoul, Korea (South): IEEE: 9626-9635 [DOI: 10.1109/ICCV.2019.00972]
  • Tian Z, Shen C H, Chen H, He T. 2020. FCOS: a simple and strong anchor-free object detector. IEEE Transactions on Pattern Analysis and Machine Intelligence, 44(4): 1922-1933 [DOI:10.1109/TPAMI.2020.3032166]
  • Wang S Y, Gao X, Sun H, Zheng X W, Sun X. 2017. An aircraft detection method based on convolutional neural networks in high-resolution SAR images. Journal of Radars, 6(2): 195-203 (王思雨, 高鑫, 孙皓, 郑歆慰, 孙显. 2017. 基于卷积神经网络的高分辨率SAR图像飞机目标检测方法. 雷达学报, 6(2): 195-203)
  • Wang Y Q, Ma L, Tian Y. 2011. State-of-the-art of ship detection and recognition in optical remotely sensed imagery. Acta Automatica Sinica, 37(9): 1029-1039 (王彦情, 马雷, 田原. 2011. 光学遥感图像舰船目标检测与识别综述. 自动化学报, 37(9): 1029-1039) [DOI:10.3724/SP.J.1004.2011.01029]
  • Wu Y J. 2015. Research on Detection of Aircraft in High-Resolution Optical Remote Sensing Images. Changsha: National University of Defense Technology (伍颖佳. 20015. 高分辨率可见光遥感图像中飞机目标检测方法研究. 长沙: 国防科学技术大学)
  • Xia G S, Bai X, Ding J, Zhu Z, Belongie S, Luo J B, Datcu M, Pelillo M and Zhang L P. 2018. DOTA: a large-scale dataset for object detection in aerial images//Proceedings of 2018 IEEE/CVF Conference on Computer Vision and Pattern Recognition. Salt Lake City, USA: IEEE: 3974-3983 [DOI: 10.1109/CVPR.2018.00418]
  • Xu Y C, Fu M T, Wang Q M, Wang Y K, Chen K, Xia G S, Bai X. 2021. Gliding vertex on the horizontal bounding box for multi-oriented object detection. IEEE Transactions on Pattern Analysis and Machine Intelligence, 43(4): 1452-1459 [DOI:10.1109/TPAMI.2020.2974745]
  • Yang J X, Liu G Z. 2020. Small object detection with enhanced features. Journal of Shanxi Datong University (Natural Science), 36(6): 16-19 (杨建秀, 刘桂枝. 2020. 特征增强的小目标检测算法. 山西大同大学学报(自然科学版), 36(6): 16-19) [DOI:10.3969/j.issn.1674-0874.2020.06.006]
  • Yang X, Sun H, Fu K, Yang J R, Sun X, Yan M L, Guo Guo Z. 2018. Automatic ship detection in remote sensing images from google earth of complex scenes based on multiscale rotation dense feature pyramid networks. Remote Sensing, 10(1): #132 [DOI:10.3390/rs10010132]
  • Yang X, Yang J R, Yan J C, Zhang Y, Zhang T F, Guo Z, Sun X and Fu K. 2019. SCRDet: towards more robust detection for small, cluttered and rotated objects//Proceedings of 2019 IEEE/CVF International Conference on Computer Vision. Seoul, Korea (South): IEEE: 8231-8240 [DOI: 10.1109/ICCV.2019.00832]
  • Zhang X H, Yao L B, Lyu Y F, Han P, Li J W. 2020. Center based model for arbitrary-oriented ship detection in remote sensing images. Acta Photonica Sinica, 49(4): #0410005 (张筱晗, 姚力波, 吕亚飞, 韩鹏, 李健伟. 2020. 基于中心点的遥感图像多方向舰船目标检测. 光子学报, 49(4): #0410005) [DOI:10.3788/gzxb20204904.0410005]
  • Zhang Y, Sun X, Xu G L and Fu K. 2018. Multiscale ship detection from SAR images based on densely connected neural networks//Proceedings of the 5th Annual Conference on High-Resolution Earth Observation. Xi′an, China, 162-179 (张跃, 孙显, 许光銮, 付琨. 2018. 基于稠密连接神经网络的多尺度SAR图像舰船检测. 第五届高分辨率对地观测学术年会论文集. 西安, 中国, 162-179)
  • Zhao Y Q, Rao Y, Dong S P, Zhang J Y. 2020. Survey on deep learning object detection. Journal of Image and Graphics, 25(4): 629-654 (赵永强, 饶元, 董世鹏, 张君毅. 2020. 深度学习目标检测方法综述. 中国图象图形学报, 25(4): 629-654) [DOI:10.11834/jig.190307]