Intelligent detection method, system and equipment for turbidity of activated sludge supernate based on image recognition, medium and product

Through an image recognition-based method, iterative labeling method and SVM model are used to realize the automated detection of turbidity of activated sludge supernatant, solving the problems of artificial detection in the prior art, which are large errors and high costs, and improving the accuracy and standardization of detection.

CN119831949APending Publication Date: 2025-04-15NORTH CHINA UNIVERSITY OF TECHNOLOGY +1
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202411885260.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-20
Publication Date
2025-04-15

AI Technical Summary

Technical Problem

The existing sewage treatment plants rely on artificial visual observation of the clarity of activated sludge supernatant, resulting in unreal-time detection results, large errors and a large labor cost, and lack unified image detection standards.

Method used

Using an image recognition-based method, the activated sludge images were acquired, and the U2-Net neural network was trained to perform supernatant image segmentation using iterative annotation method, feature vectors were extracted in combination with the HOG method, and turbidity detection was performed using the SVM model.

Benefits of technology

The automation and intelligence of turbidity detection of activated sludge supernatant has been realized, the standardization and accuracy of detection has been improved, labor costs have been reduced, and the detection results have been updated in real time.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119831949A_ABST
    Figure CN119831949A_ABST
Patent Text Reader

Abstract

The invention discloses an intelligent detection method, system and equipment for turbidity of activated sludge supernate based on image recognition, a medium and a product, and relates to the field of image recognizing.The method comprises the steps that an activated sludge image to be segmented is obtained; inputting an activated sludge image to be segmented into the supernate image segmentation model to obtain a supernate image; preprocessing the supernate image to obtain a supernate region image; performing feature extraction on the supernatant region image by adopting an HOG method to obtain a feature vector of the supernatant region image; and inputting the feature vector of the supernatant regional image into a supernatant turbidity detection model to obtain the supernatant turbidity. The automation degree and the intelligence degree of turbidity detection of the activated sludge supernate are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of image recognition, and in particular to an image recognition-based intelligent detection method, system, equipment, medium and product for turbidity of activated sludge supernatant. Background Art

[0002] At present, biological treatment is widely used as the mainstream technology in the field of sewage treatment, and the activated sludge technology with a century-old history is still the core process of many sewage treatment plants. The turbidity of the activated sludge supernatant is a key indicator reflecting the sludge settling efficiency, the removal of suspended solids, the degree of sludge aging and the overall sewage treatment status. Regular measurement and comprehensive analysis with other indicators are essential for evaluating the operating status and efficiency of sewage treatment plants. However, due to the influence of various factors including sludge type, treatment process and operating conditions, there is currently no unified image detection standard to define the turbidity of sludge supernatant. It is necessary to check the turbidity according to the specific scenario and analyze the corresponding sludge status and performance.

[0003] As sewage treatment is increasingly moving towards standardization and automation, intelligent detection of activated sludge supernatant turbidity has become an indispensable part. At present, most sewage treatment plants still rely on manual visual observation of the clarity of the supernatant and combined with experience to judge the state of the sludge. This practice not only consumes a lot of manpower costs, but also fails to achieve real-time data updates, which will lead to large judgment errors in the results. Summary of the invention

[0004] The purpose of this application is to provide an activated sludge supernatant turbidity intelligent detection method, system, equipment, medium and product based on image recognition, which can improve the automation and intelligence of activated sludge supernatant turbidity detection.

[0005] To achieve the above objectives, this application provides the following solutions:

[0006] In a first aspect, the present application provides an intelligent detection method for activated sludge supernatant turbidity based on image recognition, comprising:

[0007] Acquire an activated sludge image to be segmented;

[0008] The activated sludge image to be segmented is input into the supernatant image segmentation model to obtain the supernatant image; the supernatant image segmentation model is based on the supernatant image sample data, and uses the iterative labeling method to segment the U 2 -Net neural network is trained;

[0009] Preprocessing the supernatant image to obtain a supernatant region image;

[0010] The HOG method is used to extract the features of the supernatant area image, and the feature vector of the supernatant area image is obtained;

[0011] The feature vector of the supernatant area image is input into the supernatant turbidity detection model to obtain the supernatant turbidity; the supernatant turbidity detection model is obtained by training the SVM model through the supernatant turbidity sample data.

[0012] Optionally, preprocessing the supernatant image specifically includes:

