Conveyor belt deviation detection method and improved yolov5 network model
Through the improved yolov5 network model combined with deep learning and Hough linear detection, the problems of low patrol efficiency and poor robustness of traditional belt transport aircraft are solved, and high-precision belt deviation detection in complex environments is realized, which improves detection efficiency and Level of intelligence.
Patent Information
- Application Number
- CN202411818270.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-11
- Publication Date
- 2025-01-10
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The inspection methods of traditional belt transport aircraft are inefficient, prone to missed inspections or misjudgments, and the existing algorithms are poorly robust and have limited adaptability, making it difficult to achieve high-precision belt deviation detection in complex environments.
The improved yolov5 network model is used to combine roller detection and belt area segmentation processing, and the change in roller position and area are detected through deep learning, combined with Hough linear detection and improved canny operator for edge extraction, to determine whether the belt is offside, and introduce The CBAM attention mechanism and multi-scale features are fused to enhance the robustness and adaptability of detection.
It realizes more accurate belt deviation detection, which is suitable for complex environments, has poor light resistance and strong noise reduction capabilities, replaces human inspections, improves detection efficiency, reduces enterprise costs, and improves intelligence level.
Smart Images

Figure CN119295453A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of visual image detection based on deep learning, and specifically to a technical method for conveyor belt deviation detection. Background Art
[0002] Belt conveyors are a type of material transportation equipment widely used in the power, construction, metallurgy and other industries. They are usually composed of several belt conveyors that cross each other to form a complete conveying system. They have the characteristics of large transportation volume, continuous operation, and long transportation distance. Belt conveyors usually work in harsh environments, and are prone to problems such as belt deviation, belt tearing, and missing rollers during use. If such problems are not discovered and handled in a timely manner, the equipment may be damaged at best, or the production line may be shut down for a long time, and even cause casualties. Therefore, the operating status of belt conveyors is directly related to the safety of conveying equipment and personnel in the production process and the economic benefits of the enterprise. The traditional inspection method for belt conveyors is usually to set up on-duty personnel for a single belt conveyor, and the on-duty personnel will patrol and monitor the operating status of the belt conveyor. This method is inefficient and is affected by the quality level of the inspectors themselves. It is easy to miss inspections or misjudge, and there are safety risks.
[0003] Chinese Patent 202211652139.5 discloses a visual detection method for belt deviation that can eliminate straight line interference. The method mainly uses the Hough straight line detection method to obtain multiple straight lines, and obtains relevant information of the roller area through correlation calculation of multiple straight lines, so as to determine whether the belt is deviated. This method uses a traditional algorithm, which is not robust, has poor adaptability, and has limited ability to fit nonlinear relationships.
[0004] In a belt deviation identification algorithm based on a patrol robot disclosed in Chinese patent 202211299622.X, only a single segmentation of the belt area is performed using an improved Deeplab-v3 through deep learning. It is difficult to adapt well to complex environments, and the analysis and processing of edges has large deviations. It is difficult to perform high-precision calculations in dim and complex on-site environments, and the test results are unstable. Summary of the invention
[0005] The object of the present invention is to provide a conveyor belt deviation detection method, which is a new method based on deep learning detection. The method can achieve more accurate detection results. Another object of the present invention is to provide an improved yolov5 network model applied to the above-mentioned conveyor belt deviation detection method.
[0006] To achieve the above object, the technical solution of the present invention is: a conveyor belt deviation detection method, characterized in that the method steps include: S1, establish a model training image dataset; S2, use the improved yolov5 network model to train the image dataset; S3, when the conveyor belt deviation detection is working, the camera collects the detection image and processes the input call of the improved yolov5 network model; The improved yolov5 network model includes roller detection processing and belt area segmentation processing; The roller detection process calculates the area of the roller by drawing frames of the roller positions on both sides of the belt detected by deep learning, and then determines whether the numerical change of the roller area on both sides of the belt exceeds a set threshold; The belt area segmentation process uses an improved Canny operator to extract edges, then uses Hough line detection to determine whether the detected line deviates from a set line threshold; When the judgment result of whether the numerical change of the roller area on both sides of the belt exceeds the set threshold and the judgment result of whether the detected straight line deviates from the threshold of the set straight line are both yes, it is judged that the belt is deviating and the alarm function is activated; when the judgment result of whether the numerical change of the roller area on both sides of the belt exceeds the set threshold or the judgment result of whether the detected straight line deviates from the threshold of the set straight line is no, step S3 is repeated.
[0007] In step S3, Hough line detection is performed. The line detection based on Hough transform realizes a mapping relationship from image space to parameter space. The line equation in the Cartesian coordinate system is y=ax+b, where x represents the independent variable, y represents the target variable, a represents the slope, and b represents the intercept. The line equation corresponding to the polar coordinate system is , where ρ is the distance from the origin to the straight line; θ is the angle between ρ and the X-axis. The detected straight line is compared with the set straight line deviation threshold. If the detected straight line exceeds the set straight line threshold range, the test result is Y, otherwise it is N.
[0008] In step S3, the area of the rollers is calculated by drawing frames of the roller positions on both sides of the belt. Specifically, the positions and sizes of the rollers on both sides of the belt are obtained by using the improved yolov5 network model, and the positions of the rollers are drawn frames. The area of the rollers S is calculated from the size of the rollers. The original area of the rollers is S0, and the formula Calculate the relative rate of change of the area of the rollers on the left and right sides of the belt. When △S on both sides ≥ the set threshold, the test result is recorded as Y, and when △S < the set threshold, the test result is recorded as N.
[0009] An improved yolov5 network model, the improvement includes: selecting the backbone network of the improved yolov5 network model as the backbone of the training model, the neck network is composed of a spatial pyramid pool module and a feature pyramid network module, the spatial pyramid pool module is used to generate and fuse feature information of different scales, and the feature pyramid network module is used to fuse features of different semantic levels, so that the features generated by the model contain information of multiple scales and multiple semantic levels; The improved yolov5 network model adds a 4x down-sampling detection head, which is custom named P2. The detection head can detect the minimum target resolution of 4x4. The feature fusion structure follows the FPN+PAN structure. In this structure, the definition settings C2, C3, C4, and C5 correspond to the 4x, 8x, 16x, and 32x down-sampling feature maps extracted by the backbone network, respectively. The definition settings F3 and F4 represent the feature fusion layer, and the definition settings P2, P3, P4, and P5 represent the detection layer. The neck network processes the input feature map, first performing up-sampling fusion, then down-sampling fusion, and finally making a separate prediction on the fused feature map. Introducing the CBAM attention mechanism in the neck network; In the improved yolov5 network model, two decoders are used to complete the two tasks of roller detection and belt area segmentation respectively. An anchor-based multi-scale detection scheme is adopted, and the structure of the path aggregation network is used to transfer the positioning features from bottom to top. Then, the multi-scale fusion feature map is used for detection. The multi-scale feature map of each network will be assigned three prior anchors with different aspect ratios. The detection head will predict the position offset and scale the height and width, and predict the probability corresponding to each category and the confidence of the prediction. In the improved yolov5 network model, an improved canny operator is used for edge extraction. The improved canny operator uses two diagonal templates to perform weighted averaging on the pixels in the image and calculate the gradient of the image in two oblique directions. The two diagonal templates are as follows: , The gradient corresponding to the first diagonal template is calculated as , The gradient corresponding to the second diagonal template is calculated as , Taking the square root, the gradient in the diagonal direction is , where: G1 ’ Represents the gradient in the oblique direction of the first diagonal template, G2 ’ Represents the gradient of the second diagonal template in the oblique direction, G ’Represents the gradient amplitude. Assuming that the gradient image proposed based on the x-direction and y-direction is G1, and the gradient image extracted in the oblique direction using the diagonal template is G2, the integrated image gradient is , perform double threshold processing on G3 to obtain edge image G4; Set the size of the original image to (W, H, 3), set the size of the bottom segmentation branch of FPN to (W / 8, H / 8, 256), and the belt area segmentation head goes through three upsampling processes to restore the output feature map to (W, H, 2), which represents the probability of each pixel in the input image for the belt area and the background; Loss Function , where L det is the weighted sum of classification loss, object loss and bounding box loss, L class and L obj is the focal loss, which is used to reduce the loss of classified samples, thereby forcing the network to focus on samples that are difficult to classify. class For penalized classification, L obj Used to penalize the confidence of a prediction, L box The distance, overlap, scale similarity, and aspect ratio between the predicted box and the ground truth are considered; Belt area division L belt-seg is the cross entropy loss function L for logistic regression ce , whose purpose is to minimize the classification error between the network output pixels and the target, L belt-seg The expression of and the total loss function of the network are as follows:
[0010] Where: The loss function parameters can be tuned to balance all parts.
[0011] By adopting the above technical scheme, the beneficial effects of the present invention are as follows: the present invention first collects the on-site image, uses perspective transformation to correct the image, and then uses the improved yolov5 network model to detect the roller and belt area at the same time: calculates the area of the detected roller, segments the detected belt image, and then uses the improved canny operator to perform edge detection on the segmented area; finally, Hough line detection is used to calculate the area change of the detected roller and whether the detected straight line calculation is offset from the set straight line threshold. When both detection results are judged to be in a deviation state, an alarm is issued for the deviation of the belt conveyor. The two values restrict each other, and finally a more accurate result of the belt deviation is obtained. The method is highly robust, suitable for various complex environments, has strong resistance to poor lighting on site, and has strong noise reduction capabilities. The method can effectively and reliably replace manual inspections, improve the detection efficiency of belt conveyors, reduce enterprise costs, and improve the level of enterprise intelligence. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] Figure 1 The invention discloses a structural diagram of a belt conveyor visual inspection hardware system.
[0013] Figure 2 The invention discloses a flow chart of a conveyor belt deviation detection method.
[0014] Figure 3 It is the original image in the sample image set involved in the present invention.
[0015] Figure 4 yes Figure 3 The rectified image after perspective transformation of the original image.
[0016] Figure 5 This is a schematic diagram of the rectified image after the image is annotated.
[0017] Figure 6 It is a schematic diagram of the P2 feature fusion structure involved in the present invention.
[0018] Figure 7 The invention relates to an improved yolov5 framework belt conveyor anomaly model detection network structure.
[0019] Figure 8 The present invention provides a flow chart of the straight line detection based on Hough transform.
[0020] Fig. 9 The figure is a schematic diagram of the straight line detection effect based on Hough transform involved in the present invention.
[0021] In the figure: Belt conveyor 1; roller 11; belt 12; Camera 2; AP device 3; backend server 4. DETAILED DESCRIPTION
[0022] In order to further explain the technical solution of the present invention, the present invention is described in detail below through specific embodiments.
[0023] The embodiment discloses a conveyor belt deviation detection method, which mainly includes two parts when implemented and applied, including hardware equipment and system algorithm. The hardware equipment is composed of Figure 1 As shown, the system collects the on-site working images of the belt conveyor 1 through the camera 2 installed above the belt conveyor 1, and transmits the image data to the background server 4 through the AP device 3. After the image data is processed by the detection algorithm, the current number of rollers 11 and the deviation of the belt 12 are detected and the results are fed back to the software interface. The process of the conveyor belt deviation detection method of the present invention is as follows Figure 2As shown, the method steps are described in detail below with reference to the accompanying drawings.
[0024] A conveyor belt deviation detection method, the method steps comprising: S1, establish a model training image dataset; S2, use the improved yolov5 network model to train the image dataset; S3, when the conveyor belt deviation detection is working, camera 2 collects and obtains the detection image, and processes the input call of the improved yolov5 network model; The improved yolov5 network model includes roller detection processing and belt area segmentation processing; The roller detection process calculates the area of the roller by drawing frames of the roller positions on both sides of the belt detected by deep learning, and then determines whether the numerical change of the roller area on both sides of the belt exceeds a set threshold; The belt area segmentation process uses an improved Canny operator to extract edges, then uses Hough line detection to determine whether the detected line deviates from a set line threshold; When the judgment result of whether the numerical change of the roller area on both sides of the belt exceeds the set threshold and the judgment result of whether the detected straight line deviates from the threshold of the set straight line are both yes, it is judged that the belt is deviating and the alarm function is activated; when the judgment result of whether the numerical change of the roller area on both sides of the belt exceeds the set threshold or the judgment result of whether the detected straight line deviates from the threshold of the set straight line is no, step S3 is repeated.
[0025] The above step S1 establishes a model training image dataset, which is specifically as follows: S1.1. Collect and detect the original images of the belt conveyor with the corresponding belt roller positions in various states as sample images, prepare deep learning data, and the number of sample images should be relatively large. In the test collection of this embodiment, no less than 3,000 images are collected. Among the collected sample images, images are randomly selected in a ratio of 8:1:1 to produce training sets, test sets, and validation sets (3,000 images are collected in the test, 2,400 images are randomly selected as training sets, 300 images are randomly selected as test sets, and 300 images are randomly selected as validation sets) to obtain a sample image set.
[0026] S1.2. The original image of the sample image set is transformed by the following formula: Perform perspective transformation to obtain the corrected image, such as Figure 3 is the original image, Figure 4 for Figure 3 The corrected image after perspective transformation, where: a 11 and a 22 Controls horizontal and vertical scaling; a 12 and a21 Control the rotation and shearing of the image; a 13 Controls the offset along the horizontal axis; a 23 Controls translation along the vertical axis; a 31 and a 32 Control perspective effects, a 33 Usually set to 1 to normalize homogeneous coordinates, w=1, a 33 =1, u and v are the original image coordinates, x' represents the transformed homogeneous coordinates, y' represents the transformed homogeneous coordinates, w'=1, , , where x and y are the final two-dimensional coordinates after normalization; is the image linear transformation matrix; is the image homography matrix; is the image shift matrix.
[0027] S1.3, annotate the corrected image by manually calibrating the data, such as Figure 5 As shown in the figure, the segmentation area of the roller is marked in the image taken on site, the learning rate is set to 0.0001, the maximum number of iterations is set to 50000, the input batch size is set to 16, the image input size is set to 416pixel*416pixel, the segmentation model is trained, and the fine-tuning technology is used for optimization to achieve a higher recognition accuracy.
[0028] The improved yolov5 network model in step S2 above includes the following improvements: 1. The improved yolov5 backbone network is selected as the backbone of the training model. The neck network (Neck) consists of a spatial pyramid pooling (SPP) module and a feature pyramid network (FPN) module. SPP (SPP stands for spatial pyramid pooling) is used to generate and fuse feature information of different scales, and FPN (FPN stands for feature pyramid network) is used to fuse features of different semantic levels. By improving the model to the above structure, the generated features can contain information of multiple scales and multiple semantic levels.
[0029] 2. The improved yolov5 network model adds a 4x downsampling detection head, which is custom named P2. The detection head can detect the minimum target resolution of 4x4. The feature fusion structure still follows the FPN+PAN structure, such as Figure 6As shown in the figure, in this structure, the definition settings C2, C3, C4, and C5 correspond to the 4-fold, 8-fold, 16-fold, and 32-fold downsampled feature maps extracted by the backbone network, respectively. The definition settings F3 and F4 represent feature fusion layers, and the definition settings P2, P3, P4, and P5 represent detection layers. The Neck network processes the input feature map, first performing upsampling fusion, then downsampling fusion, and finally predicting the fused feature map separately. The P2 detection head fuses the shallow and high-resolution feature maps. During the downsampling process, it can transfer more shallow feature information to the deep feature map, increasing the network depth, which enables the network to better learn the tiny feature information of the target and obtain more small target information, thereby improving the model's ability to detect small targets.
[0030] 3. Introduce the CBAM (Channel Attention Mechanism) attention mechanism in the Neck network to enhance the network's attention to small targets. This change helps reduce noise and background interference. By introducing the attention mechanism, the network can suppress the interference of irrelevant information and retain the key features of the target to be detected, thereby improving the model's analysis ability in complex scenarios. The improved yolov5 framework belt conveyor anomaly model detection network structure, such as Figure 7 shown.
[0031] 4. The improved yolov5 network model includes two decoders, which can be used to complete the two tasks of roller detection and belt area segmentation at the same time. The detection head is similar to the YOLO model, and adopts an anchor-based multi-scale detection scheme (the three heads in the network are specific decoders for three tasks, namely detect head, Drivable Area Segment Head and Lane Line Segment Head. Here, it is the detect head detection head, whose network is responsible for identifying objects in the image and determining their positions and categories). Using the structure of the path aggregation network, the positioning features can be passed from bottom to top, and then the multi-scale fusion feature map is used for detection. The multi-scale feature map of each network will be assigned three prior anchors with different aspect ratios. The detection head will predict the position offset and scale the height and width, and predict the probability corresponding to each category and the confidence of the prediction.
[0032] 5. The size of the original image is (W, H, 3), the size of the bottom segmentation branch of FPN is (W / 8, H / 8, 256), and the belt area segmentation head (here is the segmentation head, this part of the network is responsible for segmenting the position and shape of the belt from the image) undergoes three upsampling processes to restore the output feature map to (W, H, 2), which represents the probability of each pixel in the input image for the belt area and the background.
[0033] 6. Loss function expression , where L det is the weighted sum of classification loss, object loss and bounding box loss, L class and L obj is the focal loss, which is used to reduce the loss of classified samples, thereby forcing the network to focus on samples that are difficult to classify. class For penalized classification, L obj Used to penalize the confidence of a prediction, L box The distance, overlap, scale similarity, and aspect ratio between the predicted box and the ground truth are considered, where: is a loss function parameter that can be tuned to balance all parts.
[0034] 7. Belt area segmentation (L belt-seg ) is the cross entropy loss function L for logistic regression ce , whose purpose is to minimize the classification error between the network output pixels and the target, L belt-seg The expression is , the total loss function expression of the network is , where: is a loss function parameter that can be tuned to balance all parts.
[0035] 8. In the above step S3, the improved Canny operator is used to extract the edge. The improved Canny edge detection algorithm can effectively reduce noise and extract the shape edge. The traditional Canny operator only extracts the gradients in the x and y directions for calculation, but still loses some very important edge information in the oblique direction. Therefore, the gradient information in the two oblique directions of the image should be calculated again. Finally, the original gradient information and the information in the oblique direction are combined to obtain the final edge image. Specifically, two diagonal templates are used to perform weighted average on the pixels in the image, and the gradients of the image in the two oblique directions can be calculated. The two diagonal templates are as follows: , The gradient corresponding to the first diagonal template is calculated as , The gradient corresponding to the second diagonal template is calculated as , Taking the square root, the gradient in the diagonal direction is , where: G1 ’ Represents the gradient in the oblique direction of the first diagonal template, G2 ’ Represents the gradient of the second diagonal template in the oblique direction, G ’Represents the gradient amplitude. Assuming that the gradient image proposed based on the x-direction and y-direction is G1, and the gradient image extracted in the oblique direction using the diagonal template is G2, the integrated image gradient is , double threshold processing is performed on G3 to obtain the edge image G4.
[0036] The mean sharpening method is used in the above edge extraction to reduce various interferences to the image during the transformation process. Sharpening makes the blurred details of the edges and contours clearer and highlights the edge information of the image.
[0037] In the above step S3, Hough line detection is performed. Hough transform is sensitive to noise in the image. The feature extraction algorithm of Hough transform is used to calculate the local maximum of the cumulative result in a parameter space to obtain a set that conforms to the feature shape as the Hough transform result. Line detection based on Hough transform has the advantages of strong noise resistance and high robustness. The algorithm flow is as follows: Figure 8 As shown. Line detection based on Hough transform realizes a mapping relationship from image space to parameter space. The equation of the line in the Cartesian coordinate system is y=ax+b, where x represents the independent variable, y represents the target variable, a represents the slope, and b represents the intercept. The corresponding line equation in the polar coordinate system is , where: ρ is the distance from the origin to the straight line; θ is the angle between ρ and the X-axis. Fig. 9 The straight line detection effect diagram shown in the figure compares and calculates the detected straight line with the set straight line deviation threshold. If the detected straight line exceeds the set straight line threshold range, the test result is Y, otherwise it is N.
[0038] In the above step S3, the area of the roller is calculated by drawing a frame of the roller position on both sides of the belt. Specifically, the position (x, y) and size (w, h) of the rollers on both sides of the belt are obtained by the improved yolov5 network model, and the position of the roller is drawn. The area of the roller S = w*h is calculated from the size of the roller (w, h). The original area of the roller is S0, and the formula Calculate the relative change rate of the area of the rollers on the left and right sides of the belt. When △S on both sides ≥ the set threshold (±5%), the test result is recorded as Y. When △S < the set threshold (±5%), the test result is recorded as N.
[0039] Through the above method, when the area change detection of the roller and the straight line threshold calculation detection are both Y, the belt is judged to be in a deviation state and an alarm function is performed. The results of the test operation show that the above method of the present invention can effectively detect and judge the abnormal situation of the belt deviation of the belt conveyor.
[0040] The present invention combines deep learning with an improved yolov5 model to complete the detection of roller status information and the segmentation of belt areas. The invention has strong robustness and is suitable for various complex environments. The improved canny operator is used for edge detection, and the invention has strong resistance to poor illumination on site and strong noise reduction capability. The Hough straight line detection is used and calculated with the set straight line threshold. The area change of the rollers on both sides of the belt is calculated at the same time. When both detections are judged as deviation, an alarm is issued for the deviation. The two values restrict each other to avoid the uncertainty caused by a single condition, and more accurately judge whether the belt is abnormally deviated.
[0041] The above embodiments and drawings do not limit the product form and style of the present invention. Any appropriate changes or modifications made by ordinary technicians in the relevant technical field should be deemed to be within the patent scope of the present invention.
Claims
1. An improved yolov5 network model, characterized in that: The improvements include: selecting the backbone network of the improved yolov5 network model as the backbone of the training model, the neck network consists of a spatial pyramid pool module and a feature pyramid network module, the spatial pyramid pool module is used to generate and fuse feature information of different scales, and the feature pyramid network module is used to fuse features of different semantic levels, so that the features generated by the model contain information of multiple scales and multiple semantic levels; The improved yolov5 network model adds a 4x down-sampling detection head, which is custom named P2. The detection head can detect the minimum target resolution of 4x4. The feature fusion structure follows the FPN+PAN structure. In this structure, the definition settings C2, C3, C4, and C5 correspond to the 4x, 8x, 16x, and 32x down-sampling feature maps extracted by the backbone network, respectively. The definition settings F3 and F4 represent the feature fusion layer, and the definition settings P2, P3, P4, and P5 represent the detection layer. The neck network processes the input feature map, first performing up-sampling fusion, then down-sampling fusion, and finally making a separate prediction on the fused feature map. Introducing the CBAM attention mechanism in the neck network; In the improved yolov5 network model, two decoders are used to complete the two tasks of roller detection and belt area segmentation respectively. An anchor-based multi-scale detection scheme is adopted, and the structure of the path aggregation network is used to transfer the positioning features from bottom to top. Then, the multi-scale fusion feature map is used for detection. The multi-scale feature map of each network will be assigned three prior anchors with different aspect ratios. The detection head will predict the position offset and scale the height and width, and predict the probability corresponding to each category and the confidence of the prediction. In the improved yolov5 network model, an improved canny operator is used for edge extraction. The improved canny operator uses two diagonal templates to perform weighted averaging on the pixels in the image and calculate the gradient of the image in two oblique directions. The two diagonal templates are as follows: , The gradient corresponding to the first diagonal template is calculated as , The gradient corresponding to the second diagonal template is calculated as , Taking the square root, the gradient in the diagonal direction is , where: G1 ’ Represents the gradient in the oblique direction of the first diagonal template, G2 ’ Represents the gradient of the second diagonal template in the oblique direction, G ’ Represents the gradient amplitude. Assuming that the gradient image proposed based on the x-direction and y-direction is G1, and the gradient image extracted in the oblique direction using the diagonal template is G2, the integrated image gradient is , perform double threshold processing on G3 to obtain edge image G4; Set the size of the original image to (W, H, 3), set the size of the bottom segmentation branch of FPN to (W / 8, H / 8, 256), and the belt area segmentation head goes through three upsampling processes to restore the output feature map to (W, H, 2), which represents the probability of each pixel in the input image for the belt area and the background; Loss Function , where L det is the weighted sum of classification loss, object loss and bounding box loss, L class and L obj is the focal loss, which is used to reduce the loss of classified samples, thereby forcing the network to focus on samples that are difficult to classify. class For penalized classification, L obj Used to penalize the confidence of a prediction, L box The distance, overlap, scale similarity, and aspect ratio between the predicted box and the ground truth are considered; Belt area division L belt-seg is the cross entropy loss function L for logistic regression ce , whose purpose is to minimize the classification error between the network output pixels and the target, L belt-seg The expression of and the total loss function of the network are as follows: Where: The loss function parameters can be tuned to balance all parts.
2. A conveyor belt deviation detection method, comprising an improved yolov5 network model as claimed in claim 1, characterized in that: The method steps include: S1, establish a model training image dataset; S2, use the improved yolov5 network model to train the image dataset; S3, when the conveyor belt deviation detection is working, the camera collects the detection image and processes the input call of the improved yolov5 network model; The improved yolov5 network model includes roller detection processing and belt area segmentation processing; The roller detection process calculates the area of the roller by drawing frames of the roller positions on both sides of the belt detected by deep learning, and then determines whether the numerical change of the roller area on both sides of the belt exceeds a set threshold; The belt area segmentation process uses an improved Canny operator to extract edges, then uses Hough line detection to determine whether the detected line deviates from a set line threshold; When the judgment result of whether the numerical change of the roller area on both sides of the belt exceeds the set threshold and the judgment result of whether the detected straight line deviates from the threshold of the set straight line are both yes, it is judged that the belt is deviating and the alarm function is activated; when the judgment result of whether the numerical change of the roller area on both sides of the belt exceeds the set threshold or the judgment result of whether the detected straight line deviates from the threshold of the set straight line is no, step S3 is repeated.
3. A conveyor belt deviation detection method as claimed in claim 2, characterized in that: In step S3, Hough line detection is performed. The line detection based on Hough transform realizes a mapping relationship from image space to parameter space. The line equation in the Cartesian coordinate system is y=ax+b, where x represents the independent variable, y represents the target variable, a represents the slope, and b represents the intercept. The line equation corresponding to the polar coordinate system is , where ρ is the distance from the origin to the straight line; θ is the angle between ρ and the X-axis. The detected straight line is compared with the set straight line deviation threshold. If the detected straight line exceeds the set straight line threshold range, the test result is Y, otherwise it is N.
4. A conveyor belt deviation detection method as claimed in claim 2 or 3, characterized in that: In step S3, the area of the rollers is calculated by drawing frames of the roller positions on both sides of the belt. Specifically, the positions and sizes of the rollers on both sides of the belt are obtained by using the improved yolov5 network model, and the positions of the rollers are drawn frames. The area of the rollers S is calculated from the size of the rollers. The original area of the rollers is S0, and the formula Calculate the relative rate of change of the area of the rollers on the left and right sides of the belt. When △S on both sides ≥ the set threshold, the test result is recorded as Y, and when △S < the set threshold, the test result is recorded as N.
Citation Information
Patent Citations
Belt deviation recognition algorithm based on inspection robot
CN115661707A
Belt deviation visual detection method capable of eliminating linear interference
CN115797321A
Deviation monitoring method for conveying belt of belt conveyor based on deep learning
CN114155494A
Method for detecting densely occluded fish based on YOLOv5 network
US11790640B1
Cited By
Coal mine belt deviation detection method based on regional mask constraint and motion feature
CN122821485A