Sewage treatment method and system
The plastic recognition model constructed through deep learning algorithms and meta-learning strategies combined with ambient light intensity correction has solved the problem of rapid and real-time monitoring of plastic pollutant detection in sewage, achieving high-precision and efficient plastic particle recognition to adapt to different environments and condition.
Patent Information
- Application Number
- CN202411411517.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-11
- Publication Date
- 2025-01-17
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing plastic pollutant detection methods in sewage rely on sampling and laboratory analysis, are time-consuming and difficult to achieve rapid and real-time monitoring, and are subjective and error-free.
The plastic recognition model is constructed by the deep learning classification algorithm ConvNeXt combined attention mechanism. By real-time acquisition and preprocessing of water surface images, plastic features are extracted, and the meta-learning strategy is used for model training and optimization, combined with ambient light intensity correction, the plastic is achieved. Accurate identification and counting of particles.
It realizes high-precision identification of plastic particles, improves detection accuracy and efficiency, supports real-time monitoring, has strong generalization ability and adaptability, reduces the impact of noise, and enhances the clarity and accuracy of model analysis.
Smart Images

Figure CN119323778A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image recognition, and in particular to a sewage treatment method and system. Background Art
[0002] With the rapid development of industrialization and urbanization, plastic products are widely used in various fields, resulting in the generation of a large amount of plastic waste. These plastic wastes are difficult to degrade in the natural environment, forming plastic pollutants, which pose a serious threat to the environment and ecosystem. Plastic pollutants refer to plastic particles with a diameter of less than 5mm, especially wastewater containing plastic, which poses a potential risk to biodiversity and human health.
[0003] At present, the detection of plastic pollutants in sewage mainly relies on sampling and laboratory analysis methods. These methods usually require time-consuming sample collection, pretreatment and instrument analysis processes, making it difficult to achieve rapid and real-time monitoring. In addition, existing detection methods often rely on the operation and judgment of professionals, which are subjective and have errors.
[0004] Therefore, it is of great significance to develop an efficient and accurate intelligent detection method for plastic pollutants. The intelligent detection method for plastic pollutants based on image recognition uses computer vision technology and deep learning algorithms to analyze and process water surface images to achieve automatic recognition and counting of plastic particles. However, existing image recognition methods still face certain challenges when dealing with plastic particles in complex environments. Summary of the invention
[0005] The purpose of the present invention is to provide a sewage treatment method and system to solve the following technical problems:
[0006] The detection of plastic pollutants mainly relies on sampling and laboratory analysis methods, which usually require time-consuming sample collection, pretreatment and instrument analysis processes, making it difficult to achieve rapid and real-time monitoring.
[0007] The purpose of the present invention can be achieved through the following technical solutions:
[0008] A sewage treatment method comprises the following steps:
[0009] Different numbers of plastic particles are placed into the pool in sequence. After the plastic particles are evenly dispersed, water surface images of different numbers of plastic particles are collected, and the corresponding water surface reflectivity is calculated. The corresponding number of plastic particles, water surface reflectivity and ambient light intensity are annotated on the water surface images.
[0010] Based on the deep learning classification algorithm ConvNeXt combined with the attention mechanism, a plastic recognition model is constructed, the water surface image is input into the plastic recognition model after noise reduction, the plastic features in the water surface image are extracted, and the plastic recognition model is trained;
[0011] Input the water surface image collected in real time into the trained plastic recognition model, extract the plastic features in the water surface image in combination with the meta-learning strategy, train the plastic recognition model again, and back-propagate and update the model according to the training results until the loss function converges;
[0012] The real-time water body image is preprocessed and then input into the plastic recognition model to identify the type of impurities contained in the real-time water body image, and the impurities and impurity types in the corresponding area are determined based on the detection data of the water body sample.
[0013] As a further solution of the present invention: the ambient light intensity is used to correct the reflectivity, the ambient light intensity during the test and the light intensity collected in real time are obtained, the light intensity is normalized, and the equivalent reflectivity is calculated.
[0014] As a further solution of the present invention: the process of retraining the plastic recognition model is:
[0015] The water surface images of each order of magnitude are divided into a validation set and a test set. Five generalized images are randomly selected from any category as the validation set of the category, and 15 images are randomly selected from the remaining generalized images of any category as the test set of the category.
[0016] S2: For any validation set of any category, the 5 vectors corresponding to the 5 photos are calculated through the feature representation f(θ), and the average vector l of the 5 vectors corresponding to the three categories is calculated respectively. i , i∈0,1,2, l i The vector representation of the labelled category;
[0017] S3: For any test set of a category, the vector representation of all images is calculated by the feature representation f(θ), marked as w j , j∈1,...,45, the similarity p between any image in the test set and each classification vector representation is calculated by the following formula;
[0018]
[0019] Where x represents any image in the test set, y represents the classification, and τ represents the similarity scaling factor. <l i , w j > indicates l i and w j The cosine distance;
[0020] S4: According to the similarity p between any image in the test set and each category, as well as the labeled category of the image, the cross entropy is calculated according to the classification model loss as the loss function, and the parameters of the plastic recognition model are adjusted in reverse. The training is continuously performed until the loss of the test set no longer decreases or the accuracy of the test set no longer increases.
[0021] As a further solution of the present invention: the classification corresponding to the maximum value of the similarity p calculated for any generalized image in the test set is used as the classification result corresponding to the generalized image.
[0022] As a further solution of the present invention: the loss function formula of a single image in the test set is:
[0023] L(y,y')=-∑yc*log(p(y=c|x));
[0024] Where L represents the loss value of a single image, y c represents the labeled category of any image in the test set, c∈1,2,3, and p(y=c|x) represents the probability that the image belongs to any category c;
[0025] The loss function formula for all images in the test set is:
[0026]
[0027] Where L' represents the average loss of all images in the test set, N represents the number of all images in the test set, j∈1,...,45.
[0028] As a further solution of the present invention: the noise reduction process is:
[0029] The water surface image is divided into several overlapping image blocks. For each of the image blocks, the image blocks around the image block are taken, the norm between them is calculated and saved, and then non-dominated sorting is performed. The first k image blocks in the non-dominated sorting are formed into a matrix, k is a positive integer, and different λ values are used to perform soft threshold shrinkage on the singular values of the matrix to obtain a low-rank matrix, and the singular values of the low-rank matrix are obtained. The smaller values in the singular values are filtered out, and the obtained denoised image blocks are merged into the denoised water surface image.
[0030] As a further solution of the present invention: the plastic recognition model includes an information extraction layer and a classification layer.
[0031] A sewage treatment system, comprising:
[0032] The data acquisition module is used to put different numbers of plastic particles into the water pool in sequence, collect water surface images of different numbers of plastic particles after the plastic particles are evenly dispersed, calculate the corresponding water surface reflectivity, and annotate the water surface images with the corresponding number of plastic particles, water surface reflectivity, and ambient light intensity;
[0033] The model initialization module is used to build a plastic recognition model based on the deep learning classification algorithm ConvNeXt combined with the attention mechanism, input the water surface image into the plastic recognition model after noise reduction, extract the plastic features in the water surface image, and train the plastic recognition model;
[0034] A model optimization module is used to input the real-time collected water surface image into the trained plastic recognition model, extract the plastic features in the water surface image in combination with the meta-learning strategy, train the plastic recognition model again, and back-propagate and update the model according to the training results until the loss function converges;
[0035] The data output module is used to input the real-time water body image into the plastic recognition model after preprocessing, identify the impurity type contained in the real-time water body image, and determine the impurities and impurity types in the corresponding area according to the detection data of the water body sample.
[0036] Beneficial effects of the present invention:
[0037] The present invention constructs a plastic recognition model through the deep learning classification algorithm ConvNeXt combined with the attention mechanism, which can accurately extract plastic features in water surface images and realize high-precision recognition of plastic particles; uses the ambient light intensity to correct the reflectivity, obtains the ambient light intensity during the test and the real-time collected light intensity, normalizes the light intensity, and calculates the equivalent reflectivity to improve the detection accuracy; combines the meta-learning strategy, inputs the real-time collected water surface image into the trained plastic recognition model, trains the plastic recognition model again, and updates the model by backpropagation according to the training results until the loss function converges, so that the model can adapt to different environments and conditions; through the division of the verification set and the test set and the similarity calculation, the model has a strong generalization ability and can cope with plastic particles of different orders of magnitude. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] The present invention will be further described below in conjunction with the accompanying drawings.
[0039] Figure 1 It is a schematic diagram of the process of the present invention. DETAILED DESCRIPTION
[0040] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0041] See also Figure 1 As shown, the present invention is a sewage treatment method and system, comprising the following steps:
[0042] Different numbers of plastic particles are placed into the pool in sequence. After the plastic particles are evenly dispersed, water surface images of different numbers of plastic particles are collected, and the corresponding water surface reflectivity is calculated. The corresponding number of plastic particles, water surface reflectivity and ambient light intensity are annotated on the water surface images.
[0043] Based on the deep learning classification algorithm ConvNeXt combined with the attention mechanism, a plastic recognition model is constructed, the water surface image is input into the plastic recognition model after noise reduction, the plastic features in the water surface image are extracted, and the plastic recognition model is trained;
[0044] Input the water surface image collected in real time into the trained plastic recognition model, extract the plastic features in the water surface image in combination with the meta-learning strategy, train the plastic recognition model again, and back-propagate and update the model according to the training results until the loss function converges;
[0045] The real-time water body image is preprocessed and then input into the plastic recognition model to identify the type of impurities contained in the real-time water body image, and the impurities and impurity types in the corresponding area are determined based on the detection data of the water body sample.
[0046] High-precision recognition capability: The deep learning algorithm ConvNeXt is combined with the attention mechanism to accurately extract and identify plastic features in water surface images, effectively improving detection accuracy.
[0047] Adaptive reflectivity correction: The reflectivity is corrected using the ambient light intensity information to ensure accurate detection of plastics under different lighting conditions, enhancing the adaptability and robustness of the method.
[0048] Dynamic model update and optimization: Combined with meta-learning strategies, the plastic recognition model is further trained and tuned during continuous real-time data collection, and the dynamic improvement of model performance is achieved through the convergence of the loss function.
[0049] Strong generalization performance: Through the division of validation set and test set, as well as similarity calculation, this method can be widely applied to the detection of plastic particles of different magnitudes.
[0050] Effective noise reduction processing: Use advanced non-dominated sorting and singular value shrinkage technology to pre-process the image, significantly reduce the impact of noise, improve image quality, and thus enhance the clarity and accuracy of model analysis.
[0051] High detection efficiency: It can quickly collect and analyze water surface images, greatly improve the efficiency of plastic pollutant detection, and support real-time monitoring needs.
[0052] Easy to implement and promote: Based on mature image processing technology and deep learning framework, this method is easy to implement in different environments and scenarios, which is conducive to wide promotion and use.
[0053] In another preferred embodiment of the present invention, the ambient light intensity is used to correct the reflectivity, the ambient light intensity during the test and the light intensity collected in real time are obtained, the light intensity is normalized, and the equivalent reflectivity is calculated.
[0054] In another preferred embodiment of the present invention, the process of retraining the plastic recognition model is:
[0055] The water surface images of each order of magnitude are divided into a validation set and a test set. Five generalized images are randomly selected from any category as the validation set of the category, and 15 images are randomly selected from the remaining generalized images of any category as the test set of the category.
[0056] S2: For any validation set of any category, the 5 vectors corresponding to the 5 photos are calculated through the feature representation f(θ), and the average vector l of the 5 vectors corresponding to the three categories is calculated respectively. i , i∈0,1,2, l i The vector representation of the labelled category;
[0057] S3: For any test set of a category, the vector representation of all images is calculated by the feature representation f(θ), marked as w j , j∈1,...,45, the similarity p between any image in the test set and each classification vector representation is calculated by the following formula;
[0058]
[0059] Where x represents any image in the test set, y represents the classification, and τ represents the similarity scaling factor. <l i , w j > indicates l i and w j The cosine distance;
[0060] S4: According to the similarity p between any image in the test set and each category, as well as the labeled category of the image, the cross entropy is calculated according to the classification model loss as the loss function, and the parameters of the plastic recognition model are adjusted in reverse. The training is continuously performed until the loss of the test set no longer decreases or the accuracy of the test set no longer increases.
[0061] In another preferred embodiment of the present invention, the category corresponding to the maximum value of the similarity p calculated for any generalized image in the test set is taken as the classification result corresponding to the generalized image.
[0062] In another preferred embodiment of the present invention, the loss function formula for a single image in the test set is:
[0063] L(y,y')=-∑yc*log(p(y=c|x));
[0064] Where L represents the loss value of a single image, y c represents the labeled category of any image in the test set, c∈1,2,3, and p(y=c|x) represents the probability that the image belongs to any category c;
[0065] The loss function formula for all images in the test set is:
[0066]
[0067] Where L' represents the average loss of all images in the test set, N represents the number of all images in the test set, j∈1,...,45.
[0068] In another preferred embodiment of the present invention, the noise reduction process is:
[0069] The water surface image is divided into several overlapping image blocks. For each of the image blocks, the image blocks around the image block are taken, the norm between them is calculated and saved, and then non-dominated sorting is performed. The first k image blocks in the non-dominated sorting are formed into a matrix, k is a positive integer, and different λ values are used to perform soft threshold shrinkage on the singular values of the matrix to obtain a low-rank matrix, and the singular values of the low-rank matrix are obtained. The smaller values in the singular values are filtered out, and the obtained denoised image blocks are merged into the denoised water surface image.
[0070] In another preferred embodiment of the present invention, the plastic recognition model includes an information extraction layer and a classification layer.
[0071] A sewage treatment system, comprising:
[0072] The data acquisition module is used to put different numbers of plastic particles into the water pool in sequence, collect water surface images of different numbers of plastic particles after the plastic particles are evenly dispersed, calculate the corresponding water surface reflectivity, and annotate the water surface images with the corresponding number of plastic particles, water surface reflectivity, and ambient light intensity;
[0073] The model initialization module is used to build a plastic recognition model based on the deep learning classification algorithm ConvNeXt combined with the attention mechanism, input the water surface image into the plastic recognition model after noise reduction, extract the plastic features in the water surface image, and train the plastic recognition model;
[0074] A model optimization module is used to input the real-time collected water surface image into the trained plastic recognition model, extract the plastic features in the water surface image in combination with the meta-learning strategy, train the plastic recognition model again, and back-propagate and update the model according to the training results until the loss function converges;
[0075] The data output module is used to input the real-time water body image into the plastic recognition model after preprocessing, identify the impurity type contained in the real-time water body image, and determine the impurities and impurity types in the corresponding area according to the detection data of the water body sample.
[0076] The above is a detailed description of an embodiment of the present invention, but the content is only a preferred embodiment of the present invention and cannot be considered to limit the scope of implementation of the present invention. All equivalent changes and improvements made within the scope of the present invention should still fall within the scope of the patent coverage of the present invention.
Claims
1. A sewage treatment method, characterized in that: The following steps are involved: Different numbers of plastic particles are placed into the pool in sequence. After the plastic particles are evenly dispersed, water surface images of different numbers of plastic particles are collected, and the corresponding water surface reflectivity is calculated. The corresponding number of plastic particles, water surface reflectivity and ambient light intensity are annotated on the water surface images. Based on the deep learning classification algorithm ConvNeXt combined with the attention mechanism, a plastic recognition model is constructed, the water surface image is input into the plastic recognition model after noise reduction, the plastic features in the water surface image are extracted, and the plastic recognition model is trained; Input the water surface image collected in real time into the trained plastic recognition model, extract the plastic features in the water surface image in combination with the meta-learning strategy, train the plastic recognition model again, and back-propagate and update the model according to the training results until the loss function converges; The real-time water body image is preprocessed and then input into the plastic recognition model to identify the type of impurities contained in the real-time water body image, and the impurities and impurity types in the corresponding area are determined based on the detection data of the water body sample.
2. A sewage treatment method according to claim 1, characterized in that: The ambient light intensity is used to correct the reflectivity, obtain the ambient light intensity during the test and the light intensity collected in real time, normalize the light intensity, and calculate the equivalent reflectivity.
3. A sewage treatment method according to claim 1, characterized in that: The process of retraining the plastic recognition model is: The water surface images of each order of magnitude are divided into a validation set and a test set. Five generalized images are randomly selected from any category as the validation set of the category, and 15 images are randomly selected from the remaining generalized images of any category as the test set of the category. S2: For any validation set of any category, the 5 vectors corresponding to the 5 photos are calculated through the feature representation f(θ), and the average vector l of the 5 vectors corresponding to the three categories is calculated respectively. i , i∈0,1,2, l i The vector representation of the labelled category; S3: For any test set of a category, the vector representation of all images is calculated by the feature representation f(θ), marked as w j , j∈1,...,45, the similarity p between any image in the test set and each classification vector representation is calculated by the following formula; Where x represents any image in the test set, y represents the classification, and τ represents the similarity scaling factor. <l i , w j > indicates l i and w j The cosine distance; S4: According to the similarity p between any image in the test set and each category, as well as the labeled category of the image, the cross entropy is calculated according to the classification model loss as the loss function, and the parameters of the plastic recognition model are adjusted in reverse. The training is continuously performed until the loss of the test set no longer decreases or the accuracy of the test set no longer increases.
4. A sewage treatment method according to claim 3, characterized in that: The category corresponding to the maximum similarity p calculated for any generalized image in the test set is taken as the classification result corresponding to the generalized image.
5. A sewage treatment method according to claim 4, characterized in that: The loss function formula for a single image in the test set is: L(y,y')=-∑yc*log(p(y=c|x)); Where L represents the loss value of a single image, y c represents the labeled category of any image in the test set, c∈1,2,3, and p(y=c|x) represents the probability that the image belongs to any category c; The loss function formula for all images in the test set is: Where L' represents the average loss of all images in the test set, N represents the number of all images in the test set, j∈1,...,45.
6. A sewage treatment method according to claim 1, characterized in that: The noise reduction process is as follows: The water surface image is divided into several overlapping image blocks. For each of the image blocks, the image blocks around the image block are taken, the norm between them is calculated and saved, and then non-dominated sorting is performed. The first k image blocks in the non-dominated sorting are formed into a matrix, k is a positive integer, and different λ values are used to perform soft threshold shrinkage on the singular values of the matrix to obtain a low-rank matrix, and the singular values of the low-rank matrix are obtained. The smaller values in the singular values are filtered out, and the obtained denoised image blocks are merged into the denoised water surface image.
7. A sewage treatment method according to claim 1, characterized in that: The plastic recognition model includes an information extraction layer and a classification layer.
8. A sewage treatment system, characterized in that: include: The data acquisition module is used to put different numbers of plastic particles into the water pool in sequence, collect water surface images of different numbers of plastic particles after the plastic particles are evenly dispersed, calculate the corresponding water surface reflectivity, and annotate the water surface images with the corresponding number of plastic particles, water surface reflectivity, and ambient light intensity; The model initialization module is used to build a plastic recognition model based on the deep learning classification algorithm ConvNeXt combined with the attention mechanism, input the water surface image into the plastic recognition model after noise reduction, extract the plastic features in the water surface image, and train the plastic recognition model; A model optimization module is used to input the real-time collected water surface image into the trained plastic recognition model, extract the plastic features in the water surface image in combination with the meta-learning strategy, train the plastic recognition model again, and back-propagate and update the model according to the training results until the loss function converges; The data output module is used to input the real-time water body image into the plastic recognition model after preprocessing, identify the impurity type contained in the real-time water body image, and determine the impurities and impurity types in the corresponding area according to the detection data of the water body sample.
Citation Information
Patent Citations
Intelligent rock debris particle metering method and system based on neural network
CN115272940A
Intelligent keratitis screening method based on deep meta-learning
CN117877103A
Water quality color classification method and device based on visual mode
CN117934965A
Method for detecting and characterizing plastic particles by image processing
FR3140194A1
Method, apparatus, device, and medium for processing visual task by generic model
US20240220864A1