Intelligent Classification Method for Recycling Metals Based on Spark Streaming Video Dynamic Analysis

Through dynamic analysis of spark stream video, real-time metal classification is used using YOLOv8 and bidirectional LSTM models, the problem of low efficiency in scrap metal classification in complex industrial scenarios is solved, and efficient and real-time metal sorting is achieved.

CN120182736BActive Publication Date: 2025-07-18FUJIAN ZENGZHI ENVIRONMENTAL PROTECTION TECH CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510670471.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-05-23
Publication Date
2025-07-18
Estimated Expiration
2045-05-23

AI Technical Summary

Technical Problem

The existing technology is difficult to realize real-time efficient classification of scrap metals in complex industrial scenarios. The traditional sorting method is inefficient and has a high error rate, which cannot meet the needs of high-frequency metal recycling lines.

Method used

Using a method based on spark stream video dynamic analysis, spark stream video is collected through high-speed cameras, the spark region is detected using the YOLOv8 model and the segmentation results are optimized. The metal classification model is constructed in combination with the bidirectional LSTM model, and deployed to a lightweight inference architecture for real-time classification.

Benefits of technology

It realizes efficient online classification of scrap metals, reduces labor costs, adapts to complex industrial scenarios, and improves classification efficiency and accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120182736B_ABST
    Figure CN120182736B_ABST
Patent Text Reader

Abstract

The present invention relates to an intelligent classification method for recycling and reusing metals based on dynamic analysis of spark flow videos, comprising the following steps: S1: Collecting spark flow videos through a high-speed camera; S2: Selecting key frames, detecting and optimizing the spark regions in the videos using a pre-trained YOLOv8 model; S3: Storing the information of each frame of the spark regions as sequence data according to the segmentation results; S4: Extracting the dynamic features of the sparks based on the spark sequence data to construct a training dataset; S5: Constructing a metal classification model based on a bidirectional LSTM model and training it based on the training dataset; S6: Deploying the trained metal classification model to a lightweight inference architecture to achieve real-time inference, and outputting the metal classification results according to the real-time video data of the sparks; and transmitting the metal classification results to the garbage recycling system in real time. The method of classifying spark flows through video dynamic analysis in the present invention can significantly improve the classification efficiency of different materials in waste metals.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of image recognition, and particularly to an intelligent classification method for recycled metals based on dynamic analysis of spark flow videos. Background Art

[0002] In the process of waste resource recycling and circular utilization, the accurate classification of metal materials is an important link to achieve efficient resource recovery. However, due to the mixed distribution of different metals in waste, traditional sorting methods (such as those based on density, magnetism, or manual screening) are inefficient and have a high error rate, making it difficult to meet the needs of industrial development. In recent years, the analysis of spark flow characteristics has become an emerging method for metal classification. By using the differences in the spark morphology, color, trajectory, and dynamic characteristics generated by different metals during the grinding process, various metals can be effectively distinguished. However, the existing technology has difficulty meeting the real-time requirements in complex industrial scenarios. Especially in high-frequency metal recycling production lines, manual classification or the delay of existing classification systems will seriously affect the overall efficiency. Summary of the Invention

[0003] In order to solve the above problems, the purpose of the present invention is to provide an intelligent classification method for recycled metals based on dynamic analysis of spark flow videos, which can achieve efficient online classification and resource sorting of metals in complex scenarios, effectively improve the efficiency of resource recycling, and reduce labor costs.

[0004] To achieve the above purpose, the present invention adopts the following technical solutions:

[0005] An intelligent classification method for recycled metals based on dynamic analysis of spark flow videos, comprising the following steps:

[0006] S1: Collect spark flow videos through a high-speed camera;

[0007] S2: Decompose the spark flow videos into frame-by-frame images, select key frames, use a pre-trained YOLOv8 model to detect the spark regions in the videos, generate spark region segmentation results, and add median filtering and morphological operations to optimize the spark region segmentation results;

[0008] S3: According to the segmentation results, store the information of each frame of the spark region as sequence data;

[0009] S4: Extract the dynamic features of the sparks according to the spark sequence data, associate the dynamic features of the sparks with the time series, generate feature vectors, and construct a training dataset;

