Next Article in Journal
Short-Term Cadmium and Lead Exposure in Common Buckwheat: Metal Accumulation, Physiological Responses, and Compositional Changes
Previous Article in Journal
Evaluating the Spatiotemporal Evolution and Divergent Drivers of Agricultural Drought in the North China Plain Using SSMI
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

BiFormer-Enhanced YOLOv11n for Accurate Maize Ear Detection in Seed Production Fields

College of Mechanical and Electrical Engineering, Qingdao Agricultural University, Qingdao 266109, China
*
Author to whom correspondence should be addressed.
Agronomy 2026, 16(18), 1780; https://doi.org/10.3390/agronomy16181780
Submission received: 21 July 2026 / Revised: 1 September 2026 / Accepted: 9 September 2026 / Published: 10 September 2026
(This article belongs to the Section Precision and Digital Agriculture)

Abstract

Accurate identification of maize ears during harvesting is a prerequisite for enabling automated operations and yield estimation in the seed maize industry. Utilizing computer vision algorithms to assist seed maize harvesters in adjusting operating conditions in real time can significantly enhance harvesting quality. To address existing challenges in ear recognition during active harvesting—such as large variations in individual ear sizes, complex field environments, and difficulties in dynamic scene perception—this paper proposes an improved model, BiF-YOLO, to achieve precise recognition of seed maize ears during the harvest season. This model is based on the YOLOv11n model and the BiFormer architecture. Three targeted enhancement strategies are proposed to optimize the model; (1) to enhance the recognition capability for occluded and small-sized maize ears in the field, a C3k2_AdditiveBlock module is embedded into the feature extraction network; (2) to suppress background interference during recognition, focus on the maize ear regions, and reduce missed and false detections, a C2BRA dual-layer routing attention mechanism (Cross-stage partial 2 Bottleneck with Residual Attention) is established; (3) the ShapeIoU loss function is employed to improve the model’s attention to the shape characteristics of maize ears themselves. Seed maize ear images were collected from seed production fields in Jiaozhou and Zhangye. The experimental results validated that the BiF-YOLO model effectively adapts to complex in-field operational scenarios.

1. Introduction

