A pomegranate full-cycle detection method based on spatial recombination and detail reverse compensation

By employing spatial reorganization and detail inverse compensation, the problems of poor detection of small targets and positioning drift in pomegranate full-cycle detection were solved, achieving high-precision and low-latency pomegranate target detection, which is suitable for orchard environments with complex backgrounds.

CN122156994APending Publication Date: 2026-06-05CHINA THREE GORGES UNIV

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
CHINA THREE GORGES UNIV
Filing Date
2026-03-25
Publication Date
2026-06-05

AI Technical Summary

Technical Problem

Existing technologies for pomegranate full-cycle detection suffer from poor performance in detecting small targets, weak algorithm noise suppression capabilities, and a tendency to drift in location. In particular, the false negative rate of pomegranate targets is high in complex backgrounds with foliage occlusion and color camouflage.

Method used

A detection method based on spatial reconstruction and inverse detail compensation is adopted. It improves the accuracy of feature extraction and bounding box regression by using the multipath collaborative downsampling module MCDM, the asymmetric dual-path fusion module ADFM, and the detail re-injection fusion module DRIF, combined with the scale-guided Inner-GIoU loss function.

Benefits of technology

It significantly improves the detection accuracy of pomegranate targets, reduces the false negative rate, increases the model's recall rate for small targets, and maintains high inference speed and computational efficiency in complex backgrounds, meeting the needs of real-time field operations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122156994A_ABST
    Figure CN122156994A_ABST
Patent Text Reader

Abstract

The application discloses a pomegranate whole cycle detection method based on space domain recombination and detail reverse compensation, relates to the technical field of computer vision and intelligent agriculture, and first acquires pomegranate whole cycle images in an unstructured natural environment, and carries out pretreatment to obtain a training set; an RT-DETR model is improved based on a multi-path cooperative down-sampling module MCDM, an asymmetric dual-path fusion module ADFM, a detail re-injection fusion module DRIF and an Inner-GIoU loss function, and a MADI-DETR model is established, and the training set is used for training; the trained MADI-DETR model can be used for pomegranate target identification. The application uses the space domain recombination and reverse compensation mechanism, compared with the benchmark model, the model is kept high efficiency while the detection precision is significantly improved, especially in the complex background of branch and leaf shielding and same color camouflage, the pomegranate target miss detection rate is significantly reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of computer vision and smart agriculture technology, and in particular relates to a pomegranate full-cycle detection method based on spatial reconstruction and detail inverse compensation. Background Technology

[0002] As an economic crop with both edible and medicinal value, precise management throughout the pomegranate's entire growth cycle is crucial for improving industry efficiency. However, the natural, unstructured orchard environment is extremely complex, and existing target detection technologies such as RT-DETR have the following shortcomings when directly applied: First, small targets such as flower buds may be missed due to loss of detail caused by downsampling. Second, complex backgrounds of branches and leaves generate highly redundant features, resulting in low computational efficiency and weak noise suppression capabilities of the algorithm. Third, the color of unripe fruit is similar to that of branches and leaves, diluting the texture information of deep networks and blurring the boundary positioning. Fourth, when fruits grow in dense clusters, the existing loss function has insufficient regression accuracy, which can easily cause detection box drift.

[0003] In existing technologies, visual detection schemes for agricultural targets mainly follow an evolutionary path from manual features to data-driven approaches. Mainstream methods generally face challenges in balancing accuracy and efficiency: single-stage detectors, represented by the YOLO series, excel in inference speed, but their localization and classification accuracy is significantly limited when dealing with small targets, dense occlusions, and overlapping instances commonly found in fields; while two-stage models, represented by Faster R-CNN, can provide higher detection accuracy, but their complex cascaded structure and heavy computational load make it difficult to support real-time field operation scenarios that require low-latency responses.

[0004] Furthermore, existing Transformer-based end-to-end detection models such as RT-DETR still exhibit a significant “feature-semantic gap” when transferred to unstructured pomegranate full-cycle scenes: their aggressive downsampling strategy leads to the irreversible loss of high-frequency geometric details of small targets such as buds and flowers in shallow networks; at the same time, the excessive abstraction of deep features dilutes the key texture information that distinguishes green fruits of the same color from branches and leaves, causing the model to drift when dealing with weak textures and camouflaged targets of the same color.

[0005] Therefore, a pomegranate full-cycle detection method based on spatial reorganization and detail inverse compensation needs to be proposed to solve the above problems. Summary of the Invention

