A bolt anomaly detection method for rail vehicles

By constructing a bolt target detection model and an anti-loosening line segmentation model, establishing a status database, and calculating bolt score values, the problem of low efficiency in detecting loose and missing bolts in the rail transit field has been solved, and fast and accurate bolt anomaly detection has been achieved.

CN118411571BActive Publication Date: 2024-08-30CRRC HANGZHOU DIGITAL TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410855075.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-28
Publication Date
2024-08-30
Estimated Expiration
2044-06-28

AI Technical Summary

Technical Problem

Existing methods for detecting loose and missing bolts in the field of rail transit are inefficient, and manual inspections are time-consuming. Machine vision detection relies on template images with low accuracy, making it difficult to quickly and accurately identify bolt abnormalities.

Method used

By constructing the bolt target detection model and the anti-loosening line segmentation model, using the neural network training data set, establishing a status database, calculating the bolt's assigned value, and judging whether the bolt is abnormal, without the need for template image comparison, fast and accurate detection can be achieved.

Benefits of technology

It realizes the rapid identification of bolt abnormalities, accurately determines the abnormal type, improves detection efficiency and accuracy, reduces the time and energy consumption of manual inspection, and avoids the contingency of template image dependence.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118411571B
    Figure CN118411571B
Patent Text Reader

Abstract

The present invention provides a bolt anomaly detection method for rail vehicles, comprising a data set preparation step, wherein a bolt target detection data set and an anti-loosening line segmentation data set are prepared; a bolt model construction step, wherein the above data sets are respectively input into a neural network to obtain a corresponding model; a state database construction step, wherein a unique number and a corresponding number of each bolt are defined, the coordinate value of the minimum circumscribed rectangle of each bolt in an image is analyzed, the probability of each bolt being identified as loose in a recent task is calculated, and the score value of each bolt in each recent task is calculated through quantitative description, and the above factors are combined into a data list of a single target bolt, and each of the data lists is combined to form a state database; a bolt state judgment step, wherein the actually collected image is output through a model to index a data list in a library to further judge whether the bolt is abnormal; the present invention has the advantages of quickly identifying whether a bolt is abnormal and accurately judging the type of the abnormality.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of rail vehicle image acquisition, and more particularly to a bolt anomaly detection method for rail vehicles. Background Art

[0002] In the rail transit industry, bolts play a key role in EMUs, urban rails, subways and other transportation vehicles, and are used to fasten various components. However, due to the influence of corrosion, vibration, impact and other factors, bolts often have problems during train operation, such as loosening, breaking or even falling off. These problems may cause equipment failures and even cause serious safety accidents. Therefore, in the maintenance of rail transit vehicles, the detection of bolt loosening, missing and other failures becomes very important. By timely detecting and handling bolt failure problems, equipment failures and safety accidents can be effectively prevented, ensuring the stability and safe operation of rail transit transportation systems.

[0003] At present, in the field of rail transit, there are two methods for detecting loose and missing bolts, namely manual inspection method and machine vision-based inspection method. For the manual inspection method, the staff will regularly use a wrench to tighten the bolts, regardless of whether they are loose, to ensure that all bolts remain tight; or after the first tightening, the staff will mark the tightening status on the bolts and nuts, usually with anti-loosening wires. In subsequent inspections, the staff only needs to check whether the anti-loosening wires on the bolts and nuts are aligned to determine whether the bolts are loose and missing. However, this method requires the staff to spend a lot of time. The time and energy of the inspection are huge, the efficiency is low, and the inspection lacks specificity, which can easily cause visual fatigue to the staff, especially when a large number of bolts of various types and sizes need to be inspected. Minor problems are difficult to find under insufficient lighting and fatigue conditions, which may bring potential safety hazards. For the detection method based on machine vision, it is usually used with the help of anti-loosening wire, template image, and deep learning-related algorithms to compare the template image with the current image to detect whether the bolts are loose and missing. This method is heavily dependent on the template image, and the detection result of the template image comparison method is more accidental and has low accuracy. Summary of the invention

