Human parasitic ovum detection method for enhancing YOLOv8 based on DS-SCConv

By using an enhanced YOLOv8 method based on DS-SCConv, the problems of misidentification and missed detection of parasite eggs in complex scenarios of existing technologies are solved, and efficient and accurate parasite egg detection is achieved, which is suitable for medical testing scenarios.

CN121789211APending Publication Date: 2026-04-03JIANGSU UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-28
Publication Date
2026-04-03

AI Technical Summary

Technical Problem

Existing technologies in human detection methods, image detection methods, and detection accuracy are difficult to achieve in complex scenarios, especially in the detection of parasite eggs, where there are problems of misidentification and missed detection.

Method used

An enhanced YOLOv8 method based on DS-SCConv is adopted. By improving the YOLOv8 backbone network and constructing the DS-SCConv module, multi-scale features are extracted, feature redundancy is reduced, and feature recognition capability is enhanced. The SEAM module is used to reduce background interference. Combined with the DWRSeg network framework, multi-scale hierarchical feature extraction and feature redundancy optimization are performed to improve detection accuracy and speed.

Benefits of technology

The model can accurately detect, classify, and label various human parasite eggs in complex environments. It is robust, adaptable, suitable for edge computing devices, low-cost, and applicable to medical testing scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121789211A_ABST
    Figure CN121789211A_ABST
Patent Text Reader

Abstract

The invention discloses a parasitic ovum real-time detection method for enhancing YOLOv8 based on a DS-SCConv module. The method comprises the following steps: constructing a DWRSEg-based network framework and an SCConv module, introducing a spatial mask and a channel attention mechanism, generating a multi-size feature map by adopting regional residual, intelligently selecting a sensing field according to channel features in a semantic residual stage, performing multi-expansion-rate deep convolution in groups, separating high / low information content feature maps through grouping normalization, and performing multi-expansion-rate deep convolution in groups. And finally, feature expression with a higher signal-to-noise ratio is generated through fusion, so that the detection precision of different types of human parasites under a complex background is improved. The DS-SCConv module provided by the invention can optimize the feature redundancy of space and channel in the feature extraction process of the model, and replaces the C2f module of the YOLOv8 backbone network, so that the performance and accuracy of the model are improved, the parameter quantity in the model is optimized, and the accuracy of the model is improved. And thus, the application in the deployment scene of the resource-limited edge computing device obtains better performance.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer vision, specifically to a method for detecting human parasite eggs based on DS-SCConv enhanced YOLOv8. Background Technology

[0002] In recent years, parasitic diseases have become a major public health challenge, especially in developing countries [1,2]. However, traditional methods for detecting parasite eggs, such as direct smears and concentration methods, rely on manual microscopic observation, which is time-consuming and labor-intensive, and prone to missed detection due to human error, resulting in inaccurate results. Therefore, deep learning-based methods have emerged as a potential solution. Although deep learning-based target detection algorithms have shown great potential in general scenarios, they face difficulties in the complex task of detecting various small parasite eggs. The diverse morphology, small size, complex background noise, and low contrast of parasite eggs make it difficult for existing algorithms to achieve high detection accuracy and rapid detection.

[0003] With the successful application of object detection in many fields, parasite egg detection based on object detection algorithms has become a research hotspot. Currently, deep learning-based object detection algorithms can be divided into two types: two-stage algorithms and single-stage algorithms. Two-stage algorithms first generate candidate boxes from the image, then use a learning module to extract regional features from the candidate boxes and complete the final classification and regression; representative algorithms include the R-CNN series. These algorithms have high detection accuracy but slow speed, making them unsuitable for real-time detection scenarios. Single-stage algorithms, on the other hand, directly perform regression and classification of the target; representative algorithms include SSD, YOLO series, and RTMDet. These algorithms offer both fast detection speed and high detection accuracy, thus single-stage object detection algorithms have been widely used.

[0004] To detect parasite eggs, researchers both domestically and internationally have proposed numerous methods, including those based on traditional image processing, Mask R-CNN, and YOLOv4. However, these methods each have their own limitations: 1. Traditional image processing methods are susceptible to image quality and noise, leading to low detection accuracy in complex scenes. 2. While Mask R-CNN-based methods offer improved accuracy, their slower detection speed makes them unsuitable for real-time applications. 3. YOLOv4-based methods are prone to interference from similarly shaped objects when detecting small parasite eggs, and their ability to distinguish subtle differences in egg morphology is limited. 4. Most parasite egg detection methods exhibit good accuracy in simple scenes, but their accuracy decreases in complex scenarios with mixed parasite egg types, diverse backgrounds, and high egg density, leading to misidentification or missed detection. It is evident that existing methods for detecting parasite eggs still have shortcomings and are insufficient to meet the comprehensive requirements of accuracy, speed, and adaptability to complex scenarios in practical applications. Therefore, developing a more efficient, accurate, and adaptable method for detecting parasite eggs is of great practical significance, as it can effectively improve the diagnostic level of parasitic diseases and help solve this public health challenge. Summary of the Invention