Corn has a significant impact on global food security [1], China is a globally critical producer and exporter of seed corn. In the development of modern precision agriculture for seed corn, Due to the high similarity between the colour of the seed-production maize cobs and the surrounding environment [2]. reducing harvesting losses and accurately acquiring spatial ear information across different field zones remain critical challenges currently faced by the industry [3]. Currently, data regarding seed corn yield and growth density mostly rely on manual measurements, which suffer from low efficiency, high labor intensity, and significant error rates, making it difficult to meet the stringent requirements of modern precision agriculture. To address this, deep learning-based recognition algorithms have provided crucial technical support, enabling simultaneous intelligent identification and counting of corn ears during harvesting operations. This provides key data such as the quantity and distribution density of corn ears in corresponding areas. By analyzing these data, harvesting strategies can be optimized; specifically, the operating conditions of the corn harvester can be dynamically adjusted based on regional variations in ear density, thereby improving harvesting efficiency and reducing damage rates [4]. Furthermore, comparing the performance of corn ear data across different zones helps trace issues arising from agricultural operations in those specific areas, providing a valuable data reference for the subsequent planting season. Therefore, there is an urgent need to develop a model tailored for identifying corn ears in complex field environments.
Currently, numerous agricultural research institutions both domestically and internationally have focused on computer vision research in agriculture. To accurately identify mature citrus fruits in orchards, Zheng et al. proposed a UNet++FPN structure by combining UNet++ with a Feature Pyramid Network (FPN). The core idea is to increase cross-layer connections and multi-scale feature interactions, further enhancing the fusion of shallow detailed information and deep semantic information, and improving the model’s capability to extract boundary information for small targets [5]. To address challenges such as occlusion, dense distribution, and illumination variations during apple detection in complex orchard environments, Sui et al. introduced the RFAConv convolution module to enhance key regional feature extraction capabilities. They utilized EMA_C2f to improve multi-scale feature representation and adopted the WIoU loss function to optimize the bounding box regression process, thereby enhancing the model’s adaptability during feature extraction [6]. To resolve the heavy computational burden associated with tomato detection, Ge et al. proposed a tomato detection method that integrates a lightweight network with an attention mechanism. This method utilizes ShuffleNetV2 to construct a lightweight feature extraction network and employs the CBAM attention mechanism to enhance target feature representation, minimizing the computational load of the model while maintaining detection accuracy [7]. For coconut harvesting scenarios involving leaf occlusion, trunk obstruction, and dense fruit cluster distribution, Fu et al. introduced the ECA attention mechanism to bolster target feature expression, utilized RepConv to enhance the network’s semantic feature learning capability, and adopted BiFPN to achieve weighted fusion of multi-scale features, thus improving the overall feature learning capability of the network [8]. Targeting fruit occlusion and overlapping in pear orchards, Ma et al. proposed using the ADown downsampling module to enhance small target feature extraction, an EfficientHead based on group convolution and parameter sharing mechanisms to reduce computational complexity, and the GIoU loss function to optimize bounding box regression, achieving accurate classification and detection of occluded and overlapping fruits [9]. While these existing studies have made significant contributions, most focus primarily on feature extraction while neglecting the impact of environmental interference. For example, when the target object shares a highly similar color with the surrounding environment, feature extraction can be severely compromised.
To address the aforementioned challenges in field corn ear recognition, this study proposes an identification method based on the YOLOv11n model. By combining the C3K2 module with the AdditiveBlock attention mechanism [10], the method retains the local feature extraction capabilities of the convolutional network while enhancing global feature modeling, thereby improving the model’s feature representation capability for corn ear targets, particularly for incomplete ears. Additionally, integrating C2PSA with the BRA mechanism leverages a hierarchical screening approach. This effectively suppresses background interference with color and texture features similar to those of corn ears, while simultaneously reducing the model’s computational overhead. Furthermore, the introduction of the ShapeIoU loss function—which comprehensively considers the overlap, center distance, and shape discrepancy (length-to-width ratio of maize) between the predicted and ground-truth bounding boxes—enables the model to learn the geometric features of corn ears more accurately.

2. Materials and Methods

2.1. Image Collection

To ensure the model’s adaptability across different operating regions, the seed maize ear images in this study were collected from two distinct locations: the Core Demonstration Area for Seed Maize Production in Zhangye, Gansu Province, and the Joint Seed Maize Experimental Base of Qingdao Agricultural University and Plantek Co., Ltd. in Jiaozhou, Shandong Province. Image acquisition took place during the maize maturity stage from September to November 2025, ensuring that the captured dataset encompassed regional features and morphological variations in seed maize ears. Under sufficient daylight conditions, a total of 1136 seed maize ear images were captured in specialized seed maize fields planted with the cultivar ‘Xianyu 335’ using a DingDingPai MINI7X camera (DingDingPai (Shenzhen) Technology Co., Ltd., Shenzhen, China), stored in JPG format with a resolution of 2048 × 576 pixels. The collected dataset covers a wide spectrum of complex harvesting scenarios, including dynamic illumination conditions (captured between 8:00–11:30 and 14:00–19:00), varying occlusion levels (selecting ears with over 50% exposed surface area), and airborne dust interference, thereby effectively reflecting real-world in-field ear detection challenges.

2.2. Dataset Construction

