Method for waste metal recycling classification based on information fusion of LIBS spectrum and image
Patent Information
- Application Number
- CN202610077283.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-04-29
- Publication Date
- 2026-10-30
AI Technical Summary
[0010]2) 传统的深度网络(如VGG16)通过堆叠多个全连接层与3x3卷积来增加深度,导致参数量巨大,计算与存储成本高昂
[0039]1.本发明提出的通用型网络模型构建方法是一种创新性的ResNet18-SVM-RF融合网络的方法,具体而言,该模型利用ResNet18提取图像信息特征、SVM提取光谱特征后,输出融合后的特征向量在随机森林分类器中作最终分类。通过融合模型对双模态数据的特征处理,不仅保留了两类模型固有的特征提取能力,还赋予了模型相当的稳定性和可控性。
Smart Images

Figure CN123012787A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of metal classification technology, specifically a waste metal recycling classification method that integrates LIBS spectral and image information. Background Technology
[0002] With the widespread application of metallic materials, scrap metal recycling and sorting technologies have become crucial for their sustainable development. Alloy sorting technology within metallic materials, as a key support for enhancing the value of scrap metals, provides a solid foundation for ensuring the material properties and recycling of scrap metals.
[0003] Existing alloy classification tasks often rely on image recognition methods based on deep networks, which have ample theoretical support and are widely used. However, when faced with the high similarity of surface texture visual features between different grades of the same alloy in actual production, and the differences caused by noise interference such as contamination and creases within scrap of the same alloy grade, image recognition methods are prone to overfitting. In addition, deep networks have a large number of parameters and complex structures, resulting in a very time-consuming computation process, which makes it difficult to meet the needs of rapid and efficient implementation in industrial production.
[0004] Laser-induced breakdown spectroscopy (LIBS) has shown great potential in classifying complex alloys due to the superior elemental analysis capabilities of the spectral data it yields. However, this technique still faces several challenges in practical applications, such as matrix effects, material heterogeneity, and the high noise inherent in industrial data. These problems can also easily lead to overfitting of the spectral model, thus affecting its generalization performance.
[0005] To address the aforementioned issues, researchers have developed multimodal information fusion methods by leveraging the complementary strengths of both approaches, leading to the proposal of various intelligent algorithms, such as methods combining Principal Component Analysis (PCA), Multilayer Perceptron (MLP), and machine vision. While these methods achieve multimodal information fusion to some extent, their complex combined algorithmic structures require numerous parameter adjustments and result in the capture of excessive redundant noise during feature extraction. This not only leads to high-dimensional data computation but also impacts model efficiency. Furthermore, existing fusion methods struggle to accurately match the key features of spectral and image fusion, limiting the model's classification accuracy; and the lack of support from real-world complex samples restricts their generalization performance in practical applications.
[0006] Support Vector Machine (SVM) is a classic supervised learning algorithm that finds the optimal classification hyperplane (decision boundary) that maximizes the margin between support vectors from the hyperplane to different classes of data points. For non-linearly separable data, the kernel function implicitly maps it to a high-dimensional space to make it linearly separable. SVM improves the model's generalization ability while maintaining classification accuracy, effectively reducing overfitting.
[0007] Residual networks (ResNet), as a type of neural network model, effectively alleviate the gradient vanishing and degradation problems in deep neural network training by introducing a "residual connection" mechanism, and thus have been widely applied to image information processing tasks. By efficiently extracting deep features, residual networks can build models that are highly correlated with the output.
[0008] The ResNet18 model can be seen as a classic network model in residual models, and it has the following characteristics compared with general deep neural networks:
[0009] 1) General deep neural networks are prone to problems such as gradient vanishing or model degradation as the number of layers increases. However, ResNet18 uses "residual connections" to pass the input directly to the subsequent layers after crossing some convolutional layers. This allows the network to focus on learning the "residual" (y = F(x) + x) between the input and output of the current layer. The gradient is directly backpropagated along the shortcut, which effectively alleviates gradient vanishing and greatly reduces the training difficulty of deep networks.
[0010] 2) Traditional deep networks (such as VGG16) increase depth by stacking multiple fully connected layers and 3x3 convolutions, resulting in a huge number of parameters and high computational and storage costs. In contrast, ResNet18 extensively uses 1x1 convolutions for dimensionality reduction and expansion in its design, and ultimately uses global average pooling to replace fully connected layers, which significantly compresses the parameter scale and has higher computational density and parameter efficiency.
[0011] However, the traditional ResNet18 network model still has certain shortcomings when used for waste metal recycling classification. On the one hand, when faced with small sample datasets with highly similar appearance features, even with a small number of residual network layers, overfitting can still occur due to the learning of noisy features. On the other hand, if the features obtained after four layers of residual feature extraction are not transformed in dimension and are directly fused with subsequent one-dimensional spectral data, poor dimension matching will occur during data fusion. Summary of the Invention
[0012] This invention proposes a waste metal recycling classification method that fuses LIBS spectral and image information. By utilizing the classification capability of a constructed ResNet18-SVM model to handle spectral-image dual-modal information, this invention aims to provide a general network model building method with a complete theoretical framework to meet the requirements of accuracy, robustness, and ease of use in industrial applications. This invention offers a new solution for the field of metal classification and is expected to promote the intelligent development of the alloy classification industry.
[0013] To achieve the above objectives, the present invention proposes the following technical solution:
[0014] A waste metal recycling classification method based on LIBS spectral and image information fusion is proposed, which involves establishing and training a waste metal recycling classification network model based on LIBS spectral and image information fusion to achieve automatic identification and classification of waste metal grades. The method includes the following steps:
[0015] LIBS spectral and image data of the scrap metal to be processed are collected, and a paired dataset is created and divided into training, validation and test sets. The paired dataset contains spectral and image data, as well as the grade labels corresponding to each data. The LIBS spectral and image data in the dataset are preprocessed to filter out key spectra that highlight discriminative features in the spectral data, and the size of the image data is adjusted to fit the model input.
[0016] A ResNet18-SVM-RF fusion classification network based on LIBS spectrum and image is constructed. The front end of the network adopts a parallel processing dual-modal feature complementary branch architecture. The image branch uses an improved ResNet18 model to obtain image features, and the spectral branch uses a linear kernel SVM algorithm to extract spectral features and uses the hyperplane distance output by the decision function as the spectral feature vector. The back end uses a random forest classifier to classify and train the fused feature vectors of the training set to perform the final brand classification task. The model parameters are optimized based on the performance of the validation set to obtain an ideal classification model.
[0017] In real-world recycling scenarios, LIBS spectral and image data of scrap metal are collected, and after data preprocessing, they are input into a pre-trained ideal classification model to output the scrap metal grade classification results in real time.
[0018] The grade label is a metallic grade, which is known in advance or obtained through chemical determination.
[0019] The LIBS spectral data preprocessing includes: standardization, denoising, and feature selection operations to filter out discriminative features; applying preprocessing operations to the image data, including but not limited to random perturbation noise, elastic deformation operations, random angle rotation and scaling transformations, random direction translation operations, and random zeroing of some pixels, and adjusting the size to adapt to the model input; the above steps are used to simulate morphological changes between multiple samples while maintaining the original spatial distribution information of the image, and the execution order is not limited to the above order, and some or all of the steps are performed randomly.
[0020] The LIBS spectral data feature selection includes using the SelectKBest method to select the top-ranked feature vectors to reduce data dimensionality and retain key spectral information.
[0021] The specific steps for the lightweight, improved ResNet18 model to extract image data features include:
[0022] The input layer receives preprocessed image data;
[0023] After removing the fully connected layer FC, the average pooling layer AP, and the last residual layer Resblock from the original ResNet18 model, feature extraction is performed using three residual blocks.
[0024] Finally, an adaptive average pooling layer (AAP) is applied after three residual convolutional layers to perform feature transformation.
[0025] The improved ResNet18 model was not fine-tuned during pre-training. By setting the eval mode to freeze the pre-training parameters and disabling gradient calculation, the improved model was used only as a feature extractor.
[0026] The specific steps for extracting spectral features using the linear kernel SVM include:
[0027] The preprocessed LIBS spectral data is input into a linear kernel SVM;
[0028] The signed distance between the input sample and each classification hyperplane is calculated using the Decision_Function method in the SVC classification task.
[0029] The distance is used to construct a spectral feature vector, and the dimension of its output corresponds to the number of metal grade categories.
[0030] The feature fusion is a vector concatenation operation used to generate a fused feature vector.
[0031] The random forest classifier takes the fused feature vector as input and optimizes the number of trees and the number of node splitting features in the random forest to train the optimal classification model, which is used to make the final classification determination of the scrap metal grade based on the input fused feature vector.
[0032] The dataset is partitioned using a stratified sampling method to process a small number of classes, in order to balance the data distribution and pass the classification performance index of the validation set.
[0033] A waste metal recycling and sorting system that integrates LIBS spectral and image information, including front-end sensors and back-end host computer;
[0034] The front-end sensor includes an industrial vision camera and a laser-induced breakdown spectroscopy (LIBS) device. The industrial vision camera acquires images of the target sample within its field of view, and the laser-induced breakdown spectroscopy (LIBS) device is used to strike the target sample with a laser to generate plasma on its surface and acquire the spectral data of the plasma.
[0035] The backend host computer includes a control backend and a frontend interface;
[0036] The front-end interface is used for human-computer interaction, collecting algorithm parameters input by the user, working parameters of the front-end sensor, and working instructions, sending them to the control backend, and visually displaying the brand identification calculation process and results; the algorithm parameters include, but are not limited to, the processing methods and parameters, calculation formulas, and specific formula parameter values for machine vision images and LIBS spectra;
[0037] The control backend is equipped with a memory and a processor. The memory stores the program, and the processor converts the working parameters and instructions of the front-end sensor into command signals and outputs them to the front-end sensor. It also loads the program to execute the method steps described above, calculates the metal grade identification result according to the algorithm formula, and uses it for classification.
[0038] The beneficial effects and advantages of this invention are as follows:
[0039] 1. The general network model construction method proposed in this invention is an innovative ResNet18-SVM-RF fusion network approach. Specifically, this model utilizes ResNet18 to extract image information features and SVM to extract spectral features, then outputs a fused feature vector for final classification in a random forest classifier. By using the fusion model to process the features of dual-modal data, not only is the inherent feature extraction capability of both models preserved, but the model is also endowed with considerable stability and controllability.
[0040] 2. The waste metal recycling classification method proposed in this invention, which integrates LIBS image and spectral information, enables the established ResNet18-SVM-RF model to more accurately obtain key performance indicators such as material composition and grade labeling under complex industrial processes.
[0041] 3. This invention, starting from the mechanism of complementary fusion of image and spectral information, provides a comprehensive theoretical framework for the extraction and feature fusion of dual-modal information features, thus meeting the stringent requirements for accuracy, robustness, and ease of use in industrial applications. This innovative research is expected to promote the intelligent development of alloy classification and bring progress to the field of technical classification.
[0042] 4. The ResNet18-SVM-RF model proposed in this invention achieves a lightweight improvement over the ResNet18 network in the image feature extraction module. By removing the last residual block, it reduces noise and redundant information caused by excessive feature extraction, thereby reducing the learning burden of the classification task. Adaptive average pooling makes the feature dimensions concise and uniform, providing good dimensionality adaptability for subsequent feature fusion and concatenation operations. In addition, the feature-level fusion concatenation operation is simple and easy to perform with a clear mechanism; the overall structure is concise, with few parameters and convenient parameter tuning, thus significantly improving the overall execution efficiency.
[0043] 5. The datasets used in this invention are all based on actual alloy scrap. The alloy surface includes, but is not limited to, stains, dust, scratches, burrs, creases, and other actual signs of use. The datasets have generalizability and practical significance for the task of classifying scrap metal grades in actual industrial scenarios, and provide reliable data support and technical reference for the engineering implementation in this field. Attached Figure Description
[0044] Figure 1 This is a structural diagram of the method of the present invention.
[0045] Figure 2 This is a flowchart of the method of the present invention.
[0046] Figure 3 This is a schematic diagram of a waste aluminum alloy sample detection device based on the fusion of LIBS spectral and image information.
[0047] Figure 4 This is a schematic diagram of the data from a waste aluminum alloy sample.
[0048] Figure 5 This is a schematic diagram illustrating the partitioning of a dataset for a portion of the brands and samples.
[0049] Figure 6 A schematic diagram of spectral comparison for feature selection using the SelectKBest method.
[0050] Figure 7 The image information extraction module ResNet18 model is shown as an improved comparison result.
[0051] Figure 8 This is a schematic diagram illustrating the optimization of random forest parameters.
[0052] Figure 9 The chart shows a comparison of the ROC curves of the three models in the task of sorting scrap aluminum alloys.
[0053] Figure 10 The graph shows the classification performance data for ResNet18, SVM, and ResNet18-SVM-RF. Detailed Implementation
[0054] To make the above-mentioned objectives, features and advantages of the present invention more apparent and understandable, the technical solution of the present invention will be further explained below with reference to an example of a classification task of actual waste aluminum alloy samples.
[0055] In metal classification tasks, laser-induced breakdown spectroscopy (LIBS) technology can be used for online detection of elements in different types of alloys. LIBS is a direct measurement sensing technique that relies on physical processes and spectral analysis. Its principle involves focusing high-energy pulsed laser radiation onto the sample surface to generate plasma, and then measuring the emission spectrum of the plasma to obtain information on the composition and content of the alloy sample.
[0056] Numerous specific details are set forth in the following description to provide a full understanding of the invention. However, the invention can be practiced in many other ways than those described herein, and similar modifications can be made by those skilled in the art without departing from the spirit of the invention. Therefore, the invention is not limited to the specific embodiments disclosed below.
[0057] like Figure 1 As shown, this invention constructs a ResNet18-SVM-RF model and improves the network structure to initially extract features from image and spectral information. Subsequently, feature stacking ensures feature fusion between the two types of information and provides feature input for subsequent classification tasks. To further improve classification performance, this invention further trains the random forest model based on the training set data. During training, this invention further optimizes the hyperparameters of the ResNet18-SVM-RF network model to ensure the training effect. Finally, considering the model's accuracy, training efficiency, and stability, the number of trees (n_estimators) in the random forest classifier is selected as 100, and the optimal number of split nodes (split) is selected as 2.
[0058] This example provides a process for establishing a practical waste aluminum alloy classification model based on laser-induced breakdown spectroscopy (LIBS) technology. This process combines the waste metal recycling classification method based on LIBS spectral and image information fusion proposed in this invention. The overall process is as follows: Figure 2 As shown, the specific steps include:
[0059] (1) Data Acquisition:
[0060] The integrated system device proposed in this example is as follows: Figure 3 As shown. During LIBS data acquisition, a laser beam (pulse energy 1.5 mJ, pulse frequency 1 kHz, wavelength 1064 nm) is focused onto a fixed point on the surface of the aluminum alloy sample by a lens system, and then pulse-excited to generate plasma. The resulting spectrum is focused onto an optical fiber by a collecting lens. This optical fiber, in conjunction with the spectrometer (model AvaSpec-2048, wavelength range 247–369 nm, resolution 0.07 nm), collects spectral data and stores it in a specific file format on a computer for subsequent analysis. In addition, it should be noted that the spectrometer simultaneously performs continuous data acquisition at 10 ms intervals, and the final 10 cumulative spectra are used as the measurement spectra of the current sample fragment to ensure the intensity and stability of the acquired spectral signals.
[0061] Simultaneously, image data corresponding to the samples was acquired using a camera. The experiment used two 50W light sources to illuminate the 460×460mm detection area, with an exposure time set to 1.2 seconds to ensure the brightness and clarity of the acquired images. The obtained images had resolutions ranging from 1440×1080 to 2880×2160 pixels, with a resolution of 72 to 96 dpi.
[0062] The actual waste aluminum alloy sample data obtained above are as follows: Figure 4 As shown, the left image contains spectral data where the x-axis represents wavelength, the y-axis represents intensity, and the spectral dimension is 2048; the right image contains the corresponding image data.
[0063] (2) Dataset partitioning:
[0064] The actual dataset contains 225 image-spectral bimodal data pairs. To ensure a balanced distribution of the data, 17 samples from each brand category were used as the training set, 3 as the validation set, and 5 as the test set. The final dataset partition is as follows: 153 samples as the training set for building the bimodal data pair-brand classification model; 27 samples as the validation set for optimizing model hyperparameters; and 45 samples as the test set for evaluating the model's generalization ability. Figure 5 A schematic diagram showing the partitioning of a dataset of aluminum alloys of a certain grade for a portion of the samples.
[0065] (3) Model construction and evaluation indicators:
[0066] Based on the training set data, a ResNet18-SVM-RF model was constructed to fit the relationship between the measurement data and the brand index. Compared with the original model, the ResNet18 image information extraction module removed the original fully connected layer, average pooling layer and the last residual layer, and instead connected the three residual layers to an adaptive average pooling layer, thus constructing a new network architecture.
[0067] In this invention, accuracy (Acc), precision (P), recall (Rec), and F1 score (F1) are used as performance evaluation metrics for the model. Their definitions are shown in formulas (1)-(4):
[0068] (1)
[0069] (2)
[0070] (3)
[0071] (4)
[0072] Where g represents the target category, G represents the total number of categories, TPg and TNg represent correctly predicted positive and negative samples, respectively, and FPg and FNg represent incorrectly predicted positive and negative samples, respectively. In the subsequent model performance evaluation, we mainly observe these four specific metrics on the test set.
[0073] (4) Classification feature extraction:
[0074] like Figure 7 As shown, based on the improved ResNet18-SVM-RF model, we determined a hierarchical feature extraction strategy to extract feature results from both modal data. Specifically, this includes:
[0075] 1. 6-Image Information: After preprocessing (Prep), the input image is fed into a lightweight ResNet18 feature extraction network. During this process, the image first passes through an initialization convolutional layer, the first processing unit receiving the input image. Then, three layers of residual convolution (Res_Block) continuously perform further nonlinear transformations on the input feature map, thereby extracting more abstract features. The improved ResNet18 model is not fine-tuned pre-trained; pre-training parameters are frozen by setting the eval mode, and gradient calculation is disabled using torch.no_grad(), making it only used as a feature extractor. Finally, an adaptive average pooling layer reduces the dimensionality of the data and abstracts the features, resulting in a 256-dimensional feature vector.
[0076] 2. Spectral Data: The input spectral data first undergoes noise reduction: After data standardization, the feature values are scaled to ensure the data conforms to a distribution with a mean of 0 and a standard deviation of 1. Then, the SelectKbest module is used to select the top 80% of the feature vectors, such as... Figure 6 As shown; finally, using the Decision_Function method in SVM, the signed distance with each hyperplane is calculated, and the feature extraction result of SVM is a 9-dimensional feature vector, corresponding to 9 types of waste aluminum alloy grades.
[0077] (5) Feature fusion and final classification:
[0078] In the feature fusion stage, the model employs the np.hstack horizontal concatenation method, ensuring the integrity of bimodal information while avoiding the computational overhead of complex fusion algorithms, thus facilitating engineering implementation. The fused features are then used as input to a random forest classifier, which takes the fused feature vector as input and optimizes the number of trees and the number of node splitting features to train the optimal classification model. Leveraging the high generalization and overfitting capabilities of the RF classifier, it effectively uncovers the nonlinear complementary relationship between spectral and image features, achieving accurate classification of scrap metal grades. The random forest parameter optimization is as follows... Figure 8 As shown.
[0079] (6) Result verification:
[0080] To fully verify the effectiveness of the proposed ResNet18-SVM-RF method in practical applications, we compared two original models using the same dataset: the ResNet18 model relying solely on image information and the SVM model relying solely on spectral information. First, we compared the performance of the three models on the scrap aluminum alloy classification task, and their ROC curves are shown below. Figure 9 As shown.
[0081] To further ensure the fairness and accuracy of the comparison, the modeling and evaluation process was repeated 10 times. This process aimed to examine in depth the accuracy and robustness of different models under different conditions. Through the above process, we obtained performance data for three models: ResNet18, SVM, and ResNet18-SVM-RF. Figure 10 The confusion matrix shown intuitively illustrates the classification performance of the three models, while the specific performance metrics are detailed in Table 1.
[0082] Table 1
[0083]
[0084] observe Figure 10It can be seen that the ResNet18-SVM-RF method achieves higher accuracy and a smaller error range in classifying different grades of scrap aluminum alloys. Further analysis of Table 1 and... Figure 10 From the data, we can draw the following conclusions:
[0085] The ResNet18 model performed the worst in all accuracy categories when processing single-image information, with its scores in all four categories significantly lower than the other two methods. This indicates that the traditional ResNet18 model struggles to accurately fit the complex relationship between images and scrap metal grades, thus making it difficult to complete the scrap metal grade classification task.
[0086] The SVM model for processing single-spectral information achieved over 90% in all four metrics, thanks to the keen analytical capabilities of spectral analysis for elemental composition. However, from... Figure 10 The confusion matrix shows that the SVM model misclassifies grades 1060 and AA1200. This may be because the two grades of scrap aluminum alloys are highly similar in terms of their constituent elements, resulting in a high degree of overlap in the peak values and peak shapes of their spectral curves, which limits the stability and generalization ability of the model.
[0087] The ResNet18-SVM-RF model, which combines image and spectral dual-modal data, achieves excellent classification results. Figure 10 The confusion matrix of model c is close to ideal, with only one instance of misclassification of 3003 as 1060, reflecting that the model fully leverages the advantages of multimodal fusion. Through deep feature extraction, it captures subtle textures and structural differences that are difficult for the human eye to quantify, enhancing feature discrimination ability and significantly improving the model's robustness, greatly reducing misclassification.
[0088] The above results fully demonstrate the effectiveness and superiority of the ResNet18-SVM-RF method proposed in this invention in the task of classifying scrap metal grades.
[0089] Another example of this invention is the classification process of ferrous metal alloys. Key indicator labels related to industrial production are the different grades of the target alloy. Measurement data includes image information, spectral data, etc., which are collected in real time by sensors and transmitted to the system. Using the neural network detection method of this invention, the measurement data of the target product serves as the input to the model for training and optimizing the ResNet18-SVM-RF model. The key indicator labels are the output of the model, representing the predicted classification of the specified grade in the target alloy. Based on the fusion processing of dual-modal information, and through continuous learning and adjustment, the model achieves higher classification accuracy. The ResNet18-SVM-RF model classifies and identifies the specified grade of the target metal in real time, and production control quantities are adjusted based on the classification results, such as adjusting the conveyor belt speed for the sample to be tested, changing the specific size and shape of the sample, etc., thereby achieving precise control of the production process.
[0090] The embodiments described above will help those skilled in the art to further understand the present invention, but do not limit the present invention in any way. It should be noted that those skilled in the art can make several modifications and improvements without departing from the concept of the present invention. These all fall within the protection scope of the present invention.
Claims
1. A waste metal recycling and classification method based on LIBS spectral and image information fusion, characterized in that, The following steps are performed to establish and train a LIBS spectral and image information fusion network model for waste metal recycling classification, which is used to achieve automatic identification and classification of waste metal grades. The method includes the following steps: LIBS spectral and image data of the scrap metal to be processed are collected, and a paired dataset is created and divided into training, validation and test sets. The paired dataset contains spectral and image data, as well as the grade labels corresponding to each data. The LIBS spectral and image data in the dataset are preprocessed to filter out key spectra that highlight discriminative features in the spectral data, and the size of the image data is adjusted to fit the model input. A ResNet18-SVM-RF fusion classification network based on LIBS spectrum and image is constructed. The front end of the network adopts a parallel processing dual-modal feature complementary branch architecture. The image branch uses an improved ResNet18 model to obtain image features, and the spectral branch uses a linear kernel SVM algorithm to extract spectral features and uses the hyperplane distance output by the decision function as the spectral feature vector. The back end uses a random forest classifier to classify and train the fused feature vectors of the training set to perform the final brand classification task. The model parameters are optimized based on the performance of the validation set to obtain an ideal classification model. In real-world recycling scenarios, LIBS spectral and image data of scrap metal are collected, and after data preprocessing, they are input into a pre-trained ideal classification model to output the scrap metal grade classification results in real time.
2. The waste metal recycling and classification method based on LIBS spectral and image information fusion according to claim 1, characterized in that, The grade label is a metallic grade, which is known in advance or obtained through chemical determination.
3. The waste metal recycling and classification method based on LIBS spectral and image information fusion according to claim 1, characterized in that, The LIBS spectral data preprocessing includes: standardization, denoising, and feature selection operations to filter out discriminative features; applying preprocessing operations to the image data, including but not limited to random perturbation noise, elastic deformation operations, random angle rotation and scaling transformations, random direction translation operations, and random zeroing of some pixels, and adjusting the size to adapt to the model input; the above steps are used to simulate morphological changes between multiple samples while maintaining the original spatial distribution information of the image, and the execution order is not limited to the above order, and some or all of the steps are performed randomly.
4. The waste metal recycling and classification method based on LIBS spectral and image information fusion according to claim 1, characterized in that, The LIBS spectral data feature selection includes using the SelectKBest method to select the top-ranked feature vectors to reduce data dimensionality and retain key spectral information.
5. The waste metal recycling and classification method based on LIBS spectral and image information fusion according to claim 1 or 4, characterized in that, The specific steps for the lightweight, improved ResNet18 model to extract image data features include: The input layer receives preprocessed image data; After removing the fully connected layer (FC), average pooling layer (AP), and the last residual layer (Res block) of the original ResNet18 model, feature extraction is performed using three residual blocks. Finally, an adaptive average pooling layer (AAP) is applied after three residual convolutional layers to perform feature transformation. The improved ResNet18 model was not fine-tuned during pre-training. By setting the eval mode to freeze the pre-training parameters and disabling gradient calculation, the improved model was used only as a feature extractor.
6. The waste metal recycling and classification method based on LIBS spectral and image information fusion according to claim 1, characterized in that, The specific steps for extracting spectral features using the linear kernel SVM include: The preprocessed LIBS spectral data is input into a linear kernel SVM; The signed distance between the input sample and each classification hyperplane is calculated using the Decision_Function method in the SVC classification task. The distance is used to construct a spectral feature vector, and the dimension of its output corresponds to the number of metal grade categories.
7. The waste metal recycling and classification method based on LIBS spectral and image information fusion according to claim 1, characterized in that, The feature fusion is a vector concatenation operation used to generate a fused feature vector.
8. The waste metal recycling and classification method based on LIBS spectral and image information fusion according to claim 1, characterized in that, The random forest classifier takes the fused feature vector as input and optimizes the number of trees and the number of node splitting features in the random forest to train the optimal classification model, which is used to make the final classification determination of the scrap metal grade based on the input fused feature vector.
9. The waste metal recycling and classification method based on LIBS spectral and image information fusion according to claim 1, characterized in that, The dataset is partitioned using a stratified sampling method to process a small number of classes, in order to balance the data distribution and pass the classification performance index of the validation set.
10. A waste metal recycling and sorting system based on LIBS spectral and image information fusion, characterized in that, Includes front-end sensors and back-end host computer; The front-end sensor includes an industrial vision camera and a laser-induced breakdown spectroscopy (LIBS) device. The industrial vision camera acquires images of the target sample within its field of view, and the laser-induced breakdown spectroscopy (LIBS) device is used to strike the target sample with a laser to generate plasma on its surface and acquire the spectral data of the plasma. The backend host computer includes a control backend and a frontend interface; The front-end interface is used for human-computer interaction, collecting algorithm parameters input by the user, working parameters of the front-end sensor, and working instructions, sending them to the control backend, and visually displaying the brand identification calculation process and results; the algorithm parameters include, but are not limited to, the processing methods and parameters, calculation formulas, and specific formula parameter values for machine vision images and LIBS spectra; The control backend is equipped with a memory and a processor. The memory stores the program, and the processor converts the working parameters and instructions of the front-end sensor into command signals and outputs them to the front-end sensor. It also loads the program to execute the method steps as described in any one of claims 1-9, calculates the metal grade identification result according to the algorithm formula, and uses it for classification.
