Abstract
Automated pomegranate maturity detection facilitates yield enhancement and cost reduction; however, existing methods face significant challenges in complex natural environments, including difficulty in distinguishing green pomegranates from green foliage backgrounds and the trade-off between detection accuracy and computational efficiency. To address these issues, this paper proposes GLMF-DEIM, a lightweight pomegranate maturity detection algorithm. The proposed method is built upon the DEIM detection framework and incorporates a Gaussian-Haar Discrete Wavelet Transform module (GHDWStem) to achieve frequency-domain feature separation, effectively resolving the target-background similarity problem. The approach de-signs a Lightweight Adaptive Weight Downsampling module (LAWD) and Lightweight Frequency-Domain Dynamic Convolution Stages (LFDStages) to enable efficient feature extraction. Additionally, a Multi-level Feature Fusion Network (MFFN) is constructed to enhance multi-scale detection capabilities, while Dense O2O matching strategy and Matchability-Aware Loss are employed to optimize the training process. Extensive validation was conducted on a self-constructed datasets comprising 5,855 images that span five distinct growth stages of pomegranates. The proposed GLMF-DEIM model attains a 50% intersection-over-union (IoU) average precision (AP50) of 93.1%, an AP75 of 84.5%, and a small-object AP (APS) of 32.7%. These results correspond to relative improvements of 1.9%, 2.3%, and 1.3%, respectively, over the performance of the optimal baseline method. In terms of computational efficiency, GLMF-DEIM incurs only 16.9 GFLOPs of computational cost with 8.16 M parameters, achieving an effective trade-off between detection accuracy and inference efficiency that is well-suited for edge deployment scenarios in smart agriculture.
Keywords: Pomegranate maturity, Frequency domain fusion, Wavelet transform, DEIM
Subject terms: Engineering, Mathematics and computing
Introduction
Pomegranate (Punica granatum), an economically significant crop belonging to the family Lythraceae, is extensively cultivated across temperate and tropical regions worldwide, with China, Tunisia, and Pakistan accounting for over 75% of the global cultivation area1. Beyond its substantial economic value, pomegranate demonstrates remarkable versatility, as its pericarp, roots, and flowers possess medicinal properties and contain essential nutrients required by the human body, while traditionally symbolizing prosperity and fertility in various cultures. With the advancement of global smart agriculture initiatives, conventional manual detection and harvesting methods for fruits and vegetables can no longer satisfy the demands for enhanced efficiency and intelligence in modern agricultural systems, and the traditional target detection algorithms can not meet the requirements. For instance, in open orchards, green early_fruit often overlaps with foliage, and their RGB color similarity leads misdetection in traditional methods; mature ripening_fruit may suffer from leaf occlusion and uneven illumination, causing bounding box displacement in baseline models. To address these detection challenges, modern systems require multi-objective optimization to balance accuracy and speed2. Furthermore, ensuring the reliability of these IoT-based monitoring platforms necessitates data analytics for security3 and energy-aware heuristic protocols to prolong the lifespan of wireless sensor networks4. Fruit and vegetable harvesting, characterized by high labor intensity and strong seasonality, remains predominantly dependent on manual labor worldwide, with generally low levels of automation, necessitating urgent technological innovation to achieve agricultural modernization transformation5,6.
Deep learning has enabled numerous mature methodologies for fruit and vegetable harvesting applications. Wei J et al. proposed SEBALR for rice growth stage identification and rice field evapotranspiration estimation. This model comprises two modules for growth stage detection and evapotranspiration calculation, integrating an advection effect correction algorithm that operates without ground observation data and is applicable across diverse climatic conditions7. Liang C et al. developed a lychee maturity recognition method based on unmanned aerial vehicle (UAV) remote sensing and YOLOv8-FPDW. The improved model integrates FasterNet, Par-NetAttention, DADet, and Wiou modules, achieving a mean average precision of 87.7% while significantly reducing model parameters and computational complexity8. Liu K et al. introduced Small-YOLOv5, a lightweight rice growth stage identification method based on improved YOLOv5s. The approach employs MobileNetV3 to replace the original backbone network and utilizes GsConv modules to substitute standard convolutions in the neck network, thereby achieving model lightweighting9. Ge Y et al. presented a tomato tracking and counting method for different growth stages based on an improved YOLO-DeepSORT network, designed for greenhouse detection robots. This method builds upon the YOLOv5s model, employing Shuf-fleNetV2 combined with CBAM attention mechanisms for model compression, and utilizing BiFPN multi-scale fusion architecture to enhance network accuracy. Following detection, the Kalman filter algorithm predicts target positions, which are then integrated with the DeepSORT algorithm to achieve target tracking and counting10.
Current pomegranate growth stage detection technologies face numerous critical challenges and technical limitations. First, existing research primarily targets fruit and vegetable detection under ideal conditions (sufficient illumination, no occlusion), demonstrating severely inadequate adaptability to complex natural environments (insufficient lighting, occlusion, rainy conditions, nighttime scenarios, etc.), which significantly compromises the practical application effectiveness of detection systems in real agricultural production scenarios11. Second, the majority of studies concentrate on post-harvest fruit maturity detection, lacking systematic detection technologies that encompass the entire lifecycle from sprouting to maturity, thereby failing to provide effective support for comprehensive management processes including precision fertilization, irrigation, and pest control12. Current detection methods face four key limitations: over-reliance on RGB features leads to poor target-background separation when colors are similar; lightweight models sacrifice small-target detection accuracy; heavyweight detectors are unsuitable for edge deployment, while lightweight models lack robustness; DETR-based models suffer from sparse supervision and slow convergence.
The aim of this study is to develop a lightweight, high-accuracy pomegranate maturity detection algorithm adaptable to complex natural environments for edge deployment in smart agriculture, with specific objectives including: resolving the similarity between green pomegranates and foliage through Gaussian-Haar wavelet transform-based frequency-domain separation via the proposed Gaussian-Haar Discrete Wavelet Transform module (GHDWStem); designing lightweight modules (Lightweight Adaptive Weight Downsampling (LAWD) and Lightweight Frequency-Domain Dynamic Convolution Stages (LFDStages)) to balance detection accuracy and computational efficiency, where LAWD achieves adaptive downsampling through dynamic weight generation and LFDStages integrates frequency-domain dynamic convolution for efficient feature extraction; enhancing multi-scale detection capability via a Multi-level Feature Fusion Network (MFFN) to cover five pomegranate growth stages (budding_stage, flowering_stage, early_fruit, middle_fruit, ripening_fruit).
Materials and methods
DEIM
Detection Transformer (DETR)13 achieves end-to-end object detection by incorporating the Transformer14,15 architecture and one-to-one (O2O) matching strategy16, thereby eliminating the necessity for manually designed components such as Non-Maximum Suppression (NMS). However, DETR confronts a critical challenge characterized by slow convergence and high training costs. In-depth analysis reveals that this issue primarily stems from two fundamental aspects: (1) Sparse supervision problem: The O2O matching mechanism assigns only one positive sample per target, resulting in a significantly insufficient number of positive samples compared to traditional one-to-many (O2M) methods, which constrains the acquisition of dense supervisory signals. (2) Insufficient optimization of low-quality matching: DETR employs a limited number of randomly initialized queries that lack spatial alignment with targets, leading to numerous low-quality matches characterized by low IoU but high confidence during training. Existing loss functions demonstrate limited effectiveness in optimizing such matches.
DEIM introduces two core contributions: Dense O2O matching strategy and Matchability-Aware Loss (MAL). Dense O2O addresses supervision sparsity through a novel approach: rather than increasing the number of positive samples per target as existing methods do, it enhances supervision density by increasing the total number of targets N within training images17. Specifically, the method leverages classical data augmentation techniques such as mosaic and mixup to concatenate and combine original images (e.g., four-quadrant concatenation). While maintaining the O2O matching framework (Mi = 1), this approach achieves supervision effects comparable to O2M through the augmentation of target quantities. This design circumvents the computational overhead associated with multiple independent decoders required by methods such as Group DETR18, while also avoiding the complexity inherent in hybrid approaches like Co-DETR19. MAL addresses the increased prevalence of low-quality matches introduced by Dense O2O by redesigning the loss function to better accommodate matches of varying quality levels. In contrast to Varifocal Loss20, which primarily focuses on high IoU matches, MAL achieves balanced optimization across all quality levels of matches through Eq. 1.
![]() |
1 |
Specifically, the target labels are modified to
(
=1.5), enhancing the penalty strength for low IoU matches. For instance, when IoU=0.05, MAL exhibits a significant increase in loss as confidence increases, while VFL demonstrates minimal variation; for high-quality matches, MAL performs comparably to VFL. Additionally, MAL eliminates the hyperparameter
, thereby simplifying computation and preventing excessive optimization of high-quality matches.
Dataset
This study constructs a comprehensive dataset for pomegranate maturity object detection, with data collection conducted in the primary pomegranate cultivation regions of Zaozhuang City, Shandong Province, utilizing a SONY Alpha 6400 mirrorless camera for image acquisition, as illustrated in Fig. 1a. The dataset encompasses five critical growth stages of pomegranate development from bud formation to complete maturity: budding_stage, flowering_stage, early_fruit, middle_fruit, and ripening_fruit. To ensure data diversity and practical applicability, image collection spanned the complete growth cycle from April to October 2023, with photography conducted under various temporal and meteorological conditions, including diverse natural lighting environments such as morning light, intense midday illumination, and evening oblique light. All images underwent standardized preprocessing with uniform resizing to 640 × 640 pixel resolution, and multiple data augmentation techniques including geometric transformations and color adjustments were applied to enhance model generalization capability.
Fig. 2.
GLMF-DEIM structure diagram.
The dataset comprises 5,855 high-quality images, as depicted in Fig. 1b, yielding 11,482 precisely annotated target instances. Based on target dimensions within images, each category is further stratified into three levels: small targets (s), medium targets (m), and large targets (l). As presented in Table 1, the specific distribution is as follows: the ripening_fruit category contains 1929 instances (181 small targets accounting for 9.4%, 466 medium targets representing 24.2%, and 1282 large targets comprising 66.5%); the middle_fruit category encompasses 2986 instances (300 small targets representing 10.0%, 751 medium targets accounting for 25.2%, and 1,935 large targets comprising 64.8%); the flowering_stage category includes 2827 instances; the budding_stage category contains 2433 instances; and the early_fruit category comprises 1307 instances. Data annotation was performed by professional personnel with extensive agricultural expertise using bounding box annotation methodology, with rigorous validation conducted by pomegranate cultivation specialists, achieving annotation accuracy exceeding 95%. To ensure scientific rigor in training and evaluation, the dataset employs stratified random sampling with a 7:2:1 split ratio: the training set contains 4,098 images for model parameter learning, the validation set includes 1171 images for hyperparameter optimization, and the test set comprises 586 images for final performance evaluation. This dataset exhibits characteristics of temporal completeness, environmental diversity, and scale richness, providing crucial technical support for applications including intelligent pomegranate cultivation management, agricultural robot visual navigation, and automated orchard monitoring, thereby advancing the digital transformation of the pomegranate industry and the development of precision agriculture.
Fig. 1.
Dataset shooting and category distribution.
Table 1.
Detailed distribution of data sets.
| Category | Small (s) | Medium (m) | Large (l) | Total (num) |
|---|---|---|---|---|
| ripening_fruit | 181 (9.4%) | 466 (24.2%) | 1282 (66.5%) | 1929 |
| middle_fruit | 300 (10.0%) | 751 (25.2%) | 1935 (64.8%) | 2986 |
| flowering_stage | 484 (17.1%) | 812 (28.7%) | 1531 (54.2%) | 2827 |
| budding_stage | 714 (29.3%) | 1392 (57.2%) | 327 (13.4%) | 2433 |
| early_fruit | 60 (4.6%) | 222 (17.0%) | 1025 (78.4%) | 1307 |
| All | 1739 (15.1%) | 3643 (31.7%) | 6100 (53.1%) | 11,482 |
GLMF-DEIM
Overview
GLMF-DEIM employs an end-to-end detection architecture comprising three primary components: a feature extraction backbone network, a multi-scale feature fusion network, and a DEIM detection head, as illustrated in Fig. 2. The network initially processes input images through the GHDWStem module, which performs Gaussian-Haar discrete wavelet transform. Leveraging the multi-resolution analysis characteristics of wavelet transform, this module de-composes input features into low-frequency components and high-frequency components in different directions, achieving effective separation between pomegranate targets and green foliage backgrounds at the frequency domain level, thereby addressing the critical challenge of distinguishing green pomegranates from green leaf backgrounds in traditional RGB color space. Subsequently, multi-level feature extraction is conducted through five LFDStages, with each stage integrating LAWDown lightweight down sampling and FDConv frequency-domain dynamic convolution. Through residual connections, progressive feature learning is achieved from H/4×W/4 to H/32×W/32 resolution. The LAWDown module dynamically adjusts down sampling strategies through an adaptive weight generation mechanism, while FDConv realizes dynamic modulation of convolution kernels via frequency-domain weight decomposition, effectively enhancing the perception capability for subtle variations in pomegranate maturity.
In the feature fusion stage, the MFFN network achieves top-down and bottom-up feature propagation through bidirectional MSFM modules, constructing a feature pyramid encompassing three detection scales (P3, P4, P5) to effectively integrate semantic information and spatial de-tails from different hierarchical levels, ensuring the network’s capability to simultaneously process small-scale buds, medium-scale young fruits, and large-scale mature pomegranates. The MSFM module adopts an Inception-like multi-branch architecture that extracts feature representations under different receptive fields through parallel multi-scale convolution kernels, combined with LAWDown modules to achieve efficient feature compression and propagation. Final-ly, multi-layer DEIM-Decoders complete progressive feature decoding through self-attention and cross-attention mechanisms, directly outputting target confidence scores and bounding box pre-dictions while avoiding complex post-processing steps inherent in traditional methods. The over-all network architecture achieves organic integration of frequency-domain feature enhancement, lightweight processing, multi-scale fusion, and end-to-end optimization, providing an efficient and reliable technical solution for precise pomegranate maturity detection in complex orchard environments. To further clarify the incremental novelty of the proposed method, Table 2 summarizes the structural differences between GLMF-DEIM and prior DETR-based or wavelet-based approaches. Unlike conventional models, GLMF-DEIM achieves superior performance in complex orchard scenes by integrating a hybrid frequency-spatial domain with adaptive downsampling and optimized dense supervision.
Table 2.
Architectural comparison between GLMF-DEIM and representative detection frameworks.
| Feature | DETR-based Models | Wavelet-based models | GLMF-DEIM (Ours) |
|---|---|---|---|
| Domain | Pure Spatial | Pure Frequency | Hybrid Frequency-Spatial |
| Supervision | Sparse O2O | Varies | Dense O2O + MAL |
| Downsampling | Fixed Strided Conv | Standard Pooling | Adaptive Weighting (LAWD) |
| Target Focus | General Objects | Texture/Edge analysis | Pomegranate Maturity Stages |
GHDWStem
To address the feature separation challenges in pomegranate maturity detection under complex backgrounds, particularly the similarity in color and texture between immature green pomegranates and green foliage backgrounds, traditional feature extraction methods based on RGB color space struggle to achieve effective discrimination. This work proposes the Gaussian-Haar Discrete Wavelet Stem (GHDWStem), as illustrated in Fig. 3. The design of GHDWStem moves beyond vanilla wavelet transforms by introducing a hybrid spatial-frequency smoothing mechanism. Motivated by the smooth surface of pomegranates versus the complex texture of foliage, it incorporates Gaussian residual learning to suppress high-frequency background noise before frequency decomposition. This specific combination enables superior target-background separation in the early stages of feature extraction. The core principle lever-ages the multi-resolution analysis characteristics of wavelet transform21,22 to decompose input features into subbands of different frequencies and orientations, thereby achieving effective tar-get-background separation at the frequency domain level. Wavelet transform accomplishes frequency domain decomposition through a series of filtering operations, as shown in Eq. 2, decomposing input features into LL, LH, HL, and HH components, representing low-frequency components and edge information corresponding to horizontal, vertical, and diagonal directions, respectively. The four decomposed components are integrated through a feature reorganization mechanism, which expands the original C-channel features to 4 C channels as demonstrated in Eq. 3. Subsequently, a depth-wise convolution encoder performs semantic enhancement on the reorganized features, fusing multi-directional frequency domain information and strengthening feature representation capability as shown in Eq. 4.
Fig. 3.
Gaussian-Haar discrete wavelet stem structure diagram.
![]() |
2 |
![]() |
3 |
![]() |
4 |
This study introduces a Gaussian residual learning mechanism23, which is based on the observation that pomegranate targets typically exhibit relatively smooth surface textures while background noise often manifests as high-frequency interference. Through the construction of Gaussian convolution kernels for spatial smoothing filtering, this mechanism effectively sup-presses high-frequency noise and highlights the primary characteristics of targets, as demonstrated in Eq. 5. Finally, average pooling operations ensure spatial scale consistency be-tween the main branch and residual branch, with feature fusion achieved through residual connections as shown in Eq. 6. This fusion strategy not only preserves the multi-directional edge information extracted by wavelet transform but also enhances the model’s gradient propagation capability through residual learning, enabling the model to demonstrate higher sensitivity and robustness when processing subtle variations in pomegranate maturity.
![]() |
5 |
![]() |
6 |
LAWD
This paper proposes the Light Adaptive-Weight Downsampling (LAWD) module, specifically designed to address the challenge of balancing information preservation and computational efficiency in traditional downsampling methods, particularly targeting information loss challenges when processing complex textures or high-frequency details, as illustrated in Fig. 4. Unlike traditional fixed-parameter downsampling (e.g., strided convolution), LAWD is motivated by the need to preserve fine-grained maturity features. Its incremental novelty lies in a content-aware weighting mechanism that dynamically generates adaptive weights based on global context. This ensures that critical semantic information is retained during resolution reduction with minimal computational overhead. Through an innovative adaptive weight generation mechanism, this module combines global context attention24 (based on average pooling and 1 × 1 convolution) to dynamically generate spatially adaptive weights as shown in Eqs. 7–9, breaking through the limitations of traditional fixed-kernel downsampling and enabling adaptive adjustment of downsampling strategies ac-cording to the semantic content of input features. Simultaneously, the module employs group convolution and channel shuffle operations to reduce computational complexity while expanding channel dimensions. Through multi-scale reorganization of downsampled features and ap-plication of soft-max weighting, fine-grained information weighted fusion is achieved in spatial dimensions as demonstrated in Eqs. 10–12. This design is theoretically equivalent to local self-attention mechanisms25 but with significantly reduced computational overhead, enabling substantial reductions in parameter count and computational cost while maintaining high performance, thereby providing a downsampling solution that combines efficiency, robustness, and generalizability for lightweight model design and edge computing applications.
Fig. 4.

