Water tank moss identification and removal method and system based on deep learning, and medium
Through deep learning-based methods, intelligent identification and automatic removal of sink moss is achieved, solving the problems of low efficiency and poor accuracy of traditional manual cleaning, improving cleaning efficiency and accuracy, and reducing costs.
Patent Information
- Application Number
- CN202510126932.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-27
- Publication Date
- 2025-06-17
- Estimated Expiration
- 2045-01-27
AI Technical Summary
Traditional manual cleaning of moss in sinks is inefficient, costly and error-prone, making it difficult to ensure the stability and accuracy of the cleaning effect.
Using a deep learning-based method, the moss area is identified and quantified through real-time image acquisition, preprocessing, image segmentation, object detection and feature extraction, cleanliness evaluation index is generated, and a clearing scheme is generated based on the threshold comparison.
It improves cleaning efficiency and accuracy, reduces labor costs, and realizes intelligent identification and automatic removal of sink moss.
Smart Images

Figure CN120164155A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of control of artificial intelligence systems, and more specifically, to a method, system, and medium for identifying and removing sink moss based on deep learning. Background Art
[0002] In the work of cleaning sink moss in sewage treatment plants, the traditional manual method has many drawbacks. For example, the manual cleaning efficiency is low, and a large amount of human and time costs are required. Moreover, manual operation is easily affected by subjective factors, and errors are likely to occur in judging the timing and degree of moss cleaning, making it difficult to ensure the stability and accuracy of the cleaning effect. With the booming development of artificial intelligence technology, computer vision and deep learning technology have brought new opportunities to solve the problem of sink moss cleaning. Related technologies have been explored in some fields. For example, a method for cleaning moss in a sedimentation tank described in Patent CN202411643386.8, but further optimization is needed in the intelligent identification and removal method of moss. Summary of the Invention
[0003] In view of the above problems, the purpose of the present invention is to provide a method, system, and medium for identifying and removing sink moss based on deep learning.
[0004] To solve the above technical problems, the technical solution of the present invention is as follows:
[0005] The first aspect of the present invention provides a method for identifying and removing sink moss based on deep learning, including the following steps:
[0006] Collect real-time images of the secondary sedimentation tank sink and perform preprocessing to obtain an initial sink image;
[0007] Perform segmentation processing on the initial sink image through a preset image segmentation algorithm to obtain a regional sink image;
[0008] Perform target detection on the regional sink image through a preset target detection algorithm, identify and predict the moss area, obtain predicted moss feature data, and process the predicted moss feature data to obtain a predicted moss measure index corresponding to the regional sink image;
[0009] Compare the predicted moss measure index with a preset moss measure threshold;
[0010] If the predicted moss measure index is less than the preset moss measure threshold, it is determined that there is no moss in the predicted moss area;
[0011] If the predicted moss measure index is greater than or equal to the preset moss measure threshold, it is determined that there is moss in the predicted moss area, and the moss pixel quantity and position data of the predicted moss area are obtained;
[0012] Process the regional sink image in combination with the moss pixel quantity and position data to obtain a sink cleanliness evaluation index;
[0013] Compare the sink cleanliness evaluation index with a preset sink cleanliness threshold to obtain the cleanliness state of the sink, and generate a cleaning plan according to the cleanliness state.
[0014] Optionally, in the method for sink moss recognition and removal based on deep learning according to the present application, the target detection of the regional sink image by a preset target detection algorithm, the recognition and prediction of the moss area, and the acquisition of predicted moss feature data, and the processing according to the predicted moss feature data to obtain a predicted moss measure index corresponding to the regional sink image, include:
[0015] Perform target detection on the regional sink image by a preset target detection algorithm, recognize and predict the moss area, and acquire predicted moss feature data, including color feature data and texture feature data;
[0016] The color feature data includes a color histogram and color moments, and the color moments include a first-order color moment, a second-order color moment, and a third-order color moment;
[0017] The texture feature data includes an LBP histogram and a GLCM feature matrix;
[0018] Process according to the color histogram, color moments, LBP histogram, and GLCM feature matrix to obtain a predicted moss measure index corresponding to the regional sink image.
[0019] Optionally, in the method for sink moss recognition and removal based on deep learning according to the present application, the processing according to the color histogram, color moments, LBP histogram, and GLCM feature matrix to obtain a predicted moss measure index corresponding to the regional sink image, includes:
[0020] Combine the color histogram, first-order color moment, second-order color moment, and third-order color moment into a joint feature vector, and input it into a preset moss recognition model for processing to obtain a moss color probability value;
[0021] Compare the LBP histogram and the GLCM feature matrix with a preset moss LBP histogram and a preset moss GLCM feature matrix respectively to obtain a local binary similarity value and a gray-level co-occurrence similarity value;
[0022] Process according to the moss color probability value, local binary similarity value, and gray-level co-occurrence similarity value to obtain a predicted moss measure index corresponding to the regional sink image.
[0023] Optionally, in the deep learning-based sink moss identification and removal method described in the present application, the processing of the moss pixel quantity and position data in combination with the regional sink image to obtain the sink cleanliness evaluation index includes:
[0024] Extracting the number of regional pixels of the regional water tank image according to the regional water tank image;
[0025] Compare the number of moss pixels with the number of regional pixels to obtain the regional moss coverage rate corresponding to the regional water tank image, and then perform mean processing to obtain the water tank moss coverage rate;
[0026] Acquire the total number of regional water tank images within a preset range, and determine the number of regional water tank images with moss within the preset range according to the position data;
[0027] Compare the number of regional water tank images with the total number to obtain regional moss density corresponding to a preset range, and then perform mean processing to obtain water tank moss density;
[0028] Processing is performed according to the moss coverage rate of the area to obtain moss distribution uniformity data;
[0029] The data of the moss coverage rate, moss density and moss distribution uniformity of the sink are input into a preset sink cleanliness evaluation model for processing to obtain a sink cleanliness evaluation index.
[0030] Optionally, in the deep learning-based sink moss identification and removal method described in the present application, the sink cleanliness evaluation index is compared with a preset sink cleanliness threshold to obtain the cleanliness status of the sink, and a removal plan is generated according to the cleanliness status, including:
[0031] Comparing the water tank cleanliness evaluation index with a preset water tank cleanliness threshold, wherein the preset water tank cleanliness threshold includes a first preset water tank cleanliness threshold and a second preset water tank cleanliness threshold, and the first preset water tank cleanliness threshold is less than the second preset water tank cleanliness threshold;
[0032] If the water tank cleanliness evaluation index is less than or equal to the first preset water tank cleanliness threshold, the cleaning state is determined to be clean, and a cleaning solution is generated as not cleaning;
[0033] If the water tank cleanliness evaluation index is greater than the first preset water tank cleanliness threshold and less than or equal to the second preset water tank cleanliness threshold, the cleaning state is determined to be slightly contaminated, and a cleaning solution is generated for cleaning with a linked cleaning device;
[0034] If the water tank cleanliness evaluation index is greater than a second preset water tank cleanliness threshold, the cleaning state is determined to be severely polluted, and a cleaning solution is generated to link cleaning equipment and manual operation and maintenance cleaning.
[0035] Optionally, the method for identifying and removing moss in a sink based on deep learning described in the present application further includes:
[0036] Obtaining the average value of the predicted moss measurement index for the same period of history corresponding to the real-time image acquisition time;
[0037] Comparing the predicted moss measurement index with the predicted moss measurement index mean to obtain a moss measurement deviation rate;
[0038] Performing a threshold comparison between the moss measurement deviation rate and a preset moss measurement deviation rate threshold;
[0039] If the moss measurement deviation rate is less than or equal to a preset moss measurement deviation rate threshold, then determining that the predicted moss measurement index is normal;
[0040] If the moss measurement deviation rate is greater than a preset moss measurement deviation rate threshold, the predicted moss measurement index is determined to be abnormal.
[0041] Optionally, in the sink moss identification and removal method based on deep learning described in the present application, if the moss measurement deviation rate is greater than a preset moss measurement deviation rate threshold, the predicted moss measurement index is determined to be abnormal, and then further includes:
[0042] Obtaining water quality assessment data and environmental assessment data of the secondary sedimentation tank during the real-time image acquisition time;
[0043] Obtain historical water quality assessment data and historical environmental assessment data of the secondary sedimentation tank water tank in the same period of history corresponding to the real-time image acquisition time;
[0044] Processing the water quality assessment data and the environmental assessment data in combination with the historical water quality assessment data and the historical environmental assessment data to obtain a moss measurement correction coefficient;
[0045] The predicted moss measurement index is corrected according to the moss measurement correction coefficient to obtain a moss measurement optimization index.
[0046] A second aspect of the present invention provides a system for identifying and removing moss in a sink based on deep learning, the system comprising: a memory and a processor, the memory comprising a program for identifying and removing moss in a sink based on deep learning, the program for identifying and removing moss in a sink based on deep learning being executed by the processor to implement the following steps:
[0047] Collect real-time images of the secondary sedimentation tank water trough, and perform preprocessing to obtain the initial water trough images;
[0048] Perform segmentation processing on the initial water trough images through a preset image segmentation algorithm to obtain regional water trough images;
[0049] Perform target detection on the regional water trough images through a preset target detection algorithm, identify and predict the moss area, obtain predicted moss feature data, and process according to the predicted moss feature data to obtain the predicted moss measurement index corresponding to the regional water trough images;
[0050] Compare the predicted moss measurement index with a preset moss measurement threshold;
[0051] If the predicted moss measurement index is less than the preset moss measurement threshold, it is determined that there is no moss in the predicted moss area;
[0052] If the predicted moss measurement index is greater than or equal to the preset moss measurement threshold, it is determined that there is moss in the predicted moss area, and obtain the moss pixel quantity and position data of the predicted moss area;
[0053] Process according to the moss pixel quantity and position data combined with the regional water trough images to obtain the water trough cleanliness evaluation index;
[0054] Compare the water trough cleanliness evaluation index with a preset water trough cleanliness threshold to obtain the cleanliness status of the water trough, and generate a cleaning plan according to the cleanliness status.
[0055] Optionally, in the water trough moss recognition and removal system based on deep learning described in this application, the performing target detection on the regional water trough images through a preset target detection algorithm, identifying and predicting the moss area, obtaining predicted moss feature data, and processing according to the predicted moss feature data to obtain the predicted moss measurement index corresponding to the regional water trough images includes:
[0056] Perform target detection on the regional water trough images through a preset target detection algorithm, identify and predict the moss area, and obtain predicted moss feature data, including color feature data and texture feature data;
[0057] The color feature data includes color histograms and color moments, and the color moments include first-order color moments, second-order color moments, and third-order color moments;
[0058] The texture feature data includes LBP histograms and GLCM feature matrices;
[0059] Process according to the color histograms and color moments and the LBP histograms and GLCM feature matrices to obtain the predicted moss measurement index corresponding to the regional water trough images.
[0060] In the third aspect of the present invention, a computer-readable storage medium is provided. A program for the method of identifying and removing moss in a water tank based on deep learning is stored in the computer-readable storage medium. When the program for the method of identifying and removing moss in a water tank based on deep learning is executed by a processor, the steps of the method of identifying and removing moss in a water tank based on deep learning as described in any one of the above are implemented.
[0061] The present invention preprocesses the real-time image of the secondary sedimentation tank water tank to obtain an initial water tank image, performs segmentation processing to obtain a regional water tank image, then conducts object detection to identify and predict the moss area, and obtains the predicted moss feature data for processing to obtain the predicted moss measurement index corresponding to the regional water tank image. Through threshold comparison, it is determined whether there is moss in the predicted moss area. If so, the moss pixel quantity and position data of the predicted moss area are further obtained, and combined with the regional water tank image for processing to obtain the water tank cleanliness evaluation index. Finally, through threshold comparison, the cleaning state of the water tank is obtained, and a cleaning plan is generated according to the cleaning state; thus, the intelligent identification and removal of moss in the secondary sedimentation tank water tank are realized.
[0062] Compared with the prior art, the beneficial effects of the technical solution of the present invention are:
[0063] The cleaning efficiency is improved: Compared with manual cleaning, this system can realize real-time monitoring, identification, and automatic cleaning of the water tank, improving the cleaning efficiency.
[0064] The cleaning accuracy is improved: Through the deep learning model, moss can be accurately identified, and the distribution of moss can be accurately evaluated, so as to realize more targeted cleaning.
[0065] The labor cost is reduced: Manual intervention is reduced, the pertinence of removal is improved, and the labor cost is reduced. BRIEF DESCRIPTION OF THE DRAWINGS
[0066] Figure 1 It is a flowchart of the method for identifying and removing moss in a water tank based on deep learning provided by an embodiment of the present invention.
[0067] Figure 2 It is a flowchart of obtaining the predicted moss measurement index corresponding to the regional water tank image in the method for identifying and removing moss in a water tank based on deep learning provided by an embodiment of the present invention.
[0068] Figure 3 It is a flowchart of obtaining the water tank cleanliness evaluation index in the method for identifying and removing moss in a water tank based on deep learning provided by an embodiment of the present invention. DETAILED DESCRIPTION OF THE INVENTION
[0069] In order to more clearly understand the above-mentioned objects, features, and advantages of the present invention, the present invention will be further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be noted that, without conflict, the embodiments of the present application and the features in the embodiments may be combined with each other.
[0070] In the following description, many specific details are set forth in order to fully understand the present invention. However, the present invention may also be implemented in other ways different from those described herein. Therefore, the protection scope of the present invention is not limited by the specific embodiments disclosed below.
[0071] Embodiment 1
[0072] As Figure 1 shown, this embodiment discloses a method for identifying and removing water tank moss based on deep learning, including the following steps:
[0073] S11. Collect real-time images of the secondary sedimentation tank water tank, and perform preprocessing to obtain an initial water tank image;
[0074] S12. Perform segmentation processing on the initial water tank image through a preset image segmentation algorithm to obtain a regional water tank image;
[0075] S13. Perform target detection on the regional water tank image through a preset target detection algorithm, identify and predict the moss area, obtain predicted moss feature data, and process according to the predicted moss feature data to obtain a predicted moss measurement index corresponding to the regional water tank image;
[0076] S14. Compare the predicted moss measurement index with a preset moss measurement threshold;
[0077] S15. If the predicted moss measurement index is less than the preset moss measurement threshold, it is determined that there is no moss in the predicted moss area;
[0078] S16. If the predicted moss measurement index is greater than or equal to the preset moss measurement threshold, it is determined that there is moss in the predicted moss area, and obtain the moss pixel quantity and position data of the predicted moss area;
[0079] S17. Process according to the moss pixel quantity and position data in combination with the regional water tank image to obtain a water tank cleanliness evaluation index;
[0080] S18. Compare the water tank cleanliness evaluation index with a preset water tank cleanliness threshold to obtain the cleanliness state of the water tank, and generate a cleaning plan according to the cleanliness state.
[0081] It should be noted that, in order to accurately identify the growth of moss in the secondary sedimentation tank water trough and determine the cleanliness of the water trough, first, pictures are taken at preset intervals by a camera deployed in the secondary sedimentation tank area as input data. The collected pictures are preprocessed including denoising, enhancing contrast, and color space conversion. Then, segmentation processing is performed through a preset image segmentation algorithm to obtain the regional water trough image. In this embodiment, U-Net is used as the basic model, and at the same time, the model is optimized and improved through an attention mechanism and multi-scale feature fusion, enabling the model to focus on the key areas in the image, improving the segmentation accuracy. The features of different scales are fused through skip connections, enabling the model to capture multi-scale information and enhancing the details of segmentation. After segmentation, target detection is performed through a preset target detection algorithm to identify and predict the moss area, that is, the area image where moss may exist, and the predicted moss feature data is obtained for processing to obtain the predicted moss measurement index corresponding to the regional water trough image. In this embodiment, a target detection algorithm based on CNN is used for target detection. Then, it is determined whether there is moss in the predicted moss area through threshold comparison. In this embodiment, the preset moss measurement thresholds are set to (0, 0.85) and [0.85, 1], corresponding to no moss and existing moss respectively. If it is determined that there is moss, the moss pixel number and position data in the predicted moss area are further obtained and processed in parallel to obtain the water trough cleanliness evaluation index. Finally, a threshold comparison is made with the preset water trough cleanliness threshold to obtain the cleanliness state of the water trough, and a cleaning plan is generated according to the cleanliness state.
[0082] Embodiment 2
[0083] As Figure 2 shown, this embodiment discloses a flowchart of obtaining the predicted moss measurement index corresponding to the regional water trough image of the moss recognition and removal method for the water trough based on deep learning. According to the embodiment of the present invention, the target detection of the regional water trough image is performed through a preset target detection algorithm to identify and predict the moss area, and the predicted moss feature data is obtained. According to the predicted moss feature data, processing is performed to obtain the predicted moss measurement index corresponding to the regional water trough image, including:
[0084] S21. Perform target detection on the regional water trough image through a preset target detection algorithm to identify and predict the moss area, and obtain the predicted moss feature data, including color feature data and texture feature data;
[0085] S22. The color feature data includes a color histogram and color moments, and the color moments include the first-order color moment, the second-order color moment, and the third-order color moment;
[0086] S23. The texture feature data includes an LBP histogram and a GLCM feature matrix;
[0087] S24. Process according to the color histogram, color moments, the LBP histogram, and the GLCM feature matrix to obtain the predicted moss measure index corresponding to the regional water tank image.
[0088] It should be noted that, in order to accurately obtain the predicted moss measure index of the predicted moss area for judging whether there is moss in this area, first obtain color feature data including the color histogram and color moments. Among them, the color moments include the first-order color moment, the second-order color moment, and the third-order color moment. The first-order color moment refers to the mean value, the second-order color moment refers to the variance, and the third-order color moment refers to the skewness; texture feature data including the LBP histogram and the GLCM feature matrix. Among them, the LBP histogram refers to the histogram of the local binary feature map, and the GLCM feature matrix refers to the gray-level co-occurrence matrix. Further analyze and process to obtain the predicted moss measure index corresponding to the regional water tank image.
[0089] According to an example of the present invention, the process according to the color histogram, color moments, the LBP histogram, and the GLCM feature matrix to obtain the predicted moss measure index corresponding to the regional water tank image includes:
[0090] Combine the color histogram, the first-order color moment, the second-order color moment, and the third-order color moment into a joint feature vector and input it into a preset moss recognition model for processing to obtain the moss color probability value;
[0091] Compare the similarity of the LBP histogram and the GLCM feature matrix with the preset moss LBP histogram and the preset moss GLCM feature matrix respectively to obtain the local binary similarity value and the gray-level co-occurrence similarity value;
[0092] Process according to the moss color probability value, the local binary similarity value, and the gray-level co-occurrence similarity value to obtain the predicted moss measure index corresponding to the regional water tank image.
[0093] It should be noted that, in order to improve the accuracy of judging whether there is moss based on color and texture features, first combine the obtained color histogram and color moments into a joint feature vector. For example, the color histogram is a one-dimensional vector H=(h1, h2, h3,..., h 512 ) with a length of 512. The mean values of the red channel R, the green channel G, and the blue channel B of the first-order color moment are μ R , μ G , μ B . The variances of the red channel R, the green channel G, and the blue channel B of the second-order color moment are respectively The skewnesses of the red channel R, the green channel G, and the blue channel B of the third-order color moment are s R , s G , s B, the color moment is usually a one-dimensional vector, and the color moment vector is expressed as The combined feature vector is F=(H, M);
[0094] That is Then input it into the preset moss recognition model for processing to obtain the moss color probability value. Among them, the preset moss recognition model is trained through the combined feature vectors of a large number of historical samples and the corresponding moss color probability values. Then, the LBP histogram and the GLCM feature matrix are respectively compared with the preset moss LBP histogram and the preset moss GLCM feature matrix to obtain the local binary similarity value and the gray-level co-occurrence similarity value. Among them, the preset moss LBP histogram and the preset moss GLCM feature matrix are obtained through the analysis of a large number of known moss images; finally, according to the obtained moss color probability value, local binary similarity value and gray-level co-occurrence similarity value, perform processing to obtain the predicted moss measurement index corresponding to the regional water tank image;
[0095] The calculation formula of the predicted moss measurement index is:
[0096] y q =α1c g +β1(b l +g l );
[0097] Among them, y q is the predicted moss measurement index, c g , b l , g l are the moss color probability value, local binary similarity value and gray-level co-occurrence similarity value respectively. α1 and β1 are preset feature coefficients (the feature coefficients are obtained by querying the preset water tank moss recognition and cleaning control platform), and all the segmented regional water tank images are completed for target detection.
[0098] Embodiment 3
[0099] As Figure 2 shown, this embodiment discloses a flowchart for obtaining the water tank cleanliness evaluation index of the water tank moss recognition and cleaning method based on deep learning. This embodiment discloses a flowchart for obtaining the water tank cleanliness evaluation index of the water tank moss recognition and cleaning method based on deep learning. According to the embodiment of the present invention, processing the regional water tank image in combination with the moss pixel quantity and position data to obtain the water tank cleanliness evaluation index includes:
[0100] S31. Extract the regional pixel quantity of the regional water tank image according to the regional water tank image;
[0101] S32. Compare the number of moss pixels with the number of area pixels to obtain the area moss coverage rate corresponding to the area sink image, and then perform an averaging process to obtain the sink moss coverage rate;
[0102] S33. Obtain the total number of area sink images within a preset range, and determine the number of area sink images with moss within the preset range according to the position data;
[0103] S34. Compare the number of area sink images with the total number to obtain the area moss density corresponding to the preset range, and then perform an averaging process to obtain the sink moss density;
[0104] S35. Process according to the area moss coverage rate to obtain moss distribution uniformity data;
[0105] S36. Input the sink moss coverage rate, sink moss density, and moss distribution uniformity data into a preset sink cleanliness evaluation model for processing to obtain a sink cleanliness evaluation index.
[0106] It should be noted that in order to determine the cleanliness of the sink, the area sink images determined to have moss are used to extract the number of area pixels, and the obtained number of moss pixels is compared with the number of area pixels to obtain the area moss coverage rate. For example, the number of moss pixels is N m , and the number of area pixels is N t , then N m / N t is the area moss coverage rate. The obtained multiple area moss coverage rates are averaged to obtain the sink moss coverage rate; the entire initial sink image is divided into N preset ranges, and within the preset range, there are N1 area sink images. According to the obtained position data, the number of area sink images with moss within the preset range is N2. The area moss density corresponding to the preset range is N2 / N1, and then the average value is obtained to obtain the sink moss density; the initial sink image is divided into multiple sub-areas. For example, the image is evenly divided into axb small squares, and the moss coverage rate in each sub-area is calculated respectively. In this embodiment, the standard deviation of the moss coverage rate in the sub-areas is calculated to obtain the moss distribution uniformity data to measure the uniformity of the moss distribution. The smaller the standard deviation, the more uniform the moss distribution, and the larger the standard deviation, the more uneven the moss distribution; the obtained sink moss coverage rate, sink moss density, and moss distribution uniformity data are input into a preset sink cleanliness evaluation model for processing to obtain a sink cleanliness evaluation index. Among them, the preset sink cleanliness evaluation model is trained by obtaining the sink moss coverage rate, sink moss density, and moss distribution uniformity data of a large number of historical samples and the corresponding sink cleanliness evaluation indexes.
[0107] According to an example of the present invention, the water tank cleanliness evaluation index is compared with a preset water tank cleanliness threshold to obtain the cleanliness status of the water tank, and a cleaning plan is generated according to the cleanliness status, including:
[0108] Comparing the water tank cleanliness evaluation index with a preset water tank cleanliness threshold, wherein the preset water tank cleanliness threshold includes a first preset water tank cleanliness threshold and a second preset water tank cleanliness threshold, and the first preset water tank cleanliness threshold is less than the second preset water tank cleanliness threshold;
[0109] If the water tank cleanliness evaluation index is less than or equal to the first preset water tank cleanliness threshold, the cleaning state is determined to be clean, and a cleaning solution is generated as not cleaning;
[0110] If the water tank cleanliness evaluation index is greater than the first preset water tank cleanliness threshold and less than or equal to the second preset water tank cleanliness threshold, the cleaning state is determined to be slightly contaminated, and a cleaning solution is generated for cleaning with a linked cleaning device;
[0111] If the water tank cleanliness evaluation index is greater than a second preset water tank cleanliness threshold, the cleaning state is determined to be severely polluted, and a cleaning solution is generated to link cleaning equipment and manual operation and maintenance cleaning.
[0112] It should be noted that the obtained tank cleanliness evaluation index is compared with the preset tank cleanliness threshold. In this embodiment, the preset tank cleanliness threshold is set to (0, 0.4], (0.4, 0.75], (0.75, 1], corresponding to clean, slightly polluted, and heavily polluted, respectively. For example, the obtained tank cleanliness evaluation index is 0.3, which is less than the first preset tank cleanliness threshold, indicating that the amount of moss is small, and the cleaning state is determined to be clean, and the removal plan is generated as not to remove. If the obtained tank cleanliness evaluation index is 0.3, which is less than the first preset tank cleanliness threshold, the amount of moss is small, and the cleaning state is determined to be clean, and the removal plan is generated as not to remove. If the value is 0.55, which is greater than the first preset water tank cleanliness threshold and less than the second preset water tank cleanliness threshold, it means that the amount of moss is medium, and the cleaning state is judged to be slightly polluted, and the removal plan generated is to use the linked cleaning equipment for removal. If the obtained water tank cleanliness evaluation index is 0.85, which is greater than the second preset water tank cleanliness threshold, it means that the amount of moss is too much, and the cleaning state is judged to be heavily polluted. Removal may not be timely or thorough if it is only relying on equipment cleaning. Therefore, the removal plan generated is to use the linked cleaning equipment and manual operation and maintenance for removal.
[0113] According to an example of the present invention, it also includes:
[0114] Obtaining the average value of the predicted moss measurement index for the same period of history corresponding to the real-time image acquisition time;
[0115] Comparing the predicted moss measurement index with the predicted moss measurement index mean to obtain a moss measurement deviation rate;
[0116] Compare the moss measurement deviation rate with a preset moss measurement deviation rate threshold value.
[0117] If the moss measurement deviation rate is less than or equal to the preset moss measurement deviation rate threshold value, it is determined that the predicted moss measurement index is normal.
[0118] If the moss measurement deviation rate is greater than the preset moss measurement deviation rate threshold value, it is determined that the predicted moss measurement index is abnormal.
[0119] It should be noted that the growth of moss in the secondary sedimentation tank water trough follows certain rules and has periodicity, usually related to seasons, water quality, and light. Therefore, after obtaining the predicted moss measurement index, it is necessary to further determine whether it is accurate and reasonable. First, obtain the average value of the predicted moss measurement index in the historical same period corresponding to the real-time image acquisition time, compare it with the predicted moss measurement index to obtain the moss measurement deviation rate. The moss measurement deviation rate is the ratio of the absolute value of the difference between the predicted moss measurement index and the average value of the predicted moss measurement index to the average value of the predicted moss measurement index, and then compare it with the preset moss measurement deviation rate threshold value. Among them, the preset moss measurement deviation rate threshold value is obtained by querying the preset water trough moss identification and removal control platform, and it is determined whether the obtained predicted moss measurement index is normal or abnormal through threshold comparison.
[0120] According to an embodiment of the present invention, if the moss measurement deviation rate is greater than the preset moss measurement deviation rate threshold value, and it is determined that the predicted moss measurement index is abnormal, the following steps are further included:
[0121] Obtain the water quality evaluation data and environmental evaluation data of the secondary sedimentation tank water trough at the real-time image acquisition time.
[0122] Obtain the historical water quality evaluation data and historical environmental evaluation data of the secondary sedimentation tank water trough in the historical same period corresponding to the real-time image acquisition time.
[0123] Process the water quality evaluation data and environmental evaluation data in combination with the historical water quality evaluation data and historical environmental evaluation data to obtain a moss measurement correction coefficient.
[0124] Correct the predicted moss measurement index according to the moss measurement correction coefficient to obtain a moss measurement optimization index.
[0125] It should be noted that if the obtained predicted moss measurement index is determined to be abnormal, it is processed by comparing the changes in the water quality and environment of the secondary sedimentation tank to obtain a moss measurement correction coefficient, correct the obtained predicted moss measurement index to obtain a moss measurement optimization index, and then re-perform threshold comparison. If it is still abnormal, an early warning response is output.
[0126] The calculation formula for the moss measurement optimization index is:
[0127] y xq = ζ × c f × y q ;
[0128] Wherein, y xq is the moss measurement optimization index, c f , y q are respectively the moss measurement correction coefficient and the predicted moss measurement index, and ζ is a preset characteristic coefficient (the characteristic coefficient is obtained by querying the preset water tank moss identification and removal control platform).
[0129] It is worth mentioning that according to the example of the present invention, the moss measurement correction coefficient is obtained by processing the water quality evaluation data and the environmental evaluation data in combination with the historical water quality evaluation data and the historical environmental evaluation data, including:
[0130] The water quality evaluation data includes the real-time nitrogen content and the real-time phosphorus content;
[0131] The environmental evaluation data includes the real-time light intensity, the real-time light duration and the real-time water temperature;
[0132] The historical water quality evaluation data includes the historical nitrogen content average value and the historical phosphorus content average value;
[0133] The historical environmental evaluation data includes the historical light intensity average value, the historical light duration average value and the historical water temperature average value;
[0134] The moss measurement correction coefficient is obtained by processing the real-time nitrogen content and the real-time phosphorus content in combination with the historical nitrogen content average value and the historical phosphorus content average value, and the real-time light intensity, the real-time light duration and the real-time water temperature in combination with the historical light intensity average value, the historical light duration average value and the historical water temperature average value.
[0135] It should be noted that the calculation formula for the moss measurement correction coefficient is:
[0136]
[0137] Wherein, c f is the moss measurement correction coefficient, n r , p r , n h , p h are respectively the real-time nitrogen content, the real-time phosphorus content, the historical nitrogen content average value and the historical phosphorus content average value, g r , t r , g tr , g h , t h , g thThey are respectively the real-time light intensity, real-time light duration, real-time water temperature, average historical light intensity, average historical light duration, and average historical water temperature. ε and χ are preset characteristic coefficients (the characteristic coefficients are obtained by querying through a preset control platform for identifying and removing water tank moss).
[0138] In several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are merely illustrative. For example, the division of the units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined, or can be integrated into another system, or some features can be ignored, or not executed. In addition, the coupling, direct coupling, or communication connection between the various components shown or discussed can be through some interfaces. The indirect coupling or communication connection of devices or units can be electrical, mechanical, or other forms.
[0139] The units described as separate components above may or may not be physically separated. The components shown as units may or may not be physical units; they can be located in one place or distributed to multiple network units; some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0140] In addition, in each embodiment of the present invention, the various functional units can all be integrated in one processing unit, or each unit can be separately a unit, or two or more units can be integrated in one unit; the above-mentioned integrated units can be implemented in the form of hardware, or in the form of a combination of hardware and software functional units.
[0141] Those of ordinary skill in the art can understand that all or part of the steps of implementing the above method embodiments can be completed by hardware related to program instructions. The foregoing program can be stored in a computer-readable storage medium. When the program is executed, it executes the steps including the above method embodiments; and the foregoing storage medium includes: various media such as mobile storage devices, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic disks, or optical discs that can store program codes.
[0142] Alternatively, if the above integrated units of the present invention are implemented in the form of software functional modules and sold or used as independent products, they can also be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the embodiments of the present invention, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as removable storage devices, ROM, RAM, magnetic disks, or optical discs.
Claims
1. A method for identifying and removing moss in a sink based on deep learning, characterized in that: The following steps are involved: Collect the real-time image of the secondary sedimentation tank and perform preprocessing to obtain the initial tank image; Segmenting the initial water tank image using a preset image segmentation algorithm to obtain a regional water tank image; Performing target detection on the regional water tank image by using a preset target detection algorithm, identifying and predicting the moss area, and obtaining predicted moss feature data, and performing processing according to the predicted moss feature data to obtain a predicted moss measurement index corresponding to the regional water tank image; Performing a threshold comparison between the predicted moss measurement index and a preset moss measurement threshold; If the predicted moss measurement index is less than a preset moss measurement threshold, it is determined that there is no moss in the predicted moss area; If the predicted moss measurement index is greater than or equal to a preset moss measurement threshold, it is determined that moss exists in the predicted moss area, and the number and position data of moss pixels in the predicted moss area are obtained; Processing the moss pixel quantity and position data in combination with the regional water tank image to obtain a water tank cleanliness evaluation index; The cleanliness evaluation index of the water tank is compared with a preset cleanliness threshold of the water tank to obtain the cleanliness status of the water tank, and a cleaning plan is generated according to the cleanliness status.
2. The method for identifying and removing moss in a sink based on deep learning according to claim 1 is characterized in that: The target detection is performed on the regional water tank image by a preset target detection algorithm, the predicted moss area is identified, and predicted moss feature data is obtained, and the predicted moss feature data is processed to obtain the predicted moss measurement index corresponding to the regional water tank image, including: Performing target detection on the regional water tank image by using a preset target detection algorithm, identifying and predicting the moss area, and obtaining predicted moss feature data, including color feature data and texture feature data; The color feature data includes a color histogram and a color moment, and the color moment includes a first-order color moment, a second-order color moment, and a third-order color moment; The texture feature data includes an LBP histogram and a GLCM feature matrix; The color histogram and color moment as well as the LBP histogram and GLCM feature matrix are processed to obtain a predicted moss measurement index corresponding to the regional water tank image.
3. The method for identifying and removing moss in a sink based on deep learning according to claim 2 is characterized in that: The processing according to the color histogram and the color moment as well as the LBP histogram and the GLCM feature matrix to obtain the predicted moss measurement index corresponding to the regional water tank image includes: The color histogram, the first-order color moment, the second-order color moment and the third-order color moment are combined into a joint feature vector, and the combined feature vector is input into a preset moss recognition model for processing to obtain a moss color probability value; The LBP histogram and the GLCM feature matrix are respectively compared with the preset moss LBP histogram and the preset moss GLCM feature matrix for similarity, to obtain a local binary similarity value and a grayscale co-occurrence similarity value; The predicted moss measurement index corresponding to the regional water tank image is obtained by processing the moss color probability value, the local binary similarity value and the grayscale symbiosis similarity value.
4. The method for identifying and removing moss in a sink based on deep learning according to claim 3 is characterized in that: The processing according to the moss pixel quantity and position data combined with the regional water tank image to obtain the water tank cleanliness evaluation index includes: Extracting the number of regional pixels of the regional water tank image according to the regional water tank image; Compare the number of moss pixels with the number of regional pixels to obtain the regional moss coverage rate corresponding to the regional water tank image, and then perform mean processing to obtain the water tank moss coverage rate; Acquire the total number of regional water tank images within a preset range, and determine the number of regional water tank images with moss within the preset range according to the position data; Compare the number of regional water tank images with the total number to obtain regional moss density corresponding to a preset range, and then perform mean processing to obtain water tank moss density; Processing is performed according to the moss coverage rate of the area to obtain moss distribution uniformity data; The data of the moss coverage rate, moss density and moss distribution uniformity of the sink are input into a preset sink cleanliness evaluation model for processing to obtain a sink cleanliness evaluation index.
5. The method for identifying and removing moss in a sink based on deep learning according to claim 4 is characterized in that: The water tank cleanliness evaluation index is compared with a preset water tank cleanliness threshold to obtain the cleanliness status of the water tank, and a cleaning plan is generated according to the cleanliness status, including: Comparing the water tank cleanliness evaluation index with a preset water tank cleanliness threshold, wherein the preset water tank cleanliness threshold includes a first preset water tank cleanliness threshold and a second preset water tank cleanliness threshold, and the first preset water tank cleanliness threshold is less than the second preset water tank cleanliness threshold; If the water tank cleanliness evaluation index is less than or equal to the first preset water tank cleanliness threshold, the cleaning state is determined to be clean, and a cleaning solution is generated as not cleaning; If the water tank cleanliness evaluation index is greater than the first preset water tank cleanliness threshold and less than or equal to the second preset water tank cleanliness threshold, the cleaning state is determined to be slightly contaminated, and a cleaning solution is generated for cleaning with a linked cleaning device; If the water tank cleanliness evaluation index is greater than a second preset water tank cleanliness threshold, the cleaning state is determined to be severely polluted, and a cleaning solution is generated to link cleaning equipment and manual operation and maintenance cleaning.
6. The method for identifying and removing moss in a sink based on deep learning according to claim 5, characterized in that: Also includes: Obtaining the average value of the predicted moss measurement index for the same period of history corresponding to the real-time image acquisition time; Comparing the predicted moss measurement index with the predicted moss measurement index mean to obtain a moss measurement deviation rate; Performing a threshold comparison between the moss measurement deviation rate and a preset moss measurement deviation rate threshold; If the moss measurement deviation rate is less than or equal to a preset moss measurement deviation rate threshold, then determining that the predicted moss measurement index is normal; If the moss measurement deviation rate is greater than a preset moss measurement deviation rate threshold, the predicted moss measurement index is determined to be abnormal.
7. The method for identifying and removing moss in a sink based on deep learning according to claim 6, characterized in that: If the moss measurement deviation rate is greater than a preset moss measurement deviation rate threshold, the predicted moss measurement index is determined to be abnormal, and then the method further includes: Obtaining water quality assessment data and environmental assessment data of the secondary sedimentation tank during the real-time image acquisition time; Obtain historical water quality assessment data and historical environmental assessment data of the secondary sedimentation tank water tank in the same period of history corresponding to the real-time image acquisition time; Processing the water quality assessment data and the environmental assessment data in combination with the historical water quality assessment data and the historical environmental assessment data to obtain a moss measurement correction coefficient; The predicted moss measurement index is corrected according to the moss measurement correction coefficient to obtain a moss measurement optimization index.
8. A deep learning-based water tank moss recognition and removal system, characterized in that: The invention comprises a memory and a processor, wherein the memory comprises a program for identifying and removing moss in a water tank based on deep learning, and when the program for identifying and removing moss in a water tank based on deep learning is executed by the processor, the following steps are implemented: Collect the real-time image of the secondary sedimentation tank and perform preprocessing to obtain the initial tank image; Segmenting the initial water tank image using a preset image segmentation algorithm to obtain a regional water tank image; Performing target detection on the regional water tank image by using a preset target detection algorithm, identifying and predicting the moss area, and obtaining predicted moss feature data, and performing processing according to the predicted moss feature data to obtain a predicted moss measurement index corresponding to the regional water tank image; Performing a threshold comparison between the predicted moss measurement index and a preset moss measurement threshold; If the predicted moss measurement index is less than a preset moss measurement threshold, it is determined that there is no moss in the predicted moss area; If the predicted moss measurement index is greater than or equal to a preset moss measurement threshold, it is determined that moss exists in the predicted moss area, and the number and position data of moss pixels in the predicted moss area are obtained; Processing the moss pixel quantity and position data in combination with the regional water tank image to obtain a water tank cleanliness evaluation index; The cleanliness evaluation index of the water tank is compared with a preset cleanliness threshold of the water tank to obtain the cleanliness status of the water tank, and a cleaning plan is generated according to the cleanliness status.
9. The deep learning-based water tank moss identification and removal system according to claim 8, characterized in that: The target detection is performed on the regional water tank image by a preset target detection algorithm, the predicted moss area is identified, and predicted moss feature data is obtained, and the predicted moss feature data is processed to obtain the predicted moss measurement index corresponding to the regional water tank image, including: Performing target detection on the regional water tank image by using a preset target detection algorithm, identifying and predicting the moss area, and obtaining predicted moss feature data, including color feature data and texture feature data; The color feature data includes a color histogram and a color moment, and the color moment includes a first-order color moment, a second-order color moment, and a third-order color moment; The texture feature data includes an LBP histogram and a GLCM feature matrix; The color histogram and color moment as well as the LBP histogram and GLCM feature matrix are processed to obtain a predicted moss measurement index corresponding to the regional water tank image.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a deep learning-based method for identifying and removing moss from a sink. When the deep learning-based method for identifying and removing moss from a sink is executed by a processor, the steps of the deep learning-based method for identifying and removing moss from a sink are implemented as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Water surface oil stain detection method
CN113808089A
Pool stain positioning method and system in combination with RGBD image
CN113888632A
Sewage grade identification method and device based on image
CN115619998A
Data acquisition and reading method based on computer vision image
CN116503622A
Water body environment evaluation and prediction method and system based on deep learning
CN117172430A
Cited By
Intelligent cleaning method for single-tube reactor based on compounding of multiple surfactants
CN120755144A