Method and device for detecting fracture fault of height valve adjusting rod of passenger train and training method and device of detection network model
Through the improved ConvNext-Cascade-RCNN model, combined with fast Fourier convolution and PAFPN technology, the classification and positioning tasks are decoupled, and the counterfactual loss function is introduced to solve the problem of traditional convolutional neural networks in detecting the height valve adjustment rod of railway passenger cars. The problem of high false alarm rate and limited detection capability during breakage faults is achieved by achieving higher detection accuracy and robustness.
Patent Information
- Application Number
- CN202411483782.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-23
- Publication Date
- 2025-01-21
AI Technical Summary
Traditional convolutional neural networks have a high false alarm rate when detecting the fracture fault of the height valve adjustment rod of the railway passenger bus, and the existing training methods limit the detection ability of the network model.
The improved ConvNext-Cascade-RCNN model is adopted, by replacing depth convolution with fusion convolution, and introducing fast Fourier convolution in the backbone network to improve feature extraction capabilities. At the same time, PAFPN is used to replace FPN, the classification and localization tasks are decoupled, CIOU loss is used to replace GIOU loss, and a counterfactual loss function is introduced to improve the robustness of the model.
It significantly reduces the false alarm rate, improves the accuracy and efficiency of broken fault detection of the height valve adjustment rod, and enables the model to perform better under different light, noise and compression conditions.
Smart Images