[0013] The supernatant image was subjected to smoothing, denoising and median filtering.

[0014] Optionally, the training process of the supernatant image segmentation model specifically includes:

[0015] Constructing supernatant image sample data; the supernatant image sample data includes: a supernatant image training set and a supernatant image test set; the supernatant image training set and the supernatant image test set both include: a plurality of sample activated sludge images and sample supernatant images corresponding to the sample activated sludge images;

[0016] Based on the supernatant image sample data, an iterative annotation method is used to 2 -Net neural network model was trained and tested to obtain the supernatant image segmentation model.

[0017] Optionally, based on the supernatant image sample data, an iterative annotation method is used to 2 -Net neural network model is trained and tested to obtain the supernatant image segmentation model, which specifically includes:

[0018] The iterative annotation method is used to annotate U 2 -Net neural network model is trained to obtain the initial supernatant image segmentation model;

[0019] The initial supernatant image segmentation model is tested using the supernatant image test set to obtain the test accuracy of the initial supernatant image segmentation model;

[0020] Determining whether the test accuracy of the initial supernatant image segmentation model reaches a first preset accuracy;

[0021] If not, the sample supernatant images that have not been segmented in the supernatant image training set are determined as the sample supernatant images to be added, the sample supernatant images to be added are re-labeled to obtain the corresponding sample supernatant images, and the sample supernatant images to be added and the corresponding sample supernatant images are added to the supernatant image training set, and the training and testing are repeated until the first preset accuracy is reached to obtain the supernatant image segmentation model;

[0022] If so, the initial supernatant image segmentation model is determined as the supernatant image segmentation model.

[0023] Optionally, the training process of the supernatant turbidity detection model specifically includes:

[0024] Constructing supernatant turbidity sample data; the supernatant turbidity sample data includes: a supernatant turbidity training set, a supernatant turbidity test set and a supernatant turbidity verification set; the supernatant turbidity training set, the supernatant turbidity test set and the supernatant turbidity verification set all include: a plurality of sample supernatant region image feature vectors and corresponding sample supernatant turbidities;

[0025] Based on the supernatant turbidity sample data, the SVM model was trained, tested and verified to obtain the supernatant turbidity detection model.

[0026] Optionally, based on the supernatant turbidity sample data, the SVM model is trained, tested and verified to obtain a supernatant turbidity detection model, specifically including:

[0027] Taking the hyperplane that maximizes the classification interval as the goal, the SVM model is trained using the supernatant turbidity training set to obtain the initial supernatant turbidity detection model;

[0028] The initial supernatant turbidity detection model is tested using the supernatant turbidity test set to obtain the test accuracy of the initial supernatant turbidity detection model;

[0029] Determining whether the test accuracy of the initial supernatant turbidity detection model reaches a second preset accuracy;

[0030] If not, then the number of sample supernatant area image feature vectors and the corresponding sample supernatant turbidity in the supernatant turbidity sample data is increased, and the SVM model is retrained and tested;

[0031] If so, the initial supernatant turbidity detection model is determined as the supernatant turbidity detection model after the test;

[0032] The tested supernatant turbidity detection model is verified by the supernatant turbidity verification set to determine the supernatant turbidity detection model.

[0033] In a second aspect, the present application provides an activated sludge supernatant turbidity intelligent detection system based on image recognition, comprising:

[0034] An acquisition module, used for acquiring an activated sludge image to be segmented;

[0035] The supernatant image segmentation module is used to input the activated sludge image to be segmented into the supernatant image segmentation model to obtain the supernatant image; the supernatant image segmentation model is based on the supernatant image sample data, and adopts an iterative labeling method to U 2 -Net neural network is trained;

[0036] A preprocessing module, used for preprocessing the supernatant image to obtain a supernatant area image;

[0037] A feature extraction module is used to extract features of the supernatant area image using the HOG method to obtain a feature vector of the supernatant area image;

[0038] The supernatant turbidity detection module is used to input the feature vector of the supernatant area image into the supernatant turbidity detection model to obtain the supernatant turbidity; the supernatant turbidity detection model is obtained by training the SVM model through the supernatant turbidity sample data.

[0039] In a third aspect, the present application provides a computer device comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of any one of the above-mentioned methods for intelligent detection of activated sludge supernatant turbidity based on image recognition.