[0005] The purpose of this invention is to provide a highly efficient and accurate detection system for human parasite eggs, thereby improving the system's detection accuracy in the complex context of actual human parasite eggs.

[0006] To achieve the above-mentioned objectives, this invention proposes a method for detecting human parasite eggs based on DS-SCConv enhanced YOLOv8, comprising the following steps:

[0007] S1) Collect images of human parasite eggs using image acquisition equipment, and label the images to obtain a human parasite egg dataset. Divide the human parasite egg dataset into training set images, validation set images, and test set images. The training set is used to train the network model, the validation set is used to evaluate the model performance and adjust the model parameters during the training process, and the test set is used to evaluate the generalization ability of the model.

[0008] S2) Based on the improved YOLOv8 backbone network, extract multi-scale features of different sizes and resolutions from the training set images. These multi-scale features include: the improved YOLOv8 backbone network extracting image features of different sizes and resolutions according to different receptive field sizes (1x1, 3x3, 5x5);

[0009] S3) Construct the DS-SCConv module based on the DWRSeg network framework, integrate the SCConv module to the end of the DWRSeg network decoder aggregation part, generate multi-scale feature maps through region residualization and semantic residualization, and perform hierarchical feature extraction according to the multi-scale to obtain more receptive field content and achieve effective target detection at different scales.

[0010] S4) Using the DS-SCConv module built in S3), the C2f module in the Backbone of the YOLOv8 backbone network in S2) is replaced to improve its feature extraction capability and optimize its feature redundancy in both spatial and channel aspects. This is used to train the network and improve the accuracy and speed of the model's classification and localization.

[0011] S5) Use the training set images and validation set images to iteratively train the model until the loss function converges, and save the trained model.

[0012] S6) Use test set images to evaluate the trained model and obtain the human parasite egg detection model;

[0013] S7) Input the image to be detected through the image acquisition device and transmit it to the human parasite egg identification and detection system. The system uses the human parasite egg detection model to output the detection results. The system outputs the type and quantity of the identified parasite eggs, and labels and classifies the human parasite eggs in the input image, and saves the image recognition results.

[0014] Furthermore, the construction of the improved YOLOv8 feature extraction backbone network in step S2 above includes the following steps:

[0015] S2.1: By setting the kernel size K in the backbone network to 1, 3, or 5, we can better obtain the receptive field information of the image and acquire multi-scale feature information to improve the inference speed during convolutional layer training.

[0016] S2.2: The SCConv module is used to reduce feature extraction redundancy and improve the model's inference speed.

[0017] S2.3: Enhanced attention module in SEAM space reduces interference from background and occlusions on model recognition, and improves the recognition weight of key features.

[0018] Furthermore, the DS-SCConv module based on the DWRSeg network framework constructed in step S3 above specifically includes:

[0019] S3.1: Two-step feature extraction is performed on the feature map using the DWRSeg network structure, and the SIR and DWR modules are used to extract the separable dilated convolution with different receptive field sizes;

[0020] S3.2: The different separable dilated convolutions extracted by SIR and DWR are concatenated and the result is output in the decoder;

[0021] S3.3: The output result is put into the SCConv module of the next layer, and then executed sequentially by SRU and CRU to remove feature redundancy and output the final result.

[0022] Furthermore, the two-step feature extraction and DWR / SIR module extraction operations in step S3.1 above specifically include:

[0023] S3.1.1: A two-step residual feature extraction method is used, namely region residualization and semantic residualization. Region residualization first groups the region feature maps and performs depthwise separable dilated convolutions at different rates to learn the feature maps based on the receptive field size. Semantic residualization then uses depthwise separable dilated convolutions with the desired receptive field to perform semantic morphological filtering on each region feature map, changing the role of multi-rate dilated convolutions in feature extraction and improving the efficiency of multi-scale information capture in real-time semantic segmentation.

[0024] S3.1.2: The DWR module is used to adapt to different receptive field sizes within a single layer across multiple branches. Each branch first extracts features using a standard 3×3 convolution combined with BN and ReLU layers. Then, a depthwise 3×3 convolution is expanded to extract semantic information, and a BN layer is used to obtain semantic residuals. Finally, all branch feature maps are concatenated, and pointwise convolutions are used to merge the feature maps to generate the final residual, which is then added to the input feature map to construct a stronger feature representation. The specific calculation method is as follows:

[0025] C1(x) = SiLU(BN(Conv(x)))

[0026] C2(x,d)=D d DConv(C1(x))

[0027] DWR(x)=PConv(BN(Γ d C2(x,d)))+x

[0028] Where x represents the input feature map, Conv() represents a 3×3 convolution, BN is batch normalization, SiLU() represents the activation function, and D d Conv() represents a 3×3 convolution with a hole ratio d along the hole depth direction, PConv() represents a pointwise convolution, and Γ d This represents the cascade operation of all d.

[0029] S3.1.3: SIR module. The specific calculation method is as follows:

[0030] SIR(x) = PConv(BN(Conv)3x3 (C1(x))))+x

[0031] Where x is the input feature, Conv 3×3 This represents a 3×3 convolution, BN is batch normalization, C1(x) performs channel expansion and other operations on the input features, and PConv is pointwise convolution used to fuse features.

[0032] Furthermore, the method of using the decoder for output after the convolution is separated, dilated, and concatenated by SIR and DWR in step S3.2 above, and the corresponding loss function calculation method, specifically include:

[0033] S3.2.1: The specific calculation method for the decoder is as follows:

[0034] Out=SegHead((UpSample(Stage4)⊕Stage3),Stage2)

[0035] Where Stage4, Stage3, and Stage2 represent the feature maps of stages 4, 3, and 2, respectively; UpSample represents the upsampling operation; ⊕ represents the concatenation operation of the feature maps; and SegHead represents the segmentation head used for prediction.

[0036] S3.2.2: In addition, DWRSeg uses cross-entropy loss and online hard sample mining to optimize the semantic segmentation learning task. The calculation method of its cross-entropy loss function is as follows:

[0037]

[0038] Where N is the number of samples, C is the number of categories, and y i c represents the true label of sample i belonging to category c, p i c represents the probability that the model predicts sample i belongs to category c.

[0039] Furthermore, in step S3.3 above, the SRU and CRU of the SCConv module are used to optimize the feature redundancy present in the feature map, specifically including:

[0040] S3.3.1: The SCConv module primarily enhances feature representation by combining 3×3 spatial convolution operations, 1×1 channel convolution operations, and appropriate normalization and activation functions. Assume the input feature map is F. in ∈R H×W×C Where H, W, and C represent the height, width, and number of channels of the feature map, respectively, and the specific calculation method of its output feature map is as follows:

[0041] F out =Conv 1x1(GN(ReLU(Conv 3x3 (F in ))))

[0042] Among them, Conv 3×3 GN represents a 3×3 convolution operation used to extract spatial features; ReLU is an activation function used to introduce non-linear components, helping the model learn more complex patterns; GN represents grouping normalization, which helps stabilize the training process and accelerate model convergence; Conv 1×1 This refers to a 1×1 convolution operation, which is mainly used to adjust the channel dimension in order to control the number of channels in the feature map, thereby improving the model's expressive power and computational efficiency.

[0043] S3.3.2: The SRU module primarily performs spatial refinement on the input feature map, effectively utilizing the spatial redundancy of features to distinguish between information-rich and information-poor feature maps. The specific calculation method is as follows:

[0044]

[0045] X w1 ∪X w2 =X w

[0046] Specifically, group normalization (GN) is used to classify the information richness of feature maps. Then, the sigmoid function is used to evaluate whether the information content of the feature maps exceeds 0.5, classifying them into information-rich W1 and information-sparse W2. Next, the input feature X is multiplied by W1 and W2 respectively to obtain the information-rich feature and the information-sparse feature X. w1 and X w2 The two features are then fused through a cross-reconstruction operation to generate a spatially reconstructed feature map.

[0047] S3.3.3: The CRU module primarily reconstructs features along the channel dimension, reducing redundancy and further enhancing feature expressiveness. It performs further operations on the feature maps reconstructed in the SRU space, mainly including three steps: segmentation, transformation, and fusion. In the segmentation stage, the input features are grouped and convolutionally processed to generate two feature maps: the upper part X... up and the lower part X low During the transformation phase, X upAs a rich feature extractor, it is input into the upper-level transformation stage, and the efficient convolutional operations GWC and PWC are used to replace the original k×k convolution to extract high-level representative information and reduce computational cost. Due to sparse convolutional connections, GWC reduces parameters and computational cost, but it cuts off the information flow between channel groups. PWC, on the other hand, compensates for information loss and helps information flow between feature channels. The specific calculation method of the upper-level transformation stage is as follows:

[0048]

