Method and device for identifying common plastics
By combining ATR-FTIR with CNN, a CNN2D model is established using mid-infrared spectral feature bands for two-dimensional reconstruction. This solves the problems of low plastic sorting efficiency and secondary pollution in existing technologies, and achieves efficient and accurate plastic identification, especially rapid identification of black plastic.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-14
- Publication Date
- 2026-03-10
AI Technical Summary
Existing plastic sorting technologies are inefficient, energy-intensive, and cause secondary pollution, making it difficult to achieve efficient, non-destructive, and accurate identification of waste plastics, especially black plastics, which cannot be quickly identified using near-infrared spectroscopy.
Attenuated total reflection Fourier transform infrared spectroscopy (ATR-FTIR) combined with convolutional neural network (CNN) is used to select mid-infrared spectral feature bands for two-dimensional reconstruction and establish a two-dimensional convolutional neural network (CNN2D) model to identify common plastic types.
It achieves rapid, pollution-free, efficient, and accurate plastic identification, capable of identifying various types of plastics, including black plastic, and overcomes the shortcomings of near-infrared spectroscopy.
Smart Images

Figure CN121633004A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to a method and device for identifying common plastics. BACKGROUND
[0002] Plastics, as one of the three synthetic materials, have become an indispensable part of people's daily life. However, with the continuous growth of plastic production and consumption, the amount of waste plastics has increased rapidly. The recycling of renewable resources of waste plastics is an important measure to achieve social sustainable development, economic stable growth and environmental protection. Sorting and identification is the first step in the recycling process of mixed waste plastics. Accurate, efficient, green and economic sorting technology is the key to ensuring the quality of plastic regenerated products and improving the social and economic value. The national standard "Waste Plastic Recycling Technology Specification" (GB / T 39171-2020) clearly requires that plastic sorting should follow the principles of stability and no secondary pollution, and the purity of single component after sorting should reach 90% to be used for later high-value utilization. At present, the sorting technologies of waste plastics mainly include flotation, wind power, electrostatic and manual sorting, etc. However, most of these methods have low efficiency, high energy consumption and secondary pollution, which are difficult to meet the development needs of modern renewable resource recycling.
[0003] In recent years, the spectral analysis technology based on machine learning method has developed rapidly, which can realize non-destructive, accurate and efficient on-site rapid and online detection, and provide important technical support for the automation, scaling and intelligentization of plastic sorting, and is expected to overcome the above difficulties. The spectral analysis technology based on machine learning method establishes a correction model by associating the spectrum of known types of plastics with composition or properties, and then predicts the type of unknown plastics according to the model and the spectrum of unknown samples. In this field, most of the current research focuses on the identification of plastics using near-infrared spectroscopy combined with machine learning algorithms. However, traditional black plastics contain carbon black, which absorbs near-infrared spectrum, so near-infrared spectroscopy cannot quickly identify dark plastics. SUMMARY
[0004] The application aims to provide a method and device for identifying common plastics, which is based on attenuated total reflection Fourier transform infrared spectroscopy (ATR-FTIR) and convolutional neural network (CNN), selects the infrared spectral characteristic waveband of common plastics, and performs two-dimensional reconstruction on the characteristic waveband to model and identify the convolutional neural network (CNN). The model established by the method can quickly identify the type of common plastics, without secondary pollution, with high efficiency, speed, identification accuracy and classification accuracy. The measurement mode of Fourier transform infrared spectroscopy (FTIR) combined with attenuated total reflection accessory (ATR) can provide rich molecular structure characteristics of polymers, and also overcome the defects of near-infrared spectroscopy, and can quickly identify black plastics. With the development of deep learning algorithms (especially convolutional neural network) and faster and more sensitive spectral instrument systems, mid-infrared spectroscopy technology has a wide application prospect in the field of waste plastic identification.
[0005] To achieve the above-mentioned purpose, the application provides a method for identifying common plastics, which comprises: determining the mid-infrared spectrum of a sample to be identified by using attenuated total reflection Fourier transform infrared spectroscopy (ATR-FTIR); intercepting a characteristic waveband of the mid-infrared spectrum, dividing the characteristic waveband into a plurality of equal-length subintervals, and performing two-dimensional reconstruction on the plurality of equal-length subintervals to obtain a two-dimensional data matrix; and inputting the two-dimensional data matrix into a pre-established two-dimensional convolutional neural network (CNN2D) model to obtain the plastic category of the sample to be identified.
[0006] Optionally, before the two-dimensional reconstruction of the plurality of equal-length subintervals, the method further comprises: downsampling each subinterval in the plurality of equal-length subintervals.
[0007] Optionally, the characteristic waveband comprises:
[0008] 550cm -1 ~ 1817.6cm -1 spectral region; and
[0009] 2701.7cm -1 ~ 3392.9cm -1 spectral region.
[0010] Optionally, the characteristic waveband is divided into the following six equal-length subintervals:
[0011] 550cm -1 ~ 1010.7cm -1 spectral region;
[0012] 818.9cm -1 ~ 1279.6cm -1 spectral region;
[0013] 1087.9 cm -1 ~ 1548.6 cm -1 spectrum region;
[0014] 1356.9 cm -1 ~ 1817.6 cm -1 spectrum region;
[0015] 2701.7 cm -1 ~ 3162.5 cm -1 spectrum region; and
[0016] 2932.3 cm -1 ~ 3392.9 cm -1 spectrum region.
[0017] Optionally, the two-dimensional convolutional neural network (CNN2D) model comprises an input layer, four convolutional blocks, a full connection layer, a normalization exponential layer, and a classification output layer, wherein the first three convolutional blocks comprise a convolutional layer, a batch normalization layer, an activation function layer, and a maximum pooling layer, and the last convolutional block comprises a convolutional layer, a batch normalization layer, and an activation function layer, the model extracts features layer by layer, and finally classifies through the full connection layer and the normalization exponential layer.
[0018] Optionally, the number of convolution kernels of the four convolutional layers is 25, and the size is 9x9, 7x7, 5x5, and 3x3 respectively, the step length of the first three convolutional layers is 3, and the step length of the last convolutional layer is 2.
[0019] Optionally, the pooling window size of the three maximum pooling layers comprised in the first three convolutional blocks is 1x2, and the step length is 2.
[0020] Optionally, the plastic categories of the sample to be identified include polyethylene (PE), polyamide (PA), polystyrene (PS), polycarbonate (PC), acrylonitrile-butadiene-styrene copolymer (ABS), polyethylene terephthalate (PET), polybutylene terephthalate (PBT), polypropylene (PP), and polyvinyl chloride (PVC).
[0021] In another aspect, the present application provides a device for identifying common plastics, the device comprising: a memory; and a processor configured to identify common plastics using the above-mentioned method for identifying common plastics.
[0022] In another aspect, the present application provides a machine-readable storage medium having instructions stored thereon, which, when executed by a processor, cause the processor to be configured to perform the above-mentioned method for identifying common plastics.
[0023] In another aspect, the present application provides a computer program product comprising a computer program which, when executed by a processor, causes the processor to be configured to perform the above-described method for identifying common plastics.
[0024] By the above technical solution, based on attenuated total reflection Fourier transform infrared spectroscopy (ATR-FTIR) and convolutional neural network (CNN), the infrared spectrum characteristic waveband of common plastics is selected, and the characteristic waveband is two-dimensionally reconstructed, so as to perform convolutional neural network (CNN) modeling identification. The model established by the method can quickly identify common plastic types, without secondary pollution, high efficiency, high speed, high identification accuracy and high classification accuracy. In addition, the measurement mode of Fourier transform infrared spectroscopy (FTIR) combined with attenuated total reflection accessory (ATR) can provide rich molecular structure characteristics of polymers, and also overcomes the defects of near-infrared spectroscopy, and can quickly identify black plastics.
[0025] Other features and advantages of the embodiments of the present application will be described in detail in the following specific implementation part. BRIEF DESCRIPTION OF DRAWINGS
[0026] The accompanying drawings are included to provide a further understanding of the embodiments of the present application, and constitute a part of the specification, and are used to explain the embodiments of the present application together with the following specific implementation, but do not constitute a limitation on the embodiments of the present application. In the drawings:
[0027] Figure 1 is a flowchart of the method for identifying common plastics provided by the present application; and
[0028] Figure 2 is a specific network structure of the two-dimensional convolutional neural network (CNN2D) provided by the present application. DETAILED DESCRIPTION
[0029] In order to make the purpose, technical scheme and advantages of the embodiments of the present application more clear, the technical scheme of the embodiments of the present application will be clearly and completely described below in combination with the drawings of the embodiments of the present application. It should be understood that the specific implementation described herein is only used to illustrate and explain the embodiments of the present application, and is not used to limit the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor are within the scope of protection of the present application.
[0030] It should be noted that if the embodiments of the present application involve directional indications (such as up, down, left, right, front, back, etc.), the directional indications are only used to explain the relative position relationship, movement condition, etc. between the components in a certain posture (as shown in the drawings), if the certain posture changes, the directional indications also change accordingly.
[0031] In addition, if the description of "first", "second" and the like is involved in the embodiments of the present application, the description of "first", "second" and the like is only for the purpose of description, and cannot be understood as indicating or implying the relative importance of the indicated technical features or implicitly indicating the number of the indicated technical features. Therefore, the features limited by "first", "second" can be explicitly or implicitly included at least one of the features. In addition, the technical solutions of each embodiment can be combined with each other, but it must be based on the realization of the ordinary skilled in the art, when the combination of technical solutions appears contradictory or cannot be realized, it should be considered that the combination of technical solutions does not exist, nor in the protection scope required by the present application.
[0032] Figure 1 is a flowchart of the method for identifying common plastics provided by the present application. As shown in Figure 1 , the present application provides a method for identifying common plastics, which comprises:
[0033] Step S110, using attenuated total reflection Fourier transform infrared spectroscopy (ATR-FTIR) to determine the mid-infrared spectrum of the sample to be identified.
[0034] The mid-infrared spectrum of the plastic sample herein can be collected on a FOLI10 conventional Fourier transform infrared spectrometer; the ATR accessory is diamond; the detector is a high-sensitivity DLaTGS pyroelectric detector; the scanning spectral range is 4000-550 cm -1 ; the resolution is 4 cm -1 , and the scanning number is 16.
[0035] Step S120, intercepting the characteristic wave band of the mid-infrared spectrum, dividing the characteristic wave band into a plurality of equal-length subintervals, and performing two-dimensional reconstruction on the plurality of equal-length subintervals to obtain a two-dimensional data matrix.
[0036] Here, the selection of key spectral features to form the characteristic waveband can remove unimportant or redundant features, reduce computational complexity, thereby speeding up the model training process and reducing the cost of model application. The mid-infrared spectrum of the plastic sample is selected for spectral feature waveband selection. The characteristic waveband contains the main chemical information of the polymer, such as specific chemical bonds, functional groups, etc., which are key information for identifying and distinguishing different types of plastics. The characteristic waveband is evenly divided into multiple equal-length subintervals. To further reduce the computational load, a fixed step size is used to downsample each subinterval. On this basis, the two-dimensional reconstruction of the spectrum is performed, and the downsampled spectral data is arranged in the order of the subintervals to form a two-dimensional matrix. In this matrix, each row represents the spectral data of a subinterval, and each column represents a specific wavelength point. Thus, one-dimensional spectral information can be converted into two-dimensional form, thereby better adapting to the architecture requirements of the two-dimensional convolutional neural network (CNN2D).
[0037] Step S130, inputting the two-dimensional data matrix into the pre-established two-dimensional convolutional neural network (CNN2D) model to obtain the plastic type of the sample to be identified.
[0038] Regarding the pre-established two-dimensional convolutional neural network (CNN2D) model, it can be established by the following steps:
[0039] (1) Collecting plastic samples (including black samples), the samples containing common plastic types, and the number of samples being not less than 100.
[0040] (2) Determining the mid-infrared spectrum of the sample by attenuated total reflection Fourier transform infrared spectroscopy (ATR-FTIR).
[0041] (3) Intercepting the characteristic waveband of the mid-infrared spectrum of the plastic sample, dividing the characteristic waveband into multiple equal-length subintervals, downsampling the subintervals, then performing two-dimensional reconstruction, and finally multiple two-dimensional data matrices forming the sample data set.
[0042] (4) Using random selection method for each type of plastic sample, dividing the sample set into training set and validation set according to the approximate ratio of 2:1.
[0043] (5) Associating the sample data set with the corresponding plastic type, and establishing a two-dimensional convolutional neural network (CNN2D) recognition model based on the sample data set of the training set and the corresponding plastic sample type.
[0044] (6) Importing the sample data set of the validation set obtained by steps (2), (3), and (4) into the corresponding recognition model to obtain the predicted plastic type of the validation set plastic sample.
[0045] (7) Compare the plastic types predicted by the recognition model obtained in (6) with the actual plastic types in the validation set to evaluate the recognition model.
[0046] The specific details of building this 2D convolutional neural network (CNN2D) model will be described below. It should be noted that the technical details of the CNN2D model building process (e.g., the determination of the mid-infrared spectrum of the sample to be identified and the processing of the measured mid-infrared spectrum) will also be used in the process of using this model to identify common plastics.
[0047] Using the above technical solution, based on attenuated total reflectance Fourier transform infrared spectroscopy (ATR-FTIR) and convolutional neural networks (CNN), characteristic infrared spectral bands of common plastics are selected, and these characteristic bands are reconstructed in two dimensions to perform CNN modeling and recognition. The model established by this method can quickly identify common plastic types without secondary pollution, and is highly efficient, fast, and has high recognition and classification accuracy. Furthermore, the measurement method combining Fourier transform infrared spectroscopy (FTIR) with attenuated total reflectance (ATR) provides rich molecular structural features of polymers and overcomes the limitations of near-infrared spectroscopy, enabling rapid identification of black plastics.
[0048] The following provides a detailed description of the establishment, training, validation, and evaluation of a two-dimensional convolutional neural network (CNN2D) model.
[0049] 1.1 Collection of plastic samples
[0050] Collect samples of common plastic types (including black plastic samples), namely PE, PA, PS, PC, ABS, PET, PBT, and PVC, at least 100 in total.
[0051] 1.2 Infrared Spectroscopy Acquisition of Plastic Samples
[0052] Infrared spectral data of the plastic samples were acquired using a FOLI10 conventional Fourier transform infrared spectrometer; the ATR accessory was diamond; the detector was a high-sensitivity DLaTGS pyroelectric detector; the scanning spectral range was 4000–550 cm⁻¹. -1 ; Resolution 4cm -1 The number of scans was 16.
[0053] 1.3 Preprocessing of Infrared Spectral Data in Plastic Samples
[0054] Selecting key spectral features to form feature bands can remove unimportant or redundant features, reduce computational complexity, and thus accelerate the model training process and reduce the cost of model application. For the mid-infrared spectra of plastic samples, spectral feature bands are selected. These feature bands contain the main chemical information of the polymer, such as specific chemical bonds and functional groups, which are crucial for identifying and distinguishing different types of plastics. The feature bands are uniformly divided into multiple equal-length sub-intervals. To further reduce computational load, a fixed step size is used to downsample each sub-interval. Based on this, a two-dimensional reconstruction of the spectrum is performed. The downsampled spectral data is arranged according to the order of the sub-intervals to form a two-dimensional matrix. In this matrix, each row represents the spectral data of a sub-interval, and each column represents a specific wavelength point. This transforms one-dimensional spectral information into a two-dimensional form, better adapting to the architectural requirements of two-dimensional convolutional neural networks (CNN2D). Two-dimensional reconstruction is performed on the one-dimensional spectral data of all samples, ultimately forming a sample dataset containing multiple two-dimensional data matrices.
[0055] 1.4 Classification of Plastic Samples
[0056] For each category of plastic samples, a random selection method was used to divide the sample set into a training set and a validation set in an approximately 2:1 ratio.
[0057] 1.5 Establishment of the Recognition Model
[0058] (1) Label the nine plastic categories as “1,2,3,4,5,6,7,8,9” and convert them into classification arrays. According to the training set and validation set divided in 3.4, associate each two-dimensional data matrix of the sample dataset in 3.3 with the classification array converted by the plastic category labels. The former will be used as the input of the training set and validation set, and the latter will be used as the output of the training set and validation set.
[0059] (2) Establish a two-dimensional convolutional neural network (CNN2D) model, which includes an input layer, multiple convolutional blocks, fully connected layers, normalized exponential layers, and a classification output layer. The entire network structure extracts features layer by layer and finally performs classification through fully connected layers and normalized exponential layers.
[0060] (3) Based on the training set input and training set output, the two-dimensional convolutional neural network model established in (2) is trained to obtain a two-dimensional convolutional neural network (CNN2D) recognition model that can identify common plastic types.
[0061] 1.6 Prediction of Plastic Sample Categories
[0062] Based on the recognition model established in 1.5, the sample dataset of the validation set is input into the recognition model to obtain the plastic category of the validation set predicted by the model.
[0063] 1.7 Model Evaluation
[0064] The plastic sample categories predicted by the model in section 1.6 are compared with the actual plastic sample categories in the validation set. The accuracy, precision, and recall of the validation set are used as evaluation metrics for the model.
[0065] Accuracy refers to the proportion of correctly classified samples out of the total number of samples. Accuracy is a statistic applied to all samples. It is defined as:
[0066]
[0067] Precision, also known as accuracy, is an evaluation metric for prediction results. It refers to the proportion of correctly classified positive samples out of the total number of samples classified as positive by the classifier. Precision is a statistic based on a subset of samples, focusing on the data that the classifier classifies as positive. It is defined as:
[0068]
[0069] Recall is the proportion of correctly classified positive samples to the total number of true positive samples. It is also a statistic for a subset of samples, focusing on the true positive samples. It is defined as:
[0070]
[0071] TP stands for True Positive, which is the number of positive classes predicted as positive; TN stands for True Negative, which is the number of negative classes predicted as negative; FP stands for False Positive, which is the number of negative classes predicted as positive; and FN stands for False Negative, which is the number of positive classes predicted as negative.
[0072] The following detailed description of the establishment, training, verification, and evaluation of a two-dimensional convolutional neural network (CNN2D) model, using specific examples, is provided below.
[0073] 2.1 Collection of Plastic Samples
[0074] As shown in Table 1, a total of 512 common plastic samples of nine types (including black plastic samples) were collected, namely polyethylene (PE), polyamide (PA), polystyrene (PS), polycarbonate (PC), acrylonitrile-butadiene-styrene copolymer (ABS), polyethylene terephthalate (PET), polybutylene terephthalate (PBT), polypropylene (PP), and polyvinyl chloride (PVC).
[0075] Table 1 Distribution of Plastic Samples
[0076] Serial number Plastic type Number of samples 1 Polyethylene (PE) 94 2 Polyamide (PA) 42 3 Polystyrene (PS) 69 4 Polycarbonate (PC) 71 5 Acrylonitrile-butadiene-styrene copolymer (ABS) 50 6 Polyethylene terephthalate (PET) 37 7 Polybutylene terephthalate (PBT) 31 8 Polypropylene (PP) 77 9 Polyvinyl chloride (PVC) 41
[0077] 2.2 Infrared Spectroscopy Acquisition of Plastic Samples
[0078] Infrared spectroscopy of plastic samples was acquired using a FOLI10 conventional Fourier transform infrared spectrometer; the ATR accessory was diamond; and the detector was a high-sensitivity DLaTGS pyroelectric detector.
[0079] Scanning spectral range 4000–550 cm⁻¹ -1 ; Resolution 4cm -1 The scan was performed 16 times. A total of 512 spectral data points were collected, each with 8978 data points, corresponding to the range of 4000–550 cm⁻¹. -1 Spectral absorbance within the spectral band range.
[0080] 2.3 Preprocessing of Infrared Spectral Data in Plastic Samples
[0081] Selecting key spectral features to form characteristic bands can remove unimportant or redundant features, reduce computational complexity, thereby accelerating the model training process and lowering the cost of model application. Selecting characteristic spectral bands for the mid-infrared spectrum of plastic samples is crucial because these bands contain key chemical information about the polymer, such as specific chemical bonds and functional groups. These are essential for identifying and distinguishing different types of plastics. The characteristic bands are then uniformly divided into multiple equal-length sub-intervals.
[0082] The characteristic bands of the infrared spectrum in the plastic sample were finally determined to be:
[0083] 550cm -1 ~1817.6cm -1 Spectral region (corresponding to spectral data 1 to 3300);
[0084] 2701.7cm -1 ~3392.9cm -1 Spectral region (corresponding to spectral data points 5601 to 7400);
[0085] The characteristic band is divided into six equal-length sub-intervals, namely:
[0086] 550cm-1~1010.7cm -1 Spectral regions (corresponding to spectral data 1 to 1200);
[0087] 818.9cm -1 ~1279.6cm -1 Spectral region (corresponding to spectral data 701 to 1900);
[0088] 1087.9cm -1 ~1548.6cm -1 Spectral region (corresponding to spectral data 1401–2600);
[0089] 1356.9cm -1 ~1817.6cm -1 Spectral region (corresponding to spectral data 2101 to 3300);
[0090] 2701.7cm -1 ~3162.5cm -1 Spectral region (corresponding to spectral data points 5601 to 6800);
[0091] 2932.3cm -1 ~3392.9cm -1 Spectral region (corresponding to spectral data points 6201–7400);
[0092] A fixed step size of 4 was used to downsample each sub-interval. Based on this, a two-dimensional reconstruction of the spectrum was performed. The downsampled spectral data were arranged according to the order of the sub-intervals, forming a two-dimensional matrix (6×300). In this matrix, each row represents the spectral data of a sub-interval, and each column represents a specific wavelength point. Two-dimensional reconstruction was performed on all 512 one-dimensional spectral data points, ultimately forming a sample dataset containing 512 two-dimensional data matrices (a three-dimensional data matrix of size 6×300×512).
[0093] 2.4 Classification of Plastic Samples
[0094] For each category of plastic samples, a random selection method was used. As shown in Table 2, the sample set was divided into a training set and a validation set in an approximately 2:1 ratio, with a total of 338 samples in the training set and 174 samples in the validation set.
[0095] Table 2. Distribution of Plastic Samples in Training and Validation Sets
[0096]
[0097] 2.5 Establishment of the Recognition Model
[0098] (1) Label the nine types of plastics as “1,2,3,4,5,6,7,8,9” and convert them into a classification array. According to the training set and validation set in 2.4, associate the three-dimensional data matrix constructed in 2.3 with the classification array converted from the plastic category labels. The former will be used as the input of the training set (a three-dimensional data matrix of size 6×300×338) and the input of the validation set (a three-dimensional data matrix of size 6×300×174), and the latter will be used as the output of the training set (a classification array of size 338×1) and the output of the validation set (a classification array of size 174×1).
[0099] (2) A two-dimensional convolutional neural network (CNN2D) model is established, consisting of an input layer, four convolutional blocks, a fully connected layer, a normalized exponential layer, and a classification output layer. The first three convolutional blocks contain convolutional layers, batch normalization layers, activation function layers, and max pooling layers, while the fourth convolutional block contains convolutional layers, batch normalization layers, and activation function layers. The number of kernels in each of the four convolutional layers is 25, with sizes of 9×9, 7×7, 5×5, and 3×3, respectively. The stride of the first three convolutional layers is 3, and the stride of the fourth convolutional layer is 2. The pooling window size of each of the three max pooling layers is 1×2, and the stride is 2. The entire network structure extracts features layer by layer and finally performs classification through fully connected layers and normalized exponential layers. Its network structure is shown in the attached figure. Figure 2 As shown.
[0100] This model simplifies and optimizes the classic visual recognition model AlexNet. While retaining AlexNet's core advantages, it reduces model size and computational requirements, lowering application costs and making it more suitable for plastic recognition based on mid-infrared spectroscopy. Specifically: ① Compared to AlexNet, this model reduces the number of convolutional layers from five to four, making it more lightweight and better suited for processing single-channel two-dimensional data. ② Compared to AlexNet, this model adds a batch normalization layer after each convolutional layer, which helps accelerate training and improve model stability. ③ Compared to AlexNet, this model omits the Dropout layer and instead uses L2 regularization to enhance generalization, helping to reduce overfitting risk while maintaining training stability. ④ Compared to AlexNet, this model uses the Adam optimizer and sets parameters such as initial learning rate, learning rate scheduling, and gradient threshold. Adjusting these training options helps further optimize the model's training efficiency and performance. ⑤ Compared to the ReLU activation function used in the AlexNet model, this model uses the LeakyReLU activation function. This improvement effectively alleviates the neuron death problem, enhances gradient flow, and thus improves the convergence and generalization ability of the network, while maintaining the efficient computational characteristics of ReLU.
[0101] (3) Based on the training set input and training set output, the two-dimensional convolutional neural network (CNN2D) model established in (2) is trained to obtain a two-dimensional convolutional neural network (CNN2D) recognition model that can identify common plastic types.
[0102] 2.6 Prediction of Plastic Sample Categories
[0103] Based on the recognition model established in section 2.5, the validation set sample dataset is input into the recognition model to obtain the plastic category predicted by the model. Specifically, to reduce the prediction error of the model, with a fixed sample division, the model is subjected to 10 random experiments with 174 validation set samples, resulting in 1740 experimental results.
[0104] 2.7 Model Evaluation
[0105] The plastic sample categories predicted by the model in section 2.6 are compared with the actual plastic sample categories in the validation set. The accuracy, precision, and recall of the validation set are used as evaluation metrics for the model. The specific results are shown in Table 3.
[0106] Accuracy refers to the proportion of correctly classified samples out of the total number of samples. Accuracy is a statistic applied to all samples. It is defined as:
[0107] Accuracy = TP + TTNP + FTPN + FN
[0108] Precision, also known as accuracy, is an evaluation metric for prediction results. It refers to the proportion of correctly classified positive samples out of the total number of samples classified as positive by the classifier. Precision is a statistic based on a subset of samples, focusing on the data that the classifier classifies as positive. It is defined as:
[0109]
[0110] Recall is the proportion of correctly classified positive samples to the total number of true positive samples. It is also a statistic for a subset of samples, focusing on the true positive samples. It is defined as:
[0111]
[0112] TP stands for True Positive, which is the number of positive classes predicted as positive; TN stands for True Negative, which is the number of negative classes predicted as negative; FP stands for False Positive, which is the number of negative classes predicted as positive; and FN stands for False Negative, which is the number of positive classes predicted as negative.
[0113] Table 3. Confusion matrix of actual and predicted values on the validation set after 10 random training iterations.
[0114]
[0115] In contrast to the embodiments, instead of performing two-dimensional reconstruction of the one-dimensional mid-infrared spectrum obtained by the comparative model of the existing method, the characteristic bands are extracted and converted into grayscale images, which are then input into a pre-established two-dimensional convolutional neural network (CNN2D) model to obtain the plastic category of the sample to be identified. The specific steps are as follows.
[0116] (1) Collection of plastic samples, as described in 2.1.
[0117] (2) Infrared spectral acquisition of plastic samples, as described in 2.2.
[0118] (3) Preprocessing of infrared spectral data in plastic samples
[0119] The characteristic bands of the infrared spectrum in the plastic samples were ultimately determined to be: the spectral region from 550 cm⁻¹ to 1817.6 cm⁻¹ (corresponding to the 1st to 3300th spectral data); and the spectral region from 2701.7 cm⁻¹ to 3392.9 cm⁻¹ (corresponding to the 5601st to 7400th spectral data). These were then stitched together to form characteristic spectral data (a two-dimensional matrix of size 1×5100). Instead of performing two-dimensional reconstruction of the spectral data, each characteristic spectral data was directly converted into a grayscale image and scaled to 480×480, ultimately forming a sample dataset containing 512 grayscale images (a three-dimensional data matrix of size 480×480×512).
[0120] (4) The classification of plastic samples is the same as described in 2.4.
[0121] (5) The establishment of the identification model is the same as described in 2.5, except for the part involving the preprocessing of infrared spectral data in plastic samples in 2.3.
[0122] (6) Prediction of plastic sample categories, as described in 2.6.
[0123] (7) Model evaluation, as described in 2.7, and the final results are shown in Table 4.
[0124] As can be seen from the examples and comparative examples, compared with existing methods that convert the characteristic bands of the one-dimensional mid-infrared spectrum of plastic into grayscale images to build a two-dimensional convolutional neural network (CNN2D) model, this invention divides the characteristic bands of the mid-infrared spectrum into multiple equal-length sub-intervals and performs two-dimensional reconstruction on these multiple equal-length sub-intervals to obtain a two-dimensional data matrix. This two-dimensional data matrix is then input into a pre-built two-dimensional convolutional neural network (CNN2D) model to obtain the plastic category of the sample to be identified. This invention demonstrates excellent performance in terms of accuracy, precision, and recall.
[0125] Table 4. Confusion matrix of true and predicted values on the validation set from 10 random training iterations.
[0126]
[0127] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0128] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0129] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0130] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0131] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0132] Memory may include non-persistent memory in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.
[0133] Computer-readable media include both permanent and non-permanent, removable and non-removable media, which can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.
[0134] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.
[0135] The above are merely embodiments of this application and are not intended to limit the scope of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of the claims of this application.
Claims
1. A method for identifying common plastics, the method comprising: determining a mid-infrared spectrum of a sample to be identified using attenuated total reflectance Fourier transform infrared spectroscopy (ATR-FTIR); extracting a characteristic waveband of the mid-infrared spectrum, dividing the characteristic waveband into a plurality of equal-length sub-intervals, and performing two-dimensional reconstruction on the plurality of equal-length sub-intervals to obtain a two-dimensional data matrix; and inputting the two-dimensional data matrix into a pre-established two-dimensional convolutional neural network (CNN2D) model to obtain a plastic category of the sample to be identified.
2. The method of claim 1, wherein, Before the two-dimensional reconstruction on the plurality of equal-length sub-intervals, the method further comprises: down-sampling each of the plurality of equal-length sub-intervals.
3. The method of claim 1, wherein, The characteristic waveband comprises: 550 cm -1 ~ 1817.6 cm -1 spectral region; and 2701.7 cm -1 ~ 3392.9 cm -1 spectral region.
4. The method of claim 3, wherein, The characteristic waveband is divided into the following six equal-length sub-intervals: 550 cm -1 ~1010.7 cm -1 spectral region 818.9 cm -1 ~ 1279.6 cm -1 spectrum region; 1087.9 cm -1 ~ 1548.6 cm -1 spectral region 1356.9 cm -1 ~ 1817.6 cm -1 spectrum region 2701.7 cm -1 ~ 3162.5 cm -1 spectrum region and 2932.3 cm -1 ~ 3392.9 cm -1 spectral region.
5. The method according to any one of claims 1-4, characterized in that, The two-dimensional convolutional neural network (CNN2D) model comprises an input layer, four convolutional blocks, a fully connected layer, a normalization exponential layer, and a classification output layer, wherein the first three convolutional blocks comprise a convolutional layer, a batch normalization layer, an activation function layer, and a max-pooling layer, and the last convolutional block comprises a convolutional layer, a batch normalization layer, and an activation function layer, the model extracts features layer by layer, and finally classifies through the fully connected layer and the normalization exponential layer.
6. The method of claim 5, wherein, The number of convolutional kernels of the four convolutional layers is 25, and the size is 9x9, 7x7, 5x5, and 3x3, respectively, the step size of the first three convolutional layers is 3, and the step size of the last convolutional layer is 2.
7. The method of claim 5, wherein, The pooling window size of the three max-pooling layers included in the first three convolutional blocks is 1x2, and the step size is 2.
8. The method of claim 1, wherein, The plastic category of the sample to be identified includes polyethylene (PE), polyamide (PA), polystyrene (PS), polycarbonate (PC), acrylonitrile-butadiene-styrene copolymer (ABS), polyethylene terephthalate (PET), polybutylene terephthalate (PBT), polypropylene (PP), and polyvinyl chloride (PVC).
9. An apparatus for identifying common plastics, characterized by, The apparatus comprises: a memory; and a processor configured to identify common plastics using the method for identifying common plastics according to any one of claims 1-8.
10. A machine-readable storage medium having stored thereon instructions, the instructions being executable by a machine to cause the machine to: The instructions, when executed by the processor, cause the processor to be configured to perform the method for identifying common plastics according to any one of claims 1-8.
11. A computer program product comprising a computer program which, when executed by a processor, causes the processor to be configured to perform the method for identifying common plastics according to any one of claims 1-8.