Light adaptive-weight downsampling structure diagram.
Adaptive Weight Generation:
![]() |
7 |
![]() |
8 |
![]() |
9 |
Group Convolution and Weighted Fusion:
![]() |
10 |
![]() |
11 |
![]() |
12 |
LFDStages
This paper proposes the Light Frequency Dynamic Stages (LFDStages) module designed to address the limitations of traditional convolution in processing complex frequency domain in-formation, particularly addressing deficiencies in multi-scale feature extraction and frequency domain adaptation, as illustrated in Fig. 5. Through the integration of FDConv26, LAWD, and feature aggregation, this module achieves an architecture that maintains computational efficiency while enhancing feature representation capability. LFDStages evolves from spatial dynamic convolutions to frequency-domain modulation. The motivation is to capture subtle maturity variations that are often indistinguishable in the spatial domain. By decomposing weights into frequency space via Fourier transforms, the module enables adaptive attention across different frequency components, significantly enhancing representation capability for diverse growth stages. FDConv serves as the core com-ponent, decomposing convolution weights into frequency domain space through Fourier trans-form and utilizing Kernel Space Modulation (KSM) and Frequency Band Modulation (FBM) mechanisms to achieve dynamic weight generation, thereby applying adaptive attention mechanisms across different frequency components. The LAWDS module employs adaptive weight down sampling strategies to maximize retention of critical semantic information while reducing spatial resolution. The combination of these components forms an efficient multi-stage feature processing framework.
Fig. 5.
LFDStages Structure Diagram.
Specifically, spatial resolution compression is accomplished through LAWDS down sampling while preserving critical information, as shown in Eq. 13. The down sampled information undergoes feature extraction through n layers of FDConv to enhance feature representation capability, as demonstrated in Eq. 14. The results extracted from n layers of FDConv are fused through concat operations to achieve channel-wise fusion of multi-source features, followed by further processing and compression of fused features through the Aggregation mod-ule, as shown in Eq. 15. Residual connections for information flow are completed through Add operations, as demonstrated in Eq. 16.
![]() |
13 |
![]() |
14 |
![]() |
15 |
![]() |
16 |
MFFN
Pomegranate maturity detection confronts two core challenges: first, the subtle color gradients and textural variations exhibited by pomegranates across different maturity stages are difficult to capture precisely, as traditional single-scale feature extraction cannot simultaneously accommodate global shape information and local textural details; second, multi-scale interference problems in complex orchard environments, including factors such as pomegranate fruits of varying sizes, leaf occlusion, and illumination variations, result in inconsistent feature representations. Addressing these challenges in pomegranate maturity detection, we propose the Multi-level Feature Fusion Network (MFFN) module, as illustrated in Fig. 6, which utilizes Multi-Scale Fusion Modules (MSFM) to achieve deep integration of cross-scale features. Through a dual-stage feature diffusion mechanism, features rich in maturity semantic information are efficiently propagated to each detection scale, thereby enabling precise identification of subtle differences in pomegranate maturity, this design provides a more robust multi-scale fusion strategy compared to standard bi-directional architectures. Additionally, LAWD compresses MSFM feature maps, prioritizing the retention of critical texture and edge information from pomegranate surfaces while effectively filtering background interference.
Fig. 6.
MFFN structure diagram.
Results and analysis
Experimental setup
In the experimental design, unified experimental parameter configuration effectively controls external factors, enabling research results to more accurately reflect the influence of key variables. The training hardware configuration comprises: CPU Intel(R) Xeon(R) Gold 6330 @ 2.00 GHz, 90GB memory, and RTX 3090 GPU (24GB). The software environment includes: Ubuntu 22.04 operating system, PyTorch 2.3.0, Python 3.12, and CUDA 12.1. The fixed parameters employed in experiments are detailed in Table 3. This configuration aims to minimize interference from non-network-related factors on experimental data. Through rigorous recording and maintenance of these parameters, experimental environment stability is ensured, thereby substantially enhancing result accuracy and reproducibility.As GLMF-DEIM is built on the DEIM framework (inheriting DETR’s architectural traits), small-batch training performs better, batch size of 4 yields 3% higher AP than batch size of 8, ensuring stable convergence and strong generalization. Training follows a linear warm-up for the first 5 epochs, with the learning rate subsequently adjusted via a cosine annealing schedule.
Table 3.
Experimental parameter setting.
| Parameter names | Parameter values |
|---|---|
| Batch Size | 4 |
| Epochs | 132 |
| Image Size | 640*640 |
| Initial Learning Rates | 0.0002 |
| Weight_decay | 0.0001 |
| Optimizers | AdamW |
This study utilizes the COCO evaluation framework27 for quantitative algorithm performance analysis, including metrics: Average Precision (AP), AP50 (AP at IoU threshold of 50%), AP75 (AP at IoU threshold of 75%), APS (AP for small-scale targets), APM (AP for medium-scale targets), APL (AP for large-scale targets), alongside computational cost metrics including GFLOPs and model parameter count (Params). Where precision P and recall R are calculated in accordance with Eq. 17, AP is defined by Eq. 18, IoU is computed referring to Eq. 19, APS corresponds to targets with pixel area less than 322, APM to those with area between 322 and 962, APL to those with area larger than 962, and all metrics are strictly implemented in accordance with the official pycocotools standards.
![]() |
17 |
![]() |
18 |
![]() |
19 |
Comparative experiment
To validate the proposed algorithm, this section compares against traditional algorithms including Faster-RCNN28, RT-DETR-R1829, YOLOv8s30, YOLO10s31, YOLO11s32, and pomegranate maturity detection algorithms including HESP-DETR33, YOLO-Granada34, and YOLO-V735. As presented in Table 4, the proposed OURS method achieves significant performance breakthroughs in detection accuracy, attaining optimal performance across all evaluation metrics. Specifically, the OURS method achieves an AP50 of 93.1%, representing a 1.9% improvement over the second-best YOLO-Granada method’s 91.2% and a substantial 17.8% improvement over the traditional strong baseline Faster-RCNN’s 75.3%. Under the more stringent AP75 metric, the OURS method reaches 84.5%, surpassing YOLO-Granada’s 82.2% by 2.3%. For small object detection capability measured by APS, the OURS method achieves 32.7%, representing a 1.3% improvement over YOLO-Granada’s 31.4%. In the comprehensive evaluation metric APL for large object detection, the OURS method attains an excellent score of 92.4%, im-proving upon YOLO-Granada’s 90.6% by 1.8% and substantially outperforming Faster-RCNN’s 87.2% by 5.2%. These comprehensive performance improvements fully validate the technical advancement and practical value of the proposed method in object detection tasks. As illustrated in Fig. 7, the proposed algorithm outperforms other algorithms across all six comparative parameters, with all related parameters achieving state-of-the-art performance.
Table 4.
Comparison experiment results Table.
| Method | GFLOPS | PARAMS | AP | AP50 | AP75 | APS | APM | APL |
|---|---|---|---|---|---|---|---|---|
| Faster-RCNN | 208.7 | 41.30 | 75.3 | 87.8 | 78.3 | 28.4 | 64.7 | 87.2 |
| RT-DETR-R18 | 60.3 | 20.03 | 76.7 | 88.1 | 78.1 | 27.9 | 65.1 | 87.6 |
| YOLOv8s | 28.5 | 11.13 | 77.1 | 89.4 | 79.1 | 29.3 | 67.4 | 88.2 |
| YOLO10s | 21.4 | 7.22 | 76.4 | 89.7 | 80.3 | 28.6 | 67.2 | 87.8 |
| YOLO11s | 21.3 | 9.42 | 77.8 | 90.4 | 80.8 | 29.1 | 68.5 | 88.7 |
| HESP-DETR | 37.5 | 12.52 | 78.3 | 90.1 | 81.2 | 29.7 | 68.7 | 89.1 |
| YOLO-Granada | 8.1 | 3,85 | 78.7 | 91.2 | 82.2 | 31.4 | 69.6 | 90.6 |
| YOLO-V7 | 6.3 | 12.6 | 76.8 | 89.4 | 79.8 | 28.8 | 68.1 | 87.3 |
| Ours | 16.9 | 8.16 | 79.6 | 93.1 | 84.5 | 32.7 | 71.4 | 92.4 |
Fig. 7.
Comparison of experimental results.
More importantly, while achieving optimal detection accuracy, the OURS method also demonstrates exceptional computational efficiency advantages, truly realizing the effective trade-off balance between accuracy and efficiency. From a computational complexity perspective, com-pared to the computation-intensive Faster-RCNN method requiring 208.7 GFLOPs and 41.30 M parameters, the OURS method requires only 16.9 GFLOPs and 8.16 M parameters, representing a 91.9% reduction in computational cost and an 80.2% decrease in parameter count. Compared with other lightweight YOLO series methods, although the OURS method’s computational over-head is slightly higher than YOLO-V7’s 6.3 GFLOPs, it demonstrates tremendous advantages in detection accuracy: AP50 improves by 16.3% over YOLO-V7’s 76.8%, and APL surpasses its 87.3% by 5.1%. Even compared with the parameter-lightest YOLO-Granada, the OURS method achieves significant accuracy improvements at the cost of approximately 4.31 M additional parameters, while maintaining practical deployment potential in resource-constrained scenarios such as mobile devices, edge computing, and real-time video analysis.
Ablation experiments
This section analyzes the effects of four modules on detection performance. As presented in Table 5, from the AP metric perspective, the individual addition of the MFFN module yields the most significant improvement, elevating AP from the baseline’s 76.8% to 77.4%, while the individual contribution of the LFDStages module is relatively modest, with AP improving only to 77.2%. When progressively combining multiple modules, performance demonstrates a sustained upward trend, particularly when the GHDW, LAWD, and LFDStages modules are combined, achieving an AP50 of 92.1%, indicating favorable synergistic effects. Upon full integration of all four modules, AP reaches 79.6%, with AP50 and AP75 achieving 93.1% and 84.5% respectively, representing significant performance improvements over the baseline model.
Table 5.
Results of ablation experiments.
| GHDWStem | LAWD | LFDStages | MFFN | AP | AP50 | AP75 | APS | APM | APL |
|---|---|---|---|---|---|---|---|---|---|
| 76.8 | 89.4 | 80.3 | 28.7 | 67.8 | 87.6 | ||||
| √ | 77.4 | 91.1 | 81.4 | 29.3 | 68.7 | 88.5 | |||
| √ | 77.2 | 90.4 | 81.2 | 29.6 | 68.6 | 88.7 | |||
| √ | 78.1 | 92.1 | 81.7 | 30.1 | 69.3 | 89.2 | |||
| √ | 78.5 | 92.2 | 82.5 | 31.4 | 69.8 | 90.7 | |||
| √ | √ | √ | 78.8 | 92.4 | 83.1 | 31.7 | 70.2 | 91.4 | |
| √ | √ | √ | 79.2 | 92.8 | 83.5 | 32.1 | 70.8 | 91.7 | |
| √ | √ | √ | √ | 79.6 | 93.1 | 84.5 | 32.7 | 71.4 | 92.4 |
Regarding detection performance across different scale targets, the improved model demonstrates consistent enhancement effects across all precision thresholds. Notably, the improvement in APS (small targets) is most pronounced, advancing from the baseline’s 28.7% to 32.7%, representing an absolute improvement of 4.0% points and a relative enhancement of 13.9%, indicating that the proposed modules are particularly effective for small-scale pomegranate detection. APM (medium scale) and APL (large scale) also improve from 67.8% to 87.6% to 71.4% and 92.4% respectively, with relative improvements of 5.3% and 5.5%. Overall, the synergistic effects of the four improved modules not only enhance detection accuracy but also strengthen the model’s capability for detecting targets of varying scales, particularly excelling in small object detection, thereby providing robust support for automated pomegranate maturity detection in complex environments for practical applications.
The optimality of Haar-based decomposition in the GHDWStem module is both theoretically and empirically justified. Theoretically, its step-function basis is uniquely sensitive to the abrupt intensity changes between pomegranate edges and complex foliage backgrounds, enabling superior target-background separation in the frequency domain. Empirically, Table 4 confirms its impact, the individual addition of GHDWStem raised AP50 from 89.4% to 91.1%33. Most notably, the model achieved a 4.0% absolute improvement in APS, rising from 28.7% to 32.7%. This demonstrates that Haar decomposition effectively preserves high-frequency structural details often lost in traditional convolutions while remaining computationally efficient for lightweight deployment.
Visualization experiment
Heatmap experiment
This section presents the analysis of heatmap experimental results for the improved algorithm. As illustrated in Fig. 8, the improved GLMF-DEIM algorithm achieves significant enhancements in detection accuracy and feature localization capability compared to the traditional DEIM algorithm. From the heatmaps, it can be observed that while the DEIM algorithm can identify basic contours and positions of pomegranates, its attention distribution is relatively dispersed, exhibiting deficiencies in maturity discrimination and boundary localization, particularly demonstrating suboptimal performance when processing mixed maturity scenarios. In contrast, the GLMF-DEIM improved algorithm employs an end-to-end detection architecture, effectively separating pomegranate targets from green foliage backgrounds at the frequency domain level through Gaussian-Haar discrete wavelet transform in the GHDWStem module, fundamentally addressing the critical challenge of distinguishing green pomegranates from green leaf backgrounds in traditional RGB color space. Combined with LAWDown lightweight downsampling and FDConv frequency-domain dynamic convolution across five LFDStages for progressive feature learning, the algorithm significantly enhances perception capability for subtle variations in pomegranate maturity.
Fig. 8.
Comparison results of thermodynamic diagram.
The MFFN network constructs multi-scale feature pyramids through bidirectional MSFM modules capable of simultaneously processing pomegranate targets of different sizes, while multi-layer DEIM-Decoder’s self-attention and cross-attention mechanisms achieve precise feature decoding, enabling high-activation regions in heatmaps to more accurately focus on critical feature areas of pomegranate fruits. The anti-interference capability and bounding box detection accuracy in complex orchard environments are also markedly improved, providing more efficient and re-liable technical solutions for intelligent harvesting, automated grading, and quality control in the pomegranate industry.
Visualization comparison
This section presents visualization experimental results of different algorithms for pomegranate maturity detection. As illustrated in Fig. 9, significant performance differences exist among various algorithms. Faster-RCNN and RT-DETR-R18 demonstrate poor performance, primarily manifested in severe missed detections, imprecise bounding boxes, tendency to misidentify pomegranate calyxes and fruits as two independent targets, and sensitivity to back-ground interference, frequently misclassifying red flowers and leaf shadows as pomegranate fruits. YOLOv8s and YOLO-V7 exhibit similarly inadequate performance, presenting issues including maturity classification confusion, poor overlapping target processing capability, insufficient illumination adaptability, detection box displacement, and excessive reliance on color features, resulting in high false positive rates in complex orchard environments. Although algorithms such as YOLO10s, YOLO11s, HESP-DETR, and YOLO-Granada show improvements compared to the aforementioned methods, they still suffer from insufficient boundary localization accuracy, limited complex background interference processing capability, weak occlusion recovery ability, slow training convergence, and parameter tuning sensitivity, particularly prone to misidentification when processing scenarios where middle_fruit overlaps with green backgrounds.
Fig. 9.
Contrast algorithm visualization experiment results.
In contrast, the proposed OURS algorithm demonstrates optimal performance, successfully resolving the pomegranate calyx separation identification problem by correctly recognizing complete pomegranate fruits as single targets, effectively addressing the misidentification challenges caused by middle_fruit overlap with green backgrounds. The algorithm significantly outperforms other methods in boundary localization accuracy, multi-scale adaptability, illumination robust-ness, and false positive control, providing more reliable technical support for precision pomegranate harvesting and quality assessment.
Conclusion
Experimental results demonstrate that the GLMF-DEIM algorithm successfully overcomes the technical bottlenecks of traditional fruit and vegetable maturity detection methods through an innovative frequency-spatial domain fusion architecture. Compared with existing mainstream detection algorithms such as YOLO series and RT-DETR, the proposed method exhibits significant advantages in processing the unique growth stage feature variations of pomegranates. Comprehensive experimental evaluations on our self-constructed pomegranate dataset demonstrate that GLMF-DEIM achieves significant superiority over current state-of-the-art models and outperforms both the best and worst-performing baselines across all key metrics. Specifically, the proposed method attains an AP of 79.6% and an AP50 of 93.1% surpassing the best lightweight baseline YOLO-Granada (AP: 78.7%, AP50: 91.2%) by 0.9% and 1.9% respectively, and outperforming the lowest-performing baseline RT-DETR-R18 (AP: 76.7%, AP50: 88.1%) by 2.9% and 5.0%. For more stringent maturity discrimination (AP75), GLMF-DEIM reaches 84.5%, which is 2.3% higher than YOLO-Granada (82.2%) and 6.4% higher than RT-DETR-R18 (78.1%). In terms of scale-specific detection, the model achieves 32.7% APS (small targets), 71.4% APM (medium targets), and 92.4% APL (large targets)—outperforming the best baseline YOLO-Granada by 1.3%, 1.8%, and 1.8% respectively, and the worst baseline RT-DETR-R18 (APS: 27.9%) by 4.8% for small targets. In balancing accuracy and efficiency, GLMF-DEIM maintains lightweight characteristics (16.9 GFLOPs, 8.16 M parameters): compared to the heavyweight baseline Faster-RCNN (208.7 GFLOPs, 41.30 M parameters), it reduces computational complexity by 91.9% and parameter count by 80.2% while boosting AP50 by 5.3%; compared to the most lightweight baseline YOLO-Granada (8.1 GFLOPs, 3.85 M parameters), it achieves substantial accuracy gains at the cost of only moderate increases in computational overhead, retaining practical deployment potential for edge devices.
While the GLMF-DEIM algorithm demonstrates exceptional performance, several limitations warrant further investigation, including its unverified generalization across rare pomegranate varieties, a marginal inference speed gap compared to YOLO10s (28 FPS vs. 35 FPS on an RTX 3090), and a heavy reliance on fully annotated data that hinders large-scale scalability. To address these challenges, future research will expand the dataset to encompass diverse varieties and regions while integrating multi-modal data, such as infrared and multispectral imagery, to enhance robustness under extreme weather. Furthermore, we plan to employ model quantization and pruning to optimize the architecture for low-power IoT deployment and adapt the core modules to other economic crops, ultimately establishing a universal intelligent detection platform for smart agriculture.
Author contributions
Conceptualization, Y.W. and S.L.; methodology, S.L.; software, Y.W.; validation, Y.W., S.L. and W.L; formal analysis, K.Z.; investigation, P.H.; resources, W.L.; data curation, Y.W.; writing—original draft preparation, K.Z.; writing—review and editing, S.L.; visualization, K.Z.; supervision, W.L.; project ad-ministration, P.H.; funding acquisition, P.H. All authors have read and agreed to the published version of the manuscript.
Funding
This work was supported by the Dezhou Big Data and Intelligent Perception Technology Engineering Re-search Center(PT2025KJT002).
Data availability
The data of this study can be obtained by contacting the corresponding author.
Declarations
Competing interests
The authors declare no competing interests.
Footnotes
Publisher’s note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
References
- 1.Shi, J. Botany and taxonomy of pomegranate. In The Pomegranate Genome. CRC 1–9. (2025).
- 2.Nishad, D. K., Tiwari, A. N. & Khalid, S. Multi-Objective Optimization Simulation of Unified Power Quality Conditioner (UPQC) (International Journal of Theoretical & Applied Computational Intelligence, 2025).
- 3.Khan, A. Y. et al. Malicious insider attack detection in IoTs using data analytics. IEEE Access.8, 11743–11753 (2019). [Google Scholar]
- 4.Haseeb, K. et al. Secure and energy-aware heuristic routing protocol for wireless sensor network. IEEE Access.8, 163962–163974 (2020). [Google Scholar]
- 5.Selvanarayanan, R., Rajendran, S. & Alotaibi, Y. Early Detection of Colletotrichum Kahawae Disease in Coffee Cherry Based on Computer Vision Techniques (Computer Modeling in Engineering, 2023).
- 6.Raveena, S. & Surendran, R. ResNet50-based classification of coffee cherry maturity using deep-CNN. In 2023 5th International Conference on Smart Systems and Inventive Technology (ICSSIT). IEEE, 1275–1281 (2023).
- 7.Wei, J., Cui, Y. & Luo, Y. Rice growth period detection and paddy field evapotranspiration Estimation based on an improved SEBAL model: Considering the applicable conditions of the advection equation. Agric. Water Manag. 278. (2023).
- 8.Liang, C. et al. Detection of Litchi fruit maturity States based on unmanned aerial vehicle remote sensing and improved YOLOv8 model. Front. Plant. Sci.16, 1568237. 10.3389/fpls.2025.1568237 (2025). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 9.Liu, K. et al. A lightweight recognition method for rice growth period based on improved YOLOv5s. Sensors23, 6738 (2023). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 10.Ge, Y. et al. Tracking and counting of tomato at different growth period using an improving YOLO-Deepsort network for inspection robot. Machines10, 489 (2022). [Google Scholar]
- 11.Lee, W. S. et al. Sensing technologies for precision specialty crop production. Comput. Electron. Agric.74, 2–33 (2010). [Google Scholar]
- 12.Anjali; Jena, A. et al. State-of-the-art non-destructive approaches for maturity index determination in fruits and vegetables: principles, applications, and future directions. Food Prod. Process. Nutr.6, 56. 10.1186/s43014-023-00205-5 (2024). [Google Scholar]
- 13.Zhu, X. et al. Deformable detr: Deformable transformers for end-to-end object detection. arXiv:2010.04159 2020.
- 14.Zhu, Z. et al. OPT-CO: Optimizing pre-trained transformer models for efficient COVID-19 classification with stochastic configuration networks. Inf. Sci.680, 121141 (2024). [Google Scholar]
- 15.Zhu, H., Zhu, Z. & Lu, S. Y. BccT: An efficient transformer model for blood cell classification. Multimedia Syst.32 (1), 29 (2026). [Google Scholar]
- 16.Sun, P. et al. What makes for end-to-end object detection? In Proceedings of the 38th International Conference on Machine Learning, Proceedings of Machine Learning Research, pp. 9934–9944. (2021).
- 17.Huang, S. et al. Deim: Detr with improved matching for fast convergence. In Proceedings of the Computer Vision and Pattern Recognition Conference, pp. 15162–15171. (2025).
- 18.Chen, Q. et al. Group detr: Fast detr training with group-wise one-to-many assignment. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pp. 6633–6642. (2023).
- 19.Vo, H. et al. Robust motorcycle helmet detection in real-world scenarios: Using co-detr and minority class enhancement. In Proceedings of the Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 7163–7171. (2024).
- 20.Zhang, H., Wang, Y., Dayoub, F., Sunderhauf, N. & Varifocalnet An iou-saware dense object detector. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 8514–8523. (2021).
- 21.Tiutiakina, A., De Luca, A. & De Nardis, J. Frame potential of brownian SYK model of Majorana and Dirac fermions. J. High Energy Phys.2024 (115). 10.1007/JHEP01(2024)115 (2024).
- 22.Pillai, B. S. et al. Wavelet Transform-Based bayesian inference learning with conditional variational autoencoder for mitigating injection attack in 6G edge Network. Comput. Model. Eng. Sci.145 (1), 1141 (2025). [Google Scholar]
- 23.Li, M., Nica, M. & Roy, D. The future is log-gaussian: Resnets and their infinite-depth-and-width limit at initialization. Adv. Neural. Inf. Process. Syst.34, 7852–7864 (2021). [Google Scholar]
- 24.Dong, H. et al. PGA-Net: pyramid feature fusion and global context attention network for automated surface defect detection. IEEE Trans. Industr. Inf.16, 7448–7458. 10.1109/TII.2019.2958826 (2020). [Google Scholar]
- 25.Zhu, H., Zhu, Z. & Lu, S. Y. Multi-stage attention for efficient brain tumor classification with SAM-Med2D. Multimedia Syst.32 (1), 51 (2026). [Google Scholar]
- 26.Gao, H., Yang, Y., Li, C., Gao, L. & Zhang, B. Multiscale residual network with mixed depthwise Convolution for hyperspectral image classification. IEEE Trans. Geosci. Remote Sens.59, 3396–3408. 10.1109/TGRS.2020.3008286 (2021). [Google Scholar]
- 27.Tian, J. et al. Performance analysis of deep learning-based object detection algorithms on COCO benchmark: a comparative study. J. Eng. Appl. Sci.71, 76. 10.1186/s44147-024-00411-z (2024). [Google Scholar]
- 28.Sun, X., Wu, P. & Hoi, S. C. Face detection using deep learning: An improved faster RCNN approach. Neurocomputing299, 42–50 (2018). [Google Scholar]
- 29.Wu, M. et al. Improved RT-DETR and its application to fruit ripeness detection. Front. Plant. Sci.16, 1423682. 10.3389/fpls.2025.1423682 (2025). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 30.Sohan, M., Sai Ram, T. & Rami Reddy, C. V. A review on YOLOv8 and its advancements. In Proceedings of the Data Intelligence and Cognitive Informatics, Singapore, 2024, pp. 529–545. (2024).
- 31.A’la, F. Y., Firdaus, N. & Hartatik; Imaduddin, H. Precision in safety: YOLOv9 vs. YOLOv10 for helmet image detection. In Proceedings of the 2024 International Visualization, Informatics and Technology Conference (IVIT), 7–8 (2024), pp. 159–164. (2024).
- 32.Huang, J., Wang, K., Hou, Y. & Wang, J. LW-YOLO11: A lightweight Arbitrary-Oriented ship detection method based on improved YOLO11. Sensors25, 65 (2025). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 33.Wang, S., Dong, S., Chen, S. & Liu, M. An efficient scale-aware model based on the improved RT-DETR for pomegranate growth stage detection. Neurocomputing 130462. (2025).
- 34.Zhao, J. et al. YOLO-Granada: a lightweight attentioned Yolo for pomegranates fruit detection. Sci. Rep.14, 16848. 10.1038/s41598-024-67526-4 (2024). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 35.Nergiz, M. YOLO-V7 based detection and classification of pomegranate fruits in different growing stages. In Proceedings of the AVRASYA 8th International Conference on Applied Sciences, Tbilisi, Georgia, p. 12. (2023).
Associated Data
This section collects any data citations, data availability statements, or supplementary materials included in this article.
Data Availability Statement
The data of this study can be obtained by contacting the corresponding author.



