[0004] In view of the deficiencies in the prior art, an object of the present invention is to provide a bolt anomaly detection method for rail vehicles, which can quickly identify whether a bolt is abnormal and accurately determine the type of anomaly.

[0005] To achieve the above object, the present invention provides the following technical solutions:

[0006] A method for detecting bolt anomalies in rail vehicles comprises the following steps:

[0007] The data set preparation step is to obtain a number of images containing bolts and anti-loosening wires, and divide the training set, validation set and test set into a certain ratio to obtain a bolt target detection data set and an anti-loosening wire segmentation data set respectively;

[0008] The bolt model building step includes inputting the bolt target detection data set and the anti-loosening wire segmentation data set into the corresponding neural network for training and testing to obtain the bolt target detection model and the anti-loosening wire segmentation model;

[0009] The state database construction step defines the unique number of each bolt among all the bolts in the vehicle, and defines the corresponding number of each bolt in the image, analyzes the coordinate value of the minimum circumscribed rectangle of each bolt in the image, calculates the probability of each bolt being identified as loose in the recent task, calculates the score of each bolt in each recent task through quantitative description, and combines the unique number, corresponding number, coordinate value, probability and score into a data list of a single target bolt, and each of the data lists is combined to form a state database;

[0010] In the bolt status judgment step, the actually collected images are output according to the bolt target detection model and the anti-loosening line segmentation model, and the output results are indexed into the corresponding data list in the status database. According to the data list, the judgment strategy is used to analyze whether the target bolt is abnormal.

[0011] Furthermore, the quantitative description includes counting the number of target bolts contained in each image through the unique number of each bolt and the number of the image, selecting the bolts with the center coordinates of the minimum enclosing rectangle in this inspection task, and matching the corresponding bolts in the state database according to the coordinate values ​​of the minimum enclosing rectangle of each bolt in the image through a matching strategy, and filtering out the unmatched bolt information.

[0012] Furthermore, the matching strategy includes calculating the Euclidean distance between the center point of the minimum circumscribed rectangle of the detected bolt and the coordinate values ​​of the minimum circumscribed rectangles of all bolts in the status database in the image, selecting the minimum value of the Euclidean distance, comparing the minimum value with the distance threshold, and judging whether the detected bolt is the bolt with the corresponding unique number in the status database based on the comparison result.

[0013] Furthermore, the calculation of the score value includes obtaining an analysis image through image preprocessing the output of the anti-loosening line segmentation model of the target bolt, performing contour detection on the analysis image to obtain the number of anti-loosening lines and the corresponding area, fitting the minimum circumscribed rectangle of each contour parallel to the midline of the longest side according to the analysis image, and calculating the angle between the midline and the coordinate axis.

[0014] Furthermore, the calculation formula of the scoring value is configured as:

[0015] ,

[0016] in, -- assign points, --The number of anti-loosening wires, --the area of ​​the relaxation line, --The angle between the midline and the coordinate axis, They are all constants greater than or equal to 0 and less than 1, and their sum equals 1.

[0017] Furthermore, the scoring value includes the scores of the ten tasks closest to the current task, wherein the bolt score of the previous task between every two adjacent tasks is assigned to the bolt score of the current task.

[0018] Furthermore, the data list is configured as follows:

[0019] ,

[0020] Among them, ID is the unique number of each bolt in the whole vehicle, D is the corresponding number of each bolt in the image, S is the coordinate value of the minimum circumscribed rectangle of each bolt in the image, F is the probability of each bolt being identified as loose in the recent task, R 10 ..... R 1--The scores of this bolt in the 10 most recent tasks of this task.

[0021] Furthermore, the judgment strategy includes analyzing the score value of the first task in the data list. If the score value is zero, the target bolt is deemed to be missing, and then the items in the data list whose score values ​​of each task are within a specified range are selected to calculate the variance, and the average of the score values ​​of half of the tasks in the data list is calculated, and whether the target bolt is loose is judged based on whether the score value of the target bolt is within the calculation range of the variance and the average.

[0022] Furthermore, the judgment formula is configured as follows:

[0023] ,

[0024] in, --variance, --Average value, R--the score value of the target bolt. When C=1, the target bolt is normal, and when C=0, the bolt is loose.