[0040] In a fourth aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of any of the above-mentioned methods for intelligent detection of activated sludge supernatant turbidity based on image recognition.

[0041] In a fifth aspect, the present application provides a computer program product, including a computer program, which, when executed by a processor, implements the steps of any of the above-mentioned methods for intelligent detection of activated sludge supernatant turbidity based on image recognition.

[0042] According to the specific embodiments provided in this application, this application has the following technical effects:

[0043] The present application provides an activated sludge supernatant turbidity intelligent detection method, system, equipment, medium and product based on image recognition. The activated sludge image to be segmented is first segmented by a supernatant segmentation model to obtain a supernatant image; then a supernatant region image is obtained by preprocessing; the HOG method is further used for feature extraction to obtain a feature vector of the supernatant region image; finally, the supernatant turbidity is obtained by detection by a supernatant turbidity detection model. The above overall process makes the judgment process of activated sludge supernatant turbidity more standardized, thereby improving the automation and intelligence of activated sludge supernatant turbidity detection. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0045] Figure 1 This is a diagram of the application environment of an intelligent detection method for activated sludge supernatant turbidity based on image recognition in one embodiment of the present application.

[0046] Figure 2 A schematic flow chart of an intelligent detection method for activated sludge supernatant turbidity based on image recognition provided in one embodiment of the present application.

[0047] Figure 3 This is a schematic diagram of the detailed process of the intelligent detection method for activated sludge supernatant turbidity based on image recognition.

[0048] Figure 4 A schematic diagram of the basic structure of an MLP provided in one embodiment of the present application.

[0049] Figure 5 The U of MLP is introduced in one embodiment of the present application. 2 -Net network structure diagram.

[0050] Figure 6 Schematic diagram of the refinement of the supernatant turbidity detection model training process.

[0051] Figure 7 A schematic diagram of the structure of a computer device provided in one embodiment of the present application. DETAILED DESCRIPTION

[0052] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0053] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, the present application is further described in detail below with reference to the accompanying drawings and specific implementation methods.

[0054] The intelligent detection method for activated sludge supernatant turbidity based on image recognition provided in the embodiments of the present application can be applied to Figure 1In the application environment shown. Among them, the terminal 102 communicates with the server 104 through the network. The data storage system can store the data that the server 104 needs to process. The data storage system can be set up separately, integrated on the server 104, or placed on the cloud or other servers. The terminal 102 can send the activated sludge image to be segmented to the server 104. After the server 104 receives the activated sludge image to be segmented, for the activated sludge image to be segmented, the server 104 inputs the activated sludge image to be segmented into the supernatant image segmentation model to obtain the supernatant image; then the supernatant image is preprocessed to obtain the supernatant area image; then, the HOG method is used to extract the features of the supernatant area image to obtain the feature vector of the supernatant area image; finally, the feature vector of the supernatant area image is input into the supernatant turbidity detection model to obtain the supernatant turbidity. The server 104 can feedback the obtained supernatant turbidity to the terminal 102. In addition, in some embodiments, the intelligent detection method of activated sludge supernatant turbidity based on image recognition can also be implemented independently by the server 104 or the terminal 102. For example, the terminal 102 can directly perform intelligent detection and processing on the activated sludge image to be segmented, or the server 104 can obtain the activated sludge image to be segmented from the data storage system and perform intelligent detection and processing on the activated sludge image to be segmented.

[0055] The terminal 102 may be, but is not limited to, various desktop computers, laptop computers, smart phones, tablet computers, IoT devices, and portable wearable devices. The IoT devices may be smart speakers, smart TVs, smart air conditioners, smart vehicle-mounted devices, etc. The portable wearable devices may be smart watches, smart bracelets, head-mounted devices, etc. The server 104 may be implemented as an independent server or a server cluster consisting of multiple servers, or may be a cloud server.

[0056] In an exemplary embodiment, Figure 2-Figure 3 As shown, an intelligent detection method for turbidity of activated sludge supernatant based on image recognition is provided, and the method comprises:

[0057] Step 1: Obtain the activated sludge image to be segmented.

[0058] Step 2: Input the activated sludge image to be segmented into the supernatant image segmentation model to obtain the supernatant image; the supernatant image segmentation model is based on the supernatant image sample data, and uses the iterative labeling method to segment the U 2 -Net neural network is trained.

[0059] Step 3: Preprocess the supernatant image to obtain a supernatant area image.

