BiFormer-Enhanced YOLOv11n for Accurate Maize Ear Detection in Seed Production Fields
Abstract
1. Introduction
2. Materials and Methods
2.1. Image Collection
2.2. Dataset Construction
2.3. Overview of the YOLOv11n Model
- Based on field investigations in seed maize fields, a majority of maize ears are partially occluded by leaves, stalks, and neighboring ears, resulting in incomplete feature exposure.
- Severe Background Interference: During the seed corn harvest season, the stalks, leaves, and ears all present highly uniform yellow hues. This extreme color similarity introduces intense background noise, making it exceptionally difficult to differentiate the corn ears from their surroundings.
- Shape-Insensitivity of Conventional IoU Metrics: The original Intersection over Union (IoU) metric lacks focus on target geometry, as it evaluates bounding box regression purely based on area overlap. This inherent limitation is significantly amplified when identifying elongated biological targets such as corn ears.
2.4. Proposed Architectural Modifications
- To address corn ear occlusion, C3k2 is integrated with an AdditiveBlock (convolutional additive self-attention block) in the backbone network to enhance feature extraction. This design combines convolution-based local feature extraction with additive global attention, preserving global contextual information.
- To distinguish corn ears from environments with similar colors, C2PSA is combined with the BRA mechanism to improve the model’s ability to suppress environmental interference. By first performing hierarchical processing and then enhancing the features, this mechanism also reduces computational complexity.
- The ShapeIoU loss function is employed to increase the model’s sensitivity to the shape characteristics of corn ears.
2.4.1. The C3k2_AdditiveBlock Module
2.4.2. The C2BRA Attention Module
- The First Tier (Screening Layer): It partitions the corn ear feature map into S × S distinct regions, computes regional features, and evaluates which sectors exhibit the highest correlation with the target object areas.
- The Second Tier (Background Suppression Layer): It conducts fine-grained feature interactions exclusively within the most relevant regions screened by the first tier, thereby effectively suppressing the influence of background interference.
2.4.3. The ShapeIoU Loss Function
3. Results
3.1. Experimental Environment
3.2. Model Evaluation Metrics
- TP (True Positive): Correctly detected targets.
- FP (False Positive): Incorrectly detected targets (false detections).
- FN (False Negative): Missed targets (missed detections).
3.3. Comparative Experiments of BiF-YOLO with State-of-the-Art Models
3.4. Ablation Study of the BiF-YOLO Model
3.5. Visualization of Background Clutter Suppression via C2BRA
3.6. Experimental Validation of the ShapeIoU Loss Function
3.7. In-Field Video Evaluation and Static Field Validation
4. Discussion
5. Conclusions
Author Contributions
Funding
Data Availability Statement
Acknowledgments
Conflicts of Interest
References
- Gao, G.; Wang, Q.; Song, L.; Feng, H.; Shi, L.; Yang, H.; Liu, Y.; Yue, J. Object Detection Method of Maize Ears Within Canopy Based on CornYOLO. Smart Agric. 2026, 8, 167–177. [Google Scholar]
- Yang, Y.; Luo, H.; Wang, H.; Jiang, J.; Liu, J.; Wei, J.; Fang, M. PestScope: Exclusion-Aware Large Multimodal Model for Fine-Grained Agricultural Pest Segmentation. IEEE Trans. Image Process. 2026, 35, 2034–2049. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Chen, G. Research and Application of a Lightweight Method for Sorting Seed Corn Ears Based on Deep Learning. Master’s Thesis, Gansu Agricultural University, Lanzhou, China, 2025. (In Chinese) [Google Scholar] [CrossRef]
- Li, Z. Design and Testing of a Corn Kernel Harvester Crushing Rate Detection Device. Master’s Thesis, Henan Agricultural University, Zhengzhou, China, 2024. (In Chinese) [Google Scholar] [CrossRef]
- Zheng, T.X.; Zhu, Y.L.; Liu, S.Y.; Li, Y.F.; Jiang, M.Z. Detection of citrus in the natural environment using Dense-TRU-YOLO. Int. J. Agric. Biol. Eng. 2025, 18, 260–266. [Google Scholar] [CrossRef] [Scilit]
- Sui, J.X.; Liu, L.; Wang, Z.X.; Yang, L. RE-YOLO: An apple picking detection algorithm fusing receptive-field attention convolution and efficient multi-scale attention. PLoS ONE 2025, 20, e0319041. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Ge, Y.H.; Lin, S.; Zhang, Y.H.; Li, Z.; Cheng, H.; Dong, J.; Wu, Z. Tracking and Counting of Tomato at Different Growth Period Using an Improving YOLO-Deepsort Network for Inspection Robot. Machines 2022, 10, 489. [Google Scholar] [CrossRef] [Scilit]
- Fu, Y.X.; Zheng, H.C.; Wang, Z.B.; Huang, J.Y.; Fu, W. Detection of multi-class coconut clusters for robotic picking under occlusion conditions. Int. J. Agric. Biol. Eng. 2025, 18, 267–278. [Google Scholar] [CrossRef] [Scilit]
- Ma, N.; Sun, Y.L.; Li, C.F.; Liu, Z.L.; Song, H.Y. AHG-YOLO: Multi-category detection for occluded pear fruits in complex orchard scenes. Front. Plant Sci. 2025, 16, 1580325. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Ge, B.; Jia, Z.; Guo, A.; Chen, W. CWDet-YOLO: A lightweight network for corn field weed detection based on YOLOv11. In International Conference on Image, Signal Processing, and Pattern Recognition (ISPP 2025); SPIE: New York, NY, USA, 2025. [Google Scholar] [CrossRef] [Scilit]
- Zhuang, Y.; Xu, K.; Li, M. Research and Experiments on a Lightweight Grape Cluster Stem Picking Point Localization Method Based on Improved YOLO v11n. J. Agric. Mach. 2025, 56, 618–627. (In Chinese) [Google Scholar]
- Zhang, T.; Li, L.; Zhou, Y.; Liu, W.; Qian, C.; Hwang, J.-N.; Ji, X. CAS-ViT: Convolutional additive self-attention vision transformers for efficient mobile applications. IEEE Trans. Image Process. 2026, 35, 1899–1909. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Deng, L.; Fang, D.; Ullah, A.; Hou, Q.; Yu, H. AMS-YOLO: Multi-scale feature integration for intelligent plant protection against maize pests. Front. Plant Sci. 2025, 16, 1640405. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Vaswani, A.; Shazeer, N.; Parmar, N.; Uszkoreit, J.; Jones, L.; Gomez, A.N.; Polosukhin, I. Attention is all you need. In Advances in Neural Information Processing Systems 30 (NIPS 2017); Curran Associates: Red Hook, NY, USA, 2017; pp. 5998–6008. [Google Scholar]
- Shi, H.; Zhu, Z.; Feng, X.; Xie, Y.; Guo, H.; Xue, P.; Wang, Y. A Detection Method of Pine Wilt Disease Based on Improved YOLOv11 with UAV Remote Sensing Images. Ecol. Evol. 2025, 15, e72823. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Zhu, L.; Wang, X.J.; Ke, Z.H.; Zhang, W.; Lau, R.W. BiFormer: Vision Transformer with Bi-Level Routing Attention. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR); IEEE: Piscataway, NJ, USA, 2023; pp. 10323–10333. [Google Scholar]
- Wang, Y.; Zhang, Y.; Yang, Y.; Pu, Y.; Huang, A.; Xi, D. YOLO-PT: A lightweight multi-scale YOLO for object detection and instance segmentation of maize pre-tassel. Smart Agric. Technol. 2026, 14, 102092. [Google Scholar] [CrossRef] [Scilit]
- Li, Z.; Li, J.; Shen, H.; Zhang, M.; Zhang, H.; Zhou, Y.; Yang, Z.; Lv, C. Neighborhood Attention-Based Detection for Maize Traits in Precision Agriculture. Agronomy 2025, 15, 931. [Google Scholar] [CrossRef] [Scilit]
- Yu, X.; Jiang, T.; Zhu, Y.; Li, L.; Fan, F.; Jin, X. FEL-YoloV8: A New Algorithm for Accurate Monitoring Soybean Seedling Emergence Rates and Growth Uniformity. IEEE Trans. Geosci. Remote Sens. 2025, 63, 1–12. [Google Scholar] [CrossRef] [Scilit]
- Wang, Q.; Liu, Y.; Zheng, Q.; Tao, R.; Liu, Y. SMC-YOLO: A High-Precision Maize Insect Pest-Detection Method. Agronomy 2025, 15, 195. [Google Scholar] [CrossRef] [Scilit]









