A YOLOv8 cherry fruit detection method based on space-frequency distillation and deformable large-kernel convolution embedding

The YOLOv8 cherry fruit detection method, which combines space-frequency distillation and deformable large kernel convolution embedding, solves the problem of insufficient accuracy in cherry fruit detection under complex backgrounds and dynamic lighting. It achieves high accuracy, good robustness, and low computational complexity, making it suitable for edge computing environments.

CN120496056BActive Publication Date: 2026-01-06DALIAN UNIV +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510350946.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-03-24
Publication Date
2026-01-06
Estimated Expiration
2045-03-24

AI Technical Summary

Technical Problem

Existing cherry fruit detection methods lack sufficient accuracy under complex backgrounds and dynamic lighting conditions, making it difficult to meet the precision and intelligence requirements of modern agriculture. Furthermore, their deployment in edge computing environments presents challenges.

Method used

A YOLOv8 cherry fruit detection method employing spatial-frequency distillation and deformable large kernel convolution embedding is proposed. By using spatial feature distillation blocks, frequency feature distillation blocks, and deformable large kernel convolution modules, the network's adaptability to complex backgrounds and dynamic lighting is improved, and the network model is optimized for lightweighting, making it suitable for edge computing environments.

Benefits of technology

It achieves high-precision fruit detection under complex backgrounds and dynamic lighting conditions, has good robustness and scale adaptability, and reduces computational complexity, making it suitable for embedded device deployment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120496056B_ABST
    Figure CN120496056B_ABST
Patent Text Reader

Abstract

The application provides a YOLOv8 cherry fruit detection method based on space-frequency distillation and deformable large kernel convolution embedding. First, a space-frequency feature distillation module is introduced into the backbone network of YOLOv8, and a skip connection is added between the space feature distillation block and the frequency feature distillation block, which can weaken the redundant and inefficient space-frequency features and enhance the representation ability of key features. Second, the space-frequency feature distillation module is used to replace the C2f module at P2-P4 scales in the backbone network of YOLOv8, which can suppress the influence of occlusion / overlap and noise at fine scales and improve the fruit detection accuracy and robustness in complex scenes. Finally, a feature extraction module based on deformable large kernel convolution is proposed, which is used to replace the C2f module at P5 scale in the backbone network of YOLOv8, thereby improving the feature representation ability of the network model for cherry fruits of different scales and shapes. The experimental results verify the effectiveness of the application.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the technical fields of smart agriculture and computer vision, and more particularly to a YOLOv8 cherry fruit detection method based on space-frequency distillation and deformable large kernel convolution embedding. Background Technology

[0002] Cherry fruits are characterized by a short ripening period, high pressure from concentrated harvesting, and a high requirement for commercial fresh consumption. Traditional agricultural methods of manual cultivation and management face problems such as low efficiency, high costs, and insufficient precision. Low fruit identification efficiency results in harvesting costs accounting for over 40% of total production costs, making it difficult to meet the demands of modern, refined, and intelligent agriculture. Therefore, there is an urgent need to develop efficient and accurate cherry fruit detection technologies.

[0003] Cherry fruit detection aims to automate the identification, location, and quantity counting of cherry fruits in natural growing environments using technologies such as digital image processing, computer vision, and artificial intelligence. This overcomes challenges such as dense fruit distribution, varying lighting conditions, complex backgrounds, and fruit occlusion, achieving efficient and accurate cherry fruit detection. It provides crucial technical support for precision planting needs such as real-time monitoring of cherry growth, fruit management, yield prediction, automated harvesting, and quality control.

[0004] Based on different overall technical frameworks, existing cherry fruit detection methods can be mainly divided into three categories: cherry fruit detection methods based on traditional image processing, cherry fruit detection methods based on traditional machine learning, and cherry fruit detection methods based on deep learning.

[0005] Firstly, traditional image processing-based cherry detection methods primarily rely on classical digital image processing and pattern recognition techniques to extract manually designed features such as color, texture, and shape of cherries to achieve fruit target detection. Yang et al. used the HSV color space to set a fixed threshold to extract red fruit regions, thus separating cherries from the background; however, its accuracy significantly decreased under varying lighting conditions or fruit occlusion. Wang et al. introduced the SLIC superpixel segmentation algorithm to optimize fruit boundary division, improving the detection rate of adhered fruits, but sacrificing real-time performance. Liu et al. combined edge detection techniques such as the Canny operator with morphological operations to extract the edges and contours of cherry fruits, but failed to effectively suppress interference from overlapping fruits or complex backgrounds. Gupta et al. used a morphological watershed algorithm for fruit segmentation, which handled overlapping fruits well; however, its accuracy in complex backgrounds still needs further improvement. Overall, although these methods perform well in some simple scenarios, their poor adaptability to environmental changes has led to their gradual replacement by methods based on machine learning and deep learning.

[0006] Secondly, traditional machine learning-based cherry fruit detection methods aim to automatically learn features from data and perform classification or regression by constructing models such as support vector machines (SVMs) and random forests. This has led to a new detection paradigm that combines feature engineering with classifiers. Bai et al. extracted color and texture features of cherries and used SVMs for classification, achieving fruit detection in simple backgrounds. Reis et al. fused color histograms, LBP texture features, and HOG shape features, then used a random forest classifier for cherry fruit detection; however, its cross-variety generalization ability was significantly insufficient. Furthermore, Zhang et al. constructed an AdaBoost cascade classifier based on Haar-like features, and Tian et al. combined SURF keypoint features with an SVM classifier, also achieving some success. Overall, compared to traditional image processing methods, these methods have improved the accuracy and robustness of cherry fruit detection to some extent. However, due to their reliance on manual feature design and lack of adaptability to complex scenes, these methods still lack effective detection means for cherries in scenarios with changes in lighting, fruit occlusion / overlap, etc., where detection performance is often poor.

[0007] Finally, deep learning-based cherry fruit detection methods aim to extract spatial (e.g., color, edge, contour) and contextual features of images using deep convolutional neural networks (such as ResNet, VGG, etc.) and Transformer networks, thereby accurately locating cherries. Gai et al. combined the YOLOv4 CSPDarknet53 backbone network with DenseNet and changed the YOLOv4 prior boxes to label boxes suitable for round fruit extraction, achieving good detection results. To address the weak local perception capability of YOLOv4, Zhou Pinzhi et al. integrated the CBAM attention mechanism into the CSPDarknet53 backbone network structure, adjusted the output of the feature extraction network to increase the ability to acquire semantic information of small targets, and used the K-means algorithm to optimize the prior box size to adapt to the size of cherry targets, further improving the cherry fruit detection accuracy. Gai Rongli et al. further improved the detection accuracy of YOLOv4. The YOLOv7 backbone network was improved by adding a small object detection layer and using the Soft-NMS method to remove redundancy in the detection boxes, thus proposing a nighttime cherry detection method based on the improved YOLOv7. Zhang et al. experimented with different data augmentation methods and deep learning-based combined augmentation methods using the YOLOv5 model, and found that using offline and online augmentation simultaneously can effectively improve the detection efficiency of cherry fruits. Miao Ronghui et al. replaced the backbone network of the YOLOv7 model with MobileNetV3 to reduce the number of network parameters, and added a global attention module to the feature fusion subnetwork, which is suitable for detecting cherry fruits at different ripening stages. The above methods have achieved good detection accuracy on specific datasets and have paid attention to small objects and nighttime lighting conditions to a certain extent. However, in practical applications, the image datasets obtained from orchards usually have more complex dynamic scene changes, such as foliage occlusion, fruit occlusion and overlap, and diverse lighting and weather conditions (such as rain, fog, and wind). At the same time, the size of cherry fruits may vary due to different shooting distances, fruit growth stages, and image resolutions. Existing technologies have ignored the adaptability of network models to cherry fruit detection at multiple scales. Furthermore, deploying existing technologies in edge computing environments or embedded devices remains a significant challenge, and the balance between lightweight network models and performance requires further optimization. Therefore, the methods described above are still insufficient to meet the needs of practical applications.

[0008] In conclusion, achieving accurate automated cherry fruit detection remains a highly challenging task. Currently, there is no cherry fruit detection method that can effectively resist interference from complex backgrounds and dynamic lighting, while also possessing high accuracy, robustness, strong scale adaptability, and low computational complexity. Summary of the Invention

[0009] To address the technical problems mentioned in the background section, this invention provides a YOLOv8 cherry fruit detection method based on space-frequency distillation and deformable macrokernel convolution embedding. This invention effectively suppresses interference from complex backgrounds and dynamic lighting, and is a YOLOv8 cherry fruit detection method with high accuracy, robustness, strong scale adaptability, and low computational complexity based on space-frequency distillation and deformable macrokernel attention embedding.

[0010] The technical means employed in this invention are as follows:

[0011] A YOLOv8 cherry fruit detection method based on space-frequency distillation and deformable large-kernel convolution embedding includes the following steps:

[0012] Step 1: Establish and initialize the network N for cherry fruit detection cherry The network N used for cherry fruit detection cherry Includes: 1 feature-aware subnetwork N feature One multi-scale feature fusion subnetwork N fusion And one object detection head sub-network N detect ;

[0013] Step 2: Input the training set images for multi-scale cherry target detection and the manually labeled set C. label For deep convolutional neural networks N cherry Training is performed, and the training set has a total of N. testImg Take a number of images and set the iteration count iter←1 and the counter ind←1 to obtain the trained deep convolutional neural network.

[0014] Step 3: Input the cherry target detection image I to be processed, and use the trained deep convolutional neural network to detect the fruit targets in image I.

[0015] Further, step 1 includes the following steps:

