A schisandra chinensis target detection method and system based on a lightweight deep learning network

By improving the lightweight deep learning network of the YOLOv7 model, the problems of insufficient detection capability and high computational cost in small target detection of Schisandra chinensis were solved, and efficient real-time detection in complex environments was achieved.

CN120236178BActive Publication Date: 2025-12-30SHENYANG AGRI UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510301582.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-03-14
Publication Date
2025-12-30
Estimated Expiration
2045-03-14

AI Technical Summary

Technical Problem

Existing technologies suffer from insufficient detection capabilities, poor adaptability to complex environments, high computational overhead making deployment difficult, and insufficient optimization of feature fusion and attention mechanisms in the detection of small target fruits such as Schisandra chinensis, leading to unstable detection and waste of resources.

Method used

The YOLOv7 model is improved by using a lightweight deep learning network. Through techniques such as BiPConv, BiPNet, GSConv, VoV-GSCSP and SE attention mechanism, feature extraction and fusion are optimized, reducing computational cost and improving detection accuracy.

Benefits of technology

It significantly improves the Mean Average Precision and Precision of Schisandra chinensis detection, reduces model parameters and computational complexity, and enables real-time detection support in complex backgrounds.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120236178B_ABST
    Figure CN120236178B_ABST
Patent Text Reader

Abstract

The application discloses a Schisandra chinensis target detection method and system based on a lightweight deep learning network, relates to the technical field of agricultural intelligent detection, automatic collection of traditional Chinese medicinal materials and ecological environment monitoring, and comprises the following steps: acquiring Schisandra chinensis plant image data sets; pre-processing the acquired Schisandra chinensis plant image data sets; dividing the pre-processed Schisandra chinensis plant image data sets into a training set and a test set; improving a basic YOLOv7 model to obtain an improved YOLOv7 model; inputting the training set into the improved YOLOv7 model to obtain a trained improved YOLOv7 model; inputting the test set into the trained improved YOLOv7 model to evaluate Schisandra chinensis detection results. The improved YOLOv7 model has significantly improved detection capability for Schisandra chinensis in a complex background, and provides effective real-time detection support for intelligent recognition of Schisandra chinensis.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of intelligent agricultural detection, automatic harvesting of Chinese medicinal herbs, and ecological environment monitoring, and particularly to a method and system for detecting Schisandra chinensis targets based on a lightweight deep learning network. Background Technology

[0002] Target detection technology has been widely applied in fields such as intelligent agricultural detection, automated harvesting of Chinese medicinal herbs, and ecological environment monitoring. Currently, it is mainly divided into the following two categories:

[0003] (1) Based on traditional computer vision target detection technology, traditional computer vision methods mainly rely on manually designed features for target detection, such as: color segmentation (using the color difference between fruit and leaf for target segmentation); edge detection (Canny and Sobel algorithms are used to detect fruit boundaries); morphological processing (methods such as dilation and erosion to remove background noise); histogram analysis (classifying targets based on RGB or HSV color space). These methods can achieve certain target detection effects in ideal experimental environments, but in complex orchard environments, they are easily affected by factors such as changes in light, occlusion, and background noise, leading to unstable detection.

[0004] (2) Deep learning-based object detection technology: In recent years, deep learning methods (CNNs, Convolutional Neural Networks) have made breakthroughs in the field of object detection. Common methods include: 1. R-CNN series (two-stage object detection): Faster R-CNN and Mask R-CNN use the region proposal mechanism for object detection, which has high accuracy. However, the computational cost is large, making it difficult to meet the real-time detection needs of agriculture and unsuitable for tasks such as drone monitoring and robot harvesting; 2. YOLO (You Only Look Once) series (single-stage object detection): YOLOv3 / v4 / v5 is faster than the R-CNN series, but its ability to detect small objects is limited, and its accuracy decreases in small fruit detection tasks such as Schisandra chinensis; YOLOv7: Compared with the previous generation model, it improves the accuracy and real-time performance of object detection, but the computational cost is still large, making it difficult to deploy on edge computing devices (such as harvesting robots and drones).

[0005] The following problems exist in the existing technology for detecting small target fruits such as Schisandra chinensis:

[0006] 1. Insufficient small target detection capability: Existing YOLO models are mainly optimized for medium to large targets. In the detection of small targets (such as Schisandra chinensis), they are prone to target loss due to insufficient feature extraction. 2. The fruits are densely distributed and partially overlapped, making it difficult for existing models to distinguish multiple adjacent fruits, resulting in low recall and high false negative rate.

