Table of Contents
Fetching ...

A Segmentation-driven Editing Method for Bolt Defect Augmentation and Detection

Yangjie Xiao, Ke Zhang, Jiacun Wang, Xin Sheng, Yurong Guo, Meijuan Chen, Zehua Ren, Zhaoye Zheng, Zhenbing Zhao

TL;DR

The paper tackles the lack of defect data for bolt defect detection in transmission-line inspection by introducing SBDE, a segmentation-driven editing framework that converts normal bolt images into defective ones. SBDE combines Bolt-SAM for precise bolt-attribute segmentation with MOD-LaMa for accurate attribute editing, followed by ERA to place edited bolts back into original inspection scenes for realistic augmentation. Key innovations include the CLAHE-FFT Adapter and Multipart-Aware Mask Decoder for fine-grained segmentation, and a morphology-enhanced inpainting approach to edit bolt attributes while preserving background consistency. Experimental results show that SBDE-edited defect images outperform state-of-the-art editing methods and substantially improve bolt defect detection when used to augment datasets, demonstrating strong practical potential for data-scarce industrial settings.

Abstract

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.

A Segmentation-driven Editing Method for Bolt Defect Augmentation and Detection

TL;DR

The paper tackles the lack of defect data for bolt defect detection in transmission-line inspection by introducing SBDE, a segmentation-driven editing framework that converts normal bolt images into defective ones. SBDE combines Bolt-SAM for precise bolt-attribute segmentation with MOD-LaMa for accurate attribute editing, followed by ERA to place edited bolts back into original inspection scenes for realistic augmentation. Key innovations include the CLAHE-FFT Adapter and Multipart-Aware Mask Decoder for fine-grained segmentation, and a morphology-enhanced inpainting approach to edit bolt attributes while preserving background consistency. Experimental results show that SBDE-edited defect images outperform state-of-the-art editing methods and substantially improve bolt defect detection when used to augment datasets, demonstrating strong practical potential for data-scarce industrial settings.

Abstract

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.

Paper Structure

This paper contains 23 sections, 11 equations, 10 figures, 9 tables.

Figures (10)

  • Figure 1: The overall framework of the proposed method. SBDE combines segmentation and editing to generate defects, augmenting the defect detection dataset.
  • Figure 2: The architecture of our proposed Bolt-SAM. We incorporate the adapter module into each transformer layer to enhance features and adopt a multi-task fine-tuning mask decoder architecture to improve attribute segmentation accuracy. A fusion network built with a simple MLP is employed to integrate the complete attribute mask. The parameters of the original image encoder and prompt encoder are frozen, while the adapter module, mask decoder, and fusion network are set trainable.
  • Figure 3: Structure of MOD-LaMa. The interaction rules of the structural element $s$: light areas show intersections with the mask, while dark areas indicate no overlap. For erosion, $o$ is retained only if all pixels of $s$ fit within the mask (any deep red sets $o$ to 0). For dilation, $o$ is retained if any part of $s$ overlaps with the mask (any deep green sets $o$ to 1).
  • Figure 4: The workflow of ERA, which includes inspection image cropping, bolt editing, and defect recovery. It augments the inspection dataset for defect detection networks.
  • Figure 5: The construction process of the three datasets. They are obtained by annotating, cropping, and filtering the transmission line inspection images, where BAS only contains normal bolts and the pin attributes are divided into multiple masks.
  • ...and 5 more figures