Diatom image automatic identification and water quality evaluation system

By using a cascaded architecture of an image normalization engine and a recognition engine, the problem of decreased recognition performance caused by on-site image interference is solved, achieving high-accuracy diatom recognition and water quality assessment, reducing system maintenance costs, and providing self-diagnostic capabilities.

CN121999486AInactive Publication Date: 2026-05-08HENGSHUI UNIVERSITY
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
HENGSHUI UNIVERSITY
Filing Date
2025-12-09
Publication Date
2026-05-08
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Existing deep learning-based image recognition models experience performance degradation in real-world field conditions, primarily because images collected on-site contain complex semantic interference features, making it difficult for current technologies to effectively distinguish between targets and interfering objects, thus reducing recognition accuracy.

Method used

Design an automatic diatom image recognition and water quality assessment system. The system adopts a series architecture of image normalization engine and recognition engine. The image normalization engine learns semantic mapping rules through paired training data, generates clean images and suppresses interference. The recognition engine classifies and counts on the clean images, and the residual quantization module quantifies the total amount of interference.

Benefits of technology

It effectively solves the problem of decreased recognition performance caused by on-site image interference, improves recognition accuracy, and reduces system iteration and maintenance costs through modular design, and has self-diagnosis and data iteration capabilities.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121999486A_ABST
    Figure CN121999486A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of image automatic identification and processing, and discloses a diatom image automatic identification and water quality evaluation system, which comprises an image normalization engine, an identification engine and a residual quantization module, the image conversion module is used for converting an original microscope field-of-view image containing semantic interference into a normalized clean image; the recognition engine is connected with the image normalization engine in series and is used for only receiving normalized clean images for classification and counting, and the residual quantization module is connected with the image normalization engine in parallel and is used for receiving the residual map and carrying out quantitative statistics so as to realize evaluation of water quality physical indexes. According to the method, the semantic cleaning task and the standard recognition task are decoupled through a serial architecture, so that a standard recognition engine runs under an approximately ideal input condition, and the technical problem of recognition failure of a standard model caused by interferents in an actual field environment is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to an automatic diatom image recognition and water quality assessment system, belonging to the field of automatic image recognition and processing technology. Background Technology

[0002] Current deep learning-based image recognition models, such as convolutional neural networks, rely on clear, standardized input images for training and operation, and have high accuracy when processing such standardized datasets. However, when these image recognition models trained in laboratory environments are deployed to actual field conditions, their performance degrades. This is mainly because the raw images collected in the field are often mixed with a large amount of complex non-target interference information. This interference is not pixel noise in the traditional sense, but has semantic interference features. For example, in biological microscopy, non-target organic debris, inorganic particles, bubbles, broken shells, and blurred or semi-transparent outlines located at different focal planes due to depth of field limitations are commonly found in water samples.

[0003] To address this issue, one existing approach is to build a more powerful, single recognition model that learns all possible interference patterns during training, attempting to directly identify targets from images containing interference. However, this approach has limitations because the combinations of interference are diverse and complex, posing challenges to model structure, training costs, and robustness. The reliability of recognition results decreases when faced with interference combinations not present in the training set. Another approach is to use conventional image preprocessing techniques such as filtering, but these pixel-level processing tools struggle to effectively distinguish semantic-level interference. Simple filters cannot effectively differentiate between debris that should be erased and diatoms that should be preserved. In other related water quality testing fields, some technical solutions also attempt to avoid image interference by extracting highly simplified statistical features. While this method addresses interference, it also has fundamental limitations. For example, Chinese invention patent CN114264648B discloses a water quality test strip identification method and system. The scheme aims to identify relatively uniform color areas. The technical approach is to calculate statistical feature data such as the mean and standard deviation of single channels R, G, and B, and use this as the input of a neural network. This processing method fundamentally abandons the morphological and spatial distribution information of the image. However, in the diatom microscopy scenario targeted by this invention, both the target object and non-target interference objects (such as debris and out-of-focus contours) have complex semantic and morphological features. The distinction heavily depends on the discrimination of morphological and semantic information. Therefore, this identification model based on simplified statistical features cannot be applied to the target identification technology problem under complex semantic interference that this invention aims to solve.

[0004] Therefore, the technical problem to be solved by this invention is how to design an image recognition system architecture that can logically separate the complex semantic interference processing task from the standard target recognition task, so that the standard recognition model can run on images with suppressed interference, thereby solving the problem of recognition performance degradation caused by on-site image interference. Summary of the Invention

[0005] This invention provides an automatic diatom image recognition and water quality assessment system. The main purpose is to provide an image recognition system architecture that can logically separate the complex semantic interference processing task from the standard target recognition task, so as to solve the problem of recognition performance degradation caused by on-site image interference.