To simulate diverse field environments characterized by varying illumination, different degrees of ear occlusion, and complex background interference, the captured photographs underwent data augmentation. The augmentation techniques primarily included brightness adjustment, flipping, and the injection of various types of noise. Following a rigorous selection process, a total of 5444 images were obtained. The dataset was subsequently annotated using LabelImg 1.8.6 software.
Based on the independent and identically distributed principle and data leakage prevention standards, a total of 5444 field images of seed maize ears were partitioned into training (4250), validation (614), and testing (580) sets at an 8:1:1 ratio using sequence-based group-stratified sampling. The specific partitioning criteria were defined across three core environmental feature dimensions: (1) occlusion severity (unoccluded, leaf/stalk occlusion, and ear-to-ear overlap); (2) illumination conditions (frontlight, backlight, and intense shadows); and (3) dynamic scale characteristics (static clear, harvester motion blur, and multi-scale target sizes). This approach eliminates temporal correlations between consecutive frames while preserving identical statistical distributions of scene complexities across all subsets, thereby ensuring unbiased and robust model evaluation. Sample images from the dataset are illustrated in Figure 1. The dataset encompasses a wide range of complex scenarios for seed corn ears—including regional morphological variations, diverse lighting conditions, and different occlusion levels—thereby effectively verifying the field adaptability of the proposed model.

2.3. Overview of the YOLOv11n Model

Introduced in 2025, YOLOv11 features deep architectural optimizations building upon YOLOv8 and YOLOv9, making it highly applicable to real-time object detection tasks in agricultural fields. YOLOv11n serves as the lightweight variant within the YOLOv11 family, characterized by a reduced parameter footprint and minimal hardware prerequisites. These attributes render the model uniquely suited for deployment on embedded edge-detection devices in field environments [11]. However, despite these architectural and convolutional enhancements, the vanilla YOLOv11n model still struggles to fully satisfy the stringent demands of open-field corn ear recognition. The specific challenges encountered during field harvesting operations are outlined below:
  • 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 the three existing challenges in the in-field detection of seed maize ears, this study proposes the BiF-YOLO model, which successfully achieves accurate ear recognition in open maize fields while balancing a lightweight architecture with high precision. The architectural topology of the BiF-YOLO model is illustrated in Figure 2.
  • 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

When capturing image data of corn fields using cameras during harvesting, some corn ears are partially occluded by leaves, stalks, husks, and adjacent ears, preventing the camera from capturing the complete structure of the corn ears. Furthermore, conventional convolutional architectures focus primarily on local neighborhood information, making it difficult to fully establish semantic correlations between scattered regions. Consequently, this frequently leads to issues such as missed detections of corn ears or incomplete extraction of object boundaries. To address this challenge, this study integrates the C3K2 module with the AdditiveBlock attention mechanism [12]. This combination enhances the model’s contextual aggregation and perceptual capabilities regarding the local features of corn ears, thereby improving its recognition performance for incomplete corn ears. AdditiveBlock is a feature enhancement module based on an additive attention mechanism. Initially, the input field corn ear image undergoes local feature extraction via the C3K2 convolutional branch to capture essential corn ear characteristics, including the contours of both the ears and their husks. Subsequently, these extracted features are fed into the AdditiveBlock for further enhancement. Through multi-dimensional information interactions across both the spatial and channel domains, alongside the application of an additive similarity function, the feature representation capability for corn ears is significantly bolstered. This approach enables a more comprehensive extraction of local corn ear features under occluded conditions. The improved C3K2_AdditiveBlock structure is illustrated in Figure 3.
Initially, the input image undergoes convolutional feature extraction to capture the characteristics of the corn ears, after which the extracted features are mapped into three distinct branches: Query (Q), Key (K), and Value (V). The Q branch is utilized to represent the feature demands of the current local region, such as the specific geometric shapes of the corn ears and the contours of the husks [13]. The K branch serves to provide contextual reference information from other regions within the image, capturing the morphological and structural correlations between the current local region and other corn ear features. Meanwhile, the V branch carries the core corn ear feature information that is ultimately enhanced and output. Distinct from conventional attention mechanisms, the feature enhancement paradigm is transformed such that Q identifies key regions based on K, and subsequently extracts the corresponding information from V. This approach effectively replaces the traditional Q-K dot-product attention mechanism [14]. Furthermore, contextual modeling is performed on both the Q and K branches across the spatial and channel dimensions independently. The detailed architecture is illustrated in Figure 4.
In the channel dimension, cross-channel semantic interaction convolutions are employed to filter and extract semantic features that are highly conducive to corn ear identification. Concurrently, in the spatial dimension, local spatial convolutions are utilized to integrate the local neighborhood corn ear information within both the Q and K branches. Subsequently, an additive fusion operation is performed to combine these processed feature representations.
S i m Q , K = Φ Q + Φ K
where Φ(Q) denotes the feature representation generated within the spatial dimension, and Φ(K) represents that generated within the channel dimension.
Y = X + Γ S i m Q , K V
where X denotes the original ear features input into the AdditiveBlock, and Y represents the final enhanced output features.
The contextual features obtained after additive fusion are integrated with the V branch to yield the enhanced corn ear feature map Γ(·). Subsequently, a 1 × 1 convolution is applied to adjust the channel dimensions, followed by a residual connection with the original input features. This residual shortcut preserves the integrity of the corn ear features captured by the initial local convolutions, while simultaneously mitigating the loss of critical ear information during feature propagation. Consequently, the detection accuracy for both occluded and incomplete corn ears is significantly enhanced, ultimately yielding the final output features.