[0060] Specifically, Figure 3As shown, the supernatant area image preprocessing includes: smoothing, denoising and median filtering of the supernatant image.

[0061] Step 4: Use the HOG method to extract features of the supernatant area image and obtain the feature vector of the supernatant area image.

[0062] Step 5: Input the feature vector of the supernatant area image into the supernatant turbidity detection model to obtain the supernatant turbidity; the supernatant turbidity detection model is obtained by training the SVM model through the supernatant turbidity sample data.

[0063] In a specific embodiment, the training process of the supernatant image segmentation model in step 3 specifically includes:

[0064] Step 31: constructing supernatant image sample data; the supernatant image sample data includes: a supernatant image training set and a supernatant image test set; the supernatant image training set and the supernatant image test set both include: a plurality of sample activated sludge images and corresponding sample supernatant images;

[0065] Specifically, when constructing the supernatant image sample data, Figure 3 As shown, through activated sludge image collection: images of activated sludge images with different light intensities are acquired; activated sludge image data sets are prepared through image enhancement to obtain supernatant image sample data.

[0066] Specifically, since sewage treatment plants generally observe sludge performance through the sedimentation measuring cylinder method, in order to ensure the practicality of the designed system, this application also uses the same sedimentation measuring cylinder scenario, that is, take an appropriate amount (1000 ml) of mud-water mixture at the end of the aeration tank outlet and move it into the sedimentation measuring cylinder. After standing, observe the phenomenon in the measuring cylinder to collect the image to be tested and analyze the sludge performance. The aeration tank is the main biological treatment unit in the activated sludge treatment process. Sampling at the end of the aeration tank can monitor the biological treatment effect. The supernatant image sample data uses the sedimentation measuring cylinder method. After sorting, a total of 500 images are selected, and then the 500 images are image enhanced, mainly including random scaling and noise addition operations. By simulating the image scanning process in real situations, the model generalization ability is improved, and a total of 1000 images are generated. At the same time, the labelme software is used to annotate the supernatant image sample data. Using the iterative annotation method, 100 images are randomly selected to form a supernatant image training set, the supernatant is regarded as the foreground, the remaining areas are regarded as the background, and the supernatant area is annotated. Due to the viewing angle, the upper boundary of the supernatant in the image is generally arc-shaped, and the interface area is generally elliptical and affected by light, resulting in inconsistent turbidity with the area below. To ensure the accuracy of supernatant turbidity identification, the inscribed rectangular part of the entire supernatant area is selected to mark, which will not interfere with the next step of supernatant turbidity detection and is also conducive to U 2-Net learns and identifies the supernatant area.

[0067] Step 32: Based on the supernatant image sample data, an iterative annotation method is used to annotate U 2 -Net neural network model was trained and tested to obtain the supernatant image segmentation model.

[0068] Specifically, Figure 3 As shown, the test network is trained by supernatant image sample data, so that U 2 -Net identifies the supernatant area.

[0069] In a specific embodiment, step 32 specifically includes:

[0070] Step 321: Adopt an iterative labeling method to label U using the supernatant image training set 2 -Net neural network model is trained to obtain the initial supernatant image segmentation model.

[0071] Step 322: Testing the initial supernatant image segmentation model using the supernatant image test set to obtain the test accuracy of the initial supernatant image segmentation model.

[0072] Step 323: Determine whether the test accuracy of the initial supernatant image segmentation model reaches a first preset accuracy. If so, execute step 325; if not, execute step 324.

[0073] Step 324: Determine the sample supernatant images that have not been segmented in the supernatant image training set as the sample supernatant images to be added, re-label the sample supernatant images to be added to obtain corresponding sample supernatant images, and add the sample supernatant images to be added and the corresponding sample supernatant images to the supernatant image training set, repeat the training and testing until the first preset accuracy is reached, and obtain the supernatant image segmentation model.

[0074] Step 325: Determine the initial supernatant image segmentation model as the supernatant image segmentation model.

[0075] Specifically, the basic structure of the multi-layer perceptron (MLP) used in this application is as follows: Figure 4 As shown in the figure, it includes an input layer, a hidden layer, a Dropout layer, and an output layer connected in sequence. MLP is a feedforward neural network. As one of the foundations of modern artificial intelligence, it can be used as a component of a convolutional neural network in deep learning and computer vision. It converts input features into higher-level feature representations through hidden layers and learns the nonlinear complex mapping relationship between input data and output data through activation functions.

