2023年第5期仪表技术与传感器InstrumentTechniqueandSensor2023No.5收稿日期:2022-07-19基于双动态头SparseR-CNN的表面缺陷检测算法郑亚睿,蒋三新(上海电力大学电子与信息工程学院,上海201306)摘要:为了减少缺陷检测中的冗余检测,提出基于双动态头SparseR-CNN的缺陷检测算法,2个动态头的责任不同:第1个负责不同尺度和空间的特征提取,第2个负责匹配可学习的提议特征。为了更好地提取图像细节信息,改进特征金字塔(FPN)为特征金字塔网格(FPG),并且与第1个动态头相结合进行特征提取。其次,提出了交流注意力来改进检测阶段的多头自注意力模块,减少随着迭代注意力图相似导致建模能力下降的问题。最后,改进边框回归损失函数GIoU为Alpha-CIoU,加速收敛并提升检测的精度。实验结果表明:算法在晶圆和热轧钢2种表面缺陷数据集上都取得很好效果,平均精度分别为94.3%和88.1%。关键词:表面缺陷检测;动态头;稀疏预测;注意力机制;标签匹配;端到端预测中图分类号:TP391;TN407文献标识码:A文章编号:1002-1841(2023)05-0097-09SurfaceDefectDetectionAlgorithmBasedonDualDynamicHeadSparseR-CNNZHENGYa-rui,JIANGSan-xin(SchoolofElectronicandInformationEngineering,ShanghaiElectricPowerUniversity,Shanghai201306,China)Abstract:AdefectdetectionalgorithmbasedondualdynamicheadSparseR-CNNwasproposedtoreduceredundantdetec-tionindefectdetection.Theresponsibilitiesofthetwodynamicheadsweredifferent,thefirstwasresponsibleforfeatureextractionindifferentscalesandspaces,andthesecondwasresponsibleformatchinglearnableproposedfeatures.Thefeaturepyramidnet-work(FPN)wasimprovedtothefeaturepyramidgrid(FPG)andcombinedwiththefirstdynamicheadforfeatureextraction.Secondly,speaking-headattention(SHA)wasproposedtoimprovethemulti-headself-attentionmoduleinthedetectionstagetoreducethedeclineofmodelingabilitywiththesimilarityoftheiterativeattentiongraph.Finally,thelossfunctionGIoUofboun-dingboxregressionwasimprovedbyAlpha-CIoU,whichacceleratedconvergenceandimprovestheaccuracyofdetection.Theex-perimentalresultsshowthatthealgorithmhasachievedgreatresultsonthesurfacedefectdatasetsofthewaferandhotrolledsteel,andtheaverageaccuracyis94.3%and88.1%respectivel...