[0016] Step 1.1: Establish and initialize the feature-aware subnetwork N feature The feature-aware subnetwork N feature It includes: 5 convolutional modules, 3 spatial-frequency feature distillation modules, and 1 feature extraction module based on deformable large kernel convolution. A fast spatial pyramid pooling SPPF module The convolutional modules are respectively The space-frequency characteristic distillation modules are respectively

[0017] Step 1.2: Establish and initialize the multi-scale feature fusion subnetwork N fusion The multi-scale feature fusion subnetwork N fusionIt includes: 4 C2f modules and 2 convolutional modules; the C2f modules are as follows: The convolutional modules are respectively

[0018] Step 1.3: Establish and initialize the target detection head sub-network N detect The target detection head sub-network N detect Includes: 3 YOLOv8 detection head modules; the YOLOv8 detection head modules are respectively

[0019] The Includes: 1 set of 64 convolutional kernels with a size of 3×3, a stride of 2, and a padding mode of 1; 1 BatchNorm2d batch normalization layer; 1 SiLU activation function layer; It includes: 1 group of 128 convolutional kernels with a size of 3×3, a stride of 2, and a padding mode of 1; 1 BatchNorm2d batch normalization layer; and 1 SiLU activation function layer. Includes: 1 group of 256 convolutional kernels with a size of 3×3, a stride of 2, and a padding mode of 1; 1 BatchNorm2d batch normalization layer; 1 SiLU activation function layer. Includes: 1 group of 512 convolutional kernels with a size of 3×3, a stride of 2, and a padding mode of 1; 1 BatchNorm2d batch normalization layer; 1 SiLU activation function layer. Includes: 1024 convolutional kernels with a size of 3×3, a stride of 2, and a padding mode of 1; 1 BatchNorm2d batch normalization layer; and 1 SiLU activation function layer.

[0020] The Includes: 2 sets of convolutional blocks consisting of 128 1×1 convolutional kernels, and 1 layer of Split operation. 1 neck distillation module and Layer 1 connection operation

[0021] Includes: 2 sets of convolutional blocks consisting of 256 1×1 convolutional kernels, and 1 layer of Split operation. 1 neck distillation module and Layer 1 connection operation

[0022] Includes: 2 sets of convolutional blocks consisting of 512 1×1 convolutional kernels, respectively 1st layer Split operation 1 neck distillation module and Layer 1 connection operation

[0023] The two sets of convolutional blocks, each consisting of 128 1×1 convolutional kernels, are as follows: and The two sets of convolutional blocks, each consisting of 256 1×1 convolutional kernels, are respectively... and The two sets of convolutional blocks, each consisting of 512 1×1 convolutional kernels, are respectively

[0024] The Includes: 2 convolutional blocks consisting of 1024 1×1 convolutional kernels, and 1 layer of Split operation. One neck deformable large kernel convolution module and Layer 1 connection operation The two sets of convolutional blocks, each consisting of 1024 1×1 convolutional kernels, are respectively and

[0025] The Includes: 1 convolutional block consisting of 64 3×3 convolutional kernels A convolutional block consisting of 128 1×1 convolutional kernels 1 spatial characteristic distillation block 1 frequency characteristic distillation block And two sets of convolutional blocks consisting of 64 1×1 convolutional kernels each; the two sets of convolutional blocks consisting of 64 1×1 convolutional kernels are respectively and

[0026] The Includes: 1 convolutional block consisting of 128 3×3 convolutional kernels A convolutional block consisting of 256 1×1 convolutional kernels 1 spatial characteristic distillation block 1 frequency characteristic distillation block And two sets of convolutional blocks consisting of 128 1×1 convolutional kernels; the two sets of convolutional blocks consisting of 128 1×1 convolutional kernels are respectively as well as

[0027] The Includes: 1 convolutional block consisting of 256 3×3 convolutional kernels One convolutional block consisting of 512 1×1 convolutional kernels 1 spatial characteristic distillation block 1 frequency characteristic distillation block Two sets of convolutional blocks, each consisting of 256 1×1 convolutional kernels; the two sets of convolutional blocks consisting of 256 1×1 convolutional kernels are respectively

[0028] The Includes: 1 convolutional block consisting of 512 3×3 convolutional kernels 1-layer BatchNorm2d batch normalization layer 1 Dropout layer 1 layer of ReLU activation function layer One convolutional block consisting of 512 1×1 convolutional kernels One convolutional block consists of 512 deformable convolutional kernels of size 5×5. One convolutional block consists of 512 deformable convolutional kernels of size 7×7.

[0029] Furthermore, step 2 includes the following steps:

[0030] Step 2.1: Extract the ind-th image T from the training set. ind and their corresponding labeled

[0031] Step 2.2: Utilize the feature-aware subnetwork N feature Convolutional module For T ind The feature map is obtained through processing.

[0032] Step 2.3: Utilize N feature Convolutional module right The feature map is obtained through processing.

[0033] Step 2.4: Utilize N feature Spatial-frequency characteristic distillation module right The feature map is obtained through processing.

[0034] Step 2.5 Utilize N feature Convolutional module right The feature map is obtained through processing.

[0035] Step 2.6 Utilizing N feature Spatial-frequency characteristic distillation module right The feature map is obtained through processing.

[0036] Step 2.7 Utilize N feature Convolutional module right The feature map is obtained through processing.

[0037] Step 2.8 Utilize N feature Spatial-frequency characteristic distillation module right The feature map is obtained through processing.

[0038] Step 2.9 Using N feature Convolutional module right The feature map is obtained through processing.

[0039] Step 2.10 Using N feature Feature extraction module based on deformable large kernel convolution right The feature map is obtained through processing.

[0040] Step 2.11 Using N feature Fast Space Pyramid Pooling SPPF Module right The feature map F is obtained through processing. feature ;

[0041] Step 2.12 for F feature Perform an upsampling operation and then compare the upsampled feature map with... Perform a connection operation to obtain a feature map.

[0042] Step 2.13 Utilize multi-scale feature fusion subnetwork N fusion C2f module right The feature map is obtained through processing.

[0043] Step 2.14 Perform an upsampling operation and then compare the upsampled feature map with... Perform a connection operation to obtain a feature map.

[0044] Step 2.15 using N fusion C2f module right Processing is performed to obtain small-scale feature maps.

[0045] Step 2.16 Utilize Nfusion Convolutional module right The feature map is obtained through processing.

[0046] Step 2.17 will and Perform a connection operation to obtain a feature map.

[0047] Step 2.18 Utilize N fusion C2f module right Processing is performed to obtain mesoscale feature maps.

[0048] Step 2.19 Using N fusion Convolutional module right The feature map is obtained through processing.

[0049] Step 2.20 will With F feature Perform a connection operation to obtain a large-scale feature map F. fusion ;

[0050] Step 2.21 Utilize the target detection head sub-network N detect Calculate image T ind Fruit target detection results;

[0051] Step 2.22 Let ind ← ind+1, if ind>N testImg If yes, proceed to step 2.23; otherwise, return to step 2.1.

[0052] Step 2.23 Let iter ← iter+1. If the number of iterations iter > Total_iter, then the trained deep convolutional neural network N is obtained. cherry Proceed to step 3; otherwise, update N using the backpropagation algorithm based on stochastic gradient descent and the prediction loss. cherry The parameters are set such that the counter ind ← 1, and the process returns to step 2.1 to reprocess all images in the training set. The Total_iter represents the preset number of iterations.

[0053] Furthermore, step 2.4 includes the following steps:

[0054] Step 2.4.1: Utilize Module pair The feature map is obtained through processing.

[0055] Step 2.4.2: Utilize right Perform splitting to obtain feature maps

[0056] Step 2.4.3: Utilizing the neck distillation module right The feature map is obtained through processing.

[0057] Step 2.4.3.1: Utilize convolutional blocks right The feature map is obtained through processing.

[0058] Step 2.4.3.2: Using a 1×1 convolutional block right The feature map is obtained through processing.

[0059] Step 2.4.3.3: Utilizing spatial characteristics of the distillation block right The feature map is obtained through processing.

[0060] Step 2.4.3.4: Distillation using frequency characteristics right The feature map is obtained through processing.

[0061] Step 2.4.3.5: Utilize a 1×1 convolutional block right The feature map is obtained through processing.

[0062] Step 2.4.3.6: Utilize a 1×1 convolutional block right The feature map is obtained through processing.

[0063] Step 2.4.3.7: [The text abruptly ends here, likely due to an incomplete sentence or a formatting error.] and Perform addition to obtain the feature map. Step 2.4.4: Utilize right and Perform a connection operation to obtain a feature map. Step 2.4.5: Utilize Module pair The feature map is obtained through processing. Furthermore, step 2.6 includes the following steps:

[0064] Step 2.6.1: Utilize Module pair The feature map is obtained through processing. Step 2.6.2: Utilize right Perform splitting to obtain feature maps Step 2.6.3: Utilizing the neck distillation module right The feature map is obtained through processing. Step 2.6.3.1: Utilizing convolutional blocks right The feature map is obtained through processing. Step 2.6.3.2: Using a 1×1 convolutional block right The feature map is obtained through processing.

[0065]

[0066] Step 2.6.3.3: Utilizing spatial characteristics of the distillation block right The feature map is obtained through processing.

[0067]

[0068] Step 2.6.3.4: Distillation using frequency characteristics right The feature map is obtained through processing.

[0069]

[0070] Step 2.6.3.5: Utilize a 1×1 convolutional block right The feature map is obtained through processing.

[0071]

[0072] Step 2.6.3.6: Using a 1×1 convolutional block right The feature map is obtained through processing.

[0073]

[0074] Step 2.6.3.7: [The text abruptly ends here, likely due to an incomplete sentence or a formatting error.] and Perform addition to obtain the feature map. Step 2.6.4: Utilize right and Perform a connection operation to obtain a feature map. Step 2.6.5: Utilize Module pair The feature map is obtained through processing. Furthermore, step 2.8 includes the following steps:

