Real-time detection method and system for crane track seam
By introducing the activation consistency index and background disturbance sensitivity evaluation mechanism, and combining Gaussian process regression and spatial attention mechanism to optimize the convolutional neural network, the problem of reduced recognition ability of the model due to background changes is solved, and the robustness and reliability of crane rail joint detection are improved.
Patent Information
- Application Number
- CN202510824752.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-19
- Publication Date
- 2025-09-26
- Estimated Expiration
- 2045-06-19
AI Technical Summary
Convolutional neural network models are prone to reduced recognition ability due to background changes in crane rail joint detection, resulting in misjudgment and poor generalization ability, which increases deployment costs and reduces system reliability.
By introducing a dual-index evaluation mechanism of activation consistency index and background perturbation sensitivity, the background dependence of the CNN model is quantified. The recognition accuracy of the model in new environments is predicted through Gaussian process regression. The spatial attention mechanism and consistency loss function are combined for adaptive optimization to construct a closed-loop mechanism of evaluation-prediction-optimization.
The model's robustness and generalization ability under variable track surface conditions have been significantly improved, the risk of misjudgment and repeated training costs caused by background migration have been reduced, and the intelligence and stability of the crane track joint detection system have been improved.
Smart Images

Figure CN120707828A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of cranes, and in particular to a real-time detection method and system for crane rail joints. Background Art
[0002] Real-time crane track joint detection uses sensors, image recognition, or other detection technologies to continuously monitor the joints on crane tracks online. This technology collects and analyzes data in real time to determine if any joint anomalies (such as misalignment, wear, or cracks) are present. This allows for timely identification of safety hazards and ensures stable crane operation and safe operations. This technology can significantly improve maintenance efficiency and reduce manual inspection costs.
[0003] The existing technology has the following shortcomings: In crane rail joint detection, convolutional neural network (CNN) models are prone to learning non-essential correlations between background texture and cracks during training, creating a background-driven artifact. This means the model overly relies on background features in the training images for judgment. As a result, in real-world applications, if the track background changes (for example, with black anti-corrosion coating or different surface materials), the model's recognition ability significantly decreases, and it can even misidentify normal areas as cracks. This problem results in poor model generalization and unstable performance when transferred to new environments. In severe cases, data collection and model training are required, increasing deployment costs and reducing system reliability. Summary of the Invention
[0004] The purpose of the present invention is to provide a real-time detection method and system for crane rail joints to address the shortcomings of the background technology.
[0005] In order to achieve the above object, the present invention provides the following technical solution: a real-time detection method for crane rail joints, comprising: Acquire joint image samples under various track surface conditions, preprocess the images, and extract the joint area as the region of interest; A convolutional neural network model is used to train and recognize seam images. The activation consistency index is used to measure the model's activation response to the same seam region under different backgrounds, and the activation consistency index is used to reflect the background perturbation sensitivity of the recognition output to background changes when the model is fixed in the seam region. The activation consistency index and background perturbation sensitivity are weightedly fused to calculate the background dependence index. The CNN model is divided into high-dependence and low-dependence categories according to the background dependence index. For CNN models with high dependency, the recognition accuracy of the CNN model under new background conditions is predicted based on the feature distribution under different track background conditions. The recognition accuracy prediction results are combined with the background dependency index to improve the CNN model.
[0006] Preferably, acquiring image samples and extracting regions of interest include: Image samples covering various track surface conditions are collected, including standard rail surface, black anti-corrosion coated rail surface, rusted rail, wet or wet surface, oily or dust-covered rail surface, and rail surface with different manufacturer treatment materials. Template matching, edge line detection, or a lightweight CNN model are used to extract the joint area as the region of interest.
[0007] Preferably, activate the consistency index The extraction method is as follows: select a fixed seam image content and embed it into multiple different backgrounds to form a test group; input each test image into the CNN model; select an intermediate convolution layer; extract its feature map and generate a heat map; calculate the structural similarity between the activation heat maps generated under different backgrounds and the heat map under the reference background; set is the similarity between the activation map under the i-th background image and the reference image, taking the average value, the expression is: ; where n is the number of background transformation samples.
[0008] Preferably, the background disturbance sensitivity BPS extraction method is: let the seam image be input , where d=H×W×C, namely height, width, and channel; R is a set of real numbers; Divide the image into xs seam area; xb background area; baseline image x′: set the background part to a constant value, and keep the seam area consistent with x; perform linear interpolation on the background part: ; For each background pixel dimension i∈xb, calculate its integrated gradient , the expression is: ; Where F(x) is the output of the CNN model; is the gradient of the model output for pixel i, To interpolate the image, the sum of the absolute values of the integrated gradients of all pixels in the background area is calculated as the background disturbance sensitivity.
[0009] Preferably, the activation consistency index and the background disturbance sensitivity are weightedly fused to calculate the background dependence index, which specifically includes: The activation consistency index and background perturbation sensitivity are de-dimensionalized and normalized so that they are both between [0, 1]. The background dependence index is obtained by weighted summation of the normalized activation consistency index and background perturbation sensitivity.
[0010] Preferably, the CNN model is divided into a high-dependence category and a low-dependence category according to the background dependence index, including: comparing the obtained background dependence index with a preset threshold, if the background dependence index is greater than or equal to the preset threshold, the CNN model is divided into a high-dependence category; if the background dependence index is less than the preset threshold, the CNN model is divided into a low-dependence category.
[0011] Preferably, predicting the recognition accuracy of the CNN model under new background conditions specifically includes: Establish a dataset of the actual recognition accuracy of the CNN model under historical background conditions: ;in: represents the feature vector under the i-th background condition; is the accuracy obtained from the actual test under this background, and N is the total number of features; The radial basis function is used to calculate the similarity between any two backgrounds. The expression is: ; Where: l is the length scale hyperparameter. For new background features, GPR is used to predict the corresponding accuracy, that is, the recognition accuracy index RAI, which is expressed as: ; Where: K represents the kernel matrix between training samples, represents the transpose of the kernel similarity vector between the new sample and the training sample, and A is the accuracy in the training set; is the noise term; RAI∈[0,1] is the predicted recognition accuracy index; If the predicted recognition accuracy index is less than the accuracy threshold, an early warning is issued or the model is switched to a low background dependence model.
[0012] Preferably, for the target CNN model, the joint index is obtained based on the calculated background dependence index BDI and recognition accuracy index RAI: If the Risk Score exceeds 0.6, the model performance is unstable and improvement steps need to be performed. Fixed seam area, construct multiple image pairs with the same structure and different backgrounds ( , ); Use the spatial attention mechanism to guide the model to focus on the seam area; Calculate the attention map α(x) during training, and add a background invariance loss term for background interference image pairs The goal is to make the model and The prediction results remain consistent: ; For the model image Output; For the model image Output; Redefine the final training loss: ;in: represents the standard cross entropy classification loss; represents the attention weight; β is the adjustment coefficient.
[0013] The present invention also provides a crane rail joint real-time detection system, which includes an image acquisition and preprocessing module, a CNN model training and evaluation module, a model background dependency analysis module, a background adaptability prediction module, and an adaptive optimization training module; Image acquisition and preprocessing module: obtains joint image samples under various track surface conditions, preprocesses the images, and extracts the joint area as the region of interest; CNN model training and evaluation module: This module uses a convolutional neural network model to train and identify seam images. It also extracts an activation consistency index, which measures the model's activation response to the same seam region under different backgrounds, and an activation consistency index, which reflects the sensitivity of the model to background perturbations in the recognition output when the seam region is fixed. Model background dependency analysis module: This module performs weighted fusion of the activation consistency index and background perturbation sensitivity to calculate the background dependency index. Based on the background dependency index, the CNN model is divided into high-dependence and low-dependence categories. Background Adaptability Prediction Module: For CNN models with high dependency categories, the module predicts the recognition accuracy of the CNN model under new background conditions based on the feature distribution under different track background conditions. Adaptive optimization training module: combines the recognition accuracy prediction results with the background dependency index to improve the CNN model.
[0014] In the above technical solution, the technical effects and advantages provided by the present invention are: 1. This paper introduces a dual-metric evaluation mechanism, namely the activation consistency index and background perturbation sensitivity, to quantify the background dependence of CNN models under different orbital background conditions for the first time. The background dependence index is then used to categorize models as high or low-dependence, addressing the "background-driven artifact" problem often caused by traditional CNNs learning non-essential background features during training. Furthermore, by combining background features such as texture, brightness, and color from track images, and using Gaussian process regression (GPR) to predict the model's recognition accuracy index (RAI) in new environments, this method enables pre-deployment accuracy estimation and adaptability assessment, significantly improving the model's robustness and generalization capabilities under variable track surface conditions.
[0015] 2. This invention integrates a spatial attention mechanism with a consistency loss function to construct image pairs with identical joint structures but perturbed backgrounds. It also introduces an adversarial training strategy, guiding the model to focus on joint regions and reducing its reliance on background, enabling adaptive optimization of the CNN model in high-risk background scenarios. The overall system establishes a closed-loop mechanism of evaluation, prediction, and optimization, effectively reducing the risk of misjudgment and repeated training costs caused by background shifts, and improving the intelligence, stability, and reliability of the crane rail joint detection system in real-world engineering environments. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments described in the present invention. For ordinary technicians in this field, other drawings can also be obtained based on these drawings.
[0017] Figure 1 This is a mind map of the method of the present invention.
[0018] Figure 2 This is a mind map of the system modules of the present invention. DETAILED DESCRIPTION
[0019] To make the objectives, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.
[0020] Example 1, please refer to Figure 1 As shown, the crane rail joint real-time detection method described in this embodiment includes: Acquire joint image samples under various track surface conditions, preprocess the images, and extract the joint area as the region of interest; A convolutional neural network model is used to train and recognize seam images. The activation consistency index is used to measure the model's activation response to the same seam region under different backgrounds, and the activation consistency index is used to reflect the background perturbation sensitivity of the recognition output to background changes when the model is fixed in the seam region. The activation consistency index and background perturbation sensitivity are weightedly fused to calculate the background dependence index. The CNN model is divided into high-dependence and low-dependence categories according to the background dependence index. For CNN models with high dependency, the recognition accuracy of the CNN model under new background conditions is predicted based on the feature distribution under different track background conditions. The recognition accuracy prediction results are combined with the background dependency index to improve the CNN model.
[0021] To improve the model's adaptability to complex real-world environments, image samples should cover the following track surface conditions: standard rail surfaces (conventionally polished or plainly oxidized); black anti-corrosion coated rail surfaces (matte, irregularly textured, and low reflectivity); corroded rail surfaces (uneven oxide layer with impurities and rust spots); wet or wet surfaces (reflections, light spots, or fluid interference); oily or dust-covered rail surfaces (severely contaminated background textures); and manufacturer-differentiated surfaces (varying materials and coating processes). Sampling should ensure that each of these types includes images under multiple lighting conditions and time periods (morning, evening, cloudy, sunny, backlit, etc.) to cover real-world operating conditions.
[0022] An industrial-grade high-definition camera (resolution not less than 1080p) is used to support low-light imaging. It is installed on the crane wheel frame or guide wheel to achieve on-the-go sampling. It is equipped with a controllable LED fill light that supports synchronized flash to avoid the influence of natural light. The frame rate control is recommended to be ≥30fps to avoid missing dynamic information of the seam. The image is transmitted to the edge server or storage card in real time and archived by timestamp and track number.
[0023] Scale images to the model input size (e.g., 224×224 or 416×416 pixels); convert to a standard image format (e.g., PNG, JPG, BMP); and convert RGB images to grayscale (if color features are not relied upon) to reduce data dimensionality and enhance structural features. Use median filtering or bilateral filtering to eliminate random noise in background textures; brightness / contrast balance: use the adaptive histogram equalization (CLAHE) algorithm to enhance local image contrast, making cracks or misaligned edges more obvious; perform perspective transformation correction on geometrically distorted images caused by fisheye lenses or oblique angles to ensure that seams are displayed in normal proportions.
[0024] During the joint region (ROI) extraction phase, the following methods can be used to locate the track joint region: Method 1: Based on template matching: Establish a standard track joint template; perform template matching on the captured image and calculate the similar area; intercept the matching area as the ROI.
[0025] Method 2: Positioning based on structural features: Use Hough transform to detect the edge straight lines of the track; extract the seam area based on the position between the parallel lines of the two tracks; extract a fixed height area, such as ±10 pixels from the center of the track as the ROI.
[0026] Method 3: Deep learning pre-positioning: Use a lightweight CNN model (such as MobileNet) for fast detection; roughly locate the seam position in the image and output the target bounding box; crop the target box area and input it as the final ROI into the subsequent recognition model.
[0027] All extracted ROI regions are of uniform size (e.g., 128×128 pixels); grayscale contrast enhancement and edge sharpening (e.g., Laplacian enhancement) are performed on the ROI regions; and metadata (shooting time, track number, acquisition environment) is bound to each ROI image for model training.
[0028] All ROI images are manually or semi-automatically annotated with their status labels (normal, cracked, misaligned, worn, etc.); they are classified and stored according to the track surface type to form a structured dataset for model training and evaluation.
[0029] A convolutional neural network model is used to train and recognize seam images. The activation consistency index is used to measure the model's activation response to the same seam region under different backgrounds, as well as to reflect the background perturbation sensitivity of the recognition output to background changes when the seam region is fixed. Specifically, the following indicators are used: Select a standard CNN model with image classification or defect detection capabilities, such as ResNet and EfficientNet (primarily for classification); YOLOv5 and Faster R-CNN (primarily for object detection); input: track joint image or its ROI area; output: category labels such as crack / misalignment / wear / normal, or positioning boxes with confidence.
[0030] The image samples cover different track background conditions (refer to the acquisition plan in the previous answer); each seam area image is used as a training sample, and its defect type is labeled; data augmentation (rotation, cropping, brightness perturbation, etc.) can be used to improve generalization ability.
[0031] Use the cross-entropy loss function or the multi-class objective loss function; use a GPU for accelerated training, record the model accuracy and loss convergence during the training process; retain the trained model parameters for subsequent activation analysis.
[0032] The activation consistency index (ACI) is used to measure whether the response of the convolutional layer of the CNN model is stable in the same seam area and different background conditions, reflecting whether the model focuses on structural features rather than background features.
[0033] The extraction method is: A fixed seam image content is selected and embedded into multiple different backgrounds (such as coating differences and texture differences) to form a test group; the position and size of the seam image are kept consistent, and only the background changes.
[0034] Input each test image into the CNN model; select an intermediate convolutional layer (such as Layer 3 of ResNet); extract the feature maps (Feature Maps) of this layer, and use Grad-CAM or CAM-like methods to generate heat maps.
[0035] All heatmaps are normalized to make them comparable at the same scale; use a unified resolution (e.g. 224×224).
[0036] For the activation heatmaps generated under different backgrounds, perform structural similarity calculation (such as SSIM) or cosine similarity with the heatmap under the reference background; set up is the similarity between the activation map under the i-th background image and the reference image, taking the average value, the expression is: ; where n is the number of background transformation samples.
[0037] The higher the ACI, the more consistent the activation area of the model is under different backgrounds, focusing on the seam structure features and having low background dependence; the lower the ACI, the more affected the model is by the background and there is a risk of recognition bias.
[0038] Background perturbation sensitivity (BPS) is used to simulate different background perturbations when the seam area is fixed, and observe the degree of change in the confidence of the model recognition results to quantify the model's sensitivity to background changes.
[0039] The extraction method is: let the seam image be input , where d=H×W×C, namely height, width, and channel; R is a set of real numbers; Divide the image into two parts: xs: seam area (structural feature); xb: background area (non-structure part); Baseline image x′: Set the background part to a constant value (such as black or mean image), and keep the seam area consistent with x.
[0040] Perform linear interpolation on the background: ; That is, keep the seam unchanged and only let the background part gradually transition from the baseline to the original image.
[0041] For each background pixel dimension i∈xb, calculate its integrated gradient , the expression is: ; where F(x) is the output of the CNN model (usually the prediction confidence); is the gradient of the model output for pixel i, To interpolate the image, the background transitions linearly, and the sum of the absolute values of the integrated gradients of all pixels in the background area is calculated as the background disturbance sensitivity.
[0042] The activation consistency index and the background disturbance sensitivity are weightedly fused to calculate the background dependence index. The CNN model is divided into a high dependence category and a low dependence category according to the background dependence index, specifically including: The activation consistency index and background perturbation sensitivity are de-dimensionalized and normalized so that they are both between [0, 1]. The background dependence index is obtained by weighted summation of the normalized activation consistency index and background perturbation sensitivity.
[0043] The obtained background dependence index is compared with the preset threshold. If the background dependence index is greater than or equal to the preset threshold, the CNN model is classified as a high-dependence category; if the background dependence index is less than the preset threshold, the CNN model is classified as a low-dependence category.
[0044] For CNN models with high dependency, based on the feature distribution under different track background conditions, the recognition accuracy of the CNN model under new background conditions is predicted, including: For each track background image, the following structural and statistical features are extracted: : Background texture directional entropy (such as Gabor filter extraction); : Grayscale contrast or brightness mean (reflecting lighting conditions); : Texture roughness (such as local binary pattern LBP statistics); : color histogram mean (reflecting coating type); Establish a dataset of the actual recognition accuracy of the CNN model under historical background conditions: ;in: represents the feature vector under the i-th background condition; is the accuracy obtained from the actual test under this background, and N is the total number of features; The radial basis function (RBF kernel) is used to calculate the similarity between any two backgrounds. The expression is: ; Where: l is the length scale hyperparameter that controls the sensitivity of background differences; the kernel function is used to measure the similarity between background conditions.
[0045] For new background features, GPR is used to predict the corresponding accuracy, that is, the recognition accuracy index RAI, which is expressed as: ; Where: K represents the kernel matrix between training samples, represents the transpose of the kernel similarity vector between the new sample and the training sample, and A is the accuracy in the training set; is the noise term; RAI∈[0,1] is the predicted recognition accuracy index. If the predicted recognition accuracy index is less than the accuracy threshold (e.g., 0.80), a warning can be issued or the model can be switched to a low background dependency model.
[0046] For the target CNN model, the joint index is obtained based on the calculated background dependence index (BDI) and recognition accuracy index (RAI): ; Recommended weight setting: =0.6, =0.4; if the Risk Score exceeds the threshold (such as 0.6), it means that the model performance is unstable and improvement steps are required.
[0047] Fixed seam area, construct multiple image pairs with the same structure and different backgrounds ( , );ensure 、 The seam area is completely consistent, and the background area has statistical differences; image pairs are generated using image fusion, simulation or real acquisition methods.
[0048] Use a spatial attention mechanism (such as CBAM or SE) to guide the model to focus on the seam area; calculate the attention map α(x) during training and use it as a weighting factor in the subsequent loss function.
[0049] For background interference image pairs, add a background invariance loss term The goal is to make the model and The prediction results remain consistent: ; For the model image Output; For the model image Output; Redefine the final training loss: ;in: represents the standard cross entropy classification loss; represents the attention weight (high in the seam area and low in the background area); β is the adjustment coefficient that controls the strength of the decorrelation loss (β=0.3~0.5 is recommended); this loss function encourages the model to maintain consistent output under different backgrounds and prioritizes adjusting the response of areas with less attention (background).
[0050] Fine-tune the model using the above loss for several rounds. After each training cycle, re-evaluate the model's BDI and RAI. If the Risk Score decreases (for example, by more than 30%), stop fine-tuning and update the model version. Otherwise, continue constructing new perturbation image pairs and iterate the training.
[0051] Example 2, please refer to Figure 2As shown, the crane rail joint real-time detection system described in this embodiment includes an image acquisition and preprocessing module, a CNN model training and evaluation module, a model background dependency analysis module, a background adaptability prediction module, and an adaptive optimization training module; Image acquisition and preprocessing module: obtains joint image samples under various track surface conditions, preprocesses the images, and extracts the joint area as the region of interest; CNN model training and evaluation module: This module uses a convolutional neural network model to train and identify seam images. It also extracts an activation consistency index, which measures the model's activation response to the same seam region under different backgrounds, and an activation consistency index, which reflects the sensitivity of the model to background perturbations in the recognition output when the seam region is fixed. Model background dependency analysis module: This module performs weighted fusion of the activation consistency index and background perturbation sensitivity to calculate the background dependency index. Based on the background dependency index, the CNN model is divided into high-dependence and low-dependence categories. Background Adaptability Prediction Module: For CNN models with high dependency categories, the module predicts the recognition accuracy of the CNN model under new background conditions based on the feature distribution under different track background conditions. Adaptive optimization training module: combines the recognition accuracy prediction results with the background dependency index to improve the CNN model.
[0052] The above formulas are all dimensionless and numerical calculations. The formulas are obtained by collecting a large amount of data and performing software simulation to obtain the most recent real situation. The preset parameters in the formulas are set by technicians in this field according to actual conditions.
[0053] It should be understood that the term "and / or" as used herein simply describes a relationship between associated objects, indicating that three possible relationships exist. For example, "A and / or B" can represent: A alone, A and B together, or B alone. A and B can be singular or plural. Furthermore, the character " / " as used herein generally indicates an "or" relationship between the associated objects, but it may also indicate an "and / or" relationship. For specific understanding, please refer to the context.
[0054] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0055] The above is only a specific implementation method of the present application, but the scope of protection of the present application is not limited thereto. Any technician familiar with this technical field can easily think of changes or replacements within the technical scope disclosed in this application, which should be covered by the scope of protection of the present application.
Claims
1. A real-time detection method for crane rail joints, characterized by: include: Acquire joint image samples under various track surface conditions, preprocess the images, and extract the joint area as the region of interest; A convolutional neural network model is used to train and recognize seam images. The activation consistency index is used to measure the model's activation response to the same seam region under different backgrounds, and the activation consistency index is used to reflect the background perturbation sensitivity of the recognition output to background changes when the model is fixed in the seam region. The activation consistency index and background perturbation sensitivity are weightedly fused to calculate the background dependence index. The CNN model is divided into high-dependence and low-dependence categories according to the background dependence index. For CNN models with high dependency, the recognition accuracy of the CNN model under new background conditions is predicted based on the feature distribution under different track background conditions. The recognition accuracy prediction results are combined with the background dependency index to improve the CNN model.
2. A crane rail joint real-time detection method according to claim 1, characterized in that: The obtaining of image samples and extraction of regions of interest comprises: Image samples covering various track surface conditions are collected, including standard rail surface, black anti-corrosion coated rail surface, rusted rail, wet or wet surface, oily or dust-covered rail surface, and rail surface with different manufacturer treatment materials. Template matching, edge line detection, or a lightweight CNN model are used to extract the joint area as the region of interest.
3. The method for real-time detection of crane rail joints according to claim 1, characterized in that: Activation consistency index The extraction method is as follows: select a fixed seam image content and embed it into multiple different backgrounds to form a test group; input each test image into the CNN model; select an intermediate convolution layer; extract its feature map and generate a heat map; calculate the structural similarity between the activation heat maps generated under different backgrounds and the heat map under the reference background; set is the similarity between the activation map under the i-th background image and the reference image, taking the average value, the expression is: ; where n is the number of background transformation samples.
4. A crane rail joint real-time detection method according to claim 3, characterized in that: The extraction method of background disturbance sensitivity BPS is as follows: let the seam image be input , where d=H×W×C, namely height, width, and channel; R is a set of real numbers; Divide the image into xs seam area; xb background area; Baseline image x′: Set the background part to a constant value and keep the seam area consistent with x; perform linear interpolation on the background part: ; For each background pixel dimension i∈xb, calculate its integrated gradient , the expression is: ; Where F(x) is the output of the CNN model; is the gradient of the model output for pixel i, To interpolate the image, the sum of the absolute values of the integrated gradients of all pixels in the background area is calculated as the background disturbance sensitivity.
5. A crane rail joint real-time detection method according to claim 4, characterized in that: The activation consistency index and background disturbance sensitivity are weightedly integrated to calculate the background dependence index, which includes: The activation consistency index and background perturbation sensitivity are de-dimensionalized and normalized so that they are both between [0, 1]. The background dependence index is obtained by weighted summation of the normalized activation consistency index and background perturbation sensitivity.
6. The method for real-time detection of crane rail joints according to claim 5, characterized in that: The CNN model is divided into a high-dependence category and a low-dependence category according to the background dependence index, including: comparing the obtained background dependence index with a preset threshold; if the background dependence index is greater than or equal to the preset threshold, the CNN model is divided into a high-dependence category; if the background dependence index is less than the preset threshold, the CNN model is divided into a low-dependence category.
7. A crane rail joint real-time detection method according to claim 6, characterized in that: Predict the recognition accuracy of the CNN model under new background conditions, including: Establish a dataset of the actual recognition accuracy of the CNN model under historical background conditions: ;in: represents the feature vector under the i-th background condition; is the accuracy obtained from the actual test under this background, and N is the total number of features; The radial basis function is used to calculate the similarity between any two backgrounds. The expression is: ; Where: l is the length scale hyperparameter. For new background features, GPR is used to predict the corresponding accuracy, that is, the recognition accuracy index RAI, which is expressed as: ; Where: K represents the kernel matrix between training samples, represents the transpose of the kernel similarity vector between the new sample and the training sample, and A is the accuracy in the training set; is the noise term; RAI∈[0,1] is the predicted recognition accuracy index; If the predicted recognition accuracy index is less than the accuracy threshold, an early warning is issued or the model is switched to a low background dependence model.
8. The method for real-time detection of crane rail joints according to claim 7, characterized in that: For the target CNN model, the joint index is obtained based on the calculated background dependence index BDI and recognition accuracy index RAI If the Risk Score exceeds 0.6, the model performance is unstable and improvement steps need to be performed. Fixed seam area, construct multiple image pairs with the same structure and different backgrounds ( , ); Use spatial attention mechanism to guide the model to focus on the seam area; During training, we calculate the attention map α(x) and add a background invariance loss term to the background interference image pairs. The goal is to make the model and The prediction results remain consistent: ; For the model image Output; For the model image Output; Redefine the final training loss: ;in: represents the standard cross entropy classification loss; represents the attention weight; β is the adjustment coefficient.
9. A crane rail joint real-time detection system, used to implement the crane rail joint real-time detection method according to any one of claims 1 to 8, characterized in that: It includes image acquisition and preprocessing module, CNN model training and evaluation module, model background dependency analysis module, background adaptability prediction module and adaptive optimization training module; Image acquisition and preprocessing module: obtains joint image samples under various track surface conditions, preprocesses the images, and extracts the joint area as the region of interest; CNN model training and evaluation module: This module uses a convolutional neural network model to train and identify seam images. It also extracts an activation consistency index, which measures the model's activation response to the same seam region under different backgrounds, and an activation consistency index, which reflects the sensitivity of the model to background perturbations in the recognition output when the seam region is fixed. Model background dependency analysis module: This module performs weighted fusion of the activation consistency index and background perturbation sensitivity to calculate the background dependency index. Based on the background dependency index, the CNN model is divided into high-dependence and low-dependence categories. Background Adaptability Prediction Module: For CNN models with high dependency categories, the module predicts the recognition accuracy of the CNN model under new background conditions based on the feature distribution under different track background conditions. Adaptive optimization training module: combines the recognition accuracy prediction results with the background dependency index to improve the CNN model.
Citation Information
Patent Citations
Deep learning concrete bridge crack real-time detection method based on domain adaptation
CN114693615A
Track deformation detection method for track sliding door
CN118570140A
Ground penetrating radar tunnel lining quality inspection method based on self-supervised learning
WO2023207104A1