[0076] like Figure 5 As shown, the U used in this application2 -Net network includes: Input input, Output output, RSU structure, Dn decoder, En encoder and MLP. RSU structure includes: RSU-6, RSU-5, RSU-4 and RSU-4F. Dn decoder includes: Dn-1, Dn-2, Dn-3 and Dn-4. En encoder includes: En-1, En-2, En-3 and En-4. U 2 Each layer in the -Net network corresponds to RSU-7, RSU-6, RSU-5, RSU-4 and RSU-4F from top to bottom, and each layer of the fusion MLP generates feature maps S from top to bottom through upsampling, downsampling and full connection. 1 , S 2 , S 3 , S 4 and S 5 , and output after image fusion. During the training process, each layer of the network feature map is processed by convolution, sigmoid and upsampling, and the loss value d is generated from top to bottom. 1 d 2 d 3 d 4 and 5 , used to evaluate the difference between the model's prediction and the true label at each scale, and added together to calculate the total loss, which is used for backpropagation and parameter optimization of the model.

[0077] This application 2 -Net network integrates MLP after each feature extraction stage to assist the model in further learning more complex feature representations such as sludge area texture. By enhancing the model's image understanding and area recognition capabilities, it improves its learning ability for the target area, enabling the model to overcome interference from multiple factors such as lighting and object shadows, and more accurately identify sludge areas.

[0078] In a specific embodiment, precision, recall, accuracy and Dice are used as performance evaluation indicators of the supernatant image segmentation model. In the final verification stage of the model of this application, Precision reached 86.21%, Recall was 99.43%, Accuracy was 99.07%, and Dice was 92.29%, which basically achieved the automatic and accurate recognition of the activated sludge supernatant area and ensured the turbidity recognition accuracy of the supernatant area in the next stage.

[0079] In a specific embodiment, in step 4, a Histogram of Oriented Gradients (HOG) is used as a feature descriptor to extract image features in the training set. The method idea and process are as follows:

[0080] Step 41: Convert the supernatant area image from RGB to a grayscale image.

[0081] Step 42: Divide the grayscale image into multiple 8×8 pixel regions, calculate the amplitude and direction of the brightness change of each pixel through the skimage.feature.hog function, count the pixel frequency in each gradient direction respectively, and form a gradient histogram of the region as a local feature descriptor to capture the image texture change information, thereby further weakening the lighting interference of the detection scene.

[0082] Step 43: Combine adjacent 4×4 regions to form a block, and concatenate the gradient histograms of all the blocks to form the HOG feature descriptor of the entire image. By capturing the spatial gradient information in different regions and directions of the image, the local and global features of the image are extracted.

[0083] In a specific embodiment, the training process of the supernatant image segmentation model in step 5 specifically includes:

[0084] Step 51: construct supernatant turbidity sample data; the supernatant turbidity sample data includes: a supernatant turbidity training set, a supernatant turbidity test set and a supernatant turbidity verification set; the supernatant turbidity training set, the supernatant turbidity test set and the supernatant turbidity verification set all include: multiple sample supernatant area image feature vectors and corresponding sample supernatant turbidities.

[0085] Step 52: Based on the supernatant turbidity sample data, a support vector machine (SVM) model is trained, tested and verified to obtain a supernatant turbidity detection model.

[0086] Specifically, Figure 3 As shown, the supernatant image segmentation model is based on SVM to detect the turbidity of the supernatant, and the supernatant area is cut out in turn to make a training set test set, train the test model, and thus obtain the turbidity of the supernatant. The making of the training set test set includes: unifying the image size and annotating the training set.

[0087] Specifically, Figure 6 As shown, the training process of the supernatant image segmentation model is to uniformly resize and grayscale the supernatant image through image preprocessing, then perform feature extraction, calculate and maintain the HOG features, and then train, test and verify (evaluate) the supernatant turbidity detection model, wherein model training includes: feature extraction, model initialization and training; model testing includes: feature extraction and turbidity detection; model verification (evaluation) includes: model verification and performance indicator calculation.

