Method and system for detecting visual defects of outer wall of boiler pipeline based on attention mechanism

By combining a convolutional backbone network and a lightweight Transformer structure, high-precision detection of visual defects on the outer wall of boiler pipes was achieved, solving the problems of global dependence and weak defect perception, and improving the accuracy and adaptability of detection.

CN121767756APending Publication Date: 2026-03-31HAIMEN POWER PLANT OF HUANENG (GUANGDONG) ENERGY DEV CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610119274.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-01-28
Publication Date
2026-03-31

AI Technical Summary

Technical Problem

Existing visual inspection methods for boiler pipes mainly rely on local convolution, making it difficult to establish global dependencies and lacking the ability to detect shallow cracks and fine corrosion. The accuracy and robustness of the detection need to be optimized.

Method used

A convolutional backbone network is used to extract multi-scale features, combined with a lightweight Transformer structure for global attention modeling, and a high-frequency channel attention module is used for defect attention learning. The output defect mask is used to represent the defect probability of each pixel.

Benefits of technology

It improves the accuracy and robustness of defect detection in complex backgrounds, reduces the false negative rate and the high false negative rate, and meets the needs of real-time industrial detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121767756A_ABST
    Figure CN121767756A_ABST
Patent Text Reader

Abstract

The invention discloses a method and system for detecting visual defects of the outer wall of an attention mechanism boiler pipeline, and belongs to the technical field of boiler pipeline detection.The method comprises the steps that image data of the outer wall of the boiler pipeline are obtained, and multi-scale features of the image data are extracted through a convolutional backbone network; carrying out global attention modeling by adopting a lightweight Transform structure to obtain global processing features containing global correlation dependency information and defect position information; defect attention learning is carried out through a high-frequency channel attention module, and weak defect strengthening features are obtained; and after the global processing features, the middle-layer features in the multi-scale features and the weak defect strengthening features are subjected to up-sampling and jump connection processing, a defect mask of the outer wall of the boiler pipeline is output through convolution operation, and the defect mask represents the defect probability of each pixel. The method guarantees the detection precision, gives consideration to the real-time performance, effectively adapts to a complex background faced by the outer wall of the boiler pipeline, is better in robustness, and is suitable for an industrial scene.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of boiler pipeline inspection technology, specifically relating to a method and system for detecting visual defects on the outer wall of boiler pipelines using an attention mechanism. Background Technology

[0002] Boiler pipes are critical pressure-bearing components in thermal power plant operations. Their outer walls are constantly exposed to high temperature, high pressure, and corrosive environments, making them prone to surface defects such as cracks, corrosion, and bulging. Traditional inspection methods rely on manual inspections or ordinary machine vision, which suffer from low inspection efficiency, high missed detection rates, and poor environmental adaptability.

[0003] As an improvement, deep learning-based visual detection methods, such as Convolutional Neural Networks (CNNs), have been widely used in boiler and pipeline defect identification in recent years. CNNs can automatically extract features, but their receptive field is limited, resulting in insufficient response to large-scale background noise, complex textures, and weak defects (such as shallow cracks or minor corrosion). Furthermore, they lack the ability to model long-distance pixel dependencies. When reflections, dust, or scale appear on the pipe surface, traditional convolutional models easily misidentify these spurious features as defects or miss real defects.

[0004] To address these issues, existing technologies have proposed multi-scale network structures based on improved convolutions (such as U-Net and ResNet), as well as enhanced networks incorporating channel attention or spatial attention. However, these methods still primarily rely on local convolutions, making it difficult to establish global dependencies. While the Transformer architecture (a commonly used data representation processing model) can model long-range dependencies, its computational cost is too high for high-resolution detection tasks, making it unsuitable for real-time industrial deployment. Therefore, in summary, current visual inspection methods for boiler pipes suffer from several drawbacks: they rely heavily on local convolutions, making it difficult to establish global dependencies; their ability to perceive shallow cracks and fine corrosion is limited; and their detection accuracy and robustness require further optimization. Summary of the Invention

[0005] This invention provides a method and system for detecting visual defects on the outer wall of boiler pipes using an attention mechanism. The aim is to address the problems in current visual inspection methods for boiler pipes, which rely primarily on local convolution, making it difficult to establish global dependencies; have limited ability to detect shallow cracks and fine corrosion; and require further optimization in terms of detection accuracy and robustness.

