Abstract
<title>Abstract</title> <p>Accurate detection of transmission-line insulator defects is essential for power-system inspection, yet it remains challenging because of unstable localization of tiny defects, severe interference from complex backgrounds, and insufficient exploitation of hierarchical structural priors. To address these issues, this paper proposes HCL-YOLOv8, a lightweight detection framework enhanced by hierarchical consistency learning. Built upon YOLOv8n, the proposed method leverages the natural hierarchical relationship in which defect instances are typically located within or near insulator string regions. Specifically, a P2 high-resolution detection head is introduced to improve small-object visibility, and a Soft Boundary Prior Branch (SBP-Branch) is designed to guide the network toward defect-relevant parent regions. To incorporate hierarchical priors into training, a Hierarchy-Constrained Task-Aligned Label Assignment strategy is proposed to restrict positive-sample selection for defect classes to geometrically valid parent regions, thereby reducing noisy positives outside insulator strings. Furthermore, a Hierarchical Containment Regularization Loss is developed to explicitly enforce the containment consistency between defect boxes and their matched parent boxes during training. To improve regression stability for tiny defects, a Small-Object-aware Normalized Gaussian Wasserstein Distance loss is introduced for defect-class positive samples. At inference time, a Hierarchy-aware Soft Re-scoring strategy is applied after non-maximum suppression to suppress high-confidence defect predictions outside insulator strings while preserving recall. In addition, a defect-sensitive stratified offline augmentation strategy is adopted to alleviate data imbalance and improve robustness under complex imaging degradations. Experiments conducted on the public insulator defect dataset released by Zheng et al. in Sensors show that the proposed method achieves a Precision of 0.923, a Recall of 0.911, an mAP@0.5 of 0.923, and an mAP@0.5:0.95 of 0.599 with only 3.12M parameters. Compared with the YOLOv8n baseline, Recall is improved by 3.4 percentage points and mAP@0.5 by 1.5 percentage points. These results indicate that HCL-YOLOv8 improves the detection of small defects, particularly flashover defects, while maintaining a favorable balance between detection performance and lightweight deployment requirements.</p>