[0007] 2. Poor adaptability to complex environments: Orchard environments are characterized by large variations in light intensity (shade, backlight, strong light), leaf occlusion, and complex backgrounds. Traditional computer vision methods are almost ineffective under these conditions, and existing deep learning models exhibit unstable detection accuracy under different lighting conditions. For example, YOLOv5's mAP (mean accuracy) drops by 5%-10% when light is weak or fruit is partially occluded, indicating that current technology has limited adaptability to complex environments.

[0008] 3. High computational overhead and difficulty in deployment on edge devices: Models such as Faster R-CNN and YOLOv7 have a large number of parameters and high computational complexity, making them difficult to deploy on edge devices with limited computing power (such as harvesting robots and drones). For example, YOLOv7 can achieve a detection frame rate of 161 FPS on an NVIDIA RTX 4060 graphics card, but on embedded devices (such as Jetson Nano), the frame rate drops to 10-15 FPS, which cannot meet the requirements of real-time detection.

[0009] 4. Insufficient optimization of feature fusion and attention mechanisms: When dealing with small targets, the existing YOLO model is prone to losing feature information during network propagation, affecting detection performance. The lack of an efficient attention mechanism makes it difficult for the model to accurately focus on fruit areas in complex backgrounds (such as dense foliage occlusion), resulting in a high false detection rate.

[0010] Therefore, proposing a method and system for detecting Schisandra chinensis targets based on a lightweight deep learning network to address the difficulties in existing technologies is a problem that urgently needs to be solved by those skilled in the art. Summary of the Invention

[0011] In view of this, the present invention provides a method and system for detecting Schisandra chinensis targets based on a lightweight deep learning network. The improved YOLOv7 model significantly enhances the detection capability of Schisandra chinensis in complex backgrounds, providing effective real-time detection support for the intelligent recognition of Schisandra chinensis.

[0012] To achieve the above objectives, the present invention adopts the following technical solution:

[0013] A method for detecting Schisandra chinensis targets based on a lightweight deep learning network includes the following steps:

[0014] S1. Data Acquisition: Acquire multi-angle images of Schisandra chinensis plants covering different growth stages, light conditions, and shading scenarios. Use the MakeSense tool to generate corresponding labels for the images to obtain a Schisandra chinensis plant image dataset.

[0015] S2. Data preprocessing: Preprocess the acquired Schisandra chinensis plant image dataset;

[0016] S3. Data partitioning: The preprocessed Schisandra chinensis plant image dataset is divided into a training set and a test set;

[0017] S4. Model Construction: Improve the basic YOLOv7 model to obtain the improved YOLOv7 model;

[0018] S5. Model Training: Input the training set into the improved YOLOv7 model, update the model weight parameters through the loss function, and after several training iterations, obtain the trained improved YOLOv7 model.

[0019] S6. Detection and Evaluation: Input the test set into the trained and improved YOLOv7 model to evaluate the detection results of Schisandra chinensis.

[0020] Optionally, in S2, the acquired Schisandra chinensis plant image dataset is preprocessed by slicing, that is, the Schisandra chinensis plant images taken at a distance are divided into multiple small images of 640×640 pixels.

[0021] Optionally, in S4, the basic YOLOv7 model is improved, resulting in the following improved YOLOv7 model:

[0022] S41. Replace the partial convolution PConv in the FasterNet module of the basic YOLO7 model with BiPConv partial dimensionality reduction convolution;

[0023] S42. A method for constructing the ELAN module in the feature extraction structure of the basic YOLO7 model is proposed, and a BiPNet module is proposed to replace the ELAN module.

[0024] S43. Introduce the GSConv and VoV-GSCSP modules from Slim-neck to replace the regular convolution and W-ELAN modules in the feature fusion structure of the basic YOLO7 model;

[0025] S44. Add the SE attention mechanism module to the feature extraction stage of the basic YOLO7 model.

[0026] Optionally, the specific content of replacing the partial convolution PConv in the FasterNet module of the basic YOLO7 model with BiPConv partial dimensionality reduction convolution in S41 is as follows:

[0027] After performing a partial convolution PConv operation in the FasterNet module, a 1x1 convolution is used to reduce the feature channel dimension, and then another PConv convolution is performed to obtain the BiPConv partial dimensionality reduction convolution.