Figure CN119339148A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of train detection, and in particular relates to a method and device for detecting breakage faults of railway passenger car components, and a method and device for training a detection network model. Background Art
[0002] The height valve adjustment rod is an important component in rail transit vehicles, especially in EMUs and subway vehicles. Its function is to adjust the air spring compression between the car body and the bogie to maintain the balance of the car body height, ensure the stability of the vehicle operation and the comfort of passengers. In EMUs and subway vehicles, the height of the car body may change due to uneven passenger distribution or changes in vehicle load. The height valve adjustment rod automatically adjusts the inflation and exhaust of the air spring by connecting the car body and the bogie, thereby maintaining the car body at a set height level. In this way, even if the number and distribution of passengers change, or the gravity changes when the vehicle passes through a curve, the stability of the vehicle can be maintained, and the occurrence of problems such as the coupling device being unhooked can be prevented. The failure of the height valve adjustment rod will seriously affect the safe operation of railway passenger cars, so the accurate identification of the height valve adjustment rod failure is crucial for the safe operation of railway passenger cars.
[0003] The height valve adjustment rod is slender and its breakage is difficult to detect. Traditional manual inspection is time-consuming and costly, and the inspectors may miss or misdetect due to fatigue and negligence. Fault detection methods using deep learning technology can help reduce costs and improve efficiency. However, the normal state and fault state of the adjustment rod are sometimes similar, which requires comprehensive consideration of surrounding features for judgment. In addition, breakage detection is also affected by factors such as light, camera sensor noise, and image compression. Traditional convolutional neural networks are often accompanied by a high false alarm rate in detection tasks.
[0004] In addition, when the network model for adjusting rod detection is trained using the existing training method, the ability of the network model to detect the adjusting rod in different situations is also limited, which affects the detection effect of the network model. Summary of the invention
[0005] The present invention aims to solve the problem of a high false alarm rate when using a traditional convolutional neural network to detect a height valve adjustment rod, and the problem that using an existing training method to train a network model for detecting a height valve adjustment rod affects the detection capability of the network model.
[0006] A method for detecting a railway passenger car height valve adjustment rod breakage fault comprises the following steps:
[0007] First, an image of the height valve adjustment rod of a railway passenger car is collected, and then sent to a height valve adjustment rod breakage fault detection network model for detection. The height valve adjustment rod breakage fault detection network model is an improved ConvNext-Cascade-RCNN model, which is an improvement based on the ConvNext-Cascade-RCNN model. The improvement includes:
[0008] The deep convolution in the basic module Block of the backbone network ConvNext for feature extraction is replaced with a fused convolution, which first performs fast Fourier convolution on the input feature map and then performs partial convolution on the output of the fast Fourier convolution;
[0009] For the classification and positioning tasks in the Cascade-RCNN model after the backbone network, the decoupling module is used for decoupling processing: based on the feature maps of different scales output by PAFPN, that is, feature maps of different resolutions; the classification task is performed based on the low-resolution feature map to obtain the classification result of the height valve adjustment rod break fault; the positioning task is performed based on the high-resolution feature map to obtain the positioning result of the height valve adjustment rod break fault;
[0010] Therefore, the height valve adjustment rod breakage fault detection is realized based on the improved ConvNext-Cascade-RCNN model.
[0011] Furthermore, the improved ConvNext-Cascade-RCNN model is an improvement based on the ConvNext-Cascade-RCNN model, and the improvement also includes:
[0012] Replace FPN in Cascade-RCNN with PAFPN.
[0013] Furthermore, the improved ConvNext-Cascade-RCNN model is an improvement based on the ConvNext-Cascade-RCNN model, and the improvement also includes:
[0014] The bounding box regression loss in Cascade-RCNN is replaced from generalized intersection-over-union (GIOU) to center point intersection-over-union (CIOU).
[0015] Furthermore, the specific process of the decoupling module performing the decoupling process includes the following steps:
[0016] For the feature maps of different scales output by AFPN, that is, feature maps of different resolutions, three feature maps with different resolutions are selected for the positioning task, and the three feature maps with different resolutions are recorded as B and B according to the classification rate from low to high.l+1 , B l , B l-1 ;
[0017] B l+1 After 1*1 convolution, upsampling is performed to obtain the same l The feature map with the same classification rate is denoted as B1; l After 1*1 convolution, feature map B2 is obtained, and feature map B2 is upsampled to obtain the same l-1 The feature map with the same classification rate is denoted as B3; l-1 After 1*1 convolution, the output is added to B3, and the output feature map is convolved with B again by 1*1. l The feature map with the same classification rate is recorded as B4; B1, B2 and B4 are added together, and the obtained feature map is used for the positioning task to obtain the height valve adjustment rod break fault positioning result;
[0018] B l+1 After 1*1 convolution, the feature map is recorded as B'1; l After 1*1 convolution and 3*3 convolution, a feature map with the same resolution as B'1 is obtained, which is recorded as B'2. B'1 and B'2 are concat-processed, and the obtained feature map is used for the classification task to obtain the classification result of the height valve adjustment rod breakage fault.
[0019] Furthermore, the improvement of replacing the deep convolution in the basic module Block of the backbone network ConvNext for feature extraction with fused convolution is replaced with the following improvements:
[0020] The depth convolution in the basic module Block of the backbone network ConvNext for feature extraction is replaced by fast Fourier convolution.
[0021] Furthermore, the height valve adjusting rod break fault detection network model is pre-trained, and the loss function Loss=L used in the process of training the height valve adjusting rod break fault detection network model is orig +λ·L counterfactual , where λ is a hyperparameter that adjusts the weight of the counterfactual loss, L counterfactual =L counter -L orig is the counterfactual loss, the original sample loss L orig By classification loss and bounding box loss Composition; counterfactual sample loss L counter Refers to the loss calculated using the counterfactual sample, and the loss calculation method is the same as the original sample loss calculation method;
[0022] The original sample refers to the image of the height valve adjustment rod collected and acquired by the image acquisition device, which includes images of the normal height valve adjustment rod and the broken height valve adjustment rod; the counterfactual sample refers to the sample obtained by counterfactual processing of the original sample data set, and the counterfactual processing includes adjusting the lighting conditions, adding simulated noise and performing image compression processing.
[0023] A storage medium for detecting a railway passenger car height valve adjusting rod breakage fault, wherein the storage medium stores at least one instruction, and the at least one instruction is loaded and executed by a processor to implement a railway passenger car height valve adjusting rod breakage fault detection method.
[0024] A railway passenger car height valve adjusting rod breakage fault detection device, the device comprises a processor and a memory, the memory stores at least one instruction, the at least one instruction is loaded and executed by the processor to implement a railway passenger car height valve adjusting rod breakage fault detection method.
[0025] A training method for a height valve adjustment rod break fault detection network model, wherein the height valve adjustment rod break fault detection network model is a network model for height valve adjustment rod break fault detection, the input of the height valve adjustment rod break fault detection network model is a railway passenger car height valve adjustment rod image, and the output is the height valve adjustment rod break fault type and position; the training method comprises:
[0026] The height valve adjustment rod break fault detection network model is trained based on the loss function, wherein the loss function Loss=L orig +λ·L counterfactual , where λ is a hyperparameter that adjusts the weight of the counterfactual loss, L counterfactual =L counter -L orig is the counterfactual loss, the original sample loss L orig By classification loss and bounding box loss Composition; counterfactual sample loss L counter Refers to the loss calculated using the counterfactual sample, and the loss calculation method is the same as the original sample loss calculation method;
[0027] The original sample refers to the image of the height valve adjustment rod collected and acquired by the image acquisition device, which includes images of the normal height valve adjustment rod and the broken height valve adjustment rod; the counterfactual sample refers to the sample obtained by counterfactual processing of the original sample data set, and the counterfactual processing includes adjusting the lighting conditions, adding simulated noise and performing image compression processing.
[0028] A training device for a height valve adjustment rod breakage fault detection network model, characterized in that the device includes a processor and a memory, the memory stores at least one instruction, and the at least one instruction is loaded and executed by the processor to implement the training method of the height valve adjustment rod breakage fault detection network model.
[0029] Beneficial effects:
[0030] 1. By applying fast Fourier convolution to some convolutional layers of the ConvNext backbone network, the aim is to improve the accuracy of the model while significantly reducing the computation time. This innovative approach not only optimizes the performance of the network, but also improves efficiency, making it more efficient and flexible when handling complex tasks.
[0031] 2. In the ConvNext backbone network, the fast Fourier convolution connection method is improved by applying partial convolution, aiming to significantly improve computational efficiency.
[0032] 3. The Cascade-RCNN feature pyramid FPN is replaced with PAFPN, and a task-specific decoupling head is designed to decouple the decoder and improve the network detection accuracy.
[0033] 4. The present invention optimizes the network loss function and introduces the counterfactual loss designed by the present invention, so that the model performs better under different light, camera sensor noise and image compression conditions. In addition, CIOU loss is used to replace the original GIOU loss to improve positioning accuracy and convergence speed, while improving bounding box quality and enhancing robustness. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] Figure 1 This is a fault identification flow chart.
[0035] Figure 2 A schematic diagram of the overall network structure.
[0036] Figure 3 This is a schematic diagram of the structure of the improved basic module.
[0037] Figure 4 Schematic diagram of the structure of the decoupled head for improving the revision of specific tasks. DETAILED DESCRIPTION
[0038] Specific implementation method 1: Combination Figure 1 To explain this embodiment,
[0039] This embodiment is a method for detecting a height valve adjustment rod break fault on a railway passenger car. First, a height valve adjustment rod break fault detection network model is built and trained, and then the trained height valve adjustment rod break fault detection network is used to perform height valve adjustment rod break fault detection. The specific process includes the following steps:
[0040] S1. Collect images and build a data set:
[0041] High-definition imaging equipment is installed on the side of the railway to obtain images of passenger cars passing by. The imaging equipment is used to collect images taken by the side camera, which provides important support for the subsequent establishment of high-quality data sets. Based on the collected images, images of normal height valve adjustment rods and broken height valve adjustment rods are obtained. Due to the small number of broken images, it is necessary to use PS technology on normal images to synthesize broken fault images to enrich the data set of height valve adjustment rod broken, which is recorded as the original sample data set; counterfactual processing is performed on the original sample data set to obtain counterfactual samples. Counterfactual processing includes adjusting lighting conditions, adding simulated noise, and image compression, which is recorded as the counterfactual sample data set. The original sample data set and the counterfactual sample data set are used to detect the data set, and the detection data set is marked and the corresponding marking file is generated to complete the production of the data set. The labelImg software is used in the marking process to generate the marking information corresponding to each image. The normal height valve adjustment rod target is marked as the normal class, and the target with broken height valve adjustment rod is marked as the broken class. The marking file records the image name, size, path, target location, target category and other information.
[0042] The height valve adjustment rod is slender in the image, with fewer distribution images, making it difficult to identify. It is necessary to perform data augmentation on the data set to increase the height valve adjustment rod shape in the data set as much as possible. Data augmentation operations include affine transformation, cropping, contrast transformation and other operations. It should be noted that the original data is still recorded as the original sample after augmentation processing, and the counterfactual sample is still recorded as the counterfactual sample after augmentation processing. Data augmentation operation can effectively reduce the probability of overfitting of the fault detection network and improve the generalization performance of the fault detection network.
[0043] S2. Build and train the height valve adjustment rod break fault detection network:
[0044] Since the height valve adjustment rod is less distributed in the side image and its shape is difficult to identify, some normal height valve adjustment rods and broken height valve adjustment rods are similar in appearance, which brings challenges to detection. In addition, the original ConvNext-Cascade-RCNN performs poorly in terms of detection speed and accuracy. In order to solve these problems, the present invention improves it in the following ways:
[0045] (1) The present invention uses fast Fourier convolution technology to improve the ConNext model. This method not only improves the detection speed but also improves the detection accuracy by introducing fast Fourier transform in some convolution layers of the backbone network. At the same time, we optimized the ConNext backbone network and applied partial convolution and residual connection methods to process the fast Fourier convolution part, further accelerating the detection speed. The implementation of these improvement measures is aimed at improving the model's recognition ability of the height valve adjustment rod and ensuring its effectiveness in practical applications.
[0046] (2) In the feature extraction part, the feature fusion pyramid uses PAFPN to replace the original FPN. PAFPN improves the efficiency and expression ability of feature fusion and can better capture features of different scales, thereby enhancing the robustness of the model to the height valve adjustment rod and its complex background. At the same time, it effectively integrates contextual information and improves the overall target detection accuracy.
[0047] (3) This paper optimizes the decoder of Cascade-RCNN and improves the detection accuracy of the network by decoupling position regression from category classification. At the same time, we replace the GIOU loss in the loss function with the CIOU loss. This adjustment significantly enhances the detection effect of the model.
[0048] In addition, the present invention also improves the loss function of the training network model and introduces a counterfactual loss based on the design of the present invention into the loss function, so that the model performs better under different lighting conditions, camera sensor noise and image compression.
[0049] These improvements aim to enhance the robustness and accuracy of the model to adapt to various complex practical application scenarios.
[0050] The overall structure of the height valve adjustment rod breakage fault detection network model of the present invention is as follows: Figure 2 As shown in the figure, the network model consists of an improved ConvNext backbone network, a feature fusion pyramid, a decoupled decoder and classification, and a position regression detection head.
[0051] The improved ConvNext backbone network is as follows:
[0052] In the basic module (Block) of ConvNeXt, deep convolution is first performed to extract features. This method can process information independently on each channel, thereby effectively reducing the amount of calculation. In order to further improve the computational efficiency, especially when processing large-scale data, the deep convolution in ConvNeXt is replaced by fast Fourier convolution (FFT Convolution), such as Figure 3 Fast Fourier convolution takes advantage of frequency domain transformation and converts the convolution operation into a multiplication operation, thereby significantly accelerating the calculation.
[0053] Fast Fourier convolution uses the properties of Fourier transform to transform the convolution operation from the time domain to the frequency domain, thereby achieving more efficient operations. Specifically, the first step is to perform a fast Fourier transform (FFT) on the input feature map to convert it into a frequency domain representation. This step is very critical because in the frequency domain, the convolution operation can be implemented by simple multiplication, which greatly reduces the amount of calculation compared to convolution in the time domain.
[0054] Next, the convolution kernel is also fast Fourier transformed so that an effective point multiplication operation can be performed in the frequency domain. In this way, the complexity of the convolution is reduced from the time domain to the frequency domain, significantly reducing the amount of calculation. This efficient convolution method is particularly suitable for processing large-scale feature maps and convolution kernels, greatly improving the training speed and reasoning ability of the model.
[0055] After completing the point multiplication operation in the frequency domain, the result needs to be converted back to the spatial domain through the inverse fast Fourier transform (IFFT) to obtain a feature map that can be used in subsequent network layers. In this process, we not only retain the feature extraction capability of deep convolution, but also improve the overall computational efficiency through frequency domain operations.
[0056] To further enhance the quality of feature fusion, we can combine fast Fourier convolution and partial convolution to improve it. Specifically, we first use fast Fourier convolution to calculate the output, expressed as: Y d =F -1 (F(X)·F(K)). Here, X is the input feature map, K is the convolution kernel, F(·) represents the fast Fourier transform, and F -1 (·) represents the inverse fast Fourier transform. Then, partial convolution is applied to the output of the fast Fourier convolution to process the possible invalid areas. The calculation formula of partial convolution is: Among them, M is the mask of the valid area, ensuring that only valid features are considered. This process is particularly important for tasks with occluded or incomplete data.
[0057] Finally, the basic module (Block) adds the result of partial convolution to the input feature map through residual connection to obtain the final output result: Y final =Activation(LayerNorm(Y partial +X)), that is, replace the depth convolution in the ConvNeXt basic module with Y final .
[0058] This method not only improves the robustness of the network in the face of complex scenarios, but also improves the overall performance through efficient Fourier transform, allowing the model to respond quickly and maintain high accuracy in practical applications. In short, through this innovative design idea, we not only improve the computational efficiency, but also ensure the stability and reliability of the model in various complex environments.
[0059] The feature fusion pyramid is as follows:
[0060] The benefits of using PAFPN to replace FPN in Cascade R-CNN are mainly reflected in several aspects. First, PAFPN significantly improves the efficiency and expressiveness of feature fusion. Through the adaptive feature fusion strategy, the model can more effectively capture multi-scale information, which is particularly important for processing small targets and complex background scenes. Secondly, PAFPN performs well in integrating contextual information and dynamically adjusts feature weights to optimize feature utilization, thereby improving detection accuracy. In addition, PAFPN allows more comprehensive multi-level feature utilization. By introducing lateral connections, it ensures the flow of information between low-level and high-level features and enhances the combination of features at different levels. Finally, these advantages together enhance the robustness of Cascade R-CNN to various complex scenes, making it perform better in different types of object detection tasks. Therefore, using PAFPN as an alternative to the feature pyramid network can effectively improve the performance of Cascade R-CNN and achieve higher detection accuracy and better generalization ability.
[0061] The decoupled decoder and classification, position regression detection head are as follows:
[0062] In Cascade R-CNN, the decoupling design of classification and position regression aims to improve the accuracy of object detection. Traditional Cascade R-CNN uses the same feature input for classification and position regression, which may cause interference between the two. By processing these two tasks separately, we can extract the most advantageous features for each task. Specifically, the decoder is divided into two independent branches: one for category classification and the other for position regression.
[0063] Traditional methods often mix context information with features, resulting in reduced recognition accuracy in complex scenarios. This paper aims to significantly improve the target detection performance through a task-specific decoupling head, and then proposes a decoupling design. The core of decoupling is to design a Figure 4The module shown in the figure outputs feature maps of different scales (receptive fields) based on PAFPN. For classification tasks, it does not require high-resolution feature maps, only semantic information is needed to achieve good detection results. For positioning tasks, high-resolution feature maps are required for positioning. Therefore, decoupling processing is to separate the two and let them focus more on their own tasks to achieve model accuracy improvement. That is, positioning and classification use different feature maps and feature layers for processing, so that decoupling can focus on positioning and classification can focus on classification. The details are as follows:
[0064] For the feature maps of different scales (receptive fields) output by AFPN, three feature maps with different resolutions are selected for the positioning task. The three feature maps with different resolutions are recorded as B and B according to the classification rate from low to high. l+1 , B l , B l-1 ;
[0065] B l+1 After 1*1 convolution, upsampling is performed to obtain the same l The feature map with the same classification rate is denoted as B1; l After 1*1 convolution, feature map B2 is obtained, and feature map B2 is upsampled to obtain the same l-1 The feature map with the same classification rate is denoted as B3; l-1 After 1*1 convolution, the output is added to B3, and the output feature map is convolved with B again by 1*1. l The feature map with the same classification rate is recorded as B4; B1, B2 and B4 are added together, and the obtained feature map is used for the positioning task to obtain the height valve adjustment rod break fault positioning result;
[0066] B l+1 After 1*1 convolution, the feature map is recorded as B'1; l After 1*1 convolution and 3*3 convolution, a feature map with the same resolution as B'1 is obtained, which is recorded as B'2. B'1 and B'2 are concat-processed, and the obtained feature map is used for the classification task to obtain the classification result of the height valve adjustment rod breakage fault;
[0067] In the classification task, the generated spatially coarse but semantically strong feature encodings are used to better regress object boundaries; specifically, these feature encodings are combined with feature maps to form the final detection results; in the localization task, the generated high-resolution feature encodings are used to accurately regress object boundaries, and these feature maps are combined to form the final result. In addition, 1x1 convolution is used to control the number of channels, so that the model can independently learn contextual information related to specific tasks, reduce interference and enhance the clarity of feature representation.
[0068] In addition, the present invention also proposes an important improvement, which is to replace the bounding box regression loss in Cascade R-CNN from generalized intersection-over-union (GIOU) to center point intersection-over-union (CIOU), aiming to significantly improve the performance of the target detection model. Compared with GIOU, CIOU not only considers the degree of overlap between the predicted box and the true box in the loss calculation, but also introduces two key factors: the center point distance and the aspect ratio of the box. This comprehensive consideration enables the model to more accurately locate the position of the height valve adjustment rod break defect and effectively reduce the phenomenon of missed detection. The mathematical formula of CIOU can be expressed as: CIOU = IOU-(p 2 (b,b*) / c 2 )-αν, IOU represents the intersection-over-union ratio between the predicted box and the true box. p(b,b*) represents the Euclidean distance between the center point b of the predicted box and the center point b* of the true box. c represents the diagonal length of the minimum bounding box, ν represents the penalty term for the aspect ratio, and α is a hyperparameter used to balance the losses of each part.
[0069] Use the improved loss function to train the above network model:
[0070] This paper proposes a counterfactual loss function to improve the performance of the model under different lighting conditions, camera sensor noise and image compression conditions. By randomly selecting samples from the original dataset, a variety of counterfactual samples are generated to evaluate the robustness of the model under different environments. There are three main methods for generating counterfactual samples: adjusting lighting conditions, adding simulated noise, and performing image compression.
[0071] For each sample, we calculate two loss values. The original sample loss L orig By classification loss and bounding box loss The counterfactual sample loss L counter It refers to the loss calculated using counterfactual samples. The loss calculation method is the same as the original sample loss calculation method. It is based on the classification loss and bounding box loss of counterfactual samples, and aims to measure the performance of the model under input changes.
[0072] Combining these two losses, the counterfactual loss defined in the present invention is L counterfactual =L counter -L orig . Counterfactual loss refers to counterfactual sample loss minus normal sample loss. This loss is "the degree of improvement of the performance of the quantified model on the counterfactual sample relative to the original sample." That is, it refers to the impact of "adjusting lighting conditions, adding simulated noise, and performing image compression" on the improvement of the image, making it a loss to adapt the model to these three situations.
[0073] By calculating the difference between the two, we can quantify the improvement of the model's performance on the counterfactual sample relative to the original sample. A larger counterfactual loss value indicates that the model is more sensitive to input changes, suggesting that the model needs to be optimized to enhance robustness. The final loss function of the present invention is expressed as Loss = L orig +λ·L counterfactual , where λ is a hyperparameter that adjusts the weight of the counterfactual loss. This comprehensive loss function helps improve the performance and stability of the model in diverse environments.
[0074] The AdamW optimizer was used to train the network model, and the initial learning rate was set to 0.0002. The dataset was divided into training set, validation set, and test set according to the ratio of 7:2:1. The weight was initialized to 0.1 and adjusted according to the validation set results. During training, the detection network was trained using the training set images and tested on the validation set. The images that were misidentified in the validation set were added to the training set to retrain the network. Finally, the network performance was evaluated on the test set.
[0075] S3, using the height valve adjustment rod breakage fault detection network to perform railway passenger car side height valve adjustment rod breakage fault detection:
[0076] Through high-definition imaging equipment, detailed images of railway passenger cars passing by are obtained, and the images taken by the side cameras are input into the trained detection network.
[0077] The height valve adjustment rod broken fault detection network is fully trained and can effectively identify various potential problems. If the detection network identifies the height valve adjustment rod broken, it will indicate that there is a fault in the image. After identifying the fault, the system will automatically upload a fault message to ensure that relevant personnel are informed of the problem in a timely manner. At the same time, the system will continue to process the next image to ensure the efficiency and continuity of the detection work. After identifying the fault, the system will automatically upload a fault message to ensure that relevant personnel are informed of the problem in a timely manner. At the same time, the system will continue to process the next image to ensure the efficiency and continuity of the detection work.
[0078] Compared with the prior art, the present invention adopts an improved version of the ConvNext-Cascade-RCNN network combined with counterfactual causal inference, which significantly improves the detection accuracy, effectively reduces false alarms, and significantly improves the detection accuracy of the height valve adjustment rod breakage fault. Specific implementation method 2:
[0080] The present embodiment is a storage medium for detecting a railway passenger car height valve adjusting rod breakage fault. The storage medium stores at least one instruction, which is loaded and executed by a processor to implement the railway passenger car height valve adjusting rod breakage fault detection method; the at least one instruction may also include a training method for only implementing a height valve adjusting rod breakage fault detection network model loaded and executed by the processor, that is, the storage medium of the present embodiment is a storage medium that stores instruction codes corresponding to a railway passenger car height valve adjusting rod breakage fault detection process using a trained height valve adjusting rod breakage fault detection network model, and may include instruction codes corresponding to a network model training process, or may not include instruction codes corresponding to a network model training process.
[0081] It should be understood that the instructions include computer program products, software or computerized methods corresponding to any method described in the present invention; the instructions can be used to program a computer system, or other electronic device. Computer storage media may include readable media on which instructions are stored, which may include but are not limited to magnetic storage media, optical storage media; magneto-optical storage media include read-only memory ROM, random access memory RAM, erasable programmable memory (e.g., EPROM and EEPROM) and flash memory layers, or other types of media suitable for storing electronic instructions. Specific implementation method three:
[0083] This embodiment is a railway passenger car height valve adjustment rod breakage fault detection device, the device includes a processor and a memory, it should be understood that including any device including a processor and a memory described in the present invention, the device may also include other units and modules that display, interact, process, control, etc. and other functions through signals or instructions;
[0084] At least one instruction is stored in the memory, and the at least one instruction is loaded and executed by the processor to implement the method for detecting a railway passenger car height valve adjusting rod breakage fault. The device of this embodiment must store, and / or load, and / or an instruction code of a railway passenger car height valve adjusting rod breakage fault detection method; it can store, and / or load, and / or execute the instruction code corresponding to the network model training process, and may not store, and / or load, and / or execute the instruction code corresponding to the network model training process.
[0085] Those skilled in the art will appreciate that at least one instruction stored is a computer program product corresponding to the method or system. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present application may adopt 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 codes. The scheme in the embodiment of the present application can be implemented in various computer languages, for example, object-oriented programming language Java and literal scripting language JavaScript, etc.
[0086] The present application is described with reference to the flowcharts and / or block diagrams of the methods, systems, and computer program products according to the embodiments of the present application, and may also be used for corresponding devices. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes 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 generate 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.
[0087] 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.
[0088] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0089] Although the preferred embodiments of the present application have been described, those skilled in the art may make other changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications falling within the scope of the present application.
[0090] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations. Specific implementation method four:
[0092] This embodiment is a training method for a height valve adjustment rod break fault detection network model, wherein the height valve adjustment rod break fault detection network model is a network model for height valve adjustment rod break fault detection, and the input of the height valve adjustment rod break fault detection network model is a railway passenger car height valve adjustment rod image, and the output is the height valve adjustment rod break fault type and location; the training method includes:
[0093] The height valve adjustment rod break fault detection network model is trained based on the loss function, wherein the loss function is constructed based on the counterfactual loss, and the counterfactual loss L counterfactual =L counter -L orig ; Among them, the original sample loss L orig By classification loss and bounding box loss Composition; counterfactual sample loss L counter Refers to the loss calculated using the counterfactual sample, and the loss calculation method is the same as the original sample loss calculation method;
[0094] The original sample refers to the image of the height valve adjustment rod collected and acquired by the image acquisition device, which includes images of the normal height valve adjustment rod and the broken height valve adjustment rod; the counterfactual sample refers to the sample obtained by counterfactual processing of the original sample data set, and the counterfactual processing includes adjusting the lighting conditions, adding simulated noise and performing image compression processing.
[0095] The final loss function Loss = L orig +λ·L counterfactual , where λ is a hyperparameter that adjusts the weight of the counterfactual loss.
[0096] It should be noted that the height valve adjustment rod break fault detection network model of this embodiment includes but is not limited to the height valve adjustment rod break fault detection network model in the specific embodiment 1, and can also be other network models that can realize the height valve adjustment rod break fault detection. The training method in this embodiment can realize the training of the network model. It should also be noted that the training method of the present invention can be used to train the network model to improve the training effect of the corresponding network model, thereby improving the network model's ability to detect the adjustment rod in different situations, thereby improving the network model's detection effect on the height valve adjustment rod. Specific implementation method five:
[0098] This embodiment is a training device for a height valve adjustment rod break fault detection network model, the device includes a processor and a memory, it should be understood that including any device including a processor and a memory described in the present invention, the device may also include other units and modules that perform display, interaction, processing, control, etc. and other functions through signals or instructions;
[0099] At least one instruction is stored in the memory, and the at least one instruction is loaded and executed by the processor to implement only a training method for a height valve adjustment rod broken fault detection network model described in specific implementation mode four. It should be noted that: a training device for a height valve adjustment rod broken fault detection network model in this implementation mode can be used for training of, but not limited to, the height valve adjustment rod broken fault detection network model described in specific implementation mode one, and can also be used for training of other network models that can realize height valve adjustment rod broken fault detection, which can improve the training effect of the corresponding network model, thereby improving the network model's ability to detect adjustment rods in different situations, thereby improving the network model's detection effect on the height valve adjustment rod.
[0100] Those skilled in the art will appreciate that at least one instruction stored is a computer program product corresponding to the method or system. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present application may adopt 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 codes. The scheme in the embodiment of the present application can be implemented in various computer languages, for example, object-oriented programming language Java and literal scripting language JavaScript, etc.
[0101] The present application is described with reference to the flowcharts and / or block diagrams of the methods, systems, and computer program products according to the embodiments of the present application, and may also be used for corresponding devices. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes 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 generate 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.
[0102] 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 including 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.
[0103] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0104] Although the preferred embodiments of the present application have been described, those skilled in the art may make other changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications falling within the scope of the present application.
[0105] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.
[0106] The above calculation examples of the present invention are only used to explain the calculation model and calculation process of the present invention in detail, and are not intended to limit the implementation methods of the present invention. For ordinary technicians in the relevant field, other different forms of changes or modifications can be made based on the above description. It is impossible to list all the implementation methods here. All obvious changes or modifications derived from the technical solution of the present invention are still within the scope of protection of the present invention.
Claims
1. A method for detecting a broken fault of a height valve adjusting rod of a railway passenger car, characterized in that: The following steps are involved: First, an image of the height valve adjustment rod of a railway passenger car is collected, and then sent to a height valve adjustment rod breakage fault detection network model for detection. The height valve adjustment rod breakage fault detection network model is an improved ConvNext-Cascade-RCNN model, which is an improvement based on the ConvNext-Cascade-RCNN model. The improvement includes: The deep convolution in the basic module Block of the backbone network ConvNext for feature extraction is replaced with a fused convolution, which first performs fast Fourier convolution on the input feature map and then performs partial convolution on the output of the fast Fourier convolution; For the classification and positioning tasks in the Cascade-RCNN model after the backbone network, the decoupling module is used for decoupling processing: based on the feature maps of different scales output by PAFPN, that is, feature maps of different resolutions; the classification task is performed based on the low-resolution feature map to obtain the classification result of the height valve adjustment rod break fault; the positioning task is performed based on the high-resolution feature map to obtain the positioning result of the height valve adjustment rod break fault; Therefore, the height valve adjustment rod breakage fault detection is realized based on the improved ConvNext-Cascade-RCNN model.
2. A railway passenger car height valve adjustment rod breakage fault detection method according to claim 1, characterized in that: The improved ConvNext-Cascade-RCNN model is an improvement based on the ConvNext-Cascade-RCNN model, and the improvement also includes: Replace FPN in Cascade-RCNN with PAFPN.
3. A railway passenger car height valve adjustment rod breakage fault detection method according to claim 2, characterized in that: The improved ConvNext-Cascade-RCNN model is an improvement based on the ConvNext-Cascade-RCNN model, and the improvement also includes: The bounding box regression loss in Cascade-RCNN is replaced from generalized intersection-over-union (GIOU) to center point intersection-over-union (CIOU).
4. A railway passenger car height valve adjustment rod breakage fault detection method according to claim 1, characterized in that: The specific process of the decoupling module performing the decoupling process includes the following steps: For the feature maps of different scales output by AFPN, that is, feature maps of different resolutions, three feature maps with different resolutions are selected for the positioning task, and the three feature maps with different resolutions are recorded as B and B according to the classification rate from low to high. l+1 , B l , B l-1 ; B l+1 After 1*1 convolution, upsampling is performed to obtain the same l The feature map with the same classification rate is denoted as B1; l After 1*1 convolution, feature map B2 is obtained, and feature map B2 is upsampled to obtain the same l-1 The feature map with the same classification rate is denoted as B3; l-1 After 1*1 convolution, the output is added to B3, and the output feature map is convolved with B again by 1*1. l The feature map with the same classification rate is recorded as B4; B1, B2 and B4 are added together, and the obtained feature map is used for the positioning task to obtain the height valve adjustment rod break fault positioning result; B l+1 After 1*1 convolution, the feature map is recorded as B'1; l After 1*1 convolution and 3*3 convolution, a feature map with the same resolution as B'1 is obtained, which is recorded as B'2. B'1 and B'2 are concat-processed, and the obtained feature map is used for the classification task to obtain the classification result of the height valve adjustment rod breakage fault.
5. A railway passenger car height valve adjustment rod breakage fault detection method according to any one of claim 1, characterized in that: The improvement of replacing the deep convolution in the basic module Block of the backbone network ConvNext for feature extraction with fused convolution is replaced with the following improvements: The depth convolution in the basic module Block of the backbone network ConvNext for feature extraction is replaced by fast Fourier convolution.
6. A railway passenger car height valve adjustment rod breakage fault detection method according to any one of claims 1 to 5, characterized in that: The height valve adjusting rod break fault detection network model is pre-trained, and the loss function Loss=L used in the process of training the height valve adjusting rod break fault detection network model is: orig +λ·L counterfactual , where λ is a hyperparameter that adjusts the weight of the counterfactual loss, L counterfactual =L counter -L orig is the counterfactual loss, the original sample loss L orig By classification loss and bounding box loss Composition; counterfactual sample loss L counter Refers to the loss calculated using the counterfactual sample, and the loss calculation method is the same as the original sample loss calculation method; The original sample refers to the image of the height valve adjustment rod collected and acquired by the image acquisition device, which includes images of the normal height valve adjustment rod and the broken height valve adjustment rod; the counterfactual sample refers to the sample obtained by counterfactual processing of the original sample data set, and the counterfactual processing includes adjusting the lighting conditions, adding simulated noise and performing image compression processing.
7. A storage medium for detecting a railway passenger car height valve adjustment rod breakage fault, characterized in that: The storage medium stores at least one instruction, and the at least one instruction is loaded and executed by the processor to implement a railway passenger car height valve adjustment rod breakage fault detection method as described in any one of claims 1 to 6.
8. A railway passenger car height valve adjustment rod breakage fault detection device, characterized in that: The device includes a processor and a memory, wherein the memory stores at least one instruction, and the at least one instruction is loaded and executed by the processor to implement a railway passenger car height valve adjustment rod breakage fault detection method as described in any one of claims 1 to 6.
9. A training method for a height valve adjusting rod break fault detection network model, wherein the height valve adjusting rod break fault detection network model is a network model for height valve adjusting rod break fault detection, the input of the height valve adjusting rod break fault detection network model is a railway passenger car height valve adjusting rod image, and the output is the height valve adjusting rod break fault type and location; characterized in that, The training method comprises: The height valve adjustment rod break fault detection network model is trained based on the loss function, wherein the loss function Loss=L orig +λ·L counterfactual , where λ is a hyperparameter that adjusts the weight of the counterfactual loss, L counterfactual =L counter -L orig is the counterfactual loss, the original sample loss L orig By classification loss and bounding box loss Composition; counterfactual sample loss L counter Refers to the loss calculated using the counterfactual sample, and the loss calculation method is the same as the original sample loss calculation method; The original sample refers to the image of the height valve adjustment rod collected and acquired by the image acquisition device, which includes images of the normal height valve adjustment rod and the broken height valve adjustment rod; the counterfactual sample refers to the sample obtained by counterfactual processing of the original sample data set, and the counterfactual processing includes adjusting the lighting conditions, adding simulated noise and performing image compression processing.
10. A training device for a height valve adjustment rod breakage fault detection network model, characterized in that: The device includes a processor and a memory, wherein the memory stores at least one instruction, and the at least one instruction is loaded and executed by the processor to implement a training method for a height valve adjustment rod breakage fault detection network model as described in claim 9.