[0010] S5: Build a metal classification model based on a bidirectional LSTM model and train it based on the training dataset;

[0011] S6: Deploy the trained metal classification model to the lightweight inference architecture, output the metal classification result according to the real-time video data of the sparks, and transmit the metal classification result to the garbage collection system in real time.

[0012] Further, S1 is specifically: Use a high-speed industrial camera with a frame rate set to 240 fps to ensure capturing the dynamic information of the rapidly spreading spark stream, and install a dust-proof glass and a stable light source filter to avoid the influence of dust and stray light in the industrial environment;

[0013] Trigger the shooting through the force sensor on the grinding equipment and automatically record when sparks are generated during grinding;

[0014] Collect the spark stream videos under various metals, different grinding conditions, and background scenes.

[0015] Further, decompose the spark stream video into frame-by-frame images and select key frames, specifically as follows:

[0016] Let the input spark stream video be V, with a total of T frames and a frame rate of f. Decompose the video into a frame sequence: {F1, F2, …, F t , …, F T}, and the t-th frame is the image F t ;

[0017] Based on the dynamic characteristics of the sparks, select the frames with the strongest brightness and motion as key frames, and calculate the average brightness L(F t ) of each frame:

[0018] ;

[0019] where H and W are the height and width of the frame image, and F t (i, j) represents the pixel value, and i and j are the row and column indices of the pixel point;

[0020] Select the frames with a brightness change greater than the threshold O :

[0021]

[0022] where is the adjustment factor for the selection ratio, and is the brightness threshold.

[0023] Further, use the deep learning model YOLOv8 to detect the spark regions in the video, separate them from the background environment, generate a binary mask of the sparks, and add median filtering and morphological operations to optimize the spark region segmentation result:

[0024] Use the pre-trained YOLOv8 model to detect the spark area in the frame image and generate the bounding box of the spark target:

[0025] Given the input frame image F t , output the target box , where x and y are the center coordinates of the detection box, and w and h are the width and height; use the box information B t Cut the spark area on the image:

[0026] ;

[0027] Among them, represents a target boxes; M is the total number of target boxes;

[0028] Grayscale the image, and perform threshold segmentation on the grayscale image G t (i,j) to generate a binary mask M in the spark area t :

[0029] ;

[0030] Among them, τ is the threshold;

[0031] Perform median filtering on the binary mask M of the spark area t to remove small-area noise and smooth the edge of the spark area:

[0032] ;

[0033] Among them, MedianFilter represents the median filter, and k is the filter window size; is the binary mask after median filtering;

[0034] Through the dilation operation, increase the thickness of the boundary of the spark area and connect the possibly disconnected particles:

[0035] ;

[0036] Among them, K is the structuring element; ⊕ represents the dilation operation; is the binary mask output after the dilation operation;

[0037] Finally, use the erosion operation to remove the noise points and retain the main spark area:

[0038] ;

[0039] Among them, is the erosion operation;

[0040] Result is the finally optimized spark area.

[0041] Further, according to the segmentation result, the information of the spark region in each frame is stored as sequence data, specifically as follows:

[0042] Based on the finally optimized spark region, find the minimum bounding rectangle of the spark region and calculate the maximum length L t :

[0043] ;

[0044] Among them, is a point pair in the set of contour points ;

[0045] Count the number of pixels in the spark part of the binary mask and calculate the area A t :

[0046] ;

[0047] Calculate the centroid C of the spark region t :

[0048] ;

[0049] Organize the features of the spark region in each frame into a sequence to form the spark sequence data in the time dimension:

[0050] .

[0051] Further, extract the dynamic features of the spark according to the spark sequence data, including the spark length feature, the motion trajectory of the spark particles, the diffusion angle and the brightness feature, specifically as follows:

[0052] For the finally optimized spark region , calculate the centroid C t to each edge point vector :

[0053] ;

[0054] Among them, is the coordinate of the edge point ; (x t , y t ) is the coordinate of the centroid C of the spark region at time step t t ;

[0055] Calculate the angle between all pairs of vectors :

[0056] ;

[0057] Among them, is an edge point vector;

[0058] Take the maximum included angle as the diffusion angle :

