Data-feature double-closed-loop enhanced detection system and method for locomotive sanding device

Through the data-feature dual closed-loop enhancement detection method, combined with data and feature enhancement modules, and dynamic adjustment of key parameters, the recognition accuracy and robustness problems of the locomotive sand spreading device under complex lighting conditions are solved, achieving higher recognition accuracy and stability.

CN120689632APending Publication Date: 2025-09-23CHONGQING JIAOTONG UNIV +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510801322.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-16
Publication Date
2025-09-23

AI Technical Summary

Technical Problem

Under complex lighting conditions, the existing technology of locomotive sand spreading device has insufficient image recognition accuracy and robustness, making it difficult to meet the requirements of high precision and real-time performance.

Method used

A data-feature dual closed-loop enhancement detection method is adopted. The data enhancement module performs pixel-level dynamic online enhancement and the feature enhancement module performs feature fusion. Combined with the detection performance feedback and attention feedback of the target detection model, key parameters are dynamically adjusted to optimize the recognition accuracy and robustness of the model in complex lighting scenes.

Benefits of technology

The recognition accuracy and robustness of the model in complex lighting scenarios have been significantly improved, ensuring the stability and reliability of the model in practical applications.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120689632A_ABST
    Figure CN120689632A_ABST
Patent Text Reader

Abstract

The invention relates to the application category of a computer vision technology in the field of intelligent operation and maintenance of rail transit, in particular to a data-feature double-closed-loop enhanced detection system and method for a locomotive sanding device. The system comprises a data enhancement module used for performing pixel-level dynamic online enhancement on a locomotive sanding device image in a training data set to obtain an enhanced locomotive sanding device image; the target detection model is used for training based on the enhanced locomotive sanding device image; the feature enhancement module is used for separating, enhancing and fusing high and low frequency features of the feature map in the target detection model network; and the feedback adjustment module is used for dynamically adjusting key parameters for the data enhancement module to carry out pixel-level dynamic online enhancement and the feature enhancement module to carry out feature fusion based on detection performance feedback and attention feedback of the target detection model. According to the method, the recognition precision, robustness and generalization ability of the model in a complex illumination scene can be remarkably improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the fields of Internet big data and new generation information technology, and in particular to a data-feature dual closed-loop enhanced detection system and method for a locomotive sand spreading device. Background Art

[0002] The proper functioning of locomotive sand-spreading systems is crucial to the safety and efficiency of rail transportation. Traditional sand-spreading detection methods typically rely on manual inspections or single-use image processing techniques, which suffer from low accuracy and inefficiency. Limited human resources and insufficient inspection frequency make it difficult to detect sand-spreading system malfunctions in a timely manner. Traditional image processing-based methods, while applicable under certain conditions, suffer from significant recognition errors in environments such as complex lighting and inclement weather, making them difficult to meet high-precision and real-time requirements.

[0003] With the rapid development of deep learning technology, vision-based sand spreading detection has gradually become a mainstream method. Deep learning methods can automatically learn complex features from images, offering higher accuracy and adaptability than traditional methods. However, even deep learning technology can encounter problems such as poor image quality and blurred features when faced with complex environmental factors such as strong light, shadows, and sand pipe contamination, resulting in reduced accuracy in sand spreading status recognition. Therefore, further improving the accuracy and robustness of sand spreading status recognition under complex environmental factors remains a pressing technical challenge.

[0004] Current deep learning-based classification methods suffer from the significant impact of lighting on images. Under complex lighting conditions (such as strong light, shadows, and at night), the brightness and contrast of the sand-spreading device image can be affected, making it difficult to clearly identify the sand-spreading device's features in the image. This makes the model susceptible to misjudgment due to lighting variations, resulting in reduced recognition accuracy for vehicle sand-spreading device detection. Therefore, improving the accuracy of vehicle sand-spreading device detection in complex lighting scenarios is a pressing technical issue. Summary of the Invention

[0005] In view of the deficiencies of the above-mentioned prior art, the technical problem to be solved by the present invention is: how to provide a data-feature dual closed-loop enhancement detection method for a locomotive sand-spreading device, dynamically adjust the key parameters of the data enhancement module for pixel-level dynamic online enhancement and the feature enhancement module for feature fusion based on the detection performance feedback and attention feedback of the target detection model during the model training process, combine the dynamic adaptive enhancement at the data level with the illumination robustness expression optimization at the feature level, and use a collaborative engine to realize the closed-loop feedback and dynamic scheduling of the two, thereby significantly improving the recognition accuracy, robustness and generalization ability of the model in complex lighting scenes.

[0006] In order to solve the above technical problems, the present invention adopts the following technical solutions:

[0007] The data-feature dual closed-loop enhanced detection system for locomotive sand spreading devices includes:

[0008] A data enhancement module is used to perform pixel-level dynamic online enhancement on the locomotive sand spreading device image in the training data set to obtain an enhanced locomotive sand spreading device image;

[0009] An object detection model is used for training based on the enhanced locomotive sand spreading device image; the trained object detection model can predict the sand spreading device based on the input locomotive sand spreading device image to obtain a sand spreading device prediction result;

[0010] Feature enhancement module, used to separate, enhance and fuse high-frequency and low-frequency features of feature maps in the target detection model network;

[0011] The feedback adjustment module is used to dynamically adjust the key parameters of the data enhancement module for pixel-level dynamic online enhancement and the feature enhancement module for feature fusion based on the detection performance feedback and attention feedback of the target detection model during the training process.

[0012] Preferably, the data enhancement module performs pixel-level dynamic online enhancement on the locomotive sand spreading device image in the training data set, including the following processing steps:

[0013] S01: Randomly perturb the brightness and contrast of the locomotive sand spreading device image based on the perturbation probability δ;

[0014] S02: Brightness perturbation: Perform brightness perturbation on each pixel value in the locomotive sand spreading device image to obtain a brightness perturbation image;

[0015] The formula is:

