diffusion-generated-images-sharpen-ai-detection-of-faulty-power-grid-insulators
Diffusion-generated images sharpen AI detection of faulty power grid insulators

Diffusion-generated images sharpen AI detection of faulty power grid insulators

Power grid operators increasingly rely on drones to photograph insulators on high-voltage transmission lines, but teaching artificial intelligence to spot a cracked or flashover-damaged insulator from those images has long been hampered by a stubborn problem: there are far too few pictures of faulty equipment to train on. A research team led by Stefano Frizzo Stefenon, João Pedro Matos-Carvalho, Viviana Cocco Mariani, Leandro dos Santos Coelho and Kin-Choong Yow now reports a cascaded deep learning framework that tackles this imbalance with synthetic images generated by a conditional diffusion model, while also making the model’s decisions visible to human inspectors. The work, published in Autonomous Intelligent Systems, combines a state-of-the-art object detector, a transformer-based classifier and a novel explainability method into a single pipeline for autonomous inspection of electrical infrastructure.

The core of the system is a two-stage architecture the authors call YOLO26-Swin. In the first stage, a You Only Look Once version 26 extra-large model, or YOLO26x, locates insulators in an image by drawing bounding boxes around them. In the second stage, a Shifted windows Vision Transformer, Swin-V2-B, classifies the content of each bounding box as a good insulator, a broken insulator, or one damaged by flashover. Keeping detection and classification separate, the researchers argue, allows each component to be optimized for its own task. The detector’s hyperparameters were not left to chance: Bayesian optimization built on a Gaussian process surrogate ran 50 trials over learning rate, momentum, optimizer choice and weight decay, ultimately settling on a learning rate of 0.01, momentum of 0.001, a stochastic gradient descent optimizer and a weight decay of 0.0359.

To address the data imbalance, the team turned to generative artificial intelligence. Their dataset, drawn from high-resolution photographs taken with digital single-lens reflex cameras during power grid inspections and sourced from a public repository, contains 1,596 images with 17,108 annotated bounding-box instances. The class distribution is heavily skewed: insulators with no issues account for 78.1 percent of annotations, flashover damage for 15.0 percent, and broken insulators for just 6.9 percent. Because fault classes are so thinly represented, the researchers trained a conditional diffusion model to synthesize realistic images of broken and flashover-damaged insulators, generating them in a single run. Diffusion models work by gradually adding noise to data and then learning to reverse that process, and the authors note they tend to be more stable during training than generative adversarial networks, offering better coverage of the data distribution and avoiding mode collapse.

The synthetic images proved their worth in head-to-head comparisons with a conditional Wasserstein GAN. For high-resolution 256 by 256 pixel images, the baseline classifier trained only on real data achieved an F1-score of 0.96887. The best Wasserstein GAN setting raised that to 0.98953, while the best conditional diffusion configuration pushed it further to 0.98986, using 5,000 synthetic images generated at 2,500 training epochs. Qualitatively, the diffusion-generated images became difficult to distinguish from real photographs after about 2,500 epochs, and for broken insulators the model produced variability in component colors and backgrounds, exactly the diversity data augmentation is meant to provide. The gains were even more pronounced at low resolution: for 32 by 32 pixel crops, diffusion augmentation lifted the F1-score to 0.98149, about 1.26 percentage points above the non-augmented baseline, while the Wasserstein GAN managed 0.97999.

That advantage came at a steep computational price. Training the conditional diffusion generator took 607.19 hours, roughly 25 days, to complete 5,000 epochs for 256 by 256 images, 5.06 times longer than the Wasserstein GAN’s 120 hours. At 32 by 32 resolution the gap widened to 16.45 times, with diffusion requiring 36.91 hours against 22.15 hours for the GAN. The authors conclude that diffusion-based augmentation is justified when maximum predictive performance matters and the augmentation can be done once offline, whereas the GAN remains the more economical choice for pipelines that retrain frequently. Notably, synthetic images are used only during training; at inference time the system processes only real inspection photographs.

