Multi-mode scanning parasitic egg ai intelligent identification system
The AI-powered intelligent parasite egg identification system, employing a multi-mode scanning and heterogeneous dual-process collaborative architecture, solves the problems of low efficiency in traditional manual microscopic examination and insufficient robustness of deep learning solutions. It achieves efficient and automated detection of multiple types of parasite eggs and standardized report generation, making it suitable for high-precision identification of parasite eggs and clinical auxiliary diagnosis.
Patent Information
- Application Number
- CN202611450191.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-17
- Publication Date
- 2026-11-27
AI Technical Summary
Traditional manual microscopic examination is inefficient and highly subjective. Existing image processing solutions lack robustness, and deep learning solutions only support single-mode input and lack a complete closed loop, making it difficult to efficiently and accurately identify multiple parasite eggs.
The parasite egg AI intelligent identification system, which adopts multi-mode scanning, integrates multi-mode scanning, autofocus, YOLO multi-category detection and report output. It achieves end-to-end integration through a heterogeneous dual-process collaborative architecture, supports multi-mode microscopic image acquisition and AI inference, combines a shared memory mechanism for efficient image transmission, and improves detection accuracy through small target detection, morphological constraints, category weighting and Bayesian optimization strategies.
It achieves efficient and automated detection of multiple types of parasite eggs, shortens the scanning time of a single slide to a few minutes, supports high-precision identification of eggs of 9 common parasites, and generates standardized reports suitable for clinical auxiliary diagnosis.
Smart Images