[0006] The technical problem to be solved by this invention is to provide a pomegranate full-cycle detection method based on spatial reorganization and detail inverse compensation. It aims to solve the problems of poor detection effect of existing technology for small targets, poor noise suppression ability of algorithm, and easy occurrence of positioning drift. It has the characteristics of significantly improving detection accuracy and significantly reducing the false detection rate of pomegranate targets in complex backgrounds with branch and leaf occlusion and same color camouflage.

[0007] To achieve the above technical solution, the technical solution adopted by the present invention is as follows: A pomegranate full-cycle detection method based on spatial reconfiguration and detail inverse compensation includes: S1: Acquire pomegranate image data throughout the entire lifecycle in the orchard environment and perform preprocessing; S2 inputs the preprocessed image into the backbone network and performs feature extraction through the Multipath Collaborative Downsampling (MCDM) module. The MCDM module includes parallel semantic enhancement paths, salient feature selection paths, and detail preservation paths. Among them, the detail preservation path adopts the parameterless spatial domain reconstruction (SPD) mechanism to map spatial dimension information to the channel dimension. S3, input the feature map output by the backbone network into the hybrid encoder; in the feature fusion stage of the encoder, the asymmetric dual-path fusion module ADFM is used to decouple the feature channels and perform differential calculations on the retained path and the enhanced path. S4, before the decoder stage, introduces the detail re-injection fusion module DRIF, which inversely fuses the shallow geometric detail features of the backbone network with the deep semantic features. S5 inputs the fused features into the detection head, calculates the bounding box regression loss using the auxiliary scale-guided Inner-GIoU loss function, and outputs the detection results.

[0008] Preferably, the specific processing procedure of the detail-preserving path in step S2 is as follows: the input feature map is divided into non-overlapping sub-blocks in the spatial dimension by using the SPD mechanism according to a 2×2 neighborhood window; the pixels at four positions in each window are rearranged along the channel dimension to form four sub-feature maps, thereby achieving downsampling while preserving the geometric texture of small targets.

[0009] Preferably, the specific structure of the asymmetric dual-path fusion module ADFM in step S3 is as follows: It includes asymmetric partitioning blocks (ASBs) with a preset sparsity ratio. The input feature channels are divided into an identity feature stream and an enhanced feature stream. The identity feature stream is directly forward-propagated to preserve global background semantics. The enhanced feature stream is processed by convolution and group-shuffle unit (GSU) to focus on key target regions. Finally, the two feature streams are fused and output. The Group-Shuffle Unit (GSU) processes the enhanced feature stream by performing group convolution and then channel shuffling to achieve cross-group information fusion.

[0010] Preferably, the sparsity ratio The value is set to 0.75, meaning 75% of the channels are used as identity feature streams and 25% of the channels are used as enhancement feature streams.

[0011] Preferably, the detail re-injection fusion module DRIF in step S4 includes a feature recalibration stage and a hybrid attention-guided fusion stage: Feature recalibration: shallow detail features are concatenated with deep semantic features, and channel attention weights are generated through global average pooling and fully connected layers to filter the features; Hybrid attention guidance: It uses global attention branches to model long-range semantic dependencies, uses local attention branches to capture geometric edge information, generates a spatially adaptive weight graph, and performs weighted inverse injection of deep and shallow components.

[0012] Preferably, the Inner-GIoU loss function in step S5 calculates the auxiliary intersection-union ratio by constructing an auxiliary bounding box, wherein the auxiliary bounding box is center-aligned with its original predicted box and calculated according to a scaling factor. Perform linear scaling; scaling factor of the Inner-GIoU loss function The value range is from 1.1 to 1.2.

[0013] Preferably, the preprocessing in step S1 includes: uniformly scaling the image to 640×640 pixels and performing online data augmentation on the training set. The data augmentation includes random flipping, multi-scale cropping, brightness and contrast jittering, HSV color gamut shifting, and Gaussian noise injection.

[0014] Preferably, the multipath collaborative downsampling module MCDM further includes: Semantic enhancement path: Grouped convolution and depthwise separable convolution are concatenated to extract low-frequency semantic information of the target; Significant feature selection path: The feature map is downsampled using the max pooling operator to suppress background noise.

[0015] Preferably, a computer device includes a memory and a processor, which are communicatively connected to each other. The memory stores computer instructions, and the processor executes the computer instructions to perform the pomegranate full-cycle detection method based on spatial reorganization and detail inverse compensation.

[0016] Preferably, a computer-readable storage medium stores computer instructions that cause a computer to execute the pomegranate full-cycle detection method based on spatial reassembly and detail inverse compensation.

