Lightweight Power-Line Visual Detection in Agricultural UAV Scenarios Based on an Improved YOLOv12n Model
Abstract
1. Introduction
2. Materials and Methods
2.1. Power-Line Image Acquisition in Agricultural Environments
2.2. YOLOv12 Network
2.3. YOLO-PL Network
2.3.1. Backbone Improvement
2.3.2. DSM-A2C2f Module
2.3.3. Head Network Improvement
3. Experiments and Evaluation Metrics
3.1. Model Training Device and Parameter Setup
3.2. Evaluation Metrics
4. Results
4.1. Ablation Experiments
4.2. Model Evaluation Experiment
- excessive downsampling, causing feature loss for fine power-line structures;
- the Anchor-Based mechanism, which shows poor adaptability to elongated targets, limiting its ability to match the shape of power lines;
- the Focus structure, while reducing computational cost, introduces additional noise, slightly degrading accuracy.
5. Discussion and Conclusions
5.1. Advantages
- The proposed YOLO-PL model enhances detection capability and robustness while improving inference speed and reducing computational cost, by integrating specialized convolutional layers tailored to the geometric characteristics of power lines. Experimental results on the inference platform show that YOLO-PL outperforms the baseline model in terms of inference speed, dataset scalability, recall, and mAP. The model achieves an average detection accuracy of 75.5%, an inference speed of 88.36 FPS, and 2.8 GFLOPs, making it more suitable for deployment and application on UAV-based mobile platforms compared to the baseline model.
- Compared with other mainstream lightweight models, under identical experimental conditions, YOLO-PL demonstrates significant advantages in lightweight efficiency, detection precision, localization accuracy, and robustness, exhibiting superior generalization ability during testing. The ablation experiments further confirm that each proposed module contributes positively to model performance. Although model lightweighting may slightly reduce detection accuracy, the incorporation of Dynamic Snake Convolution and Multi-Scale Cross-Axis Attention in the neck network compensates for this loss and enhances both detection robustness and localization precision without increasing computational cost. In comparative experiments, YOLO-PL achieves frame rate improvements of 25.74, 21.13, 28.05, 13.91 and 44.49 FPS, mAP0.5 improvements of 9.0%, 9.9%, 11.2% and 5.3%, exhibits a mere 1.6 percentage point reduction relative to RF-DETR-Nano, and mAP0.5~0.95 improvements of 9.3%, 10.5%, 9.6%, 5.2% and 1.6% over other YOLO lightweight models. These results confirm that YOLO-PL satisfies the computational constraints of UAV platforms, achieving faster detection and accurate localization performance in complex and variable agricultural environments and across diverse operational modes, providing reliable visual perception for autonomous power-line avoidance in UAV applications.
5.2. Future Perspectives
Author Contributions
Funding
Data Availability Statement
Acknowledgments
Conflicts of Interest
References
- Zhou, Z.; Ming, R.; Zang, Y.; He, X.; Luo, X.; Lan, Y. Development status and countermeasures of agricultural aviation in China. Trans. Chin. Soc. Agric. Eng. 2017, 33, 1–13, (In Chinese with English Abstract). [Google Scholar]
- Gong, W.; Yu, Z.; Yang, L.; Chu, W.; Wan, X. Millimeter-Wave Radar-Based Obstacle Classification Method for Unmanned Aerial Vehicles. Radar Sci. Technol. 2025, 23, 317–327, (In Chinese with English Abstract). [Google Scholar]
- Wang, S.; Zhao, Z.; Liu, H. Power Corridor Safety Hazard Detection Based on Airborne 3D Laser Scanning Technology. ISPRS Int. J. Geo-Inf. 2024, 13, 392. [Google Scholar] [CrossRef] [Scilit]
- Zhao, W.; Dong, Q.; Zuo, Z. A Method Combining Line Detection and Semantic Segmentation for Power Line Extraction from Unmanned Aerial Vehicle Images. Remote Sens. 2022, 14, 1367. [Google Scholar] [CrossRef] [Scilit]
- Li, T.; An, D.; Lai, J. Unmanned Aerial Vehicle Transmission Line Detection Based on Unsupervised Domain Adaptation Algorithm. Optoelectron. Technol. 2024, 44, 345–349, (In Chinese with English Abstract). [Google Scholar]
- Hu, J.; He, J.; Guo, C. End-to-End Powerline Detection Based on Images from UAVs. Remote Sens. 2023, 15, 1570. [Google Scholar] [CrossRef] [Scilit]
- Qin, L.; Wang, C.; Bian, H.; Cui, H.; Wang, X. Power line semantic segmentation network based on Transformer and DeepLabv3+. Mod. Electron. Tech. 2024, 47, 109–116, (In Chinese with English Abstract). [Google Scholar]
- Nguyen, V.N.; Jenssen, R.; Roverso, D. LS-Net: Fast single-shot line-segment detector. Mach. Vis. Appl. 2020, 32, 12. [Google Scholar] [CrossRef] [Scilit]
- Tran, D.K.; Nguyen, V.N.; Roverso, D.; Jenssen, R.; Kampffmeyer, M. LSNetv2: Improving weakly supervised power line detection with bipartite matching. Expert Syst. Appl. 2024, 250, 123773. [Google Scholar] [CrossRef] [Scilit]
- Xu, C.; Li, Q.; Zhou, Q.; Zhang, S.; Yu, D.; Ma, Y. Power Line-Guided Automatic Electric Transmission Line Inspection System. IEEE Trans. Instrum. Meas. 2022, 71, 3512118. [Google Scholar] [CrossRef] [Scilit]
- Xu, Y.; Xu, W.; Cheung, D.; Tu, Z. Line Segment Detection Using Transformers without Edges. arXiv 2021, arXiv:2101.01909. [Google Scholar] [CrossRef] [Scilit]
- Power Line Detection Based on Subpixel-Neighborhood Attention in Complex Terrain Backgrounds. Available online: https://xplorestaging.ieee.org/document/10381611 (accessed on 9 December 2025).
- Yan, J.; Zhang, X.; Shen, S.; He, X.; Xia, X.; Li, N.; Wang, S.; Yang, Y.; Ding, N. A Real-Time Strand Breakage Detection Method for Power Line Inspection with UAVs. Drones 2023, 7, 574. [Google Scholar] [CrossRef] [Scilit]
- Li, K.; Liu, M.; Wang, F.; Guo, X.; Han, G.; Bai, X.; Liu, C. Learning to Utilize Multi-Scale Feature Information for Crisp Power Line Detection. Electronics 2025, 14, 2175. [Google Scholar] [CrossRef] [Scilit]
- Lan, Y.; Sun, B.; Zhang, L.; Zhao, D. Identifying diseases and pests in ginger leaf under natural scenes using improved YOLOv5s. Trans. Chin. Soc. Agric. Eng. 2024, 40, 210–216, (In Chinese with English Abstract). [Google Scholar]
- Guo, L.; Huang, J.; Wu, Y. Detecting rice diseases using improved lightweight YOLOv8n. Trans. Chin. Soc. Agric. Eng. (Trans. CSAE) 2025, 41, 156–164, (In Chinese with English Abstract). [Google Scholar]
- Chen, J.; Ma, A.; Huang, L.; Su, Y.; Li, W.; Zhang, H.; Wang, Z. GA-YOLO: A Lightweight YOLO Model for Dense and Occluded Grape Target Detection. Horticulturae 2023, 9, 443. [Google Scholar] [CrossRef] [Scilit]
- Liu, C.; Wei, S.; Zhong, S.; Yu, F. YOLO-PowerLite: A Lightweight YOLO Model for Transmission Line Abnormal Target Detection. IEEE Access 2024, 12, 105004–105015. [Google Scholar] [CrossRef] [Scilit]
- Lan, Y.; Wang, L.; Zhang, Y. Application and prospect on obstacle avoidance technology for agricultural UAV. Trans. Chin. Soc. Agric. Eng. 2018, 34, 104–113, (In Chinese with English Abstract). [Google Scholar]
- Tian, Y.; Ye, Q.; Doermann, D. YOLOv12: Attention-Centric Real-Time Object Detectors. arXiv 2025, arXiv:2502.12524. [Google Scholar] [CrossRef] [Scilit]
- Tan, M.; Le, Q.V. EfficientNetV2: Smaller Models and Faster Training. arXiv 2021, arXiv:2104.00298. [Google Scholar] [CrossRef] [Scilit]
- Qi, Y.; He, Y.; Qi, X.; Zhang, Y.; Yang, G. Dynamic Snake Convolution Based on Topological Geometric Constraints for Tubular Structure Segmentation. In Proceedings of the IEEE/CVF International Conference on Computer Vision, Paris, France, 1–6 October 2023. [Google Scholar]
- Shao, H.; Zeng, Q.; Hou, Q.; Yang, J. MCANet: Medical Image Segmentation with Multi-Scale Cross-Axis Attention. arXiv 2023, arXiv:2312.08866. [Google Scholar] [CrossRef] [Scilit]
- Han, K.; Wang, Y.; Guo, J.; Wu, E. ParameterNet: Parameters Are All You Need. arXiv 2024, arXiv:2306.14525. [Google Scholar] [CrossRef] [Scilit]
- Abdelfattah, R.; Wang, X.; Wang, S. TTPLA: An Aerial-Image Dataset for Detection and Segmentation of Transmission Towers and Power Lines. Available online: https://arxiv.org/abs/2010.10032v1 (accessed on 12 June 2025).
- Son, H.-S.; Kim, D.-K.; Yang, S.-H.; Choi, Y.-K. Real-Time Power Line Detection for Safe Flight of Agricultural Spraying Drones Using Embedded Systems and Deep Learning. IEEE Access 2022, 10, 54947–54956. [Google Scholar] [CrossRef] [Scilit]
- Tan, M.; Le, Q.V. EfficientNet: Rethinking Model Scaling for Convolutional Neural Networks. arXiv 2020, arXiv:1905.11946. [Google Scholar] [CrossRef] [Scilit]
- Yu, F.; Koltun, V. Multi-Scale Context Aggregation by Dilated Convolutions. arXiv 2016, arXiv:1511.07122. [Google Scholar] [CrossRef] [Scilit]
- Sifre, L.; Mallat, S. Rigid-Motion Scattering for Texture Classification. arXiv 2014, arXiv:1403.1687. [Google Scholar] [CrossRef] [Scilit]
- Hu, J.; Shen, L.; Albanie, S.; Sun, G.; Wu, E. Squeeze-and-Excitation Networks. arXiv 2019, arXiv:1709.01507. [Google Scholar] [CrossRef] [Scilit]
- Liu, Z.; Mu, H.; Zhang, X.; Guo, Z.; Yang, X.; Cheng, K.-T.; Sun, J. MetaPruning: Meta Learning for Automatic Neural Network Channel Pruning. arXiv 2019, arXiv:1903.10258. [Google Scholar] [CrossRef] [Scilit]
- Wang, C.-Y.; Bochkovskiy, A.; Liao, H.-Y.M. YOLOv7: Trainable bag-of-freebies sets new state-of-the-art for real-time object detectors. arXiv 2022, arXiv:2207.02696. [Google Scholar] [CrossRef] [Scilit]
- Wang, C.; Chen, Y.; Wu, Z.; Liu, B.; Tian, H.; Jiang, D.; Sun, X. Line-YOLO: An Efficient Detection Algorithm for Power Line Angle. Sensors 2025, 25, 876. [Google Scholar] [CrossRef] [Scilit]
- Robinson, I.; Robicheaux, P.; Popov, M.; Ramanan, D.; Peri, N. RF-DETR: Neural Architecture Search for Real-Time Detection Transformers. arXiv 2025, arXiv:2511.09554. [Google Scholar] [CrossRef] [Scilit]
- Zhang, Y.; Xiao, Y.; Zhang, Y.; Zhang, T. Video saliency prediction via single feature enhancement and temporal recurrence. Eng. Appl. Artif. Intell. 2025, 160, 111840. [Google Scholar] [CrossRef] [Scilit]