[0059] ;

[0060] For the original grayscale image G of the finally optimized spark region , calculate the average brightness of the spark region t : C t :

[0061] ;

[0062] Calculate the standard deviation of the spark brightness as the brightness feature, reflecting the volatility of the brightness:

[0063] ;

[0064] Associate the above features with the time series to generate the feature vector of each frame :

[0065] ;

[0066] Among them, is the total trajectory length, v t is the moving speed of the spark centroid; a t is the acceleration of the spark centroid.

[0067] Furthermore, a metal classification model is constructed based on the bidirectional LSTM model, specifically as follows:

[0068] Use bidirectional LSTM to process time series features , capturing the forward and backward dependencies of the time series;

[0069] ;

[0070] Among them, is the forward memory unit at time t in the bidirectional LSTM; is the backward memory unit at time t in the bidirectional LSTM; is the forward hidden state at time t; is the backward hidden state at time t; LSTM fw is the forward LSTM; LSTM bw is the backward LSTM;

[0071] The output of the bidirectional LSTM is the forward hidden state and the backward hidden state concatenation:

[0072] h t = , ;

[0073] Add an attention mechanism to the output of the bidirectional LSTM to dynamically select the frames in the time series that are most important for classification, and calculate the attention weight α t :

[0074] ;

[0075] where tanh is the activation function; W a , b a are the weight and bias respectively; e t is the attention score at the current time t;

[0076] The weighted sum gives the global feature F of the time series attn :

[0077] ;

[0078] Input the global feature F attn into the fully connected layer, and output the classification result y:

[0079] ;

[0080] where Softmax is the activation function, W B is the weight of the fully connected layer, and b is the bias.

[0081] Furthermore, the training of the metal classification model is as follows:

[0082] Train based on the training feature dataset and optimize the model using the cross-entropy loss function:

[0083]

[0084] where, is the number of metal categories, is the true label of the th sample; is the probability that the th sample predicted by the model is the th class, and N' is the total number of samples;

[0085] Use the Adam optimizer and add a learning rate decay strategy:

[0086] ;

[0087] Among them, λ is the attenuation rate; is the learning rate;

[0088] Dropout is added to the LSTM layer and the fully connected layer to prevent overfitting, and a weight regularization term is added to the loss function.

[0089] Furthermore, S6 is specifically as follows:

[0090] Deploy the metal classification model on the TensorRT inference architecture, analyze the metal spark stream, and output the classification result;

[0091] Use the communication protocol to transmit the classification result to the resource sorting system in real time;

[0092] After receiving the classification signal, the central control system converts the classification information into an execution instruction to connect to the robotic arm or sorting device;

[0093] According to the transmitted metal classification result, guide the robotic arm or sorting equipment to divert different types of metals and complete resource classification.

[0094] The present invention has the following beneficial effects:

[0095] 1. The method of dynamically analyzing and classifying the spark stream through video in the present invention can significantly improve the classification efficiency of different materials in waste metals, transform the traditional method based on physical and chemical analysis into a non-contact, efficient, and real-time intelligent classification method, reduce the recycling cost, and adapt to complex industrial scenarios;

[0096] 2. The present invention uses the YOLOv8 model for spark region detection, can quickly identify the spark region and generate a segmentation result, uses median filtering and morphological operations to optimize the segmentation result, removes noise and artifacts, ensures the clear boundary of the spark region, improves the robustness of spark region detection, and provides a higher-quality input for subsequent dynamic feature extraction;

[0097] 3. By decomposing the spark stream video frame by frame and extracting the dynamic features of the spark (such as brightness, diffusion angle, centroid movement speed, trajectory length, etc.), the present invention can comprehensively describe the physical and dynamic characteristics of the spark stream, associate the spark region information with the time series, capture the dynamic law of the spark changing with time, and make up for the limitations of single-frame image information. BRIEF DESCRIPTION OF THE DRAWINGS

[0098] Figure 1 is the flowchart of the method of the present invention. DETAILED DESCRIPTION OF THE INVENTION

[0099] The following further describes the present invention in detail with reference to the drawings and specific embodiments:

[0100] ReferenceFigure 1 , in this embodiment, a metal intelligent classification method for recycling based on dynamic analysis of spark stream video is provided, including the following steps:

[0101] S1: Collect the spark stream video through a high-speed camera;

[0102] S2: Decompose the spark stream video into frame-by-frame images, select key frames, use the pre-trained YOLOv8 model to detect the spark area in the video, generate the spark area segmentation result, and add median filtering and morphological operations to optimize the spark area segmentation result;

[0103] S3: According to the segmentation result, store the information of each frame of the spark area as sequence data;

[0104] S4: Extract the dynamic features of the spark according to the spark sequence data, associate the dynamic features of the spark with the time series, generate feature vectors, and construct a training dataset;

[0105] S5: Build a metal classification model based on the bidirectional LSTM model and train it based on the training dataset;

[0106] S6: Deploy the trained metal classification model to a lightweight inference architecture to achieve real-time inference. According to the real-time video data of the spark, output the metal classification result; and send the metal classification result to the garbage recycling system in real time to guide the robotic arm or sorting device to perform resource classification, so as to achieve online classification and resource sorting.

[0107] In this embodiment, S1 is specifically: Use a high-speed industrial camera with a frame rate set to 240 fps or higher to ensure capturing the dynamic information of the rapid diffusion of the spark stream, and install a dust-proof glass and a stable light source filter to avoid the influence of dust and stray light in the industrial environment;

[0108] Trigger the shooting through the force sensor on the grinding device and automatically record when the spark is generated during grinding;

[0109] Collect the spark stream video under various metals (such as iron, aluminum, stainless steel), different grinding conditions (force, angle, rotation speed, etc.) and background scenes.

[0110] In this embodiment, decomposing the spark stream video into frame-by-frame images and selecting key frames are specifically as follows:

[0111] Let the input spark stream video be V, its total number of frames be T frames, and the frame rate be f. Decompose the video into a frame sequence: {F1, F2, …, F t , …, F T} The t-th frame is the image F t ;

[0112] Based on the dynamic characteristics of the sparks, select the frame with the strongest brightness and motion as the key frame, and calculate the average brightness L(F t ):

[0113] ;

[0114] where H and W are the height and width of the frame image, represents the pixel value, and i and j are the row and column indices of the pixel point;

[0115] Select the frames with a brightness change greater than the threshold O (such as the frames with a brightness one time higher than the global average brightness):

[0116]

[0117] where is the adjustment factor of the selection ratio, is the brightness threshold.

[0118] In this embodiment, use the deep learning model YOLOv8 to detect the spark area in the video, separate it from the background environment, generate a binary mask of the sparks, and add median filtering and morphological operations to further optimize the spark area segmentation result:

[0119] Use the pre-trained YOLOv8 model to detect the spark area in the frame image and generate the bounding box of the spark target:

[0120] Given the input frame image F t , output the target box , where x and y are the center coordinates of the detection box, and w and h are the width and height; use the box information B t Cut the spark area on the image:

[0121] ;

[0122] where represents a target boxes; M is the total number of target boxes;

[0123] Grayscale the image, perform threshold segmentation on the grayscale image G t (i,j) to generate a binary mask M in the spark area t :

[0124] ;

[0125] where τ is the threshold;

[0126] Perform median filtering on the binary mask M of the spark area t to remove small-area noise and smooth the edges of the spark area:

[0127] ;

[0128] Among them, MedianFilter represents the median filter, and k is the filter window size; is the binary mask after median filtering;

[0129] By performing a dilation operation, increase the thickness of the boundary of the spark region and connect the possibly disconnected particles:

[0130] ;

[0131] Among them, K is the structuring element; ⊕ represents the dilation operation; is the binary mask output after the dilation operation;

[0132] Finally, perform an erosion operation to remove the noise points and retain the main spark region:

[0133] ;

[0134] Among them, is the erosion operation;

[0135] Result is the finally optimized spark region.

[0136] In this embodiment, according to the segmentation result, the information of each frame of the spark region is stored as sequence data, specifically as follows:

[0137] According to the finally optimized spark region, find the minimum bounding rectangle of the spark region and calculate the maximum length L t :

[0138] ;

[0139] Among them, is the set of contour points in the point pairs;