[0016] I′(x,y)=clip(I(x,y)·(1+β)0;

[0017] Where: I′(x,y) represents the pixel value in the brightness perturbation image; I(x,y) represents the pixel value of the locomotive sand spreading device image; clip represents the pixel value truncation operation; β∈[-1,1] is the brightness factor;

[0018] S03: Contrast perturbation: Perform contrast perturbation on each pixel value in the brightness perturbation image to obtain an enhanced locomotive sand spreading device image;

[0019] The formula is:

[0020] I″(x,y)=clip((I′(x,y)-μ)·(1+a)+μ);

[0021] Where: I″(x,y) represents the pixel value in the enhanced locomotive sand spreading device image; μ represents the average grayscale value of the locomotive sand spreading device image; a∈[-1,1] is the contrast factor;

[0022] Among them, the brightness factor β, contrast factor a and perturbation probability δ are the key parameters of the data enhancement module for pixel-level dynamic online enhancement.

[0023] Preferably, the feature enhancement module performs the following processing steps on the feature map: separating, enhancing, and fusing high-frequency and low-frequency features:

[0024] S11: Decompose the initial feature map into high-frequency features and low-frequency features through wavelet transform;

[0025] S12: After upsampling the high-frequency features, the high-frequency features are enhanced by a high-frequency feature enhancement module to obtain enhanced high-frequency features;

[0026] S13: After enhancing the low-frequency features through the low-frequency feature enhancement module, upsampling is performed to obtain enhanced low-frequency features;

[0027] S14: Fusing the enhanced high-frequency features and the enhanced low-frequency features to obtain high- and low-frequency fusion features;

[0028] S15: Input the high- and low-frequency splicing features into the 1x1 convolution layer to adjust the number of feature map channels;

[0029] S16: The high- and low-frequency concatenation features after the 1x1 convolution layer are weighted through the attention mechanism to obtain high- and low-frequency enhanced features.

[0030] Preferably, in step S12, the high-frequency feature enhancement module includes six cascaded groups of high-frequency enhancement units, and each group of high-frequency enhancement units includes a cascaded GhostConv layer and a GELU activation function;

[0031] The input of the first group of high-frequency enhancement units is used as the GELU activation function input of the six groups of high-frequency enhancement units;

[0032] The input of the second group of high-frequency enhancement units is used as the GELU activation function input of the next five groups of high-frequency enhancement units;

[0033] The input of the third group of high-frequency enhancement units is used as the GELU activation function input of the next four groups of high-frequency enhancement units;

[0034] The input of the fourth group of high-frequency enhancement units is used as the GELU activation function input of the next three groups of high-frequency enhancement units;

[0035] The input of the fifth group of high-frequency enhancement units is used as the GELU activation function input of the next two groups of high-frequency enhancement units;

[0036] The input of the sixth group of high-frequency enhancement units is used as the GELU activation function input of the sixth group of high-frequency enhancement units;

[0037] The input of the first group of high-frequency enhancement units is the upsampled high-frequency features; the output of the sixth group of high-frequency enhancement units is the enhanced high-frequency features.

[0038] Preferably, in step S13, the low-frequency feature enhancement module includes three branches;

[0039] The first branch includes the Transformer block;

[0040] The second branch consists of a cascade of average pooling layers and Transformer blocks;

[0041] The third branch includes the cascaded average pooling layer and Transformer block;

[0042] The Transformer block consists of a cascade of a first-layer normalization, an attention layer, a second-layer normalization, and a feedforward neural network. The input of the first-layer normalization is used as the input of the second-layer normalization. The input of the second-layer normalization is concatenated with the output of the feedforward neural network as the output of the Transformer block.

[0043] The inputs of the first and second branches are low-frequency features, and the input of the third branch is the output of the average pooling layer of the second branch;

[0044] The outputs of the second and third branches are fused and then fused with the output of the first branch, and added element-by-element to the input low-frequency features to obtain enhanced low-frequency features.

[0045] Preferably, in step S14, the high- and low-frequency fusion features are calculated using the following formula:

[0046] F fused =w·F low +(1-w)·F high ;

[0047] Where: F fused represents high- and low-frequency fusion features; w∈[0,1] represents the fusion weight; F low Indicates enhanced low-frequency features; F high Indicates enhanced high-frequency features;

[0048] Among them, the fusion weight w is the key parameter for feature fusion in the feature enhancement module.

[0049] Preferably, the processing steps of the feedback adjustment module are as follows:

[0050] S21: Calculate the detection performance feedback index based on the mAP index value of the target detection model in the current training round and the mAP index value of the target detection model in the previous training round;

[0051] The formula is:

[0052]

[0053] Indicates rising;

[0054] Indicates a decline;

[0055] Where: Represents the detection performance feedback indicator under the current training round; mAP (t) and mAP (t-1) Respectively represent the mAP index values ​​of the target detection model in the current training round and the previous training round;

[0056] Among them, the calculation formula of the mAP indicator value is:

[0057]

[0058] Precision P (precision), recall R (recall), average precision (AP), and mean average precision mAP (mean Average Precision).

[0059] Where: TP is the number of positive samples correctly detected by the model; FP is the number of samples where the model predicts negative samples as positive samples; FN is the number of samples where the model predicts positive samples as negative samples; N is the number of target categories in the dataset; AP is the probability of the model being predicted as negative. i represents the average accuracy of the i-th category target;

[0060] S22: Calculating an attention feedback index based on the attention concentration of the target detection model in the current training round and the attention concentration of the target detection model in the previous training round;

[0061] The formula is:

[0062]

[0063] Indicates rising;

[0064] Indicates a decline;

[0065] Where: Represents the attention feedback indicator under the current training round; and Represents the attention concentration of the target detection model in the current training round and the previous training round respectively;

[0066] The calculation formula for attention concentration is:

[0067]

[0068] Where: N represents the number of batch feature maps; max(A i ) represents the maximum attention value of a single feature map;

[0069] S23: performing weighted summation on the detection performance feedback index and the attention feedback index to obtain a global feedback total value;

[0070] The formula is:

[0071]

[0072] Where: ω data +ω feat =1,ω data and ω feat represents weight;

[0073] Among them, the Sigmoid function with time step control is used to dynamically adjust the weight ω data and ω feat :

[0074]

[0075] ω feat (t)=1-ω data (t);

[0076] Where: t represents the time step of the current training; T represents the transition center point; α is used to control the smoothness of the transition;

[0077] S24: When the global feedback value exceeds the set adjustment threshold, the key parameters of the pixel-level dynamic online enhancement of the data enhancement module and the feature fusion of the feature enhancement module are dynamically adjusted based on the detection performance feedback index and the attention feedback index:

[0078] 1) If R data and R feat Both increase without adjusting the key parameters of the data enhancement module for pixel-level dynamic online enhancement and the feature enhancement module for feature fusion;

[0079] 2) If R data Decline, R feat Increase, adjust the key parameters of the data enhancement module for pixel-level dynamic online enhancement: brightness factor β, contrast factor a and perturbation probability δ;

[0080] 3) If R data Rising, R feat Decrease, adjust the key parameters of the feature enhancement module for feature fusion: fusion weight w;

[0081] 4) If R data and R feat At the same time, the key parameters of the data enhancement module for pixel-level dynamic online enhancement and the feature enhancement module for feature fusion are adjusted.

[0082] Preferably, the formula for the feedback adjustment module to adjust the key parameters of the data enhancement module for pixel-level dynamic online enhancement and the feature enhancement module for feature fusion is:

[0083] 1) The formula for adjusting the brightness factor β, contrast factor a and disturbance probability δ is expressed as:

[0084]

[0085] δ (t+1) =δ (t) *γ1;

[0086] Where: η a ,η β represents the fine-tuning step size; γ1 represents the attenuation factor;

[0087] 2) The formula for adjusting the fusion weight w is expressed as:

[0088]

[0089] Where: η is the learning rate.

[0090] A data-feature dual closed-loop enhanced detection method for a locomotive sand spreading device is implemented based on a data-feature dual closed-loop enhanced detection system for the locomotive sand spreading device, comprising:

[0091] S1: Acquire an image of the locomotive sand spreading device to be inspected;

[0092] S2: Input the locomotive sand spreading device image into the trained object detection model to predict the sand spreading device and output the sand spreading device prediction result;

[0093] The processing steps when training an object detection model are as follows:

[0094] S201: Acquire a training data set; each set of data in the training data set includes an image of a locomotive sand spreading device and a corresponding sand spreading device bounding box;

[0095] S202: Performing pixel-level dynamic online enhancement on the locomotive sand spreading device image by a data enhancement module to obtain an enhanced locomotive sand spreading device image;

[0096] S203: Inputting the enhanced locomotive sand spreading device image into the target detection model to predict the sand spreading device and output the sand spreading device prediction result; in the target detection model, the feature enhancement module is used to separate, enhance and fuse the high-frequency and low-frequency features of the feature map;

[0097] S204: Calculating a loss function based on the sand spreading device prediction result and the corresponding sand spreading device bounding box label, and optimizing the parameters of the object detection model using the loss function;

[0098] S205: Dynamically adjusting key parameters of the data enhancement module for pixel-level dynamic online enhancement and the feature enhancement module for feature fusion based on the detection performance feedback and attention feedback of the target detection model through the feedback adjustment module;

[0099] S206: Repeat steps S201 to S205 to iteratively train the target detection model until the model converges or the maximum number of training rounds is reached;