[0075] Step 2.8.1: Utilize Module pair The feature map is obtained through processing. Step 2.8.2: Utilize right Perform splitting to obtain feature maps Step 2.8.3: Utilizing the neck distillation module right The feature map is obtained through processing. Step 2.8.3.1: Utilizing convolutional blocks right The feature map is obtained through processing. Step 2.8.3.2: Using a 1×1 convolutional block right The feature map is obtained through processing.

[0076]

[0077] Step 2.8.3.3: Utilizing spatial characteristics of the distillation block right The feature map is obtained through processing.

[0078] Step 2.8.3.4: Distillation using frequency characteristics right The feature map is obtained through processing.

[0079] Step 2.8.3.5: Utilize a 1×1 convolutional block right The feature map is obtained through processing.

[0080] Step 2.8.3.6: Utilize a 1×1 convolutional block right The feature map is obtained through processing.

[0081] Step 2.8.3.7: [The text abruptly ends here, likely due to an incomplete sentence or a format and Perform addition to obtain the feature map.

[0082] Step 2.8.4: Utilize right and Perform a connection operation to obtain a feature map.

[0083] Step 2.8.5: Utilize Module pair The feature map is obtained through processing.

[0084] Further, step 2.10 includes the following steps:

[0085] Step 2.10.1: Utilize Module pair The feature map is obtained through processing.

[0086] Step 2.10.2: Utilize right Perform splitting to obtain feature maps

[0087] Step 2.10.3: Utilize the neck deformable large kernel convolution module right The feature map is obtained through processing.

[0088] Step 2.10.3.1: Utilizing convolutional blocks right The process involves sequentially processing the results through a batch normalization layer, a Dropout layer, and a ReLU activation function layer to obtain the feature map.

[0089] Step 2.10.3.2: Using a 1×1 convolutional block right The feature map is obtained through processing.

[0090] Step 2.10.3.3: Convolution blocks using deformable convolution kernels right The feature map is obtained through processing.

[0091] Step 2.10.3.4: Convolution blocks using deformable convolution kernels right The feature map is obtained through processing.

[0092] Step 2.10.4: Utilize right and Perform a connection operation to obtain a feature map.

[0093] Step 2.10.5: Utilize Module pair The feature map is obtained through processing.

[0094] Further, step 2.21 includes the following steps:

[0095] Step 2.21.1: Using the detection head module For large-scale feature maps F fusion After processing, the detection result R of the larger target is obtained. large The binary cross-entropy loss function is used to evaluate the classification loss and confidence loss, and the CIoU loss function is used to evaluate the localization loss, thus obtaining R. large The total loss value;

[0096] Step 2.21.2: Using the detection head module For mesoscale feature maps After processing, the detection result R of the medium-sized target is obtained. mid The binary cross-entropy loss function is used to evaluate the classification loss and confidence loss, and the CIoU loss function is used to evaluate the localization loss, thus obtaining R. mid The total loss value;

[0097] Step 2.21.3: Utilizing the detection head module For small-scale feature maps After processing, the detection result R for smaller targets is obtained. small The binary cross-entropy loss function is used to evaluate the classification loss and confidence loss, and the CIoU loss function is used to evaluate the localization loss, thus obtaining R. small The total loss value;

[0098] Step 2.21.4: Apply the nonmaximum suppression algorithm to R. large R mid and R small The process involves filtering out redundant boxes with high overlap to obtain the final detection result and its total loss value.

[0099] Furthermore, step 3 includes the following steps:

[0100] Step 3.1: Utilize the convolution module Process I to obtain the feature map

[0101] Step 3.2: Utilize the convolution module right The feature map is obtained through processing.

[0102] Step 3.3: Distillation module utilizing spatial-frequency characteristics right The feature map is obtained through processing.

[0103] Step 3.3.1: Utilize Module pair The feature map is obtained through processing.

[0104] Step 3.3.2: Utilize right Perform splitting to obtain feature maps

[0105] Step 3.3.3: Utilizing the neck distillation module right The feature map is obtained through processing.

[0106] Step 3.3.3.1: Utilize convolutional blocks right The feature map is obtained through processing.

[0107] Step 3.3.3.2: Using a 1×1 convolutional block right The feature map is obtained through processing.

[0108] Step 3.3.3.3: Utilizing spatial characteristics of the distillation block right The feature map is obtained through processing.

[0109] Step 3.3.3.4: Distillation using frequency characteristics right The feature map is obtained through processing.

[0110] Step 3.3.3.5: Utilize 1×1 convolutional blocks right The feature map is obtained through processing.

[0111] Step 3.3.3.6: Utilize a 1×1 convolutional block right The feature map is obtained through processing.

[0112] Step 3.3.3.7: [The text abruptly ends here, likely due to an incomplete sentence or a format and Perform addition to obtain the feature map.

[0113] Step 3.3.4: Utilize right and Perform a connection operation to obtain a feature map.

[0114] Step 3.3.5: Utilize Module pair The feature map is obtained through processing.

[0115] Step 3.4: Utilize the convolution module right The feature map is obtained through processing.

[0116] Step 3.5: Distillation module utilizing spatial-frequency characteristics right The feature map is obtained through processing.

[0117] Step 3.5.1: Utilize Module pair The feature map is obtained through processing.

[0118] Step 3.5.2: Utilize right Perform splitting to obtain feature maps

[0119] Step 3.5.3: Utilizing the neck distillation module right The feature map is obtained through processing.

[0120] Step 3.5.3.1: Utilizing convolutional blocks right The feature map is obtained through processing.

[0121] Step 3.5.3.2: Utilize a 1×1 convolutional block right The feature map is obtained through processing.

[0122] Step 3.5.3.3: Utilizing spatial characteristics of the distillation block right The feature map is obtained through processing.

[0123] Step 3.5.3.4: Distillation using frequency characteristics right The feature map is obtained through processing.

[0124] Step 3.5.3.5: Utilize a 1×1 convolutional block right The feature map is obtained through processing.

[0125] Step 3.5.3.6: Utilize a 1×1 convolutional block right The feature map is obtained through processing.

[0126] Step 3.5.3.7: [The sentence is incomplete and requires more context to be translated accurately.] and Perform addition to obtain the feature map.

[0127] Step 3.5.4: Utilize right and Perform a connection operation to obtain a feature map.

[0128] Step 3.5.5: Utilize Module pair The feature map is obtained through processing.

[0129] Step 3.6: Utilize the convolution module right The feature map is obtained through processing.

[0130] Step 3.7: Distillation module utilizing spatial-frequency characteristics right The feature map is obtained through processing.

[0131] Step 3.7.1: Utilize Module pair The feature map is obtained through processing.

[0132] Step 3.7.2: Utilize right Perform splitting to obtain feature maps

[0133] Step 3.7.3: Utilizing the neck distillation module right The feature map is obtained through processing.

[0134] Step 3.7.3.1: Utilizing convolutional blocks right The feature map is obtained through processing.

[0135] Step 3.7.3.2: Using a 1×1 convolutional block right The feature map is obtained through processing.

[0136] Step 3.7.3.3: Utilizing spatial characteristics of the distillation block right The feature map is obtained through processing.

[0137] Step 3.7.3.4: Distillation using frequency characteristics right The feature map is obtained through processing.

[0138] Step 3.7.3.5: Utilize a 1×1 convolutional block right The feature map is obtained through processing.

[0139] Step 3.7.3.6: Utilize a 1×1 convolutional block right The feature map is obtained through processing.

[0140] Step 3.7.3.7: [The text abruptly ends here, likely due to an incomplete sentence or a format and Perform addition to obtain the feature map.

[0141] Step 3.7.4: Utilize right and Perform a connection operation to obtain a feature map.

[0142] Step 3.7.5: Utilize Module pair The feature map is obtained through processing.

[0143] Step 3.8: Utilize the convolution module right The feature map is obtained through processing.

[0144] Step 3.9: Utilize a feature extraction module based on deformable large kernel convolution. right The feature map is obtained through processing.

[0145] Step 3.9.1: Utilize Module pair The feature map is obtained through processing.

[0146] Step 3.9.2: Utilize right Perform splitting to obtain feature maps

[0147] Step 3.9.3: Utilize the neck deformable large kernel convolution module right The feature map is obtained through processing.

[0148] Step 3.9.3.1: Utilizing convolutional blocks right The process involves sequentially processing the results through a batch normalization layer, a Dropout layer, and a ReLU activation function layer to obtain the feature map.

[0149] Step 3.9.3.2: Using a 1×1 convolutional block right The feature map is obtained through processing.

[0150] Step 3.9.3.3: Convolution blocks using deformable convolution kernels right The feature map is obtained through processing.

[0151] Step 3.9.3.4: Convolution blocks using deformable convolution kernels right The feature map is obtained through processing.

[0152] Step 3.9.4: Utilize right and Perform connection processing to obtain feature maps.

[0153] Step 3.9.5: Utilize Module pair The feature map is obtained through processing.

[0154] Step 3.10: Utilize the Fast Space Pyramid Pooling SPPF module right The feature map G is obtained through processing. feature ;

[0155] Step 3.11: For G feature Perform an upsampling operation and then compare the upsampled feature map with... Perform a connection operation to obtain a feature map.

[0156] Step 3.12: Utilize the C2f module right The feature map is obtained through processing.

[0157] Step 3.13: For Perform an upsampling operation and then compare the upsampled feature map with... Perform a connection operation to obtain a feature map.

[0158] Step 3.14: Utilize the C2f module right Processing is performed to obtain small-scale feature maps.

[0159] Step 3.15: Utilize the convolution module right The feature map is obtained through processing.

[0160] Step 3.16: [The text appears to be incomplete and contains several grammatical errors. A more accurate translation would require the full context.] and Perform a connection operation to obtain a feature map.

[0161] Step 3.17: Utilize the C2f module right Processing is performed to obtain mesoscale feature maps.

[0162] Step 3.18: Utilize the convolution module right The feature map is obtained through processing.

[0163] Step 3.19: [The text appears to be incomplete and contains several grammatical errors. A more accurate translation would With G feature Perform a connection operation to obtain a large-scale feature map G. fusion ;

[0164] Step 3.20: Utilize the target detection head sub-network N detect Calculate the fruit target detection result in image I;

[0165] Step 3.20.1: Using the detection head module For large-scale feature maps G fusion After processing, the detection result T of the larger target is obtained. large ;

[0166] Step 3.20.2: Using the detection head module For mesoscale feature maps After processing, the detection result T of the medium-sized target is obtained. mid ;

[0167] Step 3.20.3: Utilizing the detection head module For small-scale feature maps After processing, the detection result T for smaller targets is obtained. small ;

[0168] Step 3.20.4: Apply the nonmaximum suppression algorithm to T large T mid and T small The process involves filtering out redundant boxes with high overlap to obtain the final detection result TR.

[0169] Step 3.21: Output TR.

[0170] Compared with the prior art, the present invention has the following advantages:

[0171] First, image datasets acquired from orchards typically exhibit dynamic scene changes such as foliage occlusion, fruit occlusion and overlap, and diverse lighting and weather conditions (e.g., rain, fog, wind). This can cause neural networks to learn a large number of redundant or invalid features, such as background noise or repetitive features, thereby affecting the network's detection capabilities. To address this issue, this invention introduces a spatial feature distillation block. This block calculates the weight of each feature using the numerical distribution of spatial features, thereby separating information-rich feature maps from less information-rich feature maps and reconstructing a more representative feature map. This helps improve the performance of fruit target detection under occlusion and overlap conditions.

[0172] Second, this invention designs a frequency feature distillation block using a split-transform-fusion strategy. First, the original features are mapped to the frequency domain through a split operation to identify redundant information between different frequency bands. Then, inefficient features are weakened and the expression of key sparse features is strengthened through a transformation operation. Finally, a fusion strategy is used to reconstruct the optimized feature representation, enhance the network model's attention to important features of the fruit, and improve the robustness of the detection process.

[0173] Third, due to differences in shooting distance, fruit growth stage, and image resolution, cherry fruits exhibit varied shapes and sizes. Therefore, this invention introduces a deformable large-kernel convolution module into the feature extraction sub-network. Utilizing the receptive field of the large-kernel convolution enhances the network model's ability to model fruits of different scales, and combined with the deformable convolution's adaptive adjustment of sampling positions, it helps capture key features of non-rigid target morphology, thereby more accurately focusing on the target region and enhancing the network's ability to represent fruit edges in complex backgrounds. Fourth, compared to simple deep network stacking models, spatial feature distillation blocks and frequency feature distillation blocks can produce a compact representation of cherry fruit features while maintaining detection accuracy, improving inference efficiency. The deformable large-kernel convolution, on the other hand, can achieve the feature extraction effect of multi-layer small-kernel convolution with adaptive sampling and less computation, effectively reducing computational and storage overhead. Therefore, spatial feature distillation blocks, frequency feature distillation blocks, and deformable large-kernel convolution achieve the goal of network lightweighting, making the network model more suitable for deployment in edge computing environments or embedded devices. In summary, this invention can effectively suppress interference from complex backgrounds and dynamic lighting, and features high accuracy, good robustness, strong scale adaptability, and low computational complexity. Attached Figure Description

[0174] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0175] Figure 1 This is the confusion matrix obtained by the present invention on the test dataset;

[0176] Figure 2 This is an example of the cherry fruit detection results of the present invention;

[0177] Figure 3 This is a network structure diagram of the space-frequency characteristic distillation module of the present invention;

[0178] Figure 4 This is a network structure diagram of the feature extraction module based on deformable large kernel convolution of the present invention;

[0179] Figure 5 This is a network structure diagram of the neck distillation module of the present invention;

[0180] Figure 6 This is a network structure diagram of the neck deformable large kernel convolution module of the present invention;

[0181] Figure 7 This is a network structure diagram of a spatially characteristic distillation block;

[0182] Figure 8 This is a network structure diagram of the frequency characteristic distillation block. Detailed Implementation

[0183] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.

[0184] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0185] like Figure 1-8 As shown, this invention provides a YOLOv8 cherry fruit detection method based on space-frequency distillation and deformable large-kernel convolution embedding, comprising the following steps:

[0186] Step 1. Establish and initialize the network N for cherry fruit detection. cherry It includes one feature-aware subnetwork N feature One multi-scale feature fusion subnetwork N fusion One object detection head subnetwork N detect ;

[0187] Step 1.1 Establish and initialize the feature-aware subnetwork N feature It contains 5 convolutional modules, namely Three spatial-frequency characteristic distillation modules, namely A feature extraction module based on deformable large kernel convolution. A fast spatial pyramid pooling SPPF module

[0188] The It includes a set of 64 convolutional kernels with a size of 3×3, a stride of 2, and a padding mode of 1, a BatchNorm2d batch normalization layer, and a SiLU activation function layer. It includes 128 convolutional kernels with a size of 3×3, a stride of 2, and a padding mode of 1, a BatchNorm2d batch normalization layer, and a SiLU activation function layer. It includes a set of 256 convolutional kernels with a size of 3×3, a stride of 2, and a padding mode of 1, a BatchNorm2d batch normalization layer, and a SiLU activation function layer. It includes 512 convolutional kernels with a size of 3×3, a stride of 2, and a padding mode of 1, a BatchNorm2d batch normalization layer, and a SiLU activation function layer. It includes 1024 convolutional kernels with a size of 3×3, a stride of 2, and a padding mode of 1, 1 BatchNorm2d batch normalization layer, and 1 SiLU activation function layer;

[0189] The It includes two sets of convolutional blocks, each consisting of 128 1×1 convolutional kernels. 1st layer Split operation 1 neck distillation module Layer 1 connection operation It includes two sets of convolutional blocks, each consisting of 256 1×1 convolutional kernels, respectively. 1st layer Split operation 1 neck distillation module Layer 1 connection operation It includes two convolutional blocks, each consisting of 512 1×1 convolutional kernels. 1st layer Split operation 1 neck distillation module Layer 1 connection operation

[0190] The It includes two convolutional blocks, each consisting of 1024 1×1 convolutional kernels, respectively. 1st layer Split operation One neck deformable large kernel convolution module Layer 1 connection operation

[0191] The Includes one convolutional block consisting of 64 3×3 convolutional kernels. A convolutional block consisting of 128 1×1 convolutional kernels 1 spatial characteristic distillation block 1 frequency characteristic distillation block Two sets of convolutional blocks, each consisting of 64 1×1 convolutional kernels, are respectively

[0192] The Includes one convolutional block consisting of 128 3×3 convolutional kernels. A convolutional block consisting of 256 1×1 convolutional kernels 1 spatial characteristic distillation block 1 frequency characteristic distillation block Two sets of convolutional blocks, each consisting of 128 1×1 convolutional kernels, are respectively

[0193] The Includes one convolutional block consisting of 256 3×3 convolutional kernels. One convolutional block consisting of 512 1×1 convolutional kernels 1 spatial characteristic distillation block 1 frequency characteristic distillation block Two sets of convolutional blocks, each consisting of 256 1×1 convolutional kernels, are respectively

[0194] The Includes one convolutional block consisting of 512 3×3 convolutional kernels. 1-layer BatchNorm2d batch normalization layer 1 Dropout layer 1 layer of ReLU activation function layer One convolutional block consisting of 512 1×1 convolutional kernels One convolutional block consists of 512 deformable convolutional kernels of size 5×5. One convolutional block consists of 512 deformable convolutional kernels of size 7×7.

[0195] Step 1.2 Establish and initialize the multi-scale feature fusion subnetwork N fusion It contains 4 C2f modules, namely Two convolutional modules, respectively

[0196] Step 1.3 Establish and initialize the target detection head sub-network N detect It contains three YOLOv8 detection head modules, namely

[0197] Step 2. Input the training set images for multi-scale cherry target detection and the manually labeled set C. label For deep convolutional neural networks N cherry Training is performed, and the training set has a total of N. testImg Image, and let the number of iterations be [number]. ,counter ;

[0198] Step 2.1 Extract the ind-th image T from the training set. ind and their corresponding labeled

[0199] Step 2.2 Utilize the feature-aware subnetwork N feature Convolutional module For T ind The feature map is obtained through processing.

[0200] Step 2.3 Using N feature Convolutional module right The feature map is obtained through processing.

[0201] Step 2.4 Utilizing N feature Spatial-frequency characteristic distillation module right The feature map is obtained through processing.

[0202] Step 2.4.1 Utilize Module pair The feature map is obtained through processing.

[0203] Step 2.4.2 Utilize right Perform splitting to obtain feature maps

[0204] Step 2.4.3 Using the neck distillation module right The feature map is obtained through processing.

[0205] Step 2.4.3.1 Using convolutional blocks right The feature map is obtained through processing.

[0206] Step 2.4.3.2 Using a 1×1 convolutional block right The feature map is obtained through processing.

[0207] Step 2.4.3.3 Utilizing spatial characteristics of the distillation block right The feature map is obtained through processing.

[0208] Step 2.4.3.4 Utilizing frequency characteristics of the distillation block right The feature map is obtained through processing.

[0209] Step 2.4.3.5 Utilize a 1×1 convolutional block right The feature map is obtained through processing.

[0210] Step 2.4.3.6 Utilize a 1×1 convolutional block right The feature map is obtained through processing.

[0211] Step 2.4.3.7 will and Perform addition to obtain the feature map.

[0212] Step 2.4.4 Utilize right and Perform a connection operation to obtain a feature map.

[0213] Step 2.4.5 Utilize Module pair The feature map is obtained through processing.

[0214] Step 2.5 Utilize N feature Convolutional module right The feature map is obtained through processing.

[0215] Step 2.6 Utilizing N feature Spatial-frequency characteristic distillation module right The feature map is obtained through processing.

[0216] Step 2.6.1 Utilize Module pair The feature map is obtained through processing.

[0217] Step 2.6.2 Utilize right Perform splitting to obtain feature maps

[0218] Step 2.6.3 Using the neck distillation module right The feature map is obtained through processing.

[0219] Step 2.6.3.1 Using convolutional blocks right The feature map is obtained through processing.

[0220] Step 2.6.3.2 Using a 1×1 convolutional block right The feature map is obtained through processing.

[0221] Step 2.6.3.3 Utilizing spatial characteristics of distillation blocks right The feature map is obtained through processing.

[0222] Step 2.6.3.4 Utilizing frequency characteristics of the distillation block right The feature map is obtained through processing.

[0223] Step 2.6.3.5 Utilize a 1×1 convolutional block right The feature map is obtained through processing.

[0224] Step 2.6.3.6 Utilize a 1×1 convolutional block right The feature map is obtained through processing.

[0225] Step 2.6.3.7 will and Perform addition to obtain the feature map.

[0226] Step 2.6.4 Utilize right and Perform a connection operation to obtain a feature map.

[0227] Step 2.6.5 utilize Module pair The feature map is obtained through processing.

[0228] Step 2.7 Utilize N feature Convolutional module right The feature map is obtained through processing.

[0229] Step 2.8 Utilize N feature Spatial-frequency characteristic distillation module right The feature map is obtained through processing.

[0230] Step 2.8.1 Utilize Module pair The feature map is obtained through processing.

[0231] Step 2.8.2 Utilize right Perform splitting to obtain feature maps

[0232] Step 2.8.3 Using the neck distillation module right The feature map is obtained through processing.

[0233] Step 2.8.3.1 Using convolutional blocks right The feature map is obtained through processing.

[0234] Step 2.8.3.2 Using a 1×1 convolutional block right The feature map is obtained through processing.

[0235] Step 2.8.3.3 Utilizing spatial characteristics of distillation blocks right The feature map is obtained through processing.

[0236] Step 2.8.3.4 Distillation block using frequency characteristics right The feature map is obtained through processing.

[0237] Step 2.8.3.5 Utilize a 1×1 convolutional block right The feature map is obtained through processing.

[0238] Step 2.8.3.6 Utilize a 1×1 convolutional block right The feature map is obtained through processing.

[0239] Step 2.8.3.7 will and Perform addition to obtain the feature map.

[0240] Step 2.8.4 Utilize right and Perform a connection operation to obtain a feature map.

[0241] Step 2.8.5 utilize Module pair The feature map is obtained through processing.

[0242] Step 2.9 Using N feature Convolutional module right The feature map is obtained through processing.

[0243] Step 2.10 Using N feature Feature extraction module based on deformable large kernel convolution right The feature map is obtained through processing.

[0244] Step 2.10.1 Utilize Module pair The feature map is obtained through processing.

[0245] Step 2.10.2 Utilize right Perform splitting to obtain feature maps

[0246] Step 2.10.3 Utilize the neck deformable large kernel convolution module right The feature map is obtained through processing.

[0247] Step 2.10.3.1 Utilizing convolutional blocks right The process involves sequentially processing the results through a batch normalization layer, a Dropout layer, and a ReLU activation function layer to obtain the feature map.

[0248] Step 2.10.3.2 Using a 1×1 convolutional block right The feature map is obtained through processing.

[0249] Step 2.10.3.3 Convolution blocks using deformable convolution kernels right The feature map is obtained through processing.

[0250] Step 2.10.3.4 Convolution blocks using deformable convolution kernels right The feature map is obtained through processing.

[0251] Step 2.10.4 Utilize right and Perform a connection operation to obtain a feature map.

[0252] Step 2.10.5 utilize Module pair The feature map is obtained through processing.

[0253] Step 2.11 Using N feature Fast Space Pyramid Pooling SPPF Module right The feature map F is obtained through processing. feature ;

[0254] Step 2.12 for F feature Perform an upsampling operation and then compare the upsampled feature map with... Perform a connection operation to obtain a feature map.

[0255] Step 2.13 Utilize multi-scale feature fusion subnetwork N fusion C2f module right The feature map is obtained through processing.

[0256] Step 2.14 Perform an upsampling operation and then compare the upsampled feature map with... Perform a connection operation to obtain a feature map.

[0257] Step 2.15 using N fusion C2f module right Processing is performed to obtain small-scale feature maps.

[0258] Step 2.16 Utilize N fusion Convolutional module right The feature map is obtained through processing.

[0259] Step 2.17 will and Perform a connection operation to obtain a feature map.

[0260] Step 2.18 Utilize N fusion C2f module right Processing is performed to obtain mesoscale feature maps.

[0261] Step 2.19 Using N fusion Convolutional module right The feature map is obtained through processing.

[0262] Step 2.20 will With F feature Perform a connection operation to obtain a large-scale feature map F. fusion ;

[0263] Step 2.21 Utilize the target detection head sub-network N detect Calculate image T ind Fruit target detection results;

[0264] Step 2.21.1 Using the detection head module For large-scale feature maps F fusion After processing, the detection result R of the larger target is obtained. large The binary cross-entropy loss function is used to evaluate the classification loss and confidence loss, and the CIoU loss function is used to evaluate the localization loss, thus obtaining R. large The total loss value;

[0265] Step 2.21.2 Using the detection head module For mesoscale feature maps After processing, the detection result R of the medium-sized target is obtained. mid The binary cross-entropy loss function is used to evaluate the classification loss and confidence loss, and the CIoU loss function is used to evaluate the localization loss, thus obtaining R. mid The total loss value;

[0266] Step 2.21.3 Using the detection head module For small-scale feature maps After processing, the detection result R for smaller targets is obtained. small The binary cross-entropy loss function is used to evaluate the classification loss and confidence loss, and the CIoU loss function is used to evaluate the localization loss, thus obtaining R. smallThe total loss value;

[0267] Step 2.21.4 uses a nonmaximum suppression algorithm to apply the algorithm to R. large R mid and R small The process involves filtering out redundant boxes with high overlap to obtain the final detection result and its total loss value.

[0268] Step 2.22 Let ,like If yes, proceed to step 2.23; otherwise, return to step 2.1.

[0269] Step 2.23 Let If the number of iterations This yields a trained deep convolutional neural network. Proceed to step 3; otherwise, update the prediction loss using the backpropagation algorithm based on stochastic gradient descent. The parameters of the counter are set to... Return to step 2.1 to reprocess all images in the training set. This represents the preset number of iterations, which in this embodiment is set to... ;

[0270] Step 3. Input the cherry target detection image I to be processed, and use the pre-trained deep convolutional neural network N. cherry Detect the fruit target in image I;

[0271] Step 3.1 Using the convolution module Process I to obtain the feature map

[0272] Step 3.2 Using the convolution module right The feature map is obtained through processing.

[0273] Step 3.3 Distillation module utilizing spatial-frequency characteristics right The feature map is obtained through processing.

[0274] Step 3.3.1 Utilize Module pair The feature map is obtained through processing.

[0275] Step 3.3.2 Utilize right Perform splitting to obtain feature maps

[0276] Step 3.3.3 Utilizing the neck distillation module right The feature map is obtained through processing.

[0277] Step 3.3.3.1 Using convolutional blocks right The feature map is obtained through processing.

[0278] Step 3.3.3.2 Using a 1×1 convolutional block right The feature map is obtained through processing.

[0279] Step 3.3.3.3 Utilizing spatial characteristics of the distillation block right The feature map is obtained through processing.

[0280] Step 3.3.3.4 Distillation using frequency characteristics right The feature map is obtained through processing.

[0281] Step 3.3.3.5 Utilize a 1×1 convolutional block right The feature map is obtained through processing.

[0282] Step 3.3.3.6 Utilize a 1×1 convolutional block right The feature map is obtained through processing.

[0283] Step 3.3.3.7 will and Perform addition to obtain the feature map.

[0284] Step 3.3.4 Utilize right and Perform a connection operation to obtain a feature map.

[0285] Step 3.3.5 Utilize Module pair The feature map is obtained through processing.

[0286] Step 3.4 Utilizing the convolution module right The feature map is obtained through processing.

[0287] Step 3.5 Distillation module utilizing spatial-frequency characteristics right The feature map is obtained through processing.

[0288] Step 3.5.1 Utilize Module pair The feature map is obtained through processing.

[0289] Step 3.5.2 Utilize right Perform splitting to obtain feature maps

[0290] Step 3.5.3 Utilizing the neck distillation module right The feature map is obtained through processing.

[0291] Step 3.5.3.1 Utilizing convolutional blocks right The feature map is obtained through processing.

[0292] Step 3.5.3.2 Using a 1×1 convolutional block right The feature map is obtained through processing.

[0293] Step 3.5.3.3 Utilizing spatial characteristics of distillation blocks right The feature map is obtained through processing.

[0294] Step 3.5.3.4 Utilizing frequency characteristics of the distillation block right The feature map is obtained through processing.

[0295] Step 3.5.3.5 Utilize a 1×1 convolutional block right The feature map is obtained through processing.

[0296] Step 3.5.3.6 Utilize a 1×1 convolutional block right The feature map is obtained through processing.

[0297] Step 3.5.3.7 will and Perform addition to obtain the feature map.

[0298] Step 3.5.4 Utilize right and Perform a connection operation to obtain a feature map.

[0299] Step 3.5.5 utilize Module pair The feature map is obtained through processing.

[0300] Step 3.6 Utilizing the convolution module right The feature map is obtained through processing.

[0301] Step 3.7 Distillation module utilizing spatial-frequency characteristics right The feature map is obtained through processing.

[0302] Step 3.7.1 Utilize Module pair The feature map is obtained through processing.

[0303] Step 3.7.2 Utilize right Perform splitting to obtain feature maps

[0304] Step 3.7.3 Utilizing the neck distillation module right The feature map is obtained through processing.

[0305] Step 3.7.3.1 Utilizing convolutional blocks right The feature map is obtained through processing.

[0306] Step 3.7.3.2 Using a 1×1 convolutional block right The feature map is obtained through processing.

[0307] Step 3.7.3.3 Utilizing spatial characteristics of distillation blocks right The feature map is obtained through processing.

[0308] Step 3.7.3.4 Distillation block using frequency characteristics right The feature map is obtained through processing.

[0309] Step 3.7.3.5 Utilize a 1×1 convolutional block right The feature map is obtained through processing.

[0310] Step 3.7.3.6 Utilize a 1×1 convolutional block right The feature map is obtained through processing.

[0311] Step 3.7.3.7 will and Perform addition to obtain the feature map.

[0312] Step 3.7.4 Utilize right and Perform a connection operation to obtain a feature map.

[0313] Step 3.7.5 utilize Module pair The feature map is obtained through processing.

[0314] Step 3.8 Utilizing the convolution module right The feature map is obtained through processing.

[0315] Step 3.9 Utilize the feature extraction module based on deformable large kernel convolution right The feature map is obtained through processing.

[0316] Step 3.9.1 Utilize Module pair The feature map is obtained through processing.

[0317] Step 3.9.2 Utilize right Perform splitting to obtain feature maps

[0318] Step 3.9.3 Utilize the neck deformable large kernel convolution module right The feature map is obtained through processing.

[0319] Step 3.9.3.1 Utilizing convolutional blocks right The process involves sequentially processing the results through a batch normalization layer, a Dropout layer, and a ReLU activation function layer to obtain the feature map.

[0320] Step 3.9.3.2 Using a 1×1 convolutional block right The feature map is obtained through processing.

[0321] Step 3.9.3.3 Convolution blocks using deformable convolution kernels right The feature map is obtained through processing.

[0322] Step 3.9.3.4 Convolution blocks using deformable convolution kernels right The feature map is obtained through processing.

[0323] Step 3.9.4 Utilize right and Perform connection processing to obtain feature maps.

[0324] Step 3.9.5 utilize Module pair The feature map is obtained through processing.

[0325] Step 3.10 Utilize the Fast Spatial Pyramid Pooling SPPF module right The feature map G is obtained through processing. feature ;

[0326] Step 3.11 for G feature Perform an upsampling operation and then compare the upsampled feature map with... Perform a connection operation to obtain a feature map.

[0327] Step 3.12 Utilizing the C2f module right The feature map is obtained through processing.

[0328] Step 3.13 Perform an upsampling operation and then compare the upsampled feature map with... Perform a connection operation to obtain a feature map.

[0329] Step 3.14 Utilize the C2f module right Processing is performed to obtain small-scale feature maps.

[0330] Step 3.15 Utilize the convolution module right The feature map is obtained through processing.

[0331] Step 3.16 will and Perform a connection operation to obtain a feature map.

[0332] Step 3.17 Utilize the C2f module right Processing is performed to obtain mesoscale feature maps.

[0333] Step 3.18 Utilize the convolution module right The feature map is obtained through processing.

[0334] Step 3.19 will With G feature Perform a connection operation to obtain a large-scale feature map G. fusion ;

[0335] Step 3.20 Utilize the target detection head sub-network N detect Calculate the fruit target detection result in image I;

[0336] Step 3.20.1 Using the detection head module For large-scale feature maps G fusion After processing, the detection result T of the larger target is obtained. large ;

[0337] Step 3.20.2 Using the detection head module For mesoscale feature maps After processing, the detection result T of the medium-sized target is obtained. mid ;

[0338] Step 3.20.3 Using the detection head module For small-scale feature maps After processing, the detection result T for smaller targets is obtained. small ;

[0339] Step 3.20.4 uses a nonmaximum suppression algorithm to process T. large T mid and T small The process involves filtering out redundant boxes with high overlap to obtain the final detection result TR.

[0340] Step 3.21 Output TR.

[0341] Example:

[0342] To verify the effectiveness of this invention, a multi-scale cherry target detection dataset was constructed using cherry life-cycle monitoring images collected from an experimental base of a company in a national agricultural science and technology park in a certain region. This dataset includes 2870 cherry images, which were randomly divided into a training set (2000 images) and a test set (870 images). Cherry fruit detection experiments were conducted on this dataset to evaluate the invention's performance, using precision, recall, and mean average precision (mAP). 50 Mean accuracy (mAP) 50~95 The indicators objectively evaluate the test results and compare them with the test results of YOLOv5, YOLOv6, YOLOv8, and YOLOv10.

[0343] Figure 1 The image shows the confusion matrix obtained by this invention on the test dataset; Figure 2 The image shown is an example of cherry fruit detection results according to the present invention. Figure 1 and Figure 2 As can be seen, the present invention achieves high detection accuracy.

[0344] Table 1 shows a comparison of the cherry fruit detection performance of the method of the present invention with that of YOLOv5, YOLOv6, YOLOv8, and YOLOv10. As can be seen from Table 1:

[0345] First, the YOLOv5 method has relatively low accuracy in cherry detection, mainly due to the following reasons: 1) YOLOv5 generates a lot of redundant information during feature extraction, and the interference of these redundant features leads to a decrease in detection accuracy; 2) YOLOv5's static receptive field mechanism has obvious limitations in handling multi-scale objects, affecting the detection performance of small targets; 3) YOLOv5's network structure is relatively fixed and lacks a dynamic weighting mechanism for different features, making it prone to false detections or false negatives when detecting small targets with similar colors, such as cherries.

