节点文献
基于Anchor的全Transformer框架目标检测方法研究
Research on Anchor-Based Object Detection Method for Full Transformer Framework
【作者】 陈锋;
【导师】 郑艳伟;
【作者基本信息】 山东大学 , 计算机技术(专业学位), 2023, 硕士
【摘要】 随着深度学习和计算机视觉研究的不断深入,Transformer模型在计算机视觉领域的多个方向已经在一定程度上甚至完全超越了卷积神经网络的性能。其中,目标检测是计算机视觉领域的一个关键研究方向,其在监控布防、违章检测、医学图像分析等许多重要领域都具有广阔的市场应用前景。鉴于近几年卷积神经网络的发展,使得目前主流的目标检测器结构、框架较为单一,主要采用全卷积神经网络结构或卷积神经网络-Transformer混合的结构,缺少全Transformer结构的目标检测器的存在。由于Transformer表现出比卷积神经网络更优异的潜力和性能,因此本文进行全Transformer架构的目标检测网络探索,有助于进一步推动Transformer方法的进步。针对以上问题,本文做了如下内容的研究:本文设计了一个全Transformer架构的目标检测器AnchorFormer,使用Transformer编码器作为主干网络提取特征,使用Transformer解码器作为预测头来进行目标的预测,在保持Transformer的编码器-解码器结构不变的前提下,设计了全新的基于锚点和锚框的目标检测方法,通过重新对解码器预测头的设计,添加固定区域一对一预测和添加锚点和锚框等先验条件和归纳偏置使得全Transformer目标检测器在中小规模数据集上也可以达到较好的效果,通过在类别预测分支添加点得分损失加速了 Transformer目标检测器的收敛。同时本文在无锚和基于锚两种不同的方法上做了研究,以探索锚点与锚框对Transformer目标检测模型的影响,并且针对该两种方法设计了新的样本匹配方法和冲突解决方案。本文在Transformer编码器与解码器之间添加了新的无卷积特征融合模块层间融合来代替类似特征金字塔网络、路径聚合网络等卷积神经网络特征融合模块的作用。本文进行了多组对照实验,以证明所提出的目标检测器和检测方法的有效性和先进性。在实验中,通过对比证明点得分损失对模型具有加速收敛的效果;通过对比证明无卷积特征融合模块层间融合可以代替特征金字塔网络、路径聚合网络来发挥特征融合作用;通过对比点得分损失和置信度损失,证明了点得分损失有助于模型收敛、置信度损失更适合用作目标预测;通过对比CIOU损失与LTRB方法,减缓了小目标对预测目标中心点依赖度高的问题,并在COCO数据集中AP_s提高了 1.8%;使用全Transformer目标检测器与基线DETR进行消融实验对比,在中小规模数据集VOC0712数据集上,在相同的实验条件下,本文的模型在mAP上提高了 6%,本文提出模型训练30个轮次已经收敛,DETR训练150个轮次才收敛,收敛速度提高了 80%。
【Abstract】 With the continuous advancement of deep learning and computer vision research,Transformer models have surpassed or even completely surpassed the performance of convolutional neural networks in several directions in the field of computer vision.Among them,object detection is a key research direction in computer vision,with broad market prospects in important areas such as surveillance,violation detection,and medical image analysis.Given the recent development of convolutional neural networks,the current mainstream object detectors have relatively limited diversity in terms of their structures and frameworks,mainly adopting either fully convolutional neural network structures or a hybrid structure combining convolutional neural networks with Transformers.There is a lack of object detectors with a complete Transformer architecture.Due to the superior potential and performance exhibited by Transformers compared to convolutional neural networks,this thesis explores a fully Transformer-based object detection network,called AnchorFormer,with the aim of further advancing Transformer methods.To address the aforementioned issues,this thesis conducts the following research:It designs an object detector called AnchorFormer,which adopts a fully Transformer architecture.The Transformer encoder is used as the backbone network for feature extraction,while the Transformer decoder serves as the prediction head for object detection.While maintaining the unchanged encoder-decoder structure of Transformers,this thesis proposes a novel object detection method based on anchor points and anchor boxes.By redesigning the prediction head of the decoder and introducing fixed-region one-to-one predictions,anchor points,and anchor boxes as prior conditions and inductive biases,the fully Transformer object detector achieves good performance even on small to medium-sized datasets.The convergence of the Transformer object detector is accelerated by adding point-wise score loss to the category prediction branch.Additionally,this thesis investigates two different approaches,namely anchor-free and anchorbased methods,to explore the influence of anchor points and anchor boxes on the Transformer object detection model.New sample matching methods and conflict resolution solutions are designed for these two approaches.Furthermore,this thesis introduces a new non-convolutional feature fusion module called Layer Merging between the Transformer encoder and decoder to replace the role of convolutional neural network feature fusion modules such as feature pyramid networks and path aggregation networks.Multiple sets of controlled experiments are conducted in this thesis to demonstrate the effectiveness and superiority of the proposed object detector and detection methods.The experiments provide evidence for the acceleration of model convergence through point-wise score loss.The effectiveness of the Layer Merging module,which can replace feature pyramid networks and path aggregation networks for feature fusion,is verified through comparisons.The benefits of point-wise score loss for model convergence and the suitability of confidence loss for object prediction are demonstrated through comparisons between point-wise score loss and confidence loss.By comparing the CIOU Loss with the LTRB method,the problem of high dependency on the predicted object center for small objects is mitigated,resulting in a 1.8%improvement in AP_s on the COCO dataset.Comparative ablation experiments are conducted between the fully Transformer object detector proposed in this thesis and the baseline DETR.Under the same experimental conditions on the VOC0712 dataset with small to medium-sized data,the proposed model achieves a 6%improvement in mAP,and it converges after 30 training epochs,while DETR requires 150 epochs for convergence,resulting in an 80%improvement in convergence speed.
【Key words】 Transformer; DETR; Anchor Point; Anchor Box; Object detection;
- 【网络出版投稿人】 山东大学 【网络出版年期】2024年 01期
- 【分类号】TP391.41;TP183