[0028] Optionally, the construction method of the ELAN module in the feature extraction structure of the basic YOLO7 model in S42 is proposed, and the specific content of replacing the ELAN module with the BiPNet module is as follows:

[0029] The BiPNet module adds a PConv layer after the BiPConv layer to fully integrate the features of different channels after dimensionality reduction. The BiPNet module replaces the ELAN module in the basic YOLO7 model, and the BiPNet module is used cyclically as appropriate.

[0030] Optionally, the specific details of introducing the GSConv and VoV-GSCSP modules from Slim-neck in S43 to replace the regular convolution and W-ELAN modules in the feature fusion structure of the basic YOLO7 model are as follows:

[0031] S431.GSConv was developed to address the speed issue in Convolutional Neural Networks (CNNs). Channel-dense convolution (SC) preserves the implicit connections between each channel to the maximum extent, while channel-sparse convolution (DSC) completely severs these connections. GSConv combines the two methods. The floating-point computation complexity is as follows:

[0032]

[0033] The S432.VoV-GSCSP module is an improvement on GSConv, using the lightweight convolution method GSConv to replace the standard convolution SC. Then, it further introduces GSbottleneck on top of GSConv. The floating-point computation complexity is as follows:

[0034]

[0035] Among them, H out To output the feature map height, W out To output the feature map width, C in For the number of input channels, C out K is the number of output channels, g is the kernel size, n is the number of convolutional groups, and i is the number of layers.

[0036] Optionally, S44. The specific content of adding the SE attention mechanism module to the feature extraction stage of the basic YOLO7 model is as follows:

[0037] The input of the SE attention mechanism module is connected to the output of the BiPnet module, thereby weighting the feature channels after dimensionality reduction and proportional segmentation to improve the accuracy of model recognition.

[0038] A Schisandra chinensis target detection system based on a lightweight deep learning network, applying any of the above-mentioned Schisandra chinensis target detection methods based on a lightweight deep learning network, includes: a data acquisition module, a data preprocessing module, a data partitioning module, a model building module, a model training module, and a detection evaluation module;

[0039] The data acquisition module is connected to the input of the data preprocessing module. It is used to acquire multi-angle images of Schisandra chinensis plants under different growth stages, light conditions and shading scenarios. The MakeSense tool is used to generate corresponding labels for the images to obtain a Schisandra chinensis plant image dataset.

[0040] The data preprocessing module, connected to the input of the data partitioning module, is used to preprocess the acquired Schisandra chinensis plant image dataset.

[0041] The data partitioning module, connected to the input of the model building module, is used to divide the preprocessed Schisandra chinensis plant image dataset into training and testing sets.

[0042] The model building module is connected to the input of the model training module and is used to improve the basic YOLOv7 model to obtain the improved YOLOv7 model.

[0043] The model training module is connected to the input of the detection and evaluation module. It is used to input the training set into the improved YOLOv7 model, update the model weight parameters through the loss function, and obtain the trained improved YOLOv7 model after several training iterations.

[0044] The detection and evaluation module is used to input the test set into the trained and improved YOLOv7 model to evaluate the detection results of Schisandra chinensis.

[0045] As can be seen from the above technical solution, compared with the prior art, the present invention provides a method and system for detecting Schisandra chinensis targets based on a lightweight deep learning network, which has the following beneficial effects:

[0046] (1) This invention proposes a lighter partial dimension reduction convolution (BiPConv) and uses it to build the BiPNet module, which replaces the ELAN feature extraction module in the basic YOLOv7 model structure.

[0047] (2) The regular convolution and W-ELAN modules of the neck network in the basic YOLOv7 model structure are replaced with the Grouped Spatial Convolution (GSConv) and VoVNet-based Grouped SpatialCross-Stage PartialNetwork (VoV-GSCSP) modules in the Slim-neck.

[0048] (3) The Squeeze-and-Excitation (SE) attention mechanism is used to selectively emphasize useful features;

[0049] (4) The Mean Average Precision (mAP) of this invention reached 87.1%, and the Precision (P) was improved to 89.5%, which are 3.08% and 5.15% higher than the basic YOLOv7 model, respectively. The Parameters (params) were reduced to 28,182,828, and the Floating Point Operations (FLOPs) were reduced to 74.9 FLOPs, which are 22.75% and 27.42% lower than the basic YOLOv7 model, respectively. The improved YOLOv7 model significantly enhances the detection capability of Schisandra chinensis in complex backgrounds, providing effective real-time detection support for the intelligent identification of Schisandra chinensis. Attached Figure Description