[0006] To achieve the above objectives, the present invention provides an automatic diatom image recognition and water quality assessment system, which includes an image normalization engine, a recognition engine, and a residual quantization module. An image normalization engine provides the technical prerequisite for semantic normalization to run the recognition engine. This prerequisite is achieved through the following mechanism: The image normalization engine receives an original microscope field-of-view image containing the target diatom and semantically non-target interference, including non-diatom debris, blurred outlines outside the focal plane, and broken diatom shells. The image normalization engine is trained on a pairwise training dataset, which includes the original microscope field-of-view image as input and a target image, manually cleaned and restored by experts, corresponding to the original microscope field-of-view image as the target output. Based on this training, the image normalization engine converts the original microscope field-of-view image into a normalized clean image that has suppressed the semantically non-target interference features. The image normalization engine also generates a normalized residual map based on the image feature differences between the original microscope field-of-view image and the normalized clean image. The operation of the recognition engine is constrained by the premise of semantic normalization technology. The constraint is reflected through the following mechanism: the output of the recognition engine is connected in series with the output of the image normalization engine and is used to receive only normalized clean images to classify and count the target diatoms in the clean images and generate diatom recognition results containing the target diatom category and corresponding confidence score. The residual quantization module is connected in parallel to the output of the image normalization engine. It is used to receive the normalized residual map and perform quantization statistics on the normalized residual map to generate a quantitative index characterizing the total amount of non-target interference, which is used to realize water quality evaluation.

[0007] Preferably, the image normalization engine runs on an image-to-image translation model, which employs a fully convolutional neural network architecture. The fully convolutional neural network architecture is used to learn semantic mapping rules from the original microscope field images to the target images after manual cleaning and restoration by experts in the paired training dataset.

[0008] Preferably, the image normalization engine runs on an image-to-image translation model, which employs a generative adversarial network (GAN) architecture. The GAN architecture is used to generate normalized clean images, which are semantically consistent with the target image after manual cleaning and restoration by experts in terms of image features.

[0009] Preferably, the system further includes: an output monitoring module connected to the output of the recognition engine, used to monitor the confidence score in the diatom recognition results in real time; and a traceability archiving module linked to the output monitoring module, which has data access permissions to the original microscope field of view image; wherein, when the output monitoring module detects that the confidence score is lower than a preset judgment threshold, the traceability archiving module is triggered to automatically capture and archive the original microscope field of view image corresponding to the low confidence score.

[0010] Preferably, the image normalization engine operates in a random inference mode implemented by activating its internal Dropout layer to generate N sets of normalized clean images for the same original microscope field of view, where N is an integer greater than 1; the recognition engine iterates through the N sets of normalized clean images to generate N sets of corresponding diatom recognition results; the system also includes a consensus aggregation module to receive the N sets of diatom recognition results and determine a single final diatom recognition result based on a preset consensus logic.

[0011] Preferably, the preset consensus logic is a confidence-weighted average logic. The consensus aggregation module is used to: for any target diatom category in N groups of diatom identification results, obtain the confidence score of that category in each group of diatom identification results; calculate the average of the N groups of confidence scores to obtain the final consensus confidence; and output the final diatom identification result based on the final consensus confidence.

[0012] Preferably, the system further includes: an output monitoring module connected to the output of the recognition engine, used to monitor the confidence score in the diatom recognition results in real time; and a bootstrap archiving module linked to the output monitoring module, wherein when the output monitoring module detects that the confidence score is higher than a preset high confidence threshold, the bootstrap archiving module is triggered to automatically capture and archive the original microscope field image corresponding to the high confidence score and the diatom recognition results generated by the recognition engine, as data pairs for model bootstrap training.

[0013] Preferably, the system also includes a process audit module, which is used to overlay the normalized residual map with the diatom recognition results generated by the recognition engine for visualization output.

[0014] Preferably, the system further includes: a color reference storage module for storing a reference color spectrum, which corresponds to the standard color space used during the training of the image normalization engine; and a color normalization gateway connected in series before the input of the image normalization engine. The color normalization gateway is used to execute a color histogram matching algorithm before the image normalization engine processes the original microscope field of view image, so that the color space of the original microscope field of view image matches the reference color spectrum.

[0015] Compared with the prior art, the beneficial effects of the present invention are: 1. By constructing a serial system architecture, namely, first setting up an image normalization engine, and then connecting the standard recognition engine to its output, the image discrimination task flow is reconstructed. The front-end normalization engine is trained based on specific paired image data containing expert knowledge. Its function is not traditional pixel-level denoising, but rather it suppresses features in the original image that are semantically interfering, such as debris, out-of-focus contours, and incomplete shells, and outputs a normalized clean image. In this way, the subsequent standard recognition engine always runs under near-ideal input conditions, avoiding the problem of model failure or poor robustness caused by a single model in the existing technology trying to handle the two conflicting tasks of semantic cleaning and target recognition at the same time. This solves the bottleneck that the standard image discrimination model is difficult to apply effectively in real-world environments.

[0016] 2. The serial decoupled architecture of normalization followed by recognition adopted in this invention brings maintainability in system engineering. The image normalization engine (module 1) is used to simulate expert cognition, while the image recognition engine (module 2) is used to perform classification and counting. When a more advanced recognition model appears in the future, this system only needs to replace or upgrade module 2, without having to re-collect and label expensive pairwise training data that relies on manual correction by experts to retrain module 1. This modular design reduces the iteration and maintenance costs of the entire system life cycle.

