A microorganism identification and counting method based on deep learning and quantum dot dyeing technology
Patent Information
- Application Number
- CN202611148452.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-30
- Publication Date
- 2026-10-09
AI Technical Summary
[0003]传统图像处理:基于阈值分割、形态学操作、轮廓提取等方法,容易受图像质量、光照、背景干扰影响,鲁棒性差
[0044]相对于现有技术,本发明具有如下优点,本发明的保护核心在于一套集成了改进算法、系统架构与处理流程的完整技术方案,旨在寻求多层次的全面保护。具体保护点包括但不限于:
Smart Images

Figure CN122887874A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to a method, specifically a microbial identification and counting method based on deep learning and quantum dot staining technology, belonging to the interdisciplinary field of computer vision, deep learning and biological image processing. In particular, it relates to a multi-model collaborative processing system based on the ONNX inference engine, which is suitable for intelligent detection, identification, counting and analysis of microbial images, and can be extended to fields such as industrial quality inspection and medical image analysis. Background Technology
[0002] Currently, microbial image recognition mainly relies on the following technologies:
[0003] Traditional image processing methods, such as threshold segmentation, morphological operations, and contour extraction, are easily affected by image quality, lighting, and background interference, resulting in poor robustness.
[0004] Machine learning methods, such as SVM and random forest, require manually designed features and have limited generalization ability.
[0005] Deep learning models, such as Faster R-CNN, YOLO series, and DETR, perform well in object detection, but still have problems with missed detections and false detections in scenarios with small or dense objects.
[0006] This invention aims to solve the above problems and provides an end-to-end intelligent image processing system with the following capabilities:
[0007] Based on multi-model collaborative reasoning, the target detection model, combined with the recognition model, accurately locates the target before analysis and recognition, making it less susceptible to background interference and highly robust. Furthermore, it is trained based on bacterial morphology, eliminating the need for human-defined features and exhibiting strong generalization ability. The traditional YOLOv8 algorithm has been modified, reducing the number of parameters and computation by approximately 60%, and it is also friendly to small targets. This architecture is optimized for small targets such as microorganisms and is suitable for running on resource-constrained devices. Summary of the Invention
[0008] This invention addresses the technical problems existing in the prior art by providing a microbial identification and counting method based on deep learning and quantum dot staining technology. This technical solution uses a deep learning model to achieve automatic detection, identification, and counting of microbial images (especially Escherichia coli and Staphylococcus aureus).
[0009] To achieve the above objectives, the technical solution of the present invention is as follows: a microbial identification and counting method based on deep learning and quantum dot staining technology, the method comprising the following steps:
[0010] Step 1: Image Input: Acquire and import microscopic images of microorganisms after quantum dot staining. The standard image resolution is 2048*2448.
[0011] Step 2, Target Detection: Using a self-developed and improved YOLOv8s detection network, locate all quantum dot-stained microbial targets within the image;
[0012] Step 3: Overlapping Segmentation Adaptive Training and Inference: An overlap segmentation strategy is used to complete the adaptive training of the model and image inference, solving the problem of dense overlap of microorganisms in microscopic images;
[0013] Step 4: Identification Model Determination: Based on the trained deep learning model, the detected microbial targets are identified and classified.
[0014] Step 5: Post-processing and result fusion: Integrate, deduplicate, and correct the output results of multiple slices and detection frames to finally output accurate microbial identification and counting results.
[0015] 2. The microbial identification and counting method based on deep learning and quantum dot staining technology according to claim 1, characterized in that, step 1, image input: the input image is a microscopic image of microorganisms stained with quantum dots, typically with a resolution of 2048*2448.
[0016] 3. The microbial identification and counting method based on deep learning and quantum dot staining technology according to claim 2, characterized in that step 2, target detection, is as follows:
[0017] (a) Network lightweighting: Depth + width collaborative compression to reduce computing power consumption
[0018] To address the pain points of insufficient computing power and GPU memory in edge devices, a depth-width collaborative compression algorithm is designed to simplify the network from two dimensions:
[0019] Network deep compression: The backbone network is converged to the third stage C3 / 8, which shortens the overall number of network layers and reduces the computational cost of layer-by-layer iteration;
[0020] Network bandwidth compression: The number of channels in each layer of the network is strictly controlled, and the number of channels in each layer is much lower than that in the standard YOLOv8s model;
[0021] The effects of compression: It simultaneously and significantly reduces the total number of model parameters and floating-point computations (FLOPs), reduces the device's memory usage, significantly improves image inference speed, and is suitable for deployment on low-computing-power edge terminals.
[0022] (ii) Optimization of specific structures for microbial targets
[0023] Microbial cells in microscopic images are typical tiny targets. The network feature layer structure was modified accordingly: a deep feature stage was specially added to adapt to the detection of small targets, and the P4 and P5 feature layers were used to extract fine-grained bacterial cell features, amplifying the outline and fluorescence features of tiny quantum dot-stained bacterial cells, so as to avoid missed or false detection of small microorganisms.
[0024] (iii) Retain and integrate the efficient feature extraction module to ensure detection accuracy.
[0025] While maintaining lightweight network compression, the two core modules validated in YOLOv8s are retained, balancing lightweight design with detection accuracy:
[0026] C2f: A multi-branch gradient flow structure that enriches the dimensions of image feature extraction, enhances the expression of fluorescence and edge features of quantum dot-stained bacteria, and distinguishes bacteria from background impurities;
[0027] SPPF: Multi-scale continuous pooling operation, which integrates image context information from different receptive fields, can capture details of individual microorganisms as well as obtain overall features of bacterial aggregation areas, solving the problem of distinguishing densely overlapping bacterial cells.
[0028] (iv) Overall Detection Execution Logic
[0029] The 2048*2448 quantum dot-stained microscopic image of microorganisms is input into the improved YOLOv8s network mentioned above. Features are extracted by the lightweight backbone network (C3 / 8 stage), and feature enhancement and multi-scale fusion are completed by the C2f and SPPF modules. Then, all quantum dot-stained microorganisms in the image are located through the P4 and P5 small target feature layers. The detection box and confidence of each microbial target are output to complete the localization of microbial targets in the whole image. The detection results are then sent to the next stage of overlapping segmentation and inference process.
[0030] Step 3, Adaptive Training and Inference Based on Overlapping Segmentation, addresses the challenge posed by the extremely small size and dense distribution of microbial targets in high-resolution microscopic images. We designed and adopted an adaptive training and inference strategy based on overlapping segmentation. Specifically, the original large-size input image is systematically segmented into multiple 640×640 pixel standard sub-images (Patches) using a sliding window approach. A 40-pixel overlap region is set between adjacent sub-images to ensure target integrity and effectively prevent missed detections. The image is then scaled to the model's preset optimal input scale (640×640) for processing. This avoids the distortion of microbial target morphology and blurring of details caused by directly scaling the entire large image to a small size, thus ensuring the quality of the input data from the source and laying the foundation for the model to achieve optimal detection performance.
[0031] In step 4, the recognition model, after obtaining all targets in the image, performs an initial screening based on the common size of microorganisms, retaining detection boxes with pixel areas within the threshold, removing larger impurity blocks, then cropping each retained target region, and finally using the ResNet50 model for fine classification, outputting: live bacteria, dead bacteria, impurities, and classification confidence.
[0032] Step 5, post-processing, and result fusion are detailed below. After the block detection process is completed, the system enters the crucial post-processing and result fusion stage. This stage aims to fuse the preliminary detection results scattered across various sub-images into an accurate and non-redundant final report corresponding to the original large image. This process mainly consists of three core steps: Coordinate restoration and global mapping: The system first establishes the spatial identity of each detected target box. By recording the starting coordinates (X, Y) of each sub-image in the original image, and using the principle of affine transformation, the predicted box coordinates (x_min, y_min, x_max, y_max) in the local coordinate system of the sub-image are accurately mapped back to the global coordinate system. This step ensures that regardless of which block the target appears in, its position information in the large image can be restored without loss and accurately. Redundancy removal and result deduplication: Due to the overlapping segmentation strategy, overlapping areas of adjacent sub-images can cause the same microbial target to be repeatedly detected in multiple blocks, resulting in a large number of redundant boxes. To efficiently address this issue, the system employs a Non-Maximum Suppression (NMS) algorithm. This algorithm first sorts all detection boxes based on their prediction confidence, then recursively selects the box with the highest confidence and suppresses other redundant boxes whose Intersection over Union (IoU) exceeds a set threshold (e.g., 0.45). This process effectively eliminates duplicate predictions, ensuring that each target is identified by only one most accurate bounding box. Results Statistics and Structured Output: After deduplication, the system performs structured processing and statistical analysis on the final set of detection boxes. First, it automatically classifies and counts the boxes based on their category labels, generating statistical results for each category. Then, the system outputs a structured report containing the following information: Visualized Annotated Image: All detection boxes and category labels are drawn on the original image, visually displaying the detection results; Detailed Data File: A report in JSON or CSV format is generated, recording the precise coordinates, category, and confidence information of each target; Classification Statistical Summary: Statistics such as the total number and percentage of each type of microorganism are provided, offering direct data support for subsequent analysis.
[0033] A microbial identification and counting system based on deep learning and quantum dot staining technology, the system comprising:
[0034] The image input module receives microscopic images of microorganisms uploaded by users and performs standardized preprocessing.
[0035] An improved YOLOv8s detection model performs inference on the entire image to detect all potential microbial target regions;
[0036] For each detected target area, the ResNet50 recognition model is used for fine classification to distinguish between live and dead bacteria and impurities;
[0037] The post-processing module performs deduplication, filtering, and coordinate restoration on the detection results;
[0038] The results generation module outputs the final recognition results, including:
[0039] Visualized images with labeled boxes, statistical results of microbial classification, and LabelMe format files that can be imported into the annotation tool.
[0040] To ensure the system's stability, scalability, and real-time user interaction under high-concurrency scenarios, we designed and implemented a highly efficient and robust task scheduling and communication framework. High-performance RESTful interfaces based on FastAPI: The core entry point for system interaction is built using the advanced FastAPI framework. This interface provides a series of well-defined RESTful APIs (such as ` / start-processing / `) for receiving batch image processing tasks submitted by users. Full-duplex real-time progress push based on WebSocket: To overcome the shortcomings of traditional HTTP request-response patterns in querying the status of long tasks (such as latency and server pressure caused by polling), the WebSocket protocol was introduced. Once a task is submitted via the REST API, the system immediately returns a unique `task_id`. The client can establish a persistent WebSocket connection using this ID to subscribe to the real-time processing status of the task. The server proactively and with low latency pushes processing progress (such as the number of processed images / total number of images), current status ("queuing", "processing", "completed", "failed"), and intermediate results to the client. This publish-subscribe model provides users with near real-time progress feedback, greatly improving the user experience. The above scheme features a lightweight backbone design: by reducing the number of channels and layers, it significantly reduces computational cost while maintaining detection accuracy; multi-scale feature fusion: it utilizes the SPPF module to enhance the detection capability of targets at different scales, making it particularly suitable for detecting small targets such as microorganisms; and a dual-model collaborative mechanism: the detection model and the recognition model are separated and can be optimized or replaced individually as needed.
[0041] Adaptive image processing: Supports large image block processing, avoiding memory overflow while ensuring detection accuracy.
[0042] An electronic device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor is capable of executing the program to implement the microbial identification and counting method based on deep learning and quantum dot staining technology.
[0043] A computer-readable storage medium having computer instructions stored thereon, which, when executed by a processor, implement a microbial identification and counting method based on deep learning and quantum dot staining technology.
[0044] Compared to existing technologies, this invention has the following advantages: the core of its protection lies in a complete technical solution integrating improved algorithms, system architecture, and processing flow, aiming to achieve multi-layered comprehensive protection. Specific protection points include, but are not limited to:
[0045] System Architecture and Module Design: Protect the overall architecture of the microbial image processing system based on the combination of the improved YOLOv8s lightweight backbone network (Micro-YOLOv8) and the ResNet50 recognition model; protect the complete modular design including dual-model collaborative inference, post-processing fusion, task scheduling and real-time communication;
[0046] Core algorithm and model improvements: Protect the specific network structure of YOLOv8MicroBackbone, including the reduced configuration of its number of layers and channels (such as make_divisible(64 / 128 / 256)), and the specific design of adjusting the number of Bottlenecks in the C2f module to 3 and 6;
[0047] Data processing and workflow methods: This includes a workflow method that executes detection and identification in stages: first, using a target detection model to locate the target, then cropping candidate regions and feeding them into a classification model for refined identification. It also protects a WebSocket-based method for real-time task progress pushing and its application in asynchronous processing in collaboration with REST interfaces. Finally, it protects dynamic task scheduling and resource management methods, including task queues based on a producer-consumer model, thread pool scheduling, and model timeout release mechanisms.
[0048] Application scenario: Protecting the system's application in microbial microscopic image recognition and counting.
[0049] The advantages of this invention lie in its use of AI-based microbial fingerprint recognition, which significantly reduces detection time to within 30 minutes, achieving non-destructive and efficient detection. The design is intuitive, allowing for independent operation after basic training, requiring no specialized skills, thus improving detection efficiency and accessibility. The detection range is wide, from 10^1 to 10^9 CFU / ml, ensuring accurate detection even of minute concentration changes.
[0050] In disease control scenarios: non-destructive testing of live bacteria, because only live bacteria can be used as a reference for culture dishes. ATP and mass spectrometry cannot detect only live bacteria, thus meeting the essential application needs of disease control to distinguish between live and dead bacteria.
[0051] Hospital spot checks: distinguishing between live and dead bacteria and counting them. The status of dead bacteria can be used to assess whether disinfection was carried out before sampling, as well as to evaluate the effectiveness of daily disinfection. This plays a key role in sample traceability and evaluation.
[0052] In hospital infection control scenarios, different bacteria require different culture dishes, which is labor-intensive, resource-intensive, and complex. For example, difficult-to-culture bacteria like Mycobacterium tuberculosis require 30 days to culture using specific culture dishes; Legionella often fails to culture at all, delaying the optimal time for effective intervention. The AI quantum dot microbial detection platform can quickly and accurately detect active pathogens that are difficult or impossible to culture using traditional methods within 30 minutes.
[0053] In medical and biopharmaceutical settings: Perfectly adaptable to complex environments such as hand hygiene, surfaces, air, water, flexible endoscopes, dialysis water, and chair water, it can intelligently eliminate interference, accurately distinguish bacteria / microorganisms from impurities and dust, pinpoint true pathogens, and ensure biosafety. In GMP workshops in the biopharmaceutical field, it has an ultra-low detection limit (1 CFU / ml), meeting the requirements of Class 100,000 cleanrooms. Attached Figure Description
[0054] Figure 1 This is a flowchart for microbial detection and identification.
[0055] Figure 2 Flowchart for Web service processing and task scheduling. Detailed Implementation
[0056] To enhance understanding of the present invention, the embodiments will be described in detail below with reference to the accompanying drawings.
[0057] Example 1: A microbial identification and counting method based on deep learning and quantum dot staining technology, the method comprising the following steps:
[0058] Step 1: Image Input: Acquire and import microscopic images of microorganisms after quantum dot staining. The standard image resolution is 2048*2448.
[0059] Step 2, Target Detection: Using a self-developed and improved YOLOv8s detection network, locate all quantum dot-stained microbial targets within the image;
[0060] Step 3: Overlapping Segmentation Adaptive Training and Inference: An overlap segmentation strategy is used to complete the adaptive training of the model and image inference, solving the problem of dense overlap of microorganisms in microscopic images;
[0061] Step 4: Identification Model Determination: Based on the trained deep learning model, the detected microbial targets are identified and classified.
[0062] Step 5: Post-processing and result fusion: Integrate, deduplicate, and correct the output results of multiple slices and detection frames to finally output accurate microbial identification and counting results.
[0063] 2. The microbial identification and counting method based on deep learning and quantum dot staining technology according to claim 1, characterized in that, step 1, image input: the input image is a microscopic image of microorganisms stained with quantum dots, typically with a resolution of 2048*2448.
[0064] 3. The microbial identification and counting method based on deep learning and quantum dot staining technology according to claim 2, characterized in that step 2, target detection, is as follows:
[0065] (a) Network lightweighting: Depth + width collaborative compression to reduce computing power consumption
[0066] To address the pain points of insufficient computing power and GPU memory in edge devices, a depth-width collaborative compression algorithm is designed to simplify the network from two dimensions:
[0067] Network deep compression: The backbone network is converged to the third stage C3 / 8, which shortens the overall number of network layers and reduces the computational cost of layer-by-layer iteration;
[0068] Network bandwidth compression: The number of channels in each layer of the network is strictly controlled, and the number of channels in each layer is much lower than that in the standard YOLOv8s model;
[0069] The effects of compression: It simultaneously and significantly reduces the total number of model parameters and floating-point computations (FLOPs), reduces the device's memory usage, significantly improves image inference speed, and is suitable for deployment on low-computing-power edge terminals.
[0070] (ii) Optimization of specific structures for microbial targets
[0071] Microbial cells in microscopic images are typical tiny targets. The network feature layer structure was modified accordingly: a deep feature stage was specially added to adapt to the detection of small targets, and the P4 and P5 feature layers were used to extract fine-grained bacterial cell features, amplifying the outline and fluorescence features of tiny quantum dot-stained bacterial cells, so as to avoid missed or false detection of small microorganisms.
[0072] (iii) Retain and integrate the efficient feature extraction module to ensure detection accuracy.
[0073] While maintaining lightweight network compression, the two core modules validated in YOLOv8s are retained, balancing lightweight design with detection accuracy:
[0074] C2f: A multi-branch gradient flow structure that enriches the dimensions of image feature extraction, enhances the expression of fluorescence and edge features of quantum dot-stained bacteria, and distinguishes bacteria from background impurities;
[0075] SPPF: Multi-scale continuous pooling operation, which integrates image context information from different receptive fields, can capture details of individual microorganisms as well as obtain overall features of bacterial aggregation areas, solving the problem of distinguishing densely overlapping bacterial cells.
[0076] (iv) Overall Detection Execution Logic
[0077] The 2048*2448 quantum dot-stained microscopic image of microorganisms is input into the improved YOLOv8s network mentioned above. Features are extracted by the lightweight backbone network (C3 / 8 stage), and feature enhancement and multi-scale fusion are completed by the C2f and SPPF modules. Then, all quantum dot-stained microorganisms in the image are located through the P4 and P5 small target feature layers. The detection box and confidence of each microbial target are output to complete the localization of microbial targets in the whole image. The detection results are then sent to the next stage of overlapping segmentation and inference process.
[0078] Step 3, Adaptive Training and Inference Based on Overlapping Segmentation, addresses the challenge posed by the extremely small size and dense distribution of microbial targets in high-resolution microscopic images. We designed and adopted an adaptive training and inference strategy based on overlapping segmentation. Specifically, the original large-size input image is systematically segmented into multiple 640×640 pixel standard sub-images (Patches) using a sliding window approach. A 40-pixel overlap region is set between adjacent sub-images to ensure target integrity and effectively prevent missed detections. The image is then scaled to the model's preset optimal input scale (640×640) for processing. This avoids the distortion of microbial target morphology and blurring of details caused by directly scaling the entire large image to a small size, thus ensuring the quality of the input data from the source and laying the foundation for the model to achieve optimal detection performance.
[0079] In step 4, the recognition model, after obtaining all targets in the image, performs an initial screening based on the common size of microorganisms, retaining detection boxes with pixel areas within the threshold, removing larger impurity blocks, then cropping each retained target region, and finally using the ResNet50 model for fine classification, outputting: live bacteria, dead bacteria, impurities, and classification confidence.
[0080] Step 5, post-processing, and result fusion are detailed below. After the block detection process is completed, the system enters the crucial post-processing and result fusion stage. This stage aims to fuse the preliminary detection results scattered across various sub-images into an accurate and non-redundant final report corresponding to the original large image. This process mainly consists of three core steps: Coordinate restoration and global mapping: The system first establishes the spatial identity of each detected target box. By recording the starting coordinates (X, Y) of each sub-image in the original image, and using the principle of affine transformation, the predicted box coordinates (x_min, y_min, x_max, y_max) in the local coordinate system of the sub-image are accurately mapped back to the global coordinate system. This step ensures that regardless of which block the target appears in, its position information in the large image can be restored without loss and accurately. Redundancy removal and result deduplication: Due to the overlapping segmentation strategy, overlapping areas of adjacent sub-images can cause the same microbial target to be repeatedly detected in multiple blocks, resulting in a large number of redundant boxes. To efficiently address this issue, the system employs a Non-Maximum Suppression (NMS) algorithm. This algorithm first sorts all detection boxes based on their prediction confidence, then recursively selects the box with the highest confidence and suppresses other redundant boxes whose Intersection over Union (IoU) exceeds a set threshold (e.g., 0.45). This process effectively eliminates duplicate predictions, ensuring that each target is identified by only one most accurate bounding box. Results Statistics and Structured Output: After deduplication, the system performs structured processing and statistical analysis on the final set of detection boxes. First, it automatically classifies and counts the boxes based on their category labels, generating statistical results for each category. Then, the system outputs a structured report containing the following information: Visualized Annotated Image: All detection boxes and category labels are drawn on the original image, visually displaying the detection results; Detailed Data File: A report in JSON or CSV format is generated, recording the precise coordinates, category, and confidence information of each target; Classification Statistical Summary: Statistics such as the total number and percentage of each type of microorganism are provided, offering direct data support for subsequent analysis.
[0081] Example 2: A microbial identification and counting system based on deep learning and quantum dot staining technology, the system comprising:
[0082] The image input module receives microscopic images of microorganisms uploaded by users and performs standardized preprocessing.
[0083] An improved YOLOv8s detection model performs inference on the entire image to detect all potential microbial target regions;
[0084] For each detected target area, the ResNet50 recognition model is used for fine classification to distinguish between live and dead bacteria and impurities;
[0085] The post-processing module performs deduplication, filtering, and coordinate restoration on the detection results;
[0086] The results generation module outputs the final recognition results, including:
[0087] Visualized images with labeled boxes, statistical results of microbial classification, and LabelMe format files that can be imported into the annotation tool.
[0088] To ensure the stability, scalability, and real-time user interaction of the system under high concurrency scenarios, we designed and implemented an efficient and robust task scheduling and communication framework.
[0089] High-performance RESTful interface based on FastAPI: The core entry point for system interaction is built using the advanced FastAPI framework. This interface provides a series of well-defined RESTful APIs (such as ` / start-processing / `) for receiving batch image processing tasks submitted by users. Full-duplex real-time progress push based on WebSocket: To overcome the shortcomings of traditional HTTP request-response patterns in querying the status of long tasks (such as latency and server pressure caused by polling), we introduced the WebSocket protocol. Once a task is submitted via the REST API, the system immediately returns a unique `task_id`. The client can establish a persistent WebSocket connection using this ID to subscribe to the real-time processing status of the task. The server proactively and with low latency pushes processing progress (such as the number of processed images / total number of images), current status ("queuing", "processing", "completed", "failed"), and intermediate results to the client. This publish-subscribe pattern provides users with near real-time progress feedback, greatly improving the user experience.
[0090] The above solution features a lightweight backbone design: by reducing the number of channels and layers, it significantly reduces computational load while maintaining detection accuracy;
[0091] Multi-scale feature fusion: The SPPF module enhances the detection capability of targets at different scales, which is particularly suitable for the detection of small targets such as microorganisms;
[0092] Dual-model collaborative mechanism: The detection model and the recognition model are separated and can be optimized or replaced separately as needed;
[0093] Adaptive image processing: Supports large image block processing, avoiding memory overflow while ensuring detection accuracy.
[0094] Example 3: In the experimental phase, microbial experiments were conducted at the Air Force General Hospital. 1 mL of samples of *E. coli* and *Staphylococcus aureus* were placed in quantum dot-labeled reagent, shaken, mixed, and stained. Microscopic images of the microbial samples were then acquired and input into the identification system for detection. The test results showed 885 *E. coli* and 225 *S. aureus*. The culture dish results for *E. coli* and *S. aureus* were 880 and 225, respectively. The test accuracy was above 90%.
[0095] It should be noted that the above embodiments are not intended to limit the scope of protection of the present invention. Equivalent transformations or substitutions made based on the above technical solutions all fall within the scope of protection of the claims of the present invention.
Claims
1. A method for microbial identification and counting based on deep learning and quantum dot staining technology, characterized in that, The method includes the following steps: Step 1: Image Input: Acquire and import microscopic images of microorganisms after quantum dot staining. The standard image resolution is 2048*2448. Step 2, Target Detection: Using a self-developed and improved YOLOv8s detection network, locate all quantum dot-stained microbial targets within the image; Step 3: Overlapping Segmentation Adaptive Training and Inference: An overlap segmentation strategy is used to complete the adaptive training of the model and image inference, solving the problem of dense overlap of microorganisms in microscopic images; Step 4: Identification Model Determination: Based on the trained deep learning model, the detected microbial targets are identified and classified. Step 5: Post-processing and result fusion: Integrate, deduplicate, and correct the output results of multiple slices and detection frames to finally output accurate microbial identification and counting results.
2. The microbial identification and counting method based on deep learning and quantum dot staining technology according to claim 1, characterized in that, Step 1, Image Input: The input image is a microscopic image of microorganisms stained with quantum dots, with a resolution of 2048*2448.
3. The microbial identification and counting method based on deep learning and quantum dot staining technology according to claim 2, characterized in that, Step 2, target detection, as follows: (a) Network lightweighting: collaborative compression of depth and width to reduce computing power consumption. To address the pain points of insufficient computing power and GPU memory in edge devices, a depth-width collaborative compression algorithm is designed to simplify the network from two dimensions: Network deep compression: The backbone network is converged to the third stage C3 / 8, which shortens the overall number of network layers and reduces the computational cost of layer-by-layer iteration; Network width compression: The number of channels in each layer of the network is strictly controlled, and the number of channels in each layer is much lower than that in the standard YOLOv8s model; The effects of compression include: a significant reduction in the total number of model parameters and floating-point computations (FLOPs), a decrease in device memory usage, a substantial improvement in image inference speed, and suitability for deployment on low-computing-power edge terminals. (ii) Optimization of specific structures for microbial targets. (III) Microbial cells in microscopic images are typical tiny targets. Therefore, the network feature layer structure was specifically modified: a deep feature stage adapted for small target detection was added, and the P4 and P5 feature layers were used to extract fine-grained bacterial cell features. The outline and fluorescence features of the tiny quantum dot-stained cells were amplified to avoid missed or false detections of small microorganisms. (iii) Retain and integrate efficient feature extraction modules to ensure detection accuracy. While maintaining lightweight network compression, the two core modules validated in YOLOv8s are retained, balancing lightweight design with detection accuracy: C2f: A multi-branch gradient flow structure that enriches the dimensions of image feature extraction, enhances the expression of fluorescence and edge features of quantum dot-stained bacteria, and distinguishes bacteria from background impurities; SPPF: Multi-scale continuous pooling operation, which fuses image context information from different receptive fields, can capture both the details of individual microorganisms and the overall features of bacterial aggregation regions, solving the problem of distinguishing densely overlapping bacterial cells. (iv) Overall detection execution logic, The 2048*2448 quantum dot-stained microscopic image of microorganisms is input into the improved YOLOv8s network mentioned above. Features are extracted by the lightweight backbone network (C3 / 8 stage), and feature enhancement and multi-scale fusion are completed by the C2f and SPPF modules. Then, all quantum dot-stained microorganisms in the image are located through the P4 and P5 small target feature layers. The detection box and confidence of each microbial target are output to complete the localization of microbial targets in the whole image. The detection results are then sent to the next stage of overlapping segmentation and inference process.
4. The microbial identification and counting method based on deep learning and quantum dot staining technology according to claim 3, characterized in that, Step 3: Adaptive training and inference based on overlapping segmentation. Specifically, the original large-size input image is systematically segmented into multiple standard sub-images of 640×640 pixels using a sliding window. A 40-pixel overlap region is set between adjacent sub-images. The image is then scaled to the optimal input scale (640×640) preset by the model for processing.
5. The microbial identification and counting method based on deep learning and quantum dot staining technology according to claim 2, characterized in that, Step 4: After obtaining all targets in the image, the model will perform an initial screening based on the common size of microorganisms, retaining detection boxes with pixel areas within the threshold and removing larger impurity blocks. Then, each retained target region will be cropped, and the ResNet50 model will be used for fine classification, outputting: live bacteria, dead bacteria, impurities, and classification confidence.
6. The microbial identification and counting method based on deep learning and quantum dot staining technology according to claim 2, characterized in that, Step 5, Post-processing and Result Fusion, is as follows: After the block detection process is completed, the system enters the crucial post-processing and result fusion stage. This stage aims to fuse the preliminary detection results scattered across various sub-images into an accurate and non-redundant final report corresponding to the original large image. This process mainly consists of three core steps: Coordinate Restoration and Global Mapping: The system first establishes the spatial identity of each detected target box. By recording the starting coordinates (X, Y) of each sub-image in the original image, and using the principle of affine transformation, the predicted box coordinates (x_min, y_min, x_max, y_max) in the local coordinate system of the sub-image are accurately mapped back to the global coordinate system. Redundancy Removal and Result Deduplication: Due to the overlapping segmentation strategy, the overlapping areas of adjacent sub-images may cause the same microbial target to be repeatedly detected by multiple blocks, resulting in a large number of redundant boxes. The system uses the Non-Maximum Suppression (NMS) algorithm. This algorithm first sorts all detection boxes according to the prediction confidence, then recursively selects the box with the highest confidence and suppresses the boxes with high overlap (IoU). Intersection over Union (Intersection over Union) Other redundant boxes exceeding a set threshold. Results statistics and structured output: After deduplication, the system performs structured processing and statistical analysis on the final set of detection boxes. First, it automatically classifies and counts the boxes according to their category labels, generating statistical results for each category. Then, the system can output a structured report containing the following information: Visualized labeled image: All detection boxes and category labels are drawn on the original image to intuitively display the detection results; Detailed data file: A report in JSON or CSV format is generated, recording the precise coordinates, category, and confidence information of each target; Classification statistical summary: Statistical quantities such as the total number and proportion of various microorganisms are provided to provide direct data support for subsequent analysis.
7. A microbial identification and counting system based on deep learning and quantum dot staining technology, characterized in that, The system for implementing the microbial identification and counting method based on deep learning and quantum dot staining technology as described in any one of claims 1-6, comprises: The image input module receives microscopic images of microorganisms uploaded by users and performs standardized preprocessing. An improved YOLOv8s detection model performs inference on the entire image to detect all potential microbial target regions; For each detected target area, the ResNet50 recognition model is used for fine classification to distinguish between live and dead bacteria and impurities; The post-processing module performs deduplication, filtering, and coordinate restoration on the detection results; The results generation module outputs the final identification results, including: a visual image with labeled boxes; statistical results of microbial classification; and a file in LabelMe format that can be imported into the labeling tool.
8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the microbial identification and counting method based on deep learning and quantum dot staining technology as described in any one of claims 1 to 67.
9. A computer-readable storage medium storing computer instructions thereon, characterized in that, When executed by a processor, the computer instructions implement the microbial identification and counting method based on deep learning and quantum dot staining technology as described in any one of claims 1-6.