A method and system for intelligent identification of activated sludge microorganisms
Using artificial intelligence computer vision technology to build an activated sludge microbial counting network solves the problems of low microbial detection efficiency and poor accuracy in sewage treatment, realizes intelligent identification of activated sludge microorganisms in sewage treatment, improves detection efficiency and accuracy, and supports Real-time prediction and adjustment of sewage treatment effects.
Patent Information
- Application Number
- CN202410133156.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-31
- Publication Date
- 2024-09-24
- Estimated Expiration
- 2044-01-31
AI Technical Summary
Activated sludge microbial detection in the existing technology has problems such as low efficiency, poor accuracy, low consistency and high cost. It is difficult to accurately monitor the types and quantities of microorganisms in the sewage treatment process in real time, which affects the prediction and adjustment of sewage treatment effects.
Computer vision technology based on artificial intelligence is used to construct an activated sludge microbial counting network. Through image preprocessing, feature extraction, microbial quantity analysis and information analysis, intelligent identification of microbial types and locations is achieved, and detection efficiency and accuracy are improved.
It solves the problems of low efficiency, poor accuracy and high cost of microbial detection in the sewage treatment process, realizes intelligent, standardized and fast microbial detection of activated sludge in sewage treatment, and improves the ability to predict and adjust the sewage treatment effect.
Smart Images

