Fault identification method and system for parts of light-weight railway wagon
Through lightweight deep learning methods and data enhancement technology, the problems of slow detection speed and low accuracy in the fault detection system of railway truck parts are solved, and the rapid and accurate fault identification of railway truck parts is achieved. It is suitable for a variety of models Rail transit vehicles improve detection efficiency and safety.
Patent Information
- Application Number
- CN202411005736.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-25
- Publication Date
- 2024-11-12
AI Technical Summary
The existing railway truck parts fault detection system has problems such as slow detection speed, low accuracy, poor algorithm applicability, and low manual detection efficiency, which cannot meet the high-speed and high-density railway freight safety needs.
Using lightweight deep learning methods, the pre-trained target positioning model and fault judgment model can identify and determine the parts of railway trucks, and use data augmentation and lightweight network models to improve detection speed and accuracy, so as to achieve a variety of General fault detection of components.
It realizes rapid and accurate identification of railway truck component failures, reduces manual inspection costs, improves detection efficiency and safety, and is suitable for various types of rail transit vehicles.
Smart Images

Figure CN118941894A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of fault recognition based on image processing, and in particular to a method and system for identifying faults of lightweight railway freight car parts. Background Art
[0002] Railway freight has played an important role in promoting the development of the economy and society. However, if an accident occurs during the operation of a train, it will cause huge economic losses. How to maintain the safety of high-speed, heavy-loaded and high-density railway freight has become a severe challenge currently facing the railway freight industry, which has great practical production significance.
[0003] For a long time, the maintenance of heavy-duty trucks has mainly relied on manual work due to primitive maintenance methods and backward maintenance equipment. Due to a series of problems such as low efficiency, insufficient reliability, and poor safety in manual train inspection operations, it is difficult to adapt to high-density train inspection work. The Trouble of Moving Freight Car Detection System (TFDS) is used for the inspection of heavy-duty trucks. TFDS consists of three parts: trackside image acquisition equipment, trackside machine room equipment, and train inspection center equipment. It uses trackside high-speed cameras to dynamically capture running trucks, collect train images and transmit them to the train inspection station in real time. The staff uses the software platform to manually browse the pictures to identify faults. Although the TFDS system facilitates the inspection work to a certain extent, its image analysis workload is huge, manual analysis is time-consuming, and inefficient. Train inspectors are prone to fatigue after working for a long time, resulting in a decrease in detection accuracy, false detection or missed detection, affecting the quality of train inspection, and creating safety hazards. At the same time, the huge number of images to be inspected and the uninterrupted passing of trains require a large number of staff to inspect in shifts 24 hours a day, which has high labor costs. The frequency of train inspections is high, with up to 15,000 images of a single train and the shortest interval between train inspections being only 10 minutes, which means that 15,000 parts images need to be inspected quickly and accurately within 10 minutes. However, manual inspections cannot meet the accuracy and speed requirements of train inspections. To solve the above problems, combined with current needs and the development of new technologies, it is necessary to improve the TFDS system, enhance the level of automation and intelligence, and transform the inspection method from "man-machine integration" to automatic fault identification, which is then confirmed and repaired by train inspectors, to improve the work efficiency and quality of the TFDS train inspection system.
[0004] At present, deep learning algorithms are developing rapidly and have great development potential and application value. They are widely used in target detection, semantic segmentation, image classification, image reconstruction and other fields. For fault detection, deep learning can better complete target positioning and fault judgment, with high accuracy and real-time performance. Therefore, using deep learning methods for fault detection has become an industry trend. Compared with traditional target detection algorithms, deep learning does not require manual extraction of image features, but uses convolutional neural networks to automatically extract image features from a large amount of training data. The large number of images generated by the TFDS system is very convenient for deep learning networks to perform feature extraction and learning. In addition, the features obtained by deep learning are richer and more stable, and the detection speed and accuracy are far superior to traditional detection algorithms. The rapid and accurate characteristics of deep learning methods are highly consistent with the requirements of high judgment accuracy and short vehicle passing time of the TFDS system.
[0005] The research on intelligent recognition technology of TFDS images for trucks is conducive to reducing labor costs, reducing the impact of human subjectivity on maintenance operations, improving the quality and efficiency of maintenance operations, and improving the safety assurance capability of the TFDS system. Therefore, the research on the TFDS heavy-duty train component fault detection algorithm based on deep learning and the realization of efficient and accurate intelligent recognition of train component faults will help to make up for the shortcomings of the current train inspection work, improve the speed and accuracy of the TFDS system train inspection, ensure the quality of the train inspection work and the safety of heavy-duty truck operations, and reduce maintenance costs. It has great practical significance.
[0006] Train parts detection belongs to target detection. Among the current deep learning-based component fault detection algorithms, the commonly used algorithms include Faster R-CNN method, SSD algorithm, Yolo series algorithm and ViT algorithm. The first three belong to CNN-based target detection algorithms. Faster R-CNN is a two-stage algorithm. It mainly generates a series of potential target candidate frames in the first step, and then uses convolutional neural network to classify these ROI contents and fine-tune the position and shape size of the ROI in the second step. The SSD algorithm and Yolo series algorithm are one-stage algorithms. They do not need to generate candidate frames, but directly convert the problem of target frame positioning into a regression problem. The input image only passes through one network, and the generated result contains both position and category information. Compared with the one-stage, the two-stage algorithm has higher accuracy, but the amount of calculation is larger, so the operation is slower. In addition, there are some target detection algorithms that do not rely on CNN but are based on self-attention mechanism, such as Detection-Transformer (DETR) and ViT. However, to achieve the same effect as the CNN-based network requires a lot of data and the detection speed is slow.
[0007] The core idea of the above mainstream train component fault detection algorithms is to use deep learning models to learn the characteristics of normal samples and fault samples, and then judge whether new samples contain normal features or fault features based on these learned features, so as to detect whether the components are faulty. In practical applications, these detection algorithms often need to be selected and adjusted in combination with specific task requirements, data set characteristics, and actual environmental conditions. In the actual application of TFDS, the number of trains passing through the inspection station is large, the density is high, and the intervals are short, which places high requirements on detection speed and accuracy. Therefore, it is necessary to improve the algorithm detection speed as much as possible while ensuring the accuracy of the algorithm, and improve the train inspection efficiency of the TFDS system. We use a one-stage lightweight algorithm as the basis for the research on component fault detection algorithms, hoping to meet the actual needs of train inspection work with better real-time performance and lighter structure.
[0008] In summary, the component fault detection methods currently used in the TFDS system are limited by hardware equipment, algorithm design and other issues, and the effect is not ideal. There are problems such as large models, large number of parameters, slow detection speed, and poor real-time performance. These problems prevent the existing algorithms from meeting the needs of practical applications. In addition, there are many types of train parts, and the existing algorithms are mostly targeted at a specific part. The algorithm is not very versatile, and it is difficult to achieve fault detection of multiple parts through a single algorithm. In order to emphasize the accuracy of the algorithm, the existing technology often takes a single component as the algorithm recognition target, and only marks one type of component when manually extracting features in the data set, which limits the versatility of the algorithm. Even if the algorithm has good recognition performance for a certain fault, it cannot be applied to other faults. Multiple algorithms need to be used together to complete the fault detection of the entire train. The detection process is long and the speed is slow, which seriously affects the detection efficiency. The density of trains passing through the TFDS train inspection site is high. A car can generate 15,000 train pictures under the maximum vehicle formation, and the detection needs to be completed within the shortest train passing interval of a few minutes. The recognition accuracy and robustness of the existing algorithms for the same component are also different. In order to improve the accuracy, the existing algorithms use a large number of convolutions in the model, which generates a large number of parameters, resulting in a large model size and a large amount of calculation, which in turn leads to slow running speed and low detection efficiency, and cannot meet the actual train inspection needs. Summary of the invention
[0009] The object of the present invention is to provide a method and system for identifying faults of lightweight railway freight car parts, so as to solve at least one technical problem existing in the above-mentioned background technology.
[0010] In order to achieve the above object, the present invention adopts the following technical solutions:
[0011] In a first aspect, the present invention provides a method for identifying faults of lightweight railway freight car parts, comprising:
[0012] Acquire an image containing railway freight car parts to be identified;
[0013] Using the pre-trained target positioning model, the acquired images containing railway freight car parts to be identified are processed to obtain the category and location information of each part in the image, and generate a detailed image of the parts;
[0014] The pre-trained fault discrimination model is used to process the obtained component detail image to obtain whether the component in the image is faulty and the fault category result.
[0015] Furthermore, training the target positioning model includes: inputting the training set into the target detection network, classifying the parts according to the labels manually marked, using the convolution block to learn the image features of the parts, using the back propagation and optimization of the objective function to make the algorithm learn in the right direction, and finally obtaining the optimal parameters, realizing the identification and positioning of the parts types, and obtaining a trained target positioning model; training the fault discrimination model includes: preprocessing the parts detail image generated by the target positioning network to achieve image enhancement and then making it into a training set, inputting the training set into the fault discrimination network, using the deep separable convolution and squeeze excitation convolution to learn the image features, using the back propagation and Adam optimizer to optimize the learning effect, obtaining the optimal parameters, realizing the fault state discrimination of the parts, and obtaining a trained part fault discrimination model.
[0016] Furthermore, TFDS system train images are collected to produce a parts positioning dataset, the parts to be tested in the images are marked and stored, and the parts positioning dataset is preprocessed by rotating, cropping, flipping, changing brightness, changing contrast and adding noise to enhance image quality, expand the number of samples, and obtain a training set.
[0017] Furthermore, after the railway freight car image is input into the target positioning model, it is first adjusted to an appropriate size through data enhancement and adaptive image scaling, and then passed through the backbone feature network for feature extraction. Effective feature information is extracted on feature maps of different scales through ordinary convolution blocks and depthwise separable convolution blocks. Feature maps of different scales are fused and spliced using the feature pyramid to obtain richer semantic information and representation capabilities. The scale transformation and reconstruction are performed through up and down sampling at the neck of the network. Finally, the feature map is detected using the prediction head to output the category and location information of the target.
[0018] Furthermore, a stochastic gradient descent optimizer is adopted as the back-propagation algorithm. During the training process, warm-up training and cosine annealing function strategies are used to dynamically adjust the learning rate to achieve better convergence effect. After training, the weights of the train parts positioning model can be obtained.
[0019] Furthermore, the target positioning model is identified and segmented to obtain detailed images of various parts. The images are enhanced by rotating, cropping, flipping, changing brightness, changing contrast and adding noise. A multi-classification data set is produced according to normal, faulty and fault types. The produced data set is used to train the train parts fault discrimination model to obtain the model weights.
[0020] In a second aspect, the present invention provides a lightweight railway freight car component fault identification system, comprising:
[0021] An acquisition module, used for acquiring an image containing railway freight car parts to be identified;
[0022] A positioning module is used to process the acquired image containing railway freight car parts to be identified by using a pre-trained target positioning model, obtain the category and position information of each part in the image, and generate a detailed image of the parts;
[0023] The discrimination module is used to process the obtained component detail image using a pre-trained fault discrimination model to obtain whether the component in the image is faulty and the fault category result.
[0024] In a third aspect, the present invention provides a non-transitory computer-readable storage medium, which is used to store computer instructions. When the computer instructions are executed by a processor, the method for identifying faults of lightweight railway freight car parts as described in the first aspect is implemented.
[0025] In a fourth aspect, the present invention provides a computer device comprising a memory and a processor, wherein the processor and the memory communicate with each other, the memory stores program instructions executable by the processor, and the processor calls the program instructions to execute the lightweight railway freight car component fault identification method as described in the first aspect.
[0026] In a fifth aspect, the present invention provides an electronic device, comprising: a processor, a memory and a computer program; wherein the processor is connected to the memory, the computer program is stored in the memory, and when the electronic device is running, the processor executes the computer program stored in the memory so that the electronic device executes instructions for implementing the method for identifying faults of lightweight railway freight car parts as described in the first aspect.
[0027] Beneficial effects of the present invention: The data enhancement algorithm is used to solve the problems of difficulty in collecting TFDS image data and insufficient component failure samples, and a database of various component failures is produced. A machine vision method based on deep learning is used to locate and identify target components, avoiding manual design and feature extraction, so that the algorithm has good stability under different lighting, background and weather conditions. The network model used has been lightweighted, with a small model, fewer parameters and faster detection speed. The algorithm has strong versatility and can be transplanted to other dynamic image detection systems for rail transit vehicle operation failures.
[0028] Additional advantages of the present invention will be more clearly given in the following description or learned through the practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative work.
[0030] Figure 1 Schematic diagram of the component fault identification algorithm construction process described in an embodiment of the present invention.
[0031] Figure 2 The figure is a schematic diagram of the component positioning process according to an embodiment of the present invention.
[0032] Figure 3 The figure is a schematic diagram of a fault classification process according to an embodiment of the present invention.
[0033] Figure 4 This is a flow chart of a method for identifying faults of railway freight car parts according to an embodiment of the present invention. DETAILED DESCRIPTION
[0034] The embodiments of the present invention are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements with the same or similar functions. The embodiments described below by the accompanying drawings are exemplary and are only used to explain the present invention, and cannot be interpreted as limiting the present invention.
[0035] It should be understood by those skilled in the art that unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by those skilled in the art to which this invention belongs.
[0036] It should also be understood that terms, such as those defined in commonly used dictionaries, should be understood to have a meaning consistent with that in the context of the prior art and will not be interpreted in an idealized or overly formal sense unless as defined herein.
[0037] Those skilled in the art will appreciate that, unless otherwise stated, the singular forms "a", "an", "said" and "the" used herein may also include plural forms. It should be further understood that the term "comprising" used in the specification of the present invention refers to the presence of the features, integers, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements and / or groups thereof.
[0038] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. Different embodiments or examples described in this specification and features of different embodiments or examples may be combined and combined by those skilled in the art without contradiction.
[0039] To facilitate understanding of the present invention, the present invention is further explained below with reference to specific embodiments in conjunction with the accompanying drawings, and the specific embodiments do not constitute a limitation on the embodiments of the present invention.
[0040] Those skilled in the art should understand that the drawings are merely schematic diagrams of embodiments, and the components in the drawings are not necessarily necessary for implementing the present invention.
[0041] Aiming at the problems of complex operating environment, slow detection speed, low accuracy and poor algorithm applicability in the current dynamic image component fault detection of heavy-duty trucks, the present invention proposes an intelligent detection method for railway truck image component faults. The algorithm model is small, the speed is fast, and it has strong stability and generalization, and can be applied to the intelligent detection of component faults of various models of heavy-duty trucks.
[0042] Example 1
[0043] In this embodiment 1, a lightweight railway freight car component fault identification system is first provided, including: an acquisition module, used to acquire an image containing railway freight car components to be identified; a positioning module, used to use a pre-trained target positioning model to process the acquired image containing railway freight car components to be identified, obtain the category and position information of each component in the image, and generate a component detail image; a discrimination module, used to use a pre-trained fault discrimination model to process the obtained component detail image, and obtain whether the component in the image is faulty and the fault category result.
[0044] In this embodiment 1, the above-mentioned system is used to realize the fault identification of railway freight car parts, including: using an acquisition module to acquire an image containing railway freight car parts to be identified; using a positioning module to use a pre-trained target positioning model to process the acquired image containing railway freight car parts to be identified, obtain the category and position information of each component in the image, and generate a component detail image; using a discrimination module to use a pre-trained fault discrimination model to process the obtained component detail image to obtain whether the component in the image is faulty and the fault category result.
[0045] like Figures 1 to 4 As shown in the figure, the overall solution is divided into a training part and an application part. In the training part, the component data set and the fault discrimination data set are first established, and then image preprocessing is performed; the processed images are sent to the target detection network and the fault recognition network for training; the optimal parameters are obtained, and the target detection model and the fault recognition model of the application part are constructed. In the application stage, the image to be detected is input, the image preprocessing is performed, and then the component is located, and it is determined whether the located component is faulty, and the detection result is output.
[0046] Specifically, in this embodiment, an intelligent detection method for faults of components of railway freight car images is implemented, and the specific process is divided into two stages: target component positioning and target component fault discrimination. The first stage is to locate the target component using the target detection algorithm. Taking the Yolov5 algorithm as an example, after the freight car image is input into the model, it is first adjusted to a suitable size through data enhancement and adaptive image scale scaling, and then feature extraction is performed through the backbone feature network, and effective feature information is extracted on feature maps of different scales through convolution blocks. Using the feature pyramid, feature maps of different scales are fused and spliced to obtain richer semantic information and representation capabilities. These feature maps are scaled and reconstructed by up and down sampling in the network neck. Then, the feature map is detected using the prediction head, and the category and location information of the target are output. Finally, the final target detection result is obtained through post-processing such as non-maximum suppression and deduplication. At this point, the category and location of the component can be obtained, and the detailed image of the component is generated for subsequent judgment of whether it is faulty. The second stage is component fault discrimination. This stage performs fault identification on the detailed images of parts generated in the previous stage, and extracts features from the parts images through the lightweight convolutional neural network mobilenetv3 to determine whether the parts are faulty and their specific fault categories. To ensure recognition accuracy, different weights are used for fault identification of different types of parts, and finally outputs whether the parts are faulty or the fault category, completing the intelligent identification of railway freight car image faults.
[0047] The intelligent detection method for faults of components of railway freight car images comprises the following steps:
[0048] Step 1: Collect TFDS system train images to create a component positioning dataset, annotate the components to be tested in the images and store them, and perform image preprocessing on the component positioning dataset to enhance image quality, expand the number of samples, and improve the generalization performance of the model. The dataset contains both normal images and fault images to ensure that the target components can be identified in different states.
[0049] Step 2: Build a target detection network for train parts positioning, and input the parts positioning data set in step 1 into the target detection network for training. The supervised target detection model classifies parts according to the labels made by manual annotation, uses convolution blocks to learn the image features of parts, and uses back propagation and optimization of the objective function to make the algorithm learn in the right direction, and finally obtain the optimal parameters to achieve part type recognition and positioning. In this embodiment, a stochastic gradient descent optimizer is used as the back propagation algorithm. During the training process, strategies such as preheating training and cosine annealing function are used to dynamically adjust the learning rate to achieve better convergence effect. After training, the weights of the train parts positioning model can be obtained. During detection, the algorithm can identify and locate the target parts, such as Figure 2As shown, part 2 and part 3 in the double-line frame belong to the target parts and are identified and located, while part 1 and part 4 do not belong to the target parts and are not identified.
[0050] Step 3: Build a fault identification and classification network to identify train parts faults. Input the TFDS system train image into the parts positioning model established in step 2, identify and segment to obtain detailed images of various parts, and use these images to build a parts fault discrimination dataset. You can create a binary classification dataset based on normal or faulty conditions, or you can create multi-classification datasets based on the type of fault. Use the dataset to train the train parts fault discrimination network to obtain the model weights. During detection, if Figure 3 As shown, the target component image detected in step 2 is input into the fault recognition and classification network to determine whether the component is normal or faulty, and output the judgment result.
[0051] Step 4: Use the component positioning model weights and component fault discrimination weights generated by step 2 and step 3 to bring them into the component positioning network and component fault discrimination network to establish an intelligent recognition model for heavy-duty truck component faults. Perform image preprocessing on the transmitted train inspection images and send them into the model. The target components can be located and classified, and it can be determined whether a fault occurs. The judgment result is output to achieve intelligent recognition of heavy-duty truck component faults.
[0052] In summary, the method proposed in this embodiment is a self-made heavy-duty truck parts fault detection data set: collect heavy-duty truck pictures of the TFDS system, make a heavy-duty truck parts fault detection data set, and use image preprocessing for data enhancement to establish a heavy-duty truck parts fault database. In view of the problems that the current heavy-duty truck parts detection algorithm can identify a single target type, the model has large parameters and many parameters, and the detection speed is slow, a lightweight, high-speed and high-precision heavy-duty truck parts fault detection algorithm is proposed. The parts positioning network in step 2 uses deep separable convolution in the model to reduce model parameters, reduce model size, and improve the detection speed of the model; the convolution of the squeeze excitation mechanism is used in the model to improve the feature extraction ability of the model and better identify and locate parts. For the fault identification and classification network in step 3 of the 4.2 technical solution, a self-attention mechanism is used in the model to improve the accuracy of fault discrimination. Lightweight heavy-duty truck image intelligent detection process: first locate the target parts, and then determine whether the located parts are faulty. This process meets the fault type, speed and accuracy requirements required for the actual train inspection work of the TFDS system.
[0053] Example 2
[0054] In this embodiment 2, a method for identifying faults of lightweight railway freight car parts is provided, comprising:
[0055] Acquire an image containing railway freight car parts to be identified;
[0056] Using the pre-trained target positioning model, the acquired images containing railway freight car parts to be identified are processed to obtain the category and location information of each part in the image, and generate a detailed image of the parts;
[0057] The pre-trained fault discrimination model is used to process the obtained component detail image to obtain whether the component in the image is faulty and the fault category result.
[0058] Among them, training the target positioning model includes: inputting the training set into the target detection network, and the target detection network selects the improved lightweight Yolov5s model. The parts are classified according to the labels made by manual annotation, the image features of the parts are learned using convolution blocks, and the deep separable convolution is used instead of the ordinary convolution. While achieving basically the same learning effect, the number of model parameters and computing resource consumption are reduced. The algorithm is made to learn in the right direction by back propagation and optimizing the objective function. The optimizer selects the stochastic gradient descent optimizer (SGD), and uses the optimization strategy of warm-up learning and cosine annealing function. Finally, the optimal parameters are obtained to realize the identification and positioning of parts types, and a trained target positioning model is obtained.
[0059] Depthwise separable convolution decomposes standard convolution into two steps: depthwise convolution and pointwise convolution. Compared with ordinary convolution, depthwise separable convolution can effectively reduce parameters and improve computational efficiency. In the depthwise convolution stage, each channel uses a separate convolution kernel to operate, effectively capturing the characteristics of the data in the channel dimension; in the pointwise convolution stage, the use of 1*1 convolution kernel further reduces the number of parameters. This convolution kernel introduces cross-channel interaction, fuses information from different channels, and forms the final output feature map for the network model to learn.
[0060] Formula (1) and Formula (2) are respectively the parameters of depthwise separable convolution and the ratio of the parameters of depthwise separable convolution to those of ordinary convolution. The meaning of each parameter and the given initialization value are shown in Table 1. Taking the input channel and output channel as 256 as an example, the parameters of depthwise separable convolution are only 2.33% of the parameters of ordinary convolution.
[0061] Therefore, after replacement, the number of model parameters is greatly reduced and the model detection speed can be significantly improved.
[0062]
[0063] Table 1
[0064]
[0065] The train images of TFDS system are collected to produce the parts positioning dataset. The parts to be tested in the images are marked and stored. The parts positioning dataset is preprocessed. The images are enhanced by rotating, cropping, flipping, changing brightness, changing contrast and adding noise. The number of samples is expanded to obtain the training set.
[0066] After the railway freight car image is input into the target positioning model, it is first adjusted to a suitable size through data enhancement and adaptive image scale scaling, and then the feature extraction is performed through the improved CSPDarknet53 backbone feature network, which is composed of 5 layers of depth-separable convolution and 4 layers of combined convolution blocks. Through ordinary convolution blocks and depth-separable convolution blocks, effective feature information is extracted on feature maps of different scales. Using the feature pyramid, feature maps of different scales are fused and spliced to obtain richer semantic information and representation capabilities. The scale transformation and reconstruction are performed by ups and downsampling 3 times at the neck of the network, and feature information of different scales is fused. The feature information of three scales, large, medium and small, is input into the prediction head, and the prediction head is used to calculate the loss function of the feature map to obtain the detection result, and the category and location information of the target are output.
[0067] The stochastic gradient descent optimizer is used as the back-propagation algorithm. During the training process, the warm-up training and cosine annealing function strategy are used to dynamically adjust the learning rate to achieve better convergence effect. After training, the weights of the train parts positioning model can be obtained.
[0068] The target positioning model is identified and segmented to obtain detailed images of various parts. A multi-classification data set is produced according to normal, faulty and fault types. The image quality is also enhanced by rotation, cropping, flipping, changing brightness, changing contrast and adding noise. The number of samples is expanded to obtain a training set. The produced data set is used to train the train parts fault discrimination model to obtain the model weight. The parts fault discrimination model uses MobileNetV4, which has a small model, high lightweight, fast detection speed and high accuracy. MobileNetV4 works together with deep separable convolution and squeeze excitation mechanism to obtain good training results with a small number of model parameters. The squeeze excitation mechanism is a self-attention mechanism, which is realized by embedding a squeeze excitation layer in an ordinary convolution. The squeeze excitation layer contains two fully connected layers, which use average pooling to calculate channel weights. The importance of the channel in the feature map is adjusted by learning the weight of each channel, thereby enhancing the model's perception of key features.
[0069] The parameters of squeeze-excitation convolution are shown in formula (3), and the meaning of the parameters and the given initialization values are shown in Table 2. The parameters of squeeze-excitation convolution are divided into the parameters of convolution kernel weight, batch normalization and squeeze-excitation layer. The first two items are the same as ordinary convolution, and the third item is affected by the dimension reduction factor. The dimension reduction factor is used to reduce the number of parameters in the excitation operation and reduce the output dimension of the fully connected layer to a part of the original input dimension. Therefore, the calculation and storage requirements of the model can be reduced while retaining global information. Taking the input and output channels of squeeze-excitation convolution and ordinary convolution as 256 as an example, it can be seen from formula (4) that the parameters of squeeze-excitation convolution are about 1.1 times that of ordinary convolution, which is a lightweight self-attention convolution. The computational cost is low, and SE convolution only adds one squeeze-excitation layer parameter compared to ordinary convolution.
[0070]
[0071] Table 2
[0072] parameter meaning value c1 Number of input channels 256 c2 Number of output channels 256 SE_reduction Dimensionality reduction factor 16 k SEConv convolution kernel size 1 g Group number group 1
[0073] The Adam optimization algorithm is adopted as the back propagation algorithm, and the cross entropy loss function is used. Good convergence results can be obtained quickly during the training process. After training, the weights of the train component fault discrimination model can be obtained.
[0074] Finally, by connecting the train component positioning model using the optimal weights and the fault discrimination model also using the optimal weights in series, the railway freight car component fault detection process can be realized, including acquiring the detection image (implemented by the acquisition module); locating the target component (implemented by the positioning module); generating the component detail image (output result of the positioning module); and determining whether the component is faulty (implemented and output by the discrimination module).
[0075] Example 3
[0076] This embodiment 3 provides a non-transitory computer-readable storage medium, wherein the non-transitory computer-readable storage medium is used to store computer instructions. When the computer instructions are executed by a processor, the above-mentioned method for identifying faults of lightweight railway freight car parts is implemented. The method includes:
[0077] Acquire an image containing railway freight car parts to be identified;
[0078] Using the pre-trained target positioning model, the acquired images containing railway freight car parts to be identified are processed to obtain the category and location information of each part in the image, and generate a detailed image of the parts;
[0079] The pre-trained fault discrimination model is used to process the obtained component detail image to obtain whether the component in the image is faulty and the fault category result.
[0080] Example 4
[0081] This embodiment 4 provides a computer device, including a memory and a processor, the processor and the memory communicate with each other, the memory stores program instructions executable by the processor, the processor calls the program instructions to execute the above-mentioned lightweight railway freight car component fault identification method, the method comprising:
[0082] Acquire an image containing railway freight car parts to be identified;
[0083] Using the pre-trained target positioning model, the acquired images containing railway freight car parts to be identified are processed to obtain the category and location information of each part in the image, and generate a detailed image of the parts;
[0084] The pre-trained fault discrimination model is used to process the obtained component detail image to obtain whether the component in the image is faulty and the fault category result.
[0085] Example 5
[0086] This embodiment 5 provides an electronic device, including: a processor, a memory, and a computer program; wherein the processor is connected to the memory, the computer program is stored in the memory, and when the electronic device is running, the processor executes the computer program stored in the memory, so that the electronic device executes instructions for implementing the method for identifying faults of lightweight railway freight car parts as described above, the method comprising:
[0087] Acquire an image containing railway freight car parts to be identified;
[0088] Using the pre-trained target positioning model, the acquired images containing railway freight car parts to be identified are processed to obtain the category and location information of each part in the image, and generate a detailed image of the parts;
[0089] The pre-trained fault discrimination model is used to process the obtained component detail image to obtain whether the component in the image is faulty and the fault category result.
[0090] In summary, the lightweight railway freight car parts fault identification method described in the embodiment of the present invention can be used for intelligent identification of railway freight train running fault dynamic image detection system. Aiming at the problems of poor versatility, low precision and poor real-time performance of the current TFDS fault automatic identification algorithm, the train parts fault automatic identification algorithm based on deep learning is studied to realize the intelligent identification of railway freight car image parts fault. It has the following advantages: 1. The data enhancement algorithm is used to solve the problem of difficulty in collecting TFDS image data and insufficient parts fault samples, and a variety of parts fault databases are produced. 2. The present invention adopts a machine vision method based on deep learning to locate and identify the target parts, avoiding manual design and feature extraction, so that the algorithm has good stability under different lighting, different backgrounds and different weather conditions. 3. The network model used in the present invention has been lightweighted, the model is small, the parameters are few, and the detection speed is faster. 4. The algorithm has strong versatility and can be transplanted for other rail transit vehicle running fault dynamic image detection systems.
[0091] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0092] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0093] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0094] These computer program instructions can also be loaded onto a computer or other programmable data processing device, and a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, so that the instructions executed on the computer or other programmable device provide for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0095] Although the above describes the specific implementation mode of the present invention in conjunction with the accompanying drawings, it is not intended to limit the scope of protection of the present invention. Those skilled in the art should understand that various modifications or variations that can be made by those skilled in the art without creative work on the basis of the technical solution disclosed in the present invention should be included in the scope of protection of the present invention.
Claims
1. A method for identifying faults in lightweight railway freight car parts. It is characterized in that include: Acquire an image containing railway freight car parts to be identified; Using the pre-trained target positioning model, the acquired images containing railway freight car parts to be identified are processed to obtain the category and location information of each part in the image, and generate a detailed image of the parts; The pre-trained fault discrimination model is used to process the obtained component detail image to obtain whether the component in the image is faulty and the fault category result.
2. The method for identifying faults of lightweight railway freight car parts according to claim 1, It is characterized in that Training the target positioning model includes: inputting the training set into the target detection network, classifying the parts according to the labels manually marked, using the convolution block to learn the image features of the parts, using the back propagation and optimization of the objective function to make the algorithm learn in the right direction, and finally obtaining the optimal parameters, realizing the identification and positioning of the parts types, and obtaining the trained target positioning model; training the fault discrimination model includes: preprocessing the parts detail image generated by the target positioning network to achieve image enhancement and then making it into a training set, inputting the training set into the fault discrimination network, using the deep separable convolution and squeeze excitation convolution to learn the image features, using the back propagation and Adam optimizer to optimize the learning effect, obtaining the optimal parameters, realizing the fault state discrimination of the parts, and obtaining the trained part fault discrimination model.
3. The method for identifying faults of lightweight railway freight car parts according to claim 2, It is characterized in that The train images of TFDS system are collected to produce the parts positioning dataset, and the parts to be tested in the images are marked and stored. The parts positioning dataset is preprocessed by rotating, cropping, flipping, changing brightness, changing contrast and adding noise to enhance the image quality and expand the number of samples to obtain the training set.
4. The method for identifying faults of lightweight railway freight car parts according to claim 2, It is characterized in that After the railway freight car image is input into the target positioning model, it is first adjusted to an appropriate size through data enhancement and adaptive image scaling, and then extracted through the backbone feature network. Effective feature information is extracted on feature maps of different scales through ordinary convolution blocks and depthwise separable convolution blocks. Feature maps of different scales are fused and spliced using the feature pyramid to obtain richer semantic information and representation capabilities. Scale transformation and reconstruction are performed through up and down sampling at the neck of the network. Finally, the feature map is detected using the prediction head to output the category and location information of the target.
5. The method for identifying faults of lightweight railway freight car parts according to claim 2, It is characterized in that The stochastic gradient descent optimizer is used as the back-propagation algorithm. During the training process, the warm-up training and cosine annealing function strategy are used to dynamically adjust the learning rate to achieve better convergence effect. After training, the weights of the train parts positioning model can be obtained.
6. The method for identifying faults of lightweight railway freight car parts according to claim 2, It is characterized in that The target positioning model is identified and segmented to obtain detailed images of various parts. The images are enhanced by rotating, cropping, flipping, changing brightness, changing contrast and adding noise. A multi-classification data set is produced according to normal, faulty and fault types. The produced data set is used to train the train parts fault discrimination model to obtain the model weights.
7. A lightweight railway freight car parts fault identification system, It is characterized in that include: An acquisition module, used for acquiring an image containing railway freight car parts to be identified; A positioning module is used to process the acquired image containing railway freight car parts to be identified by using a pre-trained target positioning model, obtain the category and position information of each part in the image, and generate a detailed image of the parts; The discrimination module is used to process the obtained component detail image using a pre-trained fault discrimination model to obtain whether the component in the image is faulty and the fault category result.
8. A non-transitory computer-readable storage medium, It is characterized in that The non-transitory computer-readable storage medium is used to store computer instructions. When the computer instructions are executed by the processor, the lightweight railway freight car component fault identification method as described in any one of claims 1-6 is implemented.
9. A computer device, It is characterized in that It includes a memory and a processor, the processor and the memory communicate with each other, the memory stores program instructions that can be executed by the processor, and the processor calls the program instructions to execute the lightweight railway freight car component fault identification method as described in any one of claims 1-6.
10. An electronic device, It is characterized in that include: A processor, a memory and a computer program; wherein the processor is connected to the memory, the computer program is stored in the memory, and when the electronic device is running, the processor executes the computer program stored in the memory so that the electronic device executes instructions for implementing the method for identifying faults of lightweight railway freight car parts as described in any one of claims 1 to 6.