[0017] 3. By setting up an output monitoring module and a source tracing and archiving module, a feedback path based on the confidence level of the recognition results is constructed. When the standard recognition engine produces a low-confidence recognition result for the normalized image, the system does not save this unreliable result. Instead, it uses this low-confidence signal to trigger the source tracing and archiving module, which automatically captures and saves the original microscope field of view image that triggered the event without any processing. This mechanism uses the judgment difficulty of the downstream module to reversely calibrate the cognitive blind spot of the upstream module, realizing the automatic mining and archiving of valuable difficult samples that have never been seen in the environment. This enables the system to have the ability of self-diagnosis and data iteration, avoiding the problem of static models gradually becoming ineffective in dynamically changing environments. Attached Figure Description

[0018] Figure 1 This is a flowchart illustrating the serial identification architecture and feedback and residual quantization process of the present invention. Figure 2 This is a schematic diagram of confidence consensus aggregation under the random inference mode of the present invention; Figure 3 This is a system engineering deployment architecture diagram for the multi-module clustering of this invention. Detailed Implementation

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

[0020] This invention discloses an automatic diatom image recognition and water quality assessment system, including an image normalization engine, a recognition engine connected in series at its output, and a residual quantization module connected in parallel to the image normalization engine. The image normalization engine is used to simulate the cognitive patterns of experts, converting the input raw microscope field-of-view image containing semantic interference into a normalized clean image. The recognition engine is constrained to only receive this clean image and perform classification and counting under near-ideal input conditions, thereby solving the problem of recognition failure caused by on-site image interference in existing image recognition models. In specific image recognition application scenarios, namely microscopic examination for water quality monitoring, the objective obstacle faced by the system is that the acquired raw microscope field-of-view images are generally mixed with a large number of non-target semantic interference features. These interferences exist in the form of non-diatom debris, inorganic particles, bubbles, broken diatom shells, and blurred or semi-transparent outlines at different focal planes due to depth-of-field limitations. Conventional pixel-level preprocessing tools, such as filters, are difficult to effectively distinguish between debris that should be erased and out-of-focus diatoms that should be retained. To address this challenge... In this scheme, the image normalization engine, acting as an image preprocessor, has its core function defined as semantic normalization. To achieve this, the engine is trained on a proprietary pairwise training dataset, constructed as follows: A batch of original microscope field images containing the aforementioned typical semantic interferences are collected (as input X); next, technicians with a diatomology background manually clean and repair the same original image in image processing software. The repair work includes, but is not limited to, erasing debris and impurities, removing broken shells, or clearly depicting valuable out-of-focus contours, thereby obtaining a target image after expert cleaning and repair (as target output Y). The image normalization engine learns from tens of thousands of such (X,Y) data pairs to master the semantic mapping rules from dirty images to clean images. When the system is running, the engine receives a new original microscope field image and can automatically output a normalized clean image that has suppressed semantically non-target interference features, and simultaneously output a normalized residual map containing all suppressed features. This residual map is then used for subsequent physical water quality assessment.

[0021] In one image processing implementation, the image normalization engine operates based on an image-to-image translation model. Specifically, this model can employ a fully convolutional neural network (FCN) architecture, taking the mature U-Net network structure in the field of image recognition as an example. Its encoder-decoder structure makes it adept at learning pixel-level semantic mapping rules from the original image to the target image in the aforementioned paired training datasets. In another optional image processing implementation, the image normalization engine can also employ a generative adversarial network (GAN) architecture. This architecture introduces a discriminator, which logically drives the normalized clean images generated by the generator to approximate and conform to the semantic feature distribution of the target image after expert manual cleaning and restoration, i.e., maintaining semantic consistency. Taking the U-Net network architecture as an example, the training process of the image normalization engine is based on standardized engineering procedures. These procedures first divide the paired training datasets (X, Y) into training, validation, and test sets in, for example, an 8:1:1 ratio. The loss function used in model training... It is a composite loss function, consisting of pixel-level... Loss: Absolute difference loss and image structure level The loss structure similarity index loss is composed of a weighted summation, i.e. ,in, and The weights are preset, for example, all set to 1.0; the optimizer uses the Adam optimizer, and the initial learning rate is set and adjusted based on a dynamic scheduling mechanism based on the performance of the validation set. For example, when the validation set... If the loss does not decrease within 5 consecutive training epochs, the current learning rate is automatically reduced by 10%; the training termination condition is set when the validation set... The iteration stops when the loss no longer improves within 20 consecutive training epochs, and the lowest value obtained on the validation set is retrieved. The model weights corresponding to the lost period are used as the final deployed engine model. Logically, the recognition engine is connected in series with the output of the image normalization engine. This connection method reflects a system-level constraint, namely, the image discrimination function of the recognition engine is limited to receiving only the normalized clean image output by the image normalization engine. Given that the quality of its input data has been guaranteed through semantic normalization, the recognition engine itself can adopt a standard model known in the field of image discrimination. For example, a recognition model based on the first detection and then classification paradigm can be formed by cascading the YOLOv8 object detection model and the ResNet-50 classification model. After receiving the clean image, the recognition engine executes its standard image discrimination process to classify and count the target diatoms in the clean image, and finally generates a diatom recognition result containing the target diatom category and the corresponding confidence score.