[0346] Secondly, although YOLOv6 introduces certain feature fusion and multi-scale strategies, which improves the detection accuracy to some extent compared to YOLOv5, it still has insufficient detection accuracy when facing small targets and complex backgrounds, especially at lower IoU thresholds, where its robustness is poor.

[0347] Furthermore, YOLOv8 and YOLOv10 have optimized the feature extraction subnetwork and object detection head to some extent, making them often outperform YOLOv5 and YOLOv6 when handling small objects or complex scenes. However, YOLOv8 and YOLOv10 are still limited by the design of the static receptive field, and their flexibility in object detection at different scales is still insufficient.

[0348] Finally, the method of this invention achieved the best evaluation results in all five objective indicators. Compared with YOLOv5, YOLOv6, YOLOv8, and YOLOv10, this invention, through the design of spatial feature distillation blocks, frequency feature distillation blocks, and feature weighting mechanisms, ensures that the neural network can effectively suppress the interference of redundant features and background noise, and enhance the compact description ability of key features. At the same time, by introducing a dynamic adaptive receptive field mechanism of deformable large kernel convolution, the feature representation ability of the neural network for cherry fruits of different scales and shapes in complex backgrounds is enhanced, reducing the false negatives and false positives of small targets, thereby improving the accuracy and robustness of cherry fruit detection. Therefore, the precision of this invention is on average 18.87% higher than that of YOLOv5, YOLOv6, YOLOv8, and YOLOv10; the recall rate is on average 16.66% higher than that of YOLOv5, YOLOv6, YOLOv8, and YOLOv10; the F1 score is on average 17.78% higher than that of YOLOv5, YOLOv6, YOLOv8, and YOLOv10; and the mAP of this invention is... 50 The mAP of this invention is 16.53% higher on average than YOLOv5, YOLOv6, YOLOv8, and YOLOv10. 50~95 It is an average improvement of 16.55% over YOLOv5, YOLOv6, YOLOv8, and YOLOv10.

