Detection method for surface damage of conveyor belt based on YOLOv5 network
By combining the YOLOv5 network with data augmentation and model pruning techniques, a lightweight YOLOv5-Lite model is generated, which solves the problems of low accuracy and slow speed in conveyor belt damage detection, and achieves efficient and intelligent damage detection.
Patent Information
- Application Number
- CN202310011142.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-01-05
- Publication Date
- 2025-11-11
- Estimated Expiration
- 2043-01-05
AI Technical Summary
Existing technologies for conveyor belt damage detection suffer from problems such as low detection accuracy, slow speed, expensive equipment, difficult deployment, and limited detection types. In particular, deep learning models have poor generalization ability and robustness when the number of samples is insufficient, and machine vision methods are greatly affected by lighting and dust.
By employing the YOLOv5 network combined with data augmentation and model pruning techniques, a lightweight YOLOv5-Lite model is generated for conveyor belt damage detection. This model is trained using knowledge distillation to produce new conveyor belt damage samples.
It improves the accuracy and speed of conveyor belt damage detection, reduces the equipment's computing performance requirements, and realizes intelligent detection of different types of damage with a detection accuracy of 97.33%.
Smart Images

Figure CN116385758B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of conveyor belt damage detection, specifically a method for detecting surface damage on conveyor belts based on a YOLOv5 network. Background Technology
[0002] Conveyor belt damage detection is currently mainly divided into two categories: manual inspection and automatic inspection. Traditional manual inspection methods require periodic checks of the conveyor belt surface while the machine is unloaded. This method is limited by inspection time and the accuracy of worker inspections, making it difficult to detect conveyor belt surface damage in a timely, accurate, and stable manner. Current automatic inspection methods mainly include X-ray inspection, electromagnetic inspection, and ultrasonic inspection. X-ray inspection uses an X-ray machine to photograph the conveyor belt, and the resulting X-ray image of the conveyor belt's steel core is used to determine whether the belt has torn, the rope core has slipped, or other abnormalities. Electromagnetic inspection uses metal sensor coils installed at intervals inside the conveyor belt. Signal receivers and transmitters on both sides of the conveyor belt detect electromagnetic signals, and quantitative analysis of the signals enables tear detection. Ultrasonic inspection requires transmitting and receiving probes installed at both ends of the conveyor belt. The strength and duration of the echo signals received by the receivers are used to determine whether a tear has occurred.
[0003] Current automated conveyor belt damage detection methods use specialized equipment to inspect conveyor belts, which has high accuracy and real-time performance. However, they also have shortcomings such as high equipment cost, difficult deployment, limited detection of damage types, or inability to classify the damage that has occurred.
[0004] Patent application number CN 202110687855.6 discloses a conveyor belt detection algorithm based on machine vision. This patent provides a detection method based on RGB images of the conveyor belt. By separating the conveyor belt from the background and performing threshold segmentation, the conveyor belt part is extracted. Then, regional recognition features are performed on abnormal images such as tears. Those that meet the set threshold are identified as tears.
[0005] Patent application CN202010859991.4 proposes a belt inspection system that detects damage at the conveyor belt joint by inspecting belt images acquired by an image acquisition device and determining whether the feature values at the belt joint exceed a standard value. The above solutions have the following drawbacks:
[0006] 1. The problem of insufficient sample quantity for conveyor belt damage has not been solved. The proposed algorithm is still designed for an extremely limited number of samples, resulting in poor generalization ability and robustness.
[0007] 2. Threshold-based machine vision processing methods are greatly affected by image imaging quality. When the lighting conditions in the working environment change significantly or dust is present, it will have a significant impact on the detection results.
[0008] 3. The detection of conveyor belt damage types is relatively limited, only able to detect damage with similar shapes and patterns, and cannot achieve intelligent detection of damage parts of different types and shapes. Summary of the Invention
[0009] The purpose of this invention is to address the problems of low detection accuracy and slow speed of previous deep learning-based detection models in industrial applications, and to provide a method for detecting surface damage on conveyor belts based on the YOLOv5 network.
[0010] The objective of this invention is achieved as follows.
[0011] The present invention provides a method for detecting surface damage on conveyor belts based on a YOLOv5 network, characterized by including a data augmentation method and a target detection algorithm, comprising the following steps:
[0012] S1. Dataset Creation and Processing
[0013] Images of the original conveyor belt were collected, and two types of damage, surface scratches and edge defects, were labeled to generate original conveyor belt damage image data. New conveyor belt scratch samples were generated using GAN and pasted into the background image of the conveyor belt to generate new conveyor belt damage image data samples. In addition, another part of the conveyor belt damage sample augmentation data was generated by flipping, cropping, and occluding the original image. The above three parts of image data were combined to generate the final conveyor belt damage dataset. The dataset was divided into training set and test set in an 8:2 ratio.
[0014] S2, Model Training and Model Testing
[0015] S2.1 Model Training
[0016] The YOLOv5 detection model is lightweighted by using model pruning techniques to obtain the lightweight detection model YOLOv5-Lite. Then, a knowledge distillation strategy based on fine-grained feature simulation is introduced during the model training process to obtain the trained YOLOv5-Lite detection model. The trained YOLOv5-Lite detection model is saved to the weight parameter file.
[0017] S2.2 Model Test
[0018] The YOLOv5-Lite detection model, trained by pruning and distillation, was tested using test set data to obtain the test model;
[0019] S3, Model Deployment
[0020] The test model is deployed to the actual testing environment to detect conveyor belt damage and output the test results.
[0021] Preferably, the dataset establishment and processing in S1 involves first capturing images of the upper surface of the conveyor belt using a visible light camera, and then extracting image data frame by frame from the captured video. Next, the areas to be detected are manually labeled to obtain scratch sample data and edge defect sample data. After labeling, the scratch sample data is input into a GAN network to generate new conveyor belt scratch sample data. The GAN consists of a generator G and a discriminator D. The generator is responsible for generating new samples similar to real samples, while the discriminator is responsible for determining whether the input sample is real data or virtual data generated by the generator. During the game, the generator G aims to reduce the value of V to make its generated distribution unrecognizable, while the discriminator D aims to increase the value of V to efficiently distinguish between real and fake data. Therefore, the expression for V(G, D) is:
[0022]
[0023] In the formula, E represents the mathematical expectation of the real data x and the noisy data z.
[0024] Preferably, a DCGAN network, which combines CNN (Convolutional Neural Network) with GAN, is used. The generator network structure of DCGAN and its discriminator network structure are essentially mirror images of the generator network structure. DCGAN uses stepwise convolutions instead of pooling layers on the basis of GAN, and uses BatchNormalization in both the generator and discriminator to optimize learning efficiency. The ReLU activation function is used in the generator and the LeakyReLU activation function is used in the discriminator to improve the computation speed of the DCGAN network.
[0025] Preferably, when using DCGAN to generate new conveyor belt scratch samples, a set of random noise is first generated and fed into the generator network. The generator network generates conveyor belt scratch samples and sends them along with real scratch samples to the discriminator. The discriminator then identifies the incoming data and distinguishes whether the current data comes from real data or generated data. After continuous iteration and updates, the scratch image generated by the generator is made close to the real scratch image.
[0026] Preferably, the conveyor belt scratch sample is used as the foreground image, and the conveyor belt image is used as the background image. The foreground image is pasted into the background to generate a new conveyor belt damage sample. Then, the Poisson fusion method is used to reduce the change at the boundary. The solution with the smallest change is the solution of the Poisson equation.
[0027]
[0028] Preferably, f represents the fused result image. f is its gradient, and v is the gradient of the original image. * Ω represents the target image, and Ω represents the original image. It is the image boundary.
[0029] In S2.1, model pruning technology is used to lightweight the YOLOv5 detection model. By pruning channels in the BN (Batch Normalization) layer of the YOLOv5 network with activation values less than a threshold, the number of model parameters is reduced, generating a pruned lightweight YOLOv5-Lite detection model, thereby accelerating the model inference speed.
[0030] Preferably, in step S2.1, model pruning technology is used to lightweight the YOLOv5 detection model. By pruning channels in the YOLOv5 network whose activation values in the BN (Batch Normalization) layer are less than a threshold, the number of model parameters is reduced, and a lightweight YOLOv5-Lite detection model is generated after pruning, thereby accelerating the model inference speed.
[0031] Preferably, in step S2.1, a knowledge distillation strategy based on fine-grained feature simulation is introduced during model training to obtain a trained YOLOv5-Lite detection model. This model uses YOLOv5m as the teacher model and the pruned lightweight network YOLOv5-Lite as the student model for distillation training. First, a fine-grained feature simulation mask is generated based on the damage locations in the conveyor belt damage dataset. The mask contains the location information of the damage locations.
[0032] During model training, the teacher model is first trained using the training set until its detection accuracy reaches a high level, and then the weight file of the teacher model is saved. Then, distillation training is performed, where the training set data, after image scaling, is simultaneously input into both the teacher and student models. During training, the student model adjusts the feature map size through feature map adaptation operations and calculates the simulated loss by combining a fine-grained feature mask with the feature map of the teacher model. The calculation formula is as follows:
[0033] Let s be the guiding feature map of the student model, and t be the corresponding feature map of the teacher model. For each near-target anchor position (i, j) on the feature map with width W and height H, the loss function between the student model and the teacher model is:
[0034]
[0035] Combining the mask information I, the simulated loss function is obtained:
[0036]
[0037]
[0038] Where N p f is the number of positive dots in the mask. adap (·) is the adaptation function, which unifies the size of the feature map;
[0039] Meanwhile, the student model is trained using real-label data, and the student model loss is calculated. By introducing a balancing factor λ to weight the distillation loss and the student loss, the final loss function of the student model is obtained as follows:
[0040] L = L gt +λL imitation (6)
[0041] In the formula L gt λ represents the detection loss of the student model on real data, and λ is the weighting factor of the simulated loss.
[0042] After the distillation training is complete, save the weight parameter file of the student model.
[0043] The test model is deployed to the actual detection environment to detect conveyor belt damage and output the detection results. The specific steps are as follows:
[0044] After the model training and testing are completed, when it is actually deployed in the production environment, the upper surface of the conveyor belt is continuously filmed by a visible light camera, and the video data is transmitted to the host computer. The host computer extracts the video data frame by frame and inputs each frame image into the pre-trained detection model YOL0v5-Lite. The detection model loads the previously trained weight file and image data to detect damage to the conveyor belt. If a damaged area is detected in the image, an alarm is issued and the detection result is output, and then the detection ends. If no damaged area is detected in the image, the detection ends.
[0045] Compared with the prior art, the beneficial effects of the present invention are as follows:
[0046] This invention proposes a novel data augmentation scheme that effectively solves the problem of low detection accuracy caused by insufficient conveyor belt image samples when applying deep learning models to conveyor belt damage detection.
[0047] To address the issues of high computational requirements and slow detection speed of traditional deep learning models when detecting conveyor belt damage, model pruning techniques are used to reduce the number of model parameters, thereby improving the model's detection speed and reducing the computational requirements of the equipment.
[0048] To address the issue of low detection accuracy of deep learning models when detecting conveyor belt damage, this invention employs a knowledge distillation algorithm. By using a large model with higher detection accuracy as a teacher model, a lightweight model with lower detection accuracy is trained through distillation. This significantly improves the detection accuracy of the lightweight model, achieving a detection accuracy of 97.33% when detecting conveyor belt damage. Attached Figure Description
[0049] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0050] Figure 1 This is a schematic diagram of the conveyor belt damage detection system of the present invention.
[0051] Figure 2 This is a schematic diagram of the DCGAN generator structure of the present invention.
[0052] Figure 3 This is a schematic diagram of the process of generating conveyor belt scratch samples using GAN in this invention.
[0053] Figure 4 This is a comparison image of a real scratch sample and a generated sample.
[0054] Figure 5 This is a schematic diagram of the generation of conveyor belt damage samples.
[0055] Figure 6 This is a schematic diagram of the model pruning process.
[0056] Figure 7 This is a schematic diagram of the knowledge distillation process.
[0057] Figure 8 This is a flowchart of the conveyor belt damage detection model test.
[0058] Figure 9 This is a schematic diagram of the conveyor belt damage detection results. Detailed Implementation
[0059] Embodiments of the present invention are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and should not be construed as limiting the present invention.
[0060] To facilitate understanding of the present invention, the present invention will be further explained and described below with reference to the accompanying drawings and specific embodiments. However, the specific embodiments do not constitute a limitation on the embodiments of the present invention.
[0061] Those skilled in the art should understand that the accompanying drawings are merely schematic diagrams of embodiments, and the components in the drawings are not necessarily essential for implementing the present invention.
[0062] The present invention provides a method for detecting surface damage on conveyor belts based on a YOLOv5 network, characterized by including a data augmentation method and a target detection algorithm, comprising the following steps:
[0063] S1. Dataset Creation and Processing
[0064] Images of the original conveyor belt were collected, and two types of damage, surface scratches and edge defects, were labeled to generate original conveyor belt damage image data. New conveyor belt scratch samples were generated using GAN and pasted into the background image of the conveyor belt to generate new conveyor belt damage image data samples. In addition, another part of the conveyor belt damage sample augmentation data was generated by flipping, cropping, and occluding the original image. The above three parts of image data were combined to generate the final conveyor belt damage dataset. The dataset was divided into training set and test set in an 8:2 ratio.
[0065] The dataset establishment and processing in S1 involves first capturing images of the upper surface of the conveyor belt using a visible light camera, and then extracting image data frame by frame from the captured video. Next, the areas to be detected are manually labeled to obtain scratch sample data and edge defect sample data. After labeling, the scratch sample data is input into a GAN network to generate new conveyor belt scratch sample data. The GAN consists of a generator G and a discriminator D. The generator is responsible for generating new samples similar to real samples, while the discriminator is responsible for determining whether the input sample is real data or virtual data generated by the generator. During the game, the generator G aims to reduce the value of V to make its generated distribution unrecognizable, while the discriminator D aims to increase the value of V to efficiently distinguish between real and fake data. Therefore, the expression for V(G, D) is:
[0066]
[0067] In the formula, E represents the mathematical expectation of the real data x and the noisy data z.
[0068] In specific embodiments, this invention uses a DCGAN network that combines CNN (Convolutional Neural Networks) with GAN, based on GAN. The generator network structure of DCGAN is as follows: Figure 2 As shown, its discriminator network structure is essentially a mirror image of the generator network structure. DCGAN uses stepwise convolution instead of pooling layers on the basis of GAN, and uses BatchNormalization in both the generator and discriminator to optimize learning efficiency. The generator uses the ReLU activation function, and the discriminator uses the LeakyReLU activation function to improve the computation speed of the DCGAN network and avoid the gradient vanishing problem.
[0069] like Figure 3 As shown, when using DCGAN to generate new conveyor belt scratch samples, a set of random noise is first generated and fed into the generator network. The generator network generates conveyor belt scratch samples and sends them to the discriminator along with real scratch samples. The discriminator then identifies the input data, distinguishing whether the current data comes from real data or generated data. After continuous iteration and updates, the scratch image generated by the generator is made closer to the real scratch image. Figure 4 As shown, Figure 4 In the image, (a) is a real scratch sample and (b) is a scratch sample generated by GAN.
[0070] The conveyor belt scratch sample is used as the foreground image, and the conveyor belt image is used as the background image. The foreground image is pasted into the background to generate a new conveyor belt damage sample. Then, the Poisson fusion method is used to reduce the change at the boundary. The solution with the smallest change is the solution of the Poisson equation.
[0071]
[0072] In the formula, f represents the fused result image. f is its gradient, and v is the gradient of the original image. * Ω represents the target image, and Ω represents the original image. It is the image boundary.
[0073] Figure 5 (a) shows the effect of directly pasting the scratched sample as the foreground image into the background image of the conveyor belt. At this time, there is a significant difference in grayscale values between the foreground and background images. Figure 5 (b) shows the image after Poisson blending, at which point there is no significant difference in grayscale values between the foreground and background images. The final result is as follows: Figure 5 As shown in (c), the scratch samples are randomly scaled based on Poisson fusion to simulate the scratch size distribution in real-world conditions, generating the final conveyor belt damage samples.
[0074] S2, Model Training and Model Testing
[0075] S2.1 Model Training
[0076] The YOLOv5 detection model is lightweighted using model pruning techniques. Then, a knowledge distillation strategy based on fine-grained feature simulation is introduced during model training to obtain a trained YOLOv5 detection model. The trained YOLOv5 detection model is then saved to a weight parameter file.
[0077] like Figure 6 As shown in step S2.1, model pruning technology is used to lightweight the YOLOv5 detection model. By pruning channels in the BN (Batch Normalization) layer of the YOLOv5 network with activation values less than a threshold, the number of model parameters is reduced, generating a pruned lightweight YOLOv5-Lite detection model, thereby accelerating the model inference speed.
[0078] like Figure 7 As shown, in S2.1, a knowledge distillation strategy based on fine-grained feature simulation is introduced during the model training process to obtain a trained YOLOv5-Lite detection model. YOLOv5m is used as the teacher model and the pruned lightweight network YOLOv5-Lite is used as the student model for distillation training. First, a fine-grained feature simulation mask is generated based on the damage location in the conveyor belt damage dataset. The mask contains the location information of the damage location.
[0079] During model training, the teacher model is first trained using the training set until its detection accuracy reaches a high level, and then the weight file of the teacher model is saved. Then, distillation training is performed, where the training set data, after image scaling, is simultaneously input into both the teacher and student models. During training, the student model adjusts the feature map size through feature map adaptation operations and calculates the simulated loss by combining a fine-grained feature mask with the feature map of the teacher model. The calculation formula is as follows:
[0080] Let s be the guiding feature map of the student model, and t be the corresponding feature map of the teacher model. For each near-target anchor position (i, j) on the feature map with width W and height H, the loss function between the student model and the teacher model is:
[0081]
[0082] Combining the mask information I, the simulated loss function is obtained:
[0083]
[0084]
[0085] Where N p f is the number of positive dots in the mask. adap (·) is the adaptation function, which unifies the size of the feature map;
[0086] Meanwhile, the student model is trained using real-label data, and the student model loss is calculated. By introducing a balancing factor λ to weight the distillation loss and the student loss, the final loss function of the student model is obtained as follows:
[0087] L = L gt +λL imitation (6)
[0088] In the formula L gt λ represents the detection loss of the student model on real data, and λ is the weighting factor of the simulated loss.
[0089] After the distillation training is complete, save the weight parameter file of the student model.
[0090] S2.2 Model Test
[0091] After distillation training, the YOLOv5-Lite model, which has been pruned and trained by distillation, was tested using test set data. The results showed that the student network YOLOv5-Lite achieved an accuracy of 97.33% in detecting surface damage on conveyor belts, which is 4.09% higher than the accuracy without distillation training.
[0092] S3, Model Deployment
[0093] The test model is deployed to the actual testing environment to detect conveyor belt damage and output the test results.
[0094] The workflow for deploying the model to a real-world detection environment is as follows:
[0095] The flowchart for model detection of conveyor belt surface damage is as follows: Figure 8 As shown, after model training and testing, when actually deployed in the production environment, a visible light camera continuously captures images of the upper surface of the conveyor belt, and the video data is transmitted to the host computer. The host computer extracts the video data frame by frame, scales the image size to 640×640 pixels, and then inputs each frame into the pre-trained detection model YOLOv5-Lite. The detection model loads the previously trained weight file and image data to detect damage to the conveyor belt. If a damaged area is detected in the image, an alarm is triggered and the detection result is output, then the detection ends. If no damaged area is detected in the image, the detection ends.
[0096] Conveyor belt damage detection results as follows Figure 9As shown, when conveyor belt damage is detected, the damaged area of the conveyor belt in the image is outlined and the damage type is indicated.
Claims
1. A method for detecting surface damage on conveyor belts based on a YOLOv5 network, characterized in that, It includes data augmentation methods and object detection algorithms, comprising the following steps: S1. Dataset Creation and Processing Images of the original conveyor belt were collected, and two types of damage, surface scratches and edge defects, were labeled to generate original conveyor belt damage image data. New conveyor belt scratch samples were generated using GAN and pasted into the background image of the conveyor belt to generate new conveyor belt damage image data samples. In addition, another part of the conveyor belt damage sample augmentation data was generated by flipping, cropping, and occluding the original image. The above three parts of image data were combined to generate the final conveyor belt damage dataset. The dataset was divided into training set and test set in an 8:2 ratio. The DCGAN network, which combines CNN (Convolutional Neural Network) with GAN, is based on GAN. The generator network structure of DCGAN is essentially a mirror image of the discriminator network structure. DCGAN uses stepwise convolutions instead of pooling layers on the basis of GAN, and uses BatchNormalization in both the generator and discriminator to optimize learning efficiency. The generator uses the ReLU activation function, and the discriminator uses the LeakyReLU activation function to improve the computation speed of DCGAN network. S2, Model Training and Model Testing S2.1 Model Training The YOLOv5 detection model is lightweighted by using model pruning techniques to obtain the lightweight detection model YOLOv5-Lite. Then, a knowledge distillation strategy based on fine-grained feature simulation is introduced during the model training process to obtain the trained YOLOv5-Lite detection model. The trained YOLOv5-Lite detection model is saved to the weight parameter file. S2.2 Model Test The YOLOv5-Lite detection model, trained by pruning and distillation, was tested using test set data to obtain the test model; S3, Model Deployment The test model is deployed to the actual testing environment to detect conveyor belt damage and output the test results; The conveyor belt scratch sample is used as the foreground image, and the conveyor belt image is used as the background image. The foreground image is pasted into the background to generate a new conveyor belt damage sample. Then, the Poisson fusion method is used to reduce the change at the boundary. The solution with the smallest change is the solution of the Poisson equation. In the formula, f represents the fused result image. It is its gradient, v is the gradient of the original image, and f is the gradient of the original image. * Ω represents the target image, and Ω represents the original image. It is the image boundary.
2. The detection method according to claim 1, characterized in that, The dataset establishment and processing in S1 involves first capturing images of the upper surface of the conveyor belt using a visible light camera, and then extracting image data frame by frame from the captured video. Next, the areas to be detected are manually labeled to obtain scratch sample data and edge defect sample data. After labeling, the scratch sample data is input into a GAN network to generate new conveyor belt scratch sample data. The GAN consists of a generator G and a discriminator D. The generator is responsible for generating new samples similar to real samples, while the discriminator is responsible for determining whether the input sample is real data or virtual data generated by the generator. During the game, the generator G aims to reduce the value of V to make its generated distribution unrecognizable, while the discriminator D aims to increase the value of V to efficiently distinguish between real and fake data. Therefore, the expression for V(G, D) is: In the formula, E represents the mathematical expectation of the real data x and the noisy data z.
3. The detection method according to claim 1, characterized in that, When using DCGAN to generate new conveyor belt scratch samples, a set of random noise is first generated and fed into the generator network. The generator network's conveyor belt scratch samples are then fed into the discriminator along with the real scratch samples. The discriminator identifies the incoming data and distinguishes whether the current data comes from real data or generated data. After continuous iteration and updates, the scratch image generated by the generator is made to be close to the real scratch image.
4. The detection method according to claim 1, characterized in that, In S2.1, model pruning technology is used to lightweight the YOLOv5 detection model. By pruning channels in the BN (Batch Normalization) layer of the YOLOv5 network with activation values less than a threshold, the number of model parameters is reduced, generating a pruned lightweight YOLOv5-Lite detection model, thereby accelerating the model inference speed.
5. The detection method according to claim 1, characterized in that, In S2.1, a knowledge distillation strategy based on fine-grained feature simulation is introduced during the model training process to obtain a trained YOLOv5-Lite detection model. YOLOv5m is used as the teacher model and the pruned lightweight network YOLOv5-Lite is used as the student model for distillation training. First, a fine-grained feature simulation mask is generated based on the damage location in the conveyor belt damage dataset. The mask contains the location information of the damage location. During model training, the teacher model is first trained using the training set until its detection accuracy reaches a high level. The weight file of the teacher model is then saved. Distillation training is then performed, where the training set data, after image scaling, is simultaneously input into both the teacher and student models. During training, the student model adjusts the feature map size through feature map adaptation operations and calculates the simulated loss by combining a fine-grained feature mask with the feature map of the teacher model. The calculation formula is as follows: Let s be the guiding feature map of the student model, and t be the corresponding feature map of the teacher model. For each near-target anchor position (i, j) on the feature map with width W and height H, the loss function between the student model and the teacher model is: Combining the mask information I, the simulated loss function is obtained: Where N p f is the number of positive dots in the mask. adap (·) is the adaptation function, which unifies the size of the feature map; Meanwhile, the student model is trained based on real labeled data, and the student model loss is calculated. By introducing a balance factor λ to weight the distillation loss and the student loss, the final loss function of the student model is obtained as follows: L=L gt +λL imitation (6) In the formula L gt λ represents the detection loss of the student model on real data, and λ is the weighting factor of the simulated loss. After the distillation training is complete, save the weight parameter file of the student model.
6. The detection method according to claim 1, characterized in that, The test model is deployed to the actual detection environment to detect conveyor belt damage and output the detection results. The specific steps are as follows: After the model training and testing are completed, when it is actually deployed in the production environment, the upper surface of the conveyor belt is continuously filmed by a visible light camera, and the video data is transmitted to the host computer. The host computer extracts the video data frame by frame and inputs each frame image into the pre-trained detection model YOLOv5-Lite. The detection model loads the previously trained weight file and image data to detect damage to the conveyor belt. If a damaged area is detected in the image, an alarm is triggered and the detection result is output, and then the detection ends. If no damaged area is detected in the image, the detection ends.
Citation Information
Patent Citations
Belt detection method, belt detection device and belt detection system
CN111999299A
Belt detection algorithm based on machine vision
CN113344891A
Residual error network-based detection method for four types of damage of conveyer belt
CN108510488A
Traffic sign detection and identification method based on pruning and knowledge distillation
CN111444760A