2.4.2. The C2BRA Attention Module

During the harvesting period, the background environment of corn fields is exceptionally complex, where the extreme color similarity tends to obscure critical features such as ear boundaries and husk textures. Although the conventional C2PSA module enhances input features via an attention mechanism [15], it neglects the suppression of background interference. In field-based corn ear detection, background regions—including leaves, stalks, and soil—exhibit intricate textures and prominent edges. These elements easily induce strong responses within the feature maps, consequently amplifying erroneous information and compromising the accurate recognition of the target corn ears.
To address this issue, the BRA mechanism is integrated into C2PSA to construct the C2BRA bi-level routing attention mechanism [16]. As illustrated in Figure 5, this architecture suppresses complex background interference through a region-level semantic routing mechanism. BRA represents a bi-level routing attention paradigm, whose core philosophy revolves around “prioritizing the retention of corn-ear-relevant regions while proactively filtering out background regions.” It decomposes the recognition task into a two-tiered hierarchy:
  • 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.
Subsequently, the corn ear features are bifurcated along the channel dimension into a local feature retention branch and a BRA attention enhancement branch.
In the BRA attention enhancement branch shown in png, the input features are initially mapped into three distinct feature representations: Query, Key, and Value. Subsequently, the corn ear feature map is partitioned into multiple spatial regions, and region-level aggregation is performed on the Query and Key vectors within each region to obtain the region-level results Qr and Kr. On this basis, the semantic correlation between different regions is computed, and a top-k operation is employed to filter and select the most relevant candidate regions for each query region. This process can be formulated as follows:
A r = Q r K r T
I r = t o p I n d e x A r
where Ar denotes the inter-region semantic correlation matrix, and Ir represents the top-k routing region index corresponding to each query region.
Based on the routing region index, the corn ear features within the candidate regions are gathered, and a fine-grained token-to-token attention calculation is conducted inside these candidate regions. This process is illustrated in Figure 6. Concurrently, to compensate for the limitations of this mechanism in modeling the local textures and edge features of corn ears, a 5 × 5 depthwise convolution is introduced into the Value branch as a local context enhancement term. Finally, the local feature retention branch and the BRA attention enhancement branch are integrated to yield the final output of the corn ear features:
Y b = Softmax Q K g T d V g + D W C o n v   5 × 5 ( V )
where Kg and Vg denote the Key and Value features gathered from the top-k candidate regions, respectively; d represents the feature dimension; and “DWConv”(5 × 5) denotes the local context enhancement operation applied to the Value branch.

2.4.3. The ShapeIoU Loss Function