Figure CN117953493B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of a new generation of information technology based on artificial intelligence technology, and in particular to a method and system for intelligently identifying activated sludge microorganisms. Background Art
[0002] The "2022 Ecological Environment Statistical Annual Report" released by the Ministry of Ecology and Environment shows that by the end of 2022, the national urban sewage treatment capacity is 207 million cubic meters per day, the total sewage treatment volume is 60.15 billion cubic meters, and the sewage treatment rate is 97.89%. Since sewage contains a large amount of organic matter and nutrients such as nitrogen and phosphorus, if it is directly discharged without effective treatment methods, it will cause serious environmental pollution problems. At present, there are physical, physical and chemical, chemical and biological methods for urban sewage treatment in my country. Among them, the activated sludge method in the biological method is the most widely used. According to statistics, more than 80% of the sewage treatment plants that have been built in my country use the activated sludge method, and the proportion of water treated by the activated sludge method accounts for more than 85% of the total treated water. It can be seen that the activated sludge method has become the most important method in the field of sewage treatment.
[0003] The activated sludge process is a flocculent formed by the coagulation and interweaving of a variety of aerobic microorganisms and facultative anaerobic microorganisms (in some cases, there may be a small amount of anaerobic microorganisms) with organic and inorganic solids in the wastewater. The main body of activated sludge is bacteria, most of which are Gram-negative bacteria. In addition, there are a large number of protozoa and metazoa, as well as microbial metabolic residues and some inert organic and inorganic substances entrained from sewage. Microorganisms are biological entities in activated sludge and are more sensitive to environmental changes. The treatment effect of sewage directly affects the structure and number of their populations. In the process of sewage treatment, when there are problems with the operating conditions, some water quality indicators will not change significantly in a short time, and it is difficult to attract the attention of staff. However, since activated sludge microorganisms are sensitive to environmental changes, the population and number of activated sludge microorganisms at this time will undergo obvious adverse migration, resulting in the deterioration of sewage treatment effects. When the sewage treatment effect deteriorates, it takes a long time to restore the good activated sludge state when adjusting the sewage treatment operation parameters. Therefore, real-time and accurate monitoring of the types and quantities of activated sludge microorganisms is particularly important for sewage treatment conditions, and can predict the future development trend of sewage treatment, so as to timely adjust the process parameters in the sewage treatment process and solve the problem of lag effect in the sewage treatment process. There are many types of indicator microorganisms in activated sludge, including bellworms, rotifers, shield ciliates, sucker worms, sunworms, etc. The status of these microorganisms represents the different treatment effects of activated sludge in sewage.
[0004] At present, the microscopic examination of active sludge microorganisms is a manual observation and counting of the types and quantities of microorganisms in the activated sludge under different operating conditions of sewage treatment by inspectors. However, this method has obvious defects: the accuracy of microscopic observation depends largely on the observer's reading experience and attention during the film reading process, and the effectiveness of the diagnostic results of each operator's observation of microscopic technology varies, and the accuracy and consistency of their observations are low. In addition, even experienced inspectors cannot distinguish various microorganisms without reference materials. Summary of the invention
[0005] In order to overcome the defects in the above-mentioned prior art, the purpose of the present invention is to provide a method and system for intelligent identification of activated sludge microorganisms.
[0006] In order to achieve the above-mentioned object of the present invention, the present invention provides a method for intelligent identification of activated sludge microorganisms, comprising the following steps:
[0007] Obtain microscopic images of activated sludge containing microorganisms;
[0008] An activated sludge microbial counting network is constructed, and the activated sludge microbial counting network is intelligently identified by using the activated sludge microscopic image, specifically:
[0009] Preprocessing the activated sludge microscopic image to obtain a plurality of image blocks;
[0010] The image block is input into the feature extraction subnetwork to extract features of the image block and obtain a feature mapping matrix;
[0011] Inputting the feature mapping matrix into a microbial quantity analysis subnetwork to obtain microbial density perception features, and predicting the number of microorganisms based on the density perception features;
[0012] The feature mapping matrix and the microbial density perception features are input into the microbial information analysis subnetwork, the microbial type and microbial location are analyzed, and the microbial type and location information prediction results are generated.
[0013] This method introduces artificial intelligence-based computer vision technology into the field of activated sludge microbial detection, solving the problems of low efficiency, poor accuracy, low consistency and high cost in the field of microbial detection of water quality indicators in sewage treatment. The microbial perception feature in this method has density perception ability, contains microbial density information, enhances the characteristics of areas containing dense microorganisms, and further improves the efficiency and accuracy of this method.
[0014] In an optional scheme of the activated sludge microorganism intelligent identification method, when the feature mapping matrix is input into the microbial quantity analysis subnetwork, the microbial density information extraction module of the microbial quantity analysis subnetwork generates a microbial density perception feature, and the intelligent counting module of the microbial quantity analysis subnetwork predicts and outputs the number of microorganisms based on the microbial density perception feature.
[0015] This optional solution can not only accurately predict the number of microorganisms, but also generate microbial density perception features with density perception capabilities through the microbial density information extraction module, which are used in the microbial information analysis subnetwork to analyze the type and location of microorganisms, thereby improving the efficiency of microbial information prediction and the accuracy of prediction results.
[0016] In an optional solution of the activated sludge microorganism intelligent identification method, when the feature mapping matrix and the microorganism density perception feature are input into the microorganism information analysis subnetwork, the feature extraction module of the microorganism density information fusion of the microorganism information analysis subnetwork generates analysis features of the fused density information using the microorganism density information; the analysis features of the fused density information and the feature extraction module of the activated sludge microscopic image transmission microorganism information analysis subnetwork are feature extracted to generate analysis features of the fused density information;
[0017] The analysis features of the fused density information are simultaneously transmitted to a microorganism identification module and a microorganism positioning module to generate a microorganism type and position information prediction result including a microorganism type and a microorganism position.
[0018] This optional solution further improves the efficiency of microbial information prediction and the accuracy of prediction results.
[0019] In an optional solution of the method for intelligent identification of activated sludge microorganisms, the target information is mapped to confidence through the microorganism identification module and is mapped to point coordinates through the microorganism positioning module.
[0020] In an optional solution of the intelligent identification method of activated sludge microorganisms, the feature extraction module integrating microorganism density information includes 2 multi-layer perceptrons, L-level high-order feature extraction modules, and L-level low-order feature extraction modules, where L is a configurable parameter;
[0021] The feature mapping matrix is input into the first multilayer perceptron, and the feature mapping matrix is mapped to The high-order feature extraction modules are sequentially cascaded after the first multi-layer perceptron;
[0022] The microbial density perception feature is input into a second multi-layer perceptron, and the microbial density perception feature is mapped to To match the number of feature channels c, the second multilayer perceptron is sequentially cascaded with the low-order feature extraction modules;
[0023] The l-th level high-order feature extraction module previously merges the high-order features from the l-1-th level high-order feature extraction module and the low-order features from the l-1-th level low-order feature extraction module, and the 1-th level high-order feature extraction module previously reshapes the feature maps outputted from the first multilayer perceptron and the second multilayer perceptron.
[0024] The feature extraction module that integrates the microbial density information in this optional solution gradually integrates the high-order feature information and the low-order feature information, thereby improving the feature expression capability of the module and further improving the efficiency of microbial information prediction and the accuracy of prediction results.
[0025] In an optional scheme of the activated sludge microorganism intelligent identification method, the feature extraction module that integrates global information includes L layers of feature extraction modules, where L is a configurable parameter. Each layer of feature extraction module includes a self-attention module, a cross-attention layer, and a feedforward network. Feature extraction is performed on the microbial image block, and then feature fusion is performed.
[0026] In an optional scheme of the intelligent identification method of activated sludge microorganisms, the loss function of the activated sludge microorganism counting network is:
[0027] Among them, L MD is the counting loss function of the microbial population analysis subnetwork, L MA is the loss function of the microbial information analysis subnetwork, NUM is the number of manually labeled microorganisms in the image, and NUM-T is an adjustment value.
[0028] The counting loss function of the microbial population analysis subnetwork is:
[0029] L MD =|||MD|| 1 -NUM|, where ||·|| 1 Represents the entry-by-entry L of the matrix 1 Norm,MD is a density map used to estimate the microbial density level across spatial dimensions.
[0030] The loss function of the microbial information analysis subnetwork is:
[0031] L MA =L c +L l , where L c is the classification loss, L l For the localization loss, the distance between the matched predicted coordinates and the corresponding true coordinates is measured.
[0032] This optional solution can improve the performance of the microbial information analysis network by incorporating both microbial category information and location information during the network training process, that is, it can simultaneously take into account the network's microbial category recognition ability and microbial location ability.
[0033] The present invention also proposes an intelligent identification system for activated sludge microorganisms, including an image receiving module, a processing module and a storage module. The image receiving module is used to receive a microscopic image of activated sludge containing microorganisms and send it to the processing module. The processing module is communicatively connected to the storage module. The storage module is used to store at least one executable instruction. The executable instruction enables the processing module to perform operations corresponding to the above-mentioned intelligent identification method for activated sludge microorganisms according to the image it receives, so as to identify the activated sludge microorganisms.
[0034] The system has all the advantages of the above methods, and the system can be easily and quickly embedded in the workflow of the existing activated sludge method for sewage treatment, without affecting the process flow of the activated sludge method for sewage treatment.
[0035] The beneficial effects of the present invention are as follows: the present invention introduces computer vision technology based on artificial intelligence into the field of activated sludge microbial detection, solves the problems of low efficiency, poor accuracy, low consistency and high cost in the field of microbial detection of water quality indicators in the sewage treatment process, and lays a solid foundation for the intelligent, standardized and rapid detection and counting of activated sludge microorganisms in sewage treatment.
[0036] Additional aspects and advantages of the present invention will be given in part in the following description and in part will be obvious from the following description, or will be learned through practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] The above and / or additional aspects and advantages of the present invention will become apparent and easily understood from the description of the embodiments in conjunction with the following drawings, in which:
[0038] Figure 1 It is a schematic diagram of the structure of the activated sludge microbial counting network;
[0039] Figure 2 It is a schematic diagram of the structure of the microbial quantity analysis subnetwork;
[0040] Figure 3 It is a schematic diagram of the structure of the microbial information analysis subnetwork;
[0041] Figure 4 It is a schematic diagram of the network structure of the feature extraction module integrating microbial density information;
[0042] Figure 5This is a schematic diagram showing the performance comparison of different methods for intelligent counting of worms using MAE as an indicator;
[0043] Figure 6 This is a performance comparison diagram of different methods for intelligent counting of worms using MSE as an indicator;
[0044] Figure 7 This is a schematic diagram showing the performance comparison of different methods for intelligent counting of branchworms using RMSE as an indicator. DETAILED DESCRIPTION
[0045] Embodiments of the present invention are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and cannot be understood as limiting the present invention.
[0046] In the description of the present invention, unless otherwise specified and limited, it should be noted that the terms "installed", "connected" and "connected" should be understood in a broad sense. For example, it can be a mechanical connection or an electrical connection, or it can be the internal connection between two components. It can be a direct connection or an indirect connection through an intermediate medium. For ordinary technicians in this field, the specific meanings of the above terms can be understood according to the specific circumstances.
[0047] like Figure 1 As shown, the present invention provides a method for intelligent identification of activated sludge microorganisms, comprising the following steps:
[0048] An activated sludge microbial counting network ASMCounter was constructed, which included a pretreatment module, a feature extraction subnetwork, a microbial quantity analysis subnetwork MQA and a microbial information analysis subnetwork MIA.
[0049] Acquire microscopic images of activated sludge containing microorganisms.
[0050] During the training phase of the activated sludge microbial counting network ASMCounter, an activated sludge microbial data set was established through sewage sampling, and professional activated sludge microbial detection personnel completed the microscopic image annotation of typical microorganisms, and then the activated sludge microbial counting network ASMCounter was trained.
[0051] This embodiment uses the typical microorganism worm as an example for introduction. The activated sludge microorganism dataset used has 300 images, each of which is a microscopic microorganism image with ultra-high resolution. A total of 24,309 worms are annotated, with a minimum of 38 worms / image and a maximum of 132 worms / image, with an average of 81 worms per image. Each time, 200 images of activated sludge microorganisms under the microscope are used as training sets, and 100 images of activated sludge microorganisms under the microscope are used as test sets. The number of worm image datasets is shown in Table 1.
[0052] Table 1 Introduction to the image dataset of clumpworm
[0053] Microbial species Number of images Number of worms branchworm 300 24309
[0054] During training, the activated sludge microscopic images are intelligently identified in the activated sludge microbial counting network ASMCounter.
[0055] Specifically, the activated sludge microscopic image is preprocessed to obtain a plurality of image blocks. p , Height p Divide the blocks evenly. Width p The value range is [128-Width / 2], height Height p The value range of is [128-Height / 2], where Width and Height represent the width and height of the original activated sludge image under the microscope, respectively.
[0056] The obtained image block is then input into the feature extraction subnetwork to extract the features of the image block and obtain the feature mapping matrix h, w and c represent the height, width and number of feature channels of the feature map, respectively. The feature map matrix F is input into the microbial quantity analysis subnetwork to obtain the microbial density perception feature Based on the density-aware feature F d Predict the number of microorganisms. Microbial perception features F d It also has density perception capability and contains microbial density information, which can be used to enhance the features of areas containing dense microorganisms. Therefore, the feature mapping matrix F from the feature extraction subnetwork and the microbial density perception feature F from the microbial quantity analysis subnetwork are combined. d The input is into the microbial information analysis subnetwork to analyze the microbial type and location, and generate prediction results of microbial type and location information.
[0057] like Figure 2As shown, the microbial quantity analysis subnetwork MQA includes a microbial density information extraction module and an intelligent counting module. In this embodiment, the microbial density information extraction module is composed of trainable parameters θ LEFU The characterized (6 to 10 layers) deep convolutional neural network is used to extract features from the activated sludge microscopic images, and Table 2 shows a 9-layer example; the intelligent counting module has a convolutional layer with a 1×1 convolution kernel and ReLU excitation.
[0058] Table 2 A typical example of microbial information extraction module
[0059] layer type 1 Conv(3,1,1,8)+ReLU() 2 Conv(3,1,1,16)+ReLU() 3 Conv(3,1,1,32)+ReLU() 4 Conv(3,1,1,16)+ReLU() 5 Conv(3,1,1,8)+ReLU() 6 Conv(3,1,1,16)+ReLU() 7 Conv(3,1,1,32)+ReLU() 8 Conv(3,1,1,16)+ReLU() 9 Conv(3,1,1,1)+ReLU()
[0060] When the feature mapping matrix F is input into the microbial quantity analysis subnetwork MQA, it is first input into the microbial density information extraction module to generate the microbial density perception feature Then the intelligent counting module senses the characteristics F according to the microbial density d Predict and output the number of microorganisms, and use the microbial density perception feature F d Mapped to a single-channel density feature with non-negative values
[0061] The counting loss function of the microbial quantity analysis subnetwork MQA is:
[0062] L MD =|||MD|| 1 -NUM|,
[0063] Among them, ||·|| 1 Represents the entry-by-entry L of the matrix 1 The norm, density map MD estimates the microbial density level across spatial dimensions, and NUM is the number of manually marked microorganisms in the image, which is the actual number of sphaerocarp in this embodiment.
[0064] like Figure 3 As shown in Figure 1, the microbial information analysis subnetwork MIA includes a feature extraction module FEIMD that integrates microbial density, a feature extraction module that integrates global information, a microbial identification module, and a microbial positioning module. The feature mapping matrix F from the feature extraction subnetwork and the microbial density perception feature F from the microbial quantity analysis subnetwork MQA d First, it is fed into the feature extraction module FEIMD that integrates the microbial density information, and the feature is enhanced using the microbial density information to generate the analysis feature F of the fused density information. L ; The analysis feature F of the fusion density information LThe image of the activated sludge under the microscope is transmitted to the feature extraction module that integrates the global information for feature extraction, generating the analysis features of the integrated density information; finally, the analysis features of the integrated density information are transmitted to the microbial identification module and the microbial positioning module at the same time, and the analysis features of the integrated density information are mapped to the confidence through the microbial identification module, and mapped to the point coordinates through the microbial positioning module, generating the microbial type and location information prediction results including the microbial type and microbial location. represents the prediction results of all queried microbial information, n refers to the number of microorganisms detected by the network, and p i is the predicted confidence of the possibility that the determined point (the center of the suspected foreground (microorganism) detected by the network) belongs to the foreground, Indicates the prediction result of the network, which is a coordinate information. is the predicted coordinate of the ith pair, indicating the actual point coordinates, obtained by manual annotation, K refers to the number of detection points (microorganisms) that achieve matching, and the prediction result and the true value. Since n is greater than NUM, each microorganism There is a matching prediction result.
[0065] In this embodiment, the feature extraction module FEIMD that integrates microbial density information uses microbial density information (information on dense and sparse distribution of microorganisms in the image) to enhance the features. Its network structure is as follows: Figure 4 As shown, it includes two multi-layer perceptrons MLP, L-level high-order feature extraction modules HLFE, and L-level low-order feature extraction modules LLFE. L is a configurable parameter with a value range of 3-8, and a preferred value of 4 or 5.
[0066] The feature extraction module FEIMD that integrates microbial density information accepts two inputs, namely the feature mapping matrix F from the feature extraction subnetwork and the microbial density perception feature F from the microbial quantity analysis subnetwork MQA. d .
[0067] The feature extraction module FEIMD that integrates microbial density information works as follows:
[0068] Use the first multi-layer perceptron MLP to map the feature map matrix F to The first multi-layer perceptron MLP is cascaded sequentially with the high-order feature extraction module HLFE.
[0069] The second multi-layer perceptron MLP is used to transform the microbial density perception feature F d Map to To match the number of feature channels c, the second multi-layer perceptron MLP is followed by a cascade of low-order feature extraction modules LLFE.
[0070] The l-th level high-order feature extraction module merges the high-order features from the l-1-th level high-order feature extraction module and the low-order features from the l-1-th level low-order feature extraction module, l=2,3,…,L. The first-level high-order feature extraction module reshapes the feature maps outputted from the first multilayer perceptron and the second multilayer perceptron.
[0071] The characteristic of the multilayer perceptron MLP is that all neurons between layers are interconnected, and the input-output relationship reflected by the existing training data is fitted by adjusting the weight parameters and bias parameters of the multilayer perceptron MLP.
[0072] Specifically, Figure 4 As shown, the input of the first-level high-order feature extraction module HLFE is the feature map output from the first multi-layer perceptron MLP and the feature map output by the second multilayer perceptron MLP This process is given by the following formula:
[0073]
[0074] Among them, F 1 represents the input of the first-level high-order feature extraction module HLFE, F 2 represents the input of the second-level high-order feature extraction module HLFE, R S (·) represents the operation of reshaping the feature map by flattening the spatial dimensions, and HLFE(·) represents the high-level feature extraction module HLFE. Then, the subsequent high-level feature extraction module HLFE is used to further refine the features as shown below:
[0075]
[0076]
[0077]
[0078] Among them, F i+1 represents the input of the i+1th level high-order feature extraction module HLFE, represents the input of the first-level low-level feature extraction module LLFE, Represents the input of the i-th level low-order feature extraction module LLFE, and the total number of high-order feature extraction modules HLFE L also represents the total number of times the high-order features and low-order features are fused. After this formula, the analysis feature F of the fusion density information forwarded to the feature extraction module that fuses the global information is obtained. L ∈R hw×c .
[0079] The action process of the feature extraction module FEIMD that integrates microbial density information can be explained from the perspective of high-order information and low-order information. Before each high-order feature extraction module HLFE, the high-order features from the previous high-order feature extraction module HLFE and the low-order features from the LLFE module are merged. In the process, the high-order feature information and the low-order feature information are gradually integrated, which improves the feature expression ability of the module.
[0080] The feature extraction module that integrates global information includes L layers of feature extraction modules, where L is a configurable parameter, which is consistent with the configuration number L in the feature extraction module FEIMD that integrates microbial density information. Each layer of feature extraction module contains a self-attention module, a cross-attention layer, and a feedforward network FFN, which performs simple feature extraction on the microbial image blocks and then performs feature fusion.
[0081] A typical example of the microorganism identification module is shown in Table 3, and a typical example of the microorganism positioning module is shown in Table 4.
[0082] Table 3 A typical example of a microbial recognition module
[0083] layer type 1 Conv(3,3,1,1) 2 Conv(3,3,1,1) 3 <![CDATA[Conv2d(1×1,1,0,N cls )]]>
[0084] Table 4 A typical example of a microbial localization module
[0085] layer Location 1 Conv(3,3,1,1) 2 Conv(3,3,1,1) 3 Conv2d(1×1,1,0,4×reg_max)
[0086] The loss function of the microbial information analysis subnetwork MIA is:
[0087] L MA =L c +L l ,
[0088] Among them, the classification loss L c The matching prediction confidence is improved and the unmatched prediction confidence is suppressed. To supervise the learning process of the predicted coordinates, the positioning loss L is also calculated. l , which measures the L between the matched predicted coordinates and the corresponding true coordinates l Distance. In this embodiment, the classification loss L c To calculate whether the anchor box and the corresponding calibration classification are correct, the existing classification loss function can be used, such as by increasing the FocalLoss loss of the difficult classification category; the positioning loss L l You can use the existing positioning loss function, such as GIoU_Loss loss.
[0089] The loss function of the activated sludge microbial counting network ASMCounter is:
[0090] L=λ MD *L MD+L MA ,
[0091] Among them, λ MD The weight λ is the weight of the counting loss function of the microbial population analysis subnetwork MQA. MD The calculation method is as follows As shown in the figure, the construction idea reflects that the more the number of worms in the image, the greater the weight of the counting loss function of the quantity analysis subnetwork. Because the more the number of worms in the image, the more difficult it is to accurately identify and locate them, and the lower the reliability of the obtained microbial type and location.
[0092] Among them, NUM-T is an adjustment value, and its value range is [1-100], and the preferred value is [40-60]. Therefore, the loss function of the activated sludge microbial counting network ASMCounter is expressed as:
[0093]
[0094] This loss function is used to jointly train the microbial quantity analysis subnetwork MQA and the microbial information analysis subnetwork MIA. During inference, the prediction results are obtained from the microbial information analysis subnetwork MIA.
[0095] Experimental Results
[0096] Comparison Method
[0097] Since there is no method specifically designed for automatic counting of microorganisms under the activated sludge microscope at this stage, 6 counting methods with different technical routes were selected as comparison benchmarks. The selected methods include: YOLO v3, YOLO v5, P2PNet, CLTR, MPS and DSSI-Net. Among them, YOLO v3 and YOLO v5 are based on target detection, P2PNet and CLTR are based on regression, and MPS and DSSI-Net are based on density map estimation.
[0098] Implementation details
[0099] All experiments are conducted on PyTorch and NVIDIA GPUs. For data augmentation, random size jitter and horizontal offset algorithms are used.
[0100] For the comparison methods YOLO v3, YOLO v5, P2PNet, CLTR, MPS, and DSSI-Net, the corresponding open source codes and default parameters were used.
[0101] The microbial quantity analysis subnetwork MQA and the microbial information analysis subnetwork MIA in the activated sludge microbial counting network ASMCounter can be trained simultaneously. For the preprocessing module network, the width Width of the image block is p , Height p All are set to 2048 pixels. When calculating the loss function of the activated sludge microbial counting network ASMCounter, the adjustment value NUM-T is set to 50. For the microbial quantity analysis subnetwork MQA, for the feature extraction module FEIMD that integrates microbial density information, the number L of its high-order feature extraction module HLFE and low-order feature extraction module LLFE is set to 4. During the training process, each batch contains 8 image blocks (batch size = 8), and the Adam optimizer is used.
[0102] Evaluation indicators
[0103] In order to evaluate the effectiveness of the comparison method and the proposed method, the mean absolute error (MAE), mean squared error (MSE), and root mean square error (RMSE) between the predicted counts and the true labeled counts of all activated sludge microbial microscopic images were calculated.
[0104] Mean absolute error MAE is also known as L1 norm loss.
[0105] Mean square error MSE is also known as L2 norm loss.
[0106] The root mean square error (RMSE) is the square root of MSE, where m refers to the number of images in the image dataset when calculating the indicator.
[0107] The smaller the value of the above index is, the smaller the average counting error of the corresponding method is, and the better its performance is. They represent the set of real annotated counts in the image and the set of microbial counts predicted by the counting method, m represents the number of microbial images under the activated sludge microscope that need to be counted, and y i and Represents the microorganisms under the i-th activated sludge microscope ( branchworm )The true number of annotations in the image and the microorganisms predicted by the counting method ( branchworm )quantity.
[0108] Comparative results of microbial (branchworm) counting experiment under microscope in activated sludge
[0109] The above experimental configuration was used for YOLO v3, YOLO v5, P2PNet, CLTR, MPS and DSSI-Net methods to conduct the microbial (branchworm) counting experiment under the activated sludge microscope. The experimental results are shown in Table 5. Among them, YOLO v3 and YOLOv5 are based on target detection, P2PNet and CLTR are based on regression, and MPS and DSSI-Net are based on density map estimation. At the same time, the MAE, MSE, and RMSE indicators of the comparison results of the microbial (branchworm) counting experiment under the activated sludge microscope by different methods are respectively used Figure 5 , Figure 6 , Figure 7 It is shown for a more intuitive performance comparison. It can be seen that the activated sludge microbial counting network ASMCounter proposed in the present invention has achieved the best results (smallest value and bold font) in the above three indicators.
[0110] Table 5 Comparative results of the experiment on counting worms under the activated sludge microscope
[0111]
[0112]
[0113] This embodiment only uses the example of the sphaerocephalus to illustrate the present invention, and the same method can be used to perform intelligent identification on other microorganisms in the activated sludge.
[0114] The present invention also provides an activated sludge microorganism intelligent identification system, including an image receiving module, a processing module and a storage module. The image receiving module is used to receive a microscopic image of activated sludge containing microorganisms and send it to the processing module. The processing module is communicatively connected to the storage module. The storage module is used to store at least one executable instruction. The executable instruction enables the processing module to perform operations corresponding to the above-mentioned activated sludge microorganism intelligent identification method according to the image it receives, so as to identify the activated sludge microorganisms.
[0115] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "examples", "specific examples", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.
[0116] Although the embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the claims and their equivalents.
Claims
1. A method for intelligent identification of activated sludge microorganisms, characterized in that: The following steps are involved: Obtain microscopic images of activated sludge containing microorganisms; An activated sludge microbial counting network is constructed, and the activated sludge microbial counting network is intelligently identified by using the activated sludge microbial counting network under the microscope, specifically: Preprocessing the activated sludge microscopic image to obtain a plurality of image blocks; The image block is input into the feature extraction subnetwork to extract the features of the image block and obtain the feature mapping matrix; Inputting the feature mapping matrix into a microbial quantity analysis subnetwork to obtain microbial density perception features, and predicting the number of microorganisms based on the density perception features; Inputting the feature mapping matrix and the microbial density perception feature into the microbial information analysis subnetwork, analyzing the microbial type and microbial location, and generating microbial type and location information prediction results; When the feature mapping matrix and the microbial density perception feature are input into the microbial information analysis subnetwork, the feature extraction module of the microbial density information fusion of the microbial information analysis subnetwork generates analysis features of the fused density information using the microbial density information; the analysis features of the fused density information and the feature extraction module of the fused global information of the activated sludge microscopic image transmission microbial information analysis subnetwork are subjected to feature extraction to generate analysis features of the fused density information; The analysis features of the fused density information are simultaneously transmitted to the microorganism identification module and the microorganism positioning module. The analysis features of the fused density information are mapped to confidence through the microorganism identification module and mapped to point coordinates through the microorganism positioning module to generate a microorganism type and position information prediction result including the microorganism type and microorganism position.
2. The method for intelligent identification of activated sludge microorganisms according to claim 1, characterized in that: When the feature mapping matrix is input into the microbial quantity analysis subnetwork, the microbial density information extraction module of the microbial quantity analysis subnetwork generates a microbial density perception feature, and the intelligent counting module of the microbial quantity analysis subnetwork predicts and outputs the number of microorganisms based on the microbial density perception feature.
3. The method for intelligent identification of activated sludge microorganisms according to claim 1, characterized in that: The feature extraction module integrating microbial density information includes 2 multi-layer perceptrons, L-level high-order feature extraction modules, and L-level low-order feature extraction modules, where L is a configurable parameter; The feature mapping matrix is input into the first multilayer perceptron, and the feature mapping matrix is mapped to The high-order feature extraction modules are sequentially cascaded after the first multi-layer perceptron; The microbial density perception feature is input into a second multi-layer perceptron, and the microbial density perception feature is mapped to To match the number of feature channels c, the second multilayer perceptron is sequentially cascaded with the low-order feature extraction modules; The l-th level high-order feature extraction module previously merges the high-order features from the l-1-th level high-order feature extraction module and the low-order features from the l-1-th level low-order feature extraction module, and the 1-th level high-order feature extraction module previously reshapes the feature maps outputted from the first multilayer perceptron and the second multilayer perceptron.
4. The method for intelligent identification of activated sludge microorganisms according to claim 1, characterized in that: The feature extraction module for fusing global information includes L layers of feature extraction modules, where L is a configurable parameter. Each layer of feature extraction module includes a self-attention module, a cross-attention layer and a feedforward network, and performs feature extraction on microbial image blocks and then performs feature fusion.
5. The method for intelligent identification of activated sludge microorganisms according to claim 1, characterized in that: The loss function of the activated sludge microbial counting network is: Among them, L MD is the counting loss function of the microbial population analysis subnetwork, L MA is the loss function of the microbial information analysis subnetwork, NUM is the number of manually labeled microorganisms in the image, and NUM-T is an adjustment value.
6. The method for intelligent identification of activated sludge microorganisms according to claim 1 or 5, characterized in that: The counting loss function of the microbial population analysis subnetwork is: L MD =|||MD||1-NUM|, where ||·||1 represents the item-wise L1 norm of the matrix, and MD is the density map used to estimate the microbial density level in the spatial feature dimension.
7. The method for intelligent identification of activated sludge microorganisms according to claim 1 or 5, characterized in that: The loss function of the microbial information analysis subnetwork is: L MA =L c +L l , where L c is the classification loss, L l For the localization loss, the distance between the matched predicted coordinates and the corresponding true coordinates is measured.
8. An intelligent identification system for activated sludge microorganisms, characterized in that: It includes an image receiving module, a processing module and a storage module. The image receiving module is used to receive an image of activated sludge containing microorganisms under a microscope and send it to the processing module. The processing module is communicatively connected to the storage module. The storage module is used to store at least one executable instruction. The executable instruction enables the processing module to perform an operation corresponding to the method for intelligent identification of activated sludge microorganisms as described in any one of claims 1 to 7 according to the image it receives, so as to identify the activated sludge microorganisms.