[0050] 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 only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.

[0051] Figure 1 A flowchart of a Schisandra chinensis target detection method based on a lightweight deep learning network provided by the present invention;

[0052] Figure 2 Example image of a Schisandra chinensis plant with basic enhancement provided by the present invention;

[0053] Figure 3 An example image of a Schisandra chinensis plant sliced ​​and enhanced according to the present invention;

[0054] Figure 4 This is a schematic diagram of the basic YOLOv7 model structure provided by the present invention;

[0055] Figure 5A schematic diagram of the improved YOLOv7 model structure provided by this invention;

[0056] Figure 6 This is a schematic diagram of the PConv convolutional structure provided by the present invention;

[0057] Figure 7 A schematic diagram of the dimensionality reduction convolutional structure of the BiPConv part in the improved YOLOv7 model provided by this invention;

[0058] Figure 8 This is a schematic diagram of the ELAN module structure in the basic YOLOv7 model provided by this invention;

[0059] Figure 9 A schematic diagram of the BiPNet module structure in the improved YOLOv7 model provided by this invention;

[0060] Figure 10 A schematic diagram of the GSConv convolutional structure in the improved YOLOv7 model provided by this invention;

[0061] Figure 11 A schematic diagram of the VoV-GSCSP module structure in the improved YOLOv7 model provided by this invention;

[0062] Figure 12 A schematic diagram of the SE attention mechanism module structure in the improved YOLOv7 model provided by this invention. Detailed Implementation

[0063] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. 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 are within the scope of protection of the present invention.

[0064] Reference Figure 1 As shown, this invention discloses a method for detecting Schisandra chinensis targets based on a lightweight deep learning network, comprising the following steps:

[0065] S1. Data Acquisition: Acquire multi-angle images of Schisandra chinensis plants covering different growth stages, light conditions, and shading scenarios. Use the MakeSense tool to generate corresponding labels for the images to obtain a Schisandra chinensis plant image dataset.

[0066] S2. Data preprocessing: Preprocess the acquired Schisandra chinensis plant image dataset;

[0067] S3. Data partitioning: The preprocessed Schisandra chinensis plant image dataset is divided into a training set and a test set;

[0068] S4. Model Construction: Improve the basic YOLOv7 model to obtain the improved YOLOv7 model;

[0069] S5. Model Training: Input the training set into the improved YOLOv7 model, update the model weight parameters through the loss function, and after several training iterations, obtain the trained improved YOLOv7 model.

[0070] S6. Detection and Evaluation: Input the test set into the trained and improved YOLOv7 model to evaluate the detection results of Schisandra chinensis.

[0071] Furthermore, such as Figure 3 As shown, in S2, the acquired Schisandra chinensis plant image dataset is subjected to slice enhancement preprocessing, that is, the Schisandra chinensis plant images taken at a distance are divided into multiple small images of 640×640 pixels.

[0072] Specifically, such as Figure 2 As shown, the basic enhancement operations performed on the image of Schisandra chinensis plant segmented into multiple 640×640 pixel small images include rotation, flipping, cropping, color transformation (adjusting brightness, contrast, and saturation), and adding Gaussian noise or salt and pepper noise. Each original image is randomly superimposed with 1-3 enhancement operations.

