A slag waste treatment method based on image recognition
Through image recognition-based methods, combined with machine learning and image processing algorithms, efficient identification and sorting of slag waste is achieved, solving the problems of low efficiency and resource waste in traditional methods, and improving processing accuracy and system adaptability.
Patent Information
- Application Number
- CN202411571380.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-06
- Publication Date
- 2025-01-17
- Estimated Expiration
- 2044-11-06
AI Technical Summary
Traditional slag treatment methods are inefficient, resource waste and environmental pollution are serious. The existing automated sorting system is limited in identification and sorting, making it difficult to achieve efficient continuous production and treatment.
Using an image recognition method, a slag waste classification model is constructed through high-resolution image acquisition equipment and machine learning algorithms, combined with SIFT, FLANN, RANSAC and Laplace pyramid algorithms to stitch images and feature matching to identify different types of slags. And preliminary sorting and secondary fine sorting are performed through the robotic arm, and feedback loop adjustment is set to identify errors.
Improve the accuracy and efficiency of slag waste identification and sorting, enhance the flexibility and adaptability of the system, ensure stable operation under different environments and conditions, realize high-quality image stitching and accurate recognition, and reduce misclassification. Improves sorting accuracy and system operation efficiency.
Smart Images

Figure CN119068428B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the field of image recognition, and in particular to a slag waste treatment method based on image recognition. Background Art
[0002] In the process of industrial production, slag is a common byproduct in industries such as metallurgy, steel manufacturing and coal-fired power generation. Traditional slag treatment methods mainly rely on manual sorting and simple mechanical separation, which is not only inefficient but also prone to resource waste and environmental pollution. With the global emphasis on resource recovery and environmental protection, how to efficiently and environmentally friendly treat slag has become an urgent problem to be solved.
[0003] However, due to the limitations of identification and sorting, many valuable recyclable materials cannot be effectively recycled in the existing automated sorting systems, resulting in waste of resources. They lack intelligent feedback mechanisms and cannot be adjusted and optimized based on real-time data. In addition, the overall automation level is low, making it difficult to achieve efficient continuous production and processing. Summary of the invention
[0004] In order to solve the above problems, the purpose of the present invention is to provide a slag waste treatment method based on image recognition, which can not only improve the accuracy and efficiency of slag waste identification and sorting, but also enhance the flexibility and adaptability of the system to ensure stable operation under different environments and conditions.
[0005] To achieve the above object, the present invention adopts the following technical solutions:
[0006] A slag waste treatment method based on image recognition comprises the following steps:
[0007] S1: A number of high-resolution image acquisition devices are arranged above the slag garbage conveyor belt to realize continuous monitoring of the flowing slag, and the acquired images are pre-processed, and images at different angles are spliced to obtain real-time monitoring spliced images;
[0008] S2: Construct a slag waste classification model based on machine learning algorithm;
[0009] S3: According to the slag waste classification model and the real-time monitoring splicing image, different types of slag are identified, and according to the identification results, a control signal is sent to the actuator to drive the robotic arm to sort out the slag, and different types of slag are preliminarily sorted;
[0010] S4: At each classification collection point, an image acquisition device is provided to obtain real-time images of the classification collection point, and to perform classification confirmation based on the slag classification confirmation model;
[0011] S5: Based on the classification confirmation results, secondary fine sorting is carried out, and the recognition errors are corrected through the feedback loop to adjust the sorting process.
[0012] Furthermore, S1 is specifically:
[0013] S11: Install several high-resolution industrial cameras at different angles above the slag waste conveyor belt to cover the entire width and length of the conveyor belt. The angles and positions of each camera should ensure that the field of view overlaps;
[0014] S12: Use a synchronous trigger mechanism to ensure that all cameras shoot at the same time and set the camera frame rate according to the speed of the conveyor belt;
[0015] S13: Preprocess the image, use Gaussian filtering to remove noise in the image, and dynamically adjust the brightness and contrast of the image according to ambient light conditions;
[0016] S14: Use SIFT algorithm to detect feature points in the image, and use FLANN to match feature points;
[0017] S15: Use the RANSAC algorithm to calculate the homography matrix, and use the homography matrix to perform perspective transformation on the image, align the images at different angles, and then stitch them together, and use the Laplacian pyramid fusion algorithm to smooth the stitching edges and eliminate seams.
[0018] Furthermore, S13 is specifically:
[0019] Set the size and standard deviation σ of the Gaussian kernel and construct the Gaussian kernel function:
[0020] ;
[0021] Among them, (i, j) is the coordinate of the Gaussian kernel;
[0022] Convolve the image I(x,y) to get the filtered image :
[0023] ;
[0024] where k is the radius of the nucleus;
[0025] Extract the average brightness value L from the image avg, And according to the target brightness range [L min ,L max Adjust brightness:
[0026] ;
[0027] Where ΔB is the brightness adjustment value, k B is the brightness adjustment coefficient, Ltarget is the target brightness value;
[0028] Calculating contrast adjustment values :
[0029] ;
[0030] in, is the contrast adjustment factor;
[0031] The brightness and contrast of the image are adjusted based on the brightness adjustment value and the contrast adjustment value.
[0032] Furthermore, S14 is specifically:
[0033] Grayscale the preprocessed image, and perform multi-scale Gaussian blur on the grayscale image to generate a scale space;
[0034] Calculate the difference between adjacent Gaussian blurred images and detect local extreme points in the DoG pyramid;
[0035] Use Taylor expansion to accurately locate the detected extreme points and remove low-contrast points and edge response points:
[0036] Calculate the gradient direction histogram of the key point neighborhood and assign the main direction to make the feature rotation invariant;
[0037] Construct SIFT feature description around key points to obtain SIFT feature descriptors for each image;
[0038] SIFT feature descriptors are extracted from both images, an index of the feature descriptors is constructed using FLANN, and a nearest neighbor search is performed to find the best match for each feature descriptor.
[0039] Furthermore, S15 is specifically:
[0040] ① Use RANSAC to calculate the homography matrix. For a set of matching feature point pairs (xi, xi′), a preset number of points are randomly selected from the matching point pairs to calculate the homography matrix;
[0041] ② Calculate the reprojection error of all point pairs and determine which point pairs conform to the model;
[0042] ③ Repeat steps ①-② until the model with the most internal points is found and the optimal homography matrix is obtained;
[0043] ④Use the optimal homography matrix for perspective transformation;
[0044] ⑤ Perform basic superposition and splicing of the images aligned after perspective transformation;
[0045] ⑥ Construct a Gaussian pyramid for the images aligned after perspective transformation;
[0046] ⑦ Construct a Laplacian pyramid by differentiating adjacent layers of the Gaussian pyramid; perform weighted fusion on the Laplacian pyramid layers of all images, reconstruct from the fused Laplacian pyramid, smooth the stitching edges of the basic superposition stitching, eliminate the seams, and obtain the final stitching image.
[0047] Furthermore, S2 is specifically:
[0048] S21: Collect slag image data, including different types and features, use LabelImg to annotate images, and construct training and test sets;
[0049] S22: Select ResNet as the model basis, load its pre-trained parameters, set the parameters of all convolutional layers so that gradient updates do not need to be calculated; replace the last fully connected layer of the model with a new layer to adapt the number of output categories for the slag waste classification task;
[0050] S23: Train the model based on the training set. In each epoch, traverse the training data, calculate the loss and update the weight to obtain the final slag waste classification model.
[0051] Furthermore, S22 is specifically:
[0052] The ResNet convolutional layer calculates the basic unit of each output feature map, and the formula is as follows:
[0053] ;
[0054] in, is the value of the output feature map; is the pixel value of the input feature map; is the weight parameter of the convolution kernel; is the channel index of the convolution kernel; Represents the position index of the feature map; M, N represent the height and width of the convolution kernel respectively; (m, n) is the spatial position index of the convolution kernel;
[0055] ResNet's residual block uses shortcut connections:
[0056] ;
[0057] in, is the change obtained through the convolutional layer, is the input of the residual connection;
[0058] Use ReLU as the activation function:
[0059] ReLU(x')=max(0,x')
[0060] In the modified fully connected layer, according to the number of categories C of the problem, the output is defined as:
[0061] ;
[0062] ;
[0063] in, For the Linear combination output of classes; is the element of the weight matrix, connecting the first Features to the current layer The weights of the output nodes; is the output feature of the second-to-last layer eigenvalues; for The bias term of the output node; d is the number of output features of the second-to-last layer; For the The predicted probability of the class; The exponential sum of scores for all possible categories;
[0064] During the training process, cross entropy loss is used for multi-category classification, and the optimization algorithm Adam is used to update the parameters.
[0065] Furthermore, the slag classification confirmation model is constructed based on CNN and SVM, as follows:
[0066] Collect various types of slag images to ensure the diversity of the dataset, and expand the dataset based on random cropping, rotation, flipping, and color jittering;
[0067] Using the augmented dataset to train a CNN model, the CNN is based on a pre-trained VGG model, fine-tuning the last few layers of the model on the augmented dataset, extracting features based on the middle and last layers, extracting feature vectors from the output of the convolutional layer in the middle layer of the model, and obtaining high-level abstract features from the last layer to form a comprehensive feature vector;
[0068] Take the feature vector extracted by the CNN model as input and train the SVM model;
[0069] The optimal SVM kernel parameters and regularization parameters were selected through cross-validation, and a slag classification confirmation model was constructed based on the trained CNN model and SVM model.
[0070] Furthermore, the SVM model is as follows:
[0071] Use Gaussian kernel function to map features to high-dimensional space:
[0072] ;
[0073] in, Respectively and input feature vector; To calculate the squared Euclidean distance between two eigenvectors; is the bandwidth parameter of the Gaussian kernel;
[0074] In SVM, the objective function is:
[0075] ;
[0076] in, is the weight vector, defining the direction of the hyperplane; is the bias term; is the square of the second norm of the weight vector; is the regularization parameter; is the slack variable; is the total number of samples in the training data set;
[0077] Constraints:
[0078] ;
[0079] in, For the The labels of the input feature vectors; For the The high-dimensional features after the input feature vector is mapped by the kernel function; the superscript T represents transposition.
[0080] Furthermore, S5 is specifically:
[0081] S51: Based on the classification confirmation result, the wrongly classified slag waste is subjected to secondary fine sorting, and the wrongly classified samples and their characteristics are recorded;
[0082] S52: Feedback the misclassified samples to the system to update the training data set of the slag waste classification model;
[0083] S53: Regularly retrain the slag waste classification model and use new data to improve the accuracy of the model.
[0084] The present invention has the following beneficial effects:
[0085] 1. The present invention can not only improve the accuracy and efficiency of slag waste identification and sorting, but also enhance the flexibility and adaptability of the system, ensuring stable operation under different environments and conditions;
[0086] 2. The present invention accurately extracts feature points in the image based on SIFT, uses FLANN for fast and efficient feature matching, and then uses the RANSAC algorithm for robust homography matrix estimation, effectively filters out erroneous matching, ensures accurate alignment of the image, and accurately aligns through homography transformation to solve angle and perspective differences. Finally, Laplace pyramid fusion is used to obtain high-quality, seamlessly spliced images of the slag garbage conveyor belt, providing high-quality image data for subsequent recognition, which is helpful for accurate slag garbage detection and analysis under various environmental conditions;
[0087] 3. The present invention drives the robotic arm to realize the preliminary sorting of slag through the recognition results. The image acquisition device added at the classification collection point provides a secondary confirmation mechanism to ensure the classification accuracy and reduce the occurrence of misclassification. Through the secondary sorting step, higher sorting accuracy and quality are achieved. Additional processing is performed on slag types that are difficult to distinguish. The feedback loop mechanism set can dynamically correct recognition errors, allowing the model to be continuously improved through experience, and adjust the sorting parameters to improve the overall operation efficiency of the system. BRIEF DESCRIPTION OF THE DRAWINGS
[0088] Figure 1 is a flow chart of the method of the present invention;
[0089] Figure 2 A schematic diagram of an image acquisition and processing flow in one embodiment of the present invention;
[0090] Figure 3 Schematic diagram of the feedback adjustment process in one embodiment of the present invention. DETAILED DESCRIPTION
[0091] The present invention is further described in detail below with reference to the accompanying drawings and specific embodiments:
[0092] refer to Figure 1 In this embodiment, a slag waste treatment method based on image recognition is provided, comprising the following steps:
[0093] S1: A number of high-resolution image acquisition devices are arranged above the slag garbage conveyor belt to realize continuous monitoring of the flowing slag, and the acquired images are pre-processed, and images at different angles are spliced to obtain real-time monitoring spliced images;
[0094] S2: Construct a slag waste classification model based on machine learning algorithm;
[0095] S3: According to the slag waste classification model and the real-time monitoring splicing image, different types of slag are identified, and according to the identification results, a control signal is sent to the actuator to drive the robotic arm to sort out the slag, and different types of slag are preliminarily sorted;
[0096] S4: At each classification collection point, an image acquisition device is provided to obtain real-time images of the classification collection point, and to perform classification confirmation based on the slag classification confirmation model;
[0097] S5: Based on the classification confirmation results, secondary fine sorting is carried out, and the recognition errors are corrected through the feedback loop to adjust the sorting process.
[0098] In this embodiment, S1 is specifically:
[0099] S11: Install several high-resolution industrial cameras at different angles above the slag waste conveyor belt to cover the entire width and length of the conveyor belt. The angles and positions of each camera should ensure that the field of view overlaps;
[0100] S12: Use a synchronous trigger mechanism to ensure that all cameras shoot at the same time and set the camera frame rate according to the speed of the conveyor belt;
[0101] S13: Preprocess the image, use Gaussian filtering to remove noise in the image, and dynamically adjust the brightness and contrast of the image according to ambient light conditions;
[0102] S14: Use SIFT algorithm to detect feature points in the image, and use FLANN to match feature points;
[0103] S15: Use the RANSAC algorithm to calculate the homography matrix, and use the homography matrix to perform perspective transformation on the image, align the images at different angles, and then stitch them together, and use the Laplacian pyramid fusion algorithm to smooth the stitching edges and eliminate seams.
[0104] In this embodiment, S13 is specifically:
[0105] Set the size and standard deviation σ of the Gaussian kernel and construct the Gaussian kernel function:
[0106] ;
[0107] Among them, (i, j) is the coordinate of the Gaussian kernel;
[0108] Convolve the image I(x,y) to get the filtered image :
[0109] ;
[0110] where k is the radius of the nucleus;
[0111] Extract the average brightness value L from the image avg, And according to the target brightness range [L min ,L max Adjust brightness:
[0112] ;
[0113] Where ΔB is the brightness adjustment value, k B is the brightness adjustment coefficient, L target is the target brightness value;
[0114] Calculating contrast adjustment values :
[0115] ;
[0116] in, is the contrast adjustment factor;
[0117] The brightness and contrast of the image are adjusted based on the brightness adjustment value and the contrast adjustment value.
[0118] In this embodiment, S14 is specifically:
[0119] Grayscale the preprocessed image, and perform multi-scale Gaussian blur on the grayscale image to generate a scale space;
[0120] Calculate the difference of adjacent Gaussian blurred images and detect local extreme points in the DoG pyramid; check whether each pixel is a local extreme point by comparing it with the 26 pixels in its neighborhood;
[0121] Use Taylor expansion to accurately locate the detected extreme points and remove low-contrast points and edge response points:
[0122] Calculate the gradient direction histogram of the key point neighborhood and assign the main direction to make the feature rotation invariant;
[0123] Construct SIFT feature description around key points to obtain SIFT feature descriptors for each image;
[0124] SIFT feature descriptors are extracted from both images, an index of the feature descriptors is constructed using FLANN, and a nearest neighbor search is performed to find the best match for each feature descriptor.
[0125] In this embodiment, S15 is specifically:
[0126] ① Use RANSAC to calculate the homography matrix. For a set of matching feature point pairs (xi,xi′), randomly select a preset number of points (at least 4 pairs) from the matching point pairs to calculate the homography matrix;
[0127] ② Calculate the reprojection error of all point pairs and determine which point pairs conform to the model (i.e., inliers);
[0128] ③ Repeat steps ①-② until the model with the most internal points is found and the optimal homography matrix is obtained;
[0129] ④Use the optimal homography matrix for perspective transformation;
[0130] ⑤ Perform basic superposition and splicing of the images aligned after perspective transformation;
[0131] ⑥ Construct a Gaussian pyramid for the images aligned after perspective transformation;
[0132] ⑦ Construct a Laplacian pyramid by differentiating adjacent layers of the Gaussian pyramid; perform weighted fusion on the Laplacian pyramid layers of all images, reconstruct from the fused Laplacian pyramid, smooth the stitching edges of the basic superposition stitching, eliminate the seams, and obtain the final stitching image.
[0133] In this embodiment, S2 is specifically:
[0134] S21: Collect slag image data, including different types and features such as size, color, and surface texture, use tools such as LabelImg to annotate images, and build training and test sets; multi-class data including labels;
[0135] S22: Select ResNet as the model basis, load its pre-trained parameters, set the parameters of all convolutional layers so that gradient updates do not need to be calculated; replace the last fully connected layer of the model with a new layer to adapt the number of output categories for the slag waste classification task;
[0136] S23: Train the model based on the training set. In each epoch, traverse the training data, calculate the loss and update the weight to obtain the final slag waste classification model.
[0137] In this embodiment, S22 is specifically:
[0138] The ResNet convolutional layer calculates the basic unit of each output feature map, and the formula is as follows:
[0139] ;
[0140] in, is the value of the output feature map; is the pixel value of the input feature map; is the weight parameter of the convolution kernel; is the channel index of the convolution kernel; Represents the position index of the feature map; M, N represent the height and width of the convolution kernel respectively; (m, n) is the spatial position index of the convolution kernel;
[0141] ResNet's residual block uses shortcut connections:
[0142] ;
[0143] in, is the change obtained through the convolutional layer, is the input of the residual connection;
[0144] Use ReLU as the activation function:
[0145] ReLU )=max(0, )
[0146] In the modified fully connected layer, according to the number of categories C of the problem, the output is defined as:
[0147] ;
[0148] ;
[0149] in, For the Linear combination output of classes; is the element of the weight matrix, connecting the first Features to the current layer The weights of the output nodes; is the output feature of the second-to-last layer eigenvalues; for The bias term of the output node; d is the number of output features of the second-to-last layer; For the The predicted probability of the class; The exponential sum of scores for all possible categories;
[0150] During the training process, cross entropy loss is used for multi-category classification, and the optimization algorithm Adam is used to update the parameters.
[0151] In this embodiment, the slag classification confirmation model is constructed based on CNN and SVM, as follows:
[0152] Collect various types of slag images to ensure the diversity of the dataset, and expand the dataset based on random cropping, rotation, flipping, and color jittering;
[0153] Using the augmented dataset to train a CNN model, the CNN is based on a pre-trained VGG model, fine-tuning the last few layers of the model on the augmented dataset, extracting features based on the middle and last layers, extracting feature vectors from the output of the convolutional layer in the middle layer of the model, and obtaining high-level abstract features from the last layer (such as a fully connected layer or a global average pooling layer) to form a comprehensive feature vector;
[0154] Take the feature vector extracted by the CNN model as input and train the SVM model;
[0155] The optimal SVM kernel parameters and regularization parameters were selected through cross-validation, and a slag classification confirmation model was constructed based on the trained CNN model and SVM model.
[0156] In this embodiment, the SVM model is as follows:
[0157] Use Gaussian kernel function to map features to high-dimensional space:
[0158] ;
[0159] in, Respectively and input feature vector; To calculate the squared Euclidean distance between two eigenvectors; is the bandwidth parameter of the Gaussian kernel;
[0160] In SVM, the objective function is:
[0161] ;
[0162] in, is the weight vector, defining the direction of the hyperplane; is the bias term; is the square of the second norm of the weight vector; is the regularization parameter; is the slack variable; is the total number of samples in the training data set;
[0163] Constraints:
[0164] ;
[0165] in, For the The labels of the input feature vectors; For the The high-dimensional features after the input feature vector is mapped by the kernel function; the superscript T represents transposition.
[0166] In this embodiment, S5 is specifically:
[0167] S51: Based on the classification confirmation result, the wrongly classified slag waste is subjected to secondary fine sorting, and the wrongly classified samples and their characteristics are recorded;
[0168] S52: Feedback the misclassified samples to the system to update the training data set of the slag waste classification model;
[0169] S53: Regularly retrain the slag waste classification model and use new data to improve the accuracy of the model.
[0170] It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Furthermore, the present invention may take the form of a computer program product implemented 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.
[0171] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0172] These computer program instructions may also be stored in a computer readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0173] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process in the computer or other programmable device. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0174] The above is only a preferred embodiment of the present invention, and does not limit the present invention in other forms. Any technician familiar with the profession may use the above disclosed technical content to change or modify it into an equivalent embodiment with equivalent changes. However, any simple modification, equivalent change and modification made to the above embodiment according to the technical essence of the present invention without departing from the technical solution of the present invention still belongs to the protection scope of the technical solution of the present invention.
Claims
1. A slag waste treatment method based on image recognition, characterized in that: The following steps are involved: S1: A number of high-resolution image acquisition devices are arranged above the slag garbage conveyor belt to realize continuous monitoring of the flowing slag, and the acquired images are pre-processed, and images at different angles are spliced to obtain real-time monitoring spliced images; S2: Construct a slag waste classification model based on machine learning algorithm; S3: According to the slag waste classification model and the real-time monitoring splicing image, different types of slag are identified, and according to the identification results, a control signal is sent to the actuator to drive the robotic arm to sort out the slag, and different types of slag are preliminarily sorted; S4: At each classification collection point, an image acquisition device is provided to obtain real-time images of the classification collection point, and to perform classification confirmation based on the slag classification confirmation model; S5: Based on the classification confirmation results, secondary fine sorting is performed, and the recognition errors are corrected through the feedback loop to adjust the sorting process; The S2 is specifically: S21: Collect slag image data, including different types and features, use LabelImg to annotate images, and construct training and test sets; S22: Select ResNet as the model basis, load its pre-trained parameters, set the parameters of all convolutional layers so that gradient updates do not need to be calculated; replace the last fully connected layer of the model with a new layer to adapt the number of output categories for the slag waste classification task; S23: Train the model based on the training set. In each epoch, traverse the training data, calculate the loss and update the weight to obtain the final slag waste classification model; The S22 is specifically: The ResNet convolutional layer calculates the basic unit of each output feature map, and the formula is as follows: ; in, is the value of the output feature map; is the pixel value of the input feature map; is the weight parameter of the convolution kernel; is the channel index of the convolution kernel; Represents the position index of the feature map; M, N represent the height and width of the convolution kernel respectively; (m, n) is the spatial position index of the convolution kernel; ResNet's residual block uses shortcut connections: ; in, is the change obtained through the convolutional layer, is the input of the residual connection; Use ReLU as the activation function: ReLU(x')=max(0,x') In the modified fully connected layer, according to the number of categories C of the problem, the output is defined as: ; ; in, For the Linear combination output of classes; is the element of the weight matrix, connecting the first Features to the current layer The weights of the output nodes; is the output feature of the second-to-last layer eigenvalues; for The bias term of the output node; d is the number of output features of the second-to-last layer; For the The predicted probability of the class; The exponential sum of scores for all possible categories; During the training process, cross entropy loss is used for multi-category classification, and the optimization algorithm Adam is used to update the parameters; The slag classification confirmation model is built based on CNN and SVM, as follows: Collect various types of slag images to ensure the diversity of the dataset, and expand the dataset based on random cropping, rotation, flipping, and color jittering; Using the augmented dataset to train a CNN model, the CNN is based on a pre-trained VGG model, fine-tuning the last few layers of the model on the augmented dataset, extracting features based on the middle and last layers, extracting feature vectors from the output of the convolutional layer in the middle layer of the model, and obtaining high-level abstract features from the last layer to form a comprehensive feature vector; The comprehensive feature vector extracted by the CNN model is used as input to train the SVM model; The optimal SVM kernel parameters and regularization parameters were selected through cross-validation, and a slag classification confirmation model was constructed based on the trained CNN model and SVM model. The SVM model is specifically as follows: Use Gaussian kernel function to map features to high-dimensional space: ; in, Respectively and input feature vector; To calculate the squared Euclidean distance between two eigenvectors; is the bandwidth parameter of the Gaussian kernel; In SVM, the objective function is: ; in, is the weight vector, defining the direction of the hyperplane; is the bias term; is the square of the second norm of the weight vector; is the regularization parameter; is the slack variable; is the total number of samples in the training data set; Constraints: ; in, For the The labels of the input feature vectors; For the The high-dimensional features after the input feature vector is mapped by the kernel function; the superscript T represents transposition; The S5 is specifically: S51: Based on the classification confirmation result, the wrongly classified slag waste is subjected to secondary fine sorting, and the wrongly classified samples and their characteristics are recorded; S52: Feedback the misclassified samples to the system to update the training data set of the slag waste classification model; S53: Regularly retrain the slag waste classification model and use new data to improve the accuracy of the model.
2. A slag waste treatment method based on image recognition according to claim 1, characterized in that: The S1 is specifically: S11: Install several high-resolution industrial cameras at different angles above the slag waste conveyor belt to cover the entire width and length of the conveyor belt. The angles and positions of each camera should ensure that the field of view overlaps; S12: Use a synchronous trigger mechanism to ensure that all cameras shoot at the same time and set the camera frame rate according to the speed of the conveyor belt; S13: Preprocess the image, use Gaussian filtering to remove noise in the image, and dynamically adjust the brightness and contrast of the image according to ambient light conditions; S14: Use SIFT algorithm to detect feature points in the image, and use FLANN to match feature points; S15: Use the RANSAC algorithm to calculate the homography matrix, and use the homography matrix to perform perspective transformation on the image, align the images at different angles, and then stitch them together, and use the Laplacian pyramid fusion algorithm to smooth the stitching edges and eliminate seams.
3. A slag waste treatment method based on image recognition according to claim 2, characterized in that: The S13 is specifically: Set the size and standard deviation σ of the Gaussian kernel and construct the Gaussian kernel function: ; Among them, (i, j) is the coordinate of the Gaussian kernel; Convolve the image I(x,y) to get the filtered image : ; where k is the radius of the nucleus; Extract the average brightness value L from the image avg, And according to the target brightness range [L min ,L max Adjust brightness: ; Where ΔB is the brightness adjustment value, k B is the brightness adjustment coefficient, L target is the target brightness value; Calculating contrast adjustment values : ; in, is the contrast adjustment factor; The brightness and contrast of the image are adjusted based on the brightness adjustment value and the contrast adjustment value.
4. The slag waste treatment method based on image recognition according to claim 2 is characterized in that: The S14 is specifically: Grayscale the preprocessed image, and perform multi-scale Gaussian blur on the grayscale image to generate a scale space; Calculate the difference between adjacent Gaussian blurred images and detect local extreme points in the DoG pyramid; Use Taylor expansion to accurately locate the detected extreme points and remove low-contrast points and edge response points: Calculate the gradient direction histogram of the key point neighborhood and assign the main direction to make the feature rotation invariant; Construct SIFT feature description around key points to obtain SIFT feature descriptors for each image; SIFT feature descriptors are extracted from both images, an index of the feature descriptors is constructed using FLANN, and a nearest neighbor search is performed to find the best match for each feature descriptor.
5. The slag waste treatment method based on image recognition according to claim 2 is characterized in that: The S15 is specifically: ① Use RANSAC to calculate the homography matrix. For a set of matching feature point pairs (xi, xi′), a preset number of points are randomly selected from the matching point pairs to calculate the homography matrix; ② Calculate the reprojection error of all point pairs and determine which point pairs conform to the model; ③ Repeat steps ①-② until the model with the most internal points is found and the optimal homography matrix is obtained; ④Use the optimal homography matrix for perspective transformation; ⑤ Perform basic superposition and splicing of the images aligned after perspective transformation; ⑥ Construct a Gaussian pyramid for the images aligned after perspective transformation; ⑦ Construct a Laplacian pyramid by differentiating adjacent layers of the Gaussian pyramid; perform weighted fusion on the Laplacian pyramid layers of all images, reconstruct from the fused Laplacian pyramid, smooth the stitching edges of the basic superposition stitching, eliminate the seams, and obtain the final stitching image.
Citation Information
Patent Citations
Garbage pickup robot based on visual semantic SLAM (simultaneous localization and mapping)
CN111360780A
Method for automatically classifying garbage
CN112241679A