[0017] The beneficial effects of this invention are as follows: 1. This invention effectively solves the problem of small target loss in shallow downsampling through the parameterless spatial domain reconstruction mechanism of the MCDM module, and significantly improves the recall rate of the model for small targets; through the inverse compensation of the DRIF module and the optimization of the Inner-GIoU loss function, the model's ability to locate target boundaries is significantly enhanced.

[0018] 2. This invention utilizes an asymmetric sparse computation strategy in the ADFM module, setting redundant channels as identity mappings. This significantly avoids invalid convolution operations on the background of branches and leaves, enabling intelligent allocation of computational resources to high-value target regions. Experiments show that this invention significantly improves accuracy while significantly reducing computational complexity (GFLOPs) compared to the baseline model, and maintains high inference speed, effectively meeting the low-latency requirements of agricultural machinery for real-time field operations.

[0019] 3. This invention, through the detail-preserving path of the MCDM module and the inverse compensation mechanism of the DRIF module, enables the model to effectively distinguish between easily confused pomegranate buds and pomegranate flowers, and clearly identify target boundaries even under interference from the same-color background. Visual analysis and comparison reveal that the improved model has significantly higher confidence in detecting small targets such as flower buds than the baseline model. Attached Figure Description

[0020] Figure 1 This is a schematic diagram of the overall structure of the MADI-DETR model proposed in this invention; Figure 2 This is a schematic diagram of the MCDM (Multipath Collaborative Downsampling) module structure of the present invention; Figure 3 This is a schematic diagram of the asymmetric dual-path fusion module ADFM structure of the present invention; Figure 4 A schematic diagram of the DRIF (Decoupling Module) structure is provided to further illustrate the details of this invention. Detailed Implementation

[0021] Example 1: like Figure 1 As shown, a pomegranate full-cycle detection method based on spatial reconfiguration and detail inverse compensation includes: S1: Acquire pomegranate image data throughout the entire lifecycle in the orchard environment and perform preprocessing; S2 inputs the preprocessed image into the backbone network and performs feature extraction through the Multipath Collaborative Downsampling (MCDM) module. The MCDM module includes parallel semantic enhancement paths, salient feature selection paths, and detail preservation paths. Among them, the detail preservation path adopts the parameterless spatial domain reconstruction (SPD) mechanism to map spatial dimension information to the channel dimension. S3, input the feature map output by the backbone network into the hybrid encoder; in the feature fusion stage of the encoder, the asymmetric dual-path fusion module ADFM is used to decouple the feature channels and perform differential calculations on the retained path and the enhanced path. S4, before the decoder stage, introduces the detail re-injection fusion module DRIF, which inversely fuses the shallow geometric detail features of the backbone network with the deep semantic features. S5 inputs the fused features into the detection head, calculates the bounding box regression loss using the auxiliary scale-guided Inner-GIoU loss function, and outputs the detection results.

[0022] Preferably, the specific processing procedure of the detail-preserving path in step S2 is as follows: the input feature map is divided into non-overlapping sub-blocks in the spatial dimension by using the SPD mechanism according to a 2×2 neighborhood window; the pixels at four positions in each window are rearranged along the channel dimension to form four sub-feature maps, thereby achieving downsampling while preserving the geometric texture of small targets.

[0023] Preferably, the specific structure of the asymmetric dual-path fusion module ADFM in step S3 is as follows: It includes asymmetric partitioning blocks (ASBs) with a preset sparsity ratio. The input feature channels are divided into an identity feature stream and an enhanced feature stream. The identity feature stream is directly forward-propagated to preserve global background semantics. The enhanced feature stream is processed by convolution and group-shuffle unit (GSU) to focus on key target regions. Finally, the two feature streams are fused and output. The Group-Shuffle Unit (GSU) processes the enhanced feature stream by performing group convolution and then channel shuffling to achieve cross-group information fusion.

[0024] Preferably, the sparsity ratio The value is set to 0.75, meaning 75% of the channels are used as identity feature streams and 25% of the channels are used as enhancement feature streams.

[0025] Preferably, the detail re-injection fusion module DRIF in step S4 includes a feature recalibration stage and a hybrid attention-guided fusion stage: Feature recalibration: shallow detail features are concatenated with deep semantic features, and channel attention weights are generated through global average pooling and fully connected layers to filter the features; Hybrid attention guidance: It uses global attention branches to model long-range semantic dependencies, uses local attention branches to capture geometric edge information, generates a spatially adaptive weight graph, and performs weighted inverse injection of deep and shallow components.