[0006] To achieve the above objectives, the present invention adopts the following technical solution: This invention provides a method for detecting visual defects on the outer wall of boiler pipes using an attention mechanism, comprising the following steps: S1. Obtain image data of the outer wall of the boiler pipe, and extract multi-scale features of the image data through a convolutional backbone network; Among them, multi-scale features include deep features, shallow features, and mid-scale features; S2. Based on deep features in multi-scale features, a lightweight Transformer structure is used to perform global attention modeling to obtain global processing features that include global correlation dependency information and defect location information. S3. Based on shallow features in multi-scale features, defect attention learning is performed through a high-frequency channel attention module to obtain weak defect enhancement features. S4. After upsampling and skip connection processing of global processing features, mid-level features in multi-scale features, and weak defect enhancement features, the defect mask of the boiler pipe outer wall is output through convolution operation. The defect mask is used to represent the defect probability of each pixel; thus completing the detection of visual defects on the boiler pipe outer wall using the attention mechanism. The convolutional backbone network, the lightweight Transformer structure, and the high-frequency channel attention module together form the visual defect detection network for the outer wall of boiler pipes. This network is obtained through training.

[0007] In some implementations, in S1, the convolutional backbone network includes ResNet or MobileNetV3.

[0008] In some implementations, in S1, shallow features are used to capture texture and edges, medium features are used to capture shape and structure, and deep features are used to capture semantics and defect categories.

[0009] In some implementations, in S2, global attention modeling specifically includes: first dividing the deep features into several matrices of the same size, then converting each matrix into a one-dimensional matrix, and after linear embedding and positional encoding, calculating self-attention to capture global dependencies, and restoring the result to a three-dimensional matrix of global processing features.

[0010] Furthermore, in S2, the calculation method for linear embedding and positional encoding adopts the following formula: ; in, This is the result of linear embedding and positional encoding. The deep features are in the form of a transformed one-dimensional matrix. For training parameters, For learnable location encoding; The self-attention is calculated using the following formula: ; ; ; ; in, For query matrix, For the key matrix, For value matrices, This is the result after self-attention calculation. for The length of the mold, This is the activation function.

[0011] In some implementations, the specific process of defect attention learning in S3 includes: performing convolution operations on shallow features to obtain an attention feature map, obtaining an attention weight map through the Softmax activation function, and assigning the attention weight map to the shallow features themselves to obtain weak defect enhancement features.

[0012] Furthermore, in S3, the calculation method for the weak defect reinforcement feature is as follows: ; in, For weak defect reinforcement features, These are shallow features. For convolution operations, For activation function, This is an element-wise multiplication operation.

[0013] In some implementations, the specific process of upsampling and skip connection processing in S4 includes: upsampling the global processing features and adding them to the intermediate layer features, performing convolution operation on the added result and upsampling again, and then adding it to the weak defect enhancement features to obtain the feature matrix.

[0014] In some implementations, the defect mask is calculated in S4 using the following formula: ; in, As a defect mask, For activation function, For convolution operations, This is the feature matrix obtained after upsampling and skip connection processing; The defect probability for each pixel.

[0015] This invention also provides a detection system for visual defects on the outer wall of boiler pipes using an attention mechanism, to implement the aforementioned method for detecting visual defects on the outer wall of boiler pipes using an attention mechanism. The system includes a data acquisition module, a global processing feature acquisition module, a defect attention learning module, and a defect mask output module, wherein: The data acquisition module is used to: acquire image data of the outer wall of boiler pipes and extract multi-scale features of the image data through a convolutional backbone network; Among them, multi-scale features include deep features, shallow features, and mid-scale features; The global processing feature acquisition module is used to: based on deep features in multi-scale features, use a lightweight Transformer structure to perform global attention modeling, and obtain global processing features that include global correlation dependency information and defect location information; The defect attention learning module is used to: learn weak defect enhancement features by performing defect attention learning through the high-frequency channel attention module based on shallow features in multi-scale features; The defect mask output module is used to: upsample and skip-connect the global processing features, mid-level features in the multi-scale features, and weak defect enhancement features, and then output the defect mask of the boiler pipe outer wall through convolution operation. The defect mask is used to represent the defect probability of each pixel; and complete the detection of visual defects on the boiler pipe outer wall using the attention mechanism. The convolutional backbone network, the lightweight Transformer structure, and the high-frequency channel attention module together form the visual defect detection network for the outer wall of boiler pipes. This network is obtained through training.