[0049] Among them, M G ∈R αc / gr×k×k×c , X is the learnable weight matrix of GWC and PWC. up ∈R αc / r×h×w and Y1∈R c×h×w These are the upper-layer input and output feature maps, respectively.

[0050] Similarly, for the lower part X low The same process applies; the specific calculation method for the lower-level transformation stage is as follows:

[0051]

[0052] in, X is the learnable weight matrix of PwC, ∪ is the join operation, and X... low ∈R (1-α)c / r×h×w and Y2∈R c×h×w These are the lower-level input and output feature maps, respectively.

[0053] In the final fusion stage, the global channels S1 and S2 of the upper and lower layers are superimposed, and an activation function is used to generate two deep feature vectors β1 and β2∈R. c The features are then multiplied by the previously obtained feature maps and then added together to obtain the reconstructed feature maps of the channels. The specific calculation method is as follows:

[0054]

[0055] Y = β1Y1 + β2Y2

[0056] In this context, Y1 refers to the upper-layer features, Y2 refers to the lower-layer features, and Y refers to the channel refinement features, which is the feature map of the final channel reconstruction.

[0057] The beneficial effects of this invention are as follows:

[0058] 1. This invention can accurately detect all existing human parasite eggs in images of various human parasite eggs in complex backgrounds, and align, label, and classify them.

[0059] 2. If human parasite eggs not present in the dataset are encountered, they can be quickly labeled, trained, and added to the training model through a simple retraining process. Furthermore, the model is plug-and-play, robust, and facilitates future feature expansion and modification.

[0060] 3. The model requires relatively low computing power and can be easily deployed on edge computing devices such as microcontrollers. It is inexpensive, easy to operate, and has practical significance for the detection of human parasite eggs in actual medical scenarios. Attached Figure Description

[0061] Figure 1 The flowchart of the DS-SCConv algorithm proposed in this invention is shown below; Detailed Implementation

[0063] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are for illustrative purposes only and are not intended to limit the invention.

[0064] like Figure 1 As shown, this invention is a method for detecting human parasite eggs based on DS-SCConv enhanced YOLOv8, comprising the following steps:

[0065] S1) Collect images of human parasite eggs using image acquisition equipment, and label the images to obtain a human parasite egg dataset. Divide the human parasite egg dataset into training set images, validation set images, and test set images. The training set is used to train the network model, the validation set is used to evaluate the model performance and adjust the model parameters during the training process, and the test set is used to evaluate the generalization ability of the model.

[0066] As a preferred embodiment of the present invention, when constructing the human parasite egg detection model, it is necessary to use actual parasite egg samples placed under an electron microscope for data collection, and use the Labelme annotation tool to classify and annotate them, and convert the annotation files into COCO dataset format.

[0067] S2) Based on the improved YOLOv8 backbone network, extract multi-scale features of different sizes and resolutions from the training set images. These multi-scale features include: the improved YOLOv8 backbone network extracting image features of different sizes and resolutions according to different receptive field sizes (1x1, 3x3, 5x5);

[0068] As a preferred embodiment of the present invention, the construction of the improved YOLOv8 feature extraction backbone network in step S2 includes the following steps:

[0069] S2.1: By setting the kernel size K in the backbone network to 1, 3, or 5, we can better obtain the receptive field information of the image and acquire multi-scale feature information to improve the inference speed during convolutional layer training.

[0070] S2.2: The SCConv module is used to reduce feature extraction redundancy and improve the inference speed of the model.

[0071] The SCConv module eliminates redundancy in feature extraction across two dimensions: spatial and channel. Spatially, it identifies which locations in the feature map are more critical, strengthening these important locations while suppressing redundant spatial locations, thus removing spatial redundancy. In the channel dimension, it distinguishes the importance of features carried by different channels, highlighting channels crucial to the current task and weakening or discarding redundant channels, thereby eliminating channel redundancy. This approach significantly reduces feature redundancy during model inference and improves inference speed.

[0072] S2.3: Enhanced attention module in SEAM space reduces interference from background and occlusions on model recognition, and improves the recognition weight of key features.

[0073] In a preferred embodiment of the present invention, the SEAM module is an attention-based enhancement module. It draws upon visual attention theory, which states that the human visual system automatically focuses on important target areas while ignoring background and irrelevant interference when observing a scene. The SEAM module learns to weight the input feature map spatially, reducing the weight of background and occluded areas while increasing the weight of key feature areas of the target object. This allows the model to focus more on crucial recognition information during feature extraction, thereby reducing interference from background and occluders, increasing the weight of key features, and enhancing the model's recognition accuracy and robustness.

