Crushed material waste sorting method and system based on improved YOLOv8
By improving the YOLOv8 network and combining the dual-path dynamic feature bottleneck module and the similarity attention-multi-scale convolution module, efficient and accurate sorting of crushed waste materials was achieved, solving the problem of low sorting efficiency of carbon blocks in electrolytic aluminum production and improving the quality of aluminum products and production efficiency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SHANXI XINCHAO TECH CO LTD
- Filing Date
- 2026-02-24
- Publication Date
- 2026-06-23
AI Technical Summary
In existing technologies, the sorting of carbon blocks in the crushed material during the electrolytic aluminum production process mainly relies on manual methods, which suffers from low efficiency, poor accuracy, high health risks, and large quality fluctuations. Furthermore, the YOLOv8 network does not extract enough features when detecting crushed material, making it difficult to meet high accuracy requirements.
The YOLOv8 network was improved by introducing a dual-path dynamic feature bottleneck module and a similarity attention-multi-scale convolution module into the backbone network to enhance feature extraction capabilities. Combined with an online image acquisition and sorting mechanism, this enabled accurate identification and sorting of waste materials.
It improves the accuracy of identifying and sorting waste materials, reduces manual intervention, and enhances the quality and economy of electrolytic aluminum production.
Smart Images

Figure CN122265663A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of electrolytic aluminum production and target detection technology, specifically to a method and system for sorting crushed waste based on an improved YOLOv8, which achieves intelligent sorting of crushed waste based on an improved YOLOv8 network and image recognition. Background Technology
[0002] In the electrolytic aluminum production process, the electrolyte fragments generated in the anode workshop often contain incompletely consumed carbon lumps. If these carbon lumps are not effectively sorted, they will re-enter the electrolytic cell or subsequent processes with the electrolyte, causing multiple negative impacts. On the one hand, the sulfur, ash (Fe2O3, SiO2, etc.), and metallic impurities (such as Fe and Si) in the carbon lumps will contaminate the aluminum melt, reduce the purity of aluminum ingots (e.g., purity drops from 99.7% to below 99.5%), and lead to defects such as rolling cracks and deterioration of mechanical properties, seriously affecting the quality of high-end aluminum materials (such as aerospace aluminum and electronic foil). On the other hand, the presence of carbon lumps will interfere with the current distribution in the electrolytic cell, exacerbate the frequency of the anode effect, increase energy consumption (electricity consumption increases by 5-10%) and greenhouse gas (PFC) emissions, and disrupt process stability. Therefore, efficient sorting of carbon blocks in electrolyte crushed material is a key link in ensuring the quality of aluminum products and the economic efficiency of the process. In current actual production, the sorting of carbon blocks in electrolyte crushed material mainly relies on manual sorting. Manual sorting has core problems such as low efficiency, poor accuracy, high health risks, and large quality fluctuations, which has become a bottleneck restricting the improvement of quality and efficiency in electrolytic aluminum production.
[0003] With the continuous development of artificial intelligence, automated sorting through machines has become an industry trend. Accurate detection and positioning of waste materials in the crushed material production and processing process is crucial. Due to the varying shapes and sizes of waste materials in the crushed material, and potential issues such as obstruction and uneven lighting in the production environment, detection is quite challenging.
[0004] With the development of computer vision and deep learning technologies, object detection algorithms have been widely used in industrial inspection. YOLOv8, as an excellent single-stage object detection algorithm, has certain advantages in detection speed and accuracy. However, when dealing with complex and variable objects such as crushed materials, it still suffers from problems such as insufficient feature extraction and poor detection performance for small-sized and occluded crushed materials, making it difficult to meet the high-precision requirements of intelligent crushed material detection. Summary of the Invention
[0005] To address the technical problem of insufficient automatic sorting efficiency and accuracy caused by inaccurate identification of crushed waste materials in existing technologies, this invention proposes a crushed waste material detection method based on an improved YOLOv8 network. By combining image detection technology with the improved YOLOv8 network, the accuracy and efficiency of target detection are improved, ultimately enhancing the sorting effect of crushed waste materials.
[0006] To solve the above-mentioned technical problems, the technical solution adopted by the present invention is: a method for sorting crushed waste based on an improved YOLOv8, comprising the following steps: Step 1: Construct a crushed material image dataset; the crushed material image dataset includes labeled image data samples corresponding to three types of crushed materials: electrolyte crushed material, carbon blocks, and carbon block electrolyte mixture, and each type of crushed material includes multiple labeled image data samples of different sizes; Step 2: Optimize the structure of the YOLOv8 network model to obtain an improved YOLOv8 network model, which includes a backbone network, a neck network, and a head network; In the backbone network, the output ends of the shallow, middle and deep networks connected to the neck network are all equipped with similarity attention-multi-scale convolution modules, and the C2f modules in the backbone network and neck network are replaced with dual-path dynamic feature bottleneck modules. Step 3: Train the improved YOLOv8 network model based on the labeled image data samples in the crushed material image dataset to obtain the crushed material waste detection model; Step 4: Collect image data from the belt conveyor online and input it into the trained crushed material waste detection model. Determine whether there is waste based on the crushed material waste detection model. Step 5: Based on the waste detection results of the crushed waste detection model, drive the sorting mechanism to perform sorting.
[0007] The dual-path dynamic feature bottleneck module includes a CBS module, a split layer, multiple DSOD bottleneck layers, a connection layer, and a dynamic convolutional layer. In the dual-path dynamic feature bottleneck module, the input data is input to the split layer after passing through the CBS module. The output of the split layer passes through each DSOD bottleneck layer in sequence and is then output to the connection layer. The outputs of the CBS module, the split layer, and each DSOD bottleneck layer are concatenated by the connection layer and then convolved by the dynamic convolutional layer before being output. Each of the DSOD bottleneck layers is either a first DSOD bottleneck layer or a second DSOD bottleneck layer. The first DSOD bottleneck layer includes a depthwise convolutional layer, a normalized pooling layer, a dynamic convolutional layer, and a connection layer. In the first DSOD bottleneck layer, after the input data passes through the depthwise convolutional layer, the normalized pooling layer, and the dynamic convolutional layer, the convolution result and the input data are concatenated by the connection layer to obtain residuals before output. The second DSOD bottleneck layer includes a depthwise convolutional layer, a normalized pooling layer, and a dynamic convolutional layer. The input data is output after passing through the depthwise convolutional layer, the normalized pooling layer, and the dynamic convolutional layer.
[0008] The dual-path dynamic feature bottleneck module includes four DSOD bottleneck layers, wherein: Layer 1 and Layer 2 are the first DSOD bottleneck layers. The input data is passed through a depthwise convolutional layer, a normalized activation layer and a dynamic convolutional layer, and then residually connected with the input data before output. Layers 3 and 4 are the second DSOD bottleneck layers, where input data is directly output after passing through a depthwise convolutional layer, a normalized activation layer, and a dynamic convolutional layer.
[0009] The similarity attention-multiscale convolution module includes multiple parallel convolutional layers and a similarity attention module. Each convolutional layer has a different scale. The feature maps obtained after the input features pass through each convolutional layer are concatenated to obtain a fused feature map, which is then sent to the similarity attention module. The attention map A output by the similarity attention module is multiplied element-wise with the fused feature map F and then output.
[0010] The similarity attention-multiscale convolution module includes three parallel convolutional layers, with kernel sizes of 1×1, 3×3, and 5×5 for each layer.
[0011] In step 5, the specific method for driving the sorting mechanism to perform sorting based on the detection results of the crushed waste detection model is as follows: Step 5.1: Obtain the size and center coordinates of the waste material, as well as the corresponding image acquisition time and the current conveyor belt speed; Step 5.2: Calculate the action delay time; Step 5.3: Based on the calculated action delay time, send a command to control the sorting mechanism to perform a scraping action, pushing away the corresponding waste material to achieve waste sorting.
[0012] In step 5.2, the formula for calculating the action delay time is: ; in, Represents the vertical axis of the executing agency. Represents the ordinate of the waste center. The x-coordinate of the waste's center is represented by d, and the width of the waste is represented by d. Indicates the speed of the belt conveyor. Indicates the speed of the actuator, t q This indicates system delay.
[0013] Furthermore, this invention also provides a crushed waste detection system based on an improved YOLOv8, comprising: Image acquisition module: Located above the crushing conveyor belt, it is used to acquire image data of the crushed material and send it to the crushed material waste detection module; Crushed material waste detection module: This module is used to monitor online whether there is waste in the crushed material image data through the crushed material waste detection model, and send the detection results to the driver module. The crushed material waste detection model is trained based on an improved YOLOv8 network model, which includes a backbone network, a neck network, and a head network. In the backbone network, the outputs of the shallow, middle, and deep networks connected to the neck network are all equipped with similarity attention-multi-scale convolution modules, and the C2f modules in the backbone network and neck network are replaced with dual-path dynamic feature bottleneck modules. Drive module: Used to send commands to control the sorting mechanism to start based on the detection results; Sorting mechanism: Used to sort waste materials according to commands sent by the drive module.
[0014] The drive module is used to calculate the action delay time based on the center position of the detected waste, and send a command to control the sorting mechanism to start based on the action delay time.
[0015] The formula for calculating the action delay time is: ; in, Y ct Represents the vertical axis of the sorting mechanism. Y L Represents the center ordinate of the waste material. X L The x-coordinate represents the center of the waste material. Indicates the speed of the belt conveyor. The speed of the sorting mechanism is represented by t. q This indicates system delay.
[0016] Compared with the prior art, the present invention has the following advantages: 1. This invention provides a method and system for sorting crushed waste based on an improved YOLOv8 network. By utilizing online acquired image data of crushed material on a conveyor belt and combining it with an improved YOLOv8 network, accurate identification of waste can be achieved, thereby improving sorting efficiency. 2. In this invention, the randomness of morphology and the variability of texture in the detection of black and white crushed waste materials are addressed. The original C2f module in the existing YOLOv8 network has the following limitations: static convolutional kernels are difficult to adapt to the morphological changes of crushed materials; standard convolution is insufficient for extracting low-contrast texture features; and the deep feature reuse mechanism lacks fine-grained feature preservation capabilities. Therefore, the YOLOv8 network is improved by deploying similarity attention-multi-scale convolutional modules (SimAM-MSConv modules) in the shallow, middle, and deep layers of the backbone network. This module processes the input features in parallel through different convolutional kernels, generating multi-scale features which are then weighted and fused by the SimAM spatial attention module before outputting the enhanced features. Specifically, the similarity-attention-multi-scale convolution module in the shallow network can extract edge fragment features of broken materials, solving the boundary positioning deviation problem caused by irregular shape; the similarity-attention-multi-scale convolution module in the mid-layer network can adaptively weight spatial features, significantly enhancing the texture differentiation ability of black and white materials and suppressing reflective noise interference; the similarity-attention-multi-scale convolution module in the deep network can strengthen the feature response of small-scale broken materials and improve the detection rate of small-diameter materials. Therefore, the similarity-attention-multi-scale convolution module in the improved YOLOv8 network can enhance the edge fragment feature extraction ability through the synergistic effect of multi-scale convolution groups and SimAM attention. 3. In this invention, the improved YOLOv8 network replaces the original C2f module with a dual-path dynamic feature bottleneck module (C2f-DSOD), which enhances the adaptability to changes in the shape of crushed materials through depthwise separable convolution and full-dimensional dynamic convolution. Specifically, the first layer of the dual-path dynamic feature bottleneck module adopts a deep convolutional layer (DWConv) to preserve the spatial details of the edge fragments of the crushed material. Dynamic convolutional layers (ODConv) are deployed at the end of each DSOD bottleneck layer (DSODBottleneck) to adaptively focus on the texture features of crushed materials of different diameters. Therefore, combined with the similarity attention-multi-scale convolutional module (SimAM-MSConv) deployed in the shallow, middle and deep layers of the backbone network, the improved YOLOv8 network of this invention can improve the recognition accuracy of black and white waste materials and improve sorting efficiency and accuracy.
[0017] 4. In this invention, based on the waste detection results of the improved YOLOv8 network, the action delay time of the sorting mechanism is accurately calculated, and then the sorting mechanism is driven to move, which can further improve the sorting accuracy. Attached Figure Description
[0018] Figure 1 A flowchart illustrating a method for sorting crushed waste based on an improved YOLOv8, provided as an embodiment of the present invention; Figure 2This is a structural diagram of the improved YOLOv8 network used in Embodiment 1 of the present invention; Figure 3 This is a schematic diagram of the network structure of the dual-path dynamic feature bottleneck module in the improved YOLOv8 network used in Embodiment 1 of the present invention; Figure 4 This is a schematic diagram of the network structure of the similarity attention-multi-scale convolution module in the improved YOLOv8 network used in Embodiment 1 of the present invention; Figure 5 The following are the performance parameters obtained by training with the original YOLOv8n network: (a) represents the curve of training set bounding box regression loss value changing with training epochs; (b) represents the curve of training set classification loss value changing with training epochs; (c) represents the curve of training set focal distribution loss value changing with training epochs; (d) represents the curve of training set precision changing with training epochs; (e) represents the curve of training set recall changing with training epochs; (f) represents the curve of validation set bounding box regression loss value changing with training epochs; (g) represents the curve of validation set classification loss value changing with training epochs; (h) represents the curve of validation set focal distribution loss value changing with training epochs; (i) represents the curve of mAP50 changing with training epochs; and (j) represents the curve of mAP50-90 changing with training epochs. Figure 6 The performance parameters obtained by training using the improved YOLOv8 network in Embodiment 1 of this invention are as follows: (a) represents the curve of training set bounding box regression loss value changing with training epochs; (b) represents the curve of training set classification loss value changing with training epochs; (c) represents the curve of training set distribution focus loss value changing with training epochs; (d) represents the curve of training set precision changing with training epochs; (e) represents the curve of training set recall changing with training epochs; (f) represents the curve of validation set bounding box regression loss value changing with training epochs; (g) represents the curve of validation set classification loss value changing with training epochs; (h) represents the curve of validation set distribution focus loss value changing with training epochs; (i) represents the curve of mAP50 changing with training epochs; and (j) represents the curve of mAP50-90 changing with training epochs. Figure 7 This is a schematic diagram illustrating the principle of a crushed waste sorting method based on an improved YOLOv8, as provided in Embodiment 1 of the present invention. Figure 8 This is another schematic diagram illustrating the principle of a crushed waste sorting method based on an improved YOLOv8 provided in Embodiment 1 of the present invention; Figure 9 This is a structural block diagram of a crushed waste sorting device based on an improved YOLOv8 provided in Embodiment 2 of the present invention; In the diagram, 1 is the bracket, 2 is the camera, 3 is the sorting mechanism, 4 is the belt, 5 is the cylinder, and 6 is the push rod. Detailed Implementation
[0019] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below. Obviously, the described embodiments are some embodiments of the present invention, but not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0020] Example 1 like Figure 1 As shown, Embodiment 1 of the present invention provides a method for sorting crushed waste based on an improved YOLOv8, comprising the following steps: Step 1: Construct a crushed material image dataset; the crushed material image dataset includes labeled image data samples corresponding to three types of crushed materials: electrolyte crushed material, carbon blocks, and carbon block electrolyte mixture, and each type of crushed material includes multiple labeled image data samples of different sizes.
[0021] In this embodiment, industrial cameras are installed at different locations on the production line (such as the crusher outlet and screening equipment) to capture images containing crushed materials. The captured images have a resolution of 1920×1080 and are in JPEG format. The crushed materials in the images include three categories: electrolyte crushed materials, carbon blocks, and carbon block-electrolyte mixtures. The diameter of the crushed materials in the samples ranges from 15-30 cm, and also includes those with a diameter greater than 30 cm. Then, techniques such as image rotation, flipping, cropping, brightness adjustment, and adding Gaussian noise are used to enhance the original images, expanding the dataset to 30,000 images, effectively increasing the diversity of the data.
[0022] The enhanced image was then annotated using the LabelImg image annotation tool. The crushed material areas were marked with rectangles, and the type of crushed material was recorded in the annotation file. The annotation categories corresponding to the crushed material areas in the image were electrolyte crushed material, carbon blocks, or a mixture of carbon blocks and electrolytes. After annotation, the annotation data was converted from XML format to the TXT format required by YOLOv8. The carbon blocks were black waste that needed to be sorted.
[0023] The 30,000 data-enhanced and labeled images and their corresponding label files were divided into a training set (24,000 images), a validation set (3,000 images), and a test set (3,000 images) in a ratio of 8:1:1.
[0024] Step 2: Optimize the structure of the YOLOv8 network model to obtain an improved YOLOv8 network model, which includes a backbone network, a neck network, and a head network. In the backbone network, the output ends of the shallow, middle and deep networks connected to the neck network are all equipped with similarity attention-multi-scale convolution modules (SimAM-MSConv modules), and the C2f modules in the backbone network and neck network are replaced with dual-path dynamic feature bottleneck modules (C2f-DSOD).
[0025] like Figure 2 The diagram shown is a schematic representation of the improved YOLOv8 network model used in an embodiment of the present invention.
[0026] like Figure 3 As shown, in this embodiment, the dual-path dynamic feature bottleneck module includes a CBS module, a split layer, multiple DSOD bottleneck layers (DSODBottleneck), a connection layer (Concat), and a dynamic convolutional layer (ODConv). In the dual-path dynamic feature bottleneck module, input data is fed into the split layer after passing through the CBS module. The output of the split layer passes through each DSOD bottleneck layer sequentially before being output to the connection layer. The outputs of the CBS module, the split layer, and each DSOD bottleneck layer are concatenated by the connection layer and then convolved by the dynamic convolutional layer before being output. In this embodiment, by setting a full-dimensional dynamic convolutional layer at the end of multiple DSOD bottleneck layers, the texture features of crushed materials of different diameters can be adaptively focused.
[0027] Specifically, each of the DSOD bottleneck layers is either a first DSOD bottleneck layer (add=True) or a second DSOD bottleneck layer (add=False). The first DSOD bottleneck layer includes a depthwise convolutional layer (DWConv), a normalized pooling layer (BN+SiLU), a dynamic convolutional layer, and a connection layer. In the first DSOD bottleneck layer, after the input data passes through the depthwise convolutional layer, the normalized pooling layer, and the dynamic convolutional layer, the convolution result and the input data are concatenated by the connection layer before being output. The second DSOD bottleneck layer includes a depthwise convolutional layer, a normalized pooling layer, and a dynamic convolutional layer. The input data is directly output after passing through the depthwise convolutional layer, the normalized pooling layer, and the dynamic convolutional layer.
[0028] Preferably, in this embodiment, the dual-path dynamic feature bottleneck module includes four DSOD bottleneck layers, wherein: the first and second layers are the first DSOD bottleneck layers, where the input data is output after being residually concatenated with the input data through a deep convolutional layer, a normalized activation layer and a dynamic convolutional layer; the third and fourth layers are the second DSOD bottleneck layers, where the input data is directly output after being output through a deep convolutional layer, a normalized activation layer and a dynamic convolutional layer.
[0029] Specifically, such as Figure 4 As shown, in this embodiment, the similarity attention-multi-scale convolution module includes multiple parallel convolutional layers (Conv) and a similarity attention module (SimAM). Each convolutional layer has a different scale. The feature maps obtained after the input features pass through each convolutional layer are concatenated to obtain a fused feature map F, which is then sent to the similarity attention module. The attention map A output by the similarity attention module is multiplied element-wise with the fused feature map F and then output.
[0030] Furthermore, in this embodiment, the similarity attention-multi-scale convolution module includes three parallel convolutional layers, with kernel sizes of 1×1, 3×3, and 5×5 for each layer.
[0031] In this embodiment, a virtual environment is created on the local server using Anaconda. The source code for YOLOv8 is downloaded from the official GitHub repository. According to the requirements in the requirements.txt file, the following libraries are installed: matplotlib >= 3.3.0, numpy >= 1.22.2, opencv-python = 4.6.0, pillow = 7.1.2, pyyaml >= 5.3.1, requests >= 2.23.0, scipy >= 1.4.1, tqdm = 4.64.0, torch >= 1.8.0, and torchvision >= 0.9.0. Then, the structure of YOLOv8 is adjusted and improved.
[0032] Step 3: Train the improved YOLOv8 network model based on the labeled image data in the crushed material image dataset to obtain the crushed material waste detection model.
[0033] Data Input: Input the divided training and validation sets into the YOLOv8 network structure model. The training and validation sets include crushed material image files, corresponding label files, the YOLOv8 network structure configuration file (yolov8n.yaml), and the YOLOv8 pre-trained weight file (yolov8n.pt).
[0034] Configure hyperparameters: Set the network input image size to 640×640, initial learning rate to 0.001, minimum learning rate to 0.0001, weight decay coefficient to 0.0005, batch size to 16, number of iterations to 200, and optimizer to AdamW.
[0035] Training was performed using an improved YOLOv8 model: The model was trained on a server with an Intel Core i9-12900K CPU, NVIDIA GeForce RTX 3080 GPU, and 64GB of RAM, using a software environment based on PyTorch 1.12.1, Python 3.8, and CUDA 11.3. During training, the pre-trained weights yolov8n.pt for YOLOv8 were used for initialization. Every 50 iterations, the model was validated using a validation set. Based on the loss and accuracy metrics on the validation set, the learning rate was dynamically adjusted using a cosine annealing learning rate adjustment strategy. The training process was completed after 200 iterations.
[0036] The improved YOLOv8 model was tested and evaluated: The weight file of the trained improved YOLOv8 model was loaded into the test file, and 2000 images of crushed material were detected in the test set. The mean precision (mAP), recall, and detection speed (FPS) of the improved model on the test set were calculated and compared with the test results of the original YOLOv8 model. The results show that the improved model improved mAP by 10%, recall by 8%, and detection speed by slightly decreasing but still meeting the requirements for real-time detection, demonstrating that the improved model significantly improves performance in the crushed material detection task.
[0037] like Figure 5 and Figure 6 The diagram shows the experimental results of inputting data into the original YOLOv8 network and the improved YOLOv8 network in this embodiment. The model stabilized after 150 iterations. The improved YOLOv8 network has a lower loss function and improved training accuracy. In the original YOLOv8 model, the mAP50 value is approximately 83%; the improved YOLOv8 network in this embodiment has an mAP50 value of approximately 92%, representing an improvement of approximately 9% compared to YOLOv8. The original YOLOv8 network used is the YOLOv8n version.
[0038] In addition, in this embodiment, an ablation experiment was conducted on the improved YOLOv8 network model of the present invention, and the results are shown in Table 1.
[0039] Table 1 Comparison of experimental results for different models In addition, the improved YOLOv8 of this invention was compared with other YOLO models, and the comparison results are shown in Table 2.
[0040] Table 2 Comparison of experimental results for different models Step 4: Collect image data of crushed material on the belt conveyor in real time and input it into the trained crushed material waste detection model. Based on the crushed material waste detection model, determine whether there is crushed material and the type of crushed material.
[0041] Step 5: Based on the waste detection results of the crushed material waste detection model, drive the sorting mechanism to perform sorting.
[0042] Specifically, the crushed material detection model outputs three types of crushed material: electrolyte crushed material, carbon blocks, and carbon block electrolyte mixture. In this embodiment, only the crushed material identified as carbon blocks is sorted.
[0043] In step 5, the specific method for driving the sorting mechanism to perform sorting based on the detection results of the crushed waste detection model is as follows: Step 5.1: Obtain the size and center coordinates of the waste material, as well as the corresponding image acquisition time and the current conveyor belt speed.
[0044] Step 5.2: Calculate the action delay time.
[0045] In this embodiment, after the trained crushed material waste detection model detects waste, it can also mark the position and shape of the waste. Using the marks, a coordinate system is established with the upper left corner of the image as the origin and the travel direction of belt 4 as the y-axis. This allows the determination of the pixel coordinates of the waste center in the image. , The coordinates are in pixels. By combining the spatial dimensions of a single pixel in the image of the crushed material with the spatial coordinates of the image center, the actual coordinates of the waste material can be determined.
[0046] like Figure 7 As shown, in this embodiment, camera 2 is mounted directly above belt 4 via bracket 1, and it can vertically acquire the image of the material surface on the monitoring belt. S1 and S2 in the figure represent the imaging ranges of the two cameras 2, respectively. Assuming the field of view corresponding to the image of camera 2 on the belt surface is width X0 and height Y0, and the imaging pixels are m×n, in this embodiment, the imaging pixels are 1920×1080. A coordinate system is established with the actual position corresponding to the upper left corner of the image as the origin and the travel direction of belt 4 as the y-axis, as shown below. Figure 8 As shown. The actual center coordinates of the waste are ( X L ,YL )for: (1) By using the actual center coordinates of the waste and the position of the sorting mechanism 3, the time when the waste arrives at the sorting mechanism 3 can be determined. Then, the sorting mechanism 3 can be started before the time arrives, so that it moves to the waste location when the waste arrives, thereby pushing the waste away from the conveyor belt.
[0047] Specifically, in this embodiment, as Figure 7 As shown, the sorting mechanism 3 is also mounted directly above the belt 4 via the bracket 1. Further, the sorting mechanism 3 in this embodiment includes a cylinder 5 and a push rod 6. The push rod 6 has a scraper at its bottom and is hinged to the crossbar of the bracket 1 at its top. One end of the cylinder 5 is hinged to the crossbar of the bracket 1, and the other end is hinged to the middle of the push rod 6. By extending the cylinder 5, the scraper can move laterally from the left side of the belt 4 to the right side of the belt 4, thereby completing the sorting of waste materials on the belt 4.
[0048] Assume the vertical axis of sorting mechanism 3 is Y ct The time it takes for the waste material to move from the imaging position to the sorting mechanism 3 via the conveyor belt. t f for: (2) in, Y ct This represents the vertical coordinate corresponding to sorting mechanism 3. Y L This represents the center coordinate of the waste when it was photographed. This indicates the operating speed of the belt conveyor.
[0049] Considering that the size of the shovel head is larger than the waste material, and ignoring the size of the waste material, the time from the start of the sorting mechanism 3 to reaching the edge of the waste material is: (3) in, X L This indicates the x-coordinate of the center when the waste was photographed. This represents the operating speed of sorting mechanism 3, and it is a known parameter.
[0050] Considering system latency, the formula for calculating the action delay time T in step 5.2 is: (4) in, t q This indicates system latency, which needs to take into account the time from image acquisition to transmission to the crushed material and waste detection model, as well as the detection time of the crushed material and waste detection model, cylinder action latency, and other possible latency.
[0051] Step 5.3: Based on the calculated action delay time, send a command to control the sorting mechanism 3 to perform a scraping action, pushing away the corresponding waste material to achieve waste sorting.
[0052] Example 2 like Figure 9 As shown, Embodiment 2 of the present invention provides a crushed material waste detection system based on an improved YOLOv8, comprising: Image acquisition module: Located above the crushing conveyor belt, it is used to acquire image data of the crushed material and send it to the crushed material waste detection module; Crushed material waste detection module: This module is used to monitor online whether there is waste in the crushed material image data through the crushed material waste detection model, and send the detection results to the driver module. The crushed material waste detection model is trained based on an improved YOLOv8 network model, which includes a backbone network, a neck network, and a head network. In the backbone network, the outputs of the shallow, middle, and deep networks connected to the neck network are all equipped with similarity attention-multi-scale convolution modules, and the C2f modules in the backbone network and neck network are replaced with dual-path dynamic feature bottleneck modules. Drive module: Used to send commands to control the sorting mechanism to start based on the detection results; Sorting mechanism: Used to sort waste materials according to commands sent by the drive module.
[0053] Specifically, in this embodiment, the drive module is used to calculate the action delay time based on the detection result, and send a command to control the sorting mechanism to start according to the action delay time. The calculation formula for the action delay time is the above formula (3). Specifically, when the action delay time is reached, the drive module sends a command to the switch module of the sorting mechanism 3 to start the cylinder to drive the scraper to move, pushing the waste material on the belt 4 to move away from the belt 4.
[0054] Furthermore, such as Figure 7 As shown, in this embodiment, the drive module can be a field control PLC, and the crushed material detection module can be a vision analysis AI server. The field control PLC is connected to the crushed material detection module through fiber optic communication to realize the transmission of image data and detection results. In addition, the engineer monitoring station is equipped with a software HMI interface, which is connected to the vision analysis AI server. It can monitor the recognition results in real time and also allow manual input of sorting commands.
[0055] Specifically, in this embodiment, after receiving the detection result, the drive module calculates the action delay time T and sends a command to control the sorting mechanism to start based on the action delay time T.
[0056] Specifically, such as Figure 7 As shown, in this embodiment, the image acquisition module is a camera 2, which is mounted above the belt 4 via a bracket 1. The sorting mechanism 3 is also mounted directly above the belt 4 via a bracket 1. Further, the sorting mechanism 3 in this embodiment includes a cylinder 5 and a push rod 6. The push rod 6 has a scraper at its bottom and is hinged to the crossbar of the bracket 1 at its top. One end of the cylinder 5 is hinged to the crossbar of the bracket 1, and the other end is hinged to the middle of the push rod 6. By extending the cylinder 5, the scraper can move laterally from the left side of the belt 4 to the right side of the belt 4, thereby completing the sorting of waste materials on the belt 4.
[0057] Furthermore, in this embodiment, multiple sets of image acquisition modules and sorting mechanisms can be set up to avoid missed sorting and further improve product quality.
[0058] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for sorting crushed waste materials based on an improved YOLOv8, characterized in that, Includes the following steps: Step 1: Construct a crushed material image dataset; the crushed material image dataset includes labeled image data samples corresponding to three types of crushed materials: electrolyte crushed material, carbon blocks, and carbon block electrolyte mixture, and each type of crushed material includes multiple labeled image data samples of different sizes; Step 2: Optimize the structure of the YOLOv8 network model to obtain an improved YOLOv8 network model, which includes a backbone network, a neck network, and a head network; In the backbone network, the output ends of the shallow, middle and deep networks connected to the neck network are all equipped with similarity attention-multi-scale convolution modules, and the C2f modules in the backbone network and neck network are replaced with dual-path dynamic feature bottleneck modules. Step 3: Train the improved YOLOv8 network model based on the labeled image data samples in the crushed material image dataset to obtain the crushed material waste detection model; Step 4: Collect image data from the belt conveyor online and input it into the trained crushed material waste detection model. Determine whether there is waste based on the crushed material waste detection model. Step 5: Based on the waste detection results of the crushed waste detection model, drive the sorting mechanism to perform sorting.
2. The method for sorting crushed waste based on improved YOLOv8 according to claim 1, characterized in that, The dual-path dynamic feature bottleneck module includes a CBS module, a split layer, multiple DSOD bottleneck layers, a connection layer, and a dynamic convolutional layer. In the dual-path dynamic feature bottleneck module, the input data is input to the split layer after passing through the CBS module. The output of the split layer passes through each DSOD bottleneck layer in sequence and is then output to the connection layer. The outputs of the CBS module, the split layer, and each DSOD bottleneck layer are concatenated by the connection layer and then convolved by the dynamic convolutional layer before being output. Each of the DSOD bottleneck layers is either a first DSOD bottleneck layer or a second DSOD bottleneck layer. The first DSOD bottleneck layer includes a depthwise convolutional layer, a normalized pooling layer, a dynamic convolutional layer, and a connection layer. In the first DSOD bottleneck layer, after the input data passes through the depthwise convolutional layer, the normalized pooling layer, and the dynamic convolutional layer, the convolution result and the input data are concatenated by the connection layer to obtain residuals before output. The second DSOD bottleneck layer includes a depthwise convolutional layer, a normalized pooling layer, and a dynamic convolutional layer. The input data is output after passing through the depthwise convolutional layer, the normalized pooling layer, and the dynamic convolutional layer.
3. The method for sorting crushed waste based on improved YOLOv8 according to claim 2, characterized in that, The dual-path dynamic feature bottleneck module includes four DSOD bottleneck layers, wherein: Layer 1 and Layer 2 are the first DSOD bottleneck layers. The input data is passed through a depthwise convolutional layer, a normalized activation layer and a dynamic convolutional layer, and then residually connected with the input data before output. Layers 3 and 4 are the second DSOD bottleneck layers, where input data is directly output after passing through a depthwise convolutional layer, a normalized activation layer, and a dynamic convolutional layer.
4. The method for sorting crushed waste based on improved YOLOv8 according to claim 1, characterized in that, The similarity attention-multiscale convolution module includes multiple parallel convolutional layers and a similarity attention module. Each convolutional layer has a different scale. The feature maps obtained after the input features pass through each convolutional layer are concatenated to obtain a fused feature map, which is then sent to the similarity attention module. The attention map A output by the similarity attention module is multiplied element-wise with the fused feature map F and then output.
5. The method for sorting crushed waste based on improved YOLOv8 according to claim 4, characterized in that, The similarity attention-multiscale convolution module includes three parallel convolutional layers, with kernel sizes of 1×1, 3×3, and 5×5 for each layer.
6. The method for sorting crushed waste based on improved YOLOv8 according to claim 1, characterized in that, In step 5, the specific method for driving the sorting mechanism to perform sorting based on the detection results of the crushed waste detection model is as follows: Step 5.1: Obtain the size and center coordinates of the waste material, as well as the corresponding image acquisition time and the current conveyor belt speed; Step 5.2: Calculate the action delay time; Step 5.3: Based on the calculated action delay time, send a command to control the sorting mechanism to perform a scraping action, pushing away the corresponding waste material to achieve waste sorting.
7. A method for sorting crushed waste based on an improved YOLOv8 according to claim 6, characterized in that, In step 5.2, the formula for calculating the action delay time is: ; in, Represents the vertical axis of the executing agency. Represents the ordinate of the waste center. The x-coordinate of the waste's center is represented by d, and the width of the waste is represented by d. Indicates the speed of the belt conveyor. Indicates the speed of the actuator, t q This indicates system delay.
8. A crushed material waste detection system based on an improved YOLOv8, characterized in that, include: Image acquisition module: Located above the crushing conveyor belt, it is used to acquire image data of the crushed material and send it to the crushed material waste detection module; Crushed material waste detection module: Used to monitor online whether there is waste in the crushed material image data through the crushed material waste detection model, and send the detection results to the driver module; The crushed waste detection model is trained based on an improved YOLOv8 network model, which includes a backbone network, a neck network, and a head network. In the backbone network, the outputs of the shallow, middle, and deep networks connected to the neck network are all equipped with similarity attention-multi-scale convolution modules, and the C2f modules in the backbone network and neck network are replaced with dual-path dynamic feature bottleneck modules. Drive module: Used to send commands to control the sorting mechanism to start based on the detection results; Sorting mechanism: Used to sort waste materials according to commands sent by the drive module.
9. A crushed material waste detection system based on an improved YOLOv8 according to claim 8, characterized in that, The drive module is used to calculate the action delay time based on the center position of the detected waste, and send a command to control the sorting mechanism to start based on the action delay time.
10. A crushed material waste detection system based on an improved YOLOv8 according to claim 9, characterized in that, The formula for calculating the action delay time is: ; in, Y ct Represents the vertical axis of the sorting mechanism. Y L Represents the center ordinate of the waste material. X L The x-coordinate represents the center of the waste material. Indicates the speed of the belt conveyor. The speed of the sorting mechanism is represented by t. q This indicates system delay.