Figure CN123182218A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of AI image recognition technology for parasite eggs, and in particular relates to an AI intelligent recognition system for parasite eggs using multi-mode scanning. Background Technology
[0002] The gold standard for diagnosing parasitic infections is etiological examination, which often requires microscopic identification of parasite eggs. Etiological examination of fecal samples is undoubtedly of paramount importance. Traditional manual microscopic examination has long suffered from low efficiency, high subjectivity, and high labor intensity. To improve or even solve these shortcomings using computer technology, two practical problems exist based on current technology: First, traditional automated image processing solutions (thresholding segmentation + SVM) lack robustness when dealing with complex fecal backgrounds; second, while deep learning solutions can improve accuracy, they generally suffer from limitations such as supporting only single-mode input, a disconnect between data acquisition and inference processes, limited coverage of egg species (typically 3-5), and a lack of a complete closed loop from collection to reporting. Summary of the Invention
[0003] The purpose of this invention is to provide a multi-mode scanning AI intelligent identification system for parasite eggs, which integrates multi-mode scanning, autofocus, YOLO multi-category detection and report output, realizing end-to-end integration of multi-mode microscopic image acquisition and AI inference; at the same time, based on the YOLO model, it achieves high-precision multi-category detection covering 9 types of parasite eggs; and through a shared memory mechanism, it realizes high-frame-rate real-time image transmission between the two processes.
[0004] To achieve the above objectives, the present invention provides a multi-mode scanning AI intelligent identification system for parasite eggs, which adopts a heterogeneous dual-process collaborative architecture, including a microscope hardware control module for acquiring images containing parasite eggs; An autofocus calculation module used for focusing and calculating image sharpness; The image is written to the shared memory area using a shared memory zero-copy mechanism, and the image data transmission module of the AI process is notified through a synchronization event. An AI recognition module used to infer the location and type of insect eggs in images; A report generation module for generating standardized reports.
[0005] Preferably, the heterogeneous dual-process collaborative architecture consists of a C++ Qt main process and an independent Python inference process; The C++ main process is responsible for stage movement, camera acquisition, process scheduling and report generation, including the autofocus calculation module; The Python process is responsible for loading deep learning models for real-time inference, including the AI recognition module; The C++Qt main process and the independent Python inference process exchange data through the image data transmission module.
[0006] Preferably, the microscope hardware control module supports four scanning modes: row-by-row, column-by-column, region, and full slide. Region scanning is suitable for fine acquisition of a specified area, while full slide scanning is suitable for full coverage acquisition of the entire slide. The microscope hardware control module also uses a three-axis precision motion control method (XYZ) to control the movement of the stage. The C++ main process controls the movement of the microscope stage in the X, Y, and Z directions via serial communication. The X / Y axes are used for field of view traversal and area positioning, while the Z axis is used for focal plane search during autofocus.
[0007] Preferably, the workflow of the microscope hardware control module is as follows: The microscope control module sends platform communication commands to the serial communication thread through the business module. The serial communication thread converts the platform communication commands into COM port communication commands and transmits them to the stepper motor control board. The stepper motor control board replies with the execution result to the serial communication thread, and then the serial communication thread notifies the business module of the execution result. Finally, the business module sends an interface prompt to the microscope control module.
[0008] Preferably, the autofocus calculation module employs a multi-sampling strategy autofocus method, combining the generation of diamond-shaped focus sampling points and the generation of plane-shaped focus sampling points. The specific process is as follows: Generate multiple sampling points along the Z-axis with a preset step size → acquire images at each sampling point location → calculate the sharpness evaluation value of each image → determine the optimal focal plane position based on the sharpness curve; Among them, the rhombus sampling strategy generates dense sampling points in a rhombus distribution near the focusing plane, while the planar focusing sampling strategy generates sparse sampling points in a planar grid distribution during the large-scale search phase; and the sampling density and range are adaptively adjusted according to the distribution characteristics of insect eggs. Meanwhile, during the automatic scanning process, a multi-layer image depth-of-field fusion method is used to perform depth-of-field fusion processing on multiple Z-axis images with different focal lengths in the same field of view, ensuring that details at all levels of insect eggs of medium to small size and above can be clearly preserved.
[0009] Preferably, the autofocus calculation module operates as follows: The autofocus module controls the Z-axis and the camera shooting process through the business module, and then judges the image with the highest image sharpness value, which is then determined to be the sharpest image.
[0010] Preferably, the image data transmission module is based on Windows shared memory to achieve dual-process zero-copy high-speed communication. The C++ Qt main process and the independent Python inference process communicate through the shared memory zero-copy high-speed transmission mechanism and the dual-process synchronous communication mechanism. The working process of the shared memory zero-copy high-speed transmission mechanism is as follows: after the C++ Qt main process acquires the image, it directly writes it to the shared memory area, and the Python inference process directly reads the image data from the shared memory for inference, thus realizing zero-copy high-speed communication between processes. The dual-process synchronous communication mechanism is a shared memory transmission mechanism, which includes shared memory region allocation, double buffering mechanism and inter-process synchronization event notification. The double buffering mechanism uses two buffers to alternate writing and reading; the inter-process synchronization event notification is used to notify the receiver that a new image is ready.
[0011] Preferably, the YOLO multi-class parasite egg detection method is trained in the AI recognition module by means of a small target parasite egg detection optimization strategy, an image enhancement strategy that integrates morphological constraints, a category weighting mechanism, a Bayesian optimization false detection filtering strategy, and an adaptive threshold strategy for parasite egg detection confidence. The trained YOLO multi-category parasite egg detection method can perform end-to-end localization and classification identification of eggs of nine common parasites. The optimization strategy for small target insect egg detection addresses the characteristics of insect eggs under a microscope: small size, sparse distribution, and diverse morphology. It optimizes the YOLO model accordingly. This includes adding a small target detection layer to improve the feature extraction capability of small targets, adjusting the anchor frame size to adapt to the scale range of insect eggs, using an attention mechanism to enhance the response of key features of insect eggs, and optimizing the non-maximum suppression strategy to reduce the missed detection of dense insect eggs. The image enhancement strategy that integrates morphological constraints utilizes the inherent morphological features of insect eggs to perform protective transformations on multiple contours and internal structures, thereby enhancing the model's ability to extract morphological features of insect eggs. To address the issue of disparate training sample sizes for different egg categories, a category-weighted mechanism is introduced, which automatically calculates weights based on the proportion of samples in each category. The Bayesian optimization false detection filtering strategy, based on the candidate detection boxes output by the YOLO model inference, uses a Bayesian optimization strategy to evaluate the probability of the candidate detection boxes, and combines multi-dimensional features to distinguish between real insect eggs and non-insect egg interference, and accurately filters out non-insect egg targets. The adaptive confidence threshold strategy for insect egg detection adopts an adaptive confidence threshold strategy for different insect egg types and different fecal background complexities. It dynamically adjusts the confidence threshold based on the detection category, image background complexity, and historical detection results.
[0012] Preferably, the report generation module uses a standardized automatic report generation method to summarize the test results into a standardized Excel report, and sets up a traceability mechanism for the test results; The standardized report generation method summarizes the AI detection results into a standardized Excel report, which includes the type of insect eggs, the quantity of each type of insect eggs, the scanning time, and the slide number. The traceability mechanism for detection results associates each detection record with a corresponding field-of-view image and supports backtracking verification of detection results.
[0013] Preferably, the overall workflow of the system is as follows: S1. The user configures the scanning parameters and selects the scanning mode; S2. Move to the selected focus coordinates and control the Z-axis to perform the focusing process; S3. After focusing, scan the selected area row by row and column by column, and save the acquired images, i.e. tiles, to the specified path. S4. After the scan is complete, click the recognition button. A dialog box will pop up, and the user can select the folder path. The AI recognition module will be loaded, and all tiles in the folder will be recognized in sequence. The recognition results will be output to the specified path. S5. After the recognition is completed, all results are compiled into an Excel file, and then the file path is sent back to the main process. S6. When the user clicks the "Generate Report" button, the main process reads the file and generates a data visualization report based on its content.
[0014] Therefore, the parasite egg AI intelligent identification system using the above-mentioned multi-mode scanning method has the following advantages: 1. Multi-mode scanning, supporting four modes: row-by-row, column-by-column, region, and full slide, adapting to different acquisition scenarios; 2. End-to-end automation: From slide placement to Excel report output, the entire process is unattended, reducing the scanning time for a single slide from 10-30 minutes to just a few minutes. 3. High-efficiency dual-process architecture: The C++ main process and the Python inference process are transferred through shared memory with zero copy, ensuring the real-time performance of batch scanning; 4. High-precision multi-category detection: The YOLO model covers 9 common human parasite eggs—Trichuris trichiura eggs (hereinafter referred to as whipworm eggs), Ascaris lumbricoides fertilized eggs (hereinafter referred to as ascarid eggs), Enterobius vermicularis eggs (hereinafter referred to as pinworm eggs), Schistosoma japonicum eggs (hereinafter referred to as schistosome eggs), Fasciolopsis buski eggs (hereinafter referred to as intestinal fluke eggs), Taenia solium eggs, Paragonimus westermani eggs (hereinafter referred to as lung fluke eggs), Clonorchis sinensis eggs (hereinafter referred to as liver fluke eggs), and hookworm eggs; 5. Intelligent Autofocus: Based on a sharpness evaluation function and multiple sampling strategies, it ensures that the image quality of each frame meets the inference requirements; 6. Standardized report automatically output: Test results are automatically summarized into an Excel report, which can be directly used for clinical auxiliary diagnosis.
[0015] The technical solution of the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. Attached Figure Description
[0016] Figure 1 This is an overall flowchart of the multi-mode scanning AI intelligent identification system for parasite eggs of the present invention; Figure 2 This is a flowchart of the microscope hardware control module in the multi-mode scanning AI intelligent identification system for parasite eggs of the present invention; Figure 3 This is a flowchart of the automatic focusing calculation module in the multi-mode scanning parasite egg AI intelligent identification system of the present invention; Figure 4 This is a flowchart illustrating the workflow of the multi-mode scanning AI intelligent identification system for parasite eggs according to the present invention. Detailed Implementation
[0017] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, 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, not all embodiments. The components of the embodiments of the present invention described and shown in the accompanying drawings can generally be arranged and designed in various different configurations. Specific model specifications need to be selected and determined according to the actual specifications of the device, etc. The specific selection calculation method adopts existing technology in the art, and therefore will not be described in detail.
[0018] Example; like Figures 1-4 As shown, the present invention provides a multi-mode scanning AI intelligent identification system for parasite eggs, which adopts a heterogeneous dual-process collaborative architecture, including a microscope hardware control module for acquiring images containing parasite eggs; An autofocus calculation module used for focusing and calculating image sharpness; The image is written to the shared memory area using a shared memory zero-copy mechanism, and the image data transmission module of the AI process is notified through a synchronization event. An AI recognition module used to infer the location and type of insect eggs in images; A report generation module for generating standardized reports.
[0019] The end-to-end integrated AI intelligent parasite egg recognition system architecture comprises five core modules: a microscope hardware control module, an autofocus calculation module, an image data transmission module, an AI recognition module, and a report generation module. This architecture achieves a fully automated, closed-loop process from slide placement, parameter configuration, automatic scanning and acquisition, autofocus, real-time AI inference detection, to standardized report output, unlike existing technologies that separate acquisition and inference and lack a complete closed loop.
[0020] The fully automated closed-loop workflow is as follows: After the user configures the scanning parameters and starts the scan, the system automatically completes the entire process of stage motion path planning → image acquisition per field of view → automatic focus evaluation → sharpness qualification judgment → shared memory writing → AI real-time inference → result feedback → automatic report generation after scanning is completed. The scanning time for a single slide is reduced from 10-30 minutes manually to a few minutes, and no manual intervention is required throughout the entire process.
[0021] The heterogeneous dual-process collaborative architecture consists of a C++ Qt main process and an independent Python inference process, and the shared memory communication method is suitable for Windows systems. The C++ main process is responsible for stage movement, camera acquisition, process scheduling and report generation, including the microscope hardware control module, autofocus calculation module and report generation module; The Python process is responsible for loading deep learning models for real-time inference, including the AI recognition module; The two processes collaborate through a shared memory mechanism, balancing the real-time performance of hardware control with the flexibility of AI algorithms. This architecture is not limited to a specific combination of C++ and Python, but covers heterogeneous collaboration schemes for any compiled language main process and interpreted language inference process; The C++Qt main process and the independent Python inference process exchange data through the image data transmission module.
[0022] The microscope hardware control module supports four scanning modes: row-by-row, column-by-column, region, and full slide. Region scanning is suitable for fine acquisition of a specified area, while full slide scanning is suitable for full coverage acquisition of the entire slide. The microscope hardware control module also uses a three-axis precision motion control method (XYZ) to control the movement of the stage. The C++ main process controls the movement of the microscope stage in the X, Y, and Z directions via serial communication. The X / Y axes are used for field of view traversal and area positioning, while the Z axis is used for focal plane search during autofocus. Motion control includes precise positioning, speed control, and acceleration / deceleration curve planning to ensure image acquisition stability and positioning accuracy.
[0023] The workflow of the microscope hardware control module is as follows: The microscope control module sends platform communication commands to the serial communication thread through the business module. The serial communication thread converts the platform communication commands into COM port communication commands and transmits them to the stepper motor control board. The stepper motor control board replies with the execution result to the serial communication thread, and then the serial communication thread notifies the business module of the execution result. Finally, the business module sends an interface prompt to the microscope control module.
[0024] The autofocus calculation module employs a multi-sampling strategy autofocus method, combining the generation of diamond-shaped focus sampling points and plane-shaped focus sampling points. The specific process is as follows: Generate multiple sampling points along the Z-axis with a preset step size → acquire images at each sampling point location → calculate the sharpness evaluation value of each image → determine the optimal focal plane position based on the sharpness curve; Among them, the rhombus sampling strategy generates dense sampling points in a rhombus distribution near the focusing plane, while the planar focusing sampling strategy generates sparse sampling points in a planar grid distribution during the large-scale search phase; and the sampling density and range are adaptively adjusted according to the distribution characteristics of insect eggs. It achieves graded focusing with coarse and fine adjustments. The sharpness evaluation function is used to assess the focal length quality of the image, ensuring that each acquired image meets the input requirements for AI inference.
[0025] Meanwhile, during the automatic scanning process, a multi-layer image depth fusion method is used to perform depth fusion processing on multiple Z-axis images with different focal lengths in the same field of view, ensuring that details at all levels of insect eggs of medium to small size (such as hookworm eggs, tapeworm eggs, etc.) can be clearly preserved. The depth fusion is performed automatically during the scanning process without manual intervention.
[0026] The autofocus calculation module works as follows: The autofocus module controls the Z-axis and the camera shooting process through the business module, and then judges the image with the highest image sharpness value, which is then determined to be the sharpest image.
[0027] The image data transmission module is based on Windows shared memory to achieve high-speed communication between two processes with zero copy. It enables communication between the C++ Qt main process and the independent Python inference process through a shared memory zero-copy high-speed transmission mechanism and a dual-process synchronous communication mechanism. The shared memory zero-copy high-speed transmission mechanism works as follows: after the C++ Qt main process acquires images, it directly writes them to the shared memory area, and the Python inference process directly reads the image data from the shared memory for inference, thus achieving zero-copy high-speed communication between processes. This mechanism avoids the overhead of serialization / deserialization and memory copying of image data between processes, ensuring high frame rate real-time transmission in batch scanning scenarios. The dual-process synchronization communication mechanism is a shared memory transfer mechanism, which includes shared memory region allocation, double buffering, and inter-process synchronization event notification. The double buffering mechanism uses two buffers to alternate between writing and reading, eliminating read / write conflicts. Inter-process synchronization event notification is used to notify the receiver that a new image is ready, ensuring data consistency. This synchronization communication mechanism is not limited to event objects on the Windows platform, but covers semaphores, mutexes, condition variables, and any inter-process synchronization mechanism.
[0028] In the AI recognition module, the YOLO multi-class parasite egg detection method was trained by optimizing small target parasite egg detection, image enhancement strategy with morphological constraints, category weighting mechanism, Bayesian optimization false detection filtering strategy, and parasite egg detection confidence adaptive threshold strategy. The trained YOLO multi-class parasite egg detection method can perform end-to-end localization and classification of eggs of nine common parasites (whipworm eggs, roundworm eggs, pinworm eggs, schistosome eggs, fluke eggs, tapeworm eggs, lung fluke eggs, liver fluke eggs, and hookworm eggs). The YOLO model integrates target detection and classification, directly outputting the bounding box of the egg location and the category label, which is different from the traditional two-stage "segmentation + classification" scheme.
[0029] The optimization strategy for small target insect egg detection addresses the characteristics of insect eggs under a microscope: small size, sparse distribution, and diverse morphology. It involves targeted optimization of the YOLO model, including but not limited to: adding a small target detection layer to improve the feature extraction capability of small targets, adjusting the anchor frame size to adapt to the scale range of insect eggs, using an attention mechanism to enhance the response of key features of insect eggs, and optimizing the non-maximum suppression strategy to reduce the missed detection of dense insect eggs. This optimization strategy effectively improves the detection accuracy of small target insect eggs and reduces the missed detection rate.
[0030] The image enhancement strategy that incorporates morphological constraints utilizes the inherent morphological features of insect eggs (including shape, size, outline, internal structure texture, etc.) to perform protective transformations on multiple outlines and internal structures, thereby enhancing the model's ability to extract morphological features of insect eggs. The protective transformation ensures that key diagnostic features of insect eggs are not destroyed during the enhancement process, while also improving the model's ability to identify insect eggs in complex fecal backgrounds.
[0031] To address the issue of disparate training sample sizes for different egg categories (e.g., many Ascaris eggs and few Schistosoma eggs), a category weighting mechanism is introduced. This strategy automatically calculates weights based on the proportion of samples in each category, allowing a few categories to receive higher training weights and mitigating model learning bias caused by data imbalance.
[0032] The Bayesian optimization false positive filtering strategy, based on the candidate detection boxes output by the YOLO model inference, uses a Bayesian optimization strategy to evaluate the probability of the candidate detection boxes. Combining multi-dimensional features such as morphological priors of insect eggs, size constraints, and contextual information, it distinguishes real insect eggs from non-insect egg interference objects (such as air bubbles, fibers, food residues, etc.), accurately filtering out non-insect egg targets and effectively reducing the false positive rate.
[0033] The adaptive confidence threshold strategy for insect egg detection adopts an adaptive confidence threshold strategy for different insect egg types and different fecal background complexities. It dynamically adjusts the confidence threshold based on the detection category, image background complexity, and historical detection results, thereby controlling the false detection rate while ensuring the detection rate.
[0034] The report generation module uses a standardized automatic report generation method to summarize the test results into a standardized Excel report, and sets up a traceability mechanism for the test results; The standardized report generation method summarizes the AI detection results into a standardized Excel report, which includes information such as the type of insect eggs, the quantity of each type of insect eggs, the scanning time, and the slide number. The traceability mechanism for detection results associates each detection record with a corresponding field-of-view image and supports backtracking verification of detection results.
[0035] Clinical staff can click on the test records in the report to view the corresponding original microscopic images and test box annotations, enabling manual review of AI-assisted diagnostic results.
[0036] The overall workflow of the system is as follows: S1. The user configures the scanning parameters and selects the scanning mode; S2. Move to the selected focus coordinates and control the Z-axis to perform the focusing process; S3. After focusing, scan the selected area row by row and column by column, and save the acquired images, i.e. tiles, to the specified path. S4. After the scan is complete, click the recognition button. A dialog box will pop up, and the user can select the folder path. The AI recognition module will be loaded, and all tiles in the folder will be recognized in sequence. The recognition results will be output to the specified path. S5. After the recognition is completed, all results are compiled into an Excel file, and then the file path is sent back to the main process. S6. When the user clicks the "Generate Report" button, the main process reads the file and generates a data visualization report based on its content.
[0037] Therefore, the multi-mode scanning AI intelligent identification system for parasite eggs in this invention has the following advantages: 1. Multi-mode scanning, supporting four modes: row-by-row, column-by-column, region, and full slide, adapting to different acquisition scenarios; 2. End-to-end automation: From slide placement to Excel report output, the entire process is unattended, reducing the scanning time for a single slide from 10-30 minutes to just a few minutes. 3. High-efficiency dual-process architecture: The C++ main process and the Python inference process are transferred through shared memory with zero copy, ensuring the real-time performance of batch scanning; 4. High-precision multi-category detection: The YOLO model covers 9 common human parasite eggs—Trichuris trichiura eggs (hereinafter referred to as whipworm eggs), Ascaris lumbricoides fertilized eggs (hereinafter referred to as ascarid eggs), Enterobius vermicularis eggs (hereinafter referred to as pinworm eggs), Schistosoma japonicum eggs (hereinafter referred to as schistosome eggs), Fasciolopsis buski eggs (hereinafter referred to as intestinal fluke eggs), Taenia solium eggs, Paragonimus westermani eggs (hereinafter referred to as lung fluke eggs), Clonorchis sinensis eggs (hereinafter referred to as liver fluke eggs), and hookworm eggs; 5. Intelligent Autofocus: Based on a sharpness evaluation function and multiple sampling strategies, it ensures that the image quality of each frame meets the inference requirements; 6. Standardized report automatically output: Test results are automatically summarized into an Excel report, which can be directly used for clinical auxiliary diagnosis.
[0038] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit them. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can still be made to the technical solutions of the present invention, and these modifications or equivalent substitutions cannot cause the modified technical solutions to deviate from the spirit and scope of the technical solutions of the present invention.
Claims
1. A multi-mode scanning AI intelligent identification system for parasite eggs, characterized in that: A heterogeneous dual-process collaborative architecture is adopted, including a microscope hardware control module for acquiring images containing parasite eggs; An autofocus calculation module used for focusing and calculating image sharpness; The image is written to the shared memory area using a shared memory zero-copy mechanism, and the image data transmission module of the AI process is notified through a synchronization event. An AI recognition module used to infer the location and type of insect eggs in images; A report generation module for generating standardized reports.
2. The multi-mode scanning AI intelligent identification system for parasite eggs according to claim 1, characterized in that: The heterogeneous dual-process collaborative architecture consists of a C++ Qt main process and an independent Python inference process; The C++ main process is responsible for stage movement, camera acquisition, process scheduling and report generation, including the autofocus calculation module; The Python process is responsible for loading deep learning models for real-time inference, including the AI recognition module; The C++Qt main process and the independent Python inference process exchange data through the image data transmission module.
3. The multi-mode scanning AI intelligent identification system for parasite eggs according to claim 2, characterized in that: The microscope hardware control module supports four scanning modes: row-by-row, column-by-column, region, and full slide. Region scanning is suitable for fine acquisition of a specified area, while full slide scanning is suitable for full coverage acquisition of the entire slide. The microscope hardware control module also uses a three-axis precision motion control method (XYZ) to control the movement of the stage. The C++ main process controls the movement of the microscope stage in the X, Y, and Z directions via serial communication. The X / Y axes are used for field of view traversal and area positioning, while the Z axis is used for focal plane search during autofocus.
4. The multi-mode scanning AI intelligent identification system for parasite eggs according to claim 3, characterized in that, The workflow of the microscope hardware control module is as follows: The microscope control module sends platform communication commands to the serial communication thread through the business module. The serial communication thread converts the platform communication commands into COM port communication commands and transmits them to the stepper motor control board. The stepper motor control board replies with the execution result to the serial communication thread, and then the serial communication thread notifies the business module of the execution result. Finally, the business module sends an interface prompt to the microscope control module.
5. The multi-mode scanning AI intelligent identification system for parasite eggs according to claim 4, characterized in that: The autofocus calculation module employs a multi-sampling strategy autofocus method, combining the generation of diamond-shaped focus sampling points and plane-shaped focus sampling points. The specific process is as follows: Generate multiple sampling points along the Z-axis with a preset step size → acquire images at each sampling point location → calculate the sharpness evaluation value of each image → determine the optimal focal plane position based on the sharpness curve; Among them, the rhombus sampling strategy generates dense sampling points in a rhombus distribution near the focusing plane, while the planar focusing sampling strategy generates sparse sampling points in a planar grid distribution during the large-scale search phase; and the sampling density and range are adaptively adjusted according to the distribution characteristics of insect eggs. Meanwhile, during the automatic scanning process, a multi-layer image depth-of-field fusion method is used to perform depth-of-field fusion processing on multiple Z-axis images with different focal lengths in the same field of view, ensuring that details at all levels of insect eggs of medium to small size and above can be clearly preserved.
6. The multi-mode scanning AI intelligent identification system for parasite eggs according to claim 5, characterized in that, The autofocus calculation module works as follows: The autofocus module controls the Z-axis and the camera shooting process through the business module, and then judges the image with the highest image sharpness value, which is then determined to be the sharpest image.
7. The multi-mode scanning AI intelligent identification system for parasite eggs according to claim 6, characterized in that: The image data transmission module is based on Windows shared memory to achieve high-speed communication between two processes with zero copy. It enables communication between the C++ Qt main process and the independent Python inference process through a shared memory zero-copy high-speed transmission mechanism and a dual-process synchronous communication mechanism. The working process of the shared memory zero-copy high-speed transmission mechanism is as follows: after the C++ Qt main process acquires the image, it directly writes it to the shared memory area, and the Python inference process directly reads the image data from the shared memory for inference, thus realizing zero-copy high-speed communication between processes. The dual-process synchronous communication mechanism is a shared memory transmission mechanism, which includes shared memory region allocation, double buffering mechanism and inter-process synchronization event notification. The double buffering mechanism uses two buffers to alternate writing and reading; the inter-process synchronization event notification is used to notify the receiver that a new image is ready.
8. The multi-mode scanning AI intelligent identification system for parasite eggs according to claim 7, characterized in that: In the AI recognition module, the YOLO multi-class parasite egg detection method was trained by optimizing small target parasite egg detection, image enhancement strategy with morphological constraints, category weighting mechanism, Bayesian optimization false detection filtering strategy, and parasite egg detection confidence adaptive threshold strategy. The trained YOLO multi-category parasite egg detection method can perform end-to-end localization and classification identification of eggs of nine common parasites. The optimization strategy for small target insect egg detection addresses the characteristics of insect eggs under a microscope: small size, sparse distribution, and diverse morphology. It optimizes the YOLO model accordingly. This includes adding a small target detection layer to improve the feature extraction capability of small targets, adjusting the anchor frame size to adapt to the scale range of insect eggs, using an attention mechanism to enhance the response of key features of insect eggs, and optimizing the non-maximum suppression strategy to reduce the missed detection of dense insect eggs. The image enhancement strategy that integrates morphological constraints utilizes the inherent morphological features of insect eggs to perform protective transformations on multiple contours and internal structures, thereby enhancing the model's ability to extract morphological features of insect eggs. To address the issue of disparate training sample sizes for different egg categories, a category-weighted mechanism is introduced, which automatically calculates weights based on the proportion of samples in each category. The Bayesian optimization false detection filtering strategy, based on the candidate detection boxes output by the YOLO model inference, uses a Bayesian optimization strategy to evaluate the probability of the candidate detection boxes, and combines multi-dimensional features to distinguish between real insect eggs and non-insect egg interference, and accurately filters out non-insect egg targets. The adaptive confidence threshold strategy for insect egg detection adopts an adaptive confidence threshold strategy for different insect egg types and different fecal background complexities. It dynamically adjusts the confidence threshold based on the detection category, image background complexity, and historical detection results.
9. The multi-mode scanning AI intelligent identification system for parasite eggs according to claim 8, characterized in that: The report generation module uses a standardized automatic report generation method to summarize the test results into a standardized Excel report, and sets up a traceability mechanism for the test results; The standardized report generation method summarizes the AI detection results into a standardized Excel report, which includes the type of insect eggs, the quantity of each type of insect eggs, the scanning time, and the slide number. The traceability mechanism for detection results associates each detection record with a corresponding field-of-view image and supports backtracking verification of detection results.
10. The multi-mode scanning AI intelligent identification system for parasite eggs according to claim 9, characterized in that, The overall workflow of the system is as follows: S1. The user configures the scanning parameters and selects the scanning mode; S2. Move to the selected focus coordinates and control the Z-axis to perform the focusing process; S3. After focusing, scan the selected area row by row and column by column, and save the acquired images, i.e. tiles, to the specified path. S4. After the scan is complete, click the recognition button. A dialog box will pop up, and the user can select the folder path. The AI recognition module will be loaded, and all tiles in the folder will be recognized in sequence. The recognition results will be output to the specified path. S5. After the recognition is completed, all results are compiled into an Excel file, and then the file path is sent back to the main process. S6. When the user clicks the "Generate Report" button, the main process reads the file and generates a data visualization report based on its content.