[0088] Before testing the turbidity of the supernatant, it is necessary to prepare the turbidity sample data of the supernatant. In the sludge image, the supernatant area identified in the previous step is intercepted, and the rest of the background is removed. In the actual operation process, some images have certain noise points due to scanning and uploading, which will interfere with the subsequent accurate turbidity detection. In order to ensure the accuracy of system recognition, noise reduction is required first. Based on the detection scenario, median filtering is used for noise reduction. After noise reduction, the supernatant area is intercepted, mainly through morphological operations, using contour detection and area interception methods.

[0089] The supernatant turbidity sample data was labeled and preprocessed. The supernatant turbidity training set, supernatant turbidity test set, and supernatant turbidity validation set were divided according to a ratio of 7:1:2. In addition, to ensure the consistency of feature extraction and the stability of the model training process, the image size of each supernatant area was uniformly scaled to 130×228 pixels considering the actual size of the supernatant area in the sedimentation cylinder. According to preliminary analysis by experts, the training set now contains the main distribution range of sludge supernatant turbidity under the current situation, and the corresponding sludge performance analysis is shown in Table 1: When the supernatant turbidity is less than 2 supernatant turbidity units (NTU), the sludge may be over-sedimented due to aging or low content, and it does not fully participate in the aeration process, affecting the sewage treatment efficiency; when the supernatant turbidity is between 2NTU-10NTU, the activated sludge has normal performance, stable structure, can effectively remove organic matter in sewage, and has good sedimentation performance; when the supernatant turbidity is greater than 10NTU, the sludge sedimentation performance is poor, the suspended solids in the sludge are not effectively removed, and sludge swelling and disintegration may occur, affecting the sewage treatment quality. Label the supernatant turbidity values ​​in the training set and make corresponding label files for subsequent training.

[0090] Table 1 Supernatant turbidity and corresponding performance analysis table

[0091]

[0092] In a specific embodiment, step 52 specifically includes:

[0093] Step 521: Taking the hyperplane that maximizes the classification interval as the goal, the SVM model is trained using the supernatant turbidity training set to obtain an initial supernatant turbidity detection model.

[0094] Step 522: Testing the initial supernatant turbidity detection model using the supernatant turbidity test set to obtain the test accuracy of the initial supernatant turbidity detection model.

[0095] Step 523: Determine whether the test accuracy of the initial supernatant turbidity detection model reaches a second preset accuracy. If so, execute step 525; if not, execute step 524.

[0096] Step 524: increase the number of sample supernatant region image feature vectors and corresponding sample supernatant turbidities in the supernatant turbidity sample data, and retrain and test the SVM model.

[0097] Step 525: Determine the initial supernatant turbidity detection model as the supernatant turbidity detection model after the test.

[0098] Step 526: Verify the tested supernatant turbidity detection model through the supernatant turbidity verification set to determine the supernatant turbidity detection model.

[0099] Specifically, the turbidity detection of the supernatant area is achieved by training, testing and verifying the support vector machine (SVM). Since the turbidity value of the supernatant is basically linearly correlated with the brightness, texture and other characteristics of the area, that is, the image of the supernatant area with higher turbidity usually contains more suspended matter, darker brightness and more complex texture, this application chooses to use the linear kernel support vector machine (Linear SVM) to perform turbidity recognition training through the HOG feature descriptor and label of the training set, while also improving the computational efficiency. After the training, the turbidity is detected. The current detection accuracy has reached 72.48%, which basically realizes the intelligent detection of sludge supernatant turbidity based on image recognition. As shown in Table 1, the sludge performance can be analyzed according to the turbidity range of the sludge supernatant, and the corresponding treatment method can be adopted. Subsequent research will use a turbidity detector to improve the accuracy of sludge supernatant turbidity detection by further sampling, calibrating the annotation values ​​of the training set and verifying the test results.

[0100] The beneficial effects of the intelligent detection method for activated sludge supernatant turbidity based on image recognition proposed in this application are mainly manifested in:

[0101] 1. This method takes into account the complexity of the actual detection scene and can still accurately identify the range of the supernatant area in the measuring cylinder image under a variety of detection backgrounds, providing a basic prerequisite for the subsequent identification of the turbidity of the supernatant area.

[0102] 2. Automatic detection of activated sludge supernatant turbidity based on SVM. The supernatant turbidity detection model is used to automatically detect the turbidity of the sludge supernatant in the image to be tested, and the corresponding performance of the activated sludge is analyzed accordingly, thereby improving the automation and intelligence of the activated sludge status detection in the sewage treatment plant.

