A method for matching underbody parts of rail vehicles
Feature points are extracted through deep information and deep learning networks, and the matching network is used to match parts. This solves the problem of insufficient matching accuracy caused by the large height difference between the vehicle bottom and the complexity of parts distribution, and achieves precise matching and efficient detection of parts.
Patent Information
- Application Number
- CN202410961304.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-18
- Publication Date
- 2024-09-20
- Estimated Expiration
- 2044-07-18
AI Technical Summary
Existing rail vehicle bottom parts matching technology has insufficient matching accuracy when faced with large height differences on the bottom of the vehicle and parts distributed on planes of different depths, resulting in mapping deviations or missed detection of some parts.
Depth information is used to extract feature points and feature descriptors through the deep learning network, combined with the matching network for pairing, and the translation transformation matrix is used to calculate the mapping relationship of the component frame, avoiding a single transformation matrix for the entire image, and specifically optimizing the RANSAC algorithm to improve matching. Accuracy.
It achieves precise matching of components on different depth planes, improves matching accuracy, reduces missed detections and false detections, and overcomes the shortcomings of insufficient matching accuracy caused by the complex structure of the vehicle bottom in traditional methods.
Smart Images

Figure CN118506037B
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of rail vehicle detection, and more particularly to a method for matching underbody components of a rail vehicle. Background Art
[0002] In the field of intelligent operation and maintenance of rail transit, intelligent maintenance of rail vehicle bodies is a very important part, and the key components of trains are mainly distributed under the vehicle. Therefore, it is particularly important to detect abnormal status of components under the vehicle. The traditional component detection method is manual inspection. Faced with the distribution of tens of thousands of components (items) under the vehicle, manual screening methods that rely solely on experience often result in a high missed detection rate. In order to overcome this defect, more and more rail vehicle body detection solutions use automated equipment to complete automatic detection by collecting images and other information of the train. In this process, an image acquisition is usually performed on the standard state of the train to make a template. Subsequently, during automatic detection, the components in the collected task map are compared with the components in the template to determine the status of the components. Under the influence of the positioning accuracy of the acquisition equipment and the stability of the acquisition environment, there will be a certain degree of deviation between the task map and the template map. At this time, it is necessary to match the components in the task map and the template map one by one. Therefore, the vehicle bottom component matching technology has become the basis and key technology for the current automatic maintenance of the rail train bottom.
[0003] In the automated inspection equipment for underbody inspection of rail vehicles, there are currently some parts matching technical solutions. For example, the Chinese patent "CN114445636A A train bottom item point mapping method" provides a parts mapping method based on full image registration. First, SURF features are extracted from the template image and the image to be inspected respectively; the Euclidean distance between the two sets of feature point sets is calculated to determine the matching degree between the points, thereby determining the feature matching relationship; according to the corresponding relationship of feature matching, the image to be inspected is affine transformed to obtain the image to be inspected after calibration with the template image; target detection is performed on the template image and the calibrated image to be inspected to obtain the category and position information of each item point; the item point correspondence between the two images is completed according to the overlap IOU of the same category item point boxes of the template image and the image to be inspected, the item point center point deviation and the aspect ratio, but this technical solution uses S There are two obvious defects in using URF feature points to correct the entire image from the image to be inspected to the template image before performing target detection and matching: first, when there is a large angular deviation between the image to be inspected and the template image, some parts of the image to be inspected may have a certain degree of deformation after correction. It is challenging to perform target detection on this basis, which will cause obvious omissions of parts in the image to be inspected; second, the arrangement of parts at the bottom of the rail train is complex. Due to the presence of a large number of boxes and bogies, the height difference of the bottom of the car is large, and different parts are distributed on different planes. The use of full-image level registration cannot make the parts on all planes satisfy the single transformation relationship, resulting in deviations in the mapping of parts on some planes. There are generally parts such as fixing bolts on the bottom of the car that account for a very small area of the entire image. This deviation is enough to make the matching of these parts fail.
[0004] In addition, the Chinese patent "CN115908872A A method for matching train bottom parts" provides a method for matching parts using target detection to generate feature point sets for calculation. This method first collects a large amount of vehicle bottom image data to calibrate the position and type of parts; the calibrated data is divided into training sets, validation sets and test sets after a series of data enhancements to train the target detection network (such as yolov5); the trained model is used to perform target detection on the template image and the image to be tested, and the center point of the detected part frame is extracted to establish a feature point set; the distance, angle and label of the nearest n feature points of the current feature point are used as the feature descriptor of the feature point; the feature distance of the feature descriptors between the template and the task graph is calculated respectively, the optimal matching pair is determined with the minimum distance, and the transformation matrix is calculated M; the transformation correspondence between the template image and the image to be inspected is achieved through the transformation matrix M, thereby achieving component matching and component detection; however, this technical solution also explains the complexity of the distribution of the above-mentioned train bottom components, and uses artificially designed feature point sets and feature descriptors for pairing in order to increase accuracy, but the feature descriptors of the components to be matched rely on the target detection accuracy of the surrounding components. When the angle deviation is large or the target detection misses and misdetections are serious, the matching is greatly affected, and the final result is still a single transformation matrix over the entire image, and the improvement in the matching accuracy of components distributed at different depths is still very limited. Summary of the invention
[0005] In view of the shortcomings of the prior art, the purpose of the present invention is to provide a method for matching components on the bottom of a rail vehicle. This method can utilize depth information without adding additional sensors and no longer uses a single transformation matrix for all components in the entire image. It can overcome the defects of the current technical solutions that are common, such as insufficient matching accuracy caused by the large height difference of the bottom of the vehicle and the distribution of components on planes at different depths.
[0006] To achieve the above object, the present invention provides the following technical solutions:
[0007] A method for matching underbody parts of a rail vehicle comprises the following steps:
[0008] Feature point extraction and pairing step: extract feature points from the image to be inspected and the preset template image through a deep learning network model, and pair the extracted feature points with feature descriptors through a matching network to obtain feature point pairs;
[0009] A feature point pair registration step, comparing the number of feature point pairs with a preset point pair threshold N1, and selecting to register feature point pairs or to expand and register feature point pairs in combination with template depth according to the comparison result, so as to serve as valid feature point pairs for component frame mapping transformation;
[0010] A mapping relationship calculation step, wherein the effective feature point pairs are calculated through a translation transformation matrix to obtain transformed template feature points, the error values of the template feature points and the feature point pairs in the task graph are calculated, and whether to add the inner point set is determined according to the error value, and the number of feature point pairs in the inner point set is determined to select the average translation matrix of the task graph part relative to the template graph part of all feature point pairs in the inner point set as the mapping relationship of the center point of the component frame, or to select to change the error value judgment standard to re-update the inner point set, and re-determine the number of feature point pairs in the inner point set to obtain the mapping relationship of the center point of the component frame;
[0011] The component matching step matches the components in the task diagram through the mapping relationship of the center points of the component frames.
[0012] Furthermore, in the feature point pair registration step, when the comparison result is that the number of feature point pairs is less than the threshold value N1, the depth of the plane where the current component is located is determined according to the depth estimation of the template image and the center coordinates of the component frame, and the area in the template image whose depth difference with the current component is within the range of the threshold value M1 is determined. Based on the comparison between the number of paired feature point pairs falling within the threshold value M1 and the threshold value N2, it is selected to continue to expand the threshold value M1 or to choose to expand the component frame within the range of the threshold value M2, and then compare the number of paired feature point pairs within the threshold value M2 with the threshold value N3, and it is selected to continue to expand the threshold value M2 to repeat the comparison or to choose to retain the paired feature points within the output threshold value M2 as valid feature point pairs.
[0013] Furthermore, the mapping relationship calculation step traverses any feature point pair i in the valid feature point pair, obtains matrix M through the translation transformation matrix of the feature point pair i, translates the template feature points of other feature points in the valid feature point pair through the matrix M to obtain template feature points, compares the error value with the error threshold t, if the error value is less than the error threshold t, then the template feature point is added to the internal point set, otherwise, the template feature point is screened out as an external point; the internal point set obtained by the feature point pair i is compared with the internal point set obtained by the previous feature point pair in terms of the number of point pairs, and the internal point set with a larger number is selected as the target internal point set.
[0014] Furthermore, in the mapping relationship calculation step, when the number of feature point pairs in the target's internal point set is less than the threshold value N4, the error threshold t is increased, and the maximum error threshold upper limit T is set to determine whether the increased error threshold t is greater than the maximum error threshold upper limit T. If so, the translation matrix of the feature point pair closest to the center of the component frame is used as the mapping relationship of the component frame center point. If not, any feature point pair i in the valid feature point pairs is re-traversed, and the target's internal point set is repeatedly searched for comparison with the threshold value N4.
[0015] Furthermore, the translation transformation matrix of the feature point pair i is:
[0016] ,
[0017] ,
[0018] ,
[0019] ,
[0020] in, is the feature point pair i, is the corresponding feature point of the feature point centering template, is the corresponding feature point of the task graph in the feature point alignment, is the offset in the x direction, is the offset in the y direction, and the template feature points of other feature point pairs are , the template feature points of other feature point pairs after translation transformation are , the task image feature points are ;
[0021] The calculation method of the error value is configured as follows:
[0022] ,
[0023] in, is the error value.
[0024] Furthermore, the average translation matrix is:
[0025] ,
[0026] ,
[0027] ,
[0028] in, is the offset of the task graph part relative to the template graph part in the x-coordinate direction of all paired feature point pairs in the internal point set, is the offset of the task graph part relative to the template graph part in the y-coordinate direction of all paired feature point pairs in the inlier set, and n is the number of paired feature point pairs in the inlier set.
[0029] Furthermore, it also includes a depth estimation step, in which the template map of each point is used to determine the relative depth relationship of the distribution of the bottom vehicle parts through a deep learning model to obtain a depth distribution map.
[0030] Furthermore, in the component matching step, the mapped component box is expanded, the IOU calculation is performed by traversing the expanded component box and the component box with the same label, the IOU value is compared with a threshold value U, and a successful match or a missing component is output based on the comparison result.
[0031] Furthermore, in the component matching step, the mapped template component frame is expanded by an expansion amount P1, and the task graph component frame corresponding to the preset template graph is expanded by an expansion amount P2, and IOU calculation is performed by traversing the expanded task graph component frame and the template component frame.
[0032] Furthermore, in the component matching step, when the comparison result is that the IOU value is less than the threshold value U, a portion of the template component frame after mapping is intercepted and the template component frame before mapping is judged for similarity, and a successful match or component missing is output based on the similarity judgment result.
[0033] The beneficial effects of the present invention are as follows: without adding depth information of additional sensors, accurate migration of rail train bottom item points from the template to the task map is completed only at the level of a single component rather than the entire map, thereby achieving part matching. In the part matching process, the RANSAC algorithm is targetedly optimized and improved on the basis of matching feature points, so that it can complete the screening of outlier feature points when calculating the transformation matrix with higher efficiency, taking into account both speed and accuracy. Based on these improvements, the present invention can effectively overcome the defect of insufficient matching accuracy of the current matching algorithm due to the large difference in the height of the distribution plane of the bottom components of the rail vehicle. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] Figure 1 It is the overall flow chart of the present invention;
[0035] Figure 2 It is a flowchart of registering effective feature point pairs at the component level in the present invention;
[0036] Figure 3 It is a flow chart of the calculation of the component mapping relationship in the present invention;
[0037] Figure 4 It is a flowchart of component matching in the present invention;
[0038] Figure 5 is a schematic diagram of the vehicle bottom image in the present invention;
[0039] Figure 6 It is a schematic diagram of the depth estimation of the vehicle bottom image in the present invention. DETAILED DESCRIPTION
[0040] 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.
[0041] Since both existing component matching methods have limited improvement in the matching accuracy of components distributed at different depths, the present invention designs a rail vehicle underbody component matching method, comprising the following steps:
[0042] The steps of manual calibration of template images and model construction are as follows:
[0043] Template map data shooting: Under the premise of ensuring that there is no fault under the rail vehicle, use automated data collection equipment to collect data at each set point as a template map, which will be used for subsequent comparison with the inspection map re-shot for the actual task;
[0044] Depth estimation step, in order to completely solve the defect of low pairing accuracy caused by the distribution of parts in different depth planes, the depth estimation is performed on the template map of each point. No additional sensors are introduced for depth estimation. On the one hand, it is only necessary to know the relative depth relationship of the distribution of each component under the vehicle, rather than the specific depth accuracy value. On the other hand, the introduction of additional sensors will greatly increase the cost of automation equipment. Therefore, the present invention adopts a monocular depth estimation deep learning model to determine the relative depth relationship of the distribution of parts under the vehicle. After using a semi-supervised learning strategy and learning a total of 7.7 million labeled and unlabeled images, the model has a deeper understanding of the depth distribution relationship in the real world, and can effectively estimate the relative depth distribution of the bottom of the rail vehicle, such as Figure 5 and Figure 6 As shown in the figure, after the depth estimation of the vehicle bottom template image, the corresponding relative depth distribution map can be obtained. The closer the plane is to the observer, the brighter it is and the larger the corresponding pixel value is.
[0045] Manual calibration of template parts. The template image is used as a comparison standard in the parts detection task. The accuracy of its detection frame and missing categories determines the accuracy of the detection task. Therefore, manual labeling is selected to ensure accuracy. Manual labeling is completed using the target detection labeling tool (LabelImg). With the help of this tool, the category and location information of each component in the collected template image can be accurately recorded and saved;
[0046] Model construction, using automated detection equipment to simulate a large number of map collection at preset points for this task. During the map collection process, try to simulate the situations that may be encountered in actual tasks, such as different lighting conditions, bumps when the automatic detection equipment is displaced, etc., for subsequent component recognition model training, data enhancement is performed on the collected vehicle bottom point data, and the images are randomly cropped and rotated, etc., in order to expand the training set. The data is annotated using annotation software, and the entire data set is divided into training set, validation set and test set in a ratio of 7:2:1. The completed data set is used to train the component recognition network. The component recognition model uses the current target detector YOLOv8 model. The detector can use advanced features for detection at different sizes, and uses a single-stage end-to-end framework. It can ensure high efficiency on the basis of achieving accurate identification of targets of different sizes. It is suitable for the use scenario of the bottom of rail trains where the size of components varies greatly. At the same time, it can achieve real-time detection performance and meet the use requirements of automatic detection equipment for simultaneous detection. After obtaining a high-performance component recognition model, the preset points of the vehicle bottom components can be used in the actual detection task to perform real-time recognition of the component task map.
[0047] In the feature point extraction pairing step, the image to be inspected and the preset template image are subjected to feature point extraction through a deep learning network model. Compared with the traditional extraction method, it is based on self-supervised learning and has the advantage of strong generalization. It has good robustness for texture changes caused by weak texture, illumination or perspective changes. At the same time, a single network is used during training to simultaneously complete interest point detection and feature descriptor extraction, which can achieve real-time performance and better meet the operation requirements of rail vehicle automated inspection equipment.
[0048] The extracted feature points are paired with feature descriptors through a matching network to obtain feature point pairs. The matching network used is a deep neural network (LightGlue), whose network structure includes self-attention mechanism and cross-attention mechanism, and uses richer image semantic context information to ensure matching accuracy. An early stopping mechanism is also added. After each layer of the decision-making layer, it will decide whether to stop the network forward propagation and output results in time according to the pairing situation, ensuring the reasoning efficiency. With the dual blessing of accuracy and speed, it has a good adaptability to the use scenario of rail train undercarriage inspection automation equipment with high efficiency requirements.
[0049] In the feature point pair registration step, for the component frame to be mapped at the current point (the detection frame refers to the component frame on the template), the number of feature point pairs in the frame that has not been expanded is firstly not counted, and the number of feature point pairs is compared with the preset point pair threshold N1. According to the comparison result, the feature point pairs are selected for registration or expanded registration in combination with the template depth, so as to serve as the valid feature point pairs for the component frame mapping transformation; specifically, Figure 2 As shown, when the comparison result is that the number of feature point pairs is greater than the threshold value N1, these feature point pairs are directly registered as feature point pairs for subsequent steps to calculate the mapping transformation of the component frame. When the comparison result is that the number of feature point pairs is less than the threshold value N1, the depth of the plane where the current component is located is determined according to the depth estimation of the template image (depth estimation image) and the center coordinates of the component frame, and the area in the template image whose depth difference with the current component is within the threshold value M1 is determined. According to the comparison between the number of paired feature point pairs falling within the threshold value M1 and the threshold value N2, it is selected to continue to expand the threshold value M1 or to expand the component frame within the range of the threshold value M2. When the number of paired feature point pairs falling within the threshold value M1 is less than the threshold value N2, the depth range threshold value M1 is increased by setting the step size S1, that is, the threshold value M1 is expanded until the number of paired feature point pairs whose depth difference with the current component frame is within the range M1 is greater than the threshold value N2. In order to further increase the accuracy of the component position mapping, paired feature point pairs with similar depths in the entire image range are not used, but paired feature point pairs with similar depths near the component frame are used. Therefore, on the basis of the original component frame The expanded feature point pairs are screened by expanding the current component frame outward to set the size of the threshold M2 to obtain a new component frame for counting feature point pairs, and the number of feature point pairs in the expanded component frame is compared with the threshold N3, where the threshold N3 should be greater than the threshold N1, because the threshold N1 is the threshold of the number of feature point pairs in the original unexpanded component frame for calculating the mapping relationship. These feature point pairs are far from the center of the component frame, and their transformation relationship can better represent the transformation relationship of the component frame. The threshold N3 is the threshold of the number of feature point pairs in the expanded component frame. The feature point pairs contained in the expanded component frame are farther away from the component frame, and more number is needed for subsequent average calculation to reduce the error. If the number of feature point pairs at this time is greater than the threshold N3, these paired feature point pairs are registered as feature point pairs (valid feature point pairs) for calculating the mapping relationship of the component frame. If it is less than the threshold N3, the component frame is further expanded by increasing the range of the threshold M2 with the set step size S2, and the screening and comparison are repeated until the number of paired feature point pairs is greater than the threshold N3.
[0050] The mapping relationship calculation step is to calculate the transformed template feature points through the translation transformation matrix of the effective feature point pairs, calculate the error value between the template feature points and the feature points of the task graph in the feature point pairs, determine whether to add the inner point set according to the error value, determine the number of feature point pairs in the inner point set, and select the average translation matrix of the task graph part relative to the template graph part of all feature point pairs in the inner point set as the mapping relationship of the center point of the component frame, or choose to change the error value judgment standard to re-update the inner point set, and re-determine the number of feature point pairs in the inner point set to obtain the mapping relationship of the center point of the component frame; after obtaining the effective feature point pairs, they are used to calculate the feature point pairs corresponding to the mapping relationship of each component frame. For the component frame that needs to be mapped, the corresponding registered feature point pairs can be used to complete the calculation of the transformation matrix through the mapping relationship calculation module. The calculation is a targeted optimized RANSAC algorithm, which reduces the number of iterations on the basis of the paired feature points, improves efficiency, and improves the accuracy of the transformation matrix by screening outliers.
[0051] Specifically, Figure 3 As shown, the first step is to traverse any feature point pair i in the valid feature point pairs, where the feature point pair i is , is the corresponding feature point of the feature point centering template, is the corresponding feature point of the feature point alignment task graph.
[0052] The second step is to transform the feature point pair i through the translation transformation matrix to obtain the matrix M, which is expressed as:
[0053] ,
[0054] in is the offset in the x direction:
[0055] ,
[0056] is the offset in the y direction:
[0057] ,
[0058] Use the above translation transformation matrix M to perform translation transformation on the template feature points in other registered feature point pairs (valid feature point pairs) of the parts:
[0059] ,
[0060] For example, the template feature points of other feature points are , the template feature point of the template feature point after translation is .
[0061] The third step is to calculate the error between the feature points of the task graph after the template feature points are transformed by the translation transformation matrix M and their corresponding paired feature points. , and the transformed point is , the corresponding task graph feature points in the paired point pair are , and its error e is defined as and The second norm of the coordinate difference, that is:
[0062] .
[0063] The fourth step is to set the error threshold t. If the error of the current template feature point pair (i+1) <t, then the template feature point is added to the internal point set, otherwise, the template feature point is screened out as an external point;
[0064] The fifth step is to use the matrix M calculated for feature point pair i to complete the error calculation for all other feature point pairs, and then obtain the inlier point combination of this cycle. The inlier point sets calculated for feature point pair (i-1) are compared, and the one with the larger number is taken as the best inlier point set.
[0065] Step 6: Perform the next cycle and repeat steps 2 to 5 until all feature point pairs are traversed. At this time, a final optimal inlier set is obtained. It is determined whether the number of feature point pairs in the optimal inlier set is greater than the threshold N4. If so, the average translation matrix of the task part equivalent to the template part in all paired feature points in the optimal inlier combination is used as the translation matrix of the center point of the component frame. The translation matrix is:
[0066] ,
[0067] in, is the offset of the task graph part relative to the template graph part in the x-coordinate direction of all paired feature points in the internal point set, expressed as:
[0068] ,
[0069] is the offset of the task graph part relative to the template graph part in the y-coordinate direction of all paired feature points in the internal point set, expressed as:
[0070] ,
[0071] In the above formula, n is the number of paired feature point pairs in the best internal point set, is the task feature point in the i-th paired feature point pair, is the template feature point in the i-th paired feature point pair.
[0072] Step 7: When the number of feature point pairs in the target's inlier set (optimal inlier set) is less than the threshold value N4, the error threshold t is increased (the error threshold needs to be appropriately relaxed with the set step size S3, that is, the error threshold t is increased), and the maximum error threshold upper limit T is set at the same time. The upper limit T is used to limit the error threshold t from infinitely expanding and adding feature point pairs with excessive errors to the inlier set to cause inlier data pollution and damage the mapping accuracy; determine whether the increased error threshold t is greater than the maximum error threshold upper limit T. If so, the translation matrix of the feature point pair closest to the center of the component frame is used as the mapping relationship of the center point of the component frame (if the error threshold t is greater than the error threshold upper limit T, the translation matrix of the feature point pair closest to the center of the component frame is used as the mapping relationship of the center point of the component frame). Limit T, at this time, the inner points also have a large deviation, and their average translation transformation matrix is no longer suitable for calculating the component box. At this time, the translation relationship of the feature point pair closest to the component box is selected as the mapping change relationship to minimize the error). If not, re-traverse any feature point pair i in the valid feature point pairs, repeatedly find the target's inner point set and compare it with the threshold N4, until the number of feature point pairs in the target's inner point set is greater than the threshold N4, and then perform the translation transformation matrix through the sixth step. The above finally obtains the mapping of the component from the template diagram to the task diagram, which is mapped to the mapping of the center point of the component box. The label, length and width after mapping remain consistent with those before mapping.
[0073] The component matching step matches the components in the task diagram through the mapping relationship of the center points of the component frames;
[0074] Specifically, Figure 4 As shown, first, the mapped component frame is appropriately expanded by an expansion amount P1. This step is to eliminate the error caused by more or less offset after mapping and increase the probability of successful matching. The component frame of the task diagram corresponding to the template diagram in the model construction is appropriately expanded by an expansion amount P2;
[0075] Secondly, the expanded task graph component frame is traversed, and the traversed task graph component frame is subjected to IOU calculation with the template component mapping frame with the same label. During the IOU calculation process between the current task graph component frame and all template component mapping frames, the component mapping frame information with the maximum IOU is recorded and updated in a rolling manner, and an IOU threshold U is set;
[0076] Finally, determine whether the maximum IOU of the final record of the rolling update is greater than the threshold U. If it is greater, the template component with the maximum IOU is considered to be successfully matched with the template component of the current task map. If it is less than, in addition to processing the actual missing of the component in the task map, it may also be missed by the component target recognition model. In order to eliminate the influence of the latter, secondary confirmation is required. The secondary confirmation is to take a small picture of the frame after the module component is mapped, and perform SSIM similarity judgment with the template frame before mapping. If the similarity is higher than the set similarity threshold, it is still considered to be a successful match. If it is lower, it is finally determined that the component in the task map is missing.
[0077] 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 matching underbody components of a rail vehicle, characterized in that: The following steps are included: Feature point extraction and pairing step: extract feature points from the image to be inspected and the preset template image through a deep learning network model, and pair the extracted feature points with feature descriptors through a matching network to obtain feature point pairs; The feature point pair registration step compares the number of feature point pairs with a preset point pair threshold N1, and selects to register the feature point pairs or expand and register the feature point pairs in combination with the template depth according to the comparison result, so as to serve as valid feature point pairs for the component frame mapping transformation; A mapping relationship calculation step, wherein the effective feature point pairs are calculated through a translation transformation matrix to obtain transformed template feature points, the error values of the template feature points and the feature point pairs in the task graph are calculated, and whether to add the inner point set is determined according to the error value, and the number of feature point pairs in the inner point set is determined to select the average translation matrix of the task graph part relative to the template graph part of all feature point pairs in the inner point set as the mapping relationship of the center point of the component frame, or to select to change the error value judgment standard to re-update the inner point set, and re-determine the number of feature point pairs in the inner point set to obtain the mapping relationship of the center point of the component frame; The mapping relationship calculation step traverses any feature point pair i in the valid feature point pair, obtains a matrix M by applying a translation transformation matrix to the feature point pair i, performs a translation transformation on the template feature point pairs of other feature points in the valid feature point pair through the matrix M to obtain template feature points of other feature point pairs after the translation transformation, compares the error value with the error threshold t, and if the error value is less than the error threshold t, the template feature point is added to the internal point set, otherwise, the template feature point is screened out as an external point; Compare the number of inliers obtained from feature point pair i with the inliers obtained from the previous feature point pair, and select the inliers with the larger number as the target inliers. In the mapping relationship calculation step, when the number of feature point pairs in the target's internal point set is less than the threshold value N4, the error threshold value t is increased, and the maximum error threshold upper limit T is set, and it is determined whether the increased error threshold value t is greater than the maximum error threshold upper limit T. If so, the translation matrix of the feature point pair closest to the center of the component frame is used as the mapping relationship of the center point of the component frame. If not, any feature point pair i in the valid feature point pairs is traversed again, and the target's internal point set is repeatedly searched for comparison with the threshold value N4; The component matching step matches the components in the task diagram through the mapping relationship of the center points of the component frames.
2. A method for matching underbody components of a railway vehicle according to claim 1, characterized in that: In the feature point pair registration step, when the comparison result is that the number of feature point pairs is less than the threshold value N1, the depth of the plane where the current component is located is determined according to the depth estimation of the template image and the center coordinates of the component frame, and the area in the template image whose depth difference with the current component is within the range of the threshold value M1 is determined. According to the comparison between the number of paired feature point pairs falling within the threshold value M1 and the threshold value N2, it is selected to continue to expand the threshold value M1 or to expand the component frame within the range of the threshold value M2, and then the number of paired feature point pairs within the threshold value M2 is compared with the threshold value N3, and it is selected to continue to expand the threshold value M2 to repeat the comparison or to retain the paired feature points within the output threshold value M2 as valid feature point pairs.
3. A method for matching underbody components of a railway vehicle according to claim 1, characterized in that: The translation transformation matrix of the feature point pair i is: , , , , in, is the feature point pair i, is the corresponding feature point of the feature point centering template, is the corresponding feature point of the task graph in the feature point alignment, is the offset in the x direction, is the offset in the y direction, and the template feature points of other feature point pairs are , the other feature points after translation transformation are the template feature points , the task image feature points are ; The calculation method of the error value is configured as follows: , in, is the error value.
4. A method for matching underbody components of a railway vehicle according to claim 3, characterized in that: The average translation matrix is: , , , in, is the offset of the task graph part relative to the template graph part in the x-coordinate direction of all paired feature point pairs in the internal point set, is the offset of the task graph part relative to the template graph part in the y-coordinate direction of all paired feature point pairs in the inlier set, and n is the number of paired feature point pairs in the inlier set.
5. A method for matching underbody components of a railway vehicle according to claim 1, characterized in that: It also includes a depth estimation step, in which the template map of each point is used through a deep learning model to determine the relative depth relationship of the distribution of the bottom vehicle components to obtain a depth distribution map.
6. A method for matching underbody components of a railway vehicle according to claim 1, characterized in that: The component matching step expands the mapped component frame, performs IOU calculation by traversing the expanded component frame and the component frame with the same label, compares the IOU value with a threshold value U, and outputs a successful match or a missing component based on the comparison result.
7. A method for matching underbody components of a railway vehicle according to claim 6, characterized in that: The component matching step expands the mapped template component frame by an expansion amount P1, expands the task graph component frame corresponding to the preset template graph by an expansion amount P2, and performs IOU calculation by traversing the expanded task graph component frame and the template component frame.
8. A method for matching underbody components of a railway vehicle according to claim 7, characterized in that: In the component matching step, when the comparison result is that the IOU value is less than the threshold U, a portion of the template component frame after mapping is intercepted and the template component frame before mapping is judged for similarity, and a successful match or component missing is output according to the similarity judgment result.
Citation Information
Cited By
Urban rail train cable groove cover plate defect detection method and system
CN122737111A
Urban rail train cable slot cover plate defect detection method and system
CN122737111B