[0074] This invention suppresses feature redundancy in the original image by sequentially passing it through SRU and CRU, and enhances attention through the SEAM space. The processed image is then subjected to 1×1, 3×3, and 5×5 convolutions, and the feature maps are then separated and fused through a residual network at multiple scales, making the features of the human parasite egg part in the image more prominent.

[0075] S3) Construct the DS-SCConv module based on the DWRSeg network framework, integrate the SCConv module to the end of the DWRSeg network decoder aggregation part, generate multi-scale feature maps through region residualization and semantic residualization, and perform hierarchical feature extraction according to the multi-scale to obtain more receptive field content and achieve effective target detection at different scales.

[0076] In a preferred embodiment of the present invention, the DS-SCConv module based on the DWRSeg network framework constructed in step S3 specifically includes:

[0077] S3.1: Two-step feature extraction is performed on the feature map using the DWRSeg network structure, and the SIR and DWR modules are used to extract the separable dilated convolution with different receptive field sizes;

[0078] As a preferred embodiment of the present invention, the two-step feature extraction and DWR / SIR module extraction operations in step S3.1 specifically include:

[0079] S3.1.1: A two-step residual feature extraction method is used, namely region residualization and semantic residualization. Region residualization first groups the region feature maps and performs depthwise separable dilated convolutions at different rates to learn the feature maps based on the receptive field size. Semantic residualization then uses depthwise separable dilated convolutions with the desired receptive field to perform semantic morphological filtering on each region feature map, changing the role of multi-rate dilated convolutions in feature extraction and improving the efficiency of multi-scale information capture in real-time semantic segmentation.

[0080] S3.1.2: The DWR module is used to adapt to different receptive field sizes within a single layer across multiple branches. Each branch first extracts features using a standard 3x3 convolution combined with BN and ReLU layers. Then, a 3x3 convolution is unfolded to extract semantic information, and a BN layer is used to obtain semantic residuals. Finally, all branch feature maps are concatenated, and pointwise convolutions are used to merge the feature maps to generate the final residual, which is then added to the input feature map to construct a stronger feature representation. The specific calculation method is as follows:

[0081] C1(x) = SiLU(BN(Conv(x)))

[0082] C2(x,d)=D d DConv(C1(x))

[0083] DWR(x)=PConv(BN(Γ d C2(x,d)))+x

[0084] Where x represents the input feature map, Conv() represents a 3×3 convolution, BN is batch normalization, SiLU() represents the activation function, and D d Conv() represents a 3×3 convolution with a hole ratio d along the hole depth direction, PConv() represents a pointwise convolution, and Γ d This represents the cascade operation of all d.

[0085] S3.1.3: SIR module. The specific calculation method is as follows:

[0086] SIR(x) = PConv(BN(Conv) 3x3 (C1(x))))+x

[0087] Where x is the input feature, Conv 3×3 This represents a 3×3 convolution, BN is batch normalization, C1(x) performs channel expansion and other operations on the input features, and PConv is pointwise convolution used to fuse features.

[0088] S3.2: The different separable dilated convolutions extracted by SIR and DWR are concatenated and the result is output in the decoder;

[0089] As a preferred embodiment of the present invention, step S3.2, concerning the method of outputting the convolution after SIR and DWR separation dilation convolution and concatenation, and the corresponding loss function calculation method, specifically includes:

[0090] S3.2.1: The specific calculation method for the decoder is as follows:

[0091]

[0092] Where Stage4, Stage3, and Stage2 represent the feature maps of stages 4, 3, and 2, respectively; UpSample represents the upsampling operation; ⊕ represents the concatenation operation of the feature maps; and SegHead represents the segmentation head used for prediction.

[0093] S3.2.2: In addition, DWRSeg uses cross-entropy loss and online hard sample mining to optimize the semantic segmentation learning task. The calculation method of its cross-entropy loss function is as follows:

[0094]

[0095] Where N is the number of samples, C is the number of categories, and y i c represents the true label of sample i belonging to category c, p i ,

[0096] c represents the probability that the model predicts sample i belongs to category c.

[0097] S3.3: The output result is put into the SCConv module of the next layer, and then executed sequentially by SRU and CRU to remove feature redundancy and output the final result.

[0098] In a preferred embodiment of the present invention, step S3.3, which optimizes the feature redundancy existing in the feature map through the SRU and CRU of the SCConv module, specifically includes:

[0099] S3.3.1: The SCConv module primarily enhances feature representation by combining 3×3 spatial convolution operations, 1×1 channel convolution operations, and appropriate normalization and activation functions. Assume the input feature map is F. in ∈R H×W×C Where H, W, and C represent the height, width, and number of channels of the feature map, respectively, and the specific calculation method of its output feature map is as follows:

[0100] F out =Conv 1x1 (GN(ReLU(Conv 3x3 (F in ))))