[0016] Compared with existing technologies, the present invention provides a method and system for detecting visual defects on the outer wall of boiler pipes using an attention mechanism, which has the following advantages: This invention discloses an attention-based method for detecting visual defects on the outer wall of boiler pipes. It acquires images of the pipe's outer wall and extracts multi-scale features through a convolutional backbone network. These multi-scale features cover shallow, medium, and deep layers, simultaneously capturing image information from different dimensions and considering both local details and global semantics. Based on deep features, a lightweight Transformer structure is used for global attention modeling. This lightweight design ensures it meets the requirements of real-time industrial deployment. The resulting global processing features include global correlation dependency information and defect location information, improving the ability to identify global correlations of defects in complex backgrounds. For shallow features, this invention uses a high-frequency channel attention module for defect attention learning, specifically enhancing the response to weak defects such as shallow cracks and minor corrosion, improving the perception and accuracy of weak defects. Through upsampling and skip connections, global processing features, medium-level features, and weak defect enhancement features are deeply fused, outputting a defect mask representing the defect probability per pixel. This allows for the synergistic combination of global information, local structure, and weak defect features. This invention combines the advantages of local feature extraction from convolution with the global modeling capabilities of self-attention, ensuring detection accuracy while maintaining real-time performance. It can effectively cope with complex background interferences such as high-temperature and high-pressure corrosion, reflection, dust, and scaling on the outer wall of boiler pipes, reducing the false negative and false positive rates, improving the accuracy and robustness of detection, and adapting to the actual detection needs of industrial scenarios. Attached Figure Description

[0017] The accompanying drawings are provided to further understand the invention and constitute a part of this invention. The illustrative embodiments of the invention and their descriptions are used to explain the invention and do not constitute an improper limitation of the invention.

[0018] Figure 1 This is a flowchart illustrating a method for detecting visual defects on the outer wall of boiler pipes using an attention mechanism, as described in this invention.

[0019] Figure 2 This is a schematic diagram of the architecture of the visual defect detection network for the outer wall of boiler pipes in the attention mechanism method of the present invention. Detailed Implementation

[0020] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of 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. The components of the embodiments of the present invention described and shown in the accompanying drawings can generally be arranged and designed in various different configurations.

[0021] Therefore, the following detailed description of the embodiments of the invention provided in the accompanying drawings is not intended to limit the scope of the claimed invention, but merely to illustrate selected embodiments of the invention. All other embodiments obtained by those skilled in the art based on the embodiments of the invention without inventive effort are within the scope of protection of the invention.

[0022] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0023] It should be noted that the apparatus and methods disclosed in the embodiments herein can also be implemented in other ways. The apparatus embodiments described above are merely illustrative; for example, the flowcharts and block diagrams in the accompanying drawings show the architecture, functionality, and operation of possible implementations of apparatus, methods, and computer program products according to various embodiments herein. In this regard, each block in a flowchart or block diagram may represent a module, program, or part of code containing one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than those marked in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram and / or flowchart, and combinations of blocks in block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system to perform the specified function or action, or can be implemented using a combination of dedicated hardware and computer instructions.

[0024] In addition, the functional modules in the various embodiments of this article can be integrated together to form an independent part, or each module can exist independently, or two or more modules can be integrated to form an independent part.

[0025] How can we provide a visual inspection method that maintains detection speed while possessing global feature-dependent modeling and weak defect enhancement perception capabilities, thereby potentially improving the accuracy and robustness of boiler pipe outer wall defect detection?

[0026] like Figure 1 As shown, the present invention discloses a method for detecting visual defects on the outer wall of boiler pipes using an attention mechanism, comprising the following steps: S1. Obtain image data of the outer wall of the boiler pipe, and extract multi-scale features of the image data through a convolutional backbone network; Among them, multi-scale features include deep features, shallow features, and mid-scale features; S2. Based on deep features in multi-scale features, a lightweight Transformer structure is used to perform global attention modeling to obtain global processing features that include global correlation dependency information and defect location information. S3. Based on shallow features in multi-scale features, defect attention learning is performed through a high-frequency channel attention module to obtain weak defect enhancement features. S4. After upsampling and skip connection processing of global processing features, mid-level features in multi-scale features, and weak defect enhancement features, the defect mask of the boiler pipe outer wall is output through convolution operation. The defect mask is used to represent the defect probability of each pixel; thus completing the detection of visual defects on the boiler pipe outer wall using the attention mechanism. The convolutional backbone network, the lightweight Transformer structure, and the high-frequency channel attention module together form the visual defect detection network for the outer wall of boiler pipes. This network is obtained through training.