[0073] Furthermore, S4 improves the basic YOLOv7 model to obtain the improved YOLOv7 model (e.g., Figure 5 The specific content shown is as follows:

[0074] S41. Replace the partial convolution PConv in the FasterNet module of the basic YOLO7 model with BiPConv partial dimensionality reduction convolution;

[0075] S42. A method for constructing the ELAN module in the feature extraction structure of the basic YOLO7 model is proposed, and a BiPNet module is proposed to replace the ELAN module.

[0076] S43. Introduce the GSConv and VoV-GSCSP modules from Slim-neck to replace the regular convolution and W-ELAN modules in the feature fusion structure of the basic YOLO7 model;

[0077] S44. Add the SE attention mechanism module to the feature extraction stage of the basic YOLO7 model.

[0078] Specifically, such as Figure 4 As shown, the basic YOLOv7 model includes:

[0079] 1. CBS module (Conv-BN-Silu)

[0080] Function: Basic convolutional operation unit, consisting of convolutional layers (Conv), batch normalization (BN), and Silu activation function, used for feature extraction and channel adjustment.

[0081] 2. ELAN / E-ELAN module

[0082] Function: ELAN: It aggregates features from different levels through a multi-branch structure to optimize computational efficiency (e.g., reducing the number of convolutional kernels and increasing branches).

[0083] E-ELAN (Extended ELAN): Based on ELAN, it extends the design of multi-path structures through gradient path analysis to enhance feature fusion capabilities.

[0084] 3. MP Module (MaxPool+CBS)

[0085] Function: Downsampling module, composed of a max pooling layer (MaxPool) and a CBS module, is used to compress feature map size while retaining key information.

[0086] 4. SPP / SPPF module

[0087] Function: Spatial pyramid pooling captures multi-scale features through pooling kernels of different scales (such as 5×5, 9×9, 13×13) to enhance the receptive field.

[0088] 5. Reparameterized Convolution (RepConv)

[0089] Functionality: During training, a multi-branch convolutional structure (such as 3×3, 1×1 convolutions and Identity connections) is used, and during inference, it is merged into a single convolutional layer.

[0090] 6. Auxiliary Head

[0091] Function: Introduces an additional detection head during the training phase to provide more supervision signals and help the main detection head learn more robust features.

[0092] 7. Feature Pyramid Network (FPN / PANet)

[0093] Function: Multi-scale target detection is achieved by fusing features from different levels (such as the backbone network and neck structure) through lateral connections and upsampling.

[0094] 8. Dynamic Label Assignment

[0095] Function: During training, positive and negative samples are dynamically allocated based on prediction quality to optimize the matching strategy between the target and the anchor box.

[0096] The basic YOLOv7 model architecture includes:

[0097] Backbone: Centered on E-ELAN, it extracts multi-level features through CBS and MP modules.

[0098] Neck: Multi-scale features are fused using an FPN / PANet structure.

[0099] Head: The main detection head and the auxiliary head (during training) output the prediction results, and RepConv is used to optimize inference efficiency.

[0100] Furthermore, the specific content of replacing the partial convolution PConv in the FasterNet module of the basic YOLO7 model with BiPConv partial dimensionality reduction convolution in S41 is as follows:

[0101] After performing a partial convolution PConv operation in the FasterNet module, a 1x1 convolution is used to reduce the feature channel dimension, and then another PConv convolution is performed to obtain the BiPConv partial dimensionality reduction convolution.

[0102] Specifically, in the target detection task of Schisandra chinensis plants, due to the single target morphology and fixed category, most features in the Schisandra chinensis plant image are green leaves, with only a small area being Schisandra chinensis fruits. Traditional convolution operations suffer from resource waste and redundancy, especially when processing background regions, resulting in low computational efficiency. To address this, Partial Convolution (PConv) is introduced. PConv uses a binary mask to focus on the effective region of the input features (Schisandra chinensis fruits) and ignores invalid regions (background noise and occlusions), effectively reducing computational redundancy. Figure 6 As shown.

[0103] While using PConv alone can reduce computational cost to some extent, it still results in computational redundancy compared to the expected lightweight target, especially in images like Schisandra chinensis where the target features are relatively simple. This is because PConv only applies convolution operations to a subset of channels in the effective region, leaving the remaining channels unchanged. This can lead to insufficient computational efficiency, particularly in the background region where redundant computation still exists. To further optimize computational efficiency, BiPConv (partially dimensionality-reduced convolution) is proposed. Figure 7As shown, based on PConv, 1x1 convolution is introduced to reduce the dimensionality of the processed feature channels. This operation effectively reduces the amount of computation in subsequent convolution operations, especially in the control of the number of feature channels, which can minimize redundant computation. By comparison, BiPConv significantly reduces the number of feature channels in subsequent processing. Compared with the traditional PConv, BiPConv can significantly improve computational efficiency while ensuring the accuracy of target recognition, and meet the requirements of lightweight design.

[0104] Furthermore, the construction method of the ELAN module in the feature extraction structure of the basic YOLO7 model integrated in S42 is proposed, and the specific content of replacing the ELAN module with the BiPNet module is as follows:

[0105] The BiPNet module adds a PConv layer after the BiPConv layer to fully integrate the features of different channels after dimensionality reduction. The BiPNet module replaces the ELAN module in the basic YOLO7 model, and the BiPNet module is used cyclically as appropriate.

[0106] Specifically, YOLOv7's Efficient Long-range Attention Network (ELAN) is the core unit of the backbone network, achieving efficient extraction and fusion of multi-scale features through multi-branch convolutional operations, such as... Figure 8 As shown, the second branch consists of 1×1 convolutions and multiple 3×3 convolutions to extract features at different scales. By replacing the multiple 3×3 convolutions with BiPConv as the main convolution, the computational cost is less than that of ELAN. Experimental analysis shows that replacing the 3×3 convolutions at different positions with BiPConv results in different levels of accuracy and computational cost. Finally, the BiPNet module is proposed, as shown... Figure 9 As shown, BiPNet adds a PConv layer after the BiPConv layer to fully integrate the features of different channels after dimensionality reduction. In order to improve the overall optimization effect, the ELAN module of the original feature extraction part is replaced by the lighter BiPNet, and the module is used cyclically as appropriate.

[0107] Furthermore, the specific details of introducing the GSConv and VoV-GSCSP modules from Slim-neck to replace the regular convolution and W-ELAN modules in the feature fusion structure of the basic YOLO7 model in S43 are as follows:

[0108] S431. For example Figure 10As shown, GSConv was developed to address the speed issue in Convolutional Neural Networks (CNNs). Channel-dense convolution (SC) preserves the implicit connections between each channel to the maximum extent, while channel-sparse convolution (DSC) completely severs these connections. GSConv combines the two methods. The floating-point computation complexity is as follows:

[0109]

[0110] S432. For example Figure 11 The VoV-GSCSP module shown is an improvement on GSConv, using the lightweight convolution method GSConv to replace the standard convolution SC. Then, GSbottleneck is introduced on top of GSConv. The floating-point computation is calculated as follows:

[0111]

[0112] Among them, H out To output the feature map height, W out To output the feature map width, C in For the number of input channels, C out K is the number of output channels, g is the kernel size, n is the number of convolutional groups, and i is the number of layers.

[0113] Furthermore, S44. The specific content of adding the SE attention mechanism module to the feature extraction stage of the basic YOLO7 model is as follows:

[0114] The input of the SE attention mechanism module is connected to the output of the BiPnet module, thereby weighting the feature channels after dimensionality reduction and proportional segmentation to improve the accuracy of model recognition.

[0115] Specifically, the Squeeze-and-Excitation (SE) module is an efficient attention mechanism that focuses on uncovering global dependencies between channels, thereby significantly enhancing feature representation capabilities. For example... Figure 12 As shown, global semantic information for each channel is extracted using global average pooling, compressing the spatial dimension into a statistical representation of the channel dimension. Subsequently, these global features are passed through two fully connected layers, first reducing dimensionality and then increasing it, and channel attention weights are generated using a non-linear activation function. These weights are then used to redistribute feature importance through a channel-by-channel weighting approach, dynamically enhancing the expression of key features while suppressing redundant information, thereby achieving feature recalibration and optimization. Through this concise and efficient mechanism, the SE module endows the network with stronger feature perception and global dependency modeling capabilities.

[0116] The SE attention mechanism module is placed immediately after the BiPnet module in order to weight the number of feature channels after dimensionality reduction and proportional segmentation, thereby improving the accuracy of model recognition.

[0117] In one specific embodiment, the following is included:

[0118] Multi-angle images of Schisandra chinensis plants under different growth stages, lighting conditions, and occlusion scenarios were acquired. MakeSense was used to generate corresponding labels for the images. After preprocessing the images through data augmentation and other operations, the preprocessed Schisandra chinensis plant image dataset was divided into training and testing sets. The training set was input into an improved YOLOv7 model, and after several training iterations, a trained improved YOLOv7 model was obtained. The testing set images were then input into the trained improved YOLOv7 model, and the test set images were fed into the backbone network. The backbone network extracted features from the processed images. Subsequently, the extracted features were fused using the Neck module to obtain large, medium, and small-sized features. Finally, the fused features were fed into the detection head, and the results were output after detection.

[0119] The improved YOLOv7 model for Schisandra chinensis consists of four improved modules: BiPConv module, BiPNe module, SE attention mechanism module, and Slim-neck module. These modules are integrated into YOLOv7 to improve its performance on the Schisandra chinensis dataset. Ablation experiments were performed for each module, and the results are shown in Table 1.

[0120] Table 1 Ablation experiments using the improved YOLOv7 model

[0121]

[0122] To verify the effectiveness of the proposed model, seven object detection models were compared on the same dataset, including four common models (YOLOv5, YOLOv8, YOLOv9, and YOLOv10), the latest model (YOLOv11), and the baseline model YOLOv7. The comparison results are shown in Table 2. According to the data in Table 2, the SchisandraConv-YOLOv7 model outperforms the comparison models in terms of precision (P), recall (R), and average precision (mAP), indicating that the model proposed in this invention can effectively extract the features of Schisandra chinensis, thereby improving detection performance.

[0123] Table 2 Comparative test results of seven target detection models

[0124] Model P R mAP Basic Yolov7 0.87 0.815 0.845 Yolov5 0.854 0.762 0.832 Yolov8 0.873 0.75 0.83 Yolov9 0.864 0.812 0.879 Yolov10 0.854 0.733 0.813 Yolov11 0.878 0.76 0.834 Ourmodel (This Invention) 0.895 0.857 0.871

[0125] Conclusion: The Mean Average Precision (mAP) of this invention reached 87.1%, and the Precision (P) was improved to 89.5%, representing improvements of 3.08% and 5.15% respectively compared to the basic YOLOv7 model. Parameters (params) were reduced to 28,182,828, and Floating Point Operations (FLOPs) were reduced to 74.9 FLOPs, representing reductions of 22.75% and 27.42% respectively compared to the basic YOLOv7 model. The improved YOLOv7 model significantly enhances the detection capability of Schisandra chinensis in complex backgrounds, providing effective real-time detection support for the intelligent recognition technology of Schisandra chinensis.

[0126] and Figure 1 Corresponding to the method described above, this embodiment of the invention also provides a Schisandra chinensis target detection system based on a lightweight deep learning network, including: a data acquisition module, a data preprocessing module, a data partitioning module, a model building module, a model training module, and a detection and evaluation module;

[0127] The data acquisition module is connected to the input of the data preprocessing module. It is used to acquire multi-angle images of Schisandra chinensis plants under different growth stages, light conditions and shading scenarios. The MakeSense tool is used to generate corresponding labels for the images to obtain a Schisandra chinensis plant image dataset.

[0128] The data preprocessing module, connected to the input of the data partitioning module, is used to preprocess the acquired Schisandra chinensis plant image dataset.

[0129] The data partitioning module, connected to the input of the model building module, is used to divide the preprocessed Schisandra chinensis plant image dataset into training and testing sets.

[0130] The model building module is connected to the input of the model training module and is used to improve the basic YOLOv7 model to obtain the improved YOLOv7 model.

[0131] The model training module is connected to the input of the detection and evaluation module. It is used to input the training set into the improved YOLOv7 model, update the model weight parameters through the loss function, and obtain the trained improved YOLOv7 model after several training iterations.

[0132] The detection and evaluation module is used to input the test set into the trained and improved YOLOv7 model to evaluate the detection results of Schisandra chinensis.

[0133] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the systems disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the descriptions are relatively simple; relevant parts can be referred to the method section.

[0134] The above description of the disclosed embodiments enables those skilled in the art to make or use the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A Schisandra chinensis target detection method based on a lightweight deep learning network, characterized in that, The method comprises the following steps: S1. Data acquisition: multi-angle images of Schisandra chinensis plants under different growth stages, light conditions and shading scenes are acquired, corresponding label tags are generated for the images by a Make Sense tool, and a Schisandra chinensis plant image dataset is obtained; S2. Data preprocessing: the obtained Schisandra chinensis plant image dataset is preprocessed; S3. Data division: the preprocessed Schisandra chinensis plant image dataset is divided into a training set and a test set; S4. Model construction: a basic YOLOv7 model is improved to obtain an improved YOLOv7 model; S5. Model training: the training set is input into the improved YOLOv7 model, the model weight parameters are updated through a loss function, and after several times of training, a trained improved YOLOv7 model is obtained; S6. Detection evaluation: the test set is input into the trained improved YOLOv7 model, and the Schisandra chinensis detection result is evaluated; In S4, the basic YOLOv7 model is improved to obtain the improved YOLOv7 model, and the specific content is as follows: S41. Partial dimension reduction convolution BiPConv is used to replace part of the convolution PConv in the FasterNet module of the basic YOLO7 model; S42. The construction method of the ELAN module in the feature extraction structure of the basic YOLO7 model is fused, and the BiPNet module is proposed to replace the ELAN module; S43. The GSConv and VoV-GSCSP modules in Slim-neck are introduced to replace the regular convolution and W-ELAN module in the feature fusion structure of the basic YOLO7 model; S44. An SE attention mechanism module is added in the feature extraction stage of the basic YOLO7 model; In S41, partial dimension reduction convolution BiPConv is used to replace part of the convolution PConv in the FasterNet module of the basic YOLO7 model, and the specific content is as follows: After the partial convolution PConv operation in the FasterNet module, a 1x1 convolution is used to reduce the feature channel dimension, and then a PConv convolution is performed, that is, the BiPConv partial dimension reduction convolution is obtained; In S42, the construction method of the ELAN module in the feature extraction structure of the basic YOLO7 model is fused, and the specific content of the BiPNet module replacing the ELAN module is as follows: The BiPNet module is a PConv layer added after the BiPConv layer to fully fuse the features of different channels after dimension reduction. The BiPNet module is used to replace the ELAN module in the basic YOLO7 model, and the BiPNet module is used cyclically.

2. The Schisandra chinensis target detection method based on a lightweight deep learning network according to claim 1, wherein In S2, the obtained Schisandra chinensis plant image dataset is subjected to slice enhancement preprocessing, that is, the Schisandra chinensis plant image shot from a long distance is divided into a plurality of small images with a size of 640x640 pixels.

3. The Schisandra chinensis target detection method based on a lightweight deep learning network according to claim 1, wherein The specific content of replacing the conventional convolution and W-ELAN module in the feature fusion structure of the basic YOLO7 model with GSConv and VoV-GSCSP modules in the Slim-neck in S43 is as follows: S431. GSConv is used to solve the speed problem in the convolutional neural network CNN. The channel-dense convolution calculation SC maximally preserves the implicit connection between each channel, while the channel-sparse convolution DSC completely cuts off these connections. GSConv is a convolution that combines the channel-dense convolution calculation SC and the channel-sparse convolution DSC. The floating-point operation amount calculation is as follows: ; S432. The VoV-GSCSP module is an improvement based on GSConv. The lightweight convolution method GSConv is used to replace the standard convolution SC. Then, GSbottleneck is introduced based on GSConv. The floating-point operation amount calculation is as follows: wherein, is the output feature map height, is the output feature map width, is the input channel number, is the output channel number, is the size of the convolution kernel, is the group number of group convolution, is the layer number, is the number.

4. The Schisandra chinensis target detection method based on a lightweight deep learning network according to claim 1, characterized in that, S44. The specific content of adding an SE attention mechanism module in the feature extraction stage of the basic YOLO7 model is as follows: The input end of the SE attention mechanism module is connected with the output end of the BiPnet module, so as to perform weighted processing on the feature channel number after dimension reduction and proportional segmentation, thereby improving the accuracy of model recognition.

5. A Schisandra chinensis target detection system based on a lightweight deep learning network, characterized in that, The Schisandra chinensis target detection method based on a lightweight deep learning network according to any one of claims 1-4, comprising: a data acquisition module, a data preprocessing module, a data division module, a model construction module, a model training module, and a detection evaluation module; The data acquisition module is connected with the input end of the data preprocessing module, and is used to acquire multi-angle images of Schisandra chinensis plants covering different growth stages, light conditions, and occlusion scenes. The Make Sense tool is used to generate corresponding label tags for the images, and a Schisandra chinensis plant image dataset is obtained. The data preprocessing module is connected with the input end of the data division module, and is used to preprocess the acquired Schisandra chinensis plant image dataset; The data division module is connected with the input end of the model construction module, and is used to divide the preprocessed Schisandra chinensis plant image dataset into a training set and a test set; The model construction module is connected with the input end of the model training module, and is used to improve the basic YOLOv7 model to obtain an improved YOLOv7 model; The model training module is connected with the input end of the detection evaluation module, and is used to input the training set into the improved YOLOv7 model. The model weight parameters are updated through a loss function. After several times of training, a trained improved YOLOv7 model is obtained; The detection evaluation module is used to input the test set into the trained improved YOLOv7 model, and evaluate the Schisandra chinensis detection result.