摘要
特殊环境下道路目标的三维感知对汽车的全天时、全气候自动驾驶具有重要意义,红外双目视觉模仿人眼实现微光/无光等特殊环境下目标的立体感知,目标检测与匹配是双目视觉立体感知的关键技术。针对当前分步实现目标检测与目标匹配的过程冗杂问题,提出了一个可以同步检测与匹配红外目标的深度学习网络——SODMNet(Synchronous Object Detection and Matching Network)。SODMNet融合了目标检测网络和目标匹配模块,以目标检测网络为主要架构,取其分类与回归分支深层特征为目标匹配模块的输入,与特征图相对位置编码拼接后通过卷积网络输出左右图像特征描述子,根据特征描述子之间的欧氏距离得到目标匹配结果,实现双目视觉目标检测与匹配。与此同时,采集并制作了一个包含人、车辆等标注目标的夜间红外双目数据集。实验结果表明,SODMNet在该红外双目数据集上的目标检测精度mAP(Mean Average Precision)提升84.9%以上,同时目标匹配精度AP(Average Precision)达到0.5777。结果证明,SODMNet能够高精度地同步实现红外双目目标检测与匹配。
可见光相机因其出色的成像能力,成为目标检
目标检测与目标匹
基于CNN(Convolutional Neural Networks)的深度学习因其对空间特征的强大提取能力成为目标检测与匹配的主流方法之一,内部稀疏连接和参数共享使其对比基于Transforme
目标检测与目标匹配是两个独立的步骤,在目标匹配过程中缺乏信息的相互交流,深度学习网络特征提取过程中往往伴随冗余操作和冗余信息的生成。本文针对红外双目视觉提出一个同步目标检测与匹配网络(SODMNet),在目标检测的同时对目标进行实例级的匹配。本文的主要贡献包括:1)设计了一个同步目标检测与匹配的深度学习网络;2)采集并制作了一个包含1 593组红外双目图片的数据集,该数据集为搭载在汽车上的红外双目相机在夜间采集的城市道路数据,并对数据集中的人和车辆目标进行了标注;3)实现了红外双目图像目标高精度匹配,并大大提升了红外图像行人车辆检测精度。
本文的结构如下:第1节详细描述网络架构,包括各网络部分和模块,以及损失函数设计;第2节详细介绍了红外双目数据集及其制作过程,并在该数据集上进行不同对比实验及结果分析;第3节对本文工作进行总结及展望。
SODMNet由目标检测网络主架构和目标匹配模块组成,如