| Obscuration | Front-Lighting | Back-Lighting | Side-Lighting |
|---|---|---|---|
| Yes | 212 | 208 | 459 |
| No | 387 | 301 | 769 |
| Training Parameters | Value |
|---|---|
| Image Size | 1 × 3 × 640 × 640 |
| Number of Iterations | 300 |
| Batch Size | 32 |
| Initial Learning Rate | 0.001 |
| Weight Decay Coefficient | 0.0005 |
| Momentum | 0.937 |
| NO. | EfficientNetV2 | DSConv | MSCA Attention | ParameterNet | FLOPs (G) | R (%) | FPS (s−1) | P (×106 M) | mAP0.5 (%) | mAP0.5~0.95 (%) |
|---|---|---|---|---|---|---|---|---|---|---|
| 1 | × | × | × | × | 6.5 | 71.2 | 62.41 | 2.56 | 67.2 | 52.5 |
| 2 | √ | × | × | × | 3.0 | 70.3 | 85.00 | 1.90 | 62.9 | 48.4 |
| 3 | √ | √ | × | × | 2.7 | 71.2 | 85.14 | 1.96 | 74.7 | 56.9 |
| 4 | √ | √ | √ | × | 2.7 | 70.5 | 85.50 | 1.96 | 75.2 | 58.5 |
| 5 | × | × | × | √ | 6.2 | 70.4 | 68.02 | 2.54 | 67.3 | 51.4 |
| 6 | √ | × | √ | × | 3.1 | 69.7 | 84.48 | 1.90 | 65.1 | 54.8 |
| 7 | × | × | √ | × | 6.5 | 69.2 | 62.03 | 2.22 | 70.5 | 55.3 |
| 8 | × | √ | × | × | 6.3 | 71.4 | 64.22 | 2.52 | 77.4 | 55.2 |
| 9 | × | √ | × | √ | 4.7 | 67.0 | 70.03 | 2.52 | 74.8 | 54.8 |
| 10 | × | × | √ | √ | 5.5 | 68.5 | 65.72 | 2.24 | 66.7 | 53.8 |
| 11 | √ | × | × | √ | 2.8 | 67.3 | 84.82 | 1.90 | 60.1 | 48.1 |
| 12 | × | √ | √ | × | 6.2 | 70.6 | 64.08 | 2.50 | 77.7 | 58.3 |
| 13 | √ | × | √ | √ | 2.8 | 65.7 | 88.40 | 1.91 | 63.9 | 45.8 |
| 14 | × | √ | √ | √ | 5.5 | 66.8 | 69.00 | 2.22 | 73.4 | 59.7 |
| 15 | √ | √ | √ | √ | 2.8 | 71.8 | 88.36 | 1.92 | 75.5 | 60.9 |
| Parameter | FLOPs (G) | Model Size (MB) | mAP0.5 (%) | mAP0.5~0.95 (%) | R (%) | FPS | |
|---|---|---|---|---|---|---|---|
| YOLOv8n | 3.16 | 8.9 | 6.2 | 66.5 | 51.6 | 68.3 | 62.62 |
| YOLOv5n | 4.24 | 11.9 | 3.9 | 65.6 | 50.4 | 65.6 | 67.23 |
| YOLOv11n | 2.59 | 6.4 | 5.3 | 64.3 | 51.3 | 66.9 | 60.31 |
| Line-YOLO | 5.22 | 24.3 | 7.3 | 70.2 | 55.7 | 69.2 | 74.45 |
| RF-DETR-Nano | 5.86 | 11.3 | 357.5 | 77.1 | 59.3 | 74.6 | 43.87 |
| YOLO-PL | 2.05 | 2.8 | 4.1 | 75.5 | 60.9 | 71.8 | 88.36 |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2025 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license.
Share and Cite
Ge, Y.-T.; Wang, B.-J.; Sun, S.; Lan, Y.-B. Lightweight Power-Line Visual Detection in Agricultural UAV Scenarios Based on an Improved YOLOv12n Model. Sensors 2026, 26, 109. https://doi.org/10.3390/s26010109
Ge Y-T, Wang B-J, Sun S, Lan Y-B. Lightweight Power-Line Visual Detection in Agricultural UAV Scenarios Based on an Improved YOLOv12n Model. Sensors. 2026; 26(1):109. https://doi.org/10.3390/s26010109
Chicago/Turabian StyleGe, Yi-Tong, Bao-Ju Wang, Shuai Sun, and Yu-Bin Lan. 2026. "Lightweight Power-Line Visual Detection in Agricultural UAV Scenarios Based on an Improved YOLOv12n Model" Sensors 26, no. 1: 109. https://doi.org/10.3390/s26010109
APA StyleGe, Y.-T., Wang, B.-J., Sun, S., & Lan, Y.-B. (2026). Lightweight Power-Line Visual Detection in Agricultural UAV Scenarios Based on an Improved YOLOv12n Model. Sensors, 26(1), 109. https://doi.org/10.3390/s26010109