[0101] Among them, Conv 3×3 GN represents a 3×3 convolution operation used to extract spatial features; ReLU is an activation function used to introduce non-linear components, helping the model learn more complex patterns; GN represents grouping normalization, which helps stabilize the training process and accelerate model convergence; Conv 1×1 This refers to a 1×1 convolution operation, which is mainly used to adjust the channel dimension in order to control the number of channels in the feature map, thereby improving the model's expressive power and computational efficiency.

[0102] S3.3.2: The SRU module primarily performs spatial refinement on the input feature map, effectively utilizing the spatial redundancy of features to distinguish between information-rich and information-poor feature maps. The specific calculation method is as follows:

[0103]

[0104] X w1 ∪X w2 =X w

[0105] Specifically, group normalization (GN) is used to classify the information richness of feature maps. Then, the sigmoid function is used to evaluate whether the information content of the feature maps exceeds 0.5, classifying them into information-rich W1 and information-sparse W2. Next, the input feature X is multiplied by W1 and W2 respectively to obtain the information-rich feature and the information-sparse feature X. w1 and X w2 The two features are then fused through a cross-reconstruction operation to generate a spatially reconstructed feature map.

[0106] S3.3.3: The CRU module primarily reconstructs features along the channel dimension, reducing redundancy and further enhancing feature expressiveness. It performs further operations on the feature maps reconstructed in the SRU space, mainly including three steps: segmentation, transformation, and fusion. In the segmentation stage, the input features are grouped and convolutionally processed to generate two feature maps: the upper part X... up and the lower part X low During the transformation phase, X up As a rich feature extractor, it is input into the upper-level transformation stage, and the efficient convolutional operations GWC and PWC are used to replace the original k×k convolution to extract high-level representative information and reduce computational cost. Due to sparse convolutional connections, GWC reduces parameters and computational cost, but it cuts off the information flow between channel groups. PWC, on the other hand, compensates for information loss and helps information flow between feature channels. The specific calculation method of the upper-level transformation stage is as follows:

[0107]

[0108] Among them, M G ∈R αc / gr×k×k×c , X is the learnable weight matrix of GWC and PWC. up ∈R αc / r×h×w and Y1∈R c×h×w These are the upper-layer input and output feature maps, respectively.

[0109] Similarly, for the lower part X low The same process applies; the specific calculation method for the lower-level transformation stage is as follows:

[0110]

[0111] in, X is the learnable weight matrix of PwC, ∪ is the join operation, and X... low ∈R (1-α)c / r×h×w and Y2∈R c×h×w These are the lower-level input and output feature maps, respectively.

[0112] In the final fusion stage, the global channels S1 and S2 of the upper and lower layers are superimposed, and an activation function is used to generate two deep feature vectors β1 and β2∈R. c The features are then multiplied by the previously obtained feature maps and then added together to obtain the reconstructed feature maps of the channels. The specific calculation method is as follows:

[0113]

[0114] Y = β1Y1 + β2Y2

[0115] In this context, Y1 refers to the upper-layer features, Y2 refers to the lower-layer features, and Y refers to the channel refinement features, which is the feature map of the final channel reconstruction.

[0116] S4) Using the DS-SCConv module built in S3), the C2f module in the Backbone of the YOLOv8 backbone network in S2) is replaced to improve its feature extraction capability and optimize its feature redundancy in both spatial and channel aspects. This is used to train the network and improve the accuracy and speed of the model's classification and localization.

[0117] In this invention, an ablation experiment was conducted to investigate the potential impact of the order of the DWRSeg and SCConv modules on the model during training. A fixed learning rate was used in the first half of the training cycle, while cosine annealing was used to adjust the learning rate in the second half.

[0118] S5) Use the training set images and validation set images to iteratively train the model until the loss function converges, and save the trained model.

[0119] S6) Use test set images to evaluate the trained model and obtain the human parasite egg detection model;

[0120] S7) Input the image to be detected through the image acquisition device and transmit it to the human parasite egg identification and detection system. The system uses the human parasite egg detection model to output the detection results. The system outputs the type and quantity of the identified parasite eggs, and labels and classifies the human parasite eggs in the input image, and saves the image recognition results.

[0121] The above embodiments are only used to illustrate the design concept and features of the present invention, and their purpose is to enable those skilled in the art to understand the content of the present invention and implement it accordingly. The protection scope of the present invention is not limited to the above embodiments. Therefore, all equivalent changes or modifications made based on the principles and design ideas disclosed in the present invention are within the protection scope of the present invention.

Claims