[0025] Furthermore, the bolt target detection model inputs the image to be detected, and outputs the category, the horizontal and vertical coordinates of the center point of the minimum bounding rectangle of the detected object in the image, and the width and height of the bounding rectangle; the anti-loosening line segmentation model inputs the image area selected by the minimum bounding rectangle after detection by the bolt target detection model, and outputs the corresponding mask image.

[0026] The beneficial effects of the present invention are as follows: a relatively accurate bolt model and anti-loosening line model are trained through a large number of data sets, and then a database of various types of bolts in different states is constructed, wherein the scoring values ​​of nearly ten tasks are calculated through quantitative description, and corresponding scores are assigned for each two adjacent tasks, and the actual image is output through the above-mentioned model to obtain the corresponding result, and the corresponding data list is indexed in the state database according to the result, and the type of abnormal situation of the bolt is judged by the judgment strategy according to the data list. Compared with traditional manual detection or machine vision detection, the detection method of the present invention can robustly and accurately realize bolt loosening and missing without template image comparison. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] Figure 1 It is the overall flow chart of the present invention; DETAILED DESCRIPTION

[0028] The present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. The same parts are represented by the same reference numerals. It should be noted that the words "front", "rear", "left", "right", "upper" and "lower" used in the following description refer to directions in the accompanying drawings, and the words "bottom surface" and "top surface", "inner" and "outer" refer to directions toward or away from the geometric center of a specific component, respectively.

[0029] At present, in the field of rail transit, there are two methods for detecting loose and missing bolts, namely manual inspection method and machine vision-based inspection method. For the manual inspection method, the staff will regularly tighten the bolts with a wrench, regardless of whether they are loose, to ensure that all bolts remain tight; or after the first tightening, the staff will mark the tightened status on the bolts and nuts, usually with anti-loosening wires. In subsequent inspections, the staff only needs to check whether the anti-loosening wires on the bolts and nuts are aligned, and then determine whether the bolts are loose and missing. However, this method requires the staff to spend a lot of time and energy, with a huge workload, low efficiency, and lack of specificity. , which can easily cause visual fatigue to the staff, especially when it is necessary to check a large number of bolts of various types and sizes. Minor problems are difficult to find under insufficient lighting and fatigue, which may bring potential safety hazards. For the detection method based on machine vision, it is usually used with the help of anti-loosening wire, using template images, and using deep school related algorithms to compare the template image and the current image to detect whether the bolts are loose and missing. This method is heavily dependent on the template image, and the detection result of the template image comparison method is more accidental and has low accuracy. Therefore, the present invention designs a method for detecting loose and missing bolts that does not require template image comparison and can be robustly and accurately realized, as shown in the following example. Figure 1 As shown, the following steps are included:

[0030] Dataset preparation steps: obtain several images containing bolts and anti-loosening wires, and divide the training set, validation set and test set into a certain ratio to obtain a bolt target detection data set and an anti-loosening wire segmentation data set respectively; specifically, take images containing all target bolts and their corresponding anti-loosening wires, take multiple images of target bolts and their corresponding anti-loosening wires under different brightness conditions of light sources, artificially apply dust and dirt to simulate the extreme situation in which some parts of bolts and anti-loosening wires are attached with dirt due to train operation and obtain their images, perform image preprocessing on all images, including using Gaussian filtering algorithm to remove image noise, using histogram equalization and other technologies to enhance image contrast, etc., and then prepare bolt target detection data set and anti-loosening wire segmentation data set respectively;

[0031] The preparation of the target detection dataset is to use the annotation software to frame the minimum circumscribed rectangular frame of the bolts in all images in YOLO format to form the corresponding txt file, organize all images and corresponding annotation files in the dataset format in the visualization database, divide the training set, validation set and test set in a ratio of 7:2:1, and finally form the bolt target detection dataset;

[0032] Among them, the production of the anti-loosening line segmentation dataset is specifically to use image data annotation software to annotate the anti-loosening lines contained in all images to form the corresponding JSON file, divide the training set, validation set and test set according to the ratio of 7:2:1, and organize the dataset into an anti-loosening line segmentation dataset in the format of target detection dataset semantic segmentation.

[0033] The bolt model construction step is to input the bolt target detection data set and the anti-loosening line segmentation data set into the corresponding neural network for training and testing and solidification to obtain the bolt target detection model and the anti-loosening line segmentation model; specifically, for the bolt target detection neural network, the present invention adopts the YOLOv9 target detection network, which introduces programmable gradient information (PGI) and generalized efficient layer aggregation network (GELAN). PGI is used to process the information loss in the deep network, and can provide complete input information for the target task to calculate the objective function, so as to obtain reliable gradient information to update the network weights. GELAN is an architecture based on gradient path planning, which enables PGI to achieve superior detection results on a lightweight model; for the anti-loosening line segmentation neural network, the present invention adopts a high-resolution network, a deep residual network as the backbone network, and a Focal Loss function as the loss function;

[0034] The obtained bolt target detection model and anti-loosening wire segmentation model are deployed in the algorithm server. The deployment is specifically as follows: the trained bolt target detection model and anti-loosening wire segmentation model are converted into corresponding ONNX format models respectively, deployed to the algorithm server, and the two model running programs are mounted and run using the process management tool (Supervisor);

[0035] The input of the bolt target detection model is the RGB image to be detected. The input model will be adjusted to 512*512 pixels. The output is an n*5 list, where n represents n bolts detected in an image, and 5 represents that each row of the list consists of 5 elements, which are the category, the horizontal and vertical coordinates of the center point of the minimum bounding rectangle of the detected object in the entire image, and the width and height of the bounding rectangle.

[0036] The input of the anti-loosening wire segmentation model is the image area selected by the minimum circumscribed rectangle after the bolt target detection model detects it. Each time, an image containing only bolts and anti-loosening wires is input, and it is adjusted to 128*128 pixels before entering the model; the output is a mask image of the size of the input image, that is, a single-channel image with a pixel value of 255 in the anti-loosening wire area and a pixel value of 0 in the rest of the area.

[0037] The state database construction step defines the unique number of each bolt in the whole vehicle bolts, and defines the corresponding number in the image where each bolt is located, analyzes the coordinate value of the minimum circumscribed rectangle of each bolt in the image, calculates the probability of each bolt being identified as a loose result in the recent task, calculates the score of each bolt in each recent task through quantitative description, and combines the unique number, corresponding number, coordinate value, probability and score value into a data list of a single target bolt, and each data list is combined to form a state database; specifically, since the device on which the camera for acquiring images of the present invention is usually carried is a 360° train image acquisition system or a train inspection robot, etc., it can be ensured that in different tasks, the description areas of multiple sets of task images can correspond one to one and the left or right or up and down deviations are controllable, that is, each set of task images is numbered, the first image of each set of task images is numbered 1, the second image is numbered 2, and so on, the mth image is numbered m, since the areas described by the images with the same number taken by different tasks are the same, the number of bolts contained is fixed, and the coordinate value of the center coordinate of each bolt in the image has a slight deviation, but the deviation value is usually controllable;

[0038] Assuming that the entire rail train under inspection has t target bolts, the database is a t*14 data list, and each data list is:

[0039] ,

[0040] Among them, ID is the unique number of each bolt in the whole vehicle, D is the corresponding number of each bolt in the image, S is the coordinate value of the minimum circumscribed rectangle of each bolt in the image, and F is the probability of each bolt being identified as loose in the last ten tasks. R 10 ..... R 1--The scores of this bolt in the last 10 tasks of this task, R 1 - The score of this bolt in the most recent mission.

[0041] The quantitative description includes counting the number of target bolts in each image through the unique number of each bolt and the number of the image. For example, the number of target bolts in the m-th image is k, and the number of bolts detected in this task is w. Considering the error of target detection, w may be less than or equal to k, or greater than k. First, consider the case where w is greater than k. Since the number of target bolts in the m-th image is certain, the bolt with the center coordinate of the minimum enclosing rectangle in this detection task is selected from the w bolts, and the corresponding bolts are matched to the state database according to the coordinate value of the minimum enclosing rectangle of each bolt in the image through the matching strategy, and the unmatched bolt information is filtered out.