[0100] S3: The prediction result of the sand spreading device is used as the detection result of the locomotive sand spreading device image.

[0101] Preferably, in step S203, the processing steps of the target detection model include:

[0102] S2031: The backbone network sequentially extracts features from the enhanced locomotive sand-spreading device image through a feature enhancement module, a convolution block, and a C2F detail enhancement convolution block to obtain an initial feature map. The feature enhancement module is used to separate the input enhanced locomotive sand-spreading device image into high-frequency features and low-frequency features, enhance the high-frequency features and low-frequency features respectively, and then fuse them to obtain high- and low-frequency enhanced features.

[0103] S2032: The neck network upsamples and concatenates the initial feature maps and then inputs them into the C2F detail enhancement convolution block to obtain a fused feature map.

[0104] S2033: The detection head processes the fused feature map through the convolution block and performs sand spreading device detection to obtain a sand spreading device prediction result, including a bounding box, category label, and confidence level of the sand spreading device.

[0105] Compared with the prior art, the data-feature dual closed-loop enhanced detection method for the locomotive sand spreading device of the present invention has the following beneficial effects:

[0106] The present invention uses a data enhancement module to perform pixel-level dynamic online enhancement on the image of the locomotive sand-spreading device, which can generate a variety of training samples and simulate the image changes under various lighting scenarios that may occur in actual scenes, so that the model can be exposed to a variety of image features and learn more robust feature representations, thereby improving the generalization ability of the model in complex lighting scenarios. At the same time, the present invention uses a feature enhancement module to separate, enhance and fuse high- and low-frequency features of the feature map in the target detection model network, further explore and strengthen the key feature information in the feature map, reduce the focus on the background and other irrelevant areas, so that the model can better extract and utilize effective features when facing complex lighting scenes, and more accurately focus on the sand-spreading device, thereby improving the generalization performance of the model in complex lighting scenarios and ensuring the stability and reliability of the model in practical applications.

[0107] The present invention uses a feedback adjustment module based on the detection performance feedback and attention feedback of the target detection model to dynamically adjust the key parameters of the data enhancement module for pixel-level dynamic online enhancement and the feature enhancement module for feature fusion, thereby constructing a dual closed-loop optimization mechanism for data and features. It can automatically adjust the data enhancement and feature enhancement strategies according to the current state and needs of the model, so that the model can better adapt to the feature extraction needs of the image, continuously adapt to new data distribution and feature changes, further improve the generalization ability of the model, and ensure that the model can maintain good performance in complex lighting scenes. At the same time, the data enhancement module and the feature enhancement module cooperate with each other during the training process to jointly promote the optimization of the model, by combining the dynamic adaptive enhancement at the data level with the illumination robustness expression optimization at the feature level, and using the collaborative engine to achieve closed-loop feedback and dynamic scheduling of the two, thereby significantly improving the recognition accuracy, robustness and generalization ability of the model in complex lighting scenes. BRIEF DESCRIPTION OF THE DRAWINGS

[0108] In order to make the purpose, technical solutions and advantages of the invention more clear, the present invention will be further described in detail below with reference to the accompanying drawings, in which:

[0109] Figure 1 The logical block diagram of the data-feature dual closed-loop enhanced detection method for locomotive sand spreading device.

[0110] Figure 2 The logical block diagram of the feature (high and low frequency) enhancement module.

[0111] Figure 3 This is the network structure diagram of the high-frequency feature enhancement module.

[0112] Figure 4 This is the network structure diagram of the low-frequency feature enhancement module.

[0113] Figure 5This is the network structure diagram of the EMA attention mechanism.

[0114] Figure 6 This is the logical block diagram of the target detection model.

[0115] Figure 7 Network structure diagram of the C2F detail enhancement convolution block. DETAILED DESCRIPTION

[0116] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. The components of the embodiments of the present invention generally described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present invention provided in the drawings is not intended to limit the scope of the invention claimed for protection, but only represents selected embodiments of the present invention. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.

[0117] It should be noted that similar reference numerals and letters denote similar items in the following figures. Therefore, once an item is defined in one figure, it does not require further definition or explanation in subsequent figures. In the description of the present invention, it should be noted that the terms "center," "upper," "lower," "left," "right," "vertical," "horizontal," "inner," and "outer" indicate positions or relationships based on the positions or relationships shown in the figures, or the positions or relationships in which the inventive product is typically placed when in use. These terms are intended solely to facilitate the description of the present invention and simplify the description. They do not indicate or imply that the devices or components referred to must have a specific orientation, be constructed, or operate in a specific orientation, and are therefore not to be construed as limiting the present invention. Furthermore, the terms "first," "second," and "third," etc., are used solely to distinguish descriptions and are not to be construed as indicating or implying relative importance. Furthermore, terms such as "horizontal" and "vertical" do not imply that a component is absolutely horizontal or overhanging, but rather may be slightly tilted. For example, "horizontal" simply means that its direction is more horizontal than "vertical," and does not mean that the structure must be completely horizontal, but rather may be slightly tilted. In the description of the present invention, it should also be noted that, unless otherwise expressly specified or limited, the terms "disposed," "installed," "connected," and "connected" should be understood in a broad sense. For example, they may refer to fixed connections, detachable connections, or integral connections; they may refer to mechanical connections or electrical connections; they may refer to direct connections or indirect connections through an intermediate medium; and they may refer to internal communication between two components. Those skilled in the art will understand the specific meanings of the above terms in the present invention based on the specific circumstances.

[0118] The following is a further detailed description through specific implementation methods:

[0119] Example 1:

[0120] This embodiment discloses a data-feature dual closed-loop enhanced detection system for a locomotive sand spreading device.

[0121] like Figure 1 As shown, the data-feature dual closed-loop enhanced detection system of the locomotive sand spreading device includes:

[0122] A data enhancement module is used to perform pixel-level dynamic online enhancement on the locomotive sand spreading device image in the training data set to obtain an enhanced locomotive sand spreading device image;

[0123] An object detection model is used for training based on the enhanced locomotive sand spreading device image; the trained object detection model can predict the sand spreading device based on the input locomotive sand spreading device image to obtain a sand spreading device prediction result;

[0124] Feature enhancement module, used to separate, enhance and fuse high-frequency and low-frequency features of feature maps in the target detection model network;

[0125] The feedback adjustment module is used to dynamically adjust the key parameters of the data enhancement module for pixel-level dynamic online enhancement and the feature enhancement module for feature fusion based on the detection performance feedback and attention feedback of the target detection model during the training process.

[0126] The present invention uses a data enhancement module to perform pixel-level dynamic online enhancement on the image of the locomotive sand-spreading device, which can generate a variety of training samples and simulate the image changes under various lighting scenarios that may occur in actual scenes, so that the model can be exposed to a variety of image features and learn more robust feature representations, thereby improving the generalization ability of the model in complex lighting scenarios. At the same time, the present invention uses a feature enhancement module to separate, enhance and fuse high- and low-frequency features of the feature map in the target detection model network, further explore and strengthen the key feature information in the feature map, reduce the focus on the background and other irrelevant areas, so that the model can better extract and utilize effective features when facing complex lighting scenes, and more accurately focus on the sand-spreading device, thereby improving the generalization performance of the model in complex lighting scenarios and ensuring the stability and reliability of the model in practical applications.