The bounding box regression loss function utilized in the conventional YOLO model is Complete Intersection over Union (CIoU). In field-based corn ear detection scenarios, the ear targets exhibit a distinctly elongated morphology and are frequently subject to occlusion and interference from complex background elements—such as leaves, stalks, husks, and soil—rendering the target boundaries indistinct. Consequently, CIoU fails to adequately capture the intrinsic shape and scale characteristics of the corn ear targets. When the predicted and ground-truth bounding boxes exhibit high overlap yet encompass substantial background noise, CIoU inflicts an insufficient penalty on such boundary redundancy. This deficiency often results in oversized detection boxes or suboptimal localization precision.
To address these limitations, the CIoU loss function is replaced with the ShapeIoU loss function in this study [17]. ShapeIoU incorporates the specific shape and scale attributes of the corn ears into the bounding box regression process. This enables the model to evaluate not only the spatial overlap between the predicted and ground-truth bounding boxes but also enforce constraints on the regression error based on the geometric configuration of the corn ears. This enhancement bolsters the model’s sensitivity to the contours of elongated corn ears and mitigates the distracting effects of irrelevant background features (e.g., leaves, stalks, and soil) on the predicted results. Ultimately, it ensures that the predicted bounding boxes align more tightly with the actual ear regions, thereby enhancing both the detection accuracy and localization stability of the proposed model in complex field environments.

3. Results

3.1. Experimental Environment

All experiments in this study were conducted on a mobile computer with the following configuration:
Hardware: GPU:3060;
CPU: R7-5800H;
RAM: 16G;
Hyperparameters:
BatchSize: 16;
Epochs: 300;
Optimizer: SGD;
Weight Decay: 0.0005;
Initial Learning Rate: 0.01.

3.2. Model Evaluation Metrics

In this study, the performance of the proposed model is evaluated using three primary metrics: Precision (P), Recall (R), and the F1-score. Their corresponding calculation formulas are presented in Table 1.
Precision denotes the accuracy of model identification. Recall represents the proportion of actual targets that are successfully detected by the model. The F1-score is the harmonic mean of Precision and Recall, which is utilized for a comprehensive evaluation of the model’s performance. The core components are defined as follows:
  • 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

To evaluate the superiority of the proposed BiF-YOLO model in corn ear detection, under the same dataset conditions, comparative experiments were conducted using several other vision models, with detailed results presented in Table 2. Although the conventional SSD model exhibits a certain level of detection capability, its computational complexity is exceedingly high, with FLOPs reaching up to 60.38 G and a model size of 97.3 MB, rendering it unsuitable for deployment on harvesters. Concurrently, while the EfficientDet model achieves substantial improvements in lightweight architecture and exhibits the lowest computational load, its detection accuracy is inadequate, failing to satisfy the rigorous requirements of seed corn ear detection. In contrast to these two baseline models, the YOLO family strikes a superior balance between low computational overhead and high recognition accuracy; thus, compared to alternative architectures, this series is inherently more viable for on-harvester deployment.
Among the compared networks, vanilla YOLOv11 possesses the smallest memory footprint at merely 5.2 MB; however, its recognition precision is compromised when subjected to complex open-field corn environments. Although YOLOv8 outperforms the former in terms of precision and recall, its mAP@0.5 remains insufficient for seed corn ear identification, failing to suppress missed and false detections to an acceptably low threshold. Notably, the modified BiF-YOLO model delivers the optimal comprehensive performance across all evaluation metrics, with Precision, Recall, and mAP@0.5 reaching 0.9179, 0.893, and 0.9277, respectively. This demonstrates that the model achieves highly precise identification of corn ear targets and exhibits robust adaptability to intricate background clutter and severe occlusion scenarios. Although its computational complexity slightly scales up to 6.6 G FLOPs and its model size increases to 5.8 MB, these marginal increments do not compromise the network’s overall high operational efficiency and prominent lightweight attributes.

3.4. Ablation Study of the BiF-YOLO Model