[0140] Count the number of pixels in the spark part of the binary mask and calculate the area A t :

[0141] ;

[0142] Calculate the centroid C of the spark region t :

[0143] ;

[0144] Organize the features of each frame of the spark region into a sequence to form the spark sequence data in the time dimension:

[0145] .

[0146] In this embodiment, the dynamic features of the spark are extracted from the spark sequence data, including the spark length feature, the motion trajectory of the spark particles, the diffusion angle, and the brightness feature, as follows:

[0147] For the finally optimized spark region , calculate the centroid C t to each edge point vector :

[0148] ;

[0149] where is the coordinate of the edge point ; (x t , y t ) is the coordinate of the centroid C of the spark region at time step t t ;

[0150] Calculate the angle between all pairs of vectors :

[0151] ;

[0152] where is the vector of the edge point ;

[0153] Take the maximum angle as the diffusion angle :

[0154] ;

[0155] For the original grayscale image G of the finally optimized spark region , calculate the average brightness of the spark region t : C t :

[0156] ;

[0157] Calculate the standard deviation of the spark brightness as the brightness feature, reflecting the volatility of the brightness:

[0158] ;

[0159] Associate the above features with the time series to generate the feature vector of each frame :

[0160] ;

[0161] where is the total length of the trajectory, and v t is the moving speed of the spark centroid; a t is the acceleration of the spark centroid.

[0162] In this embodiment, a metal classification model is constructed based on a bidirectional LSTM model, specifically as follows:

[0163] Use bidirectional LSTM to process time series features , capturing the forward and backward dependencies of the time series;

[0164] ;

[0165] Among them, is the forward memory unit at time t in the bidirectional LSTM; is the backward memory unit at time t in the bidirectional LSTM; is the forward hidden state at time t; is the backward hidden state at time t; LSTM fw is the forward LSTM; LSTM bw is the backward LSTM;

[0166] The output of the bidirectional LSTM is the concatenation of the forward hidden state and the backward hidden state :

[0167] h t = , ;

[0168] Add an attention mechanism to the output of the bidirectional LSTM to dynamically select the most important frames for classification in the time series, and calculate the attention weight α t :

[0169] ;

[0170] Among them, tanh is the activation function; W a , b a are the weight and bias respectively; e t is the attention score at the current time t;

[0171] The weighted sum is used to obtain the global feature F of the time series attn :

[0172] ;

[0173] Input the global feature F attn into the fully connected layer, and output the classification result y:

[0174] ;

[0175] Among them, Softmax is the activation function, W B is the weight of the fully connected layer, and b is the bias.

[0176] In this embodiment, the metal classification model is trained as follows:

[0177] Based on the training feature dataset, the model is trained and optimized using the cross-entropy loss function:

[0178]

[0179] Among them, is the number of metal categories, is the true label of the th sample; is the probability that the th sample predicted by the model belongs to the th category, and N' is the total number of samples.

[0180]

[0181] ;

[0182] Among them, λ is the decay rate; is the learning rate;

[0183] Dropout (such as 0.5) is added to the LSTM layer and the fully connected layer to prevent overfitting, and a weight regularization term is added to the loss function.

[0184] In this embodiment, S6 is specifically:

[0185] Deploy the metal classification model to the TensorRT inference architecture to analyze the metal spark stream and output the classification results (such as "aluminum", "steel").

[0186] Use communication protocols (such as OPC UA, Modbus) to transmit the classification results (including metal categories and confidence levels) to the resource sorting system in real time;

[0187] After receiving the classification signal, the central control system converts the classification information into an execution instruction to connect to the robotic arm or sorting device;

[0188] According to the transmitted metal classification results, guide the robotic arm or sorting equipment to divert different types of metals to complete resource classification.

[0189] Those skilled in the art should understand that the embodiments of the present invention can be provided as a method, a system, or a computer program product. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present invention can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk memory, CD-ROM, optical memory, etc.) that contain computer-usable program code.

[0190] The present invention is described with reference to the flowcharts and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the present invention. It should be understood that each flow and / or block in the flowchart and / or block diagram can be implemented by computer program instructions, and the combination of the flows and / or blocks in the flowchart and / or block diagram can also be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing devices generate a device for implementing the functions specified in Figure 1 one flow or multiple flows and / or blocks Figure 1 one block or multiple blocks.