[0127] The present invention uses a feedback adjustment module based on the detection performance feedback and attention feedback of the target detection model to dynamically adjust the key parameters of the data enhancement module for pixel-level dynamic online enhancement and the feature enhancement module for feature fusion, thereby constructing a dual closed-loop optimization mechanism for data and features. It can automatically adjust the data enhancement and feature enhancement strategies according to the current state and needs of the model, so that the model can better adapt to the feature extraction needs of the image, continuously adapt to new data distribution and feature changes, further improve the generalization ability of the model, and ensure that the model can maintain good performance in complex lighting scenes. At the same time, the data enhancement module and the feature enhancement module cooperate with each other during the training process to jointly promote the optimization of the model, by combining the dynamic adaptive enhancement at the data level with the illumination robustness expression optimization at the feature level, and using the collaborative engine to achieve closed-loop feedback and dynamic scheduling of the two, thereby significantly improving the recognition accuracy, robustness and generalization ability of the model in complex lighting scenes.

[0128] In order to better introduce the technical solution of the present invention, this embodiment is described through the following parts.

[0129] 1. Data Enhancement Module

[0130] In complex lighting scenarios (such as strong light, backlight, shadows, and nighttime), raw images are prone to brightness distortion, uneven contrast, and missing structural details, which can affect the discriminative ability and robustness of target detection models. Traditional data augmentation methods (such as fixed brightness changes and gamma transformations) suffer from fixed enhancement strength, decoupling from model performance, and difficulty covering real-world conditions.

[0131] In this embodiment, the data enhancement module performs pixel-level dynamic online enhancement on the locomotive sand spreading device image in the training data set, including the following processing steps:

[0132] S01: Randomly perturb the brightness and contrast of the locomotive sand spreading device image based on the perturbation probability δ;

[0133] S02: Brightness perturbation: Perform brightness perturbation on each pixel value in the locomotive sand spreading device image to obtain a brightness perturbation image;

[0134] The formula is:

[0135] I′(x,y)=clip(I(x,y)·(1+β));

[0136] Where: I′(x,y) represents the pixel value in the brightness perturbation image; I(x,y) represents the pixel value of the locomotive sand spreading device image; clip represents the pixel value truncation operation, which is used to limit the result to the legal grayscale range (such as 0–255); β∈[-1,1] is the brightness factor, β>0 means brightening, and β<0 means darkening;

[0137] S03: Contrast perturbation: Perform contrast perturbation on each pixel value in the brightness perturbation image to obtain an enhanced locomotive sand spreading device image;

[0138] The formula is:

[0139] I″(x,y)=clip((I′(x,y)-μ)·(1+a)+μ);

[0140] Where: I″(x,y) represents the pixel value in the enhanced locomotive sand spreading device image; μ represents the average grayscale value of the locomotive sand spreading device image; a∈[-1,1] is the contrast factor;

[0141] Among them, the brightness factor β, contrast factor a and perturbation probability δ are the key parameters of the data enhancement module for pixel-level dynamic online enhancement.

[0142] This method uses brightness perturbations to simulate changes in ambient light intensity, enhancing the model's robustness in complex lighting scenarios, such as low light and strong light. Contrast perturbations can also effectively enhance the local edge and texture features of an image, improving the object detection model's ability to detect sand-spreading devices in complex lighting scenarios.

[0143] It should be noted that the data augmentation module is integrated into the image loading and input stage in an online manner. That is, during the training of the target detection model, the above-mentioned augmentation operation is randomly performed on each image instead of being generated offline in advance. This strategy can dynamically generate diverse image samples during the training process, improve the generalization ability of the model, and avoid overfitting problems caused by a single data distribution.

[0144] 2. Feature Enhancement Module

[0145] like Figure 2 As shown in FIG, the feature enhancement module performs the following processing steps on the feature map: separating, enhancing, and fusing high- and low-frequency features:

[0146] S11: The initial feature map is decomposed into high-frequency features and low-frequency features through wavelet transform. Among them, high-frequency features contain detailed information of the image, such as edges and textures, etc.; low-frequency features cover the general outline and global structural information of the image. Through this separation, subsequent optimization processing can be performed on features with different characteristics.

[0147] In this embodiment, the wavelet transform used performs local analysis of the signal in both time and frequency dimensions. Discrete wavelet transform (DWT) is a discrete form of wavelet transform and is particularly suitable for processing digital images. For a two-dimensional image, a single DWT operation can decompose the image into four subbands:

[0148] LL subband: low-frequency component, which retains the general outline and slowly changing information of the image, also known as the approximate component.

[0149] LH subband: horizontal high-frequency component, containing details and edge information in the horizontal direction of the image.

[0150] HL subband: vertical high-frequency component, containing details and edge information in the vertical direction of the image.

[0151] HH subband: diagonal high-frequency component, containing details and edge information in the diagonal direction of the image.

[0152] Separation steps of wavelet transform:

[0153] 1) Discrete Wavelet Transform: A discrete wavelet transform (DWT) is performed on the input image, decomposing it into low-frequency and high-frequency components. Specifically, the image is filtered horizontally and vertically using the Haar wavelet basis, resulting in four subbands: a low-frequency subband, a horizontal high-frequency subband, a vertical high-frequency subband, and a diagonal high-frequency subband. The low-frequency subband retains the image's primary contours and low-frequency information, while the remaining three subbands contain high-frequency information in different directions.

[0154] 2) High-Frequency Component Extraction and Concatenation: Horizontal, vertical, and diagonal high-frequency components are extracted from the high-frequency subbands obtained by discrete wavelet transform. These three high-frequency components are concatenated along the channel dimension to form a new high-frequency component tensor. This integrates high-frequency information from different directions, facilitating subsequent unified processing.

[0155] 3) High-Frequency Component Processing: Convolution, normalization, and activation operations are performed on the concatenated high-frequency component tensor. First, 1x1 convolution is used to adjust the number of channels of the high-frequency component, reducing the number of channels and achieving information fusion between different channels. Then, batch normalization is performed on the convolved feature map to a mean of 0 and a variance of 1, accelerating the convergence of the model and improving stability. Finally, the ReLU activation function is applied to introduce nonlinear factors to enhance the feature expression capability of the high-frequency component.

[0156] 4) Low-Frequency Component Processing: Convolution, normalization, and activation are performed on the low-frequency components obtained by discrete wavelet transform. 1x1 convolution is also used to extract features and adjust the number of channels. Batch normalization and ReLU activation are then performed to enhance the feature expression of the low-frequency components.

[0157] 5) Output high and low frequency components: After the above processing, the processed low frequency component and high frequency component are obtained and outputted as the result of separation of high and low frequency information of the image.

[0158] S12: After upsampling the high-frequency features, the high-frequency features are enhanced by a high-frequency feature enhancement module to obtain enhanced high-frequency features;

[0159] S13: After enhancing the low-frequency features through the low-frequency feature enhancement module, upsampling is performed to obtain enhanced low-frequency features;

[0160] In this embodiment, upsampling can improve the resolution of the feature map, facilitate subsequent fusion with other features, or adapt the feature size to the subsequent calculation requirements of the model.

[0161] S14: Fusing the enhanced high-frequency features and the enhanced low-frequency features to obtain high- and low-frequency fusion features;

[0162] S15: Input the high- and low-frequency splicing features into the 1x1 convolution layer to adjust the number of feature map channels;

[0163] In this embodiment, 1x1 convolution can fuse information across channels and adjust the number of feature map channels. 1x1 convolution performs a linear transformation on the concatenated features, further fusing high- and low-frequency feature information and enhancing the interaction between features.

[0164] S16: The high- and low-frequency concatenation features after the 1x1 convolution layer are weighted through the attention mechanism to obtain high- and low-frequency enhanced features.

[0165] In this embodiment, the features after 1x1 convolution are weighted through the attention mechanism, so that the model focuses on important features, suppresses irrelevant or minor information, and improves the expressiveness of key features.

[0166] 1. High-frequency feature enhancement module