[0022] To address potential challenges such as model drift or unknown samples after deployment, this system may also include an output monitoring module and a source tracing and archiving module. The output monitoring module is logically connected to the output of the recognition engine and is used to monitor the confidence score in the diatom recognition results in real time. The source tracing and archiving module is linked to the output monitoring module and is granted data access permissions to the system input, i.e., the original microscope field-of-view image. When the output monitoring module detects that the confidence score is lower than a preset threshold (this threshold, for example, can be calibrated to 0.5), this low-confidence event is logically considered a high-uncertainty event by the system logic. This indicates that the image normalization engine may have encountered unknown interference that it cannot effectively handle. At this point, the source tracing and archiving module is automatically triggered, performing data operations that trace back to the input end, automatically capturing and archiving the original, unprocessed microscope field-of-view image corresponding to the low confidence score, and storing this difficult sample in a dedicated model iteration database. To address the risk of misclassification or failure due to a single deterministic inference when the normalization engine faces fuzzy inputs with inherent uncertainty in normalization, such as suspicious spots with very few features, this system allows for reconfiguration of its operation, including image normalization. The engine is logically configured to operate in a random inference mode. One way to achieve this mode is to forcibly activate its internal Dropout layer (i.e., Monte Carlo Dropout) during the inference process. In this mode, the system repeatedly inputs the same original microscope field image (X) into the normalization engine N times (N is an integer greater than 1, for example, N=5). Due to the characteristics of random inference, the engine will generate N sets of different but reasonable normalized hypothesis images (Y1...Y5). The recognition engine (module 2) is correspondingly logically configured to iterate through and process these N sets of normalized hypothesis images. The system generates N sets of corresponding diatom identification results (R1...R5). The system also includes a consensus aggregation module, which receives the N sets of diatom identification results and determines a single final diatom identification result based on a preset consensus logic. As a specific consensus logic, this logic can be a confidence-weighted average logic. For any target diatom category in the N sets of identification results, the consensus aggregation module obtains the confidence score of that category in each set of identification results, calculates the average of these N sets of confidence scores to obtain the final consensus confidence, and outputs the final diatom identification result based on the final consensus confidence.

[0023] To address the bottleneck of information waste in the inference phase of static models, this system can also construct a positive feedback loop of a data flywheel. This loop is achieved by adding a bootstrap archiving module and reusing the output monitoring module. In this architecture, when the output monitoring module detects a confidence score higher than a preset high confidence threshold (e.g., calibrated to 0.98), this high confidence event is interpreted by the system logic as a high-value data pair capture signal. At this time, the bootstrap archiving module is automatically triggered, and the data operation performed is: simultaneously capturing and archiving the original microscope field image corresponding to the high confidence score (i.e., dirty data X) and the diatom recognition result generated by the recognition engine (i.e., label Y). The system uses this (X,Y) data pair as a brand-new quasi-training sample and automatically stores it in a dedicated bootstrap retraining database for model training. Self-reinforcement learning; to address the trust and auditability bottlenecks caused by the normalization engine (Module 1) being a black box, this system expands the data flow of the normalization engine; the image normalization engine is logically configured to output a normalized residual map (D) simultaneously when outputting a normalized clean image (Y). The residual map (D) can be generated directly by the model through image subtraction (D=XY) or by the model, and semantically represents all image features suppressed or removed by the normalization engine; the system also includes a process audit module, which is used to overlay or synchronously visualize the normalized residual map (D) and the diatom recognition results (Z, such as detection boxes) generated by the recognition engine (Module 2), thereby transparently showing the system operator the selection process of the normalization engine for auditing the normalization process.

[0024] To address the domain shift bottleneck commonly encountered in real-world engineering systems, particularly the cognitive errors in the normalization engine (Module 1) caused by color space changes due to altered optical conditions or the use of biological stains such as Lugol's solution, this system can further integrate a color normalization gateway and a color reference storage module before the input of the image normalization engine. The color reference storage module stores a reference color spectrum, which, at the data level, corresponds to the standard color space used during the training of the image normalization engine (Module 1), such as a color histogram under standard bright-field white light. Logically, the color normalization gateway executes a standard color histogram matching algorithm before the normalization engine processes the original microscope field-of-view image. This algorithm forcibly transforms the color space of the original image to a color space B that matches the reference color spectrum. The color normalization gateway then sends this color-normalized image back to the image normalization engine (Module 1) to ensure the normalization process is successful. The engine always operates within its cognitive domain. To address the information waste bottleneck in the main solution's information flow, namely the residual information (residual spectrum D) suppressed and discarded by the normalization engine (module one), which itself has independent evaluation value in water quality assessment applications for non-target totals, such as suspended solids, the system can further branch and expand its data flow. Similar to the aforementioned process audit module, the image normalization engine (module one) is logically configured to generate a normalized residual spectrum (D=XY) while outputting a clean image. The system also includes a residual quantization module, which is logically connected in parallel to the output of the image normalization engine and runs in parallel with the recognition engine (module two). The residual quantization module, as a simplified image processing statistics module, is used to receive the normalized residual spectrum (D), perform pixel thresholding and pixel summation on the normalized residual spectrum, and quantify the total pixel intensity or total pixel area of ​​the residual spectrum, thereby reusing intermediate process data and additionally outputting quantitative indicators representing the total amount of non-target interference.