[0026] Preferably, the Inner-GIoU loss function in step S5 calculates the auxiliary intersection-union ratio by constructing an auxiliary bounding box, wherein the auxiliary bounding box is center-aligned with its original predicted box and calculated according to a scaling factor. Perform linear scaling; scaling factor of the Inner-GIoU loss function The value range is from 1.1 to 1.2.

[0027] Preferably, the preprocessing in step S1 includes: uniformly scaling the image to 640×640 pixels and performing online data augmentation on the training set. The data augmentation includes random flipping, multi-scale cropping, brightness and contrast jittering, HSV color gamut shifting, and Gaussian noise injection.

[0028] Preferably, the multipath collaborative downsampling module MCDM further includes: Semantic enhancement path: Grouped convolution and depthwise separable convolution are concatenated to extract low-frequency semantic information of the target; Significant feature selection path: The feature map is downsampled using the max pooling operator to suppress background noise.

[0029] Preferably, a computer device includes a memory and a processor, which are communicatively connected to each other. The memory stores computer instructions, and the processor executes the computer instructions to perform the pomegranate full-cycle detection method based on spatial reorganization and detail inverse compensation.

[0030] Preferably, a computer-readable storage medium stores computer instructions that cause a computer to execute the pomegranate full-cycle detection method based on spatial reassembly and detail inverse compensation.

[0031] Example 2: This embodiment provides a pomegranate full-cycle detection method based on spatial reconstruction and detail inverse compensation. The model constructed by this method is called MADI-DETR, which is mainly based on the improved RT-DETR architecture. The specific implementation steps are as follows: Step 1: Data Collection and Construction To achieve accurate monitoring of the entire pomegranate growth cycle, the dataset in this embodiment consists of two parts: a publicly available dataset (KagglePR-Dataset) and field-collected images, ensuring sample diversity and coverage. Field image collection was conducted systematically in a natural orchard environment. Data collection took place from May to October 2024 at a pomegranate planting base in Luobuqiang Village, Tucheng Town, Dianjun District, Yichang City, Hubei Province. An Intel RealSense™ D455 depth camera was used, with an image resolution of 1280×720 pixels. The collection process focused on covering unstructured and complex scenes such as strong light, backlighting, foliage occlusion, densely packed fruits, and large target scales to ensure data diversity and authenticity.

[0032] A total of 5857 original images were collected. To refine the definition of different growth stages and solve the recognition problem caused by "flowers and fruits of the same color," the LabelImg tool was used to manually annotate all images, establishing a fine-grained annotation system with five categories: pomegranate buds, pomegranate flowers, early-stage pomegranates, growing-stage pomegranates, and mature-stage pomegranates. Notably, "pomegranate buds" and "pomegranate flowers," whose spectral and geometric features are easily confused, were treated as separate categories to force the model to learn their subtle differences. The annotation boxes used were rectangles that tightly enclosed the targets.

[0033] To improve model robustness, online data augmentation was performed on the training set, including random horizontal / vertical flipping, multi-scale cropping, brightness and contrast jitter, HSV color gamut shift, and Gaussian noise injection. Finally, all images were uniformly scaled to 640×640 pixels and randomly divided into training, validation, and test sets in an 8:1:1 ratio.

[0034] Step 2: Multipath Collaborative Feature Extraction (MCDM) After the image is input into the backbone network, to address the information loss problem caused by downsampling of small targets (such as flower buds), the following method is used: Figure 2 The MCDM module shown. This module contains three paths: 1. Semantic Enhancement Path: A concatenated grouped convolution and depthwise separable convolution are used to extract low-frequency semantic information of the target, enhancing the model's understanding of the target category. 2. Significant feature selection path: The feature map is downsampled using the max pooling operator, while suppressing insignificant background noise interference.

[0035] 3. Detail Preservation Path (Core): Embedded parameter-free spatial mapping to depth layer. Specifically, the input feature map is divided into 2×2 windows in the spatial dimension. The feature values ​​at four spatial locations (top left, top right, bottom left, and bottom right) within each window are rearranged and concatenated along the channel dimension. This operation achieves a lossless mapping from the spatial domain to the channel domain, avoiding information entropy decay caused by the convolution stride while performing downsampling, thus fully preserving the fine texture and geometric details of tiny objects such as flower buds.