[0167] Combine Figure 3 As shown in Figure 1, the high-frequency feature enhancement module includes six cascaded groups of high-frequency enhancement units, and each group of high-frequency enhancement units includes a cascaded GhostConv layer and a GELU activation function;

[0168] The input of the first group of high-frequency enhancement units is used as the GELU activation function input of the six groups of high-frequency enhancement units;

[0169] The input of the second group of high-frequency enhancement units is used as the GELU activation function input of the next five groups of high-frequency enhancement units;

[0170] The input of the third group of high-frequency enhancement units is used as the GELU activation function input of the next four groups of high-frequency enhancement units;

[0171] The input of the fourth group of high-frequency enhancement units is used as the GELU activation function input of the next three groups of high-frequency enhancement units;

[0172] The input of the fifth group of high-frequency enhancement units is used as the GELU activation function input of the next two groups of high-frequency enhancement units;

[0173] The input of the sixth group of high-frequency enhancement units is used as the GELU activation function input of the sixth group of high-frequency enhancement units;

[0174] The input of the first group of high-frequency enhancement units is the upsampled high-frequency features; the output of the sixth group of high-frequency enhancement units is the enhanced high-frequency features.

[0175] 2. Low-frequency feature enhancement module

[0176] Combine Figure 4 As shown, the low-frequency feature enhancement module includes three branches;

[0177] The first branch includes the Transformer block;

[0178] The second branch consists of a cascade of average pooling layers and Transformer blocks;

[0179] The third branch includes the cascaded average pooling layer and Transformer block;

[0180] The Transformer block consists of a cascade of a first-layer normalization, an attention layer, a second-layer normalization, and a feedforward neural network. The input of the first-layer normalization is used as the input of the second-layer normalization. The input of the second-layer normalization is concatenated with the output of the feedforward neural network as the output of the Transformer block.

[0181] The inputs of the first and second branches are low-frequency features, and the input of the third branch is the output of the average pooling layer of the second branch;

[0182] The outputs of the second and third branches are fused and then fused with the output of the first branch, and added element-by-element to the input low-frequency features to obtain enhanced low-frequency features.

[0183] 3. High and low frequency fusion features

[0184] In this embodiment, the high- and low-frequency fusion features are calculated using the following formula:

[0185] F fused =w·F low +(1-w)·F high ;

[0186] Where: F fused represents the high-frequency and low-frequency fusion features; w∈[0,1] represents the fusion weight: the proportion of high-frequency components should be appropriately increased in low-light or blurred images (w is smaller); in strong light or complex background scenes, the proportion of low-frequency components should be increased to suppress the influence of noise (w is larger); F low Indicates enhanced low-frequency features; F high Indicates enhanced high-frequency features;

[0187] Among them, the fusion weight w is the key parameter for feature fusion in the feature enhancement module.

[0188] 4. EMA Attention Mechanism

[0189] Combine Figure 5 As shown, the attention mechanism is the EMA attention mechanism;

[0190] The processing steps of the EMA attention mechanism are as follows:

[0191] 1) Feature Grouping

[0192] For a given input feature map X, EMA divides X into G sub-feature groups, each of which learns different semantics;

[0193] The feature grouping method enables the model to be distributed and processed on more GPU resources. This grouping method not only strengthens the feature learning of semantic regions, but also compresses noise.

[0194] 2) Parallel subnetworks

[0195] EMA uses three parallel paths to extract attention weight descriptors for feature maps in each sub-feature group; two paths are 1x1 branches and the third is a 3x3 branch; the 1x1 branch uses a one-dimensional global average pooling operation to encode channel information in two spatial directions; the 3x3 branch captures multi-scale feature representations through 3x3 convolutions;

[0196] EMA is not only able to encode cross-channel information to adjust the importance of different channels, but also able to preserve the precise spatial structure information into channels.

[0197] 3) Spatial Learning

[0198] EMA enriches feature aggregation by providing a cross-spatial information aggregation method in different spatial dimensions: the output of the 1x1 branch encodes global spatial information through two-dimensional global average pooling, while the output of the 3x3 branch is directly converted to the corresponding dimensional shape; these outputs are aggregated through a matrix dot product operation to generate the first spatial attention map; the output feature maps within each group are aggregated through the Sigmoid function of the two generated spatial attention weight values, capturing pixel-level pairing relationships and highlighting the global context of all pixels.

[0199] 3. Feedback Regulation Module

[0200] Combine Figure 1 As shown, the processing steps of the feedback regulation module are as follows:

[0201] S21: Calculate the detection performance feedback index based on the mAP index value of the target detection model in the current training round and the mAP index value of the target detection model in the previous training round;

[0202] The formula is:

[0203]

[0204] It means rising and strengthening;

[0205] It indicates a decrease, and interference training needs to be strengthened, and the intensity or frequency of the disturbance should be reduced;

[0206] Where: Represents the detection performance feedback indicator under the current training round; mAP (t) and mAP (t-1) Respectively represent the mAP index values ​​of the target detection model in the current training round and the previous training round;

[0207] Among them, the calculation formula of the mAP indicator value is:

[0208]

[0209]

[0210] Precision P (precision), recall R (recall), average precision (AP), and mean average precision mAP (mean Average Precision).

[0211] Where: TP is the number of positive samples correctly detected by the model; FP is the number of samples where the model predicts negative samples as positive samples; FN is the number of samples where the model predicts positive samples as negative samples; N is the number of target categories in the dataset; AP is the probability of the model being predicted as negative. i represents the average accuracy of the i-th category target;

[0212] S22: Calculating an attention feedback index based on the attention concentration of the target detection model in the current training round and the attention concentration of the target detection model in the previous training round;

[0213] The formula is:

[0214]

[0215] Indicates rising, effective focus of attention, maintaining or strengthening the current characteristic path;

[0216] The expression is declining, attention is scattered, and the feature processing strategy needs to be adjusted;

[0217] Where: Represents the attention feedback indicator under the current training round; and Represents the attention concentration of the target detection model in the current training round and the previous training round respectively;

[0218] The calculation formula for attention concentration is:

[0219]

[0220] Where: N represents the number of batch feature maps; max(A i ) represents the maximum attention value of a single feature map (range 0 to 1), reflecting the degree of focus of the model on the target area;

[0221] S23: performing weighted summation on the detection performance feedback index and the attention feedback index to obtain a global feedback total value;

[0222] The formula is:

[0223]

[0224] Where: ω data +ω feat =1,ω data and ω feat represents weight;

[0225] Among them, the Sigmoid function controlled by time step (epoch) is used to dynamically adjust the weight ω data and ω feat :

[0226]

[0227] ω feat (t)=1-ω data (t);

[0228] Where: t represents the time step of the current training; T represents the transition center point; α is used to control the smoothness of the transition;

[0229] Early training: ω data ≈1, focus on optimizing input data;

[0230] Mid-term transition: ω data ≈≈ω feat , a balance between the two;

[0231] Late training: ω feat t≈1, mainly optimizing feature expression.

[0232] S24: When the global feedback value exceeds the set adjustment threshold, the key parameters of the pixel-level dynamic online enhancement of the data enhancement module and the feature fusion of the feature enhancement module are dynamically adjusted based on the detection performance feedback index and the attention feedback index:

[0233] 1) If R data and R feat Both increase without adjusting the key parameters of the data enhancement module for pixel-level dynamic online enhancement and the feature enhancement module for feature fusion;

[0234] 2) If R sata Decline, R feat Increase, adjust the key parameters of the data enhancement module for pixel-level dynamic online enhancement: brightness factor β, contrast factor a and perturbation probability δ;

[0235] 3) If R data Rising, R feat Decrease, adjust the key parameters of the feature enhancement module for feature fusion: fusion weight w;