The BiF-YOLO model proposed in this study features three primary improvements: the C2BRA mechanism, the C3k2_AdditiveBlock module, and the ShapeIoU loss function. To validate the efficacy of these three modifications, ablation experiments were performed on each individual component as well as their various combinations. As demonstrated by the experimental results in Table 3, the optimized model exhibits substantial improvements across all performance metrics. Specifically, Precision and Recall increased by 2.27 and 2.43 percentage points, respectively, indicating a significant advancement in both the recognition capability and environmental adaptability of the proposed model.
As derived from the experimental results in Table 3, the individual introduction of either the C3K2_AdditiveBlock or the C2BRA module substantially enhances the model’s performance, elevating the Precision by 1.92 and 1.83 percentage points, respectively. Notably, when both modules are integrated simultaneously, the Precision scales up by 1.97 percentage points, and the mean Average Precision (mAP) increases by 0.5 percentage points. Concurrently, the model size expands by merely 0.4 MB. This demonstrates that these two structural modifications significantly bolster the model’s corn ear recognition capability while exerting a negligible impact on the overall memory footprint.
Conversely, the standalone implementation of the ShapeIoU loss function yields a marginal optimization effect, primarily because the loss function operates exclusively during the bounding box regression stage. Nevertheless, when ShapeIoU is deployed alongside the concurrent integration of C3K2_AdditiveBlock and C2BRA, its efficacy is dramatically amplified, resulting in a 2.2 percentage point increase in Precision and a 0.7 percentage point increase in mAP. This phenomenon arises because the synergistic effect of the C3K2_AdditiveBlock and C2BRA modules robustifies the feature extraction capability against severe occlusion and background interference, enabling the network to capture more comprehensive and accurate corn ear characteristics. Building upon these high-quality features, ShapeIoU can subsequently optimize the shape and positional alignment of the predicted boxes, thereby achieving superior bounding box regression accuracy.

3.5. Visualization of Background Clutter Suppression via C2BRA

To more distinctly demonstrate the effectiveness of the C2BRA mechanism in suppressing complex background interference, feature visualization heatmaps were generated using both the baseline model and the proposed model, with the results illustrated in Figure 7.
By comparing the feature visualization heatmaps before and after the integration of the C2BRA module, it is clearly observable that the baseline model frequently falters when identifying the regions of primary interest. Particularly in the first and second samples, owing to the extreme color similarity between the ground and the target corn ears, the model’s attention is erroneously aggregated on the soil surface. Conversely, with the incorporation of the C2BRA mechanism, the background noise is effectively suppressed, and the model’s focus is accurately redirected back to the candidate regions where corn ears are actually located.

3.6. Experimental Validation of the ShapeIoU Loss Function

To validate the efficacy of the ShapeIoU loss function within the proposed BiF-YOLO model, three prevalent loss functions—namely CIoU, GIoU, and DIoU—were selected to conduct comparative experiments against ShapeIoU. The corresponding experimental results are illustrated in Figure 8.
Comparative experiments (Figure 8) indicate that ShapeIoU delivers the optimal performance across all evaluation metrics, with Precision, Recall, and mAP@0.5 reaching 0.9179, 0.8930, and 0.9277, respectively. Notably, ShapeIoU improves Recall by 3.24 percentage points compared to the baseline CIoU (0.8606), substantially mitigating missed detections of occluded or incomplete corn ears. Unlike traditional metrics (CIoU, DIoU, GIoU) that rely universally on generic area overlap, ShapeIoU integrates target-specific shape and scale attributes into the bounding box regression process. This geometric constraint tailored to the elongated morphology of corn ears effectively suppresses background noise and ensures tighter boundary alignment in intricate field environments.

3.7. In-Field Video Evaluation and Static Field Validation

