A railway scene image enhancement method based on image feature aggregation model
By employing multi-stage processing and feature fusion techniques, this method addresses the shortcomings of existing super-resolution methods for railway scene images in identifying regions of interest, thereby improving the quality and efficiency of super-resolution reconstruction of railway scene images and reducing model complexity.
Patent Information
- Application Number
- CN202510990388.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-18
- Publication Date
- 2025-10-31
- Estimated Expiration
- 2045-07-18
AI Technical Summary
Existing image super-resolution methods struggle to effectively distinguish regions of interest in railway scenes, treating all regions the same, which leads to model parameter inflation. Furthermore, they fail to fully utilize the features of nearby devices, resulting in poor super-resolution performance for distant devices.
A multi-stage processing strategy is adopted, which extracts straight line features through the Schar operator, enhances key straight line features by combining morphological erosion and dilation operators, realizes cross-regional feature interaction by using an asymmetric global attention mechanism, and improves distant feature representation by using a railway axial feature fusion mechanism.
It improves the quality and efficiency of super-resolution reconstruction of railway scene images, reduces model training complexity and inference time, and enhances the sensitivity to railway scene features, especially the identification and enhancement of railway boundary areas.
Smart Images

Figure CN120510403B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image processing technology, and more specifically, to a method for enhancing railway scene images based on an image feature aggregation model. Background Technology
[0002] Images are the main data type of railway security technology. However, in severe weather or low light conditions, the image acquisition capability of railway cameras is significantly degraded. The resulting low-quality images may cause the security system to fail to detect foreign objects, threatening train safety. Therefore, enhancing low-quality images is currently the primary prerequisite for ensuring the safety level of train operation.
[0003] Existing image super-resolution methods can be broadly classified into two categories: those based on Generative Adversarial Networks (GANs) and those based on residual and dense learning. Specifically, GANs methods are prone to producing erroneous textures and have poor real-time performance. While residual and dense learning-based methods avoid the problems of the former, they lack specific improvements for railway scenes. Consequently, they struggle to effectively distinguish regions of interest in railway scenes, treating all regions the same, leading to model parameter inflation. Furthermore, they fail to fully utilize the features of nearby devices, resulting in poor super-resolution performance for distant devices.
[0004] This invention proposes a railway scene image enhancement method based on an image feature aggregation model to address the performance issues caused by the insensitivity of general super-resolution models to railway scene features. It constructs a feature enhancement aggregation super-resolution model centered on the railway track, and performs operations such as boundary feature enhancement, scene content grouping, global feature enhancement, and railway track axial feature aggregation, thereby improving the super-resolution effect on railway scenes. Summary of the Invention
[0005] The purpose of this invention is to solve the problem in the prior art that it is difficult to effectively distinguish regions of interest in railway scenarios, and that treating all regions the same leads to the expansion of model parameters.
[0006] To achieve the above objectives, this invention provides a railway scene image enhancement method based on an image feature aggregation model, characterized by the following steps:
[0007] S1. A multi-stage processing strategy is adopted to enhance the features of the original image. The enhanced original image is divided into multiple image blocks of equal size at equal intervals. Based on the content clustering rule, the divided image blocks are grouped into multiple subgroups.
[0008] S2. Taking the feature subgroups within the bounds of the grouped subgroups as the core processing objects, feature association calculation is performed through an asymmetric global attention mechanism;
[0009] S3. The operation adopts the rail axial feature fusion mechanism to improve the characterization ability of the rail linear structure within the feature subgroup within the limit.
[0010] As a further improvement to this technical solution, the multi-stage processing strategy has the following working steps:
[0011] Step 1: Extract straight line features using the Schar operator;
[0012] Step 2: Noise reduction using a dual threshold mechanism, as follows: Set a brightness threshold and a region connectivity threshold. If the pixel brightness value is less than the brightness threshold and the size of the connected region is greater than the connectivity threshold, the region where the pixel is located will be an interference region that will cause misjudgment when extracting straight line features.
[0013] A mask is constructed, and the original straight line features obtained by the Schar operator are multiplied pixel by pixel with the constructed mask to filter out the features of the interfering regions and obtain the denoised image features.
[0014] Step 3: Enhance the features of the original image by using a linear feature amplification mechanism based on morphological erosion and dilation operators.
[0015] As a further improvement to this technical solution, the straight line feature is the gradient magnitude calculated by the Schar operator.
[0016] The beneficial effect of the above-mentioned further scheme is that there are a large number of significant linear feature elements (such as linear structures such as rails, sleepers, guardrails and posts) within the railway clearance area. Effective identification and reasonable utilization of these linear features are key factors in improving the quality of super-resolution reconstruction of railway scene images. Although existing feature enhancement methods based on deep learning can enhance the feature extraction capabilities of convolutional neural networks in different scenarios to a certain extent, these methods introduce too many additional parameters, significantly increasing the training complexity of the model and prolonging the inference time. Based on the balance between efficiency and accuracy, this study chooses to use computationally efficient traditional image processing operators for accurate extraction of linear features.
[0017] As a further improvement to this technical solution, the morphological erosion uses structuring elements to erode the denoised straight line features; the dilation operator uses structuring elements to check the position of each pixel and determine whether to retain the pixel.
[0018] The beneficial effects of the above-mentioned further scheme are that morphological erosion and dilation operators are used to further enhance the visual saliency of key line features, while effectively filtering out the remaining small line interference. The morphological erosion and dilation operators, the computationally efficient depthwise separable convolution, and the nonlinear activation function are alternately connected in a specific sequence. Among them, the morphological erosion and dilation operators can effectively eliminate the subtle interference that may be left by the threshold-based denoising method; the depthwise separable convolution significantly reduces the number of parameters compared with the standard convolution operation, improving computational efficiency while maintaining the model's expressive power.
[0019] Based on the above technical solution, the present invention can be further improved as follows.
[0020] As a further improvement to this technical solution, the content clustering rule is as follows: for each divided image block, the number of straight lines is counted, and a number threshold is set. Image blocks with a number of straight lines greater than the number threshold are classified as image block subgroups within the boundary.
[0021] Calculate the average brightness value of all pixels in each divided image block: add up the brightness value of each pixel in the image block, and then divide by the total number of pixels in the image block to obtain the average brightness value. Sensing the brightness threshold, if the average brightness value is greater than the preset brightness threshold, the image block is classified into the sky part image block subgroup.
[0022] Image blocks that do not meet the criteria for determining subgroups of image blocks within the boundary or those in the sky are classified as subgroups of image blocks outside the boundary.
[0023] As a further improvement to this technical solution, the working principle of the asymmetric global attention mechanism is as follows: perceiving subgroup features: features of subgroups within the boundary, features of subgroups in the sky, and features of subgroups outside the boundary; flattening the spatial dimension of each subgroup into a one-dimensional sequence; selecting the one-dimensional sequence features of the subgroups within the boundary after transformation as the "query" in attention calculation; and concatenating the one-dimensional sequence features of all subgroups after transformation as the "key" and "value".
[0024] The correlation between "query" and "key" is calculated using dot product operation, and the calculated correlation is scaled. Then, the correlation result is normalized to a probability value between 0 and 1, so that the sum of the probabilities of each "query" position being associated with the global feature is 1, thus obtaining the attention weight. Finally, information useful to the bounded subgroups is extracted from the "values" according to the attention weight, realizing cross-subgroup feature interaction. The one-dimensional sequence features after attention fusion are transformed back to two-dimensional space dimension to obtain the updated bounded subgroup features.
[0025] As a further improvement to this technical solution, the rail axial feature fusion mechanism in S3 includes feature richness statistics and axial attention fusion, which are used to enhance the blurred features in the distance by allowing clear features in the foreground to assist in enhancing the blurred features in the background.
[0026] As a further improvement to this technical solution, the working principle of the feature richness statistics is as follows: For each image block in the bounded image block group, the spatial domain is transformed to the frequency domain through a two-dimensional discrete Fourier transform. The discrete Fourier transform calculation involves summing the brightness values of each pixel in the image block using an exponential function to obtain the frequency domain, which presents the feature distribution of the image block in the frequency dimension. Then, the amplitude spectrum and phase spectrum are further calculated: the real and imaginary parts represented in the frequency domain are operated on, specifically by squaring them, summing them, and finally taking the square root to obtain the amplitude spectrum; the arctangent of the ratio of the imaginary part to the real part is taken to obtain the phase spectrum.
[0027] A comprehensive standard integrating the two measurement methods is constructed. The square root of the sum of squares of the difference between the amplitude spectrum and the corresponding element of two image patches is measured by Euclidean distance. A similarity measure is preset, and a weighted summation is used to determine the comprehensive measurement standard.
[0028] As a further improvement to this technical solution, the working principle of the axial attention fusion is as follows: the high-structure information features are linearly transformed to obtain components for attention calculation, and the correlation between the high-structure information features and the low-structure information features is calculated through the attention calculation components. The high-structure information is found to be most useful for enhancing the low-structure information features. After obtaining the enhancement part of the high-structure information to the low-structure information, it is fused with the original low-structure information features through residual connection. The fusion method is as follows: the enhancement part is directly added to the original low-structure information features, and finally the fused low-structure information features are obtained.
[0029] In addition to the objectives, features, and advantages described above, the present invention has other objectives, features, and advantages. The invention will now be described in further detail with reference to the figures. Attached Figure Description
[0030] Figure 1 This is a flowchart illustrating the overall workflow of the present invention. Detailed Implementation
[0031] The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0032] refer to Figure 1 A method for enhancing railway scene images based on an image feature aggregation model includes the following steps:
[0033] S1. A multi-stage processing strategy is adopted to enhance the features of the original image. Then, the original image after feature enhancement is divided into multiple image blocks of equal size at equal intervals. The image blocks are grouped into multiple subgroups based on content clustering rules.
[0034] The multi-stage processing strategy works as follows:
[0035] Step 1: Since railway scene images contain numerous significant linear features (such as rails, sleepers, guardrails, and posts) within their bounded areas, and the effective identification and reasonable utilization of these linear features are key factors in improving the quality of super-resolution reconstruction of railway scene images, existing technologies typically enhance the feature extraction capabilities of convolutional neural networks in different scenes to some extent through deep learning feature enhancement methods. However, these methods introduce too many additional parameters, increasing the training complexity and prolonging inference time. Based on a balance between efficiency and accuracy, this invention employs the Schar operator to extract linear features:
[0036] The Schar operator calculates pixel gradients using convolution kernels in both horizontal and vertical directions: where the horizontal convolution kernel... and vertical convolution kernel Example as follows: Vertical convolution kernel for: The above horizontal convolution kernel and vertical convolution kernel This is merely an example; any convolutional kernel with a similar structural form is essentially applicable to this invention.
[0037] Gradient calculation: for railway scene images Apply horizontal convolution kernels respectively and vertical convolution kernel Perform convolution operation to obtain the gradient magnitude. and direction : , ;in, This represents the convolution operation and the gradient magnitude. That is, the preliminary extracted linear features ;
[0038] The Schar operator, specifically the optimized high-pass filter, can extract straight line features while maintaining rotation invariance, providing higher gradient response sensitivity than traditional edge detection operators such as Sobel, and achieving higher detection accuracy for changes in target boundaries.
[0039] Step Two: To accurately determine the precise location of the railway clearance using straight line features, it is necessary to effectively eliminate interference from straight line features outside the clearance. The most significant source of interference comes from the overhead contact line in the sky area. Although the overhead contact line is a critical equipment facility within the railway clearance, the specific installation angle and shooting angle of the monitoring cameras along the railway line will still cause the overhead contact line to actually appear in the sky area outside the clearance on the original image plane, leading to misjudgments during the extraction of straight line features. Therefore, a dual thresholding mechanism is used for noise reduction: a brightness threshold is set to distinguish between the high brightness of the sky and the low brightness within the clearance. A regional connectivity threshold used to distinguish between large areas of the overhead contact system and small structures within the clearance. Pixel brightness values less than the brightness threshold Meanwhile, if the size of the connected region is greater than the connectivity threshold, it will cause misjudgment and interference when the region where the pixel is located is identified as a straight line feature extraction region; and a mask is constructed. To suppress interference areas and preserve features within the clearance, thus ensuring that the straight-line features of the rails and related track facilities are accurately preserved without interference, the masking rule is: only retain pixels with "low brightness (within the clearance) and large connected areas (non-noise points)" to suppress overhead contact line interference in the sky area. The specific expression is as follows:
[0040] ;
[0041] in, Let (x, y) be the brightness value of pixel (x, y). Let be the size of the connected region containing pixel (x, y). It is the brightness threshold. It is the connectivity threshold.
[0042] The original image features obtained based on the Schar operator are subjected to precise difference operation with the image features after adding a mask. Features of a straight line Pixel-wise multiplication is used to obtain high-quality denoised image features, expressed as follows: Where S(x,y) are the image features after processing by the Schar operator. The image features after denoising (only valid straight lines within the boundaries are retained).
[0043] After completing the accurate extraction and noise suppression of straight line features, in order to further enhance the visual saliency of key straight line features and effectively filter out the remaining small straight line interference, step three: enhance the extracted boundary features based on the straight line feature amplification mechanism of morphological erosion and dilation operators.
[0044] Morphological corrosion: using structural elements Denoising linear features Erosion is performed, and each pixel in the image is examined. If the structuring element is completely contained within the denoising feature in the region corresponding to the pixel (i.e., the region covered by the structuring element belongs to the effective linear feature region), the pixel is retained; otherwise, it is removed. Any technique that conforms to erosion and dilation operations is applicable to this operation step in this invention. Examples of morphological erosion and dilation operator calculation formulas are as follows:
[0045] Morphological erosion is used to retain only pixels whose structuring elements are completely contained within the feature region. The formula is: The dilation operator is used to preserve pixels where the structuring element intersects with the eroded feature region. The formula is: .
[0046] After extracting straight line features, denoising, and enhancing the extracted boundary features, the original image is divided into multiple equally sized image blocks at equal intervals. Based on content clustering rules, the image blocks are intelligently grouped into multiple subgroups with clear semantics. The following example demonstrates how the original image is divided into nine equally sized image blocks at equal intervals, and the image blocks are intelligently grouped into three subgroups with clear semantics. The three subgroups are: the image block subgroup inside the boundary (containing railway facilities within the boundary), the image block subgroup of the sky (mainly the background area), and the image block subgroup outside the boundary (containing vegetation, etc., in non-critical areas).
[0047] Content clustering rule: For each partitioned image patch, count the number of straight lines. And set a quantity threshold, and classify image blocks with more lines than the quantity threshold into image block subgroups within the boundary;
[0048] The average brightness value is calculated by averaging the brightness values of all pixels within each divided image block. First, the brightness values of each pixel in the image block are summed, then divided by the total number of pixels in the image block to obtain the average brightness value. ;in This represents the size of the image blocks after division.
[0049] Perceived brightness threshold The average brightness value of the pixels Greater than the brightness threshold The image patches are grouped into the sky portion of the image patch subgroup.
[0050] S2. Refine and enhance the features of the image data, taking the feature subgroups within the boundary as the core processing object, and realize cross-region feature association calculation through an asymmetric global attention mechanism;
[0051] Based on content clustering rules, image blocks are intelligently grouped into multiple subgroups with clear semantics. Although differentiated feature extraction and enhancement operations can be performed for different semantic regions, it also leads to potential field-of-view limitations. That is, when processing a specific subgroup, there may be a lack of global perception of information in other regions. Therefore, the above problem is solved by using an asymmetric global attention mechanism centered on the railway clearance area.
[0052] Asymmetric global attention mechanisms are used to break down information isolation between subgroups and construct efficient cross-regional feature interaction channels, enabling each subgroup to fully perceive and utilize global contextual information while maintaining its local feature advantages. An example of an asymmetric global attention mechanism is as follows: First, from the railway scene image, subgroup features are perceived: features within the boundary subgroup. (Including key linear structures such as rails and trackside equipment), Sky subgroup features (Background area, including the sky and distant objects under the sky), features of the boundary-bounded subgroups (e.g., vegetation around the track, non-critical buildings); to facilitate attention calculation, the spatial dimensions (length × width) of each subgroup are flattened into a one-dimensional sequence, resulting in... , , This transforms two-dimensional spatial features into one-dimensional sequence features, facilitating subsequent calculations and associations.
[0053] To emphasize the priority of the area within the boundary, only the flattened features of the subgroups within the boundary are selected. As a Query (denoted as Since the area within the clearance limit is a critical super-resolution region in the railway scenario, it should be allowed to dominate the overall information query, ensuring the priority of feature interaction in the core area;
[0054] To enable the bounded subgroups to obtain global information, the features of all subgroups (inside the bound, sky, outside the bound) are flattened and concatenated to form the Key (denoted as K) and Value (denoted as V). The Key is used to calculate the degree of association with the Query, and the Value is used to carry the global feature information to be fused. In this way, the bounded subgroups can find useful information from the entire scene.
[0055] Calculate the similarity between Query(Q) and Key(K), using the dot product operation to measure the degree of association between their corresponding elements. The formula is as follows: This operation yields a matrix, where each element reflects the correlation strength between a feature at a certain location within the bounded subgroup and the features of all subgroups globally, thus constructing a bridge between the features within the bounded subgroup and the global features. Because the feature dimension may affect computational stability, the result is divided by... ( Scaling the number of feature channels helps alleviate gradient vanishing or anomaly issues and makes attention distribution more reasonable.
[0056] For the above similarity matrix, use Function normalization, the formula is: ; The similarity values are converted into probabilities between 0 and 1, and the sum of each row is 1, resulting in an attention weight matrix. In the attention weight matrix, features at different positions in the bounded subgroups are assigned different weights based on their correlation with the global features, achieving "selective attention"—prioritizing features that are semantically strongly correlated with the bounded features (such as the correlation between railway tracks and guardrail structures) and suppressing irrelevant background noise (such as meaningless textures in the sky).
[0057] Combine the attention weight matrix with Multiplication, that is Based on weights from global features Useful information within the bounded subgroups can be extracted to enable cross-subgroup feature interaction. The bounded subgroups can be fused with the brightness information of the sky subgroup to help distinguish the orbital boundaries, or with the environmental texture information of the outer subgroups to make the scene more realistic after super-resolution.
[0058] The attention-fused one-dimensional sequence features are transformed back to two-dimensional space through a reshape operation to obtain the updated in-bound subgroup features. The updated features retain the advantages of the original local features within the boundary (such as the inherent structure of the rail) while incorporating global contextual information (such as background environment association), providing higher quality basic features for subsequent rail axial feature fusion and super-resolution reconstruction. While ensuring the priority of super-resolution effect in the region within the boundary, it improves the overall image super-resolution quality.
[0059] The asymmetric global attention mechanism enables bounded subgroups to selectively interact with other subgroups through attention, rather than performing computationally intensive fully connected attention computation. This has two advantages: firstly, it significantly reduces computational complexity and resource consumption; secondly, it ensures that the super-resolution reconstruction effect of the bounded region is prioritized.
[0060] In railway scene images, railway tracks typically constitute the main visual element of the image and exhibit obvious spatial distribution regularity: the railway track structure closer to the camera is larger and its geometric features are clearer and more obvious; as the railway track extends into the distance, its features gradually become blurred. The phenomenon of the above-mentioned features gradually attenuating along the track axis also appears on other linear railway infrastructure such as guardrails and ballast. Based on this observation, in this invention, S3, a railway track axis feature fusion mechanism is used. The railway track axis feature fusion mechanism includes feature richness statistics and axial attention fusion, which is used to learn the high-quality structural features of the nearby railway track and apply them to enhance the feature representation of the distant railway track.
[0061] The working principle of feature richness statistics is as follows: Each image patch within the bounded image patch group is transformed from the spatial domain to the frequency domain using a two-dimensional discrete Fourier transform to reveal its frequency component distribution characteristics; the calculation method of the discrete Fourier transform is as follows: ,in It is a frequency domain representation. These are the pixel values of the pixel block, where both M and N are equal to 3;
[0062] Based on the discrete Fourier transform, the amplitude spectrum and phase spectrum are further calculated:
[0063] The amplitude spectrum is obtained by performing operations on the real and imaginary parts of the frequency domain representation, specifically by squaring each part, summing them, and finally taking the square root. Taking the arctangent of the ratio of the imaginary part to the real part yields the phase spectrum: ;
[0064] To comprehensively evaluate the similarity between image patches, a combined metric based on Euclidean distance and a pre-selected similarity metric is constructed: Euclidean distance is used to measure the square root of the sum of squares of the differences between the amplitude spectra and corresponding elements of two image patches, reflecting the numerical differences in amplitude spectra; a pre-set similarity metric (based on the ratio of the inner product to the modulus of the amplitude spectra) measures the degree of similarity in feature distribution between two image patches; then, a weighted summation is used to determine the combined metric, thereby judging the similarity between image patches and further assisting in evaluating feature richness. The calculation formula is as follows:
[0065] ;
[0066] in, and These are the amplitude spectra of two image patches. and These are the amplitude spectra of two image patches.
[0067] Based on the aforementioned track axial feature fusion mechanism, the information richness of each image block within the boundary is evaluated. In this study, the image blocks ranking in the bottom 25% by feature richness are identified as "low-information blocks," thereby promoting the effective flow of features from high-information blocks to low-information blocks in a targeted manner. This ensures efficient transfer of key features while avoiding unnecessary consumption of computational resources.
[0068] In the processing of axial features of railway scene images, in order to enable effective interaction between low-structure information features (which can be understood as distant, blurry, and less detailed rail and surrounding features) and high-structure information features (i.e., nearby, clear, and more detailed rail and surrounding features) and to enhance the blurry features with clear features, axial attention fusion is adopted: Axial attention fusion linearly transforms the high-structure information features separately to obtain components for attention calculation, and calculates the degree of correlation between high-structure information features and low-structure information features through attention calculation components, and selects the high-structure information that is most useful for enhancing low-structure information features, thereby realizing intelligent feature selection and transmission;
[0069] After obtaining the enhancement portion of the high-structure information to the low-structure information, it is fused with the original low-structure information features through residual connections. The fusion method is as follows: the enhancement portion is directly added to the original low-structure information features, and the final fused low-structure information features are obtained. The corresponding mathematical expression is:
[0070] ;
[0071] in, Features of low-structure information Represents the i-th high-structure information feature tensor, and MSA is the attention computation component.
[0072] The foregoing has shown and described the basic principles, main features, and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The embodiments and descriptions in the specification are merely preferred examples and are not intended to limit the invention. Various changes and modifications can be made to the invention without departing from its spirit and scope, and all such changes and modifications fall within the scope of the present invention as claimed. The scope of protection of the present invention is defined by the appended claims and their equivalents.
Claims
1. A method for enhancing railway scene images based on an image feature aggregation model, characterized in that, Includes the following steps: S1. A multi-stage processing strategy is adopted to enhance the features of the original image. The enhanced original image is then divided into multiple image blocks of equal size at equal intervals. The segmented image patches are grouped into multiple subgroups based on content clustering rules; S2. Taking the bounded subgroups within the grouped subgroups as the core processing objects, feature association calculation is performed through an asymmetric global attention mechanism. S3. The rail axial feature fusion mechanism is adopted to improve the characterization ability of the linear structure of rails in subgroups within the clearance. The multi-stage processing strategy operates as follows: Step 1: Extract line features using the Schar operator; Step 2: Denoising using a dual thresholding mechanism, specifically as follows: Set a brightness threshold and a region connectivity threshold. Pixels with brightness values less than the brightness threshold, but whose connected regions are larger than the connectivity threshold, are considered interference regions that may lead to misjudgments when extracting line features; Construct a mask by multiplying the original line features obtained from the Schar operator with the constructed mask pixel by pixel to filter out interference region features, resulting in denoised image features; Step 3: Enhance the original image features using a line feature amplification mechanism based on morphological erosion and dilation operators; The straight line feature is the gradient magnitude calculated by the Schar operator; the morphological erosion uses a structuring element to erode the denoised straight line feature; the dilation operator uses a structuring element to check the position of each pixel and determine whether to retain the pixel. The rail axial feature fusion mechanism in S3 includes feature richness statistics and axial attention fusion, which are used to enhance the blurred features in the distance by using clear features in the foreground. The feature richness statistics transform the image patch from the spatial domain to the frequency domain through two-dimensional discrete Fourier transform and evaluate the information richness. Based on the information richness, the image patch is determined to be a low information patch or a high information patch. Axial attention fusion fuses the useful information of the high information patch into the low information patch through residual connection.
2. The railway scene image enhancement method based on the image feature aggregation model according to claim 1, characterized in that: The content clustering rule is as follows: set a quantity threshold, and classify image blocks with more lines than the quantity threshold into bounded subgroups.
3. The railway scene image enhancement method based on the image feature aggregation model according to claim 2, characterized in that: The working principle of the asymmetric global attention mechanism is as follows: Perceive subgroup features: features of the subgroup within the boundary, features of the subgroup in the sky, and features of the subgroup outside the boundary. Flatten the spatial dimension of each subgroup into a one-dimensional sequence. Select the one-dimensional sequence features of the subgroup within the boundary after transformation as the "query" in the attention calculation; and concatenate the one-dimensional sequence features of all subgroups after transformation as the "key" and "value". The correlation between "query" and "key" is calculated using dot product operation, and the calculated correlation is scaled. Then, the correlation result is normalized to a probability value between 0 and 1, so that the sum of the probabilities of each "query" position being associated with the global feature is 1, thus obtaining the attention weight. Finally, information useful to the bounded subgroup is extracted from the "value" according to the attention weight, realizing cross-subgroup feature interaction. The one-dimensional sequence features after attention fusion are transformed back to two-dimensional space dimension to obtain the updated bounded subgroup features.
4. The railway scene image enhancement method based on the image feature aggregation model according to claim 1, characterized in that: The working principle of the axial attention fusion is as follows: the high-structure information features are linearly transformed to obtain components for attention calculation. The correlation between the high-structure information features and the low-structure information features is calculated through the attention calculation components. After obtaining the enhancement part of the high-structure information to the low-structure information, it is fused with the original low-structure information features through residual connection. The fusion method is to directly add the enhancement part to the original low-structure information features to finally obtain the fused low-structure information features.
Citation Information
Patent Citations
Grouping non-local attention method based on deep learning
CN116011541A
Power transmission line infrared target detection method and system based on multistage feature enhancement fusion
CN117911821A