[0236] 4) If R data and R featAt the same time, the key parameters of the data enhancement module for pixel-level dynamic online enhancement and the feature enhancement module for feature fusion are adjusted.

[0237] Specifically, the formula for the key parameters of the feedback adjustment module to adjust the data enhancement module for pixel-level dynamic online enhancement and the feature enhancement module for feature fusion is:

[0238] 1) The formula for adjusting the brightness factor β, contrast factor a and disturbance probability δ is expressed as:

[0239]

[0240] δ (t+1) =δ (t) *γ1;

[0241] Where: η a ,η β represents the fine-tuning step size; γ1 represents the attenuation factor;

[0242] 2) The formula for adjusting the fusion weight w is expressed as:

[0243]

[0244] Where: η is the learning rate.

[0245] 4. Object Detection Model

[0246] In this embodiment, the target detection model is the YOLOv8 model.

[0247] like Figure 6 As shown in Figure 2, the processing steps of the target detection model include:

[0248] S1: The backbone network extracts features from the enhanced locomotive sand-spreading device image through the feature enhancement module, convolution block, and C2F detail enhancement convolution block in sequence to obtain an initial feature map. The feature enhancement module is used to separate the input enhanced locomotive sand-spreading device image into high-frequency features and low-frequency features, enhance the high-frequency features and low-frequency features respectively, and then fuse them to obtain high- and low-frequency enhanced features.

[0249] S2032: The neck network upsamples and concatenates the initial feature maps and then inputs them into the C2F detail enhancement convolution block to obtain a fused feature map.

[0250] In this embodiment, to better fuse feature maps of different scales, the neck network upsamples some feature maps to increase their resolution so they can be fused with other feature maps at the same scale. The fused feature maps are then processed through a convolutional layer (Conv) to further extract and integrate features for subsequent detection tasks.

[0251] S2033: The detection head processes the fused feature map through the convolution block and performs sand spreading device detection to obtain the sand spreading device prediction result, including the bounding box (Bbox), category label (Cls) and confidence (Obj) of the sand spreading device.

[0252] In this embodiment, the YOLOv8 head is designed to efficiently handle objects of varying scales. It typically includes multiple detection branches, each corresponding to a specific feature scale to accommodate object detection requirements of varying sizes. These detection branches consist of a series of convolutional layers, each with a specific purpose.

[0253] Initial convolutional layer: A 1x1 convolutional layer is typically used to adjust the number of channels in the feature map output by Neck. This 1x1 convolution allows for flexible increase or decrease in the number of channels without changing the spatial size of the feature map, thereby reducing subsequent computational effort and improving the model's expressiveness. For example, if the feature map output by Neck has a large number of channels, a 1x1 convolution can be used to compress the channels and remove redundant information.

[0254] Feature extraction convolutional layer: A 3x3 convolutional layer is used for feature extraction. The 3x3 convolution kernel captures local information on the feature map. Through multiple convolution operations, features are continuously extracted and abstracted. Each convolution operation enriches the semantic information of the feature map, while the spatial size may be reduced depending on the stride setting.

[0255] Normalization and Activation Layers: Each convolutional layer is typically followed by a normalization layer (such as BatchNormalization) and an activation layer (such as the SiLU activation function). Normalization layers accelerate model convergence, make the model more stable, and mitigate vanishing and exploding gradients. Activation layers introduce nonlinearities, enhancing the model's expressiveness and enabling it to learn more complex feature patterns.

[0256] After being processed by these convolutional layers, each detection branch outputs feature maps that contain information such as the target's location, category, and confidence.

[0257] Position Prediction (Bbox): Multiple bounding boxes are predicted for each grid point in the feature map of each detection branch. For each bounding box, its center coordinates (offset relative to the grid point), width, and height are predicted. These predictions are relative to the scale of the feature map and require conversion in subsequent processing to obtain the true coordinates on the original image.

[0258] Class Prediction (Cls): Each bounding box also predicts the probability of belonging to each class. In multi-classification tasks, a probability value is output for each class. After these probability values ​​are processed by the Softmax function, a probability distribution is formed, and the sum of the probabilities of all classes is 1.

[0259] Object confidence prediction (Obj): The object confidence indicates the probability that an object exists in the bounding box. It is a single prediction value ranging from 0 to 1.

[0260] Combine Figure 7 As shown, the C2F detail enhancement convolution block includes a cascaded first convolution layer, a separation layer, a first convolution combination block, a second convolution combination block, a splicing layer, and a second convolution layer;

[0261] The separation layer separates the feature map output by the first convolutional layer into two feature maps, one of which is directly input into the splicing layer and the other into the first convolutional combination block. At the same time, the two feature maps output by the separation layer and the outputs of the first and second convolutional combination blocks are input into the splicing layer for splicing.

[0262] The convolution combination block includes a cascaded first detail enhancement convolution block and a second detail enhancement convolution block; the input of the first detail enhancement convolution block and the output of the second detail enhancement convolution block are element-by-element added to obtain the output of the convolution combination block;

[0263] The detail enhancement convolution block includes two branches. The first branch is used to perform differential convolution, center differential convolution, angle differential convolution, vertical differential convolution or horizontal differential convolution on the input features. The second branch is used to perform convolution processing on the input features. The outputs of the two branches are added element by element to obtain the output of the detail enhancement convolution block.

[0264] Example 2:

[0265] This embodiment discloses a data-feature dual closed-loop enhanced detection method for a locomotive sand spreading device, which is implemented based on the data-feature dual closed-loop enhanced detection system in the first embodiment.

[0266] like Figure 1 As shown, a data-feature dual closed-loop enhanced detection method for a locomotive sand spreading device includes:

[0267] S1: Acquire an image of the locomotive sand spreading device to be inspected;

[0268] S2: Input the locomotive sand spreading device image into the trained object detection model to predict the sand spreading device and output the sand spreading device prediction result;

[0269] The processing steps when training an object detection model are as follows:

[0270] S201: Acquire a training data set; each set of data in the training data set includes an image of a locomotive sand spreading device and a corresponding sand spreading device bounding box;

[0271] In this embodiment, the training dataset includes locomotive images with sand spreading pipe states (clean / dirty) under different lighting conditions (strong light, shadow, nighttime), and sand spreading device bounding box labels are annotated.

[0272] S202: Performing pixel-level dynamic online enhancement on the locomotive sand spreading device image by a data enhancement module to obtain an enhanced locomotive sand spreading device image;

[0273] S203: Inputting the enhanced locomotive sand spreading device image into the target detection model to predict the sand spreading device and output the sand spreading device prediction result; in the target detection model, the feature enhancement module is used to separate, enhance and fuse the high-frequency and low-frequency features of the feature map;

[0274] S204: Calculating a loss function based on the sand spreading device prediction result and the corresponding sand spreading device bounding box label, and optimizing the parameters of the object detection model through the loss function (inversely);

[0275] S205: Dynamically adjusting key parameters of the data enhancement module for pixel-level dynamic online enhancement and the feature enhancement module for feature fusion based on the detection performance feedback and attention feedback of the target detection model through the feedback adjustment module;

[0276] S206: Repeat steps S201 to S205 to iteratively train the target detection model until the model converges or the maximum number of training rounds is reached;

[0277] S3: The prediction result of the sand spreading device is used as the detection result of the locomotive sand spreading device image.

[0278] The processing steps of the target detection model include:

[0279] S2031: The backbone network sequentially extracts features from the enhanced locomotive sand-spreading device image through a feature enhancement module, a convolution block, and a C2F detail enhancement convolution block to obtain an initial feature map. The feature enhancement module is used to separate the input enhanced locomotive sand-spreading device image into high-frequency features and low-frequency features, enhance the high-frequency features and low-frequency features respectively, and then fuse them to obtain high- and low-frequency enhanced features.