[0103] Based on the same inventive concept, the embodiment of the present application also provides an activated sludge supernatant turbidity intelligent detection system based on image recognition for implementing the above-mentioned activated sludge supernatant turbidity intelligent detection method based on image recognition. The implementation scheme for solving the problem provided by the system is similar to the implementation scheme recorded in the above-mentioned method, so the specific limitations in one or more embodiments of the activated sludge supernatant turbidity intelligent detection system based on image recognition provided below can refer to the limitations of the activated sludge supernatant turbidity intelligent detection method based on image recognition above, and will not be repeated here.

[0104] In an exemplary embodiment, an activated sludge supernatant turbidity intelligent detection system based on image recognition is provided, comprising:

[0105] The acquisition module is used to acquire the activated sludge image to be segmented.

[0106] The supernatant image segmentation module is used to input the activated sludge image to be segmented into the supernatant image segmentation model to obtain the supernatant image; the supernatant image segmentation model is based on the supernatant image sample data, and uses the iterative labeling method to segment the U 2 -Net neural network is trained.

[0107] The preprocessing module is used to preprocess the supernatant image to obtain a supernatant area image.

[0108] The feature extraction module is used to extract features of the supernatant area image by using the HOG method to obtain a feature vector of the supernatant area image.

[0109] The supernatant turbidity detection module is used to input the feature vector of the supernatant area image into the supernatant turbidity detection model to obtain the supernatant turbidity; the supernatant turbidity detection model is obtained by training the SVM model through the supernatant turbidity sample data.

[0110] In an exemplary embodiment, a computer device is provided. The computer device may be a server or a terminal. The internal structure diagram thereof may be as follows: Figure 7As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store supernatant images and supernatant turbidity. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, an intelligent detection method for activated sludge supernatant turbidity based on image recognition is implemented.

[0111] Those skilled in the art will understand that Figure 7 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components. In an exemplary embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above-mentioned method embodiments when executing the computer program.

[0112] In an exemplary embodiment, a computer-readable storage medium is provided, storing a computer program, and when the computer program is executed by a processor, the steps in the above method embodiments are implemented.

[0113] In an exemplary embodiment, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the steps in the above method embodiments are implemented.

[0114] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.

[0115] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM may be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM).

[0116] The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. The non-relational database may include a distributed database based on blockchain, etc., but is not limited thereto. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but is not limited thereto.

[0117] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0118] This article uses specific examples to illustrate the principles and implementation methods of this application. The description of the above embodiments is only used to help understand the method and core ideas of this application. At the same time, for those skilled in the art, according to the ideas of this application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as limiting this application.

Claims

1. An intelligent detection method for activated sludge supernatant turbidity based on image recognition, characterized in that: The activated sludge supernatant turbidity intelligent detection method based on image recognition comprises: Acquire an activated sludge image to be segmented; The activated sludge image to be segmented is input into the supernatant image segmentation model to obtain the supernatant image; the supernatant image segmentation model is based on the supernatant image sample data, and uses the iterative labeling method to segment the U 2 -Net neural network is trained; Preprocessing the supernatant image to obtain a supernatant region image; The HOG method is used to extract the features of the supernatant area image, and the feature vector of the supernatant area image is obtained; The feature vector of the supernatant area image is input into the supernatant turbidity detection model to obtain the supernatant turbidity; the supernatant turbidity detection model is obtained by training the SVM model through the supernatant turbidity sample data.

2. The method for intelligent detection of activated sludge supernatant turbidity based on image recognition according to claim 1, characterized in that: Preprocessing the supernatant image specifically includes: The supernatant image was subjected to smoothing, denoising and median filtering.

3. The method for intelligent detection of activated sludge supernatant turbidity based on image recognition according to claim 1, characterized in that: The training process of the supernatant image segmentation model specifically includes: Constructing supernatant image sample data; the supernatant image sample data includes: a supernatant image training set and a supernatant image test set; the supernatant image training set and the supernatant image test set both include: a plurality of sample activated sludge images and corresponding sample supernatant images; Based on the supernatant image sample data, an iterative annotation method is used to 2 -Net neural network model was trained and tested to obtain the supernatant image segmentation model.