| Computational Equation | |
|---|---|
| P | |
| R | |
| F1 | |
| AP@0.5 | |
| mAP@0.5 |
| Model | P | R | mAP@0.5 | FLOPS (G) | Size (MB) |
|---|---|---|---|---|---|
| SSD | 0.8935 | 0.857 | 0.9037 | 60.38 | 97.3 |
| EffcirntDet | 0.8544 | 0.836 | 0.9156 | 5.36 | 14.9 |
| YOLO V8 | 0.9088 | 0.896 | 0.9143 | 6.4 | 6.3 |
| YOLO v10 | 0.8973 | 0.886 | 0.9137 | 6.7 | 6.0 |
| YOLO v11 | 0.8952 | 0.868 | 0.9222 | 6.3 | 5.2 |
| BiF-YOLO | 0.9179 | 0.893 | 0.9277 | 6.6 | 5.8 |
| C3k2_AdditiveBlock | C2BRA | ShapeIoU | P | R | mAP@0.5 | F1-Score | FLOPS (G) | Size (MB) | |
|---|---|---|---|---|---|---|---|---|---|
| 1 | 0.8952 | 0.868 | 0.9222 | 0.8818 | 6.3 | 5.2 | |||
| 2 | √ | 0.9144 | 0.873 | 0.9226 | 0.8935 | 6.3 | 5.8 | ||
| 3 | √ | 0.9135 | 0.877 | 0.9131 | 0.8949 | 6.6 | 5.5 | ||
| 4 | √ | 0.8953 | 0.873 | 0.9233 | 0.8843 | 6.3 | 5.2 | ||
| 5 | √ | √ | 0.8935 | 0.889 | 0.9125 | 0.8912 | 6.6 | 5.5 | |
| 6 | √ | √ | 0.9036 | 0.873 | 0.9167 | 0.8885 | 6.3 | 5.2 | |
| 7 | √ | √ | 0.9149 | 0.860 | 0.9206 | 0.8869 | 6.6 | 5.6 | |
| 8 | √ | √ | √ | 0.9179 | 0.893 | 0.9277 | 0.9052 | 6.6 | 5.8 |
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. |
© 2026 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
Yin, X.; Zhao, L. BiFormer-Enhanced YOLOv11n for Accurate Maize Ear Detection in Seed Production Fields. Agronomy 2026, 16, 1780. https://doi.org/10.3390/agronomy16181780
Yin X, Zhao L. BiFormer-Enhanced YOLOv11n for Accurate Maize Ear Detection in Seed Production Fields. Agronomy. 2026; 16(18):1780. https://doi.org/10.3390/agronomy16181780
Chicago/Turabian StyleYin, Xunwei, and Liqing Zhao. 2026. "BiFormer-Enhanced YOLOv11n for Accurate Maize Ear Detection in Seed Production Fields" Agronomy 16, no. 18: 1780. https://doi.org/10.3390/agronomy16181780
APA StyleYin, X., & Zhao, L. (2026). BiFormer-Enhanced YOLOv11n for Accurate Maize Ear Detection in Seed Production Fields. Agronomy, 16(18), 1780. https://doi.org/10.3390/agronomy16181780