[0280] S2032: The neck network upsamples and concatenates the initial feature maps and then inputs them into the C2F detail enhancement convolution block to obtain a fused feature map.

[0281] S2033: The detection head processes the fused feature map through the convolution block and performs sand spreading device detection to obtain a sand spreading device prediction result, including a bounding box, category label, and confidence level of the sand spreading device.

[0282] Specifically, the loss functions when training the object detection model include bounding box regression loss, classification loss, and confidence loss;

[0283] 1) Bounding Box Regression Loss

[0284] The YOLOv8 model uses CIoUloss as the positioning loss, which comprehensively considers the overlap area, center point distance, and aspect ratio consistency between the predicted box and the true box. The calculation formula of CIoUloss is:

[0285]

[0286] Where: ρ represents the Euclidean distance of the center point; c represents the minimum diagonal length of the bounding box; v represents the penalty term of the aspect ratio; α represents the weight coefficient.

[0287] 2) Classification loss

[0288] The YOLOv8 model uses binary cross entropy loss for each class independently, replacing the Softmax mechanism, supporting multi-label classification. Combined with the Focal loss mechanism, it alleviates the problem of class imbalance:

[0289]

[0290] Where: γ represents the factor that adjusts the weight of difficult and easy samples.

[0291] 3) Confidence Loss

[0292] The confidence loss evaluates the probability that the predicted box contains an object, and uses dynamic focus loss to emphasize the contribution of high-quality positive samples (such as high IoU):

[0293]

[0294] Where: β represents the weight of adjusting IoU, which is used to enhance the learning of positive samples.

[0295] YOLOv8 introduces a task alignment strategy that dynamically selects positive samples based on the combined classification score and Intersection over Union (IoU) metric (Task Aligned Metric), ensuring consistency between classification and localization tasks. The loss weight of positive samples is proportional to their degree of alignment, optimizing the training process.

[0296] The calculation formula of the total loss function is as follows:

[0297]

[0298] Where: box ,λ cls ,λ obj is a hyperparameter.

[0299] Backpropagation process

[0300] Loss calculation: Based on the prediction results output by the head (target location, category, and confidence prediction) and the ground truth (i.e., the actual location, category, and presence of the sand spreading device in the image), the position loss (CIoU loss), classification loss (cross entropy loss), and target confidence loss (cross entropy loss) are calculated respectively. The position loss, classification loss, and target confidence loss of each detection branch are added together using the weighted sum method described above to obtain the total loss value.

[0301] Gradient calculation: Based on the calculated total loss value, the chain rule is used to calculate the gradient backward from the head part. The chain rule allows us to decompose the gradient of the total loss with respect to each network parameter into the product of multiple local gradients.

[0302] Automatic differentiation mechanism: In deep learning frameworks (such as PyTorch), all operations during the forward propagation process are automatically recorded. During the backward propagation, the framework uses these records to calculate the gradient of each operation in reverse order.

[0303] Convolutional layer gradient calculation: For convolutional layers, we need to calculate the gradient of the loss with respect to the convolution kernel weights and biases. For example, calculating the gradient of the convolution kernel weights requires calculating the contribution of each element of each kernel to the total loss. This involves taking the derivative of the convolution operation, a complex calculation process that can be simplified using an automatic derivative mechanism.

[0304] Parameter Update: Based on the calculated gradient, an optimization algorithm (such as stochastic gradient descent or Adam) is used to update the model's parameters. Based on the direction and magnitude of the gradient and following specific rules (such as the learning rate), the optimization algorithm adjusts the model's weight parameters, ensuring that the model's predictions during the next forward propagation are closer to the true annotations. By repeatedly performing forward propagation, loss calculation, backpropagation, and parameter updates, the model is gradually trained, continuously improving its ability to detect locomotive sand spreading devices.

[0305] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit the technical solutions. Those skilled in the art should understand that modifications or equivalent replacements of the technical solutions of the present invention that do not depart from the purpose and scope of the technical solutions of the present invention should be included in the scope of the claims of the present invention.

Claims

1. The data-feature dual closed-loop enhanced detection system for locomotive sand spreading device is characterized by: include: A data enhancement module is used to perform pixel-level dynamic online enhancement on the locomotive sand spreading device image in the training data set to obtain an enhanced locomotive sand spreading device image; An object detection model trained on augmented images of locomotive sand spreading devices; The trained object detection model can predict the sand spreading device based on the input locomotive sand spreading device image and obtain the sand spreading device prediction result; Feature enhancement module, used to separate, enhance and fuse high-frequency and low-frequency features of feature maps in the target detection model network; The feedback adjustment module is used to dynamically adjust the key parameters of the data enhancement module for pixel-level dynamic online enhancement and the feature enhancement module for feature fusion based on the detection performance feedback and attention feedback of the target detection model during the training process.

2. The data-feature dual closed-loop enhanced detection system for a locomotive sand spreading device according to claim 1, characterized in that: The data enhancement module performs pixel-level dynamic online enhancement on the locomotive sand spreading device images in the training dataset, including the following processing steps: S01: Randomly perturb the brightness and contrast of the locomotive sand spreading device image based on the perturbation probability δ; S02: Brightness perturbation: Perform brightness perturbation on each pixel value in the locomotive sand spreading device image to obtain a brightness perturbation image; The formula is: I′(x,y)=clip(I(x,y)·(1+β)); Where: I′(x,y) represents the pixel value in the brightness perturbation image; I(x,y) represents the pixel value of the locomotive sand spreading device image; clip represents the pixel value truncation operation; β∈[-1,1] is the brightness factor; S03: Contrast perturbation: Perform contrast perturbation on each pixel value in the brightness perturbation image to obtain an enhanced locomotive sand spreading device image; The formula is: I″(x,y)=clip((i′(x,y)-μ)·(1+a)+μ); Where: I″(x,y) represents the pixel value in the enhanced locomotive sand spreading device image; μ represents the average grayscale value of the locomotive sand spreading device image; a∈[-1,1] is the contrast factor; Among them, the brightness factor β, contrast factor a and perturbation probability δ are the key parameters of the data enhancement module for pixel-level dynamic online enhancement.

3. The data-feature dual closed-loop enhanced detection system for a locomotive sand spreading device according to claim 1, characterized in that: The feature enhancement module separates, enhances, and fuses high- and low-frequency features of the feature map. The processing steps include: S11: Decompose the initial feature map into high-frequency features and low-frequency features through wavelet transform; S12: After upsampling the high-frequency features, the high-frequency features are enhanced by a high-frequency feature enhancement module to obtain enhanced high-frequency features; S13: After enhancing the low-frequency features through the low-frequency feature enhancement module, upsampling is performed to obtain enhanced low-frequency features; S14: Fusing the enhanced high-frequency features and the enhanced low-frequency features to obtain high- and low-frequency fusion features; S15: Input the high- and low-frequency splicing features into the 1x1 convolution layer to adjust the number of feature map channels; S16: The high- and low-frequency concatenation features after the 1x1 convolution layer are weighted through the attention mechanism to obtain high- and low-frequency enhanced features.

4. The data-feature dual closed-loop enhanced detection system for a locomotive sand spreading device according to claim 3, characterized in that: In step S12, the high-frequency feature enhancement module includes six cascaded groups of high-frequency enhancement units, each group of high-frequency enhancement units includes a cascaded GhostConv layer and a GELU activation function; The input of the first group of high-frequency enhancement units is used as the GELU activation function input of the six groups of high-frequency enhancement units; The input of the second group of high-frequency enhancement units is used as the GELU activation function input of the next five groups of high-frequency enhancement units; The input of the third group of high-frequency enhancement units is used as the GELU activation function input of the next four groups of high-frequency enhancement units; The input of the fourth group of high-frequency enhancement units is used as the GELU activation function input of the next three groups of high-frequency enhancement units; The input of the fifth group of high-frequency enhancement units is used as the GELU activation function input of the next two groups of high-frequency enhancement units; The input of the sixth group of high-frequency enhancement units is used as the GELU activation function input of the sixth group of high-frequency enhancement units; The input of the first group of high-frequency enhancement units is the upsampled high-frequency features; The output of the sixth group of high-frequency enhancement units is to enhance high-frequency characteristics.

