Belt deviation detection method and device and storage medium

By training and determining the degree of belt misalignment using the YOLOv8 model, the problem of low accuracy and speed in belt misalignment detection was solved, achieving high-precision and high-speed belt misalignment detection and improving the automation and safety of industrial production.

CN121746677APending Publication Date: 2026-03-27ZHUHAI TAIHE QUANTUM INTELLIGENCE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-03
Publication Date
2026-03-27

AI Technical Summary

Technical Problem

Existing belt misalignment detection methods suffer from low accuracy and speed, especially in complex industrial settings, particularly under harsh conditions such as changing lighting and dust interference, where the detection results are unsatisfactory.

Method used

The YOLOv8 model is used to train the belt conveyor image data. By obtaining the standard and actual distances, and combining the deviation threshold, the degree of belt deviation is determined, and the sound and light alarms and shutdown operations are triggered.

Benefits of technology

It enables high-precision, high-speed belt misalignment detection under complex working conditions, reducing manual intervention and improving the automation level and safety of industrial production.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121746677A_ABST
    Figure CN121746677A_ABST
Patent Text Reader

Abstract

The invention discloses a belt deviation detection method and device and a storage medium, and the method comprises the steps: collecting an image through an industrial camera, enabling a training image to be used for the training of a YOLOv8 model, enabling a standard image to be used for calculating the standard distance L0 between the left edge of a belt and the left end of a carrier roller, and the standard distance R0 between the right edge of the belt and the right end of the carrier roller, the to-be-detected image is used for calculating the actual distance L between the left edge of the belt and the left end of the carrier roller and the distance R between the right edge of the belt and the actual right end of the carrier roller; and then the specific deviation degree of the belt is judged according to the difference degree between L0 and L and the difference degree between R0 and R. According to the invention, the technical problems of low belt deviation detection precision and speed in the prior art can be solved, and the belt deviation degree can be identified more quickly and more accurately.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image detection technology, and in particular to a method, apparatus and storage medium for detecting belt misalignment. Background Technology

[0002] In industrial production, belt conveyor systems are key equipment for material handling; however, belt misalignment has always been a significant factor affecting their stable operation.

[0003] Traditional belt misalignment detection methods rely on mechanical contact sensors, but these sensors are susceptible to environmental interference, and wear and tear on mechanical parts after prolonged use leads to decreased detection accuracy. With the development of industrial intelligence, machine vision-based inspection technologies have gradually emerged. However, early visual inspection methods suffer from inaccurate identification of key targets such as belt edges and idlers in complex industrial scenarios, especially under harsh conditions such as changing lighting and dust interference, resulting in poor detection performance. In recent years, deep learning technology has made breakthroughs in the field of computer vision, bringing new opportunities to industrial inspection. The YOLO series of object detection algorithms, with their high detection speed and high accuracy, have been applied in numerous scenarios. Summary of the Invention

[0004] This invention aims to at least partially solve one of the technical problems in the related art. Therefore, one object of this invention is to provide a method, apparatus, and storage medium for detecting belt misalignment, which can solve the technical problems of low accuracy and speed in belt misalignment detection in the prior art, and can identify the degree of belt misalignment more quickly and accurately.

[0005] The technical solution adopted in this invention is: In a first aspect, the present invention provides a method for detecting belt misalignment, the method comprising: S11: acquiring training belt transport image data, standard belt transport image data, and belt transport image data to be detected; S12: training a YOLOv8 model using the training belt transport image data to obtain a trained YOLOv8 model; S13: inputting the standard belt transport image data into the trained YOLOv8 model to obtain a first output image, and obtaining the standard distance L0 between the left edge of the belt and the left end of the idler roller and the standard distance R0 between the right edge of the belt and the right end of the idler roller from the first output image; S14: inputting the belt transport image data to be detected into the trained YOLOv8 model to obtain a second output image, and obtaining the actual distance L between the left edge of the belt and the left end of the idler roller and the actual distance R between the right edge of the belt and the right end of the idler roller from the second output image; S15: setting a misalignment threshold, and determining the degree of belt misalignment based on the relationship between the distance between L and L0, the distance between R and R0, and the misalignment threshold.

[0006] Specifically, S11 includes: acquiring image data of both belts and idlers simultaneously using an industrial camera under three conditions: training condition, standard condition, and test condition. The number of images acquired under the training condition is extremely large, the number of images acquired under the standard condition is multiple, and the number of images acquired under the test condition is one or a few. The image data is then preprocessed to generate the training belt transport image data, the standard belt transport image data, and the test belt transport image data.

[0007] Specifically, S12 includes: dividing the training belt transport image data into a training set and a validation set; using the training set to train the YOLOv8 model; using the validation set to validate the YOLOv8 model; and if the validation result is not up to standard, supplementing with interference data to enhance the model and then retraining.

[0008] S13 includes: filtering the first output image using NMS to remove redundant bounding boxes, retaining only the bounding boxes of the two detected targets, the belt and the idler; obtaining the standard coordinates of the left edge of the belt, the right edge of the belt, the left side of the idler, and the right side of the idler from the first output image; obtaining the pixel-to-physical distance conversion ratio; and calculating the standard distance L0 between the left edge of the belt and the left end of the idler, and the standard distance R0 between the right edge of the belt and the right end of the idler.

[0009] Specifically, S14 includes: filtering the second output image using NMS to remove redundant bounding boxes, retaining only the bounding boxes of the two detected targets, the belt and the idler; obtaining the actual coordinates of the left edge of the belt, the right edge of the belt, the left side of the idler, and the right side of the idler from the second output image; and calculating the actual distance L between the left edge of the belt and the left end of the idler, and the actual distance R between the right edge of the belt and the right end of the idler, based on the pixel-to-physical distance conversion ratio.

[0010] S15 includes: setting a first threshold. For slight deviation threshold, second threshold For moderate deviation threshold, third threshold This represents the threshold for severe deviation. if and If the belt under test is found to be slightly deviated to the left, it is determined that the belt under test is slightly deviated to the left. if and If the belt under test is found to be slightly deviated to the right, it is determined that the belt under test is slightly deviated to the right. if and If so, it is determined that the belt to be tested is moderately deviated to the left; if and If so, it is determined that the belt to be tested is moderately deviated to the right; if and If so, it is determined that the belt to be tested is severely deviated to the left; if and If so, it is determined that the belt to be tested is seriously deviating to the right; if and If so, it is determined that the belt to be tested is suspected of slightly deviating to the left; if and If the belt under test is suspected to be slightly misaligned to the right, then it is determined that the belt under test is slightly misaligned to the right. if and If so, the belt to be tested is suspected to be moderately misaligned to the left; if and If so, the belt to be tested is suspected to be moderately misaligned to the right; if and If so, it is determined that the belt to be tested is suspected of being seriously misaligned to the left; if and If the belt under test is found to be seriously misaligned to the right, then it is determined that the belt under test is suspected of being seriously misaligned.

[0011] S15 further includes: triggering an audible and visual alarm and stopping the machine based on the degree of belt misalignment, and displaying the degree of belt misalignment on the display screen in a visual manner.

[0012] Secondly, the present invention provides a belt misalignment detection device, comprising: an image data acquisition module for acquiring training belt transport image data, standard belt transport image data, and belt transport image data to be detected; a model training module for training a YOLOv8 model using the training belt transport image data to obtain a trained YOLOv8 model; a standard distance calculation module for inputting the standard belt transport image data into the trained YOLOv8 model to obtain a first output image, and obtaining the standard distance L0 between the left edge of the belt and the left end of the idler roller and the standard distance R0 between the right edge of the belt and the right end of the idler roller from the first output image; an actual distance calculation module for inputting the belt transport image data to be detected into the trained YOLOv8 model to obtain a second output image, and obtaining the actual distance L between the left edge of the belt and the left end of the idler roller and the actual distance R between the right edge of the belt and the right end of the idler roller from the second output image; and a belt misalignment determination module for setting a misalignment threshold and determining the degree of belt misalignment based on the relationship between the distance between L and L0, the distance between R and R0, and the misalignment threshold.

[0013] It also includes a linkage and visualization module, which is used to trigger audible and visual alarms and shutdown operations based on the degree of belt misalignment, and to display the degree of belt misalignment on the display screen in a visual manner.

[0014] Thirdly, the present invention provides a computer-readable storage medium storing computer-executable instructions for causing a computer to perform the method described above.

[0015] The beneficial effects of this invention are: This invention uses an industrial camera to acquire images. Training images are used to train the YOLOv8 model. Standard images are used to calculate the standard distance L0 between the left edge of the belt and the left end of the idler roller, and the standard distance R0 between the right edge of the belt and the right end of the idler roller. Images to be detected are used to calculate the actual distance L between the left edge of the belt and the left end of the idler roller, and the actual distance R between the right edge of the belt and the right end of the idler roller. Then, based on the difference between L0 and L, and between R0 and R, the specific degree of belt misalignment is determined. Because the YOLOv8 model has high accuracy and speed in visual detection, this invention achieves high detection accuracy and speed.

[0016] In addition, this invention improves the accuracy of the trained model by supplementing it with interference data during model training. It also employs multi-frame verification when obtaining both the standard distance between the belt and the idler and the actual distance between the belt and the idler, thus effectively addressing complex working conditions such as changes in light, dust interference, and equipment obstruction in industrial settings, providing a reliable basis for accurately determining whether the belt is misaligned.

[0017] Furthermore, the detection results of this invention are linked to the PLC, automatically triggering audible and visual warnings, machine shutdown, and other operations, and recording logs. This achieves automation and intelligence from detection to response to abnormal situations, reducing manual intervention and improving the automation level and safety of industrial production. Simultaneously, a visual display of the screen and detection offset values ​​allows staff to intuitively grasp the belt's operating status. Attached Figure Description

[0018] Figure 1 This is a schematic diagram of the belt and idler roller in the belt misalignment detection method of the present invention; Figure 2 This is a schematic flowchart of an embodiment of a belt misalignment detection method of the present invention; Figure 3 yes Figure 1 A flowchart illustrating an embodiment of step S11; Figure 4 yes Figure 1 A flowchart illustrating an embodiment of step S12; Figure 5 yes Figure 1 A flowchart illustrating an embodiment of step S13; Figure 6 yes Figure 1 A flowchart illustrating an embodiment of step S14; Figure 7 (a), 7 (b), and 7 (c) are Figure 1 A schematic diagram of the structure of an embodiment of step S15; Figure 8 This is a schematic diagram of another embodiment of the belt misalignment detection method of the present invention; Figure 9 This is a schematic diagram of an embodiment of a belt misalignment detection device of the present invention; Figure 10 yes Figure 9 A flowchart of an embodiment of the image data acquisition module 11; Figure 11 yes Figure 9 A flowchart illustrating an embodiment of the model training module 12; Figure 12 yes Figure 9 A flowchart illustrating an embodiment of the standard distance calculation module 13; Figure 13 yes Figure 9 A flowchart illustrating an embodiment of the actual distance calculation module 14; Figure 14 yes Figure 9 A flowchart illustrating an embodiment of the belt misalignment determination module 15; Figure 15 This is a schematic diagram of another embodiment of the belt misalignment detection device of the present invention. Detailed Implementation

[0019] It should be noted that, unless otherwise specified, the embodiments and features described in this application can be combined with each other.

[0020] The basic concept of this invention is as follows: Please refer to Figure 1 In the belt misalignment detection method, the belt is placed on an idler roller. Under normal (i.e., standard) belt operation, the distance between the left edge (leftmost) of the belt and the left side (leftmost) of the idler roller is constant, and the distance between the right edge (leftmost) of the belt and the right side (rightmost) of the idler roller is also constant. These two distances remain fixed during normal belt operation. When the belt misaligns, these two distances change. This invention determines the degree of belt misalignment based on these changes.

[0021] Example 1 Please see Figure 2 , Figure 2 This is a schematic flowchart of an embodiment of a belt misalignment detection method according to the present invention. Figure 2 As shown, the method includes the following steps: S11: Acquire training belt transport image data, standard belt transport image data, and belt transport image data to be detected; Specifically, please refer to Figure 3 Step S11 includes the following sub-steps: S111: Under three conditions—training, standard, and testing—image data of both belts and idlers are acquired using an industrial camera. An industrial camera is positioned at a specific location above the belt, enabling it to capture images of the belt containing both the belt and idler rollers.

[0022] Understandably, the number of images acquired during training is extremely large, i.e., tens of thousands. The number of images acquired during standard operation and during detection is multiple, preferably ten or several dozen images (taking the average). The number of images acquired during detection is one or a few (to avoid missing detection in a single frame), i.e., the image captured at the detection moment.

[0023] S112: Preprocess the image data to generate the image data of the belt conveyor to be detected, the image data of the standard belt conveyor, and the image data of the training belt conveyor.

[0024] After acquiring the image data, the image data is preprocessed.

[0025] It should be noted that, in addition to preprocessing, the image data collected during training also requires manual annotation. During manual annotation, key target areas such as belt edges and idlers are labeled to provide foundational data for model training.

[0026] S12: Use the training belt conveyor image data to train the YOLOv8 model and obtain the trained YOLOv8 model; Specifically, please refer to Figure 4 Step S12 includes the following sub-steps: S121: Divide the training belt transport image data into a training set and a validation set; Specifically, the training belt conveyor image data is divided into a training set and a validation set according to a preset ratio. This preset ratio can be 8:2, 7:3, or other values.

[0027] S122: Use this training set to train the YOLOv8 model; For the training of the YOLOv8 model, please refer to the methods in the existing technology; this application will not elaborate on them.

[0028] S123: Use this validation set to validate the YOLOv8 model. If the validation results are not satisfactory, supplement with interference data and retrain.

[0029] The verification method for the YOLOv8 model is described in detail in this application, referring to existing techniques. If the verification result fails, the model is augmented with additional interference data and then returned to step S122 for training. After training, the trained YOLOv8 model is verified in step S123 to see if it meets the requirements. Steps S122 and S123 are repeated until the trained YOLOv8 model meets the requirements.

[0030] After training the YOLOv8 model, export the trained model in ONNX format. Deploy it to the machine using TensorRT. Use the trtexec tool (command-line tool) or the Python / C++ API to convert the ONNX model into the TensorRT Engine and perform optimization operations such as accuracy calibration (e.g., INT8), layer fusion, and kernel selection. Deploy the generated serialized engine file (.plan or .engine) to the target device, and you can then call TensorRT for inference in your application.

[0031] S13: Input the standard belt conveyor image data into the trained YOLOv8 model to obtain the first output image, and obtain the standard distance L0 between the left edge of the belt and the left end of the idler roller and the standard distance R0 between the right edge of the belt and the right end of the idler roller from the first output image; Please see Figure 5 Step S13 includes the following sub-steps: S131: The first output image is filtered by NMS to remove redundant bounding boxes, leaving only the bounding boxes of the belt and the idler roller. S132: Obtain the standard coordinates of the left edge of the belt, the standard coordinates of the right edge of the belt, the standard coordinates of the left side of the idler roller, and the standard coordinates of the right side of the idler roller from the first output image; Define the top left corner of the image as the origin, the horizontal axis to the right as the x-axis, and the vertical axis downwards as the y-axis.

[0032] Select the idler roller area in the image, ensuring complete coverage of both the left and right ends of the idler roller; take the pixel row at the middle 1 / 3 height of the idler roller (to avoid distortion at the top and bottom edges); extract the minimum x-coordinate of the "left end of the idler roller" in this row as the standard coordinate D_left0 for the left side of the idler roller, and extract the maximum x-coordinate of the "right end of the idler roller" in this row as the standard coordinate D_right0 for the right side of the idler roller.

[0033] When the belt is running normally in the center, the average x-coordinate of the "left edge of the belt" is extracted as the standard coordinate of the left edge of the belt B_left0, and the average x-coordinate of the "right edge of the belt" is extracted as the standard coordinate of the right edge of the belt B_right0.

[0034] It should be noted that steps S131 and S132 are repeated, that is, 10 frames of images are continuously acquired to obtain coordinate values, resulting in 10 sets of standard coordinate values ​​for the belt and idler. Then, the average value of these 10 sets of data is taken to obtain the average standard coordinate value of the belt and idler as the final calculation result. This can reduce single-frame fluctuations.

[0035] S133: Obtain pixel-to-physical distance conversion ratio; Measure the actual physical length of the roller (L_real, e.g., 1000mm) on-site with a tape measure; calculate the pixel length of the roller in the image (L_pixel=D_right0-D_left0, e.g., 1000 pixels); the pixel-physical distance conversion ratio k=L_real / L_pixel (e.g., 1 pixel = 1mm).

[0036] S134: Calculate the standard distance L0 between the left edge of the belt and the left end of the idler roller, and the standard distance R0 between the right edge of the belt and the right end of the idler roller.

[0037] The calculation formula is as follows: L0=(B_left0-D_left0)×k; R0=(D_right0-B_right0)×k.

[0038] S14: Input the standard belt conveyor image data into the trained YOLOv8 model to obtain the second output image; obtain the actual distance L between the left edge of the belt and the left end of the idler roller, and the distance R between the right edge of the belt and the actual right end of the idler roller from the second output image; Specifically, please refer to Figure 6 Step S14 includes the following sub-steps: S141: The second output image is filtered by NMS to remove redundant bounding boxes, leaving only the bounding boxes of the belt and roller targets. The filtering method in step S141 is the same as that in step S131.

[0039] S142: Obtain the actual coordinates of the left edge of the belt, the actual coordinates of the right edge of the belt, the actual coordinates of the left side of the idler roller, and the actual coordinates of the right side of the idler roller from the second output image; The method for obtaining coordinates in step S142 is the same as in step S132.

[0040] Mark the actual coordinates of the left edge of the belt as B_left, the actual coordinates of the right edge of the belt as B_right, the actual coordinates of the left side of the idler roller as D_left, and the actual coordinates of the right side of the idler roller as D_right.

[0041] S143: Based on the pixel-to-physical distance conversion ratio, calculate the actual distance L between the left edge of the belt and the left end of the idler roller, and the actual distance R between the right edge of the belt and the right end of the idler roller.

[0042] The pixel-to-physical distance conversion ratio k is the value calculated in step S133.

[0043] Therefore, the actual distance between the left edge of the belt and the left end of the idler roller is L = (B_left - D_left) × k, and the actual distance between the right edge of the belt and the right end of the idler roller is R = (D_right - B_right) × k.

[0044] S15: Set the deviation threshold, and determine the degree of deviation of the belt to be tested based on the relationship between the distance between L and L0, the distance between R and R0 and the deviation threshold.

[0045] Please refer to this as well. Figure 7 (a) and Figure 7 (b) It can be seen that when the belt deviates to the left, the position of the belt will move to the left, and the actual distance L between the left edge of the belt and the left end of the idler will become smaller, while the actual distance R between the right edge of the belt and the right end of the idler will become larger.

[0046] Please refer to this as well. Figure 7 (a) and Figure 7 (c) It can be seen that when the belt deviates to the right, the position of the belt will move to the right. Then the actual distance L between the left edge of the belt and the left end of the idler will increase, and the actual distance R between the right edge of the belt and the right end of the idler will decrease.

[0047] Set the first threshold For slight deviation threshold, second threshold For moderate deviation threshold, third threshold This represents the threshold for severe deviation. (1) If and If the belt under test is found to be slightly deviated to the left, it is determined that the belt under test is slightly deviated to the left. (2) If and If the belt under test is found to be slightly deviated to the right, it is determined that the belt under test is slightly deviated to the right. (3) If and If so, it is determined that the belt to be tested is moderately deviated to the left; (4) If and If so, it is determined that the belt to be tested is moderately deviated to the right; (5) If and If so, it is determined that the belt to be tested is severely deviated to the left; (6) If and If so, it is determined that the belt to be tested is seriously deviating to the right; (7) If and If so, it is determined that the belt to be tested is suspected of slightly deviating to the left; (8) If and If the belt under test is suspected to be slightly misaligned to the right, then it is determined that the belt under test is slightly misaligned to the right. (9) If and If so, the belt to be tested is suspected to be moderately misaligned to the left; (10) If and If so, the belt to be tested is suspected to be moderately misaligned to the right; (11) If and If so, it is determined that the belt to be tested is suspected of being seriously misaligned to the left; (12) If and If the belt under test is found to be seriously misaligned to the right, then it is determined that the belt under test is suspected of being seriously misaligned.

[0048] For example: Example 1: If L=85mm, L0=100mm, R=115mm, R0=100mm, set 5mm as the threshold for "slight belt misalignment" and 15mm as the threshold for "severe belt misalignment". Because L=85mm<100-5=95mm, and R=115mm>100+5=105mm, the belt is judged to be misaligned to the left by a moderate degree. Example 2: If L=120mm, L0=100mm, R=80mm, R0=100mm, since R=80mm<100-5=95mm and L=120mm>100+5=105mm, then it is determined that the vehicle is seriously veering to the right. Example 3: If L=90mm, L0=100mm, R=80mm, R0=100mm, since L=90mm<100-5=95mm, but R=102mm<100+5=105mm, then the belt is suspected to be slightly misaligned to the left.

[0049] Example 2 Please see Figure 8 , Figure 8 This is a schematic flowchart of another embodiment of a belt misalignment detection method according to the present invention. Figure 8 As shown, this method is similar to Figure 2 The difference in the method is that it also includes step S26.

[0050] S26: Based on the degree of belt misalignment, an audible and visual alarm and a shutdown operation are triggered, and the degree of belt misalignment is displayed on the screen in a visual manner.

[0051] Based on the detection results of step S25, a judgment is made. If deviation is determined, the PLC is activated to trigger audible and visual warnings, shutdown, and other operations, and the data is recorded in the log. Simultaneously, the detected deviation and other values ​​are overlaid on the screen in real time for easy viewing by staff.

[0052] Preferably, a "true deviation" is determined only when all three detection results in step S25 meet the deviation condition in the same direction. If a detection result is abnormal but subsequent frames return to normal, it is determined as "noise interference" and no warning is triggered. For moderate deviation, a yellow light illuminates and an intermittent buzzer sounds; for severe deviation, a red light illuminates and a continuous buzzer sounds, ultimately stopping the machine via the PLC.

[0053] Example 3

[0054] Please see Figure 9 , Figure 9 This is a schematic diagram of an embodiment of a belt misalignment detection device according to the present invention. Figure 9As shown, the detection device includes an image data acquisition module 11, a model training module 12, a standard distance calculation module 13, an actual distance calculation module 14, and a belt deviation determination module 15.

[0055] The image data acquisition module 11 is used to acquire training belt conveyor image data, standard belt conveyor image data, and belt conveyor image data to be detected. For details, please refer to... Figure 10 The image data acquisition module 11 includes an image data acquisition unit 111 and an image data processing unit 112. The image data acquisition unit 111 is used to acquire image data of both the belt and idler rollers simultaneously using an industrial camera under three conditions: training condition, standard condition, and condition to be tested. The image data processing unit 112 is used to preprocess the image data to generate the training belt transport image data, the standard belt transport image data, and the condition to be tested belt transport image data.

[0056] The model training module 12 is used to train the YOLOv8 model using the training belt conveyor image data, resulting in a trained YOLOv8 model. For details, please refer to [link / reference needed]. Figure 11 The model training module 12 includes a dataset partitioning unit 121, a model training unit 122, and a model validation unit 123. The dataset partitioning unit 121 is used to divide the training belt conveyor image data into a training set and a validation set. The model training unit 122 is used to train the YOLOv8 model using the training set. The model validation unit 123 is used to validate the YOLOv8 model using the validation set. If the validation result is unsatisfactory, interference data is added to augment the model, and then training is performed again.

[0057] The standard distance calculation module 13 is used to input the standard belt conveyor image data into the trained YOLOv8 model to obtain a first output image, and to obtain the standard distance L0 between the left edge of the belt and the left end of the idler roller, and the standard distance R0 between the right edge of the belt and the right end of the idler roller from the first output image. For details, please refer to... Figure 12The standard distance calculation module 13 includes a first output image filtering unit 131, a belt and idler roller standard coordinate acquisition unit 132, a pixel-to-physical distance conversion ratio acquisition unit 133, and a standard distance calculation unit 134. The first output image filtering unit 131 filters the first output image using NMS (Non-Maximum Suppression) to remove redundant bounding boxes, retaining only the bounding boxes of the belt and idler roller as the two detected targets. The belt and idler roller standard coordinate acquisition unit 132 acquires the standard coordinates of the left edge of the belt, the right edge of the belt, the left side of the idler roller, and the right side of the idler roller from the first output image. The pixel-to-physical distance conversion ratio acquisition unit 133 acquires the pixel-to-physical distance conversion ratio. The standard distance calculation unit 134 calculates the standard distance L0 between the left edge of the belt and the left end of the idler roller, and the standard distance R0 between the right edge of the belt and the right end of the idler roller.

[0058] The actual distance calculation module 14 is used to input the image data of the belt conveyor to be detected into the trained YOLOv8 model to obtain a second output image, and to obtain the actual distance L between the left edge of the belt and the left end of the idler roller, and the distance R between the right edge of the belt and the right end of the idler roller from the second output image. For details, please refer to... Figure 13 The actual distance calculation module 14 includes a second output image filtering unit 141, a belt and idler actual coordinate acquisition unit 142, and an actual distance calculation unit 143. The second output image filtering unit 141 filters the second output image using NMS (Network Memory Management) to remove redundant bounding boxes, retaining only the bounding boxes of the belt and idler as the two detected targets. The belt and idler actual coordinate acquisition unit 142 acquires the actual coordinates of the left edge of the belt, the right edge of the belt, the left side of the idler, and the right side of the idler from the second output image. The actual distance calculation unit 143 calculates the actual distance L between the left edge of the belt and the left end of the idler, and the actual distance R between the right edge of the belt and the right end of the idler, based on the pixel-to-physical distance conversion ratio.