[0349] In summary, this invention provides a cherry fruit detection method that can effectively suppress interference from complex backgrounds and dynamic lighting, and features high accuracy, good robustness, strong scale adaptability, and low computational complexity.

[0350] Table 1 Comparison of detection results of different cherry fruit detection methods

[0351]

[0352] The sequence numbers of the above embodiments of the present invention are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments. In the above embodiments of the present invention, the descriptions of each embodiment have their own emphasis; parts not described in detail in a certain embodiment can be referred to in the relevant descriptions of other embodiments. It should be understood that the disclosed technical content in the several embodiments provided in this application can be implemented in other ways.

[0353] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. A YOLOv8 cherry fruit detection method with spatial-frequency distillation and deformable large kernel convolutional embedding, characterized in that, comprising the steps of: Step 1: Establish and initialize a network N for cherry fruit detection cherry , the network N for cherry fruit detection cherry comprises: 1 feature perception sub-network N feature , 1 multi-scale feature fusion sub-network N fusion and 1 target detection head sub-network N detect ; Step 2: input the training set images of multi-scale cherry target detection and the manually labeled label set C label , train the deep convolutional neural network N cherry , let the total number of training sets be N testImg images, and let the iteration number be iter←1, the counter be ind←1, and the deep convolutional neural network that has completed training be obtained. Step 3: input the cherry target detection image I to be processed, and adopt the deep convolutional neural network N which has been trained cherry detect the fruit target in the image I; said step 1 comprises the steps of: Step 1.1: Establish and initialize feature-aware subnetwork N feature ; the feature-aware subnetwork N feature comprises: 5 convolution modules, 3 spatial-frequency feature distillation modules, and 1 feature extraction module based on deformable large kernel convolution 1 fast spatial pyramid pooling (SPPF) module The convolution modules are respectively The spatial-frequency feature distillation modules are respectively Step 1.2: Establish and initialize multi-scale feature fusion sub-network N fusion ; the multi-scale feature fusion sub-network N fusion comprises: 4 C2f modules and 2 convolution modules; the C2f modules are respectively: the convolution modules are respectively Step 1.3: Establish and initialize the target detection head sub-network N detect ; the target detection head sub-network N detect comprises: 3 detection head modules of YOLOv8; the detection head modules of YOLOv8 are respectively The comprises: 1 group of 64 convolution kernels with a size of 3x3, a step of 2, and a padding mode of 1, 1 BatchNorm2d batch normalization layer, and 1 SiLU activation function layer; comprises: 1 group of 128 convolution kernels with a size of 3x3, a step of 2, and a padding mode of 1, 1 BatchNorm2d batch normalization layer, and 1 SiLU activation function layer; comprises: 1 group of 256 convolution kernels with a size of 3x3, a step of 2, and a padding mode of 1, 1 BatchNorm2d batch normalization layer, and 1 SiLU activation function layer; comprises: 1 group of 512 convolution kernels with a size of 3x3, a step of 2, and a padding mode of 1, 1 BatchNorm2d batch normalization layer, and 1 SiLU activation function layer; comprises: 1 group of 1024 convolution kernels with a size of 3x3, a step of 2, and a padding mode of 1, 1 BatchNorm2d batch normalization layer, and 1 SiLU activation function layer; The Comprises: 2 groups of convolution blocks composed of 128 1x1 convolution kernels, 1 layer of Split operation 1 neck distillation module And 1 layer of connection operation comprises: 2 groups of convolution blocks composed of 256 1x1 convolution kernels, 1 layer of Split operation 1 neck distillation module and 1 layer of concatenation operation includes: 2 groups of convolution blocks composed of 512 1x1 convolution kernels, 1 layer of Split operation 1 neck distillation module and 1 layer of concatenation operation The two groups of convolution blocks composed of 128 1x1 convolution kernels are respectively and The two groups of convolution blocks composed of 256 1x1 convolution kernels are respectively and The two groups of convolution blocks composed of 512 1x1 convolution kernels are respectively The comprises: 2 groups of convolution blocks composed of 1024 1x1 convolution kernels, 1 layer of Split operation 1 neck deformable large kernel convolution module and 1 layer of connection operation The 2 groups of convolution blocks composed of 1024 1x1 convolution kernels are respectively and The 1 group of convolution blocks composed of 64 3x3 convolution kernels 1 group of convolution blocks composed of 128 1x1 convolution kernels 1 spatial feature distillation block 1 frequency feature distillation block And 2 groups of convolution blocks composed of 64 1x1 convolution kernels; the 2 groups of convolution blocks composed of 64 1x1 convolution kernels are respectively And The 1 group of convolution blocks composed of 128 3x3 convolution kernels 1 group of convolution blocks composed of 256 1x1 convolution kernels 1 spatial feature distillation block 1 frequency feature distillation block 2 groups of convolution blocks composed of 128 1x1 convolution kernels; the 2 groups of convolution blocks composed of 128 1x1 convolution kernels are respectively and The 1 group of convolution blocks composed of 256 3x3 convolution kernels 1 group of convolution blocks composed of 512 1x1 convolution kernels 1 spatial feature distillation block 1 frequency feature distillation block 2 groups of convolution blocks composed of 256 1x1 convolution kernels; the 2 groups of convolution blocks composed of 256 1x1 convolution kernels are respectively The 1 group of convolution blocks consisting of 512 3x3 convolution kernels 1 layer of BatchNorm2d batch normalization layer 1 layer of Dropout layer 1 layer of ReLU activation function layer 1 group of convolution blocks consisting of 512 1x1 convolution kernels 1 group of convolution blocks consisting of 512 deformable convolution kernels with a size of 5x5 1 group of convolution blocks consisting of 512 deformable convolution kernels with a size of 7x7 2. The spatio-temporal cherry fruit detection method of claim 1, wherein, said step 2 comprises the steps of: Step 2.1 : Take the indth image T from the training set ind and its corresponding annotated label Step 2.2: Utilizing the feature-aware subnetwork N feature convolutional modules of N processing T ind to obtain a feature map Step 2.3: Utilizing the convolution module N feature of the convolution module processing, to obtain a feature map ​ Step 2.4: Utilizing N feature spatial-frequency feature distillation module processing, to obtain a feature map processing, to obtain a feature map Step 2.5 utilizes N feature convolution module processing, to obtain a feature map processing, to obtain a feature map Step 2.6 utilizes N feature spatial-frequency feature distillation module processing, to obtain a feature map processing, to obtain a feature map Step 2.7 utilizes N feature convolution module processing, to obtain a feature map processing, to obtain a feature map Step 2.8 utilizes N feature spatial-frequency feature distillation module processing, to obtain a feature map processing, to obtain a feature map Step 2.9 utilizes N feature convolution modules processing, to obtain a feature map processing, to obtain a feature map Step 2.10 utilizes N feature a deformable large kernel convolution based feature extraction module processing, to obtain a feature map processing, to obtain a feature map Step 2.11 Using N feature Fast Space Pyramid Pooling SPPF Module right The feature map F is obtained through processing. feature ; Step 2.12 on F feature an upsampling operation is performed on the feature map F and the feature map F Step 2.

