Black and odorous water body identification method and system based on artificial intelligence
Through the black and odorous water recognition method based on artificial intelligence, pixel-level analysis and neural network optimization technology are used to solve the problems of insufficient adaptability and inaccurate monitoring results in the existing technology when identifying black and odorous water bodies, and more accurate pollution rating and stronger environmental adaptability are achieved.
Patent Information
- Application Number
- CN202510217681.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-26
- Publication Date
- 2025-03-28
- Estimated Expiration
- 2045-02-26
AI Technical Summary
When identifying and monitoring the black and odor phenomena in water, it is difficult to deeply analyze subtle chemical and biological changes, and when facing image diversity and different light and angle conditions, the adaptability is insufficient, resulting in inaccurate or misjudgment of monitoring results.
Using the black and odorous water body recognition method based on artificial intelligence, we collect water body images for pixel-level analysis, calculate the spectral response and color distribution, and generate spectral characteristic data. Then, the weight of the neural network layer is adjusted, the image rotation and scaling is performed, the training sample diversity is optimized, and the enhanced feature set is extracted. Through forward and backward propagation, the neural network weights are optimized, the water body images with different pollution degrees are distinguished, optimization identification records are generated, and the pollution level is finally evaluated.
It significantly improves the performance of the network in water bodies distinguishing different levels of pollution, can output accurate pollution level assessment results, enhances the generalization ability and environmental adaptability of the model, provides more accurate data support, and provides targeted data support for water quality management and pollution control measures.
Smart Images