To evaluate the preliminary environmental adaptability of BiF-YOLO, qualitative comparison experiments were conducted on an identical field video sequence captured under varying natural illumination and shadow conditions, as illustrated in Figure 9. Visual tracking observations over the video sequence indicate that while the baseline model suffers from intermittent missed detections or location jitter under harsh glare and shadows, BiF-YOLO demonstrates enhanced frame-to-frame detection stability and tighter bounding box alignment. These qualitative visual results suggest the potential capability of BiF-YOLO to mitigate illumination fluctuations during field perception. Nevertheless, future engineering trials will focus on comprehensive quantitative benchmarks under systematically controlled lighting and severe occlusion conditions.
As can be observed from the detection visualization maps, compared with the proposed BiF-YOLO model, the original baseline model exhibits limited proficiency in identifying occluded corn ears. Particularly under insufficient illumination conditions, the original network frequently fails to extract proximal, occluded corn ear targets. Conversely, the improved model successfully identifies the correct target objects. This demonstrates that the joint mechanism of C2BRA and the AdditiveBlock further reinforces the feature representations of corn ears, thereby significantly boosting the model’s recognition capability and robustness in complex agricultural scenarios.

4. Discussion

Given that the proposed model is deployed in outdoor open-field environments—specifically evaluated on the seed maize cultivar ‘Xianyu 335’ across two climatically distinct sites in Zhangye (Gansu Province) and Jiaozhou (Shandong Province)—dynamic variations in natural illumination conditions inevitably challenge the stable extraction of ear features. The intensity of ambient solar radiation in these agricultural fields is inherently unpredictable; consequently, the luminance, shadow patterns, and color distributions across the ‘Xianyu 335’ ear regions fluctuate significantly depending on different diurnal periods, meteorological conditions, and imaging angles. For instance, under excessive solar radiation, localized overexposure frequently occurs on the ear surfaces, leading to a critical loss of fine-grained edge details. Conversely, under dim or low-light conditions, the diminished luminance of the target regions severely deteriorates the contrast between the ears and the complex background clutter, thereby impeding the model’s capacity for precise boundary delineation. Although the C2BRA bi-level routing attention mechanism is designed to suppress background interference by leveraging inter-region semantic correlations, extreme illumination anomalies across these field locations can still induce severe distribution shifts in features across different spatial regions. This phenomenon ultimately destabilizes the attention routing mechanism, leading to fluctuations in routing consistency under adversarial lighting constraints [18].

5. Conclusions

To achieve precise seed corn ear detection in complex open-field environments, this study proposes BiF-YOLO. The model integrates an AdditiveBlock into the C3k2 module to enhance feature extraction of ear contours and husk edges under heavy occlusion, echoing recent YOLO-based visual enhancements for crop phenotyping [19]. To suppress dense background clutter while maintaining low computational overhead, a C2BRA mechanism with bi-level routing is employed. Furthermore, ShapeIoU is adopted to enforce geometric shape constraints tailored to slender corn ears, addressing target identification challenges in field-based pest and crop monitoring [20]. Experimental results show that BiF-YOLO achieves a Precision of 91.79% and an mAP@0.5 of 92.77%, satisfying practical deployment requirements. Future work will explore data augmentation and multimodal dynamic feature fusion to escalate cross-scenario adaptability.

Author Contributions

Conceptualization, L.Z.; methodology, L.Z. and X.Y.; software, X.Y.; validation, X.Y.; formal analysis, X.Y.; investigation, X.Y.; resources, X.Y.; data curation, X.Y.; writing—original draft preparation, X.Y.; writing—review and editing, X.Y.; visualization; supervision, X.Y.; project administration, X.Y.; funding acquisition, X.Y. All authors have read and agreed to the published version of the manuscript.

Funding

This research was funded by the National Key Research and Development Program (2023YFD2000404).

Data Availability Statement

The datasets presented in this article are not readily available because the data are part of an ongoing study or due to technical time limitations. Requests to access the datasets should be directed to a17553723163@163.com.

Acknowledgments