The full framework’s headline numbers are an F1-score of 0.98149 and a mean Average Precision at an intersection-over-union threshold of 0.5, mAP@[0.5], of 0.98951, which the authors report as exceeding all compared models. In the detection stage alone, YOLO26x reached the best mAP@[0.5] among evaluated detectors at 0.98821, outperforming DETR, Faster R-CNN, RetinaNet, SSD, YOLOv10 through YOLO26 variants and modified YOLO models such as STN-YOLO and SAE-YOLO. Traditional detectors like Faster R-CNN achieved mAP@[0.5] values around 0.90 but suffered sharply under the stricter mAP@[0.5:0.95] metric and needed inference times of up to 80.23 milliseconds. For classification, Swin-V2-B beat VGG, ResNet, EfficientNet, Vision Transformer and other Swin variants, earning the highest combined precision and recall as measured by F1-score.

Performance, however, carries a computational bill. The complete model demands 208.50 giga floating-point operations per second of complexity and 23.41 hours of training covering both detection and classification, with a combined inference time of 32.18 milliseconds. The authors argue this remains compatible with real-time applications, since the detection stage alone runs in about 14.67 milliseconds and classification in roughly 17.51 milliseconds on an NVIDIA RTX 3060 Ti GPU. They also outline lightweighting paths, including swapping Swin-V2-B for the smaller Swin-V2-T, reducing input resolution, choosing compact nano or small YOLO variants, and applying pruning, quantization or TensorRT acceleration for deployment on low-power drone-mounted edge devices.

Perhaps the most distinctive contribution is the explainability layer. Deep networks that flag a fault give inspectors no inherent reason to trust the verdict, which matters in a domain where a wrong call can mean costly operational failures or safety hazards. The team merged SHAP, a game-theoretic technique that attributes each input feature’s contribution to the model’s output, with Class Activation Mapping, which highlights the spatial regions driving a prediction. Their hybrid SHAP-CAM method computes a CAM heatmap using techniques such as XGradCAM, HiResCAM or ScoreCAM, retains only positive SHAP contributions, smooths them with a Gaussian filter, and multiplies the two maps element-wise. This acts as a gating mechanism, preserving only image locations that are important both in feature attribution and in class activation. The authors report that the fusion highlights the exact fault location more clearly than standalone CAM methods, which tended to spill beyond the fault boundaries, or SHAP alone, which is harder to interpret visually.

The researchers are candid about limitations. The framework was evaluated on images captured in favorable weather conditions, and validation under rain, fog and occlusion remains an open challenge, partly because publicly available datasets representing such scenarios are scarce. The heavy computational cost of diffusion-based augmentation is manageable only for offline workflows. Still, the results suggest a practical recipe for critical infrastructure inspection: generate synthetic fault images where real ones are rare, split detection and classification into specialized stages, tune hyperparameters systematically, and build interpretability directly into the pipeline. As utilities worldwide scale up drone-based inspection of aging grids, frameworks like this one aim to make the AI’s judgment both more accurate and more transparent to the engineers who act on it.

Subject of Research: A deep learning framework using diffusion-based data augmentation and explainable AI for detecting and classifying faulty power grid insulators

Article Title: Diffusion-augmented YOLO26-Swin cascaded framework with hybrid SHAP-CAM for autonomous power grid inspection

Article References: Stefenon, S. F., Matos-Carvalho, J. P., Mariani, V. C., dos Santos Coelho, L., & Yow, K.-C. (2026). Diffusion-augmented YOLO26-Swin cascaded framework with hybrid SHAP-CAM for autonomous power grid inspection. Autonomous Intelligent Systems, 6(1), Article 13. https://doi.org/10.1007/s43684-026-00135-2

Image Credits: AI Generated

DOI: 10.1007/s43684-026-00135-2

Keywords: power grid inspection, insulator fault detection, diffusion models, YOLO26, Swin transformer, data augmentation, explainable AI, SHAP, class activation mapping, deep learning, unmanned aerial vehicles, Bayesian optimization