Passenger car part fault detection method and system based on hierarchical feature denoising reconstruction
By using a hierarchical feature denoising and reconstruction method, the problems of positioning ambiguity and poor anti-interference in railway passenger car component fault detection are solved, achieving high-precision and anti-interference fault detection for multi-scale components, and improving the accuracy and robustness of detection.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- CENT SOUTH UNIV
- Filing Date
- 2026-03-31
- Publication Date
- 2026-05-01
AI Technical Summary
Existing technologies for fault detection of railway passenger car components suffer from problems such as ambiguous positioning, poor anti-interference, and difficulty in multi-scale detection. They are difficult to accurately identify and locate abnormal areas in complex environments, and are prone to missed detection, false detection, and positioning deviation, especially when there is a lack of fault sample annotations.
A hierarchical feature-based denoising and reconstruction method is adopted to achieve fault detection of bus components through multi-scale feature extraction, hierarchical context enhancement, manifold projection learning, and a Top-K robust scoring strategy. This method learns normal structural patterns through a self-supervised feature denoising task, and combines manifold projection and anomaly scoring localization to improve the accuracy of fault region localization and anti-interference capability.
It significantly improves the accuracy and robustness of fault detection, enabling accurate identification and location of minor faults and abnormal areas of large components under complex operating conditions, reducing false alarm rates, and enhancing the model's anti-interference ability and fault detection capability.
Smart Images