[0025] Example 1: In an image recognition scenario for emergency water quality monitoring, a recognition engine trained in a conventional manner is deployed to classify and count key diatom indicators in water samples. When the engine directly receives raw microscope images collected on-site, the images contain a large number of non-target interferences, especially irregularly shaped organic debris whose optical characteristics are similar to the blurred outline of a target diatom outside the focal plane. Under these conditions, the recognition engine applies the image features learned on a standardized dataset to the raw image, resulting in incorrect recognition results. A large number of organic debris are incorrectly classified as target diatoms, leading to an overestimation of the count. Simultaneously, the engine fails to recognize the blurred diatom outline outside the focal plane. The automatic diatom image recognition and water quality assessment system of this invention are deployed in the same scenario, using the same raw microscope image as input. The image is first fed into an image normalization engine, which processes the image based on semantic mapping rules learned from its paired training datasets, outputting a normalized clean image. In the clean image, the previously misclassified organic debris, being semantically non-target interference, has its image features suppressed or removed. Meanwhile, the previously unidentified blurry diatom outline outside the focal plane, being semantically a target, has its features preserved during normalization. This normalized clean image is used as input and passed to a recognition engine connected in series. This recognition engine can be the same as the engine trained in the aforementioned conventional method. In this series architecture, the recognition engine receives the normalized clean image and processes it. Because the input data has removed semantic interference features that caused over-counting and preserved the out-of-focus outline features, the recognition engine's output no longer misclassifies debris as a target, and the previously missed blurry diatom outline outside the focal plane is classified and counted. Thus, the semantic normalization processing of the image normalization engine provides the recognition engine with an input image free from semantic interference, and the recognition engine performs its classification and counting functions on this input image. This architecture separates semantic cleaning from standard recognition tasks.

[0026] Example 2: This example provides objective experimental data to verify the performance of a diatom image automatic recognition and water quality assessment system with a serial architecture in handling image discrimination tasks containing semantic interference, compared to conventional image recognition methods. A clean reference image library of 1000 images was established, containing 100 microscopic images of 10 different diatom species, all manually verified by biological experts and labeled with accurate information. To simulate real-world conditions, an interference image library was also constructed, containing a large number of non-diatom images collected from real water samples. Non-target interferences such as organic debris, inorganic particles, and out-of-focus blurred outlines were detected. Through digital image synthesis, elements from the interference image library were superimposed onto a clean reference image library with different area proportions to generate three sets of contaminated images for testing: Group A (low interference, interference occupying 10% of the image area), Group B (medium interference, interference occupying 30% of the image area), and Group C (high interference, interference occupying 50% of the image area). Two testing systems were set up: a control group and the sample group of this invention. The control group used a standard ResNet-50 trained on the clean reference image library. The classification model directly classifies three sets of contaminated images (A, B, and C). The invention sample adopts a cascaded architecture, which includes an image normalization engine (using U-Net architecture) trained on a pairwise training dataset (contaminated images and their corresponding clean images), and a standard ResNet-50 classification model, identical to the control group and trained only on a clean reference image database. During testing, the three sets of contaminated images (A, B, and C) are first fed into the image normalization engine, and the normalized clean images output are then fed into the ResNet-50 classification model. The core evaluation metrics of the experiment are the overall accuracy (OA) and F1 score, which are recognized in the field of image recognition. The F1 score is the harmonic mean of precision and recall, which can more evenly reflect the classification performance of the model under imbalanced data, especially its ability to handle false positives caused by interference objects and false negatives caused by rare targets. The two test systems processed the three sets of contaminated images, and the comparison data between their recognition results and the real labels were statistically analyzed. The results are shown in Table 1.

[0027] Table 1: Comparison of System Identification Performance under Different Interference Levels Experimental data show that in the control group, the standard recognition model directly processes contaminated images, and its overall accuracy and F1 score drop sharply as the interference level increases. When the interference level reaches 50%, the F1 score is only 0.25, and the model has failed. In the sample group of this invention, since the image normalization engine first performs semantic normalization on the contaminated image, it provides the subsequent standard recognition model with an input image that is close to a clean state. Therefore, even at a high interference level of 50%, the F1 score of the entire cascaded system remains at 0.95, and its performance is much higher than that of the control group.

[0028] Example 3: This example combines Figures 1 to 3 This document describes an automatic diatom image recognition and water quality assessment system, such as... Figure 1 As shown, the original microscope field image, containing both target diatoms and non-target interference, is fed into an image normalization engine to perform a semantic cleaning task to suppress interference. This engine outputs two parts of data in series: one part is a normalized clean image that has suppressed semantic interference, which is fed into a recognition engine to perform standard recognition tasks, namely classification and counting, and generates diatom recognition results including category and confidence score; the other part is a normalized residual map representing the feature differences between the original and clean images. This map is fed into a parallel residual quantization module for quantification and statistics to output an indicator of the total amount of non-target interference, such as the total amount of suspended matter in water. At the same time, the diatom recognition results are output to a monitoring module for real-time monitoring of the confidence score. When the confidence score is determined to be less than the determination threshold, the source tracing and archiving module is triggered. This module performs the operation of capturing the original image and archives the sample to the hard sample library for model iteration pending review.