The data collation and optimization of experimental schemes of this study have received generous support from QingShuo Huang, ChaoYang Xiu and YuanYuan Yin. We would like to extend our sincere gratitude to the three researchers for their valuable assistance and constructive suggestions in data collection, layout, and improvement of the experimental design.

Conflicts of Interest

The authors declare no conflicts of interest.

References

  1. 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]
  2. 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]
  3. 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]
  4. 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]
  5. 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]
  6. 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]
  7. 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]
  8. 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]
  9. 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]
  10. 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]
  11. 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]
  12. 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]
  13. 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]
  14. 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]
  15. 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]
  16. 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]
  17. 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]
  18. 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]
  19. 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]
  20. 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]
Figure 1. Real shot of a seed corn field.
Figure 1. Real shot of a seed corn field.
Agronomy 16 01780 g001
Figure 2. BiF-YOLO structure diagram.
Figure 2. BiF-YOLO structure diagram.
Agronomy 16 01780 g002
Figure 3. C3K2_AdditiveBlock structure diagram.
Figure 3. C3K2_AdditiveBlock structure diagram.
Agronomy 16 01780 g003
Figure 4. AdditiveBlock process flowchart.
Figure 4. AdditiveBlock process flowchart.
Agronomy 16 01780 g004
Figure 5. C2BRA structure diagram.
Figure 5. C2BRA structure diagram.
Agronomy 16 01780 g005
Figure 6. Schematic diagram of the Top-k routing area index structure in the C2BRA module.
Figure 6. Schematic diagram of the Top-k routing area index structure in the C2BRA module.
Agronomy 16 01780 g006
Figure 7. Grad-CAM Heatmap Comparison Analysis for C2BRA Module.
Figure 7. Grad-CAM Heatmap Comparison Analysis for C2BRA Module.
Agronomy 16 01780 g007
Figure 8. Performance Comparison of Different Loss Functions.
Figure 8. Performance Comparison of Different Loss Functions.
Agronomy 16 01780 g008
Figure 9. Visual Comparison of Model Detection Results. (a) Before Improvement; (b) Improved version.
Figure 9. Visual Comparison of Model Detection Results. (a) Before Improvement; (b) Improved version.
Agronomy 16 01780 g009
Table 1. Indicator calculation formula.
Table 1. Indicator calculation formula.
Computational Equation
P P = T P T P + F P
R R e c a l l = T P T P + F N
F1 F 1 = 2 × P r e c i s i o n × R e c a l l P r e c i s i o n + R e c a l l
AP@0.5 AP @ 0.5 = 0 1 P R d R
mAP@0.5 mAP @ 0.5 = 1 C i = 1 C AP i @ 0.5
Table 2. Performance Comparison between the Proposed Model and Benchmark Models.
Table 2. Performance Comparison between the Proposed Model and Benchmark Models.
ModelPRmAP@0.5FLOPS
(G)
Size
(MB)
SSD0.89350.8570.903760.3897.3
EffcirntDet0.85440.8360.9156 5.36 14.9
YOLO V80.90880.8960.91436.46.3
YOLO v100.89730.8860.91376.76.0
YOLO v110.89520.8680.92226.35.2
BiF-YOLO0.91790.8930.92776.65.8
Table 3. Ablation study on the key components of the proposed BiF-YOLO model.
Table 3. Ablation study on the key components of the proposed BiF-YOLO model.
C3k2_AdditiveBlockC2BRAShapeIoUPRmAP@0.5F1-ScoreFLOPS
(G)
Size
(MB)
1 0.89520.8680.92220.8818 6.3 5.2
2 0.91440.8730.92260.89356.35.8
3 0.91350.8770.91310.89496.65.5
4 0.89530.8730.92330.88436.35.2
5 0.89350.8890.91250.89126.65.5
6 0.90360.8730.91670.88856.35.2
7 0.91490.8600.92060.88696.65.6
80.91790.8930.92770.90526.65.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.

Share and Cite

MDPI and ACS Style

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

AMA Style

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 Style

Yin, 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 Style

Yin, 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

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop