A rapid identification method for degradable and non-degradable plastics
Through the combination of hyperspectral imaging and dynamic convolutional residual network, the rapid identification of non-degradable and degradable plastics is achieved, the problem of identification difficulties in the prior art is solved, and the recognition accuracy and supervision efficiency are improved.
Patent Information
- Application Number
- CN202111463074.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-03
- Publication Date
- 2024-11-15
- Estimated Expiration
- 2041-12-03
AI Technical Summary
The prior art is difficult to quickly and accurately identify non-degradable and biodegradable plastics, resulting in market supervision difficulties and environmental pollution problems.
Hyperspectral image data of plastic samples is collected by using hyperspectral imager, and data processing and classification is performed through S-G filtering, standard normal transformation and dynamic convolutional residual networks to achieve rapid identification of degradable and non-degradable plastics.
It has achieved an identification accuracy of more than 96%, solved the problem that market supervision is difficult to distinguish between degradable and non-degradable plastics, and improved the efficiency of environmental supervision.
Smart Images

Figure CN114049526B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to research fields such as pattern recognition and hyperspectral analysis, and in particular to a method for quickly identifying degradable and non-degradable plastics. Background Art
[0002] Plastics are now widely used in light industry, agriculture, food industry and other fields. According to their degradability in the natural environment, plastics are divided into two categories: degradable plastics and non-degradable plastics. At present, non-degradable plastic products are widely used because of their low price. However, most non-degradable plastic products are abandoned after use and are not recycled and processed in a timely and effective manner, which has caused serious pollution of surface water, soil and oceans, leading to the death of a large number of animals and plants, the instability of the ecological chain, the reduction of crop yields and food safety. Non-degradable plastics can even cause adverse effects such as precocious puberty, infertility and cancer in children after entering the human body. Therefore, degradable plastics have been gradually promoted worldwide. However, since the promotion and application of degradable plastics has just started, many "pseudo-degradable" plastics that do not meet the requirements of degradable plastic products have been mixed into the market. This has caused great difficulties for the supervision of market regulatory departments, so it is particularly important to quickly identify non-degradable and degradable plastics. Summary of the invention
[0003] In order to solve the above technical problems, the present invention provides a method for quickly identifying degradable and non-degradable plastics.
[0004] To achieve the above object, the technical solution adopted by the present invention is:
[0005] A method for quickly identifying degradable and non-degradable plastics includes the following steps:
[0006] S1. Cut several types of degradable or non-degradable plastic samples into blocks or sheets, and use a hyperspectral imager to collect hyperspectral image data of multiple groups of plastic samples in multiple bands;
[0007] S2. After completing the black-and-white correction processing of the collected hyperspectral image data, the SG filtering method is used to reduce noise, and the standard normal variable transformation is used to reduce the intra-class spacing. Then, the mean feature of the hyperspectral image data in each band is extracted, and the data enhancement method based on Euclidean distance is used to enhance the mean feature.
[0008] S3, using the mean feature and the enhanced mean feature for training the dynamic convolution residual network, and saving a set of network parameters with the highest classification accuracy in the model training;
[0009] S4. Based on steps S1 to S2, the preprocessing of the plastic samples to be identified is completed, and the data of the 100 plastic samples to be identified after the preprocessing is input into the trained dynamic convolution residual network for binary classification identification.
[0010] Furthermore, in step S1, when cutting the plastic sample, the block plastic with a thickness greater than 0.6 cm is cut into 0.1±0.06 cm. 3 Blocks of different sizes, cut plastic sheets with a thickness of less than 0.6 cm into 1.2 ± 0.6 cm 2 The sheet has a small area so as to effectively collect the hyperspectral data of the plastic sample.
[0011] Furthermore, in the step S1, according to the characteristics of the plastic samples, multiple groups of hyperspectral data of the plastic samples within the wavelength range of 380-1038 nm are collected to obtain 520 effective bands therein.
[0012] Furthermore, in step S1, when collecting data for several types of degradable or non-degradable plastic samples, 100 groups of data need to be collected for each plastic sample, and then each group of plastic sample data is divided into degradable and non-degradable according to degradability. At the same time, a new document is created to number the several types of plastic samples by type, wherein the categories of degradable plastics are numbered by numbers, 1, 2, 3..., and the categories of non-degradable plastics are numbered by letters, a, b, c..., and the SG filtering method is used to smooth and denoise the original hyperspectral image data, and the standard normal variable transformation is used to reduce the intra-class spacing, and then the mean characteristics of the data in each band are extracted.
[0013] Furthermore, in step S2, the data enhancement method based on Euclidean distance includes inter-class Euclidean distance calculation, inter-class Euclidean distance sorting and data reconstruction based on Euclidean distance. The data enhancement method realizes the effective expansion of the sample data set, and at the same time can improve the low generalization ability of the model caused by too few types of degradable and non-degradable samples.
[0014] The formula for calculating the inter-class Euclidean distance is:
[0015]
[0016] in, x i、 y i They represent the characteristic values of sample 1 and sample 2 in the same band respectively. The sample data contains characteristic values of 520 bands in total. n is 520, d is the Euclidean distance between sample 1 and sample 2.
[0017] Furthermore, the inter-class Euclidean distance calculation mainly includes calculating the Euclidean distance between different types of degradable plastic samples and the Euclidean distance between different types of non-degradable plastic samples. When calculating the Euclidean distance between the different types of degradable plastic samples, it is first necessary to randomly select a sample from the number 1, and then calculate the Euclidean distance between the sample and other types of degradable plastic samples. The same calculation method is used for the other 99 samples in the number 1, and then the calculation results of the 100 samples are averaged by category to obtain the average Euclidean distance between the sample numbered 1 and other types of degradable plastics. The above process is repeated for the degradable plastics of its category until the average Euclidean distance between all the digitally numbered samples is calculated. The category of the non-degradable plastic sample is represented by letter number, and the calculation process of the Euclidean distance between its category is the same as above.
[0018] Furthermore, the inter-category Euclidean distance sorting is used to sort the average Euclidean distance generated by the inter-category Euclidean distance calculation according to size, and the average Euclidean distance represents the difference between categories.
[0019] Furthermore, the data reconstruction based on Euclidean distance is used to generate more generalized sample data, and the calculation formula of the data reconstruction is:
[0020]
[0021] in, X Represents a random sample in the number 1, selects the 4 types of samples with the smallest average Euclidean distance to the number 1, and sorts the average Euclidean distance between the number 1 and the above 4 types of samples from small to large. The sorting result is d 1 , d 2 , d 3 , d 4 ;
[0022] At this time, according to
[0023] ;
[0024] Calculating weights W 1 , W 2 , W 3 , W 4 , sort the above four randomly selected samples from large to small according to weight, and the sorting result is X 1、 X2、 X 3、 X 4 , Y Represents the reconstructed data. According to the above reconstruction method, 100 data reconstructions are performed within each number, that is, the same number of samples as before data enhancement are generated. The data before and after data enhancement are integrated into one data set, and two labels are annotated according to the degradability.
[0025] Furthermore, the dynamic convolutional residual network is composed of a residual block containing a dynamic convolutional layer, the dynamic convolutional layer includes two parts: attention and kernel aggregation, the attention is used to output the weights of multiple convolution kernels, and the kernel aggregation is used to aggregate multiple convolution kernels into a dynamic convolution kernel; when the dynamic convolutional residual network is iteratively trained, 2 / 3 samples are randomly selected from the data set as a training set, and 1 / 3 samples are used as a prediction set. The number of iterations of model training is 100 times, and the SGD optimizer is used to speed up the calculation speed. At the same time, momentum is introduced so that SGD can better approach the optimal solution during the convergence process. After parameter pre-adjustment, the learning rate is determined to be 0.03, the momentum factor is 0.9, and the weight attenuation coefficient is 0.001. Finally, the SGD optimizer and cross entropy loss are applied to update the network parameters.
[0026] The present invention can realize the rapid identification of degradable and non-degradable plastics with a high accuracy rate of over 96%. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] The drawings constituting a part of this application are used to provide a further understanding of the present invention. The illustrative embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute improper limitations on the present invention.
[0028] Figure 1 This is a flow chart of a method for quickly identifying degradable and non-degradable plastics according to an embodiment of the present invention;
[0029] Figure 2 is a dynamic convolution layer in an embodiment of the present invention;
[0030] Figure 3 This is the network structure of the dynamic convolutional residual network in an embodiment of the present invention. DETAILED DESCRIPTION
[0031] In order to make the purpose and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
[0032] like Figure 1 As shown, the method for quickly identifying degradable and non-degradable plastics according to the embodiment of the present invention comprises the following steps:
[0033] S1. Cut plastic samples. Cut plastic blocks with a thickness greater than 0.6 cm into pieces with a thickness of 0.1 ± 0.06 cm. 3 Blocks of different sizes, cut plastic sheets with a thickness of less than 0.6 cm into 1.2 ± 0.6 cm 2 The area-sized sheets are convenient for efficiently collecting hyperspectral data of plastic samples.
[0034] S2. Obtain sample hyperspectral data. Collect hyperspectral data of plastic samples in the 380-1038nm band range, obtain 520 effective bands, fully extract the hyperspectral information of plastics, and collect 100 sets of data for each sample; each set of data is divided into degradable or non-degradable plastics according to degradability. At the same time, create a new document and number the several types of plastic samples by type, where the types of degradable plastics are numbered by numbers, 1, 2, 3..., and the types of non-degradable plastics are numbered by letters, a, b, c...
[0035] S3, remove high-frequency noise, complete the black and white correction processing of the collected hyperspectral image data, and then use the SG filtering method to smooth and denoise the original hyperspectral image data.
[0036] S4. Use standard normal variable transformation to reduce the intra-class spacing, eliminate the influence of solid particles and surface scattering on the diffuse reflectance spectrum, and then extract the mean characteristics of the data in each band.
[0037] S5. Use the data enhancement method based on Euclidean distance to enhance the mean feature, then integrate the data before and after data enhancement into one data set, and annotate the two labels according to degradability. Specifically: calculate the Euclidean distance between different types of degradable plastic samples and the Euclidean distance between different types of non-degradable plastic samples. When calculating the Euclidean distance between the different types of degradable plastic samples, first randomly select one of the samples in number 1, and then calculate the Euclidean distance between the sample and other types of degradable plastic samples. The same calculation method is used for the other 99 samples in number 1, and then the calculation results of the 100 samples are averaged by category to obtain the average Euclidean distance between the sample numbered 1 and other types of degradable plastics. Repeat the above process for the degradable plastics of its category until the average Euclidean distance between all the digitally numbered samples is calculated. The category of the non-degradable plastic sample is represented by a letter number, and the calculation process of the Euclidean distance between its categories is the same as above. Then, the average Euclidean distance generated by the Euclidean distance calculation between categories is sorted by size. The average Euclidean distance represents the difference between categories. Data reconstruction based on Euclidean distance is used to generate more generalized sample data. The calculation formula of the data reconstruction is:
[0038]
[0039] in, X Represents a random sample in the number 1, selects the 4 types of samples with the smallest average Euclidean distance to the number 1, and sorts the average Euclidean distance between the number 1 and the above 4 types of samples from small to large. The sorting result is d 1 , d 2 , d 3 , d 4 ;
[0040] At this time, according to
[0041] ;
[0042] Calculating weights W 1 , W 2 , W 3 , W 4 , sort the above four randomly selected samples from large to small according to weight, and the sorting result is X 1、 X 2、 X 3、 X 4 , Y Represents the reconstructed data. According to the above reconstruction method, 100 data reconstructions are performed within each number, that is, the same number of samples as before data enhancement are generated. The data before and after data enhancement are integrated into one data set, and two labels are annotated according to the degradability.
[0043] S6. According to Figure 3 And Table 1 to build a dynamic convolutional residual network, according to Figure 2 Construct a dynamic convolution layer. The dynamic convolution layer exists in the residual block and constitutes a dynamic residual block. The size of the dynamic convolution kernel is 3×3, the step size is 1, and adaptive padding is used. The maximum pooling of size 3×3 is used before the dynamic residual convolution 1 in the dynamic convolution residual network. The dynamic residual block convolution 4 in the dynamic convolution residual network uses an average pooling of size 4×4. The data in the form of 1×1×128 after average pooling is converted to 1×128 through a flattening layer, and then binary classification is performed through the mapping of the fully connected layer.
[0044] It consists of dynamic convolution layers Attention 1 and Kernel Aggregation 2. Attention 1 is used to output the weights of multiple convolution kernels, and Kernel Aggregation 2 is used to aggregate multiple convolution kernels into one. Attention 1 includes a pooling layer, two fully connected layers, an activation layer, and a softmax layer. First, the global spatial information is compressed by average pooling. Then, the compressed information is mapped to the activation layer through the fully connected layer, where ReLU is used as the activation function. The activated information is mapped to the softmax layer through the fully connected layer. Finally, the softmax layer outputs K weights are used for kernel aggregation. K is set to 4, K Represents the number of convolution kernels corresponding to each output layer when the convolution kernels are aggregated, which affects the complexity of the model. For example, K Increasing the value will make the model more complex. The calculation formula of kernel aggregation is as follows:
[0045]
[0046] in, is the convolution kernel participating in the kernel aggregation, the number of which is 4, and the corresponding weight is , is the convolution kernel output after the kernel aggregation. In most cases, the output value of the softmax is relatively concentrated, and only a small part of the kernel can be optimized across layers, which will lead to a slow convergence speed during training. Therefore, it is necessary to de-sparse the weights in the softmax to make the network training more effective. The de-sparse weight calculation formula is:
[0047]
[0048] in, for Figure 2 The output of the second fully connected layer is w = 1, the formula is the original softmax, That is, the desparseness weight is used as the weight of the four convolution kernels in the core aggregation part. When constructing the dynamic convolution layer, w is set to 0.03, which enables the model to maintain high classification performance while maintaining high stability. After the kernel aggregation, the generated dynamic convolution kernel is used to convolve the input hyperspectral data, and the convolved data is batch normalized and ReLU activated in turn to obtain the final output.
[0049] Table 1
[0050]
[0051] When the dynamic convolutional residual network is iteratively trained, 2 / 3 samples are randomly selected from the data set as the training set, 1 / 3 samples are selected as the prediction set, the number of iterations of model training is 100 times, the SGD optimizer is used to speed up the calculation speed, and momentum is introduced, which enables SGD to better approach the optimal solution during the convergence process, wherein the learning rate is set to 0.03, the momentum factor is set to 0.9, and the weight decay coefficient is set to 0.001. Finally, the SGD optimizer and cross entropy loss are applied to update the network parameters.
[0052] S7. Identification of degradable and non-degradable materials. Save the best set of network parameters in model training. Perform the same data processing on the plastic samples to be identified as before model training. Input the processed hyperspectral data of the plastic samples to be identified into the trained dynamic convolutional residual network for binary classification and calculate the recognition accuracy. The results are shown in Tables 2 and 3.
[0053] Table 2 Shape, degradability, composition, and pictures of 17 plastic samples. The 17 plastics can be divided into two categories: degradable plastics and non-degradable plastics. There are 5 types of non-degradable plastics and 12 types of degradable plastics.
[0054] Table 3 Accuracy of dynamic convolutional residual network in identifying the degradability of 17 plastics
[0055]
[0056] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. A method for rapid identification of degradable and non-degradable plastics, characterized in that: The steps include: S1. Cut several types of degradable or non-degradable plastic samples into blocks or sheets, and use a hyperspectral imager to collect hyperspectral image data of multiple groups of plastic samples in multiple bands; S2. After completing the black-and-white correction processing of the collected hyperspectral image data, the SG filtering method is used to reduce noise, and the standard normal variable transformation is used to reduce the intra-class spacing. Then, the mean feature of the hyperspectral image data in each band is extracted, and the data enhancement method based on Euclidean distance is used to enhance the mean feature. S3, using the mean feature and the enhanced mean feature for training the dynamic convolution residual network, and saving a set of network parameters with the highest classification accuracy in the model training; S4, completing the preprocessing of the plastic samples to be identified based on steps S1 to S2, and inputting the preprocessed data of 100 plastic samples to be identified into the trained dynamic convolution residual network for binary classification identification; In the step S1, when collecting data for several types of degradable or non-degradable plastic samples, 100 sets of data are collected for each plastic sample, and then each set of plastic sample data is divided into degradable and non-degradable according to degradability. At the same time, a new document is created to number the several types of plastic samples according to their types, wherein the types of degradable plastics are numbered by numbers, 1, 2, 3..., and the types of non-degradable plastics are numbered by letters, a, b, c...; In step S2, the data enhancement method based on Euclidean distance includes inter-class Euclidean distance calculation, inter-class Euclidean distance sorting and data reconstruction based on Euclidean distance, wherein the formula for calculating the inter-class Euclidean distance is: ; in, x i、 y i They represent the characteristic values of sample 1 and sample 2 in the same band respectively. The sample data contains characteristic values of 520 bands in total. n is 520, d is the Euclidean distance between sample 1 and sample 2; The inter-class Euclidean distance calculation includes calculating the Euclidean distance between different types of degradable plastic samples and the Euclidean distance between different types of non-degradable plastic samples. When calculating the Euclidean distance between the different types of degradable plastic samples, it is first necessary to randomly select a sample from the number 1, and then calculate the Euclidean distance between the sample and other types of degradable plastic samples. The same calculation method is used for the other 99 samples in the number 1, and then the calculation results of the 100 samples are averaged by category to obtain the average Euclidean distance between the sample numbered 1 and other types of degradable plastics. The above process is repeated for the degradable plastics of its category until the average Euclidean distance between all the digitally numbered samples is calculated. The category of the non-degradable plastic sample is represented by a letter number, and the calculation process of the inter-class Euclidean distance is the same as above. The inter-class Euclidean distance sorting is used to sort the average Euclidean distances generated by the inter-class Euclidean distance calculation according to size, and the average Euclidean distance represents the differences between the classes; The data reconstruction based on Euclidean distance is used to generate more generalized sample data. The calculation formula of the data reconstruction is: ; in, X Represents a random sample from number 1, selects the 4 types of samples with the smallest average Euclidean distance to number 1, and sorts the average Euclidean distance between number 1 and the above 4 types of samples from small to large. The sorting result is d 1. d 2. d 3. d 4; At this time, according to ; Calculating weights W 1. W 2. W 3. W 4. Sort the above four types of samples by weight from large to small, and the sorting results are: X 1、 X 2、 X 3、 X 4 , Y Represents the reconstructed data; according to the above reconstruction method, 100 data reconstructions are performed within each number, that is, the same number of samples as before data enhancement are generated, and the data before and after data enhancement are integrated into one data set, and two labels are annotated according to degradability.
2. The method for rapid identification of degradable and non-degradable plastics according to claim 1, characterized in that: In step S1, when cutting the plastic sample, the block plastic with a thickness greater than 0.6 cm is cut into pieces with a thickness of 0.1±0.06 cm. 3 Blocks of different sizes, cut plastic sheets with a thickness of less than 0.6 cm into 1.2 ± 0.6 cm 2 The size of the flakes.
3. The method for rapid identification of degradable and non-degradable plastics according to claim 1, characterized in that: In the step S1, hyperspectral data of multiple groups of plastic samples within the wavelength range of 380-1038 nm are collected to obtain 520 effective bands.
4. The method for rapid identification of degradable and non-degradable plastics according to claim 1, characterized in that: The dynamic convolution residual network is composed of a residual block containing a dynamic convolution layer. The dynamic convolution layer includes two parts: attention and kernel aggregation. Attention is used to output the weights of multiple convolution kernels, and kernel aggregation is used to aggregate multiple convolution kernels into a dynamic convolution kernel. When iterative training is performed on the dynamic convolution residual network, 2 / 3 samples are randomly selected from the data set as a training set, and 1 / 3 samples are used as a prediction set. The number of iterations of model training is 100 times. The SGD optimizer is used to speed up the calculation speed. At the same time, momentum is introduced so that SGD can better approach the optimal solution during the convergence process. After parameter pre-adjustment, the learning rate is determined to be 0.03, the momentum factor is 0.9, and the weight attenuation coefficient is 0.
001. Finally, the SGD optimizer and cross entropy loss are applied to update the network parameters.
Citation Information
Patent Citations
Method and system for model fusion based on residual network and dynamic convolutional network
CN112150384A
Pretreatment method for unbalanced fault sample of oil-immersed transformer
CN113066540A
Apparatus for, and method of, classifying objects in a waste stream
US20070029232A1