[0191] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer-readable memory generate a manufactured article including an instruction device, and the instruction device implements the functions specified in Figure 1 one flow or multiple flows and / or blocks Figure 1 one block or multiple blocks.

[0192] These computer program instructions can also be loaded onto a computer or other programmable data processing device, so that a series of operation steps are executed on the computer or other programmable device to generate a computer-implemented process. Therefore, the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in Figure 1 one flow or multiple flows and / or blocks Figure 1 one block or multiple blocks.

[0193] As mentioned above, the above are only the preferred embodiments of the present invention, and the present invention is not limited to other forms. Any person skilled in the art may use the disclosed technical content to make changes or modifications into equivalent embodiments with equivalent changes. However, any simple modification, equivalent change, and modification made to the above embodiments based on the technical essence of the present invention without departing from the technical content of the present invention still fall within the protection scope of the technical solution of the present invention.

Claims

1. A method for intelligent classification of recycled metals based on dynamic analysis of spark stream video, characterized in that, It includes the following steps: S1: Collect the spark stream video through a high-speed camera; S2: Decompose the spark stream video into frame-by-frame images, select key frames, use the pre-trained YOLOv8 model to detect the spark area in the video, generate the spark area segmentation result, and add median filtering and morphological operations to optimize the spark area segmentation result; S3: According to the segmentation result, store the information of each frame of the spark area as sequence data; S4: Extract the dynamic features of the spark according to the spark sequence data, associate the dynamic features of the spark with the time series, generate feature vectors, and construct a training data set; S5: Build a metal classification model based on the bidirectional LSTM model and train it based on the training data set; S6: Deploy the trained metal classification model to a lightweight inference architecture, output the metal classification result according to the real-time video data of the spark, and send the metal classification result to the garbage collection system in real time; The specific content of S1 is as follows: Use a high-speed industrial camera with a frame rate set to 240 fps to ensure capturing the dynamic information of the rapid diffusion of the spark stream, and install a dust-proof glass and a stable light source filter to avoid the influence of dust and stray light in the industrial environment; Trigger the shooting through the force sensor on the grinding device and automatically record when sparks are generated during grinding; Collect the spark stream video under various metals, different grinding conditions and background scenes; The decomposition of the spark stream video into frame-by-frame images and the selection of key frames are specifically as follows: Let the input spark stream video be V, with a total of T frames and a frame rate of f. The video is disassembled into a frame sequence: {F1, F2, …, F t , …, F T}, and the t-th frame is the image F t ; Based on the dynamic characteristics of the spark, select the frame with the strongest brightness and motion as the key frame, and calculate the average brightness L(F t ): ; where H and W are the height and width of the frame image, and F t (i, j) represents the pixel value, and i and j are the row and column indices of the pixel point; Select frames with a brightness change greater than the threshold O : ; Among them, is the adjustment factor for the selection ratio, is the brightness threshold; The extraction of the dynamic features of the spark according to the spark sequence data includes spark length features, spark particle movement trajectories, diffusion angles and brightness features, specifically as follows: For the finally optimized spark region , calculate the centroid C t to each edge point vector : ; Among them, is the coordinate of the edge point ; (x t , y t ) is the coordinate of the centroid C t of the spark region at time step t; Calculate the angles between all pairs of vectors : ; Among them, is the vector of the edge point . Take the maximum included angle as the diffusion angle : ; For the finally optimized spark region of the original grayscale image G t , calculate the average brightness of the spark region C t : ; Calculate the standard deviation of the spark brightness As a brightness feature, it reflects the volatility of brightness: ; Associate the above features with the time series to generate a feature vector for each frame : ; Among them, is the total length of the trajectory, and v t is the moving speed of the spark centroid; a t is the acceleration of the spark centroid.

