Method for intelligently identifying and counting state of aerobic granular sludge
By using the YOLOv8n model combined with the DarkNet network and SimAM attention mechanism, the misjudgment, strong subjectivity and low efficiency of aerobic sludge status assessment in the prior art was solved, and more accurate and efficient identification and statistics were achieved, improving the stability and adaptability of the sewage treatment system.
Patent Information
- Application Number
- CN202411556154.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-04
- Publication Date
- 2025-03-28
AI Technical Summary
The prior art has problems such as misjudgment, strong subjectivity, low efficiency and difficulty in achieving rapid large-scale sample processing when evaluating the state of aerobic granular sludge.
The YOLOv8n model is used to combine the DarkNet network and SimAM attention mechanism to identify and count aerobic particle sludge through the input of microscopic images, providing more accurate and efficient identification results.
It improves the accuracy and efficiency of aerobic particle sludge status recognition, reduces subjective and objective errors in manual interpretation, can achieve rapid identification and statistics of large numbers of samples, and improves the stability and adaptability of the sewage treatment system.
Smart Images

Figure CN119723568A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a method for identifying and counting the state of aerobic granular sludge in the field of wastewater treatment, and in particular to a method for intelligently identifying and counting the state of aerobic granular sludge. Background Art
[0002] Aerobic granular sludge (AGS) is a granular activated sludge formed by microbial self-aggregation. In the aerobic granular sludge process, the formation and rupture of particles to re-formation is a dynamic and complex process. According to the formation process of aerobic granular sludge, the state of aerobic granular sludge is divided into four periods: initial stage (IS), growth stage (GS), maturity stage (MS) and lysis stage (CS). Identifying the state of aerobic granular sludge and counting the number of aerobic granular sludge in each period can help to grasp the formation conditions of aerobic granular sludge and effectively control it, thereby optimizing the sewage treatment process, improving efficiency, reducing costs, and enhancing the stability and adaptability of the process.
[0003] The current method of evaluating the state of aerobic granular sludge mainly relies on microscopic imaging and manual judgment, and this process has many shortcomings. First, microscopic imaging technology is affected by equipment models, parameters and various environmental factors. The resolution, imaging quality and light parameters of different microscopes may vary, which may lead to misjudgment of the state of granular sludge. Fluctuations in environmental factors such as temperature and humidity will also affect the imaging quality, further increasing the variables and difficulty in the evaluation process.
[0004] First, the manual discrimination process is highly dependent on the subjective judgment of the operator, which not only increases the uncertainty of the results, but also limits the objectivity and repeatability of the evaluation. The reliance on experience also means that the evaluation results may vary from operator to operator, affecting the consistency and reliability of the data. Secondly, the traditional method is very cumbersome in statistics and analysis, requiring a lot of manpower and time, and it is difficult to achieve rapid processing of large-scale samples.
[0005] Therefore, there is an urgent need for a method that can accurately identify aerobic granular sludge, which can detect aerobic granular sludge more accurately, standardly and reliably, and then realize the rapid, accurate and automated evaluation of the state of aerobic granular sludge. Summary of the invention
[0006] The purpose of the present invention is to overcome the above-mentioned deficiencies in the prior art and to provide a method for intelligently identifying the state of aerobic granular sludge and statistics.
[0007] The first object of the present invention is to provide a method for intelligently identifying the state of aerobic granular sludge and statistics.
[0008] The second object of the present invention is to provide the application of the above method in aerobic granular sludge identification and statistics.
[0009] The third object of the present invention is to provide a model for aerobic granular sludge identification and statistics.
[0010] In order to achieve the above object, the present invention is implemented by the following scheme:
[0011] A method for intelligently identifying and counting aerobic granular sludge states, characterized by comprising:
[0012] Obtain a microscopic image of the aerobic granular sludge to be tested, input it into the trained YOLOv8n model, and obtain the recognition and statistical results of the aerobic granular sludge to be tested;
[0013] The trained YOLOv8n is a YOLOv8n model trained using training set and validation set data;
[0014] The training set and validation set data also contain microscopic images of aerobic granular sludge in the initial stage, growth stage, maturity stage and lysis stage.
[0015] Preferably, the intelligent identification of the state of aerobic granular sludge is to identify the aerobic granular sludge as aerobic granular sludge in the primary stage, growth stage, maturity stage and lysis stage.
[0016] Preferably, after the microscopic image of the aerobic granular sludge to be tested is input into the trained YOLOv8n model, the confidence threshold is determined based on the requirements for the recall rate and precision of the predicted category.
[0017] More preferably, the confidence threshold interval is 0.25-0.6.
[0018] More preferably, the microscopic image of the aerobic granular sludge to be tested is obtained using an optical microscope.
[0019] More preferably, the optical microscope is an optical microscope with a "depth of field synthesis" function.
[0020] Further preferably, the eyepiece magnification of the optical microscope is 4 times or 5 times.
[0021] Preferably, the microscopic images in the training set and validation set data are acquired using an optical microscope and are annotated with YOLO label categories.
[0022] More preferably, the total number of microscopic images in the training set and test set data is no less than 100.
[0023] Among them, multiple aerobic granular sludges are allowed to exist simultaneously in one microscopic image in the training set and validation set data, and can be labeled as aerobic granular sludges with different identification results.
[0024] More preferably, Labelimg software is used to annotate YOLO label categories.
[0025] Preferably, the classification criteria for aerobic granular sludge in the primary stage, growth stage, maturity stage and lysis stage in the training set and validation set data are:
[0026] The particle size of aerobic granular sludge in the primary stage is 200-500 μm, and the color is light yellow or smaller yellow;
[0027] The particle size of aerobic granular sludge in the growth stage is 400-1000 μm, and the color is light yellow-brown, dark brown or black;
[0028] The particle size of mature aerobic granular sludge is 500-3000 μm, the color is black-brown or melanin, and the shape is oval or round particles with smooth edges;
[0029] The particle size of aerobic granular sludge in the lysis stage is greater than 2000 μm, and its color is yellow, brown or black, with rough edges and irregular cracks in the middle.
[0030] Preferably, the YOLOv8n model is based on the DarkNet network and adds the SimAM attention mechanism.
[0031] Preferably, the training using training set and validation set data is specifically as follows: inputting the microscopic images in the training set and validation set data into the YOLOv8n model, using the aerobic granular sludge classification and annotation results in the microscopic images as prediction values for training, and obtaining a trained YOLOv8n model.
[0032] SimAM calculates the similarity between microscopic images and weights them, so that the model pays more attention to the key information in the microscopic images, improves the model's recognition progress of aerobic granular sludge characteristics, and thus improves the accuracy of identifying aerobic granular sludge at different periods.
[0033] More preferably, the number of training iterations is set to 100, the initial learning rate is set to 0.01, the gradient descent amount is 0.937, the bounding box loss is 7.5, the classification loss is 0.5, the distribution focus loss is 1.5, and an early stopping strategy is added.
[0034] The early stopping strategy stops training when the model validation loss stops improving to avoid overfitting of the model.
[0035] Further preferably, in the last 10 training iterations, Mosaic enhancement is turned off.
[0036] Preferably, after obtaining the identification result of the aerobic granular sludge to be tested, global variables are also defined; the global variables include label categories and the number of categories; the label categories include primary aerobic granular sludge (IS), growth aerobic granular sludge (GS), mature aerobic granular sludge (MS) and lysis aerobic granular sludge (CS), and the number of categories is the number of corresponding label categories.
[0037] The present invention also seeks to protect the application of any of the above-mentioned methods in aerobic granular sludge identification and statistics.
[0038] The present invention also claims protection for a model for aerobic granular sludge identification and statistics, wherein the model is the trained YOLOv8n model described above.
[0039] Compared with the prior art, the present invention has the following beneficial effects:
[0040] The present invention provides a method for intelligently identifying the state and statistics of aerobic granular sludge, including: obtaining a microscopic image of the aerobic granular sludge to be tested, and inputting it into a trained YOLOv8n model to obtain an identification result of the aerobic granular sludge to be tested; the trained YOLOv8n is a YOLOv8n model trained using training set and validation set data; the training set and validation set data simultaneously contain microscopic images of aerobic granular sludge in the primary stage, growth stage, mature stage and lysis stage. When the method of the present invention is used to identify aerobic granular sludge, the accuracy is higher, and the subjective and objective errors caused by manual interpretation are avoided. It is not only more accurate, but also more efficient, and can achieve global identification and statistics of a large number of samples, significantly improving the efficiency and accuracy of aerobic granular sludge state assessment. And after accurate identification and statistics of aerobic granular sludge are achieved, it is helpful to adjust and control the process parameters of the sewage treatment system in real time, improve the stability and adaptability of the sewage treatment system, and thus improve environmental governance technology. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] Figure 1 Flow chart for the construction of aerobic granular sludge identification model;
[0042] Figure 2 This is a schematic diagram of feature annotation using Labelimg software;
[0043] Figure 3 A schematic diagram of the experimental group characteristics in Example 1;
[0044] Figure 4 This is a schematic diagram of the characteristic annotation of the control group in Example 1;
[0045] Figure 51 is a precision-recall curve diagram, an F1 value-confidence curve diagram and a recall-confidence curve diagram of the aerobic granular sludge recognition model of the experimental group and the aerobic granular sludge recognition model of the control group in Example 1; a is a precision-recall curve diagram of the control group, b is a precision-recall curve diagram of the experimental group, c is an F1 value-confidence curve diagram of the control group, d is an F1 value-confidence curve diagram of the experimental group, e is a recall-confidence curve diagram of the control group, and f is a recall-confidence curve diagram of the experimental group;
[0046] Figure 6 It is a schematic diagram of the code output result and part of the intelligent recognition result when the aerobic granular sludge recognition model of the experimental group is used to recognize the aerobic granular sludge of the detection set 1 in Example 2;
[0047] Figure 7 It is a schematic diagram of the code output results and some intelligent recognition results when the aerobic granular sludge recognition model of the experimental group is used to identify the aerobic granular sludge of the detection set 2 in Example 3;
[0048] Figure 8 This is a schematic diagram of the code output results and some intelligent recognition results when the aerobic granular sludge recognition model of the experimental group is used to identify the aerobic granular sludge of the detection set 3 in Example 4. DETAILED DESCRIPTION
[0049] The present invention is further described in detail below in conjunction with the accompanying drawings and specific examples of the specification. The examples are only used to explain the present invention and are not used to limit the scope of the present invention. The test methods used in the following examples are conventional methods unless otherwise specified; the materials and reagents used are reagents and materials that can be obtained from commercial channels unless otherwise specified.
[0050] Example 1 A method for intelligently identifying the state of aerobic granular sludge and statistics
[0051] 1. Construction of aerobic granular sludge identification model
[0052] The flow chart of the construction of aerobic granular sludge identification model is as follows: Figure 1 shown.
[0053] 1. Methods
[0054] (1) Image sample collection
[0055] In a continuous-flow aerobic granular sludge membrane bioreactor (aerobic granular sludge bioreactor 1) that was in continuous operation for 375 days, an optical microscope with depth of field synthesis was used with the eyepiece magnification set to 4 times to obtain 260 microscopic images (dataset) of aerobic granular sludge.
[0056] The aerobic granular sludge bioreactor 1 is divided into an aerobic aeration zone and an anaerobic stirring zone, with an effective volume of 36 L. The effluent quality is stable, and the particle size range of the aerobic granular sludge obtained during operation is 200-3500 μm.
[0057] (2) Image annotation and dataset classification
[0058] The microscopic images obtained in step (1) were annotated according to the following rules to obtain experimental group data and control group data, as follows:
[0059] Experimental group data: For the microscopic images in the data set obtained in step (1), the YOLO label was selected using Labelimg software to perform experimental group feature annotation. The 260 microscopic images of aerobic granular sludge annotated with the experimental group features were randomly divided into a training set and a test set at a ratio of 8:2, resulting in a training set 1 containing 208 microscopic images and a test set 1 containing 52 microscopic images. The schematic diagram of feature annotation using Labelimg software is shown in the figure below. Figure 2 shown.
[0060] The schematic diagram of the experimental group feature annotation is as follows Figure 3 As shown in the figure, specifically, the initial aerobic granular sludge (IS), growth aerobic granular sludge (GS), mature aerobic granular sludge (MS) and lysis aerobic granular sludge (CS) in the microscopic images of training set 1 and test set 1 are labeled; the particle size of the initial aerobic granular sludge is 200-500μm, and the color is light yellow or smaller yellow; the particle size of the growth aerobic granular sludge is 400-1000μm, and the color is light yellow brown, dark brown or black; the particle size of the mature aerobic granular sludge is 500-3000μm, the color is dark brown or melanin, the shape is oval or round particles with smooth edges; the particle size of the lysis aerobic granular sludge is greater than 2000μm, the color is yellow, brown or black, and the edges are rough, with irregular cracks in the middle.
[0061] The recognition results of aerobic granular sludge of training set 1 and test set 1 annotated according to the above experimental group standards using Labelimg software were recorded as the actual recognition results of aerobic granular sludge of training set 1 and the actual recognition results of aerobic granular sludge of test set 1.
[0062] Control group data: For the microscopic images in the data set obtained in step (1), Labelimg software was used to select the YOLO label to perform control group feature annotation. The 260 microscopic images of aerobic granular sludge annotated with the control group features were randomly divided into a training set and a test set in a ratio of 8:2, resulting in a training set 2 containing 208 microscopic images and a test set 2 containing 52 microscopic images.
[0063] The schematic diagram of the characteristic annotation of the control group is as follows Figure 4 As shown, specifically, the initial aerobic granular sludge (IS), growth aerobic granular sludge (GS), mature aerobic granular sludge (MS) and lysis aerobic granular sludge (CS) in the microscopic images of training set 2 and test set 2 are labeled; the feature labeling standard of the control group is: the particle size of the initial aerobic granular sludge is 200-400μm; the particle size of the growth aerobic granular sludge is 400-1000μm; the particle size of the mature aerobic granular sludge is 1000-2500μm; the particle size of the lysis aerobic granular sludge is>2500μm; and the recognition results of the aerobic granular sludge of training set 2 and test set 2 labeled by Labelimg software according to the feature labeling standard of the control group are recorded as the actual recognition results of the aerobic granular sludge of training set 2 and the actual recognition results of the aerobic granular sludge of test set 2.
[0064] 2. Training of aerobic granular sludge identification model
[0065] The aerobic granular sludge recognition model of the experimental group is the YOLOv8n model, which is based on the DarkNet network and has an attention mechanism added.
[0066] The training set 1 data in the experimental group data obtained in step (2) is used as input, and the classification and labeling results of aerobic granular sludge in the training set 1 data are used as the predicted value, which is input into YOLOv8n for training, and an early stopping strategy is added to obtain the aerobic granular sludge recognition model of the experimental group;
[0067] During the training process, the parameters of the aerobic granular sludge recognition model were set as follows: epoch was 100, the initial learning rate was set to 0.01, the gradient descent amount was 0.937, the bounding box loss was 7.5, the classification loss was 0.5, the distribution focus loss was 1.5, the batch size was 16, and the other parameters were default; at the same time, in the last 10 rounds of training iterations, Mosaic enhancement was turned off.
[0068] Then, the test set 1 data in the experimental group data obtained in step (2) is input into the experimental group aerobic granular sludge recognition model to evaluate the generalization ability of the model and obtain a performance evaluation curve. The performance evaluation parameters include precision, F1 value and recall rate.
[0069] The aerobic granular sludge recognition model of the control group is the YOLOv8n model, which is based on the DarkNet network and has an attention mechanism added.
[0070] The training set 2 data in the control group data obtained in step (2) is used as input, and the classification and labeling results of the aerobic granular sludge in the training set 2 data are used as the predicted value, which is input into YOLOv8n for training, and an early stopping strategy is added to obtain the aerobic granular sludge recognition model of the control group;
[0071] During the training process, the parameters of the aerobic granular sludge recognition model were set as follows: epoch was 100, the initial learning rate was set to 0.01, the gradient descent amount was 0.937, the bounding box loss was 7.5, the classification loss was 0.5, the distribution focus loss was 1.5, the batch size was 16, and the other parameters were default; at the same time, in the last 10 rounds of training iterations, Mosaic enhancement was turned off.
[0072] Then, the test set 2 data in the control group data obtained in step (2) is input into the control group aerobic granular sludge recognition model to evaluate the generalization ability of the model and obtain a performance evaluation curve. The performance evaluation parameters include precision, F1 value, recall rate and recall rate.
[0073] The precision-recall curve, F1 value-confidence curve and recall-confidence curve were drawn for the aerobic granular sludge recognition model of the experimental group and the aerobic granular sludge recognition model of the control group.
[0074] 2. Results
[0075] The precision-recall curve, F1 value-confidence curve and recall-confidence curve of the aerobic granular sludge recognition model in the experimental group and the aerobic granular sludge recognition model in the control group are shown in Figure 2. Figure 5 As shown, a is the precision-recall curve of the control group, b is the precision-recall curve of the experimental group, c is the F1 value-confidence curve of the control group, d is the F1 value-confidence curve of the experimental group, e is the recall-confidence curve of the control group, and f is the recall-confidence curve of the experimental group.
[0076] The results showed that when the aerobic granular sludge recognition model in the control group identified four types of aerobic granular sludge, the accuracy reached 1.00 when the confidence level was 0.839, and the accuracy decreased significantly when the confidence level decreased; the F1 value reached 0.84 when the confidence level was 0.219, indicating that the aerobic granular sludge recognition model in the control group was able to identify most types of aerobic granular sludge at very low confidence levels, but its accuracy was insufficient.
[0077] When the aerobic granular sludge recognition model of the experimental group identified four types of aerobic granular sludge, the accuracy reached 1.00 when the confidence was 0.953, and the accuracy did not drop significantly when the confidence was reduced. When the confidence was 0.000, the accuracy was still greater than 0.6; the F1 value reached 0.97 when the confidence was 0.593; the recall rate remained at 0.99 when the confidence was 0.000, indicating that the aerobic granular sludge recognition model of the experimental group can accurately identify most samples while taking into account accuracy.
[0078] It is shown that the feature annotation of the experimental group can more accurately identify aerobic granular sludge, and the aerobic granular sludge identification model of the experimental group can accurately identify aerobic granular sludge.
[0079] Example 2 Application of a method for intelligently identifying aerobic granular sludge status and statistics
[0080] 1. Methods
[0081] From a continuous-flow aerobic granular sludge membrane bioreactor (aerobic granular sludge bioreactor 1) that had been running continuously for 375 days, 165 microscopic images of aerobic granular sludge were randomly collected using an optical microscope with depth of field synthesis and an eyepiece magnification of 5 times, as detection set 1.
[0082] Take detection set 1 as input and input it into the experimental group aerobic granular sludge recognition model obtained in Example 1. Because the reactor is an aerobic granular sludge reactor that operates stably for a long time, the precision and recall rates of the target detection results are required to be equivalent. The confidence threshold is determined to be 0.40, and the recognition results of the experimental group aerobic granular sludge recognition model are obtained. The recognition statistics of each category of aerobic granular sludge are performed to obtain the category number of label categories of detection set 1 (define global variables).
[0083] 2. Results
[0084] When the aerobic granular sludge recognition model of the experimental group was used to perform aerobic granular sludge intelligent recognition on the 165 microscopic images of aerobic granular sludge in the detection set 1, the code output results of the detection set 1 and the schematic diagram of some randomly selected intelligent recognition results are shown in the figure. Figure 6 As shown; the results showed that a total of 107 primary aerobic granular sludges, 95 growth aerobic granular sludges, 31 mature aerobic granular sludges and 6 lysis aerobic granular sludges were identified and accumulated; the results showed that the aerobic granular sludge in the reactor from the detection set 1 was mainly in the primary and growth stages.
[0085] Example 3 Application of a method for intelligently identifying aerobic granular sludge status and statistics
[0086] 1. Methods
[0087] From a continuous-flow aerobic granular sludge membrane bioreactor (aerobic granular sludge bioreactor 2) that had been running continuously for 24 days, 147 microscopic images of aerobic granular sludge were randomly collected using an optical microscope with depth of field synthesis and an eyepiece magnification of 4 times, as detection set 2.
[0088] The aerobic granular sludge bioreactor 2 is rectangular in shape, with an effective volume of 24 L. The effluent quality is unstable, the total nitrogen removal rate is 25-98%, and the particle size (particle diameter) of the aerobic granular sludge obtained is in the range of 205-2800 μm.
[0089] The microscopic image of detection set 2 is used as input and input into the aerobic granular sludge recognition model of the experimental group obtained in Example 1. Since the reactor has a short startup time and unstable operation, the morphological state of the aerobic granular sludge is in a stage of rapid change, so the result of the target detection requires a higher recall rate. Therefore, the confidence threshold is determined to be 0.25, and the recognition result of the aerobic granular sludge recognition model of the experimental group is obtained. The recognition statistics of each category of aerobic granular sludge are performed to obtain the category number of the label category of detection set 2 (defining global variables).
[0090] 2. Results
[0091] When the aerobic granular sludge recognition model of the experimental group was used to perform aerobic granular sludge intelligent recognition on the 147 microscopic images of aerobic granular sludge in the detection set 2, the code output results of the detection set 2 and the schematic diagram of the randomly selected part of the intelligent recognition results are shown in the figure. Figure 7 As shown; the results showed that a total of 485 primary aerobic granular sludges, 97 growth aerobic granular sludges, 22 mature aerobic granular sludges and 7 lysis aerobic granular sludges were identified and accumulated; the results showed that the sludge in the reactor from the detection set 2 was mainly in the primary and growth stages, while the proportion of aerobic granular sludge in other categories was small.
[0092] Example 4 Application of a method for intelligently identifying aerobic granular sludge status and statistics
[0093] 1. Methods
[0094] From a continuous-flow aerobic granular sludge membrane bioreactor (aerobic granular sludge bioreactor 3) that had been running continuously for 88 days, an optical microscope with depth of field synthesis was used, with the eyepiece magnification selected as 5 times, to randomly collect 143 microscopic images of aerobic granular sludge as detection set 3.
[0095] The aerobic granular sludge bioreactor 3 is cylindrical in shape, with an effective volume of 85 L, and is divided into a central aeration zone and a peripheral anaerobic zone. The total nitrogen removal rate is >80%, and the particle size (particle diameter) of the obtained aerobic granular sludge ranges from 260 to 3000 μm.
[0096] The microscopic image of detection set 3 is used as input and input into the aerobic granular sludge recognition model of the experimental group obtained in Example 1. Because the reactor is in a period of high total nitrogen removal and the operation is stable, a high accuracy rate is required for the target detection result. Therefore, the confidence threshold is determined to be 0.60, and the recognition result of the aerobic granular sludge recognition model of the experimental group is obtained. The recognition statistics of each category of aerobic granular sludge are performed to obtain the category number of label categories of detection set 3 (defining global variables).
[0097] 2. Results
[0098] When the aerobic granular sludge recognition model of the experimental group was used to perform aerobic granular sludge intelligent recognition on 143 microscopic images of aerobic granular sludge in detection set 3, the code output results of detection set 3 and the schematic diagram of some randomly selected intelligent recognition results are shown in the figure. Figure 8 As shown; the results showed that a total of 22 aerobic granular sludges in the initial stage, 68 aerobic granular sludges in the growth stage, 79 aerobic granular sludges in the mature stage and 2 aerobic granular sludges in the lysis stage were identified and accumulated; the results showed that the sludge in the reactor from the detection set 3 source had more aerobic granular sludge in the growth and mature stages, and less aerobic granular sludge in the initial stage.
[0099] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit the protection scope of the present invention. For ordinary technicians in this field, other different forms of changes or modifications can be made based on the above descriptions and ideas. It is not necessary and impossible to list all the implementation methods here. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the claims of the present invention.
Claims
1. A method for intelligently identifying the state of aerobic granular sludge and statistics, characterized in that: include: Obtain a microscopic image of the aerobic granular sludge to be tested, input it into the trained YOLOv8n model, and obtain the recognition and statistical results of the aerobic granular sludge to be tested; The trained YOLOv8n model is a YOLOv8n model trained using training set and validation set data; The training set and validation set data also contain microscopic images of aerobic granular sludge in the initial stage, growth stage, maturity stage and lysis stage.
2. The method according to claim 1, characterized in that After the microscopic image of the aerobic granular sludge to be tested is input into the trained YOLOv8n model, the confidence threshold is determined based on the requirements for the recall and precision of the predicted category.
3. The method according to claim 2, characterized in that The confidence threshold interval is 0.25 to 0.
6.
4. The method according to claim 1, characterized in that: The microscopic images in the training set and validation set data are acquired using an optical microscope and are annotated with YOLO label categories.
5. The method according to claim 4, characterized in that Use Labelimg software to annotate YOLO label categories.
6. The method according to claim 1, characterized in that The classification criteria for aerobic granular sludge in the initial stage, growth stage, maturity stage and lysis stage in the training set and validation set data are: The particle size of aerobic granular sludge in the primary stage is 200-500 μm, and the color is light yellow or yellow; The particle size of aerobic granular sludge in the growth stage is 400-1000 μm, and the color is light yellow-brown, dark brown or black; The particle size of mature aerobic granular sludge is 500-3000 μm, the color is black-brown or melanin, and the shape is oval or round particles with smooth edges; The particle size of aerobic granular sludge in the lysis stage is greater than 2000 μm, and its color is yellow, brown or black, with rough edges and irregular cracks in the middle.
7. The method according to claim 1, characterized in that The YOLOv8n model is based on the DarkNet network and adds the SimAM attention mechanism.
8. The method according to claim 1, characterized in that The training using the training set and the validation set data is specifically as follows: the microscopic images in the training set and the validation set data are input into the YOLOv8n model, and the aerobic granular sludge classification and annotation results in the microscopic images are used as prediction values for training to obtain a trained YOLOv8n model.
9. Application of the method according to any one of claims 1 to 8 in the identification and statistics of aerobic granular sludge.
10. A model for aerobic granular sludge identification and statistics, characterized in that: The model is the trained YOLOv8n model described in claim 1.