[0059] The belt misalignment detection module 15 is used to set a misalignment threshold and determine the degree of belt misalignment based on the relationship between the distances between L and L0, the distances between R and R0, and this misalignment threshold. For details, please refer to... Figure 14 The belt misalignment detection module 15 includes the following units: Deviation threshold setting unit 151 is used to set the first threshold. For slight deviation threshold, second threshold For moderate deviation threshold, third threshold This is the threshold for severe deviation.

[0060] Slight deviation to the left determination unit 152, used if and If so, it is determined that the belt to be tested is slightly deviated to the left.

[0061] Slight rightward deviation determination unit 153, used if and If so, it is determined that the belt to be tested is slightly deviated to the right.

[0062] Left moderate deviation determination unit 154, used to determine if and If so, it is determined that the belt to be tested is moderately deviated to the left.

[0063] The rightward moderate deviation determination unit 155 is used to determine if... and If so, it is determined that the belt to be tested is moderately deviated to the right.

[0064] The leftward deviation determination unit 156 is used to determine if... and If so, it is determined that the belt to be tested is seriously deviated to the left.

[0065] The rightward deviation determination unit 157 is used to determine if... and If so, it is determined that the belt to be tested is seriously deviating to the right.

[0066] Unit 158, suspected of slight deviation to the left, is used if... and If the belt under test is found to be slightly misaligned to the left, it is determined that the belt under test is slightly misaligned.

[0067] Unit 159, suspected of slight deviation to the right, is used if... and If so, it is determined that the belt to be tested is suspected of being slightly misaligned to the right.

[0068] Unit 160, suspected of being moderately off course to the left, is used if... and If the belt under test is found to be moderately misaligned to the left, it is determined that the belt under test is likely to be misaligned to the left.

[0069] Unit 161, suspected of being moderately misaligned to the right, is used if... and If so, the belt to be tested is suspected to be moderately misaligned to the right.

[0070] Unit 162, suspected of serious deviation to the left, is used if... and If the belt under test is found to be seriously misaligned to the left, it is determined that the belt under test is likely to be seriously misaligned.

[0071] Unit 163, suspected of serious deviation to the right, is used if... and If the belt under test is found to be seriously misaligned to the right, then it is determined that the belt under test is likely to be seriously misaligned.

[0072] Specifically, the working methods of each module in this embodiment have been described in detail in Embodiment 1, and will not be repeated here.

[0073] Example 4 Please see Figure 15 , Figure 15 This is a schematic diagram of another embodiment of the belt misalignment detection device of the present invention. Figure 15 and Figure 9 The difference is that it also includes the linkage and visualization module 26.

[0074] The linkage and visualization module 26 is used to trigger audible and visual alarms and shutdown operations based on the degree of belt misalignment, and simultaneously display the degree of belt misalignment on the display screen in a visual manner.

[0075] Specifically, the working methods of each module in this embodiment have been described in detail in Embodiment 2, and will not be repeated here.

[0076] Example 5 The present invention also provides a computer-readable storage medium storing computer-executable instructions for causing a computer to perform the method described in Embodiment 1 or Embodiment 2.

[0077] The above is a detailed description of the preferred embodiments of the present invention. However, the present invention is not limited to the embodiments described. Those skilled in the art can make various equivalent modifications or substitutions without departing from the spirit of the present invention. All such equivalent modifications or substitutions are included within the scope defined by the claims of this application.

Claims

1. A method for detecting belt misalignment, characterized in that, include: S11: Acquire training belt transport image data, standard belt transport image data, and belt transport image data to be detected; S12: The YOLOv8 model is trained using the training belt transport image data to obtain a trained YOLOv8 model; S13: Input the standard belt conveyor image data into the trained YOLOv8 model to obtain the first output image, and obtain the standard distance L0 between the left edge of the belt and the left end of the idler roller and the standard distance R0 between the right edge of the belt and the right end of the idler roller from the first output image; S14: Input the image data of the belt conveyor to be detected into the trained YOLOv8 model to obtain the second output image, and obtain the actual distance L between the left edge of the belt and the left end of the idler and the distance R between the right edge of the belt and the actual right end of the idler from the second output image; S15: Set a deviation threshold, and determine the degree of deviation of the belt to be detected based on the relationship between the distance between L and L0, the distance between R and R0 and the deviation threshold.

2. The detection method according to claim 1, characterized in that, S11 includes: In three scenarios—training, standard, and testing—image data with both belts and idlers are collected using an industrial camera. The number of images collected in the training scenario is extremely large, the number of images collected in the standard scenario is multiple, and the number of images collected in the testing scenario is one or a few. The image data is preprocessed to generate the training belt transport image data, the standard belt transport image data, and the belt transport image data to be detected.

