A missing detection method for railway train item points
By constructing a target detection model and using feature point matching to analyze the missing item points of rail trains, the problems of low detection efficiency and poor robustness in the existing technology are solved, and fast and accurate missing item point detection is achieved.
Patent Information
- Application Number
- CN202410865938.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-01
- Publication Date
- 2024-08-27
- Estimated Expiration
- 2044-07-01
AI Technical Summary
The existing technology in the detection of missing item points in rail trains involves highly repetitive tasks and complex environments leading to false detections or missed detections. In addition, detection methods based on artificial intelligence have a large demand for different missing item point samples, difficult data collection, and are robust. Poor sex.
By building a target detection model, using the feature point matching of historical images and images to be inspected, and combining rigid and flexible matching strategies, the position, texture and color information of the item points are analyzed to determine the missing situation. There is no need to collect missing sample images of the item points, thus improving detection efficiency.
It achieves fast and accurate detection of missing rail train item points, improves detection efficiency and robustness, can accurately analyze image integrity in different scenarios and states, and quickly cut missing areas.
Smart Images

Figure CN118397316B
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of rail vehicle detection, and more particularly to a method for detecting missing items of rail trains. Background Art
[0002] Rail trains are a high-speed, efficient, safe and environmentally friendly means of public transportation, and their maintenance is an important part of ensuring the normal operation of rail trains. The inspection of rail trains involves multiple components, multiple processes and multiple inspection points, among which the missing detection of key components is a crucial link.
[0003] Currently, the detection of missing important parts of rail trains usually relies on manual inspection one by one. However, this method has highly repetitive work and a complex working environment, which can easily cause visual fatigue of operators, which may lead to misdetection or missed detection.
[0004] In recent years, with the vigorous development of artificial intelligence technology, industrial inspection technology based on computer vision has attracted much attention. In the field of rail transit, for the detection of missing items in rail trains, machine learning or deep learning methods are currently mainly used to train a classification model or target detection model based on missing items and normal images. Through these models, the collected image area can be detected to determine whether there are missing items. However, there are some problems with the current artificial intelligence-based detection methods, including the need for a large number of different missing items, difficulty in data collection, and susceptibility to interference from the on-site environment, which leads to poor robustness of target detection. 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 detecting missing item points of rail trains. This detection method can flexibly consider the position information, texture information and color information of all item points in the area based on the historical images of the detection area, i.e., the template images and the images to be inspected, and infer the status, i.e., the missing situation, of all item points in the area without collecting missing sample images of any item points, thereby improving the efficiency of missing item point detection of rail trains.
[0006] To achieve the above object, the present invention provides the following technical solutions:
[0007] A method for detecting missing items of a railway train comprises the following steps:
[0008] The target detection model construction step is to obtain image data in different states and input them into the neural network in proportion to train, verify and test the target detection model;
[0009] The image item point detection and matching step is to input the image to be inspected acquired by vision into the target detection model to output the item points to be inspected in the image to be inspected, obtain the template item points in the template image, and determine whether the matching threshold is reached according to the number of common feature points between the item points to be inspected and the template item points. If not, a feature point processing strategy is used to standardize all feature points into an item point format to obtain auxiliary feature points, and a rigid matching strategy is used to obtain a list of item points to be detected for the template item points using the auxiliary feature points as the item point information when the item points are reached. The item point information in the list of item points to be detected is matched with the item point information in the image to be inspected through an item point flexible matching strategy to obtain a list of matching item points to be verified and a list of non-matching item points to be verified for the item points to be inspected.
[0010] In the step of eliminating mismatched item points, the item points mapped to each other in the list of matching item points to be verified are analyzed for outliers by distance analysis, and the list of matching item points to be verified and the list of non-matching item points to be verified are updated respectively according to the existence results of the outliers;
[0011] Repeat the matching step for missing item points, and analyze the coordinate area image of each item point in the list of non-matching item points to be verified by correlation matching to see if it is a missing item point. If so, record it in the list of missing item points;
[0012] The missing item point feedback step is to intercept the missing area of the image to be inspected corresponding to the missing item point and output the feedback.
[0013] Furthermore, the item points to be detected include the number of item points, item point positions and category information, the item point positions include the horizontal coordinates and vertical coordinates of the item points in the image and the width and height of the minimum circumscribed rectangle of the item points, the category information reflects the labels of the item points, and the image item point detection and matching step includes an item point processing sub-step,
[0014] The item point processing sub-step processes the item point position information through a maximum and minimum value normalization formula to obtain scale-balanced position information.
[0015] Furthermore, the feature point processing strategy includes a feature point extraction step and a feature point standardization processing step.
[0016] The feature point extraction step inputs the template image and the image to be inspected into the feature extraction network model to output two sets of feature points that map to each other, each feature point including two features, the horizontal coordinate and the vertical coordinate;
[0017] The feature point standardization processing step assigns values to the width and height of the minimum circumscribed rectangle of all feature points mapped to each other, and assigns labels to obtain the feature format of the item points, which are virtualized as auxiliary feature points.
[0018] Furthermore, the item point rigid matching strategy includes a feature matching step, a feature mapping step and an item point distinguishing step.
[0019] The feature matching step is to describe the item point information with features, and perform feature matching in combination with a nearest neighbor matching algorithm and a nearest neighbor distance ratio matching algorithm to obtain a feature matching pair;
[0020] In the feature mapping step, the feature matching pair is estimated by the RANSAC algorithm to obtain a geometric change model, and the image to be inspected and the template image are mapped to obtain an intersection of the two as a detection image;
[0021] The item point distinguishing step arranges the item point information in the template image that is not in the detection map as a non-detection item point list, and arranges the item point information in the template image that is in the detection map as a list of item points to be detected.
[0022] Furthermore, the item point flexible matching strategy includes an image transformation step and a correlation analysis step.
[0023] The image transformation step is to generate a new inspection image by multiplying the inspection image by a parameter transformation matrix;
[0024] In the correlation analysis step, the information of the item points to be checked and the item points in the new inspection image is used to calculate the correlation between all the item points in the new inspection image and the item points in the list of item points to be checked through the radial basis function, and the item points with the greatest correlation between the item points in the new inspection image and the item points in the list of item points to be checked are counted, and the mapping relationship between the item points in the list of item points to be checked and the item points to be checked is determined according to the correlation results, and the mutually mapped item points are planned to the list of matching item points to be verified, otherwise they are planned to the list of non-matching item points to be verified.
[0025] Furthermore, the radial basis function is configured as follows:
[0026] ,
[0027] Among them, x and y are two term points, represents the Euclidean distance between two points, It is the parameter of the Gaussian kernel function, which is used to control the decay speed of the similarity.
[0028] Furthermore, in the step of eliminating mismatched item points, the item point pairs mapped to each other in the list of matching item points to be verified are calculated by a distance formula to obtain a distance list, the standard deviation value and the mean are obtained according to the distance values in the distance list, the standard deviation value and the mean are calculated by a Z algorithm to obtain the degree of deviation between each distance and the mean to form a distance deviation list, and the distance deviation list is used to determine whether there are outliers in the distance list through an IQR algorithm.
[0029] Furthermore, the distance algorithm is configured as follows:
[0030] ,
[0031] Where x and y are the coordinates of two points. n is the dimension of the coordinates. n =2, is with i The weight parameters related to the coordinate axes;
[0032] The Z algorithm is configured as:
[0033] ,
[0034] in, X is the distance, is the mean, is the standard deviation.
[0035] Furthermore, the missing item points repeat the matching step, multiply the coordinate point of each item point in the list of non-matching item points to be verified by the transformation parameter transformation matrix to generate a predicted position, intercept the item point image of the item point position in the detection image, and then intercept the item point image in the image to be inspected through the predicted position, calculate the correlation value of the two item point images, and determine whether it is a missing item point based on the correlation value.
[0036] Furthermore, it also includes a missing item point judgment step, wherein the missing item point is input into the target detection model, and the output result is judged. If the output is empty, the item point is determined to be empty. Otherwise, it is judged whether the output result is the same as the item point in the corresponding list of non-matching item points to be verified. If they are the same, the item point is determined to be a non-missing item point, otherwise it is a missing item point.
[0037] The beneficial effects of the present invention are as follows: through a large number of images of different scenes and states, training, verification and testing are realized to obtain a refined target detection model, and then by substituting the image to be detected into the target detection model and pairing the item points with the template image, it is possible to quickly and accurately analyze whether the image is complete. If there are missing item points, the area corresponding to the missing item points can be quickly cut and fed back to the front end. The analysis method does not need to collect any missing sample images of item points for comparison, and can more robustly realize the missing item point detection of rail trains. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] Figure 1 It is the overall flow chart of the present invention;
[0039] Figure 2 It is a flow chart of building a target detection model in the present invention;
[0040] Figure 3 It is a flowchart of whether the item point analysis in the present invention is missing; DETAILED DESCRIPTION
[0041] 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.
[0042] In recent years, with the vigorous development of artificial intelligence technology, industrial inspection technology based on computer vision has attracted much attention. In the field of rail transit, for the detection of missing item points of rail trains, machine learning or deep learning methods are currently mainly used to train a classification model or target detection model based on missing item point images and normal images. Through these models, the collected image area can be detected to determine whether there are missing item points. However, there are some problems with the current artificial intelligence-based detection methods, including the need for a large number of different missing item point samples, difficulty in data collection, and susceptibility to interference from the on-site environment, which leads to poor robustness of target detection;
[0043] Therefore, the present invention designs a method for detecting missing track train points, such as Figure 1 , Figure 2 as well as Figure 3 As shown, the steps include the following:
[0044] The target detection model construction step is to obtain image data in different states and input them into the neural network in proportion to train, verify and test the target detection model;
[0045] Specific as Figure 2 As shown in the figure, the first step is to create a point target detection data set and build a point target detection neural network, specifically:
[0046] Collect images of all item points in different states. Different states refer to the different degrees of dirtiness, rust and corrosion of the item points, as well as the different brightness levels caused by the light source. The image refers to a three-channel color image. The collected images are annotated with item points using image annotation software. The labels are the names of the item points. Labels corresponding to the collected images are made in YOLO format. The item points include but are not limited to fastening bolts, wire pipe clamps, pipeline joints, grounding resistors, grinders, parking stops, nameplates, door rubber strips, etc. The collected images and corresponding labels are divided into training set, validation set and test set in a ratio of 8:1:1 to form an item point target detection dataset.
[0047] The target detection neural network specifically refers to the YOLOv8 target detection network, whose backbone network is based on CSP (compact and separate) design and introduces a new C2f structure, which is richer in gradient flow. The number of channels of the backbone network is adjusted according to models of different scales to improve performance. The target detection adopts a path aggregation network structure, which is conducive to multi-scale target detection. The detection head uses a decoupled head structure to separate the classification and detection heads. In terms of positive sample allocation strategy, a positive sample matching strategy is adopted, and a distributed loss function is introduced for training data enhancement, and the binary cross entropy loss function is used as the loss function.
[0048] The target detection neural network was trained for 100 rounds using the target detection dataset. The attributes were set to 64 during training, and the image size was adjusted to 512*512 pixels. Data enhancement techniques, such as random rotation, flipping, and cropping, were used to expand the training data and improve the generalization and robustness of the model. The target detection model was generated through training. The input of the target detection model was a 512*512*3 three-channel color image, and the output was an n*3 list, which stored the position and category information of the detected item points in the input image. The target detection model was converted into an ONNX format model with no change in the input and output, and was deployed to the algorithm server.
[0049] The image item point detection and matching step inputs the image to be detected acquired by vision into the target detection model and outputs the item points to be detected in the image to be detected, specifically:
[0050] The captured image is first preprocessed. The image preprocessing includes first scaling the image to 512*512 pixels, then performing mean filtering to remove noise in the image, and finally making the image more uniform through histogram equalization. Then, the deployed target detection model is used to detect the image after image preprocessing, detect the item points in the image, and output an n*3 list, where n is the number of item points. The image preprocessed and the list are output.
[0051] Obtain the template item points in the template image, and determine whether the matching threshold is reached according to the number of common feature points between the item points to be checked and the template item points. If not, perform a feature point processing strategy to standardize all feature points into item point format to obtain auxiliary feature points, and use the auxiliary feature points as the item point information when reached to perform a rigid matching strategy to obtain a list of item points to be detected for the template item points. If the common feature points reach the matching threshold, perform a rigid matching on the item point information directly, and then use an item point flexible matching strategy to obtain a list of matching item points to be verified and a list of non-matching item points to be verified for the item points to be checked.
[0052] In the step of eliminating wrong matching points, the points in the list of matching points to be verified that are mapped to each other are analyzed for outliers through distance analysis. The list of matching points to be verified and the list of non-matching points to be verified are updated respectively according to the existence of outliers, in order to avoid mixing wrong points into the list of matching points to be verified;
[0053] Repeat the matching steps for missing item points, and analyze the coordinate area image of each item point in the list of non-matching item points to be verified by correlation matching to see if it is a missing item point. If so, record it in the list of missing item points;
[0054] In the missing item point feedback step, the missing area of the image to be inspected is intercepted and fed back as output according to the missing item point corresponding to the missing item point.
[0055] The beneficial effects of the present invention are as follows: training, verification and testing are carried out through a large number of images of different scenes and states to obtain a refined target detection model, and then by substituting the image to be detected into the target detection model and pairing the item points with the template image, it is possible to quickly and accurately analyze whether the image is complete. If there are missing item points, the area corresponding to the missing item points can be quickly cut and fed back to the front end, and the analysis method does not need to collect any missing sample images of item points for comparison, and can more robustly realize the missing item point detection of rail trains.
[0056] Since the item point information includes the number of item points, the item point position and the category information, that is, the item point to be detected also includes the above three contents, the item point position {x, y, w, h} includes the horizontal coordinate x, the vertical coordinate y and the width w and height h of the minimum circumscribed rectangle of the item point in the image, and the category information reflects the label of the item point. The image item point detection and matching step includes the item point processing sub-step.
[0057] In the item point processing sub-step, the item point position information is processed by the maximum and minimum value normalization formula to obtain the scale-balanced position information, wherein the maximum and minimum value normalization formula is configured as:
[0058] in, x min Yes all x The minimum value of x max Yes all x The maximum value of x new yes x The value after normalization by the maximum and minimum values.
[0059] The feature point processing strategy includes feature point extraction step and feature point standardization processing step.
[0060] Feature point extraction step: input the template image and the image to be inspected into the feature extraction network model to output two sets of feature points that map to each other, each feature point containing two features, the horizontal coordinate and the vertical coordinate;
[0061] The feature point standardization processing step is to assign the width and height of the minimum circumscribed rectangle of all the mutually mapped feature points, and assign labels to obtain the feature format of the item points, and virtualize them as auxiliary feature points;
[0062] Specifically, the feature extraction network model is used to extract the feature points of the template image and the image to be inspected respectively. Specifically, the feature extraction network model is a network model after 500 rounds of training of a deep learning neural network with an encoding-decoding structure on the data set of a visualization database. The input of the feature extraction network is two color images of 512*512*3 pixels, and the output is an m*2 list, which represents the horizontal and vertical coordinates of the two sets of feature points mapped to each other on the two input images. Mutual mapping means that the two sets of feature points can be completely reconstructed after perspective transformation and radiation transformation on the two input images. In total, m refers to the number of feature points extracted; the feature points are abstracted into auxiliary feature points, and their information is standardized. Specifically, since the item points have 5 features, x, y, w, h and labels, and the extracted image feature points have 2 features, x and y, the feature information of the feature points needs to be standardized. Specifically, all feature points are virtualized into 3 feature information, w, h and labels, where w and h are assigned values of 5 and 5 respectively, and the label information is an auxiliary feature point. The feature format of all feature points is processed into the feature format of item points, and then the feature points are virtualized into auxiliary feature points. When extracting feature points using the feature extraction network, the upper limit of feature points is set to 500.
[0063] The item point rigid matching strategy includes feature matching step, feature mapping step and item point distinguishing step.
[0064] In the feature matching step, the item point information or the item point information and the auxiliary feature points are described by using the SIFT descriptor, and feature matching is performed in combination with the nearest neighbor matching algorithm and the nearest neighbor distance ratio matching algorithm to obtain a feature matching pair;
[0065] In the feature mapping step, the feature matching pairs are estimated by the RANSAC algorithm to obtain the best geometric change model, and the image to be inspected and the template image are mapped to obtain the intersection of the two as the inspection image;
[0066] In the item point distinguishing step, the item point information in the template image that is not in the detection map is planned as a non-detection item point list, and the item point information in the template image that is in the detection map is planned as a list of item points to be detected.
[0067] The flexible matching strategy of item points includes image transformation step and correlation analysis step.
[0068] The image transformation step, first, based on the descriptor matching method, feature matching is performed between the item point information to be inspected and the item point information in the image to be inspected (including auxiliary feature points). The present invention adopts the ORB descriptor to implement this method. Then, the thin plate spline interpolation algorithm is used to estimate the deformation and solve the transformation parameter transformation matrix. The parameter transformation matrix is a 3*3 matrix used to describe the translation, rotation, scaling and shearing between the two images. Then, the inspection image is multiplied by the parameter transformation matrix to generate a new inspection image.
[0069] In the correlation analysis step, the information of the item points to be checked and the item points in the new inspection image are calculated through the radial basis function with the correlation between all the item points in the new inspection image and the item points in the list of item points to be checked, and the item points with the greatest correlation between the item points in the new inspection image and the item points in the list of item points to be checked are counted. If the correlation is greater than a certain threshold, it is considered that the two item points are mapped to each other. Otherwise, the item points have no mutually mapped item points, and the information of the mutually mapped item point pairs is recorded in the list of matching item point pairs to be verified, and the information of the item point pairs that are not mutually mapped is recorded in the list of non-matching item points to be verified.
[0070] The radial basis function is configured as:
[0071] ,
[0072] Among them, x and y are two term points, represents the Euclidean distance between two points, It is the parameter of the Gaussian kernel function, which is used to control the decay speed of the similarity.
[0073] In the step of eliminating mismatched items, the item pairs mapped to each other in the list of matching items to be verified are calculated by distance formula to obtain a distance list. Considering the large difference in the deviation between the template image and the image to be tested in the x and y directions, the distance calculation formula is designed as follows:
[0074] ,
[0075] Where x and y are the coordinates of two points. n is the dimension of the coordinates. n =2, is with i The weight parameters related to the coordinate axes;
[0076] The standard deviation and mean are obtained according to the distance values in the distance list, and the standard deviation and mean are calculated by the Z algorithm to obtain the degree of deviation between each distance and the mean to form a distance deviation list;
[0077] The Z algorithm is configured as:
[0078] ,
[0079] in, X It's distance. is the mean, is the standard deviation;
[0080] The distance deviation list is used through the IQR algorithm to determine whether there are outliers in the distance list, where the IQR multiple parameter is set to 1.5. If there are outliers, the corresponding item point information to be checked is added to the list of non-matching item points to be verified, and the corresponding information is deleted from the list of matching item points to be verified.
[0081] Example:
[0082] First use The distance calculation formula calculates the distance between all the matching points to be verified. In this embodiment, n is 2, so the distance calculation formula is specifically: , x and y are the coordinates of two points, The value of , the distance list is a 1*n matrix, in which each element represents the distance value calculated from the coordinate value of its corresponding item point in the template image and the coordinate value of its mapped item point in the image to be tested; then calculate the standard deviation and average value of the elements in the distance list, where the formula for the standard deviation is , where N is the length of the distance list, i.e. the number of matching points to be verified. Represents the elements of the distance list, Represents the mean of the elements in the distance list; then the Z-scores method is used to calculate the distance deviation value of each element in the distance list to form a 1*n list. The distance deviation value is a constant greater than 0. The larger the value, the larger the distance offset; the IQR algorithm is further used to determine whether there are outliers in the distance deviation list, and the index of the outlier in the distance deviation list is given. The IQR algorithm stands for interquartile range, which is a method used in statistics to measure the degree of data dispersion. The steps for calculating IQR are as follows:
[0083] 1) Record the index of each distance list element in the distance list, and sort the distance deviation list in order of size;
[0084] 2) Find the first quartile of the distance list Q 1, indicating that 25% of the values in the data are below it;
[0085] 3) Find the third quartile of the distance list , indicating that 75% of the values in the data are below it;
[0086] 4) Calculate IQR using the formula get;
[0087] 5) The distance deviation value with a numerical value greater than 1.5 times the IQR value is identified as an outlier, and the checkable item point information in the corresponding item point pair information is added to the list of non-matching item point pairs to be verified according to the fed-back index, and the corresponding information is deleted from the list of matching item point pairs to be verified.
[0088] Through the above steps, the incorrect matching points in the list of matching points to be verified are screened out. For the elements in the remaining matching point list, the mapping relationship rotation and translation matrix of their corresponding point pairs is calculated. , where R is a 3x3 rotation matrix that describes the rotation transformation, T is a 3x1 translation vector that describes the translation transformation, and the last row is [0 0 01], which is an extension in a homogeneous coordinate system and is used to represent the translation part.
[0089] Repeat the matching steps for the missing item points, multiply the coordinate point of each item point in the list of non-matching item points to be verified by the transformation parameter transformation matrix to generate a predicted position, intercept the item point image of the item point position in the detection image, and then intercept the item point image in the image to be detected by the predicted position, calculate the correlation value of the item point images of the two, and determine whether it is a missing item point according to the correlation value. Specifically, for each item point in the list of non-matching item points to be verified, the coordinate point is multiplied by the transformation parameter transformation matrix to generate the predicted coordinates x1, y1, w and h values remain unchanged, and the item point image in the detection image is intercepted using [x, y, w, h] in the item point information, and then the item point image in the detection image is intercepted by using The predicted coordinates [x1, y1, w, h] intercept the item point image in the image to be checked, and calculate the SSIM value (correlation) of the above two images. If the SSIM value is greater than a certain threshold, the object corresponding to the position of the predicted coordinates is considered to be a missed item point, and the predicted coordinates and w, h values and the item point information are added to the list of matching item points to be verified, and the item point information is deleted from the list of non-matching item points to be verified. If the SSIM is less than the threshold, the item point is considered to be a missing item point, and the predicted coordinate value and w, h values are written into the missing item point list to complete the missed match confirmation of this item point.
[0090] Then, a secondary match is performed on the missed matching item points. The coordinate value of the item point corresponding to each element in the list of non-matching item points to be verified in the template image is multiplied by the rotation and translation matrix to obtain its predicted coordinates in the image to be checked. Then, the item point image in the template image and the item point image at the predicted position in the image to be checked are intercepted one by one. The SSIM values of the two images are calculated using the computer vision open source library. A threshold of 0.7 is set. If the calculated SSIM value is greater than the threshold, the corresponding item point is determined to be a missed item point, and the predicted coordinates, w and h values, and the item point information are added to the list of matching item points to be verified. If the SSIM is less than the threshold, the item point is considered to be a missing item point, and the predicted coordinate value and w and h values are written into the list of missing item points, thereby completing the missed match confirmation of this item point.
[0091] Finally, the list of matching items to be verified and the list of missing items are input into the missing logic judgment of the items to be checked to further confirm whether the items corresponding to the missing item list are really missing.
[0092] The method also includes a missing item point judgment step, in which the missing item point is input into the target detection model, and the output result is judged. If the output is empty, the item point is determined to be empty. Otherwise, it is judged whether the output result is the same as the item point in the corresponding list of non-matching item points to be verified. If they are the same, the item point is determined to be a non-missing item point, otherwise it is a missing item point.
[0093] 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 missing points of a railway train, characterized in that: The steps include: The target detection model construction step is to obtain image data of item points in different states and input them into the neural network in proportion to train, verify and test to obtain the target detection model; The image item point detection and matching step is to input the image to be inspected acquired by vision into the target detection model to output the item points to be inspected in the image to be inspected, obtain the template item points in the template image, and determine whether the matching threshold is reached according to the number of common feature points between the item points to be inspected and the template item points. If not, a feature point processing strategy is used to standardize all feature points into an item point format to obtain auxiliary feature points, and a rigid matching strategy is used to obtain a list of item points to be detected for the template item points using the auxiliary feature points as the item point information when the matching threshold is reached. If the common feature points reach the matching threshold, the item point information is directly rigidly matched, and then the item point information in the list of item points to be detected is matched with the item point information in the image to be inspected through an item point flexible matching strategy to obtain a list of matching item points to be verified and a list of non-matching item points to be verified for the item points to be inspected. The item point rigid matching strategy includes a feature matching step, a feature mapping step and an item point distinguishing step. The feature matching step is to describe the item point information with features, and perform feature matching in combination with a nearest neighbor matching algorithm and a nearest neighbor distance ratio matching algorithm to obtain a feature matching pair; In the feature mapping step, the feature matching pair is estimated by the RANSAC algorithm to obtain a geometric change model, and the image to be inspected and the template image are mapped to obtain an intersection of the two as a detection image; The item point distinguishing step includes planning the item point information in the template image that is not in the detection image as a non-detection item point list, and planning the item point information in the template image that is in the detection image as a list of item points to be detected; The item point flexible matching strategy includes an image transformation step and a correlation analysis step. The image transformation step is to generate a new inspection image by multiplying the inspection image by a parameter transformation matrix; The correlation analysis step is to calculate the correlation between all the item points in the new inspection image and the item points in the list of item points to be detected by using the radial basis function to calculate the correlation between the item points in the new inspection image and the item points in the list of item points to be detected, and to count the item points with the greatest correlation between the item points in the new inspection image and the item points in the list of item points to be detected, and to determine the mapping relationship between the item points in the list of item points to be detected and the item points to be inspected according to the correlation result, and to plan the mutually mapped item points to the list of matching item points to be verified, otherwise, to the list of non-matching item points to be verified; In the step of eliminating mismatched item points, the item points mapped to each other in the list of matching item points to be verified are analyzed for outliers by distance analysis, and the list of matching item points to be verified and the list of non-matching item points to be verified are updated respectively according to the existence results of the outliers; Repeat the matching step for missing item points, intercept the coordinate area image of each item point in the list of non-matching item points to be verified, analyze whether the coordinate area image is a missing item point through correlation matching, and if so, record it in the list of missing item points; The missing item point feedback step is to intercept the missing area of the image to be inspected corresponding to the missing item point and output the feedback.
2. According to claim 1, a method for detecting missing items of a railway train is characterized in that: The item points to be checked include the number of item points, item point positions and category information. The item point positions include the horizontal coordinates and vertical coordinates of the item points in the image and the width and height of the minimum circumscribed rectangle of the item points. The category information reflects the labels of the item points. The image item point detection and matching step includes an item point processing sub-step. The item point processing sub-step processes the item point position information through a maximum and minimum value normalization formula to obtain scale-balanced position information.
3. According to claim 2, a method for detecting missing items of a railway train is characterized in that: The feature point processing strategy includes a feature point extraction step and a feature point standardization processing step. The feature point extraction step inputs the template image and the image to be inspected into the feature extraction network model to output two sets of feature points that map to each other, each feature point including two features, the horizontal coordinate and the vertical coordinate; The feature point standardization processing step assigns values to the width and height of the minimum circumscribed rectangle of all feature points mapped to each other, and assigns labels to obtain the feature format of the item points, which are virtualized as auxiliary feature points.
4. According to claim 1, a method for detecting missing items of a railway train is characterized in that: The radial basis function is configured as: , Among them, x and y are two term points, represents the Euclidean distance between two points, It is the parameter of the Gaussian kernel function, which is used to control the decay speed of the similarity.
5. The method for detecting missing items of a railway train according to claim 1, characterized in that: In the step of eliminating mismatched item points, the item point pairs mapped to each other in the list of matched item points to be verified are calculated by a distance formula to obtain a distance list, the standard deviation value and the mean are obtained according to the distance values in the distance list, the standard deviation value and the mean are calculated by a Z algorithm to obtain the degree of deviation between each distance and the mean to form a distance deviation list, and the distance deviation list is used to determine whether there are outliers in the distance list by an IQR algorithm.
6. A method for detecting missing items of a railway train according to claim 5, characterized in that: The distance calculation formula is configured as: , Where x and y are the coordinates of two points. n is the dimension of the coordinate, is with i The weight parameters related to the coordinate axes; The Z algorithm is configured as: , in, X is the distance, is the mean, is the standard deviation.
7. A method for detecting missing items of a railway train according to claim 6, characterized in that: The missing item points repeat the matching steps, multiply the coordinate points of each item point in the list of non-matching item points to be verified by the transformation parameter transformation matrix to generate a predicted position, intercept the item point image of the item point position in the detection image, and then intercept the item point image in the image to be inspected through the predicted position, calculate the correlation value of the two item point images, and determine whether it is a missing item point based on the correlation value.
8. A method for detecting missing track train item points according to claim 7, characterized in that: The method also includes a missing item point judgment step, in which the missing item point is input into the target detection model, and the output result is judged. If the output is empty, the item point is determined to be empty. Otherwise, it is judged whether the output result is the same as the item point in the corresponding list of non-matching item points to be verified. If they are the same, the item point is determined to be a non-missing item point, otherwise it is a missing item point.
