Abstract:Power fittings inspection is a critical task in ensuring the safe operation of the power grid.To address the challenges of imbalanced fitings samples and complex background images leading to false and missed detections,an improved detection method based on the U-Net is presented.Firstly,a generative adversarial network is employed to generate synthetic fittings samples,alleviating the issue of imbalanced sample distribution in the dataset.Secondly,a foreground enhancement method is proposed,which applies a background mask to the feature map generated by the network and optimizes the corresponding loss function.Finally,an attention mechanism is integrated into the U-Net network to enhance the model's ability to extract fittings features in complex backgrounds.Experimental results demonstrate the effectiveness of the proposed algorithm in detecting fittings objects,the fittings detection accuracy reached 98.82%,the mean intersection over union reached 83.94%,the precision reached 91.01%,the recall reached 86.18%,and the mean average precision reached 89.73%.The proposed algorithm is not only applicable to normal fittings,but also effective in detecting rusty fittings.This approach provides a new perspective for the intelligent detection of fittings.