To address the challenges in insulator defect detection for transmission lines, including complex background interference, varying defect region scales, and sample imbalance, we propose a detection method that effectively integrates scene perception information and detailed content guidance. First, a scene perception enhancement module is employed to extract global environmental information, improving the baseline model’s adaptability to complex backgrounds. Second, a detailed content attention module is introduced to enable the model to more accurately capture fine-grained features of small defect regions. Furthermore, a normalized Wasserstein distance metric function is adopted to mitigate the sensitivity of the regression branch in the baseline model. Simultaneously, a sample weighting function is utilized to reduce the impact of sample imbalance on the classification branch. Experimental results demonstrate that the proposed method achieves superior detection performance on a real-world transmission line insulator defect dataset.
The fusion of infrared and visible images provides critical value in computer vision by integrating their complementary information, especially in the field of industrial detection, which provides a more reliable data basis for subsequent defect recognition. This paper presents STGAN, a novel Generative Adversarial Network framework based on a Swin Transformer for high-quality infrared and visible image fusion. Firstly, the generator employs a Swin Transformer as its backbone for feature extraction, which adopts a U-Net architecture, and the improved W-MSA is introduced into the bottleneck layer to enhance local attention and improve the expression ability of cross-modal features. Secondly, the discriminator uses a Markov discriminator to distinguish the difference. Then, the core GAN framework is leveraged to guarantee the retention of both infrared thermal radiation and visible-light texture details in the generated image so as to improve the clarity and contrast of the fused image. Finally, simulation verification showed that six out of seven indicators ranked in the top two, especially in key indicators such as PSNR, VIF, MI, and EN, which achieved optimal or suboptimal values. The experimental results on the general dataset show that this method is superior to the advanced method in terms of subjective vision and objective indicators, and it can effectively enhance the fine structure and thermal anomaly information in the image, which gives it great potential in the application of industrial surface defect detection.