[0027] This invention discloses a method for detecting visual defects on the outer wall of boiler pipes using an attention mechanism. It proposes a network structure for detecting visual defects on the outer wall of boiler pipes based on an attention mechanism. This network structure includes a multi-scale feature extraction layer, a global attention modeling module, a weak defect enhancement module, and a mask output decoding layer. The multi-scale feature extraction module and the global attention modeling module achieve global dependency modeling for complex backgrounds; the weak defect enhancement module enhances the perception of shallow cracks and minor corrosion; the structure combines convolution and attention to balance accuracy and real-time performance; and this invention maintains high robustness under complex lighting and reflective environments, demonstrating excellent environmental adaptability.

[0028] The following detailed description of the attention mechanism-based method and system for detecting visual defects on the outer wall of boiler pipes, based on specific embodiments, further illustrates the present invention.

[0029] like Figure 2 As shown, the detection method of the present invention employs a visual defect detection network for the outer wall of boiler pipes obtained through training.

[0030] The boiler pipe external wall visual defect detection network includes a multi-scale feature extraction module. The input boiler pipe external wall image is used... This invention addresses the challenge of detecting defects on the outer walls of boiler pipes, where target sizes vary significantly. For example, tiny cracks may be only a few pixels wide, while corrosion areas can occupy large areas. Bulging / scaling is often accompanied by strong light reflection and background noise. Single-scale convolutional features cannot simultaneously capture both local details and global semantics. Therefore, this invention extracts multi-scale features, enabling shallow features to capture texture and edges (high resolution, low semantics), mid-level features to capture shape and structure, and deep features to capture semantics and defect categories (low resolution, high semantics). Multi-scale features are extracted using convolutional backbone networks, which continuously downsample during computation, resulting in increasingly smaller output scales. Therefore, the outputs of networks at different depths during the convolutional backbone network computation are used as features at different scales. , These represent shallow, mid-level, and deep features, respectively. , Shallow features focus on local details such as texture and edges, mid-level features capture shape and structural information, and deep features mine semantics and defect categories. This allows global attention modeling and weak defect enhancement to accurately match the required features, improving the efficiency of feature processing and ensuring improved detection accuracy.

[0031] In practical applications, the convolutional backbone can employ deep convolutional neural network architectures such as ResNet or MobileNetV3 for feature extraction. Both are mature architectures validated in the field of feature extraction. ResNet effectively mitigates the vanishing gradient problem in deep networks through residual connections, enabling stable extraction of high-quality multi-scale features. MobileNetV3, with its lightweight nature, further reduces computational overhead. This not only ensures the effectiveness and reliability of multi-scale feature extraction but also allows for flexible selection based on the hardware conditions of the actual deployment scenario. It meets the feature quality requirements of high-precision detection while adapting to resource-constrained industrial environments, thus improving practicality and adaptability.

[0032] In the detection method of this invention, the visual defect detection network for the outer wall of boiler pipes includes a global attention modeling module. CNN convolutions, limited by the computational method of convolution kernel traversal, can only focus on neighboring pixels. Therefore, this invention introduces a lightweight Transformer structure on mid-to-high-level features to capture global dependencies. However, the Transformer cannot perceive regions; therefore, positional encoding embedding is performed on the features first. Divide into N matrices of equal size, each of which can be transformed into a one-dimensional matrix, i.e. It can be represented as The calculation method, based on linear embedding and learnable positional encoding, uses the following formula: ; in, This is the result of linear embedding and positional encoding. The deep features are in the form of a transformed one-dimensional matrix. For training parameters, It is a learnable location encoding.

[0033] Self-attention is then calculated using the following formula to capture global dependencies: ; ; ; ; in, For query matrix, For the key matrix, For value matrices, This is the result after self-attention calculation. for The length of the mold, This is the activation function. We obtain... Includes global dependency information and defect location information, Restored to a three-dimensional matrix.

[0034] This invention makes the global dependency capture process more systematic and operable by dividing the matrix, transforming dimensions, linear embedding, position encoding, self-attention calculation and recovery of the three-dimensional matrix. The introduction of position encoding effectively solves the problem that Transformer cannot perceive regions, ensuring the consistency and accuracy of global attention modeling in different implementation scenarios, thereby stably outputting global processing features containing global correlation and defect location information.