1. A method for detecting human parasite eggs based on DS-SCConv enhanced YOLOv8, characterized in that, Includes the following steps: S1) Collect images of human parasite eggs using image acquisition equipment, and label the images to obtain a human parasite egg dataset. Divide the human parasite egg dataset into training set images, validation set images, and test set images. The training set is used to train the network model, the validation set is used to evaluate the model performance and adjust the model parameters during the training process, and the test set is used to evaluate the generalization ability of the model. S2) Based on the improved YOLOv8 backbone network, extract multi-scale features of different sizes and resolutions from the training set images; S3) Construct the DS-SCConv module based on the DWRSeg network framework, integrate the SCConv module to the end of the DWRSeg network decoder aggregation part, generate multi-scale feature maps through region residualization and semantic residualization, and perform hierarchical feature extraction according to the multi-scale to obtain more receptive field content and achieve effective target detection at different scales. S4) Using the DS-SCConv module built in S3), the C2f module in the Backbone of the YOLOv8 backbone network in S2) is replaced to improve its feature extraction capability and optimize its feature redundancy in both spatial and channel aspects. This is used to train the network and improve the accuracy and speed of the model's classification and localization. S5) Use the training set images and validation set images to iteratively train the model until the loss function converges, and save the trained model. S6) Use test set images to evaluate the trained model and obtain the human parasite egg detection model; S7) Input the image to be detected through the image acquisition device and transmit it to the human parasite egg identification and detection system. The system uses the human parasite egg detection model to output the detection results. The system outputs the type and quantity of the identified parasite eggs, and labels and classifies the human parasite eggs in the input image, and saves the image recognition results.

2. The method for detecting human parasite eggs based on DS-SCConv enhanced YOLOv8 according to claim 1, characterized in that, The construction of the improved YOLOv8 feature extraction backbone network in S2 includes the following steps: S2.1: By setting the kernel size K in the backbone network to 1, 3, or 5, we can better obtain the receptive field information of the image and acquire multi-scale feature information to improve the inference speed during convolutional layer training. S2.2: The SCConv module is used to reduce feature extraction redundancy and improve the model's inference speed. S2.3: Enhanced attention module in SEAM space reduces interference from background and occlusions on model recognition, and improves the recognition weight of key features.

3. The method for detecting human parasite eggs based on DS-SCConv enhanced YOLOv8 according to claim 1, characterized in that, The DS-SCConv module based on the DWRSeg network framework constructed in S3 specifically includes: S3.1: Two-step feature extraction is performed on the feature map using the DWRSeg network structure, and the SIR and DWR modules are used to extract the separable dilated convolution with different receptive field sizes; S3.2: The different separable dilated convolutions extracted by SIR and DWR are concatenated and the result is output in the decoder; S3.3: The output result is put into the SCConv module of the next layer, and then executed sequentially by SRU and CRU to remove feature redundancy and output the final result.

4. The method for detecting human parasite eggs based on DS-SCConv enhanced YOLOv8 according to claim 3, characterized in that, The two-step feature extraction and the extraction operations of the DWR and SIR modules in S3.1 specifically include: S3.1.1: A two-step residual feature extraction method is used, namely region residualization and semantic residualization. Region residualization first groups the region feature maps and performs depthwise separable dilated convolutions at different rates to learn the feature maps based on the receptive field size. Semantic residualization then uses depthwise separable dilated convolutions with the desired receptive field to perform semantic morphological filtering on each region feature map, changing the role of multi-rate dilated convolutions in feature extraction and improving the efficiency of multi-scale information capture in real-time semantic segmentation. S3.1.2: The DWR module is used to adapt to different receptive field sizes within a single layer across multiple branches. Each branch first extracts features using a standard 3x3 convolution combined with BN and ReLU layers. Then, a 3x3 convolution is unfolded to extract semantic information, and a BN layer is used to obtain semantic residuals. Finally, all branch feature maps are concatenated, and pointwise convolutions are used to merge the feature maps to generate the final residual, which is then added to the input feature map to construct a stronger feature representation. The specific calculation method is as follows: C1(x) = SiLU(BN(Conv(x))) C2(x,d)=D d DConv(C1(x)) DWR(x)=PConv(BN(Γ d C2(x,d)))+x Where x represents the input feature map, Conv() represents a 3×3 convolution, BN is batch normalization, SiLU() represents the activation function, DxConv() represents a 3×3 convolution with a hole ratio d in the hole depth direction, PConv() represents pointwise convolution, and Γ d This represents the cascade operation of all d. S3.1.3: SIR module. The specific calculation method is as follows: SIR(x)=PConv(BN(Conv 3x3 (C1(x))))+x Where x is the input feature, Conv 3×3 This represents a 3×3 convolution, BN is batch normalization, C1(x) performs channel expansion and other operations on the input features, and PConv is pointwise convolution used to fuse features.