[0042] The matching strategy includes calculating the Euclidean distance between the center point of the minimum circumscribed rectangle of the detected bolt and the coordinate values ​​of the minimum circumscribed rectangle of all bolts in the state database in the image, and selecting the minimum value of the Euclidean distance, comparing the minimum value with the distance threshold, and judging whether the detected bolt is the bolt with the corresponding unique number in the state database according to the comparison result. Specifically, if it is less than the threshold, the detected bolt and the bolt with the corresponding ID in the database are the same bolt, otherwise it is considered that the bolt is a misdetected bolt. The distance threshold should be taken according to the pixel size of the acquired image. In a 512*512 image, the value is 10. When w is less than k, repeat the above matching process, and count the bolt IDs of the bolts contained in this image in the database without updated R1, that is, the lost bolts, and their corresponding R1 is set to 0.

[0043] Assignment value ( R The specific calculation method of 1) is as follows: first, the output of the anti-loosening line segmentation model of the target bolt, that is, the mask image, is preprocessed (adaptive binarization is first performed, and then opening and closing operations are performed to remove the mis-segmented noise points in the image) to obtain the analysis image;

[0044] Secondly, the analysis image is subjected to contour detection to obtain the number of anti-loosening lines and the corresponding area, which are recorded as and ;

[0045] Next, the minimum circumscribed rectangle of each contour is fitted according to the analysis image, which is parallel to the midline of the longest side, and the angle between the midline and the positive direction of the coordinate axis x is calculated, which is recorded as , is the radian value;

[0046] Finally, the calculation formula of the assigned score is used for calculation, and the formula configuration is:

[0047] ,

[0048] in, -- assign points, --The number of anti-loosening wires, --the area of ​​the relaxation line, --The angle between the midline and the coordinate axis, are all constants greater than or equal to 0 and less than 1, and their sum equals 1. , , ;

[0049] Among them, F is calculated as: the number of times bolts are missing in the last ten tasks divided by 10.

[0050] In the bolt state judgment step, the actually collected images are output according to the bolt target detection model and the anti-loosening line segmentation model, and the output results are indexed into the corresponding data list in the state database. According to the data list, whether the target bolt is abnormal is analyzed through the judgment strategy;

[0051] The judgment strategy includes: R 1 is used for analysis. R 1 is zero, the target bolt is considered to be missing, and then the items in the data list whose scores for each task are within the specified range are selected to calculate the variance, that is, R 10 to R The variance of the items in 1 that are greater than 0 and less than 1 , and calculate the average value of the assigned values ​​of half of the tasks in the data list, that is R 10 to R Average of 6 , according to the assigned score of the target bolt within the calculation range of the variance and the mean value, it is judged whether the target bolt is loose.

[0052] The specific judgment formula configuration is:

[0053] ,

[0054] in, --variance, --Average value, R--the score of the target bolt. When C=1, the target bolt is normal. When C=0, the bolt is loose. R 1. Do not participate in the next bolt status evaluation.

[0055] Finally, the inspection results are output to the display end, specifically the corresponding images of the loose or missing bolts and the minimum circumscribed rectangle of the last normal task of the missing or loose bolt for the reviewer's reference.

[0056] The above are only preferred embodiments of the present invention. The protection scope of the present invention is not limited to the above embodiments. All technical solutions under the concept of the present invention belong to the protection scope of the present invention. It should be pointed out that for ordinary technicians in this technical field, some improvements and modifications without departing from the principle of the present invention should also be regarded as the protection scope of the present invention.

Claims