4. The method for intelligent detection of activated sludge supernatant turbidity based on image recognition according to claim 3 is characterized in that: Based on the supernatant image sample data, an iterative annotation method is used to 2 -Net neural network model is trained and tested to obtain the supernatant image segmentation model, which specifically includes: The iterative annotation method is used to annotate U 2 -Net neural network model is trained to obtain the initial supernatant image segmentation model; The initial supernatant image segmentation model is tested using the supernatant image test set to obtain the test accuracy of the initial supernatant image segmentation model; Determining whether the test accuracy of the initial supernatant image segmentation model reaches a first preset accuracy; If not, the sample supernatant images that have not been segmented in the supernatant image training set are determined as the sample supernatant images to be added, the sample supernatant images to be added are re-labeled to obtain the corresponding sample supernatant images, and the sample supernatant images to be added and the corresponding sample supernatant images are added to the supernatant image training set, and the training and testing are repeated until the first preset accuracy is reached to obtain the supernatant image segmentation model; If so, the initial supernatant image segmentation model is determined as the supernatant image segmentation model.

5. The method for intelligent detection of activated sludge supernatant turbidity based on image recognition according to claim 1, characterized in that: The training process of the supernatant turbidity detection model specifically includes: Constructing supernatant turbidity sample data; the supernatant turbidity sample data includes: a supernatant turbidity training set, a supernatant turbidity test set and a supernatant turbidity verification set; the supernatant turbidity training set, the supernatant turbidity test set and the supernatant turbidity verification set all include: a plurality of sample supernatant region image feature vectors and corresponding sample supernatant turbidities; Based on the supernatant turbidity sample data, the SVM model was trained, tested and verified to obtain the supernatant turbidity detection model.

6. The method for intelligent detection of activated sludge supernatant turbidity based on image recognition according to claim 5, characterized in that: Based on the supernatant turbidity sample data, the SVM model was trained, tested and verified to obtain the supernatant turbidity detection model, which specifically includes: Taking the hyperplane that maximizes the classification interval as the goal, the SVM model is trained using the supernatant turbidity training set to obtain the initial supernatant turbidity detection model; The initial supernatant turbidity detection model is tested using the supernatant turbidity test set to obtain the test accuracy of the initial supernatant turbidity detection model; Determining whether the test accuracy of the initial supernatant turbidity detection model reaches a second preset accuracy; If not, then the number of sample supernatant area image feature vectors and the corresponding sample supernatant turbidity in the supernatant turbidity sample data is increased, and the SVM model is retrained and tested; If so, the initial supernatant turbidity detection model is determined as the supernatant turbidity detection model after the test; The tested supernatant turbidity detection model is verified by the supernatant turbidity verification set to determine the supernatant turbidity detection model.

7. An intelligent detection system for activated sludge supernatant turbidity based on image recognition, characterized in that: The method for intelligent detection of turbidity of activated sludge supernatant based on image recognition according to any one of claims 1 to 6, wherein the intelligent detection system for turbidity of activated sludge supernatant based on image recognition comprises: An acquisition module, used for acquiring an activated sludge image to be segmented; The supernatant image segmentation module is used to input the activated sludge image to be segmented into the supernatant image segmentation model to obtain the supernatant image; the supernatant image segmentation model is based on the supernatant image sample data, and adopts an iterative labeling method to U 2 -Net neural network is trained; A preprocessing module, used for preprocessing the supernatant image to obtain a supernatant area image; A feature extraction module is used to extract features of the supernatant area image using the HOG method to obtain a feature vector of the supernatant area image; The supernatant turbidity detection module is used to input the feature vector of the supernatant area image into the supernatant turbidity detection model to obtain the supernatant turbidity; the supernatant turbidity detection model is obtained by training the SVM model through the supernatant turbidity sample data.

8. A computer device comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the intelligent detection method for turbidity of activated sludge supernatant based on image recognition as described in any one of claims 1 to 6.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method for intelligent detection of activated sludge supernatant turbidity based on image recognition described in any one of claims 1 to 6 is implemented.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the method for intelligent detection of activated sludge supernatant turbidity based on image recognition described in any one of claims 1 to 6 is implemented.

Citation Information

Patent Citations

  • Machine vision suspension turbidity detection device and detection method

    CN112964606A

  • Image foreground main body segmentation system based on non-specific category

    CN113240703A

  • Sewage grade identification method and device based on image

    CN115619998A

  • Gas leakage detection method and system based on deep learning, and terminal equipment

    CN115719460A

  • Fault detection method and device of photovoltaic module, electronic equipment and storage medium

    CN115797336A