5. The method for detecting human parasite eggs based on DS-SCConv and enhanced YOLOv8 according to claim 3, characterized in that, The method described in S3.2 regarding the convolution process involving SIR and DWR separation, dilation, concatenation, and then output via a decoder, along with the corresponding loss function calculation method, specifically includes: S3.2.1: The specific calculation method for the decoder is as follows: Where Stage4, Stage3, and Stage2 represent the feature maps of stages 4, 3, and 2, respectively, and UpSample represents the upsampling operation. This indicates the connection operation of the feature map, and SegHead indicates the segmentation head used for prediction. S3.2.2: In addition, DWRSeg uses cross-entropy loss and online hard sample mining to optimize the semantic segmentation learning task. The calculation method of its cross-entropy loss function is as follows: Where N is the number of samples, C is the number of categories, and y i,c p represents the true label of sample i belonging to category c. i,c This represents the probability that the model predicts sample i belongs to category c.

6. The method for detecting human parasite eggs based on DS-SCConv enhanced YOLOv8 according to claim 3, characterized in that, In S3.3, the SRU and CRU of the SCConv module are used to optimize the feature redundancy in the feature map, specifically including: S3.3.1: The SCConv module primarily enhances feature representation by combining 3×3 spatial convolution operations, 1×1 channel convolution operations, and appropriate normalization and activation functions. Assume the input feature map is F. in ∈R H×W×C Where H, W, and C represent the height, width, and number of channels of the feature map, respectively, and the specific calculation method of its output feature map is as follows: F out =Conv 1x1 (GN(ReLU(Conv 3x3 (F in )))) Among them, Coun 3×3 GN represents a 3×3 convolution operation used to extract spatial features; ReLU is an activation function used to introduce non-linear components, helping the model learn more complex patterns; GN represents grouping normalization, which helps stabilize the training process and accelerate model convergence; Conv 1×1 This refers to a 1×1 convolution operation, which is mainly used to adjust the channel dimension in order to control the number of channels in the feature map, thereby improving the model's expressive power and computational efficiency. S3.3.2: The SRU module primarily performs spatial refinement on the input feature map, effectively utilizing the spatial redundancy of features to distinguish between information-rich and information-poor feature maps. The specific calculation method is as follows: X w1 ∪X w2 =X w Specifically, group normalization (GN) is used to classify the information richness of feature maps. Then, the sigmoid function is used to evaluate whether the information content of the feature maps exceeds 0.5, classifying them into information-rich W1 and information-sparse W2. Next, the input feature X is multiplied by W1 and W2 respectively to obtain the information-rich feature and the information-sparse feature X. w1 and X w2 The two features are then fused through a cross-reconstruction operation to generate a spatially reconstructed feature map. S3.3.3: The CRU module primarily reconstructs features along the channel dimension, reducing redundancy and further enhancing feature expressiveness. It performs further operations on the feature maps reconstructed in the SRU space, mainly including three steps: segmentation, transformation, and fusion. In the segmentation stage, the input features are grouped and convolutionally processed to generate two feature maps: the upper part X... up and the lower part X low During the transformation phase, X up As a rich feature extractor, it is input into the upper-level transformation stage, and the efficient convolutional operations GWC and PWC are used to replace the original k×k convolution to extract high-level representative information and reduce computational cost. Due to sparse convolutional connections, GWC reduces parameters and computational cost, but it cuts off the information flow between channel groups. PWC, on the other hand, compensates for information loss and helps information flow between feature channels. The specific calculation method of the upper-level transformation stage is as follows: Among them, M G ∈R αc / gr×k×k×c , X is the learnable weight matrix of GWC and PWC. up ∈R αc / r×h×w and Y1∈R c×h×w These are the upper-layer input and output feature maps, respectively. Similarly, for the lower part X low The same process applies; the specific calculation method for the lower-level transformation stage is as follows: in, X is the learnable weight matrix of PwC, ∪ is the join operation, and X... low ∈R (1-α)c / r×h×w and Y2∈R c×h×w These are the lower-level input and output feature maps, respectively. In the final fusion stage, the global channels S1 and S2 of the upper and lower layers are superimposed, and an activation function is used to generate two deep feature vectors β1 and β2∈R. c The features are then multiplied by the previously obtained feature maps and then added together to obtain the reconstructed feature maps of the channels. The specific calculation method is as follows: Y = β1Y1 + β2Y2 In this context, Y1 refers to the upper-layer features, Y2 refers to the lower-layer features, and Y refers to the channel refinement features, which is the feature map of the final channel reconstruction.