1. A method for detecting bolt anomalies in rail vehicles, Features: The steps include: The data set preparation step is to obtain a number of images containing bolts and anti-loosening wires, and divide the training set, validation set and test set into a certain ratio to obtain a bolt target detection data set and an anti-loosening wire segmentation data set respectively; The bolt model building step includes inputting the bolt target detection data set and the anti-loosening wire segmentation data set into the corresponding neural network for training and testing to obtain the bolt target detection model and the anti-loosening wire segmentation model; The state database construction step defines the unique number of each bolt among all the bolts in the vehicle, and defines the corresponding number of each bolt in the image, analyzes the coordinate value of the minimum circumscribed rectangle of each bolt in the image, calculates the probability of each bolt being identified as loose in the recent task, calculates the score of each bolt in each recent task through quantitative description, and combines the unique number, corresponding number, coordinate value, probability and score into a data list of a single target bolt, and each of the data lists is combined to form a state database; In the bolt state judgment step, the actually collected images are output according to the bolt target detection model and the anti-loosening line segmentation model, and the output results are indexed into the corresponding data list in the state database. According to the data list, whether the target bolt is abnormal is analyzed through the judgment strategy; The quantitative description includes counting the number of target bolts in each image through the unique number of each bolt and the number of the image, selecting the bolts with the center coordinates of the minimum circumscribed rectangle in this detection task, and matching the corresponding bolts in the state database according to the coordinate values ​​of the minimum circumscribed rectangle of each bolt in the image through the matching strategy, and filtering the unmatched bolt information; The calculation of the assigned value includes obtaining an analysis image by image preprocessing the output of the anti-loosening line segmentation model of the target bolt, performing contour detection on the analysis image to obtain the number and corresponding area of ​​the anti-loosening lines, fitting the minimum circumscribed rectangle of each contour parallel to the midline of the longest side according to the analysis image, and calculating the angle between the midline and the coordinate axis; The scoring value includes the scores of the ten tasks closest to the current task, wherein the bolt score of the previous task between every two adjacent tasks is assigned to the bolt score of the current task.

2. A method for detecting bolt anomalies in rail vehicles according to claim 1, Features: The matching strategy includes calculating the Euclidean distance between the center point of the minimum circumscribed rectangle of the detected bolt and the coordinate values ​​of the minimum circumscribed rectangles of all bolts in the state database in the image, selecting the minimum value of the Euclidean distance, comparing the minimum value with the distance threshold, and judging whether the detected bolt is the bolt with the corresponding unique number in the state database according to the comparison result.

3. A method for detecting bolt anomalies in rail vehicles according to claim 1, Features: The calculation formula of the scoring value is configured as follows: , in, -- assign points, --The number of anti-loosening wires, --the area of ​​the relaxation line, --The angle between the midline and the coordinate axis, They are all constants greater than or equal to 0 and less than 1, and their sum equals 1.

4. A method for detecting bolt anomalies in rail vehicles according to claim 1, Features: The data list configuration is: , Among them, ID is the unique number of each bolt in the whole vehicle, D is the corresponding number of each bolt in the image, S is the coordinate value of the minimum circumscribed rectangle of each bolt in the image, F is the probability of each bolt being identified as loose in the recent task, R 10 ..... R 1 --The scores of this bolt in the 10 most recent tasks.

5. A method for detecting bolt anomalies for a rail vehicle according to claim 1 or 4, Features: The judgment strategy includes analyzing the score value of the first task in the data list. If the score value is zero, the target bolt is considered to be missing. Then, the items in the data list whose score values ​​of each task are within a specified range are selected to calculate the variance, and the average score value of half of the tasks in the data list is calculated. Whether the target bolt is loose is judged based on whether the score value of the target bolt is within the calculation range of the variance and the average value.

6. A method for detecting bolt anomalies in rail vehicles according to claim 5, Features: The judgment formula is configured as follows: , in, --variance, --Average value, R--the score value of the target bolt. When C=1, the target bolt is normal, and when C=0, the bolt is loose.

7. A method for detecting bolt anomalies in rail vehicles according to claim 1, Features: The bolt target detection model inputs the image to be detected, and outputs the category, the horizontal and vertical coordinates of the center point of the minimum bounding rectangle of the detected object in the image, and the width and height of the bounding rectangle; the anti-loosening line segmentation model inputs the image area selected by the minimum bounding rectangle after detection by the bolt target detection model, and outputs the corresponding mask image.

Citation Information

Patent Citations

  • Train bolt loosening detection method based on anti-loosening line identification

    CN113469966A

  • Displacement detection method and device, equipment and storage medium

    CN113639685A