Figure CN119723355A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of water body identification, and in particular to a method and system for identifying black and odorous water bodies based on artificial intelligence. Background Art
[0002] The field of water body identification technology involves the use of sensors, image analysis, remote sensing technology and data processing methods to identify and monitor various characteristics of water bodies, including not only the detection of surface coverage, size and boundaries of water bodies, but also the evaluation of water quality parameters such as color, turbidity and chemical composition. With the development of artificial intelligence and machine learning technology, water body identification technology has been able to achieve more accurate and automated water status monitoring and analysis, and has important applications in environmental monitoring, resource management, disaster response and urban planning.
[0003] Among them, the black and odorous water identification method is used to specifically identify and evaluate the pollution status in urban water bodies, especially to identify water bodies that have turned black and emit a foul odor due to the decomposition of organic matter. The main purpose is to provide accurate polluted water data to environmental protection departments to support the formulation and implementation of water quality management and pollution control measures. By identifying black and odorous water bodies, relevant departments can respond in a timely manner and take measures to improve water quality, restore water health, and improve the quality of life of urban residents.
[0004] Although existing technologies use sensors and remote sensing technology to monitor water bodies, they are limited in the in-depth analysis of water quality parameters, especially in identifying subtle chemical and biological changes. Existing methods often fail to provide sufficient data to support accurate pollution identification when dealing with black and smelly phenomena caused by the decomposition of organic matter. They focus mainly on physical properties rather than the complex chemical and biological composition of water bodies. In addition, current technologies are not adaptable enough when faced with image diversity, and the stability and accuracy of images acquired under different lighting and angle conditions are low, which may lead to inaccurate or misjudgment of monitoring results in practical applications. This limitation is particularly evident in the rapidly changing urban water environment, resulting in insufficient data when formulating response measures, affecting the effectiveness of pollution control and the improvement of residents' quality of life. Summary of the invention
[0005] The purpose of the present invention is to solve the shortcomings of the prior art and to propose a method and system for identifying black and odorous water bodies based on artificial intelligence.
[0006] In order to achieve the above object, the present invention adopts the following technical solutions:
[0007] A method for identifying black and odorous water bodies based on artificial intelligence comprises the following steps:
[0008] S1: Collect water body images, perform pixel-level analysis on the water body images, calculate the spectral response of each pixel, analyze the color distribution, and screen the image areas that match the black and smelly characteristics by comparing the spectral characteristics and color standards to generate spectral characteristic data;
[0009] S2: According to the spectral characteristic data, the weight of the neural network layer is adjusted, the image is rotated and scaled, the diversity of training samples is optimized, and the features of each transformed water body image are extracted to obtain an enhanced feature set;
[0010] S3: by using the enhanced feature set, performing neural network forward propagation and backward propagation, optimizing neural network weights and bias parameters, optimizing feature recognition capabilities, distinguishing water body images with different pollution levels, and generating optimized recognition records;
[0011] S4: performing image classification according to the optimized recognition record, identifying and marking the black and odorous water area in the image, analyzing the texture and color differences in the black and odorous water area, and outputting the labeled classification results;
[0012] S5: According to the labeled classification results, the pollution level is assessed, and the water body images are sorted and classified according to the preset pollution level standard. By comparing the image features of the difference classification, the pollution level corresponding to each image is output to generate the black and odorous water body identification pollution judgment result.
[0013] Optionally, the spectral characteristic data includes spectral response distribution results, color standard matching degree and image area screening index; the enhanced feature set includes image rotation characteristics, image scaling characteristics and feature diversity index; the optimized recognition record includes feature recognition accuracy, pollution degree discrimination index and network weight configuration; the annotation classification results include area annotation details, texture recognition data and color analysis results; the black and odorous water body identification and pollution judgment results include pollution level classification, image feature comparison index and pollution assessment data.
[0014] Optionally, the specific steps of collecting water body images, performing pixel-level analysis on the water body images, calculating the spectral response of each pixel, analyzing the color distribution, and screening image areas matching black and odorous characteristics by comparing spectral characteristics and color standards to generate spectral characteristic data are as follows:
[0015] S101: Collect water body images, capture the natural state of the water body, adjust the aperture and exposure settings to optimize the image clarity and color saturation, and obtain a high-resolution water body image set;
[0016] S102: Based on the high-resolution water body image set, by adjusting the color threshold and contrast, recording the color code of each pixel, classifying and storing the data, and generating pixel color data;
[0017] S103: Based on the pixel color data, color matching is performed, compared with known spectral standards, pixel areas matching the characteristics of black and odorous water bodies are screened, and spectral characteristic data is comprehensively generated.
[0018] Optionally, according to the spectral characteristic data, the weights of the neural network layer are adjusted, the image is rotated and scaled, the diversity of training samples is optimized, and the features of each transformed water body image are extracted to obtain the enhanced feature set. The specific steps are:
[0019] S201: Adjust the neural network layer parameters, optimize the weights and bias values according to the spectral characteristic data, verify the adjustment effect, and obtain the optimized network parameters;
[0020] S202: Based on the optimized network parameters, rotating and scaling the water body image, setting the rotation angle range and scaling ratio, maximizing the image sample viewing angle and size diversity, and generating a transformed image set;
[0021] S203: Based on the transformed image set, key water body features of each transformed image are annotated, image feature data are extracted and recorded, and the image feature data are merged to obtain an enhanced feature set.
[0022] Optionally, the specific steps of performing neural network forward propagation and backward propagation through the enhanced feature set, optimizing neural network weights and bias parameters, optimizing feature recognition capabilities, distinguishing water body images with different pollution levels, and generating optimized recognition records are:
[0023] S301: Based on the enhanced feature set, configure the initial forward propagation of the neural network, set the input layer parameters, transfer feature data layer by layer, monitor the activation output of each layer, and obtain the forward propagation result;
[0024] S302: using the forward propagation result, starting the backward propagation process, adjusting the weight and bias parameters of the neural network by adjusting the learning rate and error feedback, and generating adjusted network parameters;
[0025] S303: Based on the adjusted network parameters, perform cyclic iterative training to optimize the feature recognition performance of the neural network, perform cyclic testing and verification, and generate optimized recognition records.
[0026] Optionally, according to the optimized recognition record, performing image classification, identifying and marking the black and odorous water area in the image, analyzing the texture and color differences in the black and odorous water area, and outputting the marked classification results are as follows:
[0027] S401: Based on the optimized recognition record, image classification parameters are set, including color threshold and texture recognition sensitivity, and black and odorous water areas in the image are annotated to obtain a preliminary annotated image set;
[0028] S402: using the preliminary annotated image set, adjusting color and texture filter parameters, calculating the texture difference value of each annotated black and odorous water body area, refining the feature classification of each black and odorous water body area, and generating refined annotated data;
[0029] S403: Based on the refined annotation data, the classification information of each black and odorous water area is integrated and output to generate an annotation classification result.
[0030] Optionally, the texture difference value of each marked black and odorous water area is calculated according to the formula:
[0031]
[0032] Calculate, where Represents the texture difference value of each marked black and odorous water area, Representative The texture value of the pixel, Represents the texture average of all pixels in the selected area. and Represents the color mean of water area and non-water area respectively. represents the surface area of the water body, The bounding perimeter representing the area of water.
[0033] Optionally, according to the labeled classification results, the pollution level is assessed, and according to the preset pollution level standard, the water body images are sorted and classified, and the pollution level corresponding to each image is output by comparing the image features of the difference classification. The specific steps of generating the black and odorous water body identification pollution judgment result are:
[0034] S501: Based on the labeled classification results, set the identification standard of each pollution level, calculate the confidence of each pollution level, and obtain preliminary pollution level data;
[0035] S502: using the preliminary pollution level data, comparing the images of each level, determining the degree of water pollution, and generating a refined pollution level classification;
[0036] S503: Based on the refined pollution level classification, the pollution type is recorded, a comprehensive assessment of the severity of water pollution is conducted, and a black and odorous water body identification pollution determination result is generated.
[0037] Optionally, the confidence level of each pollution level is calculated according to the formula:
[0038]
[0039] Calculate, where Indicates the confidence level for each pollution level, represents the number of decision trees in the random forest, represents the output pollution level of a single decision tree, Represents the average of the pollution levels output by all decision trees.
[0040] The black and odorous water body identification system based on artificial intelligence includes:
[0041] The image acquisition module collects water body images, captures the natural state of the water body, records the color code of each pixel by adjusting the color threshold and contrast, compares it with the known spectral standard, screens the pixel area that matches the characteristics of black and odorous water bodies, and comprehensively generates spectral characteristic data;
[0042] The image processing module adjusts the neural network layer parameters, optimizes the weights and bias values according to the spectral characteristic data, rotates and scales the water body image, maximizes the image sample viewing angle and size diversity, and generates a transformed image set;
[0043] The data annotation module annotates key water features of each transformed image based on the transformed image set, configures the initial forward propagation of the neural network, monitors the activation output of each layer, and obtains the forward propagation result;
[0044] The network training module uses the forward propagation results to start the backward propagation process, adjust the weight and bias parameters of the neural network, perform cyclic iterative training, perform cyclic testing and verification, and generate optimized recognition records;
[0045] The classification and discrimination module sets image classification parameters based on the optimized recognition record, marks the black and odorous water area in the image, calculates the texture difference value of each marked black and odorous water area, integrates and outputs the classification information of each black and odorous water area, and generates a marked classification result;
[0046] Based on the labeled classification results, the assessment decision module sets the identification criteria for each pollution level, calculates the confidence level of each pollution level, determines the degree of water pollution, conducts a comprehensive assessment of the severity of water pollution, and generates black and odorous water identification pollution judgment results.
[0047] Compared with the prior art, the advantages and positive effects of the present invention are:
[0048] In the present invention, by conducting in-depth analysis of the spectral response and color distribution of each pixel, it is possible to identify pollution characteristics in water bodies at a microscopic level, optimize neural network weight adjustment and image processing, effectively process images of various scales and angles, enhance the generalization ability and environmental adaptability of the model, and significantly improve the performance of the network in distinguishing water images with different degrees of pollution through meticulous forward and backward propagation optimization. It is able to output accurate pollution level assessment results, and provide data support for the formulation of more targeted water quality management and pollution control measures. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0050] Figure 1 It is a schematic diagram of the steps of the present invention;
[0051] Figure 2 is a flow chart of the steps of S1 of the present invention;
[0052] Figure 3 is a flow chart of the steps of S2 of the present invention;
[0053] Figure 4 is a flow chart of the steps of S3 of the present invention;
[0054] Figure 5 is a flow chart of the steps of S4 of the present invention;
[0055] Figure 6 is a flow chart of the steps of S5 of the present invention;
[0056] Figure 7 It is a system module diagram of the present invention. DETAILED DESCRIPTION
[0057] The technical solution of the present invention is described below in conjunction with the accompanying drawings.
[0058] In the embodiments of the present invention, words such as "exemplarily" and "for example" are used to indicate examples, illustrations or explanations. Any embodiment or design described as "example" in the present invention should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of the word "example" is intended to present the concept in a specific way. In addition, in the embodiments of the present invention, the meaning expressed by "and / or" can be both, or it can be either of the two.
[0059] In the embodiments of the present invention, "image" and "picture" can sometimes be used interchangeably. It should be noted that when the difference between them is not emphasized, the meanings they intend to express are the same. "of", "corresponding, relevant" and "corresponding" can sometimes be used interchangeably. It should be noted that when the difference between them is not emphasized, the meanings they intend to express are the same.
[0060] In the embodiments of the present invention, sometimes a subscript such as W1 may be written as a non-subscript such as W1. When the difference is not emphasized, the meanings to be expressed are consistent.
[0061] In order to make the technical problems, technical solutions and advantages to be solved by the present invention more clear, a detailed description will be given below with reference to the accompanying drawings and specific embodiments.
[0062] See also Figure 1 The embodiment of the present invention provides a method for identifying black and odorous water bodies based on artificial intelligence, comprising the following steps:
[0063] S1: Collect water body images, perform pixel-level analysis on the water body images, calculate the spectral response of each pixel, analyze the color distribution, and screen the image areas that match the black and smelly characteristics by comparing the spectral characteristics and color standards to generate spectral characteristic data;
[0064] S2: According to the spectral characteristic data, the weights of the neural network layer are adjusted, the image is rotated and scaled, the diversity of training samples is optimized, and the features of each transformed water image are extracted to obtain an enhanced feature set;
[0065] S3: By enhancing the feature set, performing neural network forward propagation and backward propagation, optimizing the neural network weights and bias parameters, optimizing feature recognition capabilities, distinguishing water body images with different pollution levels, and generating optimized recognition records;
[0066] S4: Perform image classification based on the optimized recognition records, identify and annotate the black and odorous water area in the image, analyze the texture and color differences in the black and odorous water area, and output the annotated classification results;
[0067] S5: According to the labeled classification results, the pollution level is assessed. According to the preset pollution level standard, the water body images are sorted and classified. By comparing the image features of the difference classification, the pollution level corresponding to each image is output to generate the pollution judgment result of black and odorous water body identification.
[0068] Spectral characteristic data include spectral response distribution results, color standard matching degree and image area screening indicators; enhanced feature sets include image rotation characteristics, image scaling characteristics and feature diversity indicators; optimized recognition records include feature recognition accuracy, pollution degree discrimination index and network weight configuration; annotation classification results include area annotation details, texture recognition data and color analysis results; black and odorous water body identification and pollution judgment results include pollution level classification, image feature comparison indicators and pollution assessment data.
[0069] See also Figure 2 , the specific steps of S1 are:
[0070] S101: Collect water body images, capture the natural state of the water body, adjust the aperture and exposure settings to optimize the image clarity and color saturation, and obtain a high-resolution water body image set;
[0071] In the initial step of collecting water body images, the camera equipment is first configured to adapt to the lighting conditions and dynamic range of natural water bodies to ensure that the images can reflect the true state of the water body. Specific operations include selecting the appropriate aperture size to control the amount of light entering, and adjusting the exposure time to adapt to the gloss and reflection of the water surface. In addition, the ISO sensitivity needs to be adjusted for different weather and lighting conditions to ensure that the color saturation and detail clarity of the image are optimal. Through fine-tuning, the collected water body images will have high resolution and excellent color performance, providing a high-quality data foundation for subsequent analysis and processing, and can more accurately reflect the natural condition of the water body.
[0072] S102: Based on the high-resolution water body image set, by adjusting the color threshold and contrast, recording the color code of each pixel, classifying and storing the data, and generating pixel color data;
[0073] When processing a set of high-resolution water images, the color thresholds in the image are first adjusted accurately. The purpose of the adjustment is to highlight the color characteristics of different components in the water body so as to better distinguish the water state. For example, setting the green and blue thresholds higher can help identify algae and clean water surfaces. The contrast adjustment is to make the color levels of the image more obvious, which is convenient for subsequent pixel-level processing. The color coding record of each pixel is completed through image analysis, including the precise measurement and recording of RGB values. This process involves not only the capture of color data, but also the effective classification and storage of data so that it can be quickly called and compared in the next analysis stage, providing data support for identifying and analyzing potential pollution problems in water bodies.
[0074] S103: Based on the pixel color data, color matching is performed, compared with known spectral standards, pixel areas matching the characteristics of black and odorous water bodies are screened, and spectral characteristic data is comprehensively generated;
[0075] Based on the pixel color data, color matching is performed according to the formula , calculate the difference with the spectral standard. Where, Represents the degree of color matching. represents the color channel weight, Represents the actual pixel color value, represents the spectral standard color value, Represents the number of color channels. For a typical set of data, assuming , , weight , the calculation process is:
[0076]
[0077] The results show that the color matching degree is 120 and the color difference is significant, indicating that this area may have the characteristics of black and smelly water bodies. Further screening of these areas can effectively identify polluted water bodies.
[0078] See also Figure 3 , the specific steps of S2 are:
[0079] S201: Adjust the neural network layer parameters, optimize the weights and bias values according to the spectral characteristic data, verify the adjustment effect, and obtain the optimized network parameters;
[0080] According to the spectral characteristic data, the weights and bias values of the neural network are optimized according to the formula , calculate the optimized network parameters. In the formula, represents the original weight, represents the learning rate, represents the loss function, Represents the gradient of the weight. Determine the initial weight of the neural network , learning rate , the gradient of the loss function with respect to the weights , then the updated weight is calculated as:
[0081]
[0082] The results show that the weight is updated from 0.5 to 0.502 through the gradient descent method, showing that the process of fine-tuning the network parameters can be effectively optimized according to the characteristics of the spectral data, thereby improving the network performance.
[0083] S202: Based on the optimized network parameters, the water body image is rotated and scaled, the rotation angle range and the scaling ratio are set, the image sample viewing angle and size diversity are maximized, and a transformed image set is generated;
[0084] Based on the optimized network parameters, the water body images are rotated and scaled to increase the perspective and size diversity of the image samples. The rotation angle and scaling ratio are flexibly adjusted according to actual needs to ensure the diversity of the images while maintaining the integrity of the features. The images are automatically adjusted according to the preset angle range and scale parameters to ensure that each transformed image set contains sufficient perspective and size changes, which directly affects the effect and accuracy of subsequent feature extraction. The generated transformed image set is used for further feature analysis and model training to improve the model's adaptability to different perspectives and sizes.
[0085] S203: Based on the transformed image set, key water body features of each transformed image are annotated, image feature data are extracted and recorded, and the image feature data are merged to obtain an enhanced feature set;
[0086] Based on the transformed image set, the key water body features in each image are annotated, including manual or automatic identification and marking of specific water body features in the image, such as pollution areas, aquatic plant distribution, etc. The annotated data will be used to extract image features and then generate an enhanced feature set. Feature extraction involves calculating the texture, color distribution and shape descriptors of the image. The extraction of each feature depends on precise algorithms and models. Through enhanced feature data, the state of the water body can be described more comprehensively, providing a rich data foundation, thereby improving the recognition accuracy and robustness of the model.
[0087] See also Figure 4 , the specific steps of S3 are:
[0088] S301: Based on the enhanced feature set, configure the initial forward propagation of the neural network, set the input layer parameters, pass the feature data layer by layer, monitor the activation output of each layer, and obtain the forward propagation result;
[0089] The process of parameter configuration and data transmission involves accurately setting the number of nodes and activation function type of each layer to ensure that each layer can effectively receive and process the incoming feature data. The setting of the input layer parameters is adjusted according to the dimension and type of the feature data to meet the initial needs of the network. The monitoring of the output of each layer helps to observe the flow of data in the network and the activation effect of the activation function, so as to make timely adjustments to the network structure to ensure that the results of the forward propagation can accurately reflect the characteristics of the input data and provide a basis for the subsequent learning process.
[0090] S302: Using the forward propagation result, start the backward propagation process, adjust the weight and bias parameters of the neural network by adjusting the learning rate and error feedback, and generate adjusted network parameters;
[0091] Use the forward propagation results to start the backward propagation process, according to the formula , calculate the adjusted weight parameters. In the formula, represents the update amount of the weight, represents the learning rate, represents the gradient of the loss function with respect to the weights. Consider a simple neural network with initial weights , learning rate , the loss function gradient , the weight update amount is calculated as:
[0092]
[0093] New weights:
[0094]
[0095] The results show that through back propagation, the weight is updated from 0.6 to 0.595, demonstrating the specific steps and effects of the weight adjustment process and optimizing the network's ability to process features.
[0096] S303: Based on the adjusted network parameters, perform cyclic iterative training to optimize the feature recognition performance of the neural network, perform cyclic testing and verification, and generate optimized recognition records;
[0097] In each iterative training, the parameters are adjusted according to the results of the previous training to gradually reduce the prediction error. The cyclic testing and verification process involves the repeated use of training sets and verification sets to test the performance of the model on new data, ensuring that the parameter adjustment of each iteration is based on comprehensive data analysis. The iterative process helps the model gradually achieve higher accuracy and generalization ability after multiple rounds of training. The generated optimization recognition records record in detail the parameter settings and performance of each iteration, providing a detailed reference for further model optimization and application.
[0098] See also Figure 5 , the specific steps of S4 are:
[0099] S401: Based on the optimized recognition records, image classification parameters are set, including color threshold and texture recognition sensitivity, and black and odorous water areas in the image are annotated to obtain a preliminary annotated image set;
[0100] Analyze and optimize the data in the recognition records to determine the most suitable color threshold and texture sensitivity settings to most accurately mark the black and smelly water areas in the image. The adjustment of the color threshold is based on the statistical analysis of the color distribution in the image to distinguish the color range of normal water and polluted water. The texture recognition sensitivity is adjusted according to the texture characteristics of the water surface to ensure that the texture changes on the surfaces of different water bodies can be effectively identified. The precise setting of these parameters is the key to achieving effective classification. The resulting preliminary annotated image set provides a basis for further analysis and processing.
[0101] S402: using the preliminary annotated image set, adjusting the color and texture filter parameters, calculating the texture difference value of each annotated black and odorous water body area, refining the feature classification of each black and odorous water body area, and generating refined annotated data;
[0102] The texture difference value of each marked black and odorous water area is calculated according to the formula:
[0103]
[0104] Calculate, where Represents the texture difference value of each marked black and odorous water area, Representative The texture value of the pixel, Represents the texture average of all pixels in the selected area, which is used to describe the degree of texture balance in the area. and Represents the color mean of the water area and the non-water area, respectively, and is used to measure the color difference between the two. represents the surface area of the water body, The bounding perimeter representing the area of water.
[0105] Represents the first The texture value of the pixel, .
[0106] is the average texture value of all pixels in the selected area. If there are 10 pixels in the area and the total texture value is 200, then .
[0107] and They are the color mean values of the water area and the non-water area obtained through color analysis, and through actual measurement, , .
[0108] and Represent the surface area and boundary perimeter of the water body, respectively, measured by Geographic Information System (GIS), Square meters, rice.
[0109] Calculate the variance of texture differences:
[0110]
[0111]
[0112] Calculate the color difference:
[0113]
[0114] Calculate the shape index:
[0115]
[0116] Substitute all values into the formula to calculate :
[0117]
[0118] The results show that under the given texture and color data, the calculated texture difference value is 0.0403. The low value reflects the high uniformity of texture and color features in the area. This result is crucial for judging and classifying the texture and color characteristics of black and odorous water areas, and can be used for further data analysis and decision support.
[0119] S403: Based on the refined labeled data, the classification information of each black and odorous water area is integrated and output to generate a labeled classification result;
[0120] Integrating the classification information of each black and odorous water area includes analyzing the refined labeled data, comparing the texture and color characteristics of each area, classifying the areas with similar characteristics, and generating labeled classification results. This is the final stage in the black and odorous water detection process. By integrating the detailed information of each labeled area, detailed classification results can be generated. The results are helpful for subsequent water body management and research, provide scientific basis and data support, and are the basis for implementing water quality monitoring and improvement plans.
[0121] See also Figure 6 , the specific steps of S5 are:
[0122] S501: Based on the labeled classification results, set the identification standard for each pollution level, calculate the confidence level of each pollution level, and obtain preliminary pollution level data;
[0123] The confidence level for each pollution level is given by the formula,
[0124]
[0125] Calculate, where Indicates the confidence level for each pollution level, Represents the number of decision trees in the random forest, a parameter used to enhance the robustness of the model, represents the output pollution level of a single decision tree, Represents the average of the pollution levels output by all decision trees and is used to determine the central tendency of the ensemble model.
[0126] Set the parameter N, which represents the number of decision trees in the random forest; Represents the output pollution level of each decision tree, which is obtained by training and testing each decision tree based on the actual monitored pollution data; set is the average pollution level output by all decision trees, calculated by to get the average of.
[0127] Collect the pollution levels of the five decision tree outputs, which are 3, 5, 4, 4, and 6. First, calculate the average , to determine :
[0128]
[0129] Calculate each and The sum of the absolute differences of :
[0130]
[0131]
[0132] Apply the formula to calculate confidence :
[0133]
[0134] The results show that the calculated pollution level confidence is 0.42, which means that the average pollution level of 4.4 has high consistency and credibility in all decision tree outputs. Numerical results are crucial for assessing the degree of environmental pollution in a specific area, providing confidence in the assessment of water pollution levels and further guiding environmental supervision.
[0135] S502: using the preliminary pollution level data, comparing the images of each level, determining the degree of water pollution, and generating a refined pollution level classification;
[0136] Using the preliminary pollution level data, the images of each level are compared and the formula , determine the degree of water pollution. In the formula, Represents the degree of pollution, Represents the pollution index of each level of image, Represents the weight of the corresponding pollution level. Consider three pollution levels, where the pollution index and the corresponding level weights , then the calculation of pollution degree is:
[0137]
[0138] The results showed that the pollution level was 0.875, indicating that the water pollution was serious and measures needed to be taken to control it. This value would help to more accurately classify water pollution and carry out detailed management and intervention at each level.
[0139] S503: Based on the refined pollution level classification, the pollution type is recorded, a comprehensive assessment of the severity of water pollution is conducted, and a black and odorous water body identification pollution determination result is generated;
[0140] Based on the refined classification of pollution levels, the pollution data at all levels are integrated. By comparing and analyzing the characteristics of each pollution type, such as chemical composition, presence of harmful organisms, etc., a detailed assessment is conducted, and the specific information and distribution of each pollution type are recorded. The recording and evaluation of data are to better understand the pollution sources and pollution processes. The generated black and odorous water body identification pollution determination results will provide the necessary scientific basis for decision-making and guide future water quality improvement and pollution prevention and control strategies.
[0141] See also Figure 7 , the black and odorous water body identification system based on artificial intelligence includes:
[0142] The image acquisition module collects water body images, captures the natural state of the water body, records the color code of each pixel by adjusting the color threshold and contrast, compares it with the known spectral standard, screens the pixel area that matches the characteristics of black and odorous water bodies, and comprehensively generates spectral characteristic data;
[0143] The image processing module adjusts the neural network layer parameters, optimizes the weights and bias values according to the spectral characteristic data, rotates and scales the water body image, maximizes the image sample viewing angle and size diversity, and generates a transformed image set;
[0144] The data annotation module annotates the key water features of each transformed image based on the transformed image set, configures the initial forward propagation of the neural network, monitors the activation output of each layer, and obtains the forward propagation results;
[0145] The network training module uses the forward propagation results to start the backward propagation process, adjust the weight and bias parameters of the neural network, conduct cyclic iterative training, perform cyclic testing and verification, and generate optimized recognition records;
[0146] The classification and discrimination module sets image classification parameters based on optimized recognition records, annotates the black and odorous water areas in the image, calculates the texture difference value of each annotated black and odorous water area, integrates and outputs the classification information of each black and odorous water area, and generates annotated classification results;
[0147] Based on the labeled classification results, the assessment and decision-making module sets the identification criteria for each pollution level, calculates the confidence level of each pollution level, determines the degree of water pollution, conducts a comprehensive assessment of the severity of water pollution, and generates black and odorous water identification and pollution judgment results.
[0148] The above are only preferred embodiments of the present invention and are not intended to limit the present invention in other forms. Any technician familiar with the profession may use the technical contents disclosed above to change or modify them into equivalent embodiments with equivalent changes and apply them to other fields. However, any simple modification, equivalent change and modification made to the above embodiments based on the technical essence of the present invention without departing from the technical solution of the present invention still falls within the protection scope of the technical solution of the present invention.
Claims
1. A method for identifying black and odorous water bodies based on artificial intelligence, characterized in that: The following steps are involved: Collect water body images, perform pixel-level analysis on the water body images, calculate the spectral response of each pixel, analyze the color distribution, and screen the image areas that match the black and smelly characteristics by comparing the spectral characteristics and color standards to generate spectral characteristic data; According to the spectral characteristic data, the weight of the neural network layer is adjusted, the image is rotated and scaled, the diversity of training samples is optimized, and the features of each transformed water body image are extracted to obtain an enhanced feature set; Through the enhanced feature set, forward propagation and backward propagation of the neural network are performed to optimize the weight and bias parameters of the neural network, optimize the feature recognition capability, distinguish water body images with different pollution levels, and generate optimized recognition records; According to the optimized recognition record, perform image classification, identify and annotate the black and odorous water area in the image, analyze the texture and color differences in the black and odorous water area, and output the annotated classification result; According to the labeled classification results, the pollution level is assessed, and the water body images are sorted and classified according to the preset pollution level standards. By comparing the image features of the difference classifications, the pollution level corresponding to each image is output to generate the pollution judgment result of black and odorous water body identification.
2. The black and odorous water body identification method based on artificial intelligence according to claim 1 is characterized in that: The spectral characteristic data includes spectral response distribution results, color standard matching degree and image area screening indicators; the enhanced feature set includes image rotation characteristics, image scaling characteristics and feature diversity indicators; the optimized recognition record includes feature recognition accuracy, pollution degree differentiation index and network weight configuration; the annotation classification results include area annotation details, texture recognition data and color analysis results; the black and odorous water body identification and pollution judgment results include pollution level classification, image feature comparison indicators and pollution assessment data.
3. The black and odorous water body identification method based on artificial intelligence according to claim 1 is characterized in that: The specific steps of collecting water body images, performing pixel-level analysis on the water body images, calculating the spectral response of each pixel, analyzing the color distribution, and screening the image areas that match the black and smelly characteristics by comparing the spectral characteristics and color standards to generate spectral characteristic data are as follows: Collect water body images, capture the natural state of the water body, adjust the aperture and exposure settings to optimize image clarity and color saturation, and obtain a high-resolution water body image set; Based on the high-resolution water body image set, by adjusting the color threshold and contrast, recording the color code of each pixel, classifying and storing the data, and generating pixel color data; Based on the pixel color data, color matching is performed, compared with known spectral standards, and pixel areas matching the characteristics of black and odorous water bodies are screened according to the formula: ; Calculate the difference with the spectral standard and generate the spectral characteristic data comprehensively, where: Represents the degree of color matching. represents the color channel weight, Represents the actual pixel color value, represents the spectral standard color value, Indicates the number of color channels.
4. The black and odorous water body identification method based on artificial intelligence according to claim 1 is characterized in that: According to the spectral characteristic data, the weights of the neural network layer are adjusted, the image is rotated and scaled, the diversity of training samples is optimized, and the features of each transformed water body image are extracted to obtain the enhanced feature set. The specific steps are as follows: Adjust the neural network layer parameters, optimize the weights and bias values according to the spectral characteristic data, and verify the adjustment effect according to the formula: ; Calculate and output optimized network parameters ,in, represents the original weight, represents the learning rate, represents the loss function, represents the gradient of the weight; Based on the optimized network parameters, rotating and scaling the water body image, setting the rotation angle range and scaling ratio, maximizing the image sample viewing angle and size diversity, and generating a transformed image set; Based on the transformed image set, key water body features of each transformed image are annotated, image feature data are extracted and recorded, and then merged to obtain an enhanced feature set.
5. The black and odorous water body identification method based on artificial intelligence according to claim 1 is characterized in that: The specific steps of executing neural network forward propagation and backward propagation through the enhanced feature set, optimizing neural network weights and bias parameters, optimizing feature recognition capabilities, distinguishing water body images with different pollution levels, and generating optimized recognition records are as follows: Based on the enhanced feature set, configure the initial forward propagation of the neural network, set the input layer parameters, pass the feature data layer by layer, monitor the activation output of each layer, and obtain the forward propagation result; Using the forward propagation result, starting the backward propagation process, adjusting the weight and bias parameters of the neural network by adjusting the learning rate and error feedback, and generating adjusted network parameters; Based on the adjusted network parameters, cyclic iterative training is performed to optimize the feature recognition performance of the neural network, and cyclic testing and verification are performed to generate optimized recognition records.
6. The black and odorous water body identification method based on artificial intelligence according to claim 1 is characterized in that: The specific steps of performing image classification according to the optimized recognition record, identifying and annotating the black and odorous water area in the image, analyzing the texture and color differences in the black and odorous water area, and outputting the annotated classification results are as follows: Based on the optimized recognition records, image classification parameters are set, including color threshold and texture recognition sensitivity, and black and odorous water areas in the images are annotated to obtain a preliminary annotated image set; Using the preliminary annotated image set, adjusting color and texture filter parameters, calculating the texture difference value of each annotated black and odorous water body area, refining the feature classification of each black and odorous water body area, and generating refined annotated data; Based on the refined labeled data, the classification information of each black and odorous water area is integrated and output to generate a labeled classification result.
7. The black and odorous water body identification method based on artificial intelligence according to claim 6 is characterized in that: The texture difference value of each marked black and odorous water area is calculated according to the formula: ; Calculate, where Represents the texture difference value of each marked black and odorous water area, Representative The texture value of the pixel, Represents the texture average of all pixels in the selected area. and Represents the color mean of water area and non-water area respectively. represents the surface area of the water body, The bounding perimeter representing the area of water.
8. The black and odorous water body identification method based on artificial intelligence according to claim 1 is characterized in that: According to the labeled classification results, the pollution level is assessed, and the water body images are sorted and classified according to the preset pollution level standard. By comparing the image features of the difference classification, the pollution level corresponding to each image is output, and the specific steps of generating the black and odorous water body identification pollution judgment result are as follows: Based on the labeled classification results, the identification criteria for each pollution level are set, the confidence level of each pollution level is calculated, and preliminary pollution level data is obtained; Using the preliminary pollution level data, the images of each level are compared according to the formula: ; Calculate the degree of water pollution and generate a refined pollution level classification, where: Represents the degree of pollution, Represents the pollution index of each level of image; Based on the refined pollution level classification, the pollution type is recorded, a comprehensive assessment of the severity of water pollution is conducted, and a pollution determination result for black and odorous water identification is generated.
9. The black and odorous water body identification method based on artificial intelligence according to claim 8 is characterized in that: The confidence level for each pollution level is given by the formula, ; Calculate, where Indicates the confidence level for each pollution level, represents the number of decision trees in the random forest, represents the output pollution level of a single decision tree, Represents the average of the pollution levels output by all decision trees.
10. A black and odorous water body identification system based on artificial intelligence, characterized in that: According to the method for identifying black and odorous water bodies based on artificial intelligence according to any one of claims 1 to 9, the system comprises: The image acquisition module collects water body images, captures the natural state of the water body, records the color code of each pixel by adjusting the color threshold and contrast, compares it with the known spectral standard, screens the pixel area that matches the characteristics of black and odorous water bodies, and comprehensively generates spectral characteristic data; The image processing module adjusts the neural network layer parameters, optimizes the weights and bias values according to the spectral characteristic data, rotates and scales the water body image, maximizes the image sample viewing angle and size diversity, and generates a transformed image set; The data annotation module annotates key water features of each transformed image based on the transformed image set, configures the initial forward propagation of the neural network, monitors the activation output of each layer, and obtains the forward propagation result; The network training module uses the forward propagation results to start the backward propagation process, adjust the weight and bias parameters of the neural network, perform cyclic iterative training, perform cyclic testing and verification, and generate optimized recognition records; The classification and discrimination module sets image classification parameters based on the optimized recognition record, marks the black and odorous water area in the image, calculates the texture difference value of each marked black and odorous water area, integrates and outputs the classification information of each black and odorous water area, and generates a marked classification result; Based on the labeled classification results, the assessment and decision-making module sets the identification criteria for each pollution level, calculates the confidence level of each pollution level, determines the degree of water pollution, conducts a comprehensive assessment of the severity of water pollution, and generates black and odorous water identification and pollution determination results.
Citation Information
Patent Citations
Method for automatic recognition and evaluation of black stinking water
CN106874948A
Spectral index model-based black and odorous water body identification method and system
CN107167431A
Satellite remote sensing image water body identification method suitable for color sensitivity
CN110032928A
Deep learning-based black and odorous water body remote sensing monitoring and grading method
CN116012726A
Training method, identification method, system and equipment of black and odorous water body model and medium
CN117876809A
Cited By
Sewage draining exit state identification method and system
CN120877161A