3. The detection method according to claim 1, characterized in that, S12 includes: The training belt transport image data is divided into a training set and a validation set; The YOLOv8 model is trained using the training set. The YOLOv8 model is validated using the validation set. If the validation results are not satisfactory, the model is augmented with additional interference data and then retrained.

4. The detection method according to claim 1, characterized in that, S13 includes: The first output image is filtered by NMS to remove redundant bounding boxes, leaving only the bounding boxes of the two detected targets, the belt and the idler. Obtain the standard coordinates of the left edge of the belt, the standard coordinates of the right edge of the belt, the standard coordinates of the left side of the idler roller, and the standard coordinates of the right side of the idler roller from the first output image; Get the pixel-to-physical distance conversion ratio; Calculate the standard distance L0 between the left edge of the belt and the left end of the idler, and the standard distance R0 between the right edge of the belt and the right end of the idler.

5. The detection method according to claim 4, characterized in that, S14 includes: The second output image is filtered by NMS to remove redundant bounding boxes, leaving only the bounding boxes of the two detected targets, the belt and the idler. Obtain the actual coordinates of the left edge of the belt, the actual coordinates of the right edge of the belt, the actual coordinates of the left side of the idler roller, and the actual coordinates of the right side of the idler roller from the second output image; Based on the pixel-to-physical distance conversion ratio, the actual distance L between the left edge of the belt and the left end of the idler roller, and the actual distance R between the right edge of the belt and the right end of the idler roller are calculated.

6. The detection method according to claim 1, characterized in that, S15 includes: Set the first threshold For slight deviation threshold, second threshold For moderate deviation threshold, third threshold This represents the threshold for severe deviation. if and If the belt under test is found to be slightly deviated to the left, it is determined that the belt under test is slightly deviated to the left. if and If the belt under test is found to be slightly deviated to the right, it is determined that the belt under test is slightly deviated to the right. if and If so, it is determined that the belt to be tested is moderately deviated to the left; if and If so, it is determined that the belt to be tested is moderately deviated to the right; if and If so, it is determined that the belt to be tested is severely deviated to the left; if and If so, it is determined that the belt to be tested is seriously deviating to the right; if and If so, it is determined that the belt to be tested is suspected of slightly deviating to the left; if and If the belt under test is suspected to be slightly misaligned to the right, then it is determined that the belt under test is slightly misaligned to the right. if and If so, the belt to be tested is suspected to be moderately misaligned to the left; if and If so, the belt to be tested is suspected to be moderately misaligned to the right; if and If so, it is determined that the belt to be tested is suspected of being seriously misaligned to the left; if and If the belt under test is found to be seriously misaligned to the right, then it is determined that the belt under test is suspected of being seriously misaligned.

7. The detection method according to claim 1, characterized in that, Following S15, the following is also included: Based on the degree of belt misalignment, an audible and visual alarm and a shutdown operation are triggered, while the degree of belt misalignment is displayed visually on the screen.

8. A device for detecting belt misalignment, characterized in that, include: The image data acquisition module is used to acquire training belt conveyor image data, standard belt conveyor image data, and belt conveyor image data to be detected. The model training module is used to train the YOLOv8 model using the training belt transport image data to obtain a trained YOLOv8 model. The standard distance calculation module is used to input the standard belt conveyor image data into the trained YOLOv8 model to obtain the first output image, and to obtain the standard distance L0 between the left edge of the belt and the left end of the idler roller and the standard distance R0 between the right edge of the belt and the right end of the idler roller from the first output image. The actual distance calculation module is used to input the image data of the belt conveyor to be detected into the trained YOLOv8 model to obtain a second output image, and to obtain the actual distance L between the left edge of the belt and the left end of the idler and the distance R between the right edge of the belt and the right end of the idler from the second output image; The belt misalignment determination module is used to set a misalignment threshold and determine the degree of misalignment of the belt to be detected based on the relationship between the distance between L and L0, the distance between R and R0, and the misalignment threshold.

9. The detection device according to claim 8, characterized in that, Also includes: The linkage and visualization module is used to trigger audible and visual alarms and shutdown operations based on the degree of belt misalignment, and simultaneously display the degree of belt misalignment on the display screen in a visual manner.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions for causing a computer to perform the method as described in any one of claims 1 to 7.