[0029] like Figure 2 As shown in the figure, the Y-axis represents the confidence score, and the X-axis represents five independent inferences 1 to 5 and the final consensus result. The legend illustrates the fluctuations in the confidence scores of category A, category B, and category C across N inferences. For example, the confidence score of category A is approximately 0.9 in inference 1, but drops to 0 in inference 2. Finally, the system determines a single consensus result based on preset consensus logic, such as a confidence-weighted average logic, in which the confidence score of category A is 0.4912. Figure 3As shown, the architecture includes field acquisition terminals such as microscope workstations for image acquisition and preprocessing to generate raw field-of-view images; core processing servers such as GPU clusters deploying cascaded color normalization gateways, image normalization engines, and recognition engines to generate recognition results and residual maps; a data storage cluster for storing color benchmark storage modules, hard sample databases, bootstrap retraining databases, and diatom recognition result libraries; and a backend application server that interacts with the storage cluster through data read / write and runs two main module groups: a monitoring and feedback module group including output monitoring, source tracing and archiving, and bootstrap archiving modules, and an analysis and audit module group including residual quantization, consensus aggregation, and process auditing modules. Finally, user monitoring terminals such as expert workstations receive audit data analysis reports and display the results or output water quality evaluation reports through a visual audit interface.

[0030] Example 4: This example discloses a calibration procedure for determining a preset judgment threshold. This threshold is used to trigger the source tracing and archiving module. The initial conditions of this procedure are: preparing a calibration image set containing 1000 images. The image set is filtered and labeled, containing three types of images: Type A consists of 500 clear and easily identifiable target diatom images; Type B consists of 300 images containing novel non-target interference objects not seen in the training set; and Type C consists of 200 semantically highly ambiguous images, characterized by severely broken shells or weak out-of-focus contours. The calibration procedure first runs the complete system of this invention on the calibration image set and statistically analyzes the distribution of confidence scores output by the recognition engine after the system processes the images of types A, B, and C. The statistical results show that the confidence scores of type A images are distributed in the high score range, with a mean (denoted as ). The standard deviation is 0.96, and the standard deviation is denoted as 0.96. The confidence score for Class B images is 0.03; the confidence scores for Class B images are distributed in the low score interval, with a mean (denoted as ) The value was 0.18, and the standard deviation (denoted as ) was 0.18. The confidence score for Class C images is 0.04; the confidence scores for Class C images are distributed in the middle range, with a mean (denoted as ) The value is 0.42, and the standard deviation is (denoted as ). The threshold value is 0.15; based on this statistical result, the preset judgment threshold (denoted as ) is... The value was determined to be based on the statistical distribution of class B images, and the calculation method was as follows: ,Right now During actual system operation, any recognition result with a confidence score below 0.30 will trigger the source tracing and archiving module to capture the corresponding original microscope field of view image.

[0031] This embodiment discloses the algorithm path of the consensus aggregation module when the system runs in random inference mode (N=3). The module is used to aggregate the N sets of recognition results (denoted as R1, R2, R3) output by the recognition engine into a single final result. The input of the algorithm path is the three sets of recognition results R1, R2, and R3. Each set of results contains the detected target, its category, and confidence score. The first step is target association. The module clusters all detected targets in the three sets of results based on image spatial coordinates. The specific clustering rule is that when the intersection-union ratio (IoU) of the detection boxes is greater than the set association threshold of 0.4, they are regarded as the same target, forming several consensus clusters. Each consensus cluster corresponds to N times. The inference points to the same physical object; the second step is a weighted average within the cluster. The module traverses each consensus cluster and calculates the final consensus confidence score for all target diatom categories (here denoted as category A and category B) that have appeared in that cluster. The calculation logic is as follows: obtain the confidence score of the category in N sets of results. If a set of results does not identify the category within the cluster, then the confidence contribution of that set to the category is recorded as 0. Calculate the average of the N sets of scores. For a consensus cluster, if its three sets of results are R1 identifying category A with a confidence score of 0, R2 identifying category B with a confidence score of 0.8, and R3 identifying category A with a confidence score of 0.7, then the final consensus confidence score for category A is... The final consensus confidence level of category B The third step is to output a decision. The module compares the final consensus confidence scores of all categories within the cluster and outputs the category with the highest score that is greater than the set output decision threshold of 0.4 as the final identification result for that consensus cluster. In the above data, because... and Therefore, the consensus aggregation module ultimately outputs the identification result of the target as category A, with a confidence level of 0.533.