[0036] Step 3: Asymmetric Dual-Path Fusion Module (ADFM): In the feature fusion stage of the neck network, the following are introduced: Figure 3 The asymmetric dual-path fusion module (ADFM) is shown. To reduce computational overhead for redundant information such as complex branching backgrounds, the core of this module is the asymmetric segmentation block (ASB), and its process is as follows: 1. Feature decoupling: Setting a sparsity ratio The input feature channels are divided into two parts. 75% of the channels are used as the identity feature stream and directly forward-propagated to preserve global contextual semantics; 25% of the channels are used as the enhancement feature stream.

[0037] 2. Sparse computation: Lightweight convolution processing is performed only on the 25% of enhanced feature stream, and group-shuffle units (GSU) are used to promote information interaction between different feature groups, so that computational resources are focused on key discriminative features such as fruit foreground and outline.

[0038] 3. Feature Fusion: Finally, the processed enhanced feature stream is concatenated and fused with the identity feature stream. This design, based on the feature redundancy hypothesis, intelligently allocates computational resources to high-value target regions, improving computational efficiency while suppressing background noise.

[0039] Step 4: Detailed Reverse Injection (DRIF): To address the issue of blurred boundaries caused by the same-color camouflage between unripe fruit and the background during the growing period, a method such as... Figure 4 The details shown are then injected into the Re-Injection Fusion Module (DRIF). This module establishes a reverse information compensation path from the shallow layer (backbone network) to the deep layer (encoder): 1. Detail recalibration: The detail feature maps from the shallow layers of the backbone network are concatenated with the semantic feature maps provided by the deep layers. Global average pooling is used to generate channel attention weights, and the concatenated features are adaptively filtered and enhanced.

[0040] 2. Hybrid attention generation: A spatially adaptive weight map is generated by using a global self-attention branch (to capture the overall structure of the target) and a local convolutional attention branch (to capture local details such as edges and corners) in parallel.

[0041] 3. Reverse detail injection: Using the spatial weight map mentioned above as a guide, the clear texture details extracted from the shallow features are selectively "injected" into the deep semantic feature map, thereby restoring and strengthening the diluted target boundary information in the deep network and improving the ability to identify disguised targets.

[0042] Step 5: Loss Function Optimization and Output In the detection head, the Inner-GIoU loss function is used instead of the standard IoU loss to optimize the localization accuracy of densely stacked fruits. Specifically, for each predicted bounding box, an auxiliary bounding box of different size but aligned with its center is constructed by introducing a scale factor γ (selected as 1.15). During training, the regression loss is calculated using both the original predicted boxes and the auxiliary boxes. This mechanism provides richer optimization signals with more defined gradient directions in scenarios with highly overlapping fruits, effectively mitigating the drift problem during detection box regression, accelerating model convergence, and improving final localization accuracy. The network ultimately outputs the category of the pomegranate target (including flower bud, flower, young fruit, and mature fruit) and its precise location bounding box coordinates.

[0043] Step 6: Model Training and Evaluation Model training was conducted in the following environment: Ubuntu 22.04 operating system, an NVIDIA GeForce RTX 3090 graphics card with 24GB of VRAM, Python 3.10.16 programming language, PyTorch 2.1.0 deep learning framework, and CUDA 12.1 parallel computing platform. The training employed the stochastic gradient descent (SGD) optimizer, with the following key hyperparameter settings: batch size of 16, initial learning rate of 0.0001, momentum of 0.9, and weight decay coefficient of 0.0001. The training run consisted of 200 epochs.

[0044] To objectively evaluate model performance, accuracy, recall, mean precision (mAP), frame rate (FPS), and computational cost (GFLOPs) are used as evaluation metrics.

[0045] Using the above configuration, the baseline model RT-DETR-R18 and the improved MADI-DETR model of this invention were trained respectively. The results show that the complete model of this invention achieved the best overall performance on the self-built pomegranate full-cycle test set: mAP50 reached 92.19%, mAP50:95 reached 83.16%, recall reached 86.18%, while computational complexity (GFLOPs) was reduced by 8.6%, and inference speed reached 85.72 FPS. Furthermore, through visualization analysis (such as Grad-CAM), it was found that the improved model had significantly higher confidence in detecting small targets such as flower buds than the baseline model, and the number of false positives and confusion with the same-color background was greatly reduced.

Claims