[0035] In the detection method of this invention, the visual defect detection network for the outer wall of boiler pipes includes a weak defect enhancement module. To enhance the response to weak defects such as shallow cracks and corrosion, a high-frequency channel attention module is designed to target shallow features. We perform defect attention learning to enhance the ability to identify weak defects; the calculation method for the weak defect reinforcement features is as follows: ; in, For weak defect reinforcement features, These are shallow features. For convolution operations, For activation function, This is an element-wise multiplication operation. The present invention utilizes... To achieve defect-based attention learning, we first learn the attention feature map through convolution, and then... The activation function generates an attention weight map, and then the weights are assigned to the shallow features themselves, making the logic of strengthening weak defects clearer, ensuring that the allocation of attention weights is accurate and controllable, and enabling targeted strengthening of the response of weak defect features. This effectively reduces the false negative rate of weak defects such as shallow cracks and fine corrosion, and improves the coverage of various defects by the method of this invention.

[0036] Finally, the present invention provides a method for detecting visual defects on the outer wall of boiler pipes using an attention mechanism. During the decoding and mask output stages, the method... , and After upsampling and skip connections, the feature matrix O is obtained; ; Output Defect Mask ; in, As a defect mask, For activation function, For convolution operations, This is the feature matrix obtained after upsampling and skip connection processing; The defect probability for each pixel.

[0037] This invention, through the specific process of upsampling and skip connections and the calculation method of defect mask, can achieve deep fusion of features of different scales and types, which not only preserves global dependency information, but also does not lose local structure and weak defect details. By clarifying the generation method of defect mask and the range of pixel defect probability, the defect representation is more accurate and intuitive, which facilitates the subsequent judgment and processing of defects and ensures the consistency of defect mask output.

[0038] This invention also provides a detection system for visual defects on the outer wall of boiler pipes using an attention mechanism, comprising a data acquisition module, a global processing feature acquisition module, a defect attention learning module, and a defect mask output module, wherein: The data acquisition module is used to: acquire image data of the outer wall of boiler pipes and extract multi-scale features of the image data through a convolutional backbone network; Among them, multi-scale features include deep features, shallow features, and mid-scale features; The global processing feature acquisition module is used to: based on deep features in multi-scale features, use a lightweight Transformer structure to perform global attention modeling, and obtain global processing features that include global correlation dependency information and defect location information; The defect attention learning module is used to: learn weak defect enhancement features by performing defect attention learning through the high-frequency channel attention module based on shallow features in multi-scale features; The defect mask output module is used to: upsample and skip-connect the global processing features, mid-level features in the multi-scale features, and weak defect enhancement features, and then output the defect mask of the boiler pipe outer wall through convolution operation. The defect mask is used to represent the defect probability of each pixel; and complete the detection of visual defects on the boiler pipe outer wall using the attention mechanism. The convolutional backbone network, the lightweight Transformer structure, and the high-frequency channel attention module together form the visual defect detection network for the outer wall of boiler pipes. This network is obtained through training.

[0039] In summary, the present invention provides a method and system for detecting visual defects on the outer wall of boiler pipes using an attention mechanism. Based on a lightweight attention mechanism and a global dependency modeling network for detecting visual defects on the outer wall of boiler pipes, this invention achieves high-precision defect detection in complex backgrounds by fusing the local feature extraction capability of convolution with the global modeling capability of self-attention.

[0040] Finally, it should be noted that the above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention in any way. Anyone skilled in the art can readily implement the present invention according to the description and above. Any modifications, alterations, or equivalent variations made using the technical content disclosed above are equivalent embodiments of the present invention. Furthermore, any modifications, alterations, or variations made to the above embodiments based on the essential technology of the present invention are still within the protection scope of the present invention.

Claims

1. A method for detecting visual defects on the outer wall of a boiler tube with an attention mechanism, characterized by, The method comprises the following steps: S1, acquiring image data of the outer wall of the boiler pipeline, and extracting multi-scale features of the image data through a convolution backbone network; The multi-scale features comprise deep features, shallow features and middle features; S2, based on the deep features in the multi-scale features, a global attention modeling is performed using a lightweight Transformer structure to obtain global processing features containing global correlation dependency information and defect position information; S3, based on the shallow features in the multi-scale features, a defect attention learning is performed through a high-frequency channel attention module to obtain weak defect reinforcement features; S4, after the global processing features, the middle features in the multi-scale features and the weak defect reinforcement features are up-sampled and processed through a jump connection, a defect mask of the outer wall of the boiler pipeline is output through convolution operation, and the defect mask is used to represent the defect probability of each pixel; and the detection of the visual defects of the outer wall of the boiler pipeline is completed through the attention mechanism. The convolution backbone network, the lightweight Transformer structure and the high-frequency channel attention module jointly form a boiler pipeline outer wall visual defect detection network, and the boiler pipeline outer wall visual defect detection network is obtained through training.