图1 SODMNet架构
Fig. 1 Architecture of the SODMNet
图像预处理包括数据增
SODMNet的目标检测主架构采用FCOS网络,它是一个高准确度且高效率的端到端全卷积网络,主要包括骨干网络、颈部网络和头部网络三个部分。
骨干网络从输入数据中提取高层次、语义丰富的特征,它决定了网络模型的基本性能。ResNet50(Residual Neural Network

图 2 ResNet50骨干网络
Fig. 2 ResNet50 backbone network

图3 Bottleneck结构
Fig. 3 Bottleneck structure
此外,其他主流骨干网络也被采用并进行对比验证。MobileNetv

图4 深度卷积和逐点卷积与传统卷积对比
Fig. 4 Comparison of depthwise convolution and pointwise convolution with traditional convolution

图5 逐点群卷积与传统卷积对比
Fig. 5 Comparison of pointwise group convolution with traditional convolution

图6 MBConv结构
Fig. 6 MBConv structure
颈部网络在骨干网络提取的特征上进一步进行不同尺度特征的融合,通过上下文增强帮助网络感知不同大小的目标。FPN(Feature Pyramid Network

图7 FPN结构
Fig. 7 Structure of FPN
在红外双目相机的左右图像内,同一个目标通常存在相似特征。

图8 红外双目标注图片
Fig. 8 Annotated infrared stereo images
目标匹配模块主要包括目标描述子生成和匹配子模块。输入经过两组卷积,每组卷积包含3×3卷积层、BN层和ReLU激活函数,最后输出特征图对应的128维描述子。匹配子模块根据左右图像输出描述子之间的欧氏距离,得到目标匹配对。平行式双目相机目标成像俯视图如

图9 平行式双目相机目标成像俯视图
Fig. 9 Top-down view of object imaging with a parallel stereo camera setup

图10 特征图描述子欧氏距离计算
Fig. 10 Euclidean distance calculation for feature map descriptors

图11 右特征图与左特征图对应行及前后行描述子欧氏距离计算
Fig. 11 Euclidean distance calculation between right and left feature map descriptors for corresponding and adjacent rows
损失函数是用来衡量模型对输入图像的预测值与真实值之间的接近程度,预测值与真实值越接近则损失越小,反之损失越大。然后通过反向传播和梯度下降更新参数并重复训练,使得模型输出与样本真值之间的差距越来越小,即模型的预测能力越来越强。SODMNet的损失函数主要包括分类损失、回归损失、中心度损失和匹配损失。
分类损失函数采用的是Flos
, | (1) |
其中,表示预测概率,y=0表示预测与真实标签不一致,y=1表示预测与真实标签一致,γ和α为可调节因子,γ可以控制难易区分样本数量失衡,α可以抑制正负样本数量失衡。本文取参数经验值,即γ=2,α=0.25。
IoU(Intersection over Union)损
, | (2) |
其中,表示目标真实框和目标预测框交集的面积,表示目标真实框和目标预测框并集的面积,如

图12 目标框的交集与并集
Fig. 12 Intersection and union of the object bounding boxes
中心度损失通过二元交叉熵损失函数(Binary Cross Entropy Loss,BCE Loss
, | (3) |
其中,p(yi)表示预测值,yi为真值,,,,表示预测位置中心与目标框之间的距离,如
![]() | (4) |

图13 预测位置中心与目标框之间的距离
Fig. 13 Distance from predicted center to object bounding box
在本节中,首先介绍实验平台、数据准备和评估指标。然后,将不同骨干网络的实验结果进行比较,以证明该网络的有效性。最后展示了对网络匹配模块的输入和结构的消融研究,以验证网络的设计。
实验采用了公开数据集FLIR(FLIR Thermal Starter Dataset),由于目前没有公开的红外双目标注数据集,因此,基于搭建的红外双目系统采集并制作数据集。
FLIR数据集是通过安装在车辆上的可见光相机和红外相机采集的城市/高速道路环境数据,它一共包含人、自行车、汽车和狗4个标注类别,一共有14 452张标注的红外图片,训练集包含8 862张标注图片,验证集包含1 366张标注图片,训练集和验证集数据均从不同的短视频中采样得到。
红外双目数据集是通过安装在汽车车顶的红外双目相机采集的夜间市区道路环境数据,从多段视频中采样得到1 593组图片,每组包含时间同步的左右相机图像。采样数据标注类别标签包括人和车辆,其中车辆标签包括各种三轮及以上机动车辆,人标签包括行人及骑行的人。同时对每组标注图片内的目标进行匹配编号,将标号标签加在类别标签后面,如
首先从红外双目相机采集的12个短视频中以每秒一帧的频率抽取视频帧组成了一个1 315组图片的数据集,图片分辨率为1 280×1 024个像素,并对每组图片中的人和车辆目标进行手动匹配标注,对于遮挡目标不进行脑补,标注框为该目标未遮挡部分的最大外接矩形框,如

图14 数据集统计结果:(a)首次采集数据;(b)补充数据
Fig. 14 Statistical results for dataset objects:(a) initially acquired dataset; (b) supplement dataset
混淆矩阵是后续评价指标的基础,它是对预测结果的一个粗略评价。如

图15 混淆矩阵
Fig. 15 Confusion matrix
为了证明SODMNet的有效性,本文在不同骨干网络条件下进行了对比实验,并与一些主流目标检测方法进行了对比。同时本文设计了消融实验以对比匹配模块不同输入及不同结构对模型的影响。最后分析了实验结果的可能原因。
为了提升SODMNet在小数据集训练中能得到较好的泛化能力,FCOS目标检测网络首先针对FLIR数据集的人和车目标进行训练,将训练好的模型参数作为SODMNet中目标检测网络初始参数。随机提取红外双目数据集中393组图像作为测试集,剩下1 200组图像在每次训练时按8∶2随机分配为训练集和验证集。FCOS和SODMNet在红外双目数据集中进行训练,改变骨干网络分得到模型稳定参数。
测试时设置IoU阈值为0.5,即预测框与真实目标框的交并比大于等于0.5时,认为预测框是对真实目标框的正确预测,最终得到不同骨干网络下的测试集目标检测结果对比,如
Backbone | class | recall | precision | F1 score | AP | mAP | |
---|---|---|---|---|---|---|---|
ResNet | FCOS | person | 0.772 7 | 0.034 1 | 0.065 3 | 0.349 2 | 0.363 0 |
car | 0.688 7 | 0.047 8 | 0.089 4 | 0.376 7 | |||
SODMNet | person | 0.668 3 | 0.916 4 | 0.772 9 | 0.656 3 | 0.748 9 | |
car | 0.849 5 | 0.934 0 | 0.889 8 | 0.841 5 | |||
MobileNet | FCOS | person | 0.818 2 | 0.030 9 | 0.059 5 | 0.371 6 | 0.389 0 |
car | 0.722 6 | 0.051 3 | 0.095 8 | 0.406 4 | |||
SODMNet | person | 0.632 1 | 0.914 4 | 0.747 5 | 0.621 3 | 0.719 4 | |
car | 0.826 1 | 0.932 2 | 0.875 9 | 0.817 5 | |||
ShuffleNet | FCOS | person | 0.812 8 | 0.041 2 | 0.078 5 | 0.320 3 | 0.358 3 |
car | 0.704 0 | 0.055 2 | 0.102 3 | 0.396 3 | |||
SODMNet | person | 0.593 2 | 0.909 3 | 0.718 0 | 0.577 1 | 0.677 3 | |
car | 0.787 8 | 0.923 5 | 0.850 3 | 0.777 6 | |||
EfficientNet | FCOS | person | 0.778 1 | 0.053 2 | 0.099 5 | 0.383 3 | 0.404 0 |
car | 0.708 2 | 0.038 3 | 0.072 7 | 0.424 7 | |||
SODMNet | person | 0.671 8 | 0.909 7 | 0.772 9 | 0.660 7 | 0.756 8 | |
car | 0.859 6 | 0.939 4 | 0.897 7 | 0.852 9 |
Backbone | M_recall | M_precision | M_F1 score | M_AP |
---|---|---|---|---|
ResNet | 0.666 0 | 0.860 6 | 0.750 9 | 0.577 7 |
MobileNet | 0.626 2 | 0.875 1 | 0.730 0 | 0.553 8 |
ShuffleNet | 0.582 7 | 0.846 0 | 0.696 0 | 0.506 3 |
EfficientNet | 0.645 5 | 0.863 8 | 0.738 8 | 0.561 6 |

图16 不同场景SODMNet预测结果
Fig. 16 Predition results of SODMNet in different scenarios
YOLOv5和Swin Transformer分别是基于CNN和基于Transformer的主流目标检测网络,
Network | class | AP | mAP |
---|---|---|---|
YOLOv5 | person | 0.623 9 | 0.710 2 |
car | 0.796 5 | ||
Swin Transformer | person | 0.633 4 | 0.721 1 |
car | 0.808 7 | ||
SODMNet | person | 0.656 3 | 0.748 9 |
car | 0.841 5 |
分类信息和回归信息是影响目标匹配能力的最关键信息,在此基础上,本文设计消融实验验证特征图相对位置编码输入、浅层特征输入以及不同卷积层结构对SODMNet目标检测与匹配能力的影响。实验结果如
Input | Layers | person_AP | car_AP | M_AP | ||||
---|---|---|---|---|---|---|---|---|
cls® | location | feats | 1 conv | 2 conv | 4 conv | |||
🗹 | 🗹 | 0.651 7 | 0.834 1 | 0.569 5 | ||||
🗹 | 🗹 | 🗹 | 0.656 3 | 0.841 5 | 0.577 7 | |||
🗹 | 🗹 | 🗹 | 0.644 6 | 0.837 0 | 0.539 5 | |||
🗹 | 🗹 | 🗹 | 🗹 | 0.638 3 | 0.828 4 | 0.535 5 | ||
🗹 | 🗹 | 🗹 | 0.643 9 | 0.836 6 | 0.561 6 | |||
🗹 | 🗹 | 🗹 | 0.636 2 | 0.831 8 | 0.569 7 |
SODMNet增加的目标匹配模块从双目相机左右图像中学习到额外的信息,损失函数增加了匹配损失,训练阶段经过损失函数的反向传播对目标检测网络参数持续优化,这可能是其在目标检测精度上有较大提升的主要原因。同时,一个可靠的目标匹配标注的红外双目数据集对SODMNet的优越性能也至关重要。
双目图像的目标匹配主要是通过目标的特征信息进行,目标与周围目标的相对位置关系成为一个辅助判断依据,在目标特征信息缺乏时发挥重要作用。因此,相对位置编码的有无会使模型预测能力小幅变化。由于SODMNet颈部网络已经融合了浅层特征与深层特征,增加浅层特征输入可能导致匹配模块浅层特征权重占比过大,而增加或减少卷积结构可能使模型容易出现过拟合或欠拟合,这些原因都会影响模型性能。
针对分步式实现目标检测与目标匹配效率低的问题,本文在目标检测网络的基础上增加目标匹配模块,增强模块间信息交流,提出SODMNet实现红外双目视觉同步目标检测与匹配。目标检测网络分类分支输出目标类别信息,回归分支输出目标位置信息。目标匹配模块由描述子生成子模块和匹配子模块组成,输入包括目标检测网络两个分支包含丰富信息的深层特征,同时增加特征图相对位置编码作为输入,经过卷积网络生成特征描述子,根据左右图像特征描述子之间的欧氏距离得到目标匹配结果。此外,本文采集并制作了一个夜间道路双目红外图像数据集,该数据集包含1 593组标注图片,标签类别包含人和车两类。SODMNet的目标检测网络初始参数经过FLIR公开数据集训练得到,然后对SODMNet在红外双目数据集上进行训练和优化。不同骨干网络的对比实验结果显示,SODMNet在实现准确目标匹配(AP达到0.577 7)的同时有效提升了目标检测的精度(mAP提升84.9%以上)。结果表明SODMNet可以为红外双目视觉目标立体感知提供高精度的目标检测与匹配,对实现全天候、全气候的自动驾驶提供重要基础。根据深度学习网络的通用性,SODMNet可以应用于任何双目视觉目标的同步检测与匹配。对于任务相似的目标跟踪领域视频前后帧图像之间的目标匹配也有一定适用性。由于本文红外双目数据集标注类别相对简单,训练模型无法对目标实现细分类别的检测,因此后续将深入研究SODMNet对于细分多类型目标检测与匹配的准确率,进一步分析细分目标类型对准确率的影响。
References
Zou Z, Chen K, Shi Z, et al. Object detection in 20 years: A survey [J]. Proceedings of the IEEE, 2023, 111(3): 257-276. [百度学术]
Badue C, Guidolini R, Carneiro R V, et al. Self-driving cars: A survey [J]. Expert Systems with Applications, 2021, 165: 113816. [百度学术]
Wu X, Ma D, Qu X, et al. Depth dynamic center difference convolutions for monocular 3D object detection [J]. Neurocomputing, 2023, 520: 73-81. [百度学术]
Loganathan A, Ahmad N S. A systematic review on recent advances in autonomous mobile robot navigation [J]. Engineering Science and Technology, 2023, 40: 101343. [百度学术]
Wang W, Wu X, Yuan X, et al. An experiment-based review of low-light image enhancement methods [J]. IEEE Access, 2020, 8: 87884-87917. [百度学术]
Blake R, Wilson H. Binocular vision [J]. Vision Research, 2011, 51(7): 754-770. [百度学术]
Verma N K, Goyal A, Vardhan A H, et al. Object matching using speeded up robust features[C]//Intelligent and Evolutionary Systems: The 19th Asia Pacific Symposium, IES 2015, Bangkok, Thailand,November 2015, Proceedings. Springer International Publishing, 2016: 415-427. [百度学术]
Pavani S K, Delgado D, Frangi A F. Haar-like features with optimally weighted rectangles for rapid object detection [J]. Pattern Recognition, 2010, 43(1): 160-172. [百度学术]
Li Y, Zheng W, Liu X, et al. Research and improvement of feature detection algorithm based on fast [J]. Rendiconti Lincei Scienze Fisiche e Naturali, 2021, 32(4): 775-789. [百度学术]
Chen P Y, Huang C C, Lien C Y, et al. An efficient hardware implementation of hog feature extraction for human detection [J]. IEEE Transactions on Intelligent Transportation Systems, 2013, 15(2): 656-662. [百度学术]
Yebes J J, Bergasa L M, Arroyo R, et al. Supervised learning and evaluation of KITTI's cars detector with DPM[C]//2014 IEEE Intelligent Vehicles Symposium Proceedings. IEEE, 2014: 768-773. [百度学术]
Wang H, Hu D. Comparison of SVM and LS-SVM for regression[C]//2005 International Conference on Neural Networks and Brain. IEEE, 2005, 1: 279-283. [百度学术]
Hastie T, Rosset S, Zhu J, et al. Multi-class adaboost [J]. Statistics and its Interface, 2009, 2(3): 349-360. [百度学术]
Ng P C, Henikoff S. Sift: Predicting amino acid changes that affect protein function [J]. Nucleic Acids Research, 2003, 31(13): 3812-3814. [百度学术]
Bay H, Ess A, Tuytelaars T, et al. Speeded-up robust features (surf) [J]. Computer Vision and Image Understanding, 2008, 110(3): 346-359. [百度学术]
Rublee E, Rabaud V, Konolige K, et al. ORB: An efficient alternative to SIFT or SURF[C]//2011 International Conference on Computer Vision. IEEE, 2011: 2564-2571. [百度学术]
Han K, Xiao A, Wu E, et al. Transformer in transformer [J]. Advances in Neural Information Processing Systems, 2021, 34: 15908-15919. [百度学术]
Bharati P, Pramanik A. Deep learning techniques—R-CNN to mask R-CNN: A survey [J]. Computational Intelligence in Pattern Recognition: Proceedings of CIPR 2019, 2020: 657-668. [百度学术]
Cong X, Li S, Chen F, et al. A review of YOLO object detection algorithms based on deep learning[J]. Frontiers in Computing and Intelligent Systems, 2023, 4(2): 17-20. [百度学术]
Liu W, Anguelov D, Erhan D, et al. Ssd: Single shot multibox detector[C]//Computer Vision–ECCV 2016: 14th European Conference, Amsterdam, The Netherlands, October 11-14, 2016, Proceedings, Part I 14. Springer International Publishing, 2016: 21-37. [百度学术]
Tian Z, Shen C, Chen H, et al. FCOS: A simple and strong anchor-free object detector [J]. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2020, 44(4): 1922-1933. [百度学术]
Krišto M, Ivasic-Kos M, Pobar M. Thermal object detection in difficult weather conditions using yolo [J]. IEEE Access, 2020, 8: 125459-125476. [百度学术]
Ren S, He K, Girshick R, et al. Faster R-CNN: Towards real-time object detection with region proposal networks [J]. IEEE Transactions on Pattern Analysis & Machine Intelligence, 2017,39(16):1139-1149. [百度学术]
Cai Z, Vasconcelos N. Cascade r-cnn: Delving into high quality object detection[C]//Proceedings of the IEEE conference on computer vision and pattern recognition. 2018: 6154-6162. [百度学术]
Redmon J, Farhadi A. Yolov3: An incremental improvement [J]. arXiv preprint arXiv:180402767, 2018. [百度学术]
Yao S, Zhu Q, Zhang T, et al. Infrared image small-target detection based on improved FCOS and spatio-temporal features [J]. Electronics, 2022, 11(6): 933. [百度学术]
Lin F, Bao K, Li Y, et al. Learning contrast-enhanced shape-biased representations for infrared small target detection [J]. IEEE Transactions on Image Processing, 2024:33. [百度学术]
Lin F, Ge S, Bao K, et al. Learning shape-biased representations for infrared small target detection [J]. IEEE Transactions on Multimedia, 2023,26:4681-4692. [百度学术]
Sarlin P E, DeTone D, Malisiewicz T, et al. Superglue: Learning feature matching with graph neural networks[C]//Proceedings of the IEEE/CVF conference on computer vision and pattern recognition. 2020: 4938-4947.. [百度学术]
Sun J, Shen Z, Wang Y, et al. LoFTR: Detector-free local feature matching with transformers[C]//Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition. 2021: 8922-8931. [百度学术]
Li J, Wang P, Xiong P, et al. Practical stereo matching via cascaded recurrent network with adaptive correlation[C]//Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition. 2022: 16263-16272. [百度学术]
Shorten C, Khoshgoftaar T M. A survey on image data augmentation for deep learning [J]. Journal of Big Data, 2019, 6(1): 1-48. [百度学术]
Patro S, Sahu K K. Normalization: A preprocessing stage [J]. arXiv preprint arXiv:150306462, 2015. [百度学术]
Koonce B, Koonce B. Resnet 50 [J]. Convolutional Neural Networks with Swift for Tensorflow: Image Recognition and Dataset Categorization, 2021: 63-72. [百度学术]
Sandler M, Howard A, Zhu M, et al. Mobilenetv2: Inverted residuals and linear bottlenecks[C]//Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition. 2018: 4510-4520. [百度学术]
Ma N, Zhang X, Zheng H T, et al. Shufflenet v2: Practical guidelines for efficient cnn architecture design[C]//Proceedings of the European Conference on Computer Vision(ECCV). 2018: 116-131. [百度学术]
Tan M, Le Q. Efficientnetv2: Smaller models and faster training; proceedings of the International conference on machine learning, F, 2021 [C]. PMLR. [百度学术]
Lin T Y, Dollár P, Girshick R, et al. Feature pyramid networks for object detection[C]//Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition. 2017: 2117-2125. [百度学术]
Ross T Y, Dollár G. Focal loss for dense object detection[C]//Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition. 2017: 2980-2988. [百度学术]
Zheng Z, Wang P, Liu W, et al. Distance-IoU loss: Faster and better learning for bounding box regression[C]//Proceedings of the AAAI Conference on Artificial Intelligence. 2020, 34(07): 12993-13000. [百度学术]
Su J, Liu Z, Zhang J, et al. DV-Net: Accurate liver vessel segmentation via dense connection model with D-BCE loss function [J]. Knowledge-Based Systems, 2021, 232: 107471. [百度学术]
Chicco D. Siamese neural networks: An overview [J]. Artificial Neural Networks, 2021,2190: 73-94. [百度学术]