5. The data-feature dual closed-loop enhanced detection system for a locomotive sand spreading device according to claim 3, characterized in that: In step S13, the low-frequency feature enhancement module includes three branches; The first branch includes the Transformer block; The second branch consists of a cascade of average pooling layers and Transformer blocks; The third branch includes the cascaded average pooling layer and Transformer block; The Transformer block consists of a cascade of a first-layer normalization, an attention layer, a second-layer normalization, and a feedforward neural network. The input of the first-layer normalization is used as the input of the second-layer normalization. The input of the second-layer normalization is concatenated with the output of the feedforward neural network as the output of the Transformer block. The inputs of the first and second branches are low-frequency features, and the input of the third branch is the output of the average pooling layer of the second branch; The outputs of the second and third branches are fused and then fused with the output of the first branch, and added element-by-element to the input low-frequency features to obtain enhanced low-frequency features.

6. The data-feature dual closed-loop enhanced detection system for a locomotive sand spreading device according to claim 3, characterized in that: In step S14, the high- and low-frequency fusion features are calculated using the following formula: F fused =w·F low +(1-w)·F higg ; Where: F fused Indicates the high- and low-frequency fusion features; w∈[0,1] represents the fusion weight; F low Indicates enhanced low-frequency features; F high Indicates enhanced high-frequency features; Among them, the fusion weight w is the key parameter for feature fusion in the feature enhancement module.

7. The data-feature dual closed-loop enhanced detection system for a locomotive sand spreading device according to claim 1, characterized in that: The processing steps of the feedback regulation module are as follows: S21: Calculate the detection performance feedback index based on the mAP index value of the target detection model in the current training round and the mAP index value of the target detection model in the previous training round; The formula is: Indicates rising; Indicates a decline; Where: Represents the detection performance feedback indicator under the current training round; mAP (t) and mAP (t-1) Respectively represent the mAP index values ​​of the target detection model in the current training round and the previous training round; Among them, the calculation formula of the mAP indicator value is: Precision P (precision), recall R (recall), average precision (AP), and mean average precision mAP (mean Average Precision). Where: TP is the number of positive samples correctly detected by the model; FP is the number of samples where the model predicts negative samples as positive samples; FN is the number of samples where the model predicts positive samples as negative samples; N is the number of target categories in the dataset; AP is the probability of the model being predicted as negative. i represents the average accuracy of the i-th category target; S22: Calculating an attention feedback index based on the attention concentration of the target detection model in the current training round and the attention concentration of the target detection model in the previous training round; The formula is: Indicates rising; Indicates a decline; Where: Represents the attention feedback indicator under the current training round; and Represents the attention concentration of the target detection model in the current training round and the previous training round respectively; The calculation formula for attention concentration is: Where: N represents the number of batch feature maps; max(A i ) represents the maximum attention value of a single feature map; S23: performing weighted summation on the detection performance feedback index and the attention feedback index to obtain a global feedback total value; The formula is: Where: ω data +ω feat =1,ω data and ω feat represents weight; Among them, the Sigmoid function with time step control is used to dynamically adjust the weight ω data and ω feat : oh feat (t)=1-ω data (t); Where: t represents the time step of the current training; T represents the transition center point; α is used to control the smoothness of the transition; S24: When the global feedback value exceeds the set adjustment threshold, the key parameters of the pixel-level dynamic online enhancement of the data enhancement module and the feature fusion of the feature enhancement module are dynamically adjusted based on the detection performance feedback index and the attention feedback index: 1) If R data and R feat Both increase without adjusting the key parameters of the data enhancement module for pixel-level dynamic online enhancement and the feature enhancement module for feature fusion; 2) If R data Decline, R feat Increase, adjust the key parameters of the data enhancement module for pixel-level dynamic online enhancement: brightness factor β, contrast factor a and perturbation probability δ; 3) If R data Rising, R feat Decrease, adjust the key parameters of the feature enhancement module for feature fusion: fusion weight w; 4) If R data and R feat At the same time, the key parameters of the data enhancement module for pixel-level dynamic online enhancement and the feature enhancement module for feature fusion are adjusted.

8. The data-feature dual closed-loop enhanced detection system for a locomotive sand spreading device according to claim 7, characterized in that: The formula for the key parameters of the feedback adjustment module to adjust the data enhancement module for pixel-level dynamic online enhancement and the feature enhancement module for feature fusion is: 1) The formula for adjusting the brightness factor β, contrast factor a and disturbance probability δ is expressed as: d (t+1) =d (t) *c1; Where: η a ,η β represents the fine-tuning step size; γ1 represents the attenuation factor; 2) The formula for adjusting the fusion weight w is expressed as: Where: η is the learning rate.

9. A data-feature dual closed-loop enhanced detection method for a locomotive sand spreading device, characterized in that: The data-feature dual closed-loop enhanced detection system of the locomotive sand spreading device according to claim 1 is implemented, comprising: S1: Acquire an image of the locomotive sand spreading device to be inspected; S2: Input the locomotive sand spreading device image into the trained object detection model to predict the sand spreading device and output the sand spreading device prediction result; The processing steps when training an object detection model are as follows: S201: Acquire a training data set; each set of data in the training data set includes an image of a locomotive sand spreading device and a corresponding sand spreading device bounding box; S202: Performing pixel-level dynamic online enhancement on the locomotive sand spreading device image by a data enhancement module to obtain an enhanced locomotive sand spreading device image; S203: Inputting the enhanced locomotive sand spreading device image into the target detection model to predict the sand spreading device and output the sand spreading device prediction result; in the target detection model, the feature enhancement module is used to separate, enhance and fuse the high-frequency and low-frequency features of the feature map; S204: Calculating a loss function based on the sand spreading device prediction result and the corresponding sand spreading device bounding box label, and optimizing the parameters of the object detection model using the loss function; S205: Dynamically adjusting key parameters of the data enhancement module for pixel-level dynamic online enhancement and the feature enhancement module for feature fusion based on the detection performance feedback and attention feedback of the target detection model through the feedback adjustment module; S206: Repeat steps S201 to S205 to iteratively train the target detection model until the model converges or the maximum number of training rounds is reached; S3: The prediction result of the sand spreading device is used as the detection result of the locomotive sand spreading device image.

10. The data-feature dual closed-loop enhanced detection method for a locomotive sand spreading device according to claim 9, characterized in that: In step S203, the processing steps of the target detection model include: S2031: The backbone network sequentially extracts features from the enhanced locomotive sand-spreading device image through a feature enhancement module, a convolution block, and a C2F detail enhancement convolution block to obtain an initial feature map. The feature enhancement module is used to separate the input enhanced locomotive sand-spreading device image into high-frequency features and low-frequency features, enhance the high-frequency features and low-frequency features respectively, and then fuse them to obtain high- and low-frequency enhanced features. S2032: The neck network upsamples and concatenates the initial feature maps and then inputs them into the C2F detail enhancement convolution block to obtain a fused feature map. S2033: The detection head processes the fused feature map through the convolution block and performs sand spreading device detection to obtain a sand spreading device prediction result, including a bounding box, category label, and confidence level of the sand spreading device.