1. A pomegranate full-cycle detection method based on spatial reconstruction and detail inverse compensation, characterized in that, include: S1: Acquire pomegranate image data throughout the entire lifecycle in the orchard environment and perform preprocessing; S2 inputs the preprocessed image into the backbone network and performs feature extraction through the Multipath Collaborative Downsampling (MCDM) module. The MCDM module includes parallel semantic enhancement paths, salient feature selection paths, and detail preservation paths. Among them, the detail preservation path adopts the parameterless spatial domain reconstruction (SPD) mechanism to map spatial dimension information to the channel dimension. S3, input the feature map output by the backbone network into the hybrid encoder; in the feature fusion stage of the encoder, the asymmetric dual-path fusion module ADFM is used to decouple the feature channels and perform differential calculations on the retained path and the enhanced path. S4, before the decoder stage, introduces the detail re-injection fusion module DRIF, which inversely fuses the shallow geometric detail features of the backbone network with the deep semantic features. S5 inputs the fused features into the detection head, calculates the bounding box regression loss using the auxiliary scale-guided Inner-GIoU loss function, and outputs the detection results.

2. The pomegranate full-cycle detection method based on spatial reconstruction and detail inverse compensation according to claim 1, characterized in that, The specific processing procedure of the detail-preserving path in step S2 is as follows: the input feature map is divided into non-overlapping sub-blocks in the spatial dimension by a 2×2 neighborhood window using the SPD mechanism; the pixels at the four positions in each window are rearranged along the channel dimension to form four sub-feature maps, thereby achieving downsampling while preserving the geometric texture of small targets.

3. The pomegranate full-cycle detection method based on spatial reconstruction and detail inverse compensation according to claim 1, characterized in that, The specific structure of the asymmetric dual-path fusion module ADFM in step S3 is as follows: It includes asymmetric partitioning blocks (ASBs) with a preset sparsity ratio. The input feature channels are divided into an identity feature stream and an enhanced feature stream. The identity feature stream is directly forward-propagated to preserve global background semantics. The enhanced feature stream is processed by convolution and group-shuffle unit (GSU) to focus on key target regions. Finally, the two feature streams are fused and output. The Group-Shuffle Unit (GSU) processes the enhanced feature stream by performing group convolution and then channel shuffling to achieve cross-group information fusion.

4. The pomegranate full-cycle detection method based on spatial reconstruction and detail inverse compensation according to claim 3, characterized in that, The sparsity ratio The value is set to 0.75, meaning 75% of the channels are used as identity feature streams and 25% of the channels are used as enhancement feature streams.

5. The pomegranate full-cycle detection method based on spatial reconstruction and detail inverse compensation according to claim 1, characterized in that, The detail re-injection fusion module DRIF in step S4 includes a feature recalibration stage and a hybrid attention-guided fusion stage: Feature recalibration: shallow detail features are concatenated with deep semantic features, and channel attention weights are generated through global average pooling and fully connected layers to filter the features; Hybrid attention guidance: It uses global attention branches to model long-range semantic dependencies, uses local attention branches to capture geometric edge information, generates a spatially adaptive weight graph, and performs weighted inverse injection of deep and shallow components.

6. The pomegranate full-cycle detection method based on spatial reconstruction and detail inverse compensation according to claim 1, characterized in that, In step S5, the Inner-GIoU loss function calculates the auxiliary intersection-union ratio by constructing an auxiliary bounding box. The auxiliary bounding box is aligned with the center of its original predicted box and is calculated according to a scaling factor. Perform linear scaling; scaling factor of the Inner-GIoU loss function The value range is from 1.1 to 1.

2.

7. The pomegranate full-cycle detection method based on spatial reconstruction and detail inverse compensation according to claim 1, characterized in that, The preprocessing in step S1 includes: scaling the image to a uniform 640×640 pixels and performing online data augmentation on the training set. The data augmentation includes random flipping, multi-scale cropping, brightness and contrast jittering, HSV color gamut shifting, and Gaussian noise injection.

8. The pomegranate full-cycle detection method based on spatial reconstruction and detail inverse compensation according to claim 1, characterized in that, The multipath collaborative downsampling module MCDM also includes: Semantic enhancement path: Grouped convolution and depthwise separable convolution are concatenated to extract low-frequency semantic information of the target; Significant feature selection path: The feature map is downsampled using the max pooling operator to suppress background noise.

9. A computer device, characterized in that, It includes a memory and a processor, which are interconnected and communicate with each other. The memory stores computer instructions, and the processor executes the computer instructions to perform the pomegranate full-cycle detection method based on spatial reorganization and detail inverse compensation as described in any one of claims 1 to 8.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions for causing the computer to execute any one of claims 1 to 8 of the pomegranate full-cycle detection method based on spatial reorganization and detail inverse compensation.