Bolt defect detection is critical to ensure the safety of transmission lines. However, the scarcity of defect images and imbalanced data distributions significantly limit detection performance. To address this problem, we propose a segmentationdriven bolt defect editing method (SBDE) to augment the dataset. First, a bolt attribute segmentation model (Bolt-SAM) is proposed, which enhances the segmentation of complex bolt attributes through the CLAHE-FFT Adapter (CFA) and Multipart- Aware Mask Decoder (MAMD), generating high-quality masks for subsequent editing tasks. Second, a mask optimization module (MOD) is designed and integrated with the image inpainting model (LaMa) to construct the bolt defect attribute editing model (MOD-LaMa), which converts normal bolts into defective ones through attribute editing. Finally, an editing recovery augmentation (ERA) strategy is proposed to recover and put the edited defect bolts back into the original inspection scenes and expand the defect detection dataset. We constructed multiple bolt datasets and conducted extensive experiments. Experimental results demonstrate that the bolt defect images generated by SBDE significantly outperform state-of-the-art image editing models, and effectively improve the performance of bolt defect detection, which fully verifies the effectiveness and application potential of the proposed method. The code of the project is available at https://github.com/Jay-xyj/SBDE.
翻译:螺栓缺陷检测对保障输电线路安全至关重要。然而,缺陷图像稀缺与数据分布不均衡严重制约了检测性能。为解决该问题,本文提出一种分割驱动的螺栓缺陷编辑方法(SBDE)以增强数据集。首先,提出螺栓属性分割模型(Bolt-SAM),通过CLAHE-FFT适配器(CFA)与多部件感知掩码解码器(MAMD)增强复杂螺栓属性的分割能力,为后续编辑任务生成高质量掩码。其次,设计掩码优化模块(MOD)并与图像修复模型(LaMa)集成,构建螺栓缺陷属性编辑模型(MOD-LaMa),通过属性编辑将正常螺栓转换为缺陷螺栓。最后,提出编辑恢复增强(ERA)策略,将编辑后的缺陷螺栓恢复并置入原始巡检场景中,从而扩展缺陷检测数据集。我们构建了多个螺栓数据集并开展大量实验。实验结果表明,SBDE生成的螺栓缺陷图像显著优于当前最先进的图像编辑模型,并能有效提升螺栓缺陷检测性能,充分验证了所提方法的有效性与应用潜力。项目代码公开于https://github.com/Jay-xyj/SBDE。