2. The recycling and reuse metal intelligent classification method based on spark stream video dynamic analysis according to claim 1, wherein Use the deep learning model YOLOv8 to detect the spark area in the video, separate it from the background environment, generate a binary mask of the spark, and add median filtering and morphological operations to optimize the spark area segmentation result: Use the pre-trained YOLOv8 model to detect the spark area in the frame image and generate the bounding box of the spark target; Given the input frame image F t , output the target bounding box , where x and y are the center coordinates of the detection box, and w and h are the width and height; use the box information B t Cut the spark area on the image: ; Among them, represents the a-th target box; M is the total number of target boxes; Perform grayscale processing on the image to obtain the grayscale image G t Perform threshold segmentation on (i, j) to generate a binary mask M in the spark region t : ; where τ is the threshold; Perform median filtering on the binary mask M of the spark region t to remove small-area noise and smooth the edges of the spark region: ; Among them, MedianFilter represents the median filter, and k is the filter window size; is the binary mask after median filtering; Through the dilation operation, increase the thickness of the spark area boundary and connect the disconnected particles; ; where K is a structuring element; ⊕ represents the dilation operation; is the binary mask output after the dilation operation; Finally, use the erosion operation to remove the noise points and retain the spark area; ; Among them, is an etching operation; Result is the finally optimized spark region.

3. The recycling and reuse metal intelligent classification method based on spark stream video dynamic analysis according to claim 2, wherein The storage of the information of each frame of the spark area as sequence data according to the segmentation result is specifically as follows: According to the finally optimized spark region, find the minimum bounding rectangle of the spark region and calculate the maximum length L t : ; Among them, is a set of contour points in the point pairs; Count the number of pixels in the spark part of the binary mask and calculate the area A t : ; Calculate the centroid C of the spark region t : ; Organize the features of each frame of the spark area into a sequence to form the spark sequence data in the time dimension; 。 4. The intelligent classification method for recycled metals based on dynamic analysis of spark flow video according to claim 1, characterized in that The construction of the metal classification model based on the bidirectional LSTM model is specifically as follows: Processing time series features using bidirectional LSTM , capturing the forward and backward dependencies of the time series; ; Among them, is the forward memory unit at time t in the bidirectional LSTM; is the backward memory unit at time t in the bidirectional LSTM; is the forward hidden state at time t; is the backward hidden state at time t; LSTM fw is the forward LSTM; LSTM bw is the backward LSTM; The output of the bidirectional LSTM is the concatenation of the forward hidden state and the backward hidden state : h t =[ , ]; Add an attention mechanism to the output of the bidirectional LSTM to dynamically select the frames in the time series that are most important for classification and calculate the attention weights α t : ; where tanh is the activation function; W a , b a are the weight and bias respectively; e t is the attention score at the current time t; The global feature F of the time series is obtained by weighted summation attn : ; Input the global feature F attn into the fully connected layer, and output the classification result y: ; Among them, Softmax is the activation function, W B is the weight of the fully connected layer, and b is the bias.

5. The recycling and reuse metal intelligent classification method based on spark stream video dynamic analysis according to claim 4, characterized in that, The training of the metal classification model is specifically as follows: Train based on the training feature data set and optimize the model using the cross-entropy loss function; ; Among them, is the number of metal categories, is the true label of the th sample; is the probability that the th sample predicted by the model belongs to the th class, and N' is the total number of samples; Use the Adam optimizer and add a learning rate decay strategy; ; where λ is the attenuation rate; is the learning rate; Add Dropout to the LSTM layer and the fully connected layer to prevent overfitting, and add a weight regularization term to the loss function.

6. The recycling and reuse metal intelligent classification method based on spark stream video dynamic analysis according to claim 1, characterized in that, The specific content of S6 is as follows: Deploy the metal classification model to the TensorRT inference architecture, analyze the metal spark stream, and output the classification result; Use the communication protocol to transmit the classification result to the resource sorting system in real time; After receiving the classification signal, the central control system converts the classification information into an execution instruction to dock the robotic arm or sorting device; According to the classified results of the transmitted metals, guide the robotic arm or sorting equipment to divert different types of metals and complete resource classification.

Citation Information

Patent Citations

  • Coal mine smoke and fire detection method based on improved YOLOv8 and related device

    CN119919623A

  • Sorting pieces of material based on photonic emissions resulting from multiple sources of stimuli

    US7763820B1