13. Feature fusion sub-network N is used fusion C2f module of processing, to obtain a feature map ​ Step 2.14 upsamples the feature map and connects the upsampling feature map with to obtain a feature map Step 2.15 utilizes N fusion C2f module of N processing, to obtain small-scale feature map processing, to obtain small-scale feature map Step 2.16 utilizes N fusion convolution module processing, to obtain a feature map processing, to obtain a feature map Step 2.17 connecting operation is performed on with to obtain feature map Step 2.18 utilizes N fusion C2f module of N processing, to obtain a meso-scale feature map processing, to obtain a meso-scale feature map Step 2.19 utilizes N fusion convolution module processing, to obtain a feature map processing, to obtain a feature map Step 2.20 is performed to obtain large-scale feature map F with F feature ; and fusion ​ Step 2.21 utilizes the target detection head subnetwork N detect Computes the image T ind of the fruit target detection results; Step 2.22 Let ind <- ind + 1, if ind > N then go to step 2.23, else return to step 2.

1. testImg Step 2.23 Let ind <- ind - 1, if ind < 0 then return to step 2.1, else return to step 2.

2. Step 2.23 Let iter <- iter + 1, if the iteration number iter > Total_iter, then the trained deep convolutional neural network N is obtained cherry , turn to step 3, otherwise, update the parameters of N by using the back-propagation algorithm based on the stochastic gradient descent method and the prediction loss, let the counter ind <- 1, return to step 2.1 to process all images in the training set again, wherein Total_iter represents a preset iteration number. cherry ​ 3. The spatial-frequency distillation and deformable large kernel convolution embedded YOLOv8 cherry fruit detection method of claim 2, wherein, said step 2.4 comprises the steps of: Step 2.4.1 : Utilizing modules to process, resulting in feature maps Step 2.4.2: Utilizing on the splitting process, the feature map Step 2.4.3: Utilizing a neck distillation module processing, to obtain a feature map processing, to obtain a feature map Step 2.4.3.1: Utilizing convolution blocks are processed to obtain feature maps are processed to obtain feature maps Step 2.4.3.2: Utilizing 1x1 convolutional blocks are processed to obtain feature maps are processed to obtain feature maps Step 2.4.3.3: Utilizing spatial feature distillation block processing, to obtain a feature map processing, to obtain a feature map Step 2.4.3.4: Distillation block with frequency features are processed to obtain feature maps are processed to obtain feature maps Step 2.4.3.5: Utilize 1x1 convolutional blocks are processed to obtain feature maps are processed to obtain feature maps Step 2.4.3.6: Utilize 1x1 convolutional blocks are processed to obtain feature maps are processed to obtain feature maps Step 2.4.3.7: Add and ​ Step 2.4.4: Utilizing on and a connection operation to obtain a feature map Step 2.4.5: Utilizing modules to process, obtaining feature maps 4. The spatio-temporal cherry fruit detection method of claim 2, wherein, said step 2.6 comprises the steps of: Step 2.6.1 : Utilizing modules to process, resulting in feature maps Step 2.6.2: Utilizing splitting processing to obtain feature maps splitting processing to obtain feature maps Step 2.6.3: Utilizing a neck distillation module To processing to obtain feature maps Step 2.6.3.1: Utilizing convolution blocks are processed to obtain feature maps are processed to obtain feature maps Step 2.6.3.2: Utilize 1x1 convolutional blocks are processed to obtain feature maps are processed to obtain feature maps Step 2.6.3.3: Utilizing spatial feature distillation block are processed to obtain feature maps are processed to obtain feature maps Step 2.6.3.4: Distillation using frequency characteristics right The feature map is obtained through processing. Step 2.6.3.5: Utilize 1x1 convolutional blocks are processed to obtain feature maps are processed to obtain feature maps Step 2.6.3.6: Utilize 1x1 convolutional blocks are processed to obtain feature maps are processed to obtain feature maps Step 2.6.3.7: Add and ​ Step 2.6.4: Utilizing the connection operation on and yields the feature map : Step 2.6.5: Utilizing modules to process, resulting in feature maps 5. The spatio-temporal cherry fruit detection method of claim 2, wherein, said step 2.8 comprises the steps of: Step 2.8.1 : Utilizing modules to process, resulting in feature maps Step 2.8.2: Utilizing splitting processing to obtain a feature map splitting processing to obtain a feature map Step 2.8.3: Utilizing a neck distillation module To processing to obtain feature maps Step 2.8.3.1: Utilizing convolution blocks are processed to obtain feature maps are processed to obtain feature maps Step 2.8.3.2: Utilize 1x1 convolutional blocks are processed to obtain feature maps are processed to obtain feature maps Step 2.8.3.3: Utilizing spatial feature distillation block are processed to obtain feature maps are processed to obtain feature maps Step 2.8.3.4: Distillation block with frequency features The processing is performed on the input data to obtain feature maps Step 2.8.3.5: Utilize 1x1 convolutional blocks are processed to obtain feature maps are processed to obtain feature maps Step 2.8.3.6: Utilize 1x1 convolutional blocks are processed to obtain feature maps are processed to obtain feature maps Step 2.8.3.7: Add and ​ Step 2.8.4: Utilizing on and perform a join operation to obtain a feature map Step 2.8.5: Utilizing modules to process, resulting in feature maps 6. The spatio-temporal cherry fruit detection method of claim 2, wherein, said step 2.10 comprises the steps of: Step 2.10.1: Utilizing modules to process, obtaining feature maps Step 2.10.2: Utilizing splitting process to obtain a feature map splitting process to obtain a feature map Step 2.10.3: Utilizing a deformable neck large kernel convolution module processing, to obtain a feature map processing, to obtain a feature map Step 2.10.3.1: Utilizing convolutional blocks is processed and the resulting result is calculated through a serial calculation of a batch normalization layer, a Dropout layer, and a ReLU activation function layer to obtain a feature map is processed and the resulting result is calculated through a serial calculation of a batch normalization layer, a Dropout layer, and a ReLU activation function layer to obtain a feature map Step 2.10.3.2: Utilizing 1x1 convolution blocks are processed to obtain feature maps are processed to obtain feature maps Step 2.10.3.3: Convolutional block with deformable convolutional kernels are processed to obtain feature maps are processed to obtain feature maps Step 2.10.3.4: Convolutional block with deformable convolutional kernels are processed to obtain feature maps are processed to obtain feature maps Step 2.10.4: Utilizing on and perform a concatenation operation to obtain the feature map Step 2.10.5: Utilizing modules to process, resulting in feature maps 7. The spatio-temporal cherry fruit detection method of claim 2, wherein, said step 2.21 comprises the steps of: Step 2.21.1: using the detection head module to the large-scale feature map F fusion to obtain the detection result R of the larger target large and the confidence loss value, and the CIoU loss function is used to evaluate the positioning loss value, so as to obtain the total loss value of R large . Step 2.21.2: using the detection head module The mid-scale feature map is processed to obtain the detection result R of the medium target mid , and the binary cross-entropy loss function is used to evaluate the classification loss value and the confidence loss value, and the CIoU loss function is used to evaluate the positioning loss value, so as to obtain the total loss value of R mid . Step 2.21.3: using the detection head module to the small-scale feature map to obtain a detection result R of the smaller target small and a binary cross-entropy loss function is used to evaluate the classification loss value and the confidence loss value, and a CIoU loss function is used to evaluate the positioning loss value, so as to obtain a total loss value of R small . Step 2.21.4: Process R large , R mid and R small with non-maximum suppression algorithm, filter out redundant boxes with high overlap, and then get the final detection result and its total loss value.