Figure CN121962142A_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of railway passenger car anomaly detection technology, specifically involving a passenger car component fault detection method and system based on hierarchical feature denoising and reconstruction. Background Technology
[0002] With the rapid development of the railway transportation industry and the continuous growth of passenger demand, train operation safety has become a crucial aspect of railway system security. Passenger cars have complex structures, with a large number and variety of mechanical components distributed in areas such as the undercarriage, running gear, braking system, and suspension components. These components operate under conditions of vibration, load impact, and complex environments for extended periods, potentially leading to various types of anomalies and malfunctions, including wear, cracks, fatigue damage, and deformation. This places higher demands on fault detection technology, requiring it to simultaneously identify multiple types of anomalies and pinpoint precise areas.
[0003] In real-world scenarios, the vast majority of monitoring images collected by staff are normal samples, while the number of actual abnormal samples is extremely small, their occurrence frequency is low, and their abnormal forms are not fixed, making them difficult to enumerate and model in advance. Furthermore, the cost and difficulty of annotating abnormal samples are high, rendering traditional detection methods that rely on training with abnormal samples unsuitable. In addition, with vehicle upgrades and component material updates, new components and novel anomalies are constantly emerging. Existing methods based on fixed categories or prior sample libraries often lack the ability to detect and generalize to unknown or unseen anomalies.
[0004] In TVDS (Transportation and Detection System) maintenance, operators not only need to determine whether abnormalities exist, but also need to accurately determine the specific location and length range of cracks, peeling, or structural defects to support defect classification and maintenance decisions. Although existing technologies have achieved some success in passenger car component fault detection, the following significant technical bottlenecks still exist when facing the increasingly complex operating environment of railway passenger cars and the rapidly iterating component system:
[0005] 1. Most existing technologies are discriminative models, whose output is a "probability value" of a feature belonging to an anomaly class. This probability scalar lacks a clear geometric and physical meaning, resulting in anomaly heatmaps that often appear diffuse and hazy, failing to meet the needs of refined operations. Existing anomaly detection methods based on classification or simple feature distance can usually only provide image-level anomaly judgments, making it difficult to provide reliable anomaly region location and defect contour information. In the absence of anomaly sample annotations, problems such as missed detections, false detections, and location errors are prone to occur.
[0006] 2. The environment under railway passenger cars is extremely harsh, with components often covered in oil, mud, or exhibiting metallic reflections. Existing methods rely on synthesized noise features to train the discriminator. When the oil or reflective features in the real environment are similar to the distribution of synthesized noise, the discriminator is highly likely to misjudge them as faults, resulting in a persistently high false alarm rate.
[0007] 3. Bus components vary greatly in size, from large brake beams to tiny cotter pins. Existing technologies often use a single-scale feature aggregation approach, resulting in deep features losing details of tiny parts, or shallow features lacking perception of the overall structure of large components. This makes it difficult for models to simultaneously detect large structural fractures and the loss of tiny accessories within the same framework, easily leading to missed detections of minor faults.
[0008] Given the aforementioned industry background and technological limitations, there is an urgent need to construct an unsupervised anomaly detection method that can operate under conditions with only normal samples. This method would automatically learn the normal structural patterns of train components in the feature space and characterize the degree of anomaly through feature reconstruction bias, thereby achieving accurate detection of abnormal defects in TVDS scenarios and improving fault detection capability, positioning accuracy, and system robustness. Summary of the Invention
[0009] To address the problems of ambiguous positioning, poor anti-interference ability, and difficulty in multi-scale detection in existing technologies, this application proposes a bus component fault detection method and system based on hierarchical feature denoising and reconstruction. The main objective is to:
[0010] 1. Improve the edge clarity and accuracy of fault location: By introducing a feature denoising adapter (manifold projection learning), the anomaly detection task is transformed from "probabilistic discrimination" to "manifold reconstruction". Utilizing the reconstruction error as a physically meaningful metric, and based on the sensitivity of the denoising task to spatial location, pixel-level precise location of the fault area is achieved, significantly improving the regional overlap index.
[0011] 2. Enhance robustness against interference under complex operating conditions: By constructing a self-supervised feature denoising task, the model is forced to learn the "normal manifold structure" of bus components. This enables the model to repair "features affected by oil contamination" into "standard features." At the same time, in conjunction with a Top-K robust scoring strategy, isolated noise caused by metal reflections is suppressed, reducing the false alarm rate.
[0012] 3. Solving the challenge of simultaneous detection of multi-scale components: By designing a hierarchical context enhancement module, a bidirectional feature flow is established before feature denoising, fusing deep semantics with shallow details. This ensures that the model can perceive both the overall deformation of large components and the edge details of small components, achieving comprehensive coverage of faults in all-size components of the bus.
[0013] The technical solution provided in this application is as follows: In a first aspect, this application provides a method for fault detection of bus components based on hierarchical feature denoising and reconstruction, comprising the following steps: S1. Multi-scale feature extraction: Input the input bus component image into the pre-trained feature extraction network, extract the multi-layer original hierarchical feature maps of the effective feature layers in the network, and construct a multi-scale feature set; S2, Hierarchical Context Enhancement: The multi-level original hierarchical feature maps in the multi-scale feature set are sequentially subjected to bidirectional fusion processing of top-down semantic injection and bottom-up detail feedback to obtain a feature set with scale alignment and bidirectional semantic and detail enhancement. The feature set is then aggregated to obtain an aggregated feature vector set. S3. Manifold projection learning: Perform manifold projection processing on the aggregated feature vectors in the aggregated feature vector set to obtain the repaired feature vectors; S4. Anomaly Scoring and Localization: For the input bus component image, an anomaly score map is obtained by calculating the point-by-point Euclidean distance between its original aggregated feature vector and the repaired feature vector; an anomaly heatmap is obtained based on the anomaly score map; the maximum value on the anomaly score map is calculated. The average of the individual anomaly scores is used as the anomaly score for the entire image, thereby enabling fault detection of bus components; among which, Use the default value.
[0014] In one possible implementation, in S1, the input bus component image is... , They are respectively The height and width; the multi-layer original hierarchical feature map satisfies , ,in Indicates the first Original layer feature map, This represents the feature extraction mapping relationship for the i-th effective feature layer in the feature extraction network. This is the number of the shallowest layer with effective features in the feature extraction network. The deepest layer of the effective feature extraction network is numbered; the multi-scale feature set is... .
[0015] In one possible implementation, the feature extraction network is a ResNet-50 network. , The multi-scale feature set is .
[0016] In one possible implementation, the specific process of top-down semantic injection in S2 is as follows: Feature map of the deepest original layer Perform a 1×1 convolution operation to obtain the top-down semantic injection fusion feature map of layer D. ; For the original layer feature map of layer i Perform a 1×1 convolution operation and fuse it with the top-down semantic injection feature map of the (i+1)th layer. The feature maps upsampled by bilinear interpolation are summed element by element to obtain the top-down semantic injection fusion feature map of the i-th layer. , ; The specific process of the bottom-up detailed feedback is as follows: top-down semantic injection fusion feature map of the shallowest layer Perform a 3×3 convolution operation to obtain the S-th layer bidirectional fused scale-aligned semantic enhancement feature map. ; Top-down semantic injection fusion feature map of layer i Perform a 3×3 convolution operation and fuse it with the i-1th layer bidirectional scale-aligned semantic enhancement feature map. The feature maps downsampled by convolution with a stride of 2 are summed element-wise to obtain the i-th layer bidirectional fusion scale-aligned semantic enhancement feature map. , ; The scale-aligned feature set with bidirectional semantic and detail enhancement is: The feature set is flattened in the spatial dimension and concatenated along the channel dimension to obtain the aggregated feature vector set. Where M is the total number of aggregated feature vectors, Let be the aggregated feature vector at the j-th position, and d be the sum of the number of channels of the feature maps in the feature set.
[0017] In one possible implementation, during the training phase, S3 further includes performing manifold perturbation simulation on the aggregated feature vectors in the aggregated feature vector set corresponding to the training samples of the bus component images; the specific process of the manifold perturbation simulation is as follows: [The manifold perturbation simulation is then performed on the aggregated feature vectors...] Inject Gaussian noise The perturbation dynamic feature vector is obtained. The expression is: ,in Follows a mean of 0 and a variance of Gaussian distribution, This is the noise intensity hyperparameter.
[0018] In one possible implementation, in S3, the manifold projection operator for the manifold projection process is a lightweight multilayer perceptron. ; During the training phase, the specific process of the manifold projection processing is as follows: The perturbed dynamic feature vector... enter The repaired feature vector is obtained. ; During the inference phase, the specific process of the manifold projection processing is as follows: The aggregated feature vectors are... enter The repaired feature vector is obtained. .
[0019] In one possible implementation, in step S3, during the training phase, based on structural consistency constraints, mean squared error is used as the loss function. For training samples of bus component images, the distance between the corresponding repaired feature vector and the original aggregated feature vector is minimized. The loss function expression is as follows: ; in, For the overall training loss function, The first training sample for bus component images The original aggregated feature vector at each position, The first training sample for bus component images The repaired feature vector at each position, The square of the L2 norm; A lightweight multilayer perceptron is obtained by training until the loss function converges. .
[0020] In one possible implementation, the specific process of generating the anomaly score map in step S4 is as follows: calculating the original aggregated feature vector. With the eigenvectors repaired by the manifold projection operator The pointwise Euclidean distance is used to obtain the anomaly score map. The expression is: ;in Anomaly score graph The Middle Abnormal score values for each position.
[0021] In one possible implementation, in S4, the anomaly score of the entire graph. The calculation formula is: ; in, The top value in the anomaly score graph A set of locations.
[0022] Secondly, this application provides a bus component fault detection system based on hierarchical feature denoising and reconstruction, comprising: The multi-scale feature extraction module is used to input the input bus component image into the pre-trained feature extraction network, extract the multi-layer original hierarchical feature maps of the effective feature layers in the network, and construct a multi-scale feature set; The hierarchical context enhancement module is used to sequentially perform bidirectional fusion processing of top-down semantic injection and bottom-up detail feedback on the multi-level original hierarchical feature maps in the multi-scale feature set to obtain a feature set with scale alignment and bidirectional semantic and detail enhancement. The feature set is then aggregated to obtain an aggregated feature vector set. The manifold projection processing module is used to perform manifold projection processing on the aggregated feature vectors in the aggregated feature vector set to obtain the repaired feature vectors. The anomaly scoring and localization module is used to obtain an anomaly score map from an input bus component image by calculating the pointwise Euclidean distance between its original aggregated feature vector and the repaired feature vector; generate an anomaly heatmap based on the anomaly score map; and calculate the maximum value on the anomaly score map. The average of the individual anomaly scores is used as the anomaly score for the entire image, thereby enabling fault detection of bus components; among which, Use the default value.
[0023] Thirdly, this application provides an electronic device, including: a memory and a processor; The memory is used to store computer programs; The processor is used to invoke the computer program to execute the method described above.
[0024] Fourthly, this application provides a computer-readable storage medium storing a computer program that, when executed on an electronic device, causes the electronic device to perform the method described above.
[0025] Fifthly, this application provides a computer program product, including a computer program that, when run on an electronic device, causes the electronic device to perform the method described above.
[0026] The specific implementation methods of the second to fifth aspects of this application can refer to the implementation methods of the first aspect, and will not be elaborated here.
[0027] This application focuses on the unsupervised anomaly detection task of railway passenger car running gear, and makes systematic innovations in feature representation modeling methods, cross-scale structural consistency learning, and feature manifold recovery mechanisms, which have the following beneficial effects:
[0028] (1) This application proposes a bidirectional hierarchical context enhancement mechanism, which differs from the existing technology that only performs simple feature splicing or unidirectional feature fusion. This mechanism achieves scale alignment and context consistency modeling of deep and shallow features in a unified semantic space through top-down semantic injection and bottom-up detail feedback. It effectively solves the problem of imbalance between the ability of single-scale features to express minor faults (such as missing bolts or fine cracks) and anomalies of large components (such as brake beams or frames); it significantly improves the continuity and stability of the response of abnormal regions at different scales, avoids localization breaks, missed detections or false detections caused by differences in multi-scale features, and provides a high-quality and robust feature base for subsequent anomaly discrimination.
[0029] (2) This application proposes a manifold learning strategy (unsupervised denoising learning) that performs denoising recovery in the feature space rather than the pixel space. By performing noise perturbation and denoising recovery on aggregated semantic features, the model automatically learns the low-dimensional manifold distribution of normal structural features. It gets rid of the dependence on pixel-level annotation, realizes pure unsupervised training, and significantly reduces the cost of labeling faults in the running gear of railway passenger cars and the difficulty of data acquisition. Using "feature reconstruction residual" as the basis for anomaly discrimination, rather than the traditional pixel-level difference, it can capture structural deviations more fundamentally and accurately distinguish non-structural interferences such as oil stains and reflections from real structural faults such as cracks and fractures, thereby improving the core discrimination ability of anomaly detection from the root.
[0030] (3) This application designs a manifold constraint training method for noise interference scenarios. By simulating unstructured interference noise such as oil stains, reflections, and water stains during the training phase, and using denoising and recovery constraints to construct a feature shrinkage vector field, the training logic of "noise disturbance sample → mapped back to normal manifold real structure fault → cannot be recovered → residual amplification" is realized. This allows the model to learn immunity to interference during the training phase; it greatly improves the robustness of the model under complex working conditions, effectively suppresses false alarms caused by common interferences such as reflection noise and water stain artifacts in TVDS systems, significantly reduces the false alarm rate on site, and is more suitable for the actual detection needs of railway passenger cars in all weather and multiple working conditions.
[0031] (4) This application proposes an anomaly scoring and localization strategy based on Top-K continuity consistency. By selecting the set of pixels in the Top-K continuous region with the highest response in the anomaly heatmap for statistical analysis, the sensitivity to structural anomalies with spatial continuity, such as real cracks and fractures, is enhanced, ensuring that the fault area can be accurately identified and located. It effectively suppresses the interference of isolated high-brightness pseudo-anomalies such as metal reflection and sensor noise, avoids the defect that traditional maximum value scoring is easily misled by isolated noise, and further improves the robustness of anomaly scoring and the accuracy of fault localization. Attached Figure Description
[0032] Figure 1This is a flowchart of a method according to one embodiment of this application. Detailed Implementation
[0033] To enable those skilled in the art to better understand the present application, the technical solution of the present application will be further described in detail below with reference to the embodiments and accompanying drawings.
[0034] It should be noted that the terms "comprising" and "having" and any variations thereof in this application are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or units is not necessarily limited to those steps or units that are explicitly listed, but may include other steps or units that are not explicitly listed or that are inherent to such process, method, product, or device.
[0035] In this embodiment of the disclosure, the character " / " indicates that the objects before and after it are in an "or" relationship. For example, A / B means: A or B.
[0036] The term "and / or" describes an association between objects, indicating that three relationships can exist. For example, A and / or B means: A or B, or A and B.
[0037] This application proposes a fault detection method and system for passenger car components based on hierarchical feature denoising and reconstruction, used for fault identification and anomaly localization of the running gear and key components of railway passenger cars. Unlike the traditional discriminative paradigm that models anomaly detection as a "fault / non-fault binary classification" relying on a large amount of manually labeled anomaly data, this application abandons the traditional binary classification discriminative paradigm and instead constructs an energy-based manifold projection mechanism, adopting a new paradigm of "feature manifold repair." By simulating environmental disturbances in a multi-scale feature space and forcing structural consistency reconstruction, it achieves robust filtering of unstructured noise and sensitive capture of structural anomalies (faults), aiming to solve the problem of false alarms of passenger car components under complex operating conditions and the problem of missed detection of multi-scale components.
[0038] Example 1: like Figure 1 As shown in the figure, this embodiment proposes a bus component fault detection method based on hierarchical feature denoising and reconstruction. The method mainly includes the following four parts: S1. Multi-scale feature extraction: In the anomaly detection scenario of railway passenger car running gear, anomaly patterns may manifest as overall structural deformation or as minute defects such as fine-grained cracks or missing bolts. To simultaneously characterize macroscopic semantic structure and local texture details, this application designs a multi-scale feature extraction mechanism.
[0039] Suppose the input image of the bus component is ,in They are respectively The height and width together define the spatial resolution of the image. This application will... Input pre-trained feature extraction network In order to construct a multi-scale feature space, this application uses feature maps from different levels of the feature extraction network: ; in, Indicates the first The original layer-level feature map is obtained from the first layer of the feature extraction network. A single-level feature map obtained by extracting each effective feature layer (residual block); ,in This is the number of the shallowest layer with effective features in the feature extraction network. This is the deepest layer numbered in the feature extraction network for valid features; In the feature extraction network, the first... Feature extraction mapping relationship of each effective feature layer; The multi-scale feature set extracted from the feature extraction network can be represented as: .
[0040] By fusing information at different levels, the model can simultaneously express micro-cracks and macro-structural anomalies in the same feature space, thereby improving its adaptability and generalization to complex component systems.
[0041] In this implementation, the feature extraction network can be any mainstream feature extraction network such as ResNet, VGG, MobileNet, or EfficientNet. For example, for the ResNet-50 backbone network, [the following is taken...] , The multi-scale feature set can be represented as: .
[0042] S2, Hierarchical Context Enhancement: Existing technologies typically directly concatenate features from different levels, ignoring the semantic gap between levels. This application designs a hierarchical context enhancement mechanism to construct a scale-invariant manifold embedding space. Through top-down semantic injection and bottom-up detail feedback, this mechanism can eliminate the differences in feature distribution across different levels, providing an isotropic, high-quality feature base for subsequent denoising adapters and ensuring that the denoising task does not produce alignment false alarms due to scale bias.
[0043] Top-down semantic injection: Deep features are upsampled and then fused with shallow features, giving the shallow features global context awareness. The calculation formula is as follows: ; ; in, Indicates the first Layer-by-layer top-down semantic injection fusion feature map, for After 1×1 convolution operation The feature map obtained after adjusting the number of channels is the starting feature for top-down semantic injection; for After 1×1 convolution operation and with Feature maps fused after upsampling -1; This indicates a bilinear interpolation upsampling operation. Used to adjust the number of channels.
[0044] Bottom-up detail feedback: The fused features are downsampled again and fed back to the deeper layers to ensure that subtle fault details are not lost in the deeper features. The calculation formula is as follows: ; ; in, Indicates the first Layer-based bidirectional fusion of scale-aligned semantically enhanced feature maps. Indicates the first Layer-based bidirectional fusion of scale-aligned semantically enhanced feature maps. , This indicates convolutional downsampling with a stride of 2.
[0045] Feature aggregation: After processing by the Hierarchical Context Enhancement (HCE) module, a set of scale-aligned features with bidirectional semantic and detail enhancements is obtained. .
[0046] These feature maps are flattened in the spatial dimension and concatenated along the channel dimension to obtain the final aggregated feature vector set. ,in This represents the total number of aggregated feature vectors. For the first Aggregated feature vectors at each position, for The sum of the number of channels.
[0047] S3, manifold projection learning: Unlike traditional unsupervised learning models that train discriminators to distinguish between "normal" and "noise," this application reconstructs unsupervised anomaly detection as a multi-scale, structurally consistent manifold modeling problem. Utilizing the principle that a denoising task forces the model to learn the manifold distribution of normal data, a manifold projection operator (denoising adapter) is designed to distinguish anomalies by restoring "damaged features" to "normal features."
[0048] During the training phase, manifold perturbation simulation is performed on the aggregated feature vectors in the aggregated feature vector set corresponding to the training samples of passenger car component images. This is because train components are often covered in oil and dust, which manifest as random shifts from the normal manifold center in the feature space. This strategy simulates manifold perturbation by adding manifold perturbation to the aggregated feature vectors corresponding to the training samples of normal passenger car component images. Inject Gaussian noise This simulates feature drift of components under non-ideal operating conditions, forcing the model to learn deep topological stability instead of relying on shallow pixel consistency. The expression is: ; in, This is the perturbation dynamic feature vector after noise injection. This is an aggregated feature vector (pure and undisturbed). It is Gaussian noise with a mean of 0 and a variance of . The Gaussian distribution, i.e. , This is the noise intensity hyperparameter. This process pushes normal feature points away from the low-dimensional manifold they reside in.
[0049] Manifold projection processing: This application designs a lightweight multilayer perceptron (MLP) as a manifold projection operator. This manifold projection operator contains only a simple projection layer, a bottleneck layer, and a reconstruction layer. By utilizing the bottleneck structure to forcibly filter out high-frequency random disturbances, it retains only the feature components that conform to the rigid structural constraints of the bus components, thus realizing the mapping from "disturbance state" to "steady state".
[0050] During the training phase, the specific process of the manifold projection processing is as follows: The perturbed dynamic feature vector... enter The repaired feature vector is obtained. The expression is: ; in, The repaired feature vector; It is a manifold projection operator, i.e., a lightweight MLP; The weight matrix and bias vector of the first layer of a lightweight MLP are used to perturb the dynamic feature vector. Compressed into a low-dimensional manifold space, filtering high-frequency random disturbances (oil / dust). These are the weight matrix and bias vector for the second layer of a lightweight MLP, used to restore the compressed low-dimensional features back to the original feature space; This is the ReLU activation function.
[0051] During the training phase, the bus component images used as training samples are processed as described above to obtain the corresponding repaired feature vectors. Based on structural consistency constraints, mean squared error is used as the loss function. The aim is to train the manifold projection operator (backpropagation update) and optimize its parameters by minimizing the distance between the repaired features corresponding to the training bus component images and the original aggregated feature vectors.
[0052] ; in, The overall training loss function is the mean squared error (MSE). The training samples for bus component images The original aggregated feature vector at each position, The training samples for bus component images The repaired feature vector at each position, The square of the L2 norm; The loss function essentially establishes a convergent vector field in the feature space. For normal samples that conform to physical laws, this vector field pulls them toward the center of the manifold; however, for physical structural changes such as cracks and fractures, since they are in the blind zone or repulsive zone of this "vector field" of the manifold, the denoising adapter cannot complete the mapping, thus achieving accurate alarm through high reconstruction error.
[0053] Training continues until the loss function converges, yielding the trained manifold projection operator, i.e., the parameter-optimized lightweight multilayer perceptron. This lightweight multilayer perceptron The aggregated feature vector corresponding to the bus component image to be detected during the inference phase. Perform manifold projection processing.
[0054] During the inference phase, the specific process of the manifold projection processing is as follows: the image of the bus component to be detected is subjected to multi-scale feature extraction and hierarchical context enhancement to obtain the corresponding aggregated feature vector. Then input it. The repaired feature vector is obtained. The expression is: .
[0055] Thus, manifold projection learning based on interference immunity is realized.
[0056] S4. Anomaly Scoring Location: To address the high-frequency outlier noise problem caused by high light reflection on the surface of railway metal workpieces, traditional max-pooling strategies are prone to triggering false alarms. This application proposes a Top-K spatial consistency scoring strategy, which... The ensemble mean statistics effectively smooth out sensor noise and significantly improve the detection signal-to-noise ratio under complex lighting conditions.
[0057] S4.1 Generation of Anomaly Score Map (Feature Consistency Map): For the input bus component image, the anomaly score map is obtained by calculating the pointwise Euclidean distance between its original aggregated feature vector and the repaired feature vector. : ; in, Anomaly score graph The Middle Abnormal score values for each position.
[0058] Will By reshaping and upsampling to the same resolution as the input bus component image, a visualized anomaly heatmap can be obtained.
[0059] S4.2 Top-K Robust Scoring Strategy: To address the issue of isolated high-resolution noise points easily generated by surface reflections on railway metal components, this application does not employ traditional max-pooling. Definition for The largest median value A set of locations (pixels). Before calculation The average of the individual anomaly scores is used as the anomaly score for the entire graph. : ; The Top-K mean is high only when the abnormal region has a certain area and is continuous; while sporadic flash noise will be suppressed by the averaging effect, thus significantly reducing the false alarm rate.
[0060] Through the above four parts, this application achieves high-precision and interference-resistant anomaly detection of key components of buses without relying on fault samples.
[0061] This application has achieved significant breakthroughs in the accuracy of micro-fault localization and anti-interference robustness by constructing a hierarchical context feature extraction mechanism, innovatively adopting the "feature manifold repair" paradigm and introducing the Top-K scoring strategy.
[0062] To verify the effectiveness of this application, a comparative experiment was conducted, and the relevant data are as follows.
[0063] Validation dataset: The MVTecAD dataset is used. This dataset is a standard benchmark dataset in the field of industrial image anomaly detection. It contains texture and structural component images in various industrial scenarios, covering scenes that are highly similar to railway passenger car components, such as wood grain, fabric, metal zippers, and mesh structures. The test results have industry recognition and practical engineering reference value.
[0064] Comparison Techniques: Benchmark techniques from different stages in the field of anomaly detection were selected, all of which were the current state-of-the-art (SOTA) methods proposed at the corresponding top conferences (CVPR / ICPR) to ensure the authority and objectivity of the comparison. SimpleNet: CVPR 2023 SOTA, representing the latest technological level in the field of anomaly detection; PatchCore: CVPR 2022 SOTA, is a classic method widely used in industrial anomaly detection; PaDiM: ICPR 2021 SOTA, excelling in anomaly detection for textured parts.
[0065] Evaluation metric: P-AUROC (Pixel-Area Under the Receiver Operating Characteristic curve) is used. This metric is the core evaluation standard for pixel-level localization accuracy in industrial image anomaly detection. The value ranges from 0 to 100%. The higher the value, the more accurate the model is in pixel-level localization of the anomaly area and the higher the sensitivity of anomaly identification.
[0066] The specific technical effects of this application are as follows, as can be seen from the comparison: 1. Achieves optimal accuracy in locating minute faults against complex texture backgrounds.
[0067] For common wooden, fabric, and mesh components in railway passenger cars, existing technologies often suffer from blurry positioning due to difficulties in texture alignment. This application achieves a comprehensive improvement over existing technologies in pixel-level positioning accuracy through hierarchical context enhancement and denoising reconstruction. Specific verification results are as follows: In the wood grain category: the P-AUROC of this application reaches 95.5%, which is superior to SimpleNet's 94.5%, PatchCore's (95.0%), and PaDiM's (94.9%). This proves that the present invention can effectively overcome the texture interference of complex wood grains and more accurately separate minute defects (such as small cracks and scratches in the wood grain) from dense and irregular texture backgrounds, solving the problem of difficult localization of minute faults in wooden components of railway passenger cars.
[0068] In the fabric / carpet category: the P-AUROC of this application reaches 99.0%, which is significantly better than the 98.2% of the prior art SimpleNet. This category belongs to the periodic texture background. The high index of this invention proves that it has a strong learning and discrimination ability for regular and repetitive texture features, and can accurately identify tiny texture breaks and defects in periodic textures, verifying the high sensitivity of the solution in the inspection of fabric components of railway passenger cars.
[0069] 2. Significantly enhanced robustness in detecting metallic reflectivity and structural components.
[0070] In response to the reflective nature and complex structure of railway metal components, the Top-K scoring strategy proposed in this application effectively suppresses interference and improves the accuracy of locating structural anomalies. Specific verification results are as follows: In the zipper category: the P-AUROC of this application reaches 99.2%, which is better than SimpleNet and PatchCore's 98.8%. Zippers are typical reflective metal parts, and their reflective characteristics are highly similar to those of metal parts such as railway passenger car brake discs and wheel axles. This result directly proves that the present invention has a very strong ability to resist interference from metal reflections, which can effectively avoid misjudging metal reflections as faults and significantly reduce the false alarm rate in actual detection.
[0071] In the grid category: the P-AUROC of this application reaches 99.0%, which is better than PatchCore's 98.8% and SimpleNet's 98.7%. Grids are typical fine structural components, corresponding to grid-like suspension components and frame structures in railway passenger cars. This result proves that the present invention has a stronger ability to capture fractures in fine structures and can accurately identify structural anomalies such as tiny gaps, fractures, and deformations in structural components, thus solving the problem of missed detection of tiny faults in fine structural components in the prior art.
[0072] It should be understood that the numbers S1 to S4 above are only used to distinguish and facilitate the expression of different steps, and do not necessarily constitute a restriction on the execution order between the steps.
[0073] Example 2: This embodiment provides a bus component fault detection system based on hierarchical feature denoising and reconstruction, including: The multi-scale feature extraction module is used to input the input bus component image into the pre-trained feature extraction network, extract the multi-layer original hierarchical feature maps of the effective feature layers in the network, and construct a multi-scale feature set; The hierarchical context enhancement module is used to sequentially perform bidirectional fusion processing of top-down semantic injection and bottom-up detail feedback on the multi-level original hierarchical feature maps in the multi-scale feature set to obtain a feature set with scale alignment and bidirectional semantic and detail enhancement. The feature set is then aggregated to obtain an aggregated feature vector set. The manifold projection processing module is used to perform manifold projection processing on the aggregated feature vectors in the aggregated feature vector set to obtain the repaired feature vectors. The anomaly scoring and localization module is used to obtain an anomaly score map from an input bus component image by calculating the pointwise Euclidean distance between its original aggregated feature vector and the repaired feature vector; generate an anomaly heatmap based on the anomaly score map; and calculate the maximum value on the anomaly score map. The average of the individual anomaly scores is used as the anomaly score for the entire image, thereby enabling fault detection of bus components; among which, Use the default value.
[0074] Example 3: This embodiment provides an electronic device, including: a memory and a processor; The memory is used to store computer programs; The processor is configured to invoke the computer program to execute the method as described in Embodiment 1.
[0075] Example 4: This embodiment provides a computer-readable storage medium storing a computer program. When the computer program is run on an electronic device, it causes the electronic device to perform the method described in Embodiment 1.
[0076] Example 5: This embodiment provides a computer program product, including a computer program that, when run on an electronic device, causes the electronic device to perform the method described in Embodiment 1.
[0077] The specific implementation of the system, electronic device, computer-readable storage medium, and computer program product provided in this application can be referred to the specific embodiments of the above methods, and will not be repeated here.
[0078] Obviously, those skilled in the art should understand that the various units or steps of this application described above can be implemented using general-purpose computing devices. They can be centralized on a single computing device or distributed across a network of multiple computing devices. Optionally, they can be implemented using computer-executable program code, thereby storing them in a storage device for execution by a computing device, or fabricating them separately as individual integrated circuit modules, or fabricating multiple modules or steps into a single integrated circuit module. Thus, this application is not limited to any particular combination of hardware and software.
[0079] The above description is merely a preferred embodiment of this application and is not intended to limit this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.
Claims
1. A method for fault detection of bus components based on hierarchical feature denoising and reconstruction, characterized in that, Includes the following steps: S1. Multi-scale feature extraction: Input the input bus component image into the pre-trained feature extraction network, extract the multi-layer original hierarchical feature maps of the effective feature layers in the network, and construct a multi-scale feature set; S2, Hierarchical Context Enhancement: The multi-level original hierarchical feature maps in the multi-scale feature set are sequentially subjected to bidirectional fusion processing of top-down semantic injection and bottom-up detail feedback to obtain a feature set with scale alignment and bidirectional semantic and detail enhancement. The feature set is then aggregated to obtain an aggregated feature vector set. S3. Manifold projection learning: Perform manifold projection processing on the aggregated feature vectors in the aggregated feature vector set to obtain the repaired feature vectors; S4. Anomaly Scoring and Localization: For the input bus component image, an anomaly score map is obtained by calculating the point-by-point Euclidean distance between its original aggregated feature vector and the repaired feature vector; an anomaly heatmap is obtained based on the anomaly score map; the maximum value on the anomaly score map is calculated. The average of the individual anomaly scores is used as the anomaly score for the entire image, thereby enabling fault detection of bus components; among which, Use the default value.
2. The method according to claim 1, characterized in that, In step S1, the input bus component image is , They are respectively The height and width; the multi-layer original hierarchical feature map satisfies , ,in Indicates the first Original layer feature map, This represents the feature extraction mapping relationship for the i-th effective feature layer in the feature extraction network. This is the number of the shallowest layer with effective features in the feature extraction network. The deepest layer of the effective feature extraction network is numbered; the multi-scale feature set is... .
3. The method according to claim 2, characterized in that, The feature extraction network is a ResNet-50 network. , The multi-scale feature set is .
4. The method according to claim 1, characterized in that, In S2, the specific process of top-down semantic injection is as follows: Feature map of the deepest original layer Perform a 1×1 convolution operation to obtain the top-down semantic injection fusion feature map of layer D. ; For the original layer feature map of layer i Perform a 1×1 convolution operation and fuse it with the top-down semantic injection feature map of the (i+1)th layer. The feature maps upsampled by bilinear interpolation are summed element by element to obtain the top-down semantic injection fusion feature map of the i-th layer. , ; The specific process of the bottom-up detailed feedback is as follows: top-down semantic injection fusion feature map of the shallowest layer Perform a 3×3 convolution operation to obtain the S-th layer bidirectional fused scale-aligned semantic enhancement feature map. ; Top-down semantic injection fusion feature map of layer i Perform a 3×3 convolution operation and fuse it with the i-1th layer bidirectional scale-aligned semantic enhancement feature map. The feature maps downsampled by convolution with a stride of 2 are summed element-wise to obtain the i-th layer bidirectional fusion scale-aligned semantic enhancement feature map. , ; The scale-aligned feature set with bidirectional semantic and detail enhancement is: The feature set is flattened in the spatial dimension and concatenated along the channel dimension to obtain the aggregated feature vector set. ,in This represents the total number of aggregated feature vectors. For the first Aggregated feature vectors at each position, It is the sum of the number of channels of the feature maps in the feature set.
5. The method according to claim 1, characterized in that, During the training phase, S3 further includes performing manifold perturbation simulation on the aggregated feature vectors in the aggregated feature vector set corresponding to the training samples of the bus component images; the specific process of the manifold perturbation simulation is as follows: [The manifold perturbation simulation is then performed on the aggregated feature vectors...] Inject Gaussian noise The perturbation dynamic feature vector is obtained. The expression is: ,in Follows a mean of 0 and a variance of Gaussian distribution, This is the noise intensity hyperparameter.
6. The method according to claim 5, characterized in that, In step S3, the manifold projection operator for manifold projection processing is a lightweight multilayer perceptron. ; During the training phase, the specific process of the manifold projection processing is as follows: The perturbed dynamic feature vector... enter The repaired feature vector is obtained. ; During the inference phase, the specific process of the manifold projection processing is as follows: The aggregated feature vectors are... enter The repaired feature vector is obtained. .
7. The method according to claim 6, characterized in that, In step S3, during the training phase, based on structural consistency constraints, mean squared error is used as the loss function. For training samples of bus component images, the distance between the corresponding repaired feature vector and the original aggregated feature vector is minimized. The loss function expression is as follows: ; in, For the overall training loss function, The first training sample for bus component images The original aggregated feature vector at each position, The first training sample for bus component images The repaired feature vector at each position, The square of the L2 norm; A lightweight multilayer perceptron is obtained by training until the loss function converges. .
8. The method according to claim 1, characterized in that, In step S4, the specific process of generating the anomaly score map is as follows: calculating the original aggregated feature vector. With the eigenvectors repaired by the manifold projection operator The pointwise Euclidean distance is used to obtain the anomaly score map. The expression is: ;in Anomaly score graph The Middle Abnormal score values for each position.
9. The method according to claim 8, characterized in that, In S4, the anomaly score of the entire image The calculation formula is: ; in, The top value in the anomaly score graph A set of locations.
10. A bus component fault detection system based on hierarchical feature denoising and reconstruction, characterized in that, include: The multi-scale feature extraction module is used to input the input bus component image into the pre-trained feature extraction network, extract the multi-layer original hierarchical feature maps of the effective feature layers in the network, and construct a multi-scale feature set; The hierarchical context enhancement module is used to sequentially perform bidirectional fusion processing of top-down semantic injection and bottom-up detail feedback on the multi-level original hierarchical feature maps in the multi-scale feature set to obtain a feature set with scale alignment and bidirectional semantic and detail enhancement. The feature set is then aggregated to obtain an aggregated feature vector set. The manifold projection processing module is used to perform manifold projection processing on the aggregated feature vectors in the aggregated feature vector set to obtain the repaired feature vectors. The anomaly scoring and localization module is used to obtain an anomaly score map from an input bus component image by calculating the pointwise Euclidean distance between its original aggregated feature vector and the repaired feature vector; generate an anomaly heatmap based on the anomaly score map; and calculate the maximum value on the anomaly score map. The average of the individual anomaly scores is used as the anomaly score for the entire image, thereby enabling fault detection of bus components; among which, Use the default value.
Citation Information
Patent Citations
Segmentation-based multi-scale feature pyramid text detection method
CN111461114A
Early fault detection method based on Wasserstein distance
CN114722888A
Abnormality detection method and device based on neighborhood perception and characteristic distillation
CN118887413A
Mixed-flow water turbine runner surface cavitation point detection method and system
CN121481962A
Skin image abnormal region detection method based on convolutional neural network
CN121746354A