2. The method of claim 1, wherein the method further comprises: In the S1, the convolution backbone network comprises a ResNet or a MobileNetV3.

3. The method of claim 1, wherein the method further comprises: In the S1, the shallow features are used to capture textures and edges, the middle features are used to capture shapes and structures, and the deep features are used to capture semantics and defect categories.

4. The method of claim 1, wherein the method further comprises: In the S2, the global attention modeling specifically comprises the following steps: the deep features are divided into a plurality of matrices with the same size, each matrix is converted into a one-dimensional matrix, linear embedding and position encoding are performed, self-attention is calculated to capture global dependency, and the result is restored into a three-dimensional matrix as the global processing features.

5. The method of claim 4, wherein the method further comprises: In the S2, the calculation method of the linear embedding and the position encoding adopts the following formula: ; wherein, is the result of linear embedding and positional encoding, is the deep feature in one-dimensional matrix form after conversion, is the training parameter, is the learnable position encoding; The calculation method of the self-attention adopts the following formula: ; ; ; ; wherein, is a query matrix, is a key matrix, is a value matrix, is a result of self-attention computation, is is a modulus length, is an activation function.

6. The method of claim 1, wherein the method further comprises: In the S3, the specific process of the defect attention learning comprises the following steps: the shallow features are subjected to convolution operation to obtain an attention feature map, an attention weight map is obtained through a Softmax activation function, the attention weight map is assigned to the shallow features, and the weak defect reinforcement features are obtained.

7. The method of claim 6, wherein the method further comprises: In the S3, the calculation method of the weak defect reinforcement features adopts the following formula: ; wherein, is a weak defect strengthening feature, is a shallow feature, is a convolution operation, is an activation function, is an element-wise multiplication operation.

8. The method of claim 1, wherein the method further comprises: In the S4, the specific process of the up-sampling and the jump connection processing comprises the following steps: the global processing features are up-sampled and added to the middle features, the result after the addition is subjected to convolution operation and then up-sampled again, and then added to the weak defect reinforcement features to obtain a feature matrix.

9. The method of claim 1, wherein the method further comprises: determining a location of the defect on the outer wall of the boiler tube based on the detected defect. In the S4, the calculation method of the defect mask adopts the following formula: ; wherein, is a defect mask, is an activation function, is a convolution operation, is a feature matrix obtained after up-sampling and jump connection processing; is a defect probability of each pixel.

10. A system for detecting visual defects on the outer wall of a boiler tube using an attention mechanism, for implementing the method for detecting visual defects on the outer wall of a boiler tube using an attention mechanism according to any one of claims 1 to 9, characterized in that, The method comprises a data acquisition module, a global processing feature acquisition module, a defect attention learning module and a defect mask output module, wherein: The data acquisition module is configured to acquire image data of the outer wall of the boiler pipeline, and extract multi-scale features of the image data through a convolution backbone network; The multi-scale features comprise deep features, shallow features and middle features; The global processing feature acquisition module is configured to acquire the global processing features based on the deep features in the multi-scale features. The global processing feature acquisition module is configured to: based on deep features in the multi-scale features, model global attention by using a lightweight Transformer structure, and obtain global processing features containing global correlation dependency information and defect position information; The defect attention learning module is configured to: based on shallow features in the multi-scale features, perform defect attention learning by using a high-frequency channel attention module, and obtain weak defect reinforcement features. The defect mask output module is configured to: after upsampling and jump connection processing of the global processing features, the middle features in the multi-scale features, and the weak defect reinforcement features, output a defect mask of the outer wall of the boiler pipeline by using convolution operation, the defect mask is used to represent the defect probability of each pixel, and the detection of the visual defects of the outer wall of the boiler pipeline is completed by using the attention mechanism. The convolution backbone network, the lightweight Transformer structure, and the high-frequency channel attention module jointly form a boiler pipeline outer wall visual defect detection network, and the boiler pipeline outer wall visual defect detection network is obtained by training.