Parasite ovum microscopic image detection method and system based on polymorphic prior
By constructing a multimorphological convolutional kernel library and a spatial attention mechanism, the problems of morphological similarity and background interference in parasite egg detection were solved, achieving high-precision and high-robustness parasite egg detection and meeting the needs of clinical applications.
Patent Information
- Application Number
- CN202511801616.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-02
- Publication Date
- 2026-02-06
AI Technical Summary
Existing technologies for detecting parasite eggs suffer from high morphological similarity, significant background interference, and a lack of explicit morphological modeling, resulting in insufficient specificity, accuracy, and generalization ability, making it difficult to meet the needs of clinical applications.
We construct a multimorphological convolutional kernel library based on the biological morphological features of parasite eggs. Combined with spatial attention mechanism, we perform deep convolution and feature enhancement on the initial feature map to generate a spatial attention map, and then perform bounding box regression and class prediction.
It enables precise and robust detection of parasite eggs in complex microscopic images, improving the specificity, accuracy, and generalization of detection, and meeting the needs of practical clinical applications for automated and highly consistent diagnosis.
Smart Images

Figure CN121482783A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of medical image processing and computer vision technology, specifically to a method and system for detecting parasite eggs using microscopic images. Background Technology
[0002] The diagnosis of parasitic diseases is a critical task in the field of public health. Currently, clinical practice still relies heavily on microscopic examination of patient samples (such as feces or blood) for parasite eggs. Traditional methods mainly depend on laboratory personnel to identify and classify parasites by visual observation. This process is not only inefficient but also highly susceptible to factors such as the operator's experience level and visual fatigue, resulting in subjective bias and insufficient stability of the identification results.
[0003] In recent years, with the development of deep learning technology, a series of deep learning-based target detection algorithms, represented by YOLO (You Only Look Once), have been gradually introduced into microscopic image analysis in an attempt to achieve automatic identification of parasite eggs in order to improve detection efficiency and consistency.
[0004] However, despite the excellent performance of general object detection models on multiple vision tasks, they still have the following limitations when dealing with the specific scenario of parasite egg detection: On the one hand, the morphology of different parasite egg species is highly similar, while the eggs of the same species exhibit diversity due to differences in developmental stage or preparation, making it difficult for models to accurately distinguish them.
[0005] On the other hand, microscopic images often contain a large amount of interference information such as impurities and cell residues, which can easily lead to misjudgments by the model.
[0006] In addition, existing methods often lack explicit modeling of the inherent morphological structure of parasite eggs (such as elliptical or circular outlines), resulting in insufficient localization accuracy and poor robustness when dealing with deformed, occluded, or atypical samples.
[0007] The aforementioned reasons mean that existing technologies are insufficient in terms of specificity, accuracy, and generalization ability to meet the needs of actual clinical applications when dealing with parasite egg detection tasks in complex contexts. Summary of the Invention
[0008] To address the above technical problems, this invention provides a technical solution for a method and system for detecting parasite eggs using microscopic images based on multimorphological priors.
[0009] The technical problem solved by this invention can be achieved by the following technical solutions: A method for detecting parasite eggs using microscopic images based on multimorphological priors, comprising: Step S1: Obtain the microscopic image to be detected, and extract features from the microscopic image to be detected using a convolutional neural network to obtain an initial feature map; Step S2: Construct a multimorphological convolutional kernel library based on the preset biological morphological characteristics of parasite eggs; Step S3: Use the multimorphic convolution kernel library to perform deep convolution and feature fusion operations on the initial feature map to generate a spatial attention map; Step S4: Use the spatial attention map to perform feature enhancement processing on the initial feature map to obtain an enhanced feature map; Step S5: Perform bounding box regression and category prediction on the enhanced feature map to obtain the parasite egg detection results.
[0010] Preferably, step S2 includes: Based on the preset biological morphological characteristics of parasite eggs, convolution kernels of various shapes are generated. Each convolution kernel shape contains multiple scales and multiple directions to jointly constitute the multimorphological convolution kernel library. The convolution kernel is at least one of an elliptical kernel, a circular kernel, a rhomboid kernel, and a rectangular kernel.
[0011] Preferably, the elliptic kernel is generated based on the equation of the rotated ellipse, and its mathematical expression is: ; The circular kernel is generated based on a circular equation, the mathematical expression of which is: ; The rhombus kernel is generated based on the Manhattan distance, and its mathematical expression is: ; The rectangular kernel is generated based on Chebyshev distance, and its mathematical expression is: ; in, , θ is the rotation angle, (x,y) are the coordinates in the kernel plane; a and b are the major and minor axes of the ellipse, respectively; r is the radius of the circle; and s is the scale parameter.
[0012] Preferably, step S3 includes: Step 31: Use the multimorphic convolution kernel library to perform depthwise separable convolution operation on the initial feature map to generate a multi-channel morphological response feature map; Step 32: Perform feature aggregation on the multi-channel morphological response feature maps to obtain a single-channel morphological confidence map; Step 33: Fuse the morphological confidence map with the global context features extracted from the initial feature map to generate a spatial attention map.
[0013] Preferably, step 32 includes: Step S321: Input the multi-channel morphological response feature map into the feature fusion network, and calculate the fusion weight of different morphological response feature maps through the adaptive weight learning layer in the feature fusion network; Step S322: Based on the fusion weight, the morphological response feature maps of the multi-channel are weighted and fused to obtain a single-channel morphological confidence map; The morphological confidence map represents the degree of matching between each spatial location in the image and the preset morphological features of the parasite egg.
[0014] Preferably, step 33 includes: Step S331: Perform global average pooling and global max pooling operations on the initial feature map to obtain global average pooling feature vector and global max pooling feature vector respectively. Step S332: The morphological confidence map, the global average pooling feature vector, and the global max pooling feature vector are concatenated along the channel dimension. Step S333: The spliced features are integrated through a spatial fusion network to generate the spatial attention map.
[0015] Preferably, step S4 includes: The enhanced feature map is obtained by element-wise multiplying the spatial attention map with the initial feature map using a broadcast mechanism. The formula for calculating element-wise multiplication is expressed as follows: , in, For the enhanced feature map, The initial feature map, This is the spatial attention map.
[0016] Preferably, step S5 includes: Step S51: Input the enhanced feature map into the detection head network, and perform multi-scale feature fusion processing on the enhanced feature map through the detection head network; Step S52: Based on the anchor box mechanism or anchor point mechanism, perform bounding box regression and category prediction on the fused features, and output the parasite egg detection results. The parasite egg detection results include the bounding box coordinates, confidence level and category of the parasite egg.
[0017] It also includes a parasite egg microscopic image detection system based on multimorphological priors, used to implement the parasite egg microscopic image detection method based on multimorphological priors as described above, including: The feature extraction module is used to acquire the microscopic image to be detected and extract features through a convolutional neural network to obtain an initial feature map. The morphological kernel generation module, connected to the feature extraction module, is used to construct a multimorphological convolutional kernel library based on preset biological morphological features of parasite eggs. A multimorphic feature-guided attention module, connected to the morphological kernel generation module, is used to perform deep convolution and feature fusion operations on the initial feature map using the multimorphic convolution kernel library to generate a spatial attention map; The feature enhancement module, connected to the multimorphological feature-guided attention module, is used to perform feature enhancement processing on the initial feature map using the spatial attention map to obtain an enhanced feature map. The detection and analysis module, connected to the feature enhancement module, is used to perform bounding box regression and category prediction on the enhanced feature map to obtain the parasite egg detection results.
[0018] Preferably, the parasite egg microscopic image detection system further includes an interactive interface module, the interactive interface module comprising: The data interface unit is used to receive microscopic image or video data uploaded by the user and send the microscopic image or video data to the feature extraction module; The parameter configuration unit is used to receive the detection parameters set by the user and send the detection parameters to the detection analysis module; The results display unit is connected to the detection and analysis module and is used to receive and visualize the parasite egg detection results.
[0019] Beneficial effects: This invention introduces a multimorphological convolutional kernel library based on the pre-defined biological morphological features of parasite eggs, and combines spatial attention mechanism to perform deep convolution and feature enhancement on the initial feature map. This effectively overcomes the limitations of traditional detection models in terms of highly similar egg morphology, large image background interference, and lack of explicit morphological structure modeling. It achieves accurate and robust detection of parasite eggs in complex microscopic images, significantly improves the specificity, accuracy and generalization ability of detection, and meets the needs of actual clinical applications for automated and highly consistent diagnosis. Attached Figure Description
[0020] Figure 1 This is a flowchart of the parasite egg microscopic image detection method of the present invention; Figure 2 This is a flowchart of step S1 in the parasite egg microscopic image detection method of the present invention; Figure 3 This is a flowchart of step S3 in the parasite egg microscopic image detection method of the present invention; Figure 4This is a flowchart of step S5 in the parasite egg microscopic image detection method of the present invention; Figure 5 This is a block diagram of the parasite egg microscopic image detection system of the present invention. Detailed Implementation
[0021] 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.
[0022] It should be noted that, unless otherwise specified, the embodiments and features described in the present invention can be combined with each other.
[0023] The present invention will be further described below with reference to the accompanying drawings and specific embodiments, but this is not intended to limit the scope of the invention.
[0024] Reference Figure 1 This invention provides a method for detecting parasite eggs using microscopic images based on multimorphological priors, comprising: Step S1: Obtain the microscopic image to be detected, and extract features from the microscopic image to be detected using a convolutional neural network to obtain an initial feature map; Step S2: Construct a multimorphological convolutional kernel library based on the preset biological morphological characteristics of parasite eggs; Step S3: Use the multimorphic convolution kernel library to perform deep convolution and feature fusion operations on the initial feature map to generate a spatial attention map; Step S4: Use the spatial attention map to perform feature enhancement processing on the initial feature map to obtain an enhanced feature map; Step S5: Perform bounding box regression and category prediction on the enhanced feature map to obtain the parasite egg detection results.
[0025] Specifically, in this embodiment of the invention, to address the problems of highly similar morphological characteristics of different parasite eggs, complex image background interference, and the lack of explicit morphological modeling in general models, a multimorphological convolutional kernel library integrating biological priors is constructed, and a morphology-guided attention mechanism is designed. The inherent morphological features of parasite eggs, such as elliptical and circular outlines, are incorporated as spatial prior information into the feature extraction process. This effectively enhances the model's ability to focus on target regions and its morphological discrimination ability, avoiding missed detections and misjudgments caused by morphological diversity and background interference in traditional methods. It achieves accurate localization and stable identification of parasite eggs in complex microscopic environments, and significantly improves the robustness and generalization performance of the detection model in real clinical scenarios.
[0026] As a preferred embodiment of the present invention, refer to Figure 2 Step S1 includes: Step S11: Obtain a microscopic image of the object to be tested by a microscope; Step S12: Perform a normalization preprocessing operation on the microscopic image to be detected; Step S13: Input the preprocessed image into the backbone network of the convolutional neural network to extract feature maps at different levels; Step S14: Select one or more layers of feature maps as the initial feature map; The initial feature map has dimensions [B, C, H, W], where B is the batch size, C is the number of channels, and H and W are the height and width of the initial feature map, respectively.
[0027] Specifically, considering that parasite egg microscopic images typically have complex backgrounds and large differences in target scale, in order to ensure the accuracy and robustness of subsequent detection, the feature extraction operation in this embodiment of the invention has been refined. The specific implementation process is as follows: First, raw digital images of fecal smear samples are acquired using an optical microscope camera (such as the Olympus DP27) equipped with a high-definition CMOS image sensor. The image format is RGB three-channel, and the typical raw resolution is approximately 2048×1536 pixels. Secondly, the original image is preprocessed, including scaling the image size to 640×640 pixels and performing normalization to linearly map the pixel values from [0, 255] to the [0, 1] interval. Then, channel normalization is performed to make it meet the model input requirements. Next, the preprocessed image tensor is input into the backbone network of the YOLOv8 model for forward propagation. This backbone network is based on the CSPDarknet architecture and progressively downsamples and extracts deep semantic features of the image through a series of convolutions, C2f modules, and spatial pyramid pooling (SPPF) operations. The backbone network generates multiple feature maps at different scales.
[0028] Specifically, to balance the detection sensitivity for small and medium-sized parasite eggs with the contextual information for large eggs, feature maps from the middle layers of the backbone network (e.g., feature maps downsampled by 16 times with dimensions [B, 512, 40, 40]) were deliberately selected as the initial feature maps for subsequent processing. This layer achieves a good balance between semantic abstraction and spatial detail preservation.
[0029] More specifically, in this embodiment of the invention, the selection of the convolutional neural network and its backbone network is not limited to the aforementioned YOLOv8 architecture. Those skilled in the art can flexibly select other advanced or future network architectures as alternatives based on the speed and accuracy requirements of the actual application. For example: For backbone networks: lighter-weight MobileNetV3 and EfficientNet-Lite can be used to adapt to mobile or edge computing devices; more powerful architectures such as RegNet and ConvNeXt can also be used to pursue the ultimate feature extraction capabilities.
[0030] Regarding the overall architecture: This invention introduces a multimorphic prior, an idea that can be transferred to other versions of the YOLO series, such as the YOLOv8 to YOLOv11 architectures. Enhanced generality can be achieved simply by embedding the proposed "multimorphic convolutional kernel library" and "spatial attention generation" module into the initial feature maps extracted from the backbone network.
[0031] In a preferred embodiment of the present invention, step S2 includes: Based on the preset biological morphological characteristics of parasite eggs, convolution kernels of various shapes are generated through mathematical equations. Each shape of convolution kernel contains multiple scales and multiple directions to jointly constitute the multimorphological convolution kernel library. The convolution kernel is at least one of an elliptical kernel, a circular kernel, a rhomboid kernel, and a rectangular kernel.
[0032] Specifically, considering the significant morphological differences among different parasite egg species, and the fact that the same type of parasite egg can exhibit changes in scale and orientation under different imaging conditions, this embodiment of the invention constructs a multimorphological convolutional kernel library that comprehensively covers the morphological characteristics of common parasite eggs. This multimorphological convolutional kernel library models the typical morphology of 16 clinically common parasite eggs (including Ascaris lumbricoides, hookworm, whipworm, pinworm, liver fluke, Clonorchis sinensis, Schistosoma japonicum, Paragonimus westermani, Fasciolopsis buski, Taenia solium, Taenia vesca, Echinococcus granulosus, Giardia lamblia, Entamoeba histolytica, Cryptosporidium, and Plasmodium), and designs four basic shape kernels: elliptical kernel, circular kernel, rhomboid kernel, and rectangular kernel, to match the contour features of different parasite eggs respectively.
[0033] Each basic shape generates 4 different scales (covering the common pixel size range of insect eggs) and 8 directions (from 0° to 210°, with a step of 30°), ultimately generating 4×4×8=128 morphological convolution kernels, forming a complete multimorphological convolution kernel library to effectively capture the morphological prior information of parasite eggs of different species and postures.
[0034] Accordingly, all four basic morphological convolution kernels mentioned above are generated using mathematical equations for parameterization, specifically: The elliptic kernel is generated based on the equation of the rotated ellipse, and its mathematical expression is: ; The circular kernel is generated based on the circular equation, and its mathematical expression is: ; The rhombus kernel is generated based on the Manhattan distance, and its mathematical expression is: ; The rectangular kernel is generated based on Chebyshev distance, and its mathematical expression is: ; in, , θ is the rotation angle, (x,y) are the coordinates in the kernel plane; a and b are the major and minor axes of the ellipse, respectively; r is the radius of the circle; and s is the scale parameter.
[0035] In this way, by abstracting the typical morphology of parasite eggs into a mathematical model, a quantitative expression of biological priors is achieved, giving the convolution kernel a clear morphological meaning and geometric interpretability, and providing precise and interpretable morphological guidance for subsequent feature enhancement.
[0036] More specifically, in this embodiment of the invention, the construction of the multimorphic convolutional kernel library possesses high flexibility and scalability. Those skilled in the art can adjust the shape types, scale ranges, and directional resolution in the multimorphic convolutional kernel library according to the specific distribution of parasite egg species in the target detection scenario. For example, in specific regional applications, if the morphological characteristics of known prevalent insect species are relatively concentrated, the shape types can be appropriately simplified; conversely, when facing unknown or unusually diverse insect eggs, more complex shapes (such as custom polygonal kernels) can be introduced or the sampling density of scale and direction can be increased to improve the representational capability of the kernel library.
[0037] Furthermore, the generation of the nucleus can also be optimized based on actual insect egg image datasets through unsupervised learning (such as clustering), so that the generated morphological nucleus can better match the actual distribution of the data.
[0038] As a preferred embodiment of the present invention, refer to Figure 3 Step S3 includes: Step 31: Use the multimorphic convolution kernel library to perform depthwise separable convolution operation on the initial feature map to generate a multi-channel morphological response feature map; Step 32: Perform feature aggregation on the multi-channel morphological response feature maps to obtain a single-channel morphological confidence map; Step 33: Fuse the morphological confidence map with the global context features extracted from the initial feature map to generate a spatial attention map.
[0039] Specifically, due to the diverse morphologies of parasite eggs and the complex backgrounds of images, direct detection using the original feature maps is easily affected by noise. In this embodiment of the invention, a morphology-guided attention mechanism is designed to recalibrate the feature space through multiple morphological priors: First, the initial feature map is subjected to depthwise separable convolution operations using the aforementioned multimorphic convolution kernel library. This parallel convolution process generates a set of multi-channel morphological response feature maps (dimensions [B, 128, H, W]), where each channel corresponds to a specific morphological prior mode. For example, one channel might specifically respond to "large-scale elliptical" morphologies, with its highly activated regions corresponding to areas in the image similar to the shape of Ascaris eggs; while another channel might be sensitive to "small-scale circles," effectively capturing features of tiny circular targets such as Cryptosporidium eggs. These response maps together constitute the initial detection of various potential egg morphologies in the image.
[0040] Next, by aggregating multiple morphological responses into a unified morphological saliency index, the specific implementation process is as follows: 1) The multi-channel morphological response feature maps are input into a lightweight feature fusion sub-network (which can consist of a 1x1 convolutional layer and a sigmoid activation function). The importance weights of different morphological response feature maps during fusion are dynamically calculated through an adaptive weight learning layer within the feature fusion network. This design enables the model to adaptively highlight the morphological features most relevant to the scene based on the current image context. For example, in a fecal sample image, the weight of the elliptical kernel might be significantly higher than that of the rectangular kernel.
[0041] 2) The morphological response feature maps of the multi-channel array are weighted and fused based on the fusion weights to obtain a single-channel morphological confidence map. This morphological confidence map characterizes the degree of matching between each spatial location in the image and the preset parasite egg morphological features. The highlighted areas on the confidence map, i.e., the locations with higher values, indicate that the features at that location are highly consistent with at least one parasite egg morphology, providing strong morphological prior guidance for subsequent detection.
[0042] Then, the aforementioned local morphological confidence is combined with the global contextual information of the image to generate more robust spatial attention. The specific implementation process is as follows: 1) Perform global average pooling and global max pooling operations on the initial feature map to obtain global average pooling feature vector and global max pooling feature vector respectively; 2) The morphological confidence map, the global average pooling feature vector, and the global max pooling feature vector are concatenated along the channel dimension to form a composite feature that integrates local morphological saliency and global statistical properties; 3) The stitched features are then processed through a spatial fusion network (e.g., a 7x7 convolutional layer followed by a sigmoid activation function) to integrate features and model spatial relationships, ultimately generating a spatial attention map with dimensions [B, 1, H, W]. This spatial attention map retains the precise local cues provided by the morphological confidence map while incorporating the modulation of important regions by the global context, enabling it to more accurately and stably indicate potential parasite egg regions in the image.
[0043] Through the above steps, this invention successfully constructs an attention mechanism guided by morphological priors, which effectively enhances the model's ability to focus on the target region and lays a solid foundation for subsequent accurate detection.
[0044] In a preferred embodiment of the present invention, step S4 specifically includes: multiplying the spatial attention map and the initial feature map element-wise through a broadcast mechanism to obtain the enhanced feature map; The formula for calculating element-wise multiplication is expressed as follows: , in, For the enhanced feature map, The initial feature map, This is the spatial attention map.
[0045] Specifically, to accurately apply the spatial weights provided by the spatial attention map to the initial feature map, thereby focusing on key regions and suppressing background noise, this embodiment of the invention employs an element-wise multiplication operation based on a broadcast mechanism to achieve feature enhancement (i.e., a gating mechanism). This operation expands the spatial attention map (dimension [B, 1, H, W]) to the same number of channels as the initial feature map (dimension [B, C, H, W]) through a broadcast mechanism, and then performs element-wise multiplication operations at each spatial location and channel C corresponding to the two tensors. The spatial attention map activated by the Sigmoid function has its value range limited to [0, 1]. When the attention weight at a certain location is close to 1, the feature at that location is almost completely preserved or even amplified; when the weight is close to 0, the feature at that location is significantly suppressed.
[0046] As a preferred embodiment of the present invention, refer to Figure 4 Step S5 includes: Step S51: Input the enhanced feature map into the detection head network, and perform multi-scale feature fusion processing on the enhanced feature map through the detection head network; Step S52: Based on the anchor box mechanism or anchor point mechanism, perform bounding box regression and category prediction on the fused features, and output the parasite egg detection results. The parasite egg detection results include the bounding box coordinates, confidence level and category of the parasite egg.
[0047] Specifically, in order to transform the enhanced feature map, which has been focused on the target shape and obtained from the aforementioned steps, into an accurate detection result, this embodiment of the invention uses a YOLOv8 network that includes a neck and a head for processing.
[0048] Specifically, the enhanced feature map is input into the neck network of the YOLOv8 network (such as PANet in the YOLOv8 architecture). This neck network performs multi-scale feature fusion on the enhanced feature map through operations such as upsampling, downsampling, and feature concatenation, generating a series of fused feature pyramids with rich semantic information and accurate spatial details. These fused features effectively aggregate contextual information from different scales, ensuring the detection capability of parasite eggs of varying sizes.
[0049] Subsequently, these fused features are fed into the detection head, which, based on a preset anchor mechanism or anchor-free mechanism, performs bounding box regression, target confidence prediction, and multi-class classification tasks in parallel at each spatial location and feature scale.
[0050] Finally, the YOLOv8 network outputs the precise bounding box coordinates of each detected parasite egg, an overall confidence score indicating the presence of the target within the box, and its specific category (e.g., roundworm eggs, hookworm eggs, Clonorchis sinensis eggs, etc.).
[0051] The final classification result can be obtained by applying post-processing algorithms such as nonmaximum suppression and argmax to the class probability vector output by the model.
[0052] Reference Figure 5 The present invention also provides a parasite egg microscopic image detection system based on multimorphological priors, which implements the parasite egg microscopic image detection method based on multimorphological priors as described above, including: The feature extraction module 100 is used to acquire the microscopic image to be detected and extract features through a convolutional neural network to obtain an initial feature map. The morphological kernel generation module 200 is connected to the feature extraction module 100 and is used to construct a multimorphological convolutional kernel library based on the preset biological morphological features of parasite eggs. The multimorphic feature-guided attention module 300 is connected to the morphological kernel generation module 200 and is used to perform deep convolution and feature fusion operations on the initial feature map using the multimorphic convolution kernel library to generate a spatial attention map. The feature enhancement module 400 is connected to the multimorphological feature-guided attention module 300 and is used to perform feature enhancement processing on the initial feature map using the spatial attention map to obtain an enhanced feature map. The detection and analysis module 500 is connected to the feature enhancement module 400 and is used to perform bounding box regression and category prediction on the enhanced feature map to obtain the parasite egg detection result.
[0053] Specifically, in this embodiment of the invention, the detection method based on multimorphic priors is implemented in both hardware and software by constructing the aforementioned modular system: The system takes the front-end feature extraction module 100 as the input starting point, injects biological prior knowledge through the morphology kernel generation module 200, guides the attention module 300 through the core multimorphological features to realize morphological response calculation, confidence fusion and spatial attention refinement, and then uses the feature enhancement module 400 to complete the focusing and enhancement of target features. Finally, the detection and analysis module 500 outputs the structured detection results.
[0054] It is evident that by connecting these five clearly defined and logically progressive modules, abstract morphological prior knowledge is successfully embedded into the end-to-end deep learning detection process. This enables the system to demonstrate excellent discrimination ability and robustness when faced with microscopic images with complex backgrounds, high morphological similarity, and various interferences. Ultimately, it achieves high-precision and high-efficiency automated identification and localization of various parasite eggs, effectively meeting the clinical laboratory's demand for intelligent diagnostic tools.
[0055] As a preferred embodiment of the present invention, refer to Figure 5 An interactive interface module 600, comprising: The data interface unit 610 is used to receive microscopic image or video data uploaded by the user and send the microscopic image or video data to the feature extraction module 100. The parameter configuration unit 620 is used to receive the detection parameters set by the user and send the detection parameters to the detection analysis module 500; The result display unit 630 is connected to the detection and analysis module 500 and is used to receive and visualize the parasite egg detection results.
[0056] Specifically, in this embodiment of the invention, considering the needs of practical clinical applications for ease of operation, intuitive results, and interactive processes, a web-based interactive interface module 600 is specifically designed. This interactive interface module 600 adopts a B / S architecture, with the front-end implementing a responsive user interface based on HTML5, CSS3, and native JavaScript, and the back-end algorithm service built on the Python and PyTorch frameworks, providing detection and analysis capabilities to the front-end through a RESTful API. It specifically includes the following three functional units: The data interface unit 610 serves as the system's data entry point. It has been optimized for the workflow of parasitological microscopy, allowing users to directly upload local static microscopic images in formats such as JPEG and PNG, or dynamic video streams in formats such as MP4 and AVI, via a browser. It can also display the detection count and statistical analysis results of up to 16 common parasite eggs (such as Giardia lamblia, Entamoeba histolytica, Ascaris lumbricoides, Hookworm, Schistosoma japonicum, and Taenia solium) in real time. The parameter configuration unit 620 provides users with a flexible real-time adjustment function for detection parameters. Users can interactively adjust key hyperparameters such as the detection confidence threshold and the intersection over union (IoU) threshold on the Web interface according to specific sample conditions and detection needs, so as to achieve fine control over detection sensitivity and specificity. The results display unit 630 is responsible for presenting the structured results output by the detection and analysis module 500 in a multi-dimensional and visual manner. This unit features a dynamically updated statistics panel on the right side of the interface, displaying in real-time the detection counts and distribution statistics of up to 16 common parasite eggs (including roundworms, hookworms, whipworms, and Clonorchis sinensis). Simultaneously, each identified parasite egg is highlighted on the original image or video frame with different colored bounding boxes and category labels, making the detection results readily apparent.
[0057] Through this interactive interface module 600, the present invention successfully transforms advanced detection algorithms into an integrated analysis platform that is easy to operate, has comprehensive functions, and provides intuitive feedback. This greatly reduces the user's barrier to entry, improves the efficiency and experience of microscopic examination, and provides powerful tool support for result verification, recording, and statistical analysis. It also strongly promotes the automated detection technology of parasite eggs from laboratory research to clinical application.
[0058] In summary, this invention abstracts the biological morphological features of parasite eggs into a computable mathematical model, constructs a multimorphological convolutional kernel library, and uses this library as the core to drive a morphology-guided attention mechanism, thereby achieving precise enhancement of the initial feature map. Ultimately, it achieves high-precision and robust identification and localization of multiple types of parasite eggs in microscopic images with complex backgrounds.
[0059] Compared with the prior art, the present invention has the following significant advantages: This invention achieves a deep integration of prior knowledge and data-driven approaches: Unlike traditional models that blindly learn features from data, this invention injects explicit biological morphological constraints (such as specific aspect ratios and contour symmetry) into the network through a pre-defined morphological convolution kernel library, guiding the model to more accurately focus on effective targets in complex backgrounds, thereby fundamentally improving the efficiency and relevance of feature learning.
[0060] While improving performance, this invention also ensures the interpretability of decisions: the intermediate results generated by this invention (such as morphological response maps and spatial attention maps) provide intuitive morphological evidence for the model's decision-making process. Users can clearly trace which morphological features the model used to make judgments, which greatly enhances the credibility and acceptability of the algorithm in rigorous medical scenarios.
[0061] Enhanced generalization ability for specific scenarios: By designing a morphological kernel that covers multiple scales and directions, this invention enhances its inclusiveness regarding the diversity of egg morphology (such as developmental state and differences in imaging angle). This allows the model to maintain stable and reliable detection performance even when faced with atypical samples not fully covered in the training data or samples with partial occlusion, demonstrating superior clinical applicability.
[0062] The above description is merely a preferred embodiment of the present invention and does not limit the implementation and protection scope of the present invention. Those skilled in the art should realize that any equivalent substitutions and obvious changes made based on the description and illustrations of the present invention should be included within the protection scope of the present invention.
Claims
1. A method for detecting parasite eggs using microscopic images based on multimorphological priors, characterized in that, include: Step S1: Obtain the microscopic image to be detected, and extract features from the microscopic image to be detected using a convolutional neural network to obtain an initial feature map; Step S2: Construct a multimorphological convolutional kernel library based on the preset biological morphological characteristics of parasite eggs; Step S3: Use the multimorphic convolution kernel library to perform deep convolution and feature fusion operations on the initial feature map to generate a spatial attention map; Step S4: Use the spatial attention map to perform feature enhancement processing on the initial feature map to obtain an enhanced feature map; Step S5: Perform bounding box regression and category prediction on the enhanced feature map to obtain the parasite egg detection results.
2. The method for detecting parasite eggs using microscopic images based on multimorphological priors according to claim 1, characterized in that, Step S2 includes: Based on the preset biological morphological characteristics of parasite eggs, convolution kernels of various shapes are generated. Each convolution kernel contains multiple scales and multiple directions to jointly constitute the multimorphological convolution kernel library. The convolution kernel is at least one of an elliptical kernel, a circular kernel, a rhomboid kernel, and a rectangular kernel.
3. The method for detecting parasite eggs using microscopic images based on multimorphological priors according to claim 2, characterized in that, The elliptic kernel is generated based on the rotated ellipse equation, and its mathematical expression is: ; The circular kernel is generated based on a circular equation, the mathematical expression of which is: ; The rhombus kernel is generated based on the Manhattan distance, and its mathematical expression is: ; The rectangular kernel is generated based on Chebyshev distance, and its mathematical expression is: ; in, , θ is the rotation angle, (x,y) are the coordinates in the kernel plane; a and b are the major and minor axes of the ellipse, respectively; r is the radius of the circle; and s is the scale parameter.
4. The method for detecting parasite eggs using microscopic images based on multimorphological priors according to claim 1, characterized in that, Step S3 includes: Step 31: Use the multimorphic convolution kernel library to perform depthwise separable convolution operation on the initial feature map to generate a multi-channel morphological response feature map; Step 32: Perform feature aggregation on the multi-channel morphological response feature maps to obtain a single-channel morphological confidence map; Step 33: Fuse the morphological confidence map with the global context features extracted from the initial feature map to generate a spatial attention map.
5. The method for detecting parasite eggs using microscopic images based on multimorphological priors according to claim 4, characterized in that, Step 32 includes: Step S321: Input the multi-channel morphological response feature map into the feature fusion network, and calculate the fusion weight of different morphological response feature maps through the adaptive weight learning layer in the feature fusion network; Step S322: Based on the fusion weight, the morphological response feature maps of the multi-channel are weighted and fused to obtain a single-channel morphological confidence map; The morphological confidence map represents the degree of matching between each spatial location in the image and the preset morphological features of the parasite egg.
6. The method for detecting parasite eggs using microscopic images based on multimorphological priors according to claim 4, characterized in that, Step 33 includes: Step S331: Perform global average pooling and global max pooling operations on the initial feature map to obtain global average pooling feature vector and global max pooling feature vector respectively. Step S332: The morphological confidence map, the global average pooling feature vector, and the global max pooling feature vector are concatenated along the channel dimension. Step S333: The spliced features are integrated through a spatial fusion network to generate the spatial attention map.
7. The method for detecting parasite eggs using microscopic images based on multimorphological priors according to claim 1, characterized in that, Step S4 includes: The enhanced feature map is obtained by element-wise multiplying the spatial attention map with the initial feature map using a broadcast mechanism. The formula for calculating element-wise multiplication is expressed as follows: , in, For the enhanced feature map, The initial feature map, This is the spatial attention map.
8. The method for detecting parasite eggs using microscopic images based on multimorphological priors according to claim 1, characterized in that, Step S5 includes: Step S51: Input the enhanced feature map into the detection head network, and perform multi-scale feature fusion processing on the enhanced feature map through the detection head network; Step S52: Based on the anchor box mechanism or anchor point mechanism, perform bounding box regression and category prediction on the fused features, and output the parasite egg detection results. The parasite egg detection results include the bounding box coordinates, confidence level and category of the parasite egg.
9. A parasite egg microscopic image detection system based on multimorphological priors, characterized in that, A method for implementing a parasite egg microscopic image detection method based on multimorphological priors as described in any one of claims 1-8 includes: The feature extraction module is used to acquire the microscopic image to be detected and extract features through a convolutional neural network to obtain an initial feature map. The morphological kernel generation module, connected to the feature extraction module, is used to construct a multimorphological convolutional kernel library based on preset biological morphological features of parasite eggs. A multimorphic feature-guided attention module, connected to the morphological kernel generation module, is used to perform deep convolution and feature fusion operations on the initial feature map using the multimorphic convolution kernel library to generate a spatial attention map; The feature enhancement module, connected to the multimorphological feature-guided attention module, is used to perform feature enhancement processing on the initial feature map using the spatial attention map to obtain an enhanced feature map. The detection and analysis module, connected to the feature enhancement module, is used to perform bounding box regression and category prediction on the enhanced feature map to obtain the parasite egg detection results.
10. The parasite egg microscopic image detection system based on multimorphological priors according to claim 9, characterized in that, The parasite egg microscopic image detection system also includes an interactive interface module, which includes: The data interface unit is used to receive microscopic image or video data uploaded by the user and send the microscopic image or video data to the feature extraction module; The parameter configuration unit is used to receive the detection parameters set by the user and send the detection parameters to the detection analysis module; The results display unit is connected to the detection and analysis module and is used to receive and visualize the parasite egg detection results.
Citation Information
Cited By
Microscopic image small target detection method and system based on multidirectional gating convolution
CN121838141A
Microscopic image small target detection method and system based on multi-directional gated convolution
CN121838141B
Medical image feature extraction method and system based on morphological structure double-path interaction
CN122091115A