[0032] The correlation threshold of 0.4 in Example 4 and the output decision threshold of 0.4 used in the consensus aggregation module are determined according to an objective calibration procedure. This procedure utilizes a threshold calibration set of dedicated labeled ground truth bounding boxes. To determine the correlation threshold, the system runs in random inference mode on this calibration set, and counts the inter-frame relationships between true positive clusters of N detection boxes pointing to the same ground truth target. Distribution, and inter-frame spacing between false positive clusters of detection boxes pointing to different real targets in spatial proximity. The association threshold is set to maximize the statistical value that distinguishes between the two distributions, for example, in the false positive cluster. The 95th percentile of the distribution; to determine the output decision threshold, after calculating the consensus confidence of all clusters on the calibration set, the system iterates through all possible thresholds between 0 and 1.0, plots a precision-recall curve, and calculates the corresponding value for each threshold point. Fraction( Finally, the output decision threshold is determined to be the threshold that enables the... The confidence score corresponding to when the score reaches its maximum value.

[0033] Example 5: This example discloses a standardized engineering procedure for calibrating and generating a reference color spectrum before system deployment. The initial conditions of this procedure are defined as follows: a standardized optical imaging device is selected, and the model and parameters of its light source, objective lens, and image sensor (CCD or CMOS) are consistent with the acquisition device subsequently deployed on-site. White balance calibration is performed first. The execution steps of this procedure include: acquiring N blank field images (N not less than 100) containing only a clean glass slide and pure water medium under the standard equipment; and then acquiring M images (M not less than 500). The system contains standard sample images of typical diatoms with clear shapes and located at the center of the focal plane. The system automatically converts these N+M images to the HSV color space and calculates the pixel intensity histograms of the three channels: H (hue), S (saturation), and V (brightness). Finally, the system performs statistical averaging on these N+M sets of histogram data to generate a composite color histogram that represents the imaging conditions of the standard optical system. This composite color histogram is then fixed and stored in the color reference storage module as a reference color spectrum, which is used by the color normalization gateway to perform color histogram matching in subsequent operations.

[0034] This embodiment further discloses a reproducible procedure for standardizing the construction of target images manually cleaned and repaired by experts in a training dataset, replacing non-standardized manual erasing operations. The initial conditions for this procedure are: acquiring a batch of raw microscope field-of-view images collected under real-world conditions, rich in various semantic interferences, and providing a set of pixel-level annotation tools with layer management capabilities. The execution steps of this procedure include: first, the operator loads a raw microscope field-of-view image into the annotation tool; second, the operator creates two independent binary mask layers on the image, namely a target mask layer and an interference mask layer; third, the operator uses the pixel-level annotation tool to traverse all content in the image, and... All pixel regions identified as target diatoms, including clear targets and valuable out-of-focus contours, are marked as 1 in the target mask layer. All pixel regions identified as non-target interference debris, bubbles, and broken shells are marked as 1 in the interference mask layer. In the fourth step, the system automatically performs image generation. The algorithm logic is as follows: the original microscope field of view image and the target mask layer are multiplied pixel by pixel to retain the target region, while the pixel values ​​of the corresponding regions in the interference mask layer are set to background values ​​(such as 0), thereby generating a standardized target image after manual cleaning and restoration by experts. This image and its corresponding original microscope field of view image together constitute a pairwise training dataset for training the image normalization engine.

[0035] Example 6: This example discloses a procedure for standardizing engineering calibration of the system of the present invention before deployment. This procedure is used to determine the high confidence threshold of the bootstrap archiving module. ), and the output calibration of the residual quantization module; the initial conditions of this procedure are defined as follows: prepare a validation dataset, which is independent of the training dataset and contains K (K not less than 2000) original microscope field images of the true category verified by experts. This dataset should contain no less than 20% of difficult samples that are semantically highly ambiguous or prone to ambiguity; at the same time, prepare a set (L sets, L not less than 10) of turbidity standard water samples with known physical turbidity gradients, whose turbidity values ​​( (i=1..L) has been pre-determined using a standard nephelometer; the first part of the calibration procedure is used to determine the high-confidence threshold. The steps are as follows: First, run the system of the present invention on the verification dataset to obtain the diatom recognition results output by the recognition engine for each image and its corresponding confidence score; second, compare all recognition results with their corresponding expert-verified real labels to generate a data point set containing confidence scores to determine whether they are correct; finally, based on the dataset, draw a recognition accuracy-confidence threshold curve, where the high confidence threshold is... This is defined as the confidence score at which the recognition accuracy on the curve first reaches a preset high-precision target (e.g., 99.9%). In this calibration, if the data shows that the recognition accuracy reaches 99.9% when the confidence score is greater than 0.975, then... It was set to 0.975 to ensure that the data pairs automatically archived for bootstrapping training have high reliability.

[0036] The second part of the calibration procedure is used to calibrate the residual quantization module; the steps are as follows: using the image acquisition equipment of this system, acquire M original microscope field-of-view images (M not less than 20) for each of the L groups of turbidity standard water samples; secondly, these... Each image is input into the image normalization engine, which triggers the residual quantization module to calculate and output a quantization index representing the total amount of non-target interference for each image (denoted as ). (e.g., the total pixel intensity of the normalized residual spectrum); calculate the M values ​​corresponding to each group of standard water samples. average value Finally, the system uses these L sets of data to... By fitting polynomial regression, a model is established from the original quantitative indicators. To standard physical turbidity value mapping function This mapping function is stored internally, enabling the system to process the raw metrics output by the residual quantization module during subsequent normal operation. It is automatically converted into a standard turbidity reading with a clear physical meaning.

[0037] It will be apparent to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above, and that the present invention can be implemented in other specific forms without departing from the spirit or essential characteristics of the present invention.

[0038] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. 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 be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention.

Claims

1. An automatic diatom image recognition and water quality assessment system, characterized in that, The system includes an image normalization engine, a recognition engine, and a residual quantization module; Image normalization engines provide the technical prerequisite for semantic normalization to enable the operation of recognition engines; The technical premise is achieved through the following mechanism: The image normalization engine receives an original microscope field-of-view image containing the target diatom and semantically non-target interference, including non-diatom debris, blurred outlines outside the focal plane, and broken diatom shells; the image normalization engine is trained based on a pairwise training dataset, which includes the original microscope field-of-view image as input and the target image as output, which is a target image manually cleaned and restored by experts corresponding to the original microscope field-of-view image; the image normalization engine runs based on this training, converting the original microscope field-of-view image into a normalized clean image that has suppressed the semantically non-target interference features; the image normalization engine is also used to generate a normalized residual map based on the image feature differences between the original microscope field-of-view image and the normalized clean image. The operation of the recognition engine is constrained by the premise of semantic normalization technology. The constraint is reflected through the following mechanism: the output of the recognition engine is connected in series with the output of the image normalization engine and is used to receive only normalized clean images to classify and count the target diatoms in the clean images and generate diatom recognition results containing the target diatom category and corresponding confidence score. The residual quantization module is connected in parallel to the output of the image normalization engine. It is used to receive the normalized residual map and perform quantization statistics on the normalized residual map to generate a quantitative index characterizing the total amount of non-target interference, which is used to realize water quality evaluation.

2. The diatom image automatic recognition and water quality assessment system according to claim 1, characterized in that, The image normalization engine runs on an image-to-image translation model, which employs a fully convolutional neural network architecture. A fully convolutional neural network architecture is used to learn semantic mapping rules from raw microscope field images to target images that have been manually cleaned and restored by experts in a pairwise training dataset.

3. The diatom image automatic recognition and water quality assessment system according to claim 1, characterized in that, The image normalization engine runs on an image-to-image translation model, which employs a generative adversarial network architecture. A generative adversarial network architecture is used to generate normalized clean images, which are semantically consistent with the target images after manual cleaning and restoration by experts.

4. The diatom image automatic recognition and water quality assessment system according to claim 1, characterized in that, The system also includes: an output monitoring module, connected to the output of the recognition engine, used to monitor the confidence score in the diatom recognition results in real time; and a traceability and archiving module, which is linked to the output monitoring module and has data access permissions to the original microscope field images. When the output monitoring module detects that the confidence score is lower than a preset judgment threshold, the traceability and archiving module is triggered to automatically capture and archive the original microscope field images corresponding to the low confidence score.

5. The diatom image automatic recognition and water quality assessment system according to claim 1, characterized in that, The image normalization engine operates in a random inference mode implemented by activating its internal Dropout layer to generate N sets of normalized clean images for the same original microscope field of view, where N is an integer greater than 1; the recognition engine iterates through the N sets of normalized clean images to generate N sets of corresponding diatom recognition results; the system also includes a consensus aggregation module to receive the N sets of diatom recognition results and determine a single final diatom recognition result based on a preset consensus logic.

6. The diatom image automatic recognition and water quality assessment system according to claim 5, characterized in that, The preset consensus logic is a confidence-weighted average logic. The consensus aggregation module is used to: for any target diatom category in N sets of diatom identification results, obtain the confidence score of that category in each set of diatom identification results; Calculate the average of the N confidence scores to obtain the final consensus confidence score; and output the final diatom identification result based on the final consensus confidence score.

7. The diatom image automatic recognition and water quality assessment system according to claim 1, characterized in that, The system also includes: an output monitoring module, connected to the output of the recognition engine, used to monitor the confidence score in the diatom recognition results in real time; and a bootstrap archiving module, linked with the output monitoring module. When the output monitoring module detects that the confidence score is higher than the preset high confidence threshold, the bootstrap archiving module is triggered to automatically capture and archive the original microscope field image corresponding to the high confidence score, as well as the diatom recognition results generated by the recognition engine, as data pairs for model bootstrap training.

8. The diatom image automatic recognition and water quality assessment system according to claim 1, characterized in that, The system also includes a process audit module, which is used to overlay the normalized residual map with the diatom recognition results generated by the recognition engine for visualization output.

9. The diatom image automatic recognition and water quality assessment system according to claim 1, characterized in that, The system also includes: a color reference storage module for storing a reference color spectrum, which corresponds to the standard color space used during the training of the image normalization engine; and a color normalization gateway connected in series before the input of the image normalization engine. The color normalization gateway is used to execute a color histogram matching algorithm before the image normalization engine processes the original microscope field of view image, so that the color space of the original microscope field of view image matches the reference color spectrum.

Citation Information

Patent Citations

  • A water quality test paper identification method and system

    CN114264648B