8. The spatio-temporal cherry fruit detection method of claim 1, wherein, said step 3 comprises the steps of: Step 3.1: Utilizing a convolution module Processing I to obtain a feature map Step 3.2: Utilizing the convolution module processing, to obtain a feature map processing, to obtain a feature map Step 3.3: Distillation module utilizing spatial-frequency characteristics right The feature map is obtained through processing. Step 3.3.1: Utilizing modules to process, obtaining feature maps Step 3.3.2: Utilizing splitting processing to obtain a feature map splitting processing to obtain a feature map Step 3.3.3: Utilizing a neck distillation module To processing to obtain feature maps Step 3.3.3.1: Utilizing convolution blocks are processed to obtain feature maps are processed to obtain feature maps Step 3.3.3.2: Utilize 1x1 convolutional blocks are processed to obtain feature maps are processed to obtain feature maps Step 3.3.3.3: Utilizing spatial feature distillation block are processed to obtain feature maps are processed to obtain feature maps Step 3.3.3.4: Distillation block with frequency features The processing is performed on the input data to obtain a feature map Step 3.3.3.5: Utilize 1x1 convolutional blocks are processed to obtain feature maps are processed to obtain feature maps Step 3.3.3.6: Utilize 1x1 convolutional blocks are processed to obtain feature maps are processed to obtain feature maps Step 3.3.3.7: Add and ​ Step 3.3.4: Utilizing the connection operation on and results in the feature map Step 3.3.5: Utilizing modules to process, obtaining feature maps Step 3.4: Utilizing the convolution module processing, to obtain a feature map processing, to obtain a feature map Step 3.5: Utilizing a space-frequency feature distillation module processing, to obtain a feature map processing, to obtain a feature map Step 3.5.1: Utilizing modules to process, resulting in feature maps Step 3.5.2: Utilizing splitting processing to obtain a feature map ​ Step 3.5.3: Utilizing a neck distillation module To processing to obtain feature maps Step 3.5.3.1: Utilizing convolution blocks processing, to obtain a feature map processing, to obtain a feature map Step 3.5.3.2: Utilize 1x1 convolutional blocks are processed to obtain feature maps are processed to obtain feature maps Step 3.5.3.3: Utilizing spatial feature distillation block To processing to obtain feature maps Step 3.5.3.4: Distillation block with frequency features To process, obtaining feature maps Step 3.5.3.5: Utilize 1x1 convolutional blocks are processed to obtain feature maps are processed to obtain feature maps Step 3.5.3.6: Utilize 1x1 convolutional blocks are processed to obtain feature maps are processed to obtain feature maps Step 3.5.3.7: Add and ​ Step 3.5.4: Utilizing the connection operation on and yields the feature map : Step 3.5.5: Utilizing modules to process, obtaining feature maps Step 3.6: Utilizing the convolution module processing, to obtain a feature map processing, to obtain a feature map Step 3.7: Distillation module utilizing spatial-frequency characteristics right The feature map is obtained through processing. Step 3.7.1: Utilizing modules to process, resulting in feature maps Step 3.7.2: Utilizing on the splitting process, the feature map Step 3.7.3: Utilizing a neck distillation module To processing to obtain feature maps Step 3.7.3.1: Utilizing convolution blocks processing, to obtain a feature map processing, to obtain a feature map Step 3.7.3.2: Utilize 1x1 convolutional blocks are processed to obtain feature maps are processed to obtain feature maps Step 3.7.3.3: Utilizing spatial feature distillation block processing, to obtain a feature map processing, to obtain a feature map Step 3.7.3.4: Distillation block with frequency features To process, obtaining feature maps Step 3.7.3.5: Utilize 1x1 convolutional blocks are processed to obtain feature maps are processed to obtain feature maps Step 3.7.3.6: Utilize 1x1 convolutional blocks are processed to obtain feature maps are processed to obtain feature maps Step 3.7.3.7: Add and ​ Step 3.7.4: Utilizing the connection operation on and yields the feature map : Step 3.7.5: Utilizing modules to process, resulting in feature maps Step 3.8: Utilizing the convolution module processing, to obtain a feature map processing, to obtain a feature map Step 3.9: Feature extraction module using deformable large kernel convolution are processed to obtain feature maps are processed to obtain feature maps Step 3.9.1: Utilizing modules to process, resulting in feature maps Step 3.9.2: Utilizing splitting process, a feature map splitting process, a feature map Step 3.9.3: Utilizing a deformable neck large kernel convolution module processing, to obtain a feature map processing, to obtain a feature map Step 3.9.3.1: Utilizing the convolution block is processed and the resulting result is calculated through a serial calculation of a batch normalization layer, a Dropout layer, and a ReLU activation function layer to obtain a feature map is processed and the resulting result is calculated through a serial calculation of a batch normalization layer, a Dropout layer, and a ReLU activation function layer to obtain a feature map Step 3.9.3.2: Utilize 1x1 convolutional blocks are processed to obtain feature maps are processed to obtain feature maps Step 3.9.3.3: Convolutional block with deformable convolutional kernels are processed to obtain feature maps are processed to obtain feature maps Step 3.9.3.4: Convolutional block with deformable convolutional kernels are processed to obtain feature maps are processed to obtain feature maps Step 3.9.4: Utilizing on and connection processing, get the feature map Step 3.9.5: Utilizing modules to process, resulting in feature maps Step 3.10: Utilize the Fast Space Pyramid Pooling SPPF module right The feature map G is obtained through processing. feature ; Step 3.11: G feature is up-sampled and concatenated with is connected to obtain the feature map Step 3.12: Utilizing the C2f module processing, to obtain a feature map processing, to obtain a feature map Step 3.13: upsampling operation is performed on and the upsampled feature map is connected with to obtain the feature map Step 3.14: Utilizing the C2f module processing, to obtain a small-scale feature map processing, to obtain a small-scale feature map Step 3.15: Utilizing the convolution module processing, to obtain a feature map processing, to obtain a feature map Step 3.16: The connection operation is performed with and to obtain the feature map Step 3.17: Utilizing the C2f module processing, to obtain a mid-scale feature map processing, to obtain a mid-scale feature map Step 3.18: Utilizing a convolution module processing, to obtain a feature map processing, to obtain a feature map Step 3.19: connecting operation is performed on G and G feature to obtain large-scale feature map G fusion ; Step 3.20: Utilize the target detection head subnetwork N detect Compute the fruit target detection result for the image I; Step 3.20.1: Using the detection head module On the large-scale feature map G fusion Processing, obtaining the detection result T of the larger target large ; Step 3.20.2: Utilizing the detection head module The mid-scale feature map The detection result T of the medium target is obtained by processing mid ; Step 3.20.3: Using the detection head module To small-scale feature maps Processing to obtain the detection result T of the smaller target small ; Step 3.20.4: Non-maximum suppression algorithm is used to process T large , T mid and T small to filter out redundant boxes with high overlap, and then the final detection result TR is obtained. step 3.21: outputting the TR.