A method, device and storage medium for detecting abnormality of a rail train body
Through image processing and deep learning technology, combined with macro-level and item-level detection strategies, the problem of false detection and missed detection in rail train body abnormality detection is solved, the detection of shape and color value deviation is realized, and the detection efficiency is improved. and accuracy, reducing false positives.
Patent Information
- Application Number
- CN202410956150.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-17
- Publication Date
- 2024-09-20
- Estimated Expiration
- 2044-07-17
AI Technical Summary
The existing technology in rail train car body anomaly detection involves highly repetitive work and complex environments leading to false detections or missed detections, and detection based on pixel levels cannot detect small abnormalities such as car body cracks, and the image will inevitably be processed. Tolerance for changes in exposure and light is too low, resulting in false alarms.
The image processing and segmentation step is used for preprocessing, the vehicle information matching step establishes a task number, and the vehicle body anomaly classification step performs shape and color value deviation analysis through deep learning. It combines macro-level and item-level anomaly detection strategies, using unsupervised and controlled methods. Supervise anomaly detection models to reduce computational effort and improve detection accuracy.
Through targeted analysis of historical anomalies, the efficiency and accuracy of detection can be improved, shape and color value deviations can be detected, false alarms can be reduced, and detection methods can be targeted and adapted to different anomaly types.
Smart Images

Figure CN118506299B
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of rail vehicle detection, and more particularly to a method, device and storage medium for detecting abnormality of a rail vehicle body. Background Art
[0002] Rail trains are a high-speed, efficient, safe and environmentally friendly means of public transportation, and their maintenance is crucial to ensure their normal operation. The inspection of rail trains covers multiple components, multiple processes and multiple inspection points, among which the detection of abnormalities such as scratches, impact damage, foreign matter adhesion and missing key components on the train body is a crucial link.
[0003] At present, the detection of abnormalities in rail train bodies 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, and may lead to false detection or missed detection.
[0004] With the continuous innovation of artificial intelligence technology, industrial inspection technology based on computer vision has attracted much attention in the field of rail transit. At present, in the field of rail transit, for vehicle body anomaly detection, the target detection algorithm is mainly used to detect known anomaly types or to judge the pixel-level difference between the template image and the image to be inspected and then set the anomaly threshold to achieve anomaly detection of all visible types of vehicle body images. The first method mentioned above can only detect known types of anomalies, but since the types of anomalies generated during the operation of rail trains are unpredictable, this method has the disadvantage of being unable to detect anomalies within the visible range of all images. Although the second method solves the above problems to a certain extent, it is only through pixel-level comparison detection that it is unable to detect small anomalies such as cracks in the vehicle body, and the tolerance for inevitable and unforeseen overexposure and light changes in the image is too low, resulting in false alarms. 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, device and storage medium for detecting body abnormalities of rail trains. The method for detecting body abnormalities of rail trains can select different abnormality detection modes according to different situations to reduce the amount of detection calculations and improve the accuracy of detection.
[0006] To achieve the above object, the present invention provides the following technical solutions:
[0007] A method for detecting abnormality of a vehicle body of a railway train comprises the following steps:
[0008] The image processing and segmentation step is to stretch, compress and style-convert the actual image collected to obtain a pre-processed image, and then segment the pre-processed image to obtain a plurality of images to be matched;
[0009] Vehicle information matching step, indexing the corresponding carriage number of the image to be matched in the database, and establishing a corresponding task number according to the carriage number;
[0010] The vehicle body abnormality classification step includes obtaining historical abnormality data from a database, and selecting a to-be-matched image that matches the historical abnormality data at the same position from a plurality of to-be-matched images as a comparison image, comparing the comparison image with a standard image at the same position in the database, and obtaining a shape deviation result or a color value deviation result according to the comparison;
[0011] anomaly detection and matching step, when the comparison result is a shape deviation result, the comparison graph is subjected to anomaly analysis through a macro-level anomaly detection strategy, and when the comparison result is a color value deviation result, the comparison graph is subjected to anomaly analysis through an item-level anomaly detection strategy;
[0012] The abnormal fault output step outputs the abnormal analysis result and the corresponding car number and task number as fault information.
[0013] Furthermore, in the vehicle body abnormality classification step, the comparison image and the standard image are both subjected to deep learning to perform boundary line drawing to obtain a comparison line image and a standard line image, the comparison line image and the standard line image are overlapped and superimposed to obtain the degree of line fitting, and a shape deviation value is estimated according to the degree of line fitting, and the comparison image and the standard image are both processed in black and white, and a color value deviation value is estimated based on the brightness value difference. If the color value deviation value is greater than the shape deviation value, the comparison result is defined as a color value deviation result; otherwise, it is defined as a shape deviation result.
[0014] Furthermore, the macro-level anomaly detection strategy includes an unsupervised anomaly detection step and a supervised anomaly detection step, wherein the unsupervised anomaly detection step includes a macro-level detection model construction sub-step and an anomaly comparison sub-step.
[0015] The macro-level detection model construction sub-step comprises: superimposing texture features on a normal image through a Poisson image fusion algorithm to obtain a superimposed image, performing grayscale processing on the superimposed image to convert it into a grayscale image, performing discrete transformation and enhancement processing of local texture features on the grayscale image to obtain an enhanced image, then performing inverse discrete transformation on the enhanced image to obtain a high-pass filtered image of the superimposed image, and training the high-pass filtered image in an image restoration network through a loss function to obtain a macro-level detection model;
[0016] The abnormal comparison submodule substitutes the actual image into the macro-level detection model to determine whether it is completely fitted. If it is not completely fitted, an abnormal instruction is output.
[0017] Furthermore, the loss function is configured as:
[0018] ,
[0019] ,
[0020] ,
[0021] ,
[0022] ,
[0023] in, Y is the original image, is the restored image, and is the weight parameter, M is the number of scales, l is brightness, c is the contrast, s is the structural similarity function, , and is a weight parameter and sums to 1, and is an image Y and The mean of and is an image Y and The standard deviation of is an image Y and The covariance of c 1 , c 2 and c 3 are all constants.
[0024] Furthermore, in the supervised anomaly detection step, a detection data set of each type of anomaly is prepared based on the historical anomaly data, a supervised anomaly detection network is built for the detection data set through a feature extraction network, and the actual image is substituted into the supervised anomaly detection network to obtain the specific anomaly type.
[0025] Furthermore, the item-level anomaly detection strategy includes an item-level comparison step.
[0026] The item point comparison step substitutes the actual image into the item point target detection model to output the item point data, and calculates the minimum bounding rectangle of each item point to be detected based on the item point data, and then extracts the features within the minimum bounding rectangle of each item point pair through the feature extraction network, and then calculates the Euclidean distance of the item point pair, and judges whether the item point is abnormal or normal based on the Euclidean distance.
[0027] Furthermore, it also includes an anomaly classification screening step, screening various types of anomalies in historical anomaly data, taking data belonging to the same anomaly type as an anomaly type data set, and then training and verifying each screened anomaly type data set through a classification network to obtain an accurate anomaly type network, wherein the anomaly type network contains item point-level anomaly areas and macro-level anomaly areas.
[0028] Furthermore, the database includes four levels of information, the first level is the vehicle number corresponding to each train, the second level is the task number each time the vehicle is imaged, the third level is the camera number for capturing the vehicle image, and the fourth level is the image of the corresponding position of the corresponding numbered train taken by the corresponding numbered camera in the corresponding numbered task.
[0029] A vehicle body abnormality detection device for a rail train comprises a gantry, on which a camera module, a vehicle magnetic steel module and a grating module are arranged, the vehicle magnetic steel modules are respectively located at the tracks on both sides of the gantry, the grating modules are located on both sides of the gantry and are higher than the running part of the train, and the camera module comprises a line scan camera and a laser light source.
[0030] A vehicle body anomaly detection storage medium for a rail train stores a computer program / instruction, which implements the steps of a vehicle body anomaly detection method when executed by a processor.
[0031] The beneficial effects of the present invention are as follows: by conducting targeted analysis of historical abnormal situations with small pictures and comparing the actual small pictures with the standard pictures, the type of abnormality can be preliminarily obtained, including shape deviation results or color value deviation results. The shape deviation results require the use of macro-level abnormality detection, while the color value deviation results require the use of item-level abnormality detection. The purpose is to ensure that the detection means are targeted, reduce the amount of detection calculations, and improve the efficiency and accuracy of detection. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] Figure 1 It is the overall flow chart of the present invention;
[0033] Figure 2 is a flow chart of the unsupervised anomaly detection steps in the present invention;
[0034] Figure 3 It is a structural diagram of the vehicle body abnormality detection device in the present invention.
[0035] Figure numerals: 1. gantry; 2. camera module; 3. magnetic steel module; 4. grating module. DETAILED DESCRIPTION
[0036] 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.
[0037] At present, in the field of rail transit, for vehicle body abnormality detection, target detection algorithms are currently mainly used to detect known abnormality types or to determine the pixel-level difference between a template image and an image to be detected and then to set an abnormality threshold to achieve abnormality detection of all visible types of vehicle body images. However, only pixel-level comparison detection cannot detect tiny abnormalities such as vehicle body cracks, and the tolerance for inevitable and unforeseen overexposure of images, light changes, etc. is too low, resulting in false alarms. Therefore, the present invention designs such a vehicle body abnormality detection method for rail trains, such as Figure 1 As shown, the following steps are included:
[0038] Establish a historical image database of rail vehicles. Specifically, taking the subway as an example, each vehicle maintenance section is responsible for the maintenance of a fixed number of vehicles, which is also fixed and greater than 2. The line scan camera in the detection equipment is used to collect the full vehicle appearance image of the vehicle. The equipment usually used is the 360° train image acquisition system. The established database contains four levels of information. The first level is the vehicle number corresponding to each train, for example: T19001, and the second level is the task number issued by the rail transit vehicle body anomaly detection system each time the vehicle is captured. For example, 202406071439T19001 It consists of the time when the task is issued, that is, 14:39 on June 7, 2024, and the vehicle number T19001. The task number of each task is unique. The third level is the camera number that collects vehicle images, such as 01, that is, the train image collected by camera No. 01. The shooting angle of each camera and the position of the corresponding train are also fixed. In this way, if a camera fails and needs to be replaced, the replaced camera inherits the number of the camera before replacement, and the shooting angles and positions of the corresponding trains of the two remain unchanged. The fourth level is the image of the corresponding position of the corresponding numbered train taken by the corresponding numbered camera in the corresponding numbered task.
[0039] Training the item point target detection model, specifically: the item points are the parts that need to be inspected on the rail train body, such as air springs or bolts;
[0040] Create a point target detection dataset. Collect 2,000 train body images. The 2,000 images contain all point types, and there are no less than 50 point images of each type. Use annotation software in YOLO format to annotate all points in the image according to category and form corresponding labels. The annotated class name is the point name. Arrange the annotated images and labels according to the COCO target detection dataset format, and divide the dataset into training set, validation set, and test set in a ratio of 8:1:1;
[0041] Build a neural network for point target detection. Specifically: the feature extraction network uses a deep learning network, the detection head network uses a YOLOv10 network, the neural network is trained using the data set, and deployed to form a point target detection model. Specifically: use two RTX3090 GPUs to train the network in the data set, set epochs to 100, and the initial learning rate to 0.001. After the training is completed, convert the obtained pt format model to onnx format to form the final point target detection model;
[0042] The vehicle item point template is made as follows: the full vehicle body image is collected under the most ideal conditions, the item point target detection model is used to detect the item points and generate a txt file containing the upper left corner coordinates, width and height of the minimum circumscribed rectangle of each item point. The format is consistent with the label formed by the labeling software (LabelMe); based on the above-generated txt file, manual review is performed again to add missed item point information and delete missed item points to form the final vehicle item point template.
[0043] Image processing and segmentation steps: collect images of vehicles to be inspected, and use the image acquisition system installed at the throat of the maintenance section, such as Figure 3 As shown, it is specifically a detection device, including a gantry 1, on which a camera module 2, a magnetic steel module 3 and a grating module 4 are arranged, the magnetic steel module 3 is respectively located at the tracks on both sides of the gantry 1, the grating module 4 is located on both sides of the gantry 1 and is higher than the running part of the train, the camera module 2 includes a line scan camera and a laser light source; the actual image collected is stretched, compressed and style converted to obtain a pre-processed image, and then the pre-processed image is segmented to obtain a number of images to be matched; specifically: the 13 images collected by the 13 line scan cameras in the present invention, because the speed of the train passing through the image acquisition system is not constant, the image will be stretched or compressed, so it is necessary to adjust the stretching and compression;
[0044] First, select a number of parts with unique features on each image as feature points for image adjustment. The feature points are evenly distributed in the image. In this embodiment, the number of feature points selected for each image is 60. Then, the vehicle to be inspected is made to pass through the gantry 1 evenly at the rated speed required by the image acquisition system. The acquired image is adjusted to a template image. The rated speed is defined as 20 km / h. All feature points of the template image are manually annotated with annotation software to generate a label document in YOLO format. The document is in txt format. Next, a feature point target detection data set is prepared. The feature point target detection data set is annotated with annotation software. A feature point target detection model is generated using a YOLOv9 target detection network training data set. Feature point target detection is performed on the image to be inspected.
[0045] Next, the feature points of the template image and the image to be inspected are matched by using a flexible matching algorithm. The algorithm used in this embodiment is a feature matching algorithm of a graph convolutional neural network. Finally, the difference of the horizontal coordinates of each set of feature point pairs in their respective image coordinate systems is calculated (the image stretching and compression caused by the speed change of the vehicle only affects the horizontal coordinates), and the difference is sequentially fitted according to the horizontal coordinates using a cubic spline curve, and then the image to be inspected is adjusted using the cubic spline curve.
[0046] Image style transfer, specifically: Since the image acquisition time covers different seasons, different weather, and different times, different lighting, temperature, and humidity have different degrees of impact on the acquisition camera, causing the image to have different degrees of color difference changes and exposure periodic changes. In order to eliminate the impact of the changes on subsequent detection, the style of the initial template image is adopted, and the cycle generative adversarial network (CycleGAN network) is used to transform the style of all subsequent images to be inspected. The transformation content includes the difference in image color difference and exposure elimination;
[0047] Image segmentation is specifically: the processed image is segmented according to a fixed length to facilitate subsequent detection and reduce computing power overhead. In this embodiment, the image segmentation size is 4096 pixels horizontally, and no segmentation is performed vertically. Each route is a long image divided into several small images (to be matched).
[0048] In the vehicle information matching step, the corresponding carriage number of the image to be matched is indexed in the database, and the corresponding task number is established according to the carriage number. Specifically, the vehicle number is first identified. Since the train is marked with the carriage number at a fixed position, the corresponding camera number is fixed, and the index of the image after being segmented is also fixed. Therefore, the image with the train number can be quickly and automatically located, and the vehicle number can be identified using the OCR algorithm.
[0049] Secondly, the database information is matched and the data is stored. The identified vehicle number corresponds to the primary information of the database, and then the task number established by the vehicle number, which is the start time of the system picking up the vehicle, is used to establish data named after the task number in the corresponding database, and store the original image and the image after image preprocessing and segmentation operations.
[0050] The vehicle body abnormality classification step obtains historical abnormal data from the database, and selects a to-be-matched image that matches the same position as the historical abnormal data from a number of to-be-matched images as a comparison image, compares the comparison image with the standard image at the same position in the database, and obtains a shape deviation result or a color value deviation result based on the comparison; specifically, the comparison image and the standard image are both subjected to boundary line drawing through deep learning to obtain a comparison line image and a standard line image, the comparison line image and the standard line image are overlapped and superimposed to obtain a line fitting degree, and a shape deviation value is estimated based on the line fitting degree, and the comparison image and the standard image are both subjected to black and white processing, and a color value deviation value is estimated based on the brightness value difference. If the color value deviation value is greater than the shape deviation value, the comparison result is defined as a color value deviation result, otherwise, it is defined as a shape deviation result;
[0051] For example: the database contains historical abnormal data on the side of the vehicle body, including scratches or damage on the side of the vehicle body. At this time, a small image (to be matched) corresponding to the historical abnormal position is selected from the n images to be matched after segmentation, and the small image is compared with the standard image at that position. When it is damaged, several damaged boundary lines will appear in the image. A comparative line diagram can be obtained through the existing point-line drawing, while the actual standard image only has the boundary lines of the image (standard line diagram). When the two are superimposed, the degree of fitting is low, indicating that the shape deviation is large here. At the same time, the color value of the image to be matched and the standard image is calculated, and the color value deviation result is obtained based on the color value calculation.
[0052] In the anomaly detection and matching step, when the comparison result is a shape deviation result, the comparison graph is analyzed for anomaly through a macro-level anomaly detection strategy; when the comparison result is a color value deviation result, the comparison graph is analyzed for anomaly through an item-level anomaly detection strategy; since item-level anomaly detection is more suitable for anomalies such as missing or offset parts, and the macro-level anomaly detection of the body is mainly for body scratches, foreign body straps, body damage and cracks, and component-level loss, the damage is more suitable for the macro-level anomaly detection strategy, and if the color value deviation is large, it can be further judged through the item-level anomaly detection strategy. By conducting targeted analysis of historical anomalies with small images, comparing the actual small image with the standard image, the type of anomaly can be preliminarily obtained, including shape deviation results or color value deviation results. Among them, the shape deviation result needs to adopt macro-level anomaly detection, and the color value deviation result needs to adopt item-level anomaly detection. The purpose is to ensure that the detection means are targeted, reduce the calculation amount of detection, and improve the efficiency and accuracy of detection.
[0053] Specifically, the macro-level anomaly detection strategy includes an unsupervised anomaly detection step and a supervised anomaly detection step. The unsupervised anomaly detection step includes a macro-level detection model construction sub-step and anomaly comparison sub-step.
[0054] The macro-level detection model construction sub-steps, such as Figure 2 As shown, a Poisson image fusion algorithm is used to randomly superimpose texture features on a normal image to obtain a superimposed image. The texture features come from a DTD (Describable Textures Dataset) texture recognition data set. Specifically, the superposition is to randomly take an image in the DTD, rotate it at a random angle and crop it in a random shape. The cropped area is greater than 0. The cropped image randomly selects an area of the same area and shape size on the image to be superimposed for Poisson fusion. The superimposed image is then gray-processed and converted into a gray-scale image. The gray-scale image is subjected to a two-dimensional discrete Fourier transform and enhanced processing of local texture features to obtain an enhanced image. In this embodiment, the BHF algorithm is used to enhance the local texture features in the image. Subsequently, the enhanced image is subjected to an inverse discrete Fourier transform to obtain a high-pass filtered image of the superimposed image. The image can better highlight the detailed texture features. The high-pass filtered image is input into an image restoration network to remove the features of the superimposed texture area and restore the original features of the image to be inspected. In this embodiment, the image restoration network adopts a U-Net network, and the loss function adopts a fusion MS-SSIM and L1 loss function.
[0055] The loss function is configured as:
[0056] ,
[0057] ,
[0058] ,
[0059] ,
[0060] ,
[0061] in, Y is the original image, is the restored image, and is a weight parameter used to adjust the balance between MS-SSIM and L1 loss. , , M is the number of scales, and in the embodiment, the value is 3. l is brightness, c is the contrast, s is the structural similarity function, , and are weight parameters and add up to 1. In the embodiment, the values are 0.3, 0.4 and 0.3 respectively. and is an image Y and The mean of and is an image Y and The standard deviation of is an image Y and The covariance of c 1 , c 2 and c 3 are constants used to prevent the denominator from being zero.
[0062] This restoration process is performed through all images of the entire vehicle, and the restoration network is trained to form a macro-level image unsupervised anomaly detection model, which is used to detect scratches on the vehicle body, foreign objects hanging on the vehicle body, or damage to the vehicle body. The anomaly detection has high accuracy, but the specific type of anomaly cannot be identified after anomaly detection. The function of the anomaly comparison submodule is to substitute the actual image into the macro-level detection model to determine whether it is completely fitted. If not, an abnormal instruction is output.
[0063] Among them, there is a supervised anomaly detection step, which produces detection data sets of various types of anomalies based on historical anomaly data, builds a supervised anomaly detection network for the detection data set through a feature extraction network, and substitutes the actual image into the supervised anomaly detection network to obtain the specific anomaly type.
[0064] The point-level anomaly detection strategy includes point-level comparison steps.
[0065] In the item point comparison step, the actual image is substituted into the item point target detection model to output the item point data, including w, h, x, y information, and the minimum bounding rectangle of each item point to be detected is calculated based on the item point data, and then the features within the minimum bounding rectangle of each item point pair are extracted through the feature extraction network. The last layer of the network is a fully connected layer with a shape of 1*1024, and then the Euclidean distance of the item point pair to the fully connected layer is calculated. When the distance exceeds the abnormal threshold R, the item point is considered to be abnormal. In the embodiment, R is 0.7, and the above detection steps are performed on all item point pairs in turn to complete the detection of all item points.
[0066] It also includes anomaly classification and screening steps, screening various types of anomalies in historical anomaly data, taking data belonging to the same anomaly type as an anomaly type data set, and then training and verifying each screened anomaly type data set through a classification network to obtain an accurate anomaly type network. The anomaly type network contains item-level anomaly areas and macro-level anomaly areas, and anomaly type judgment can be performed in the corresponding anomaly type network area according to the corresponding anomaly detection means.
[0067] The abnormal fault output step outputs the abnormal analysis result and the corresponding car number and task number as fault information.
[0068] A vehicle body anomaly detection storage medium for a rail train stores a computer program / instruction, which implements the steps of a vehicle body anomaly detection method when executed by a processor.
[0069] 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 abnormality of a rail vehicle body, characterized in that: The steps include: The image processing and segmentation step is to stretch, compress and style-convert the actual image collected to obtain a pre-processed image, and then segment the pre-processed image to obtain a plurality of images to be matched; Vehicle information matching step, indexing the corresponding carriage number of the image to be matched in the database, and establishing a corresponding task number according to the carriage number; The vehicle body abnormality classification step is to obtain historical abnormality data in the database, and select a to-be-matched image that matches the historical abnormality data at the same position from a plurality of to-be-matched images as a comparison image, compare the comparison image with a standard image at the same position in the database, and obtain a shape deviation result or a color value deviation result according to the comparison; anomaly detection and matching step, when the comparison result is a shape deviation result, the comparison graph is subjected to anomaly analysis through a macro-level anomaly detection strategy, and when the comparison result is a color value deviation result, the comparison graph is subjected to anomaly analysis through an item-level anomaly detection strategy; The macro-level anomaly detection strategy includes an unsupervised anomaly detection step and a supervised anomaly detection step. The unsupervised anomaly detection step includes a macro-level detection model construction sub-step and an anomaly comparison sub-step. The macro-level detection model construction sub-step comprises: superimposing texture features on a normal image through a Poisson image fusion algorithm to obtain a superimposed image, performing grayscale processing on the superimposed image to convert it into a grayscale image, performing discrete transformation and enhancement processing on the grayscale image through local texture features to obtain an enhanced image, then performing inverse discrete transformation on the enhanced image to obtain a high-pass filtered image of the superimposed image, and training the high-pass filtered image in an image restoration network through a loss function to obtain a macro-level detection model; The abnormal comparison submodule substitutes the actual image into the macro-level detection model to determine whether it is completely fitted, and if not, outputs an abnormal instruction; The point-level anomaly detection strategy includes a point-level comparison step. The item point comparison step substitutes the actual image into the item point target detection model to output the item point data, and calculates the minimum bounding rectangle of each item point to be detected based on the item point data, and then extracts the features within the minimum bounding rectangle of each item point pair through the feature extraction network, and then calculates the Euclidean distance of the item point pair, and judges whether the item point is abnormal or normal according to the Euclidean distance; The abnormal fault output step outputs the abnormal analysis result and the corresponding car number and task number as fault information.
2. The method for detecting abnormality of a railway train body according to claim 1, characterized in that: In the vehicle body abnormality classification step, the comparison image and the standard image are both subjected to deep learning to perform boundary line drawing to obtain a comparison line image and a standard line image, the comparison line image and the standard line image are overlapped and superimposed to obtain the degree of line fitting, and a shape deviation value is estimated according to the degree of line fitting, and the comparison image and the standard image are both subjected to black and white processing, and a color value deviation value is estimated according to the brightness value difference. If the color value deviation value is greater than the shape deviation value, the comparison result is defined as a color value deviation result, otherwise, it is defined as a shape deviation result.
3. The method for detecting abnormality of a railway train body according to claim 1, characterized in that: The loss function is configured as: , , , , , in, Y is the original image, is the restored image, and is the weight parameter, M is the number of scales, l is the brightness, c is the contrast, s is the structural similarity function, , and is a weight parameter and sums to 1, and is an image Y and The mean of and is an image Y and The standard deviation of is an image Y and The covariance of c 1. c 2 and c 3 are all constants.
4. The method for detecting abnormality of a railway train body according to claim 1, characterized in that: The supervised anomaly detection step prepares a detection data set of various types of anomalies based on historical anomaly data, builds a supervised anomaly detection network for the detection data set through a feature extraction network, and substitutes the actual image into the supervised anomaly detection network to obtain the specific anomaly type.
5. The method for detecting abnormality of a railway train body according to claim 1, characterized in that: The method also includes an anomaly classification and screening step, screening various anomaly types in historical anomaly data, treating data belonging to the same anomaly type as an anomaly type data set, and then training and verifying each anomaly type data set after screening to obtain an accurate anomaly type network, wherein the anomaly type network includes item point-level anomaly areas and macro-level anomaly areas.
6. The method for detecting abnormality of a railway train body according to claim 1, characterized in that: The database includes four levels of information. The first level is the vehicle number corresponding to each train, the second level is the task number each time the vehicle is imaged, the third level is the camera number for capturing the vehicle image, and the fourth level is the image of the corresponding position of the corresponding numbered train taken by the corresponding numbered camera in the corresponding numbered task.
7. A vehicle body anomaly detection device for a railway train, providing a collection device for the vehicle body anomaly detection method according to claims 1 to 6, characterized in that: The invention comprises a gantry (1), wherein the gantry (1) is provided with a camera module (2), a vehicle magnetic steel module (3) and a grating module (4), wherein the vehicle magnetic steel module (3) is respectively located at tracks on both sides of the gantry (1), and the grating module (4) is located on both sides of the gantry (1) and is higher than a train running part, and the camera module (2) comprises a line scanning camera and a laser light source.
8. A storage medium for detecting abnormality of a railway train body, on which a computer program / instruction is stored, characterized in that: When the computer program / instruction is executed by a processor, the steps of the vehicle body abnormality detection method described in claims 1-6 are implemented.
