Glass vacuum solar collector tube defect detection method based on improved RT-DETR

By improving the RT-DETR model and combining a dynamic hybrid convolution module and a hierarchical attention fusion module, the problem of poor adaptability of existing models to complex textures and small defects is solved, and high-precision, lightweight defect detection of glass vacuum solar collector tubes is achieved.

CN120997138APending Publication Date: 2025-11-21CHANGZHOU UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511001552.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-21
Publication Date
2025-11-21

AI Technical Summary

Technical Problem

现有的缺陷检测模型对复杂纹理和微小缺陷适应性差、特征提取能力弱、自动化程度低。

Method used

An improved RT-DETR model is adopted, which combines a dynamic hybrid convolution module (DICM) and a hierarchical attention fusion module (HAFB), and introduces a transfer learning strategy to detect defects in glass vacuum solar collector tubes through multi-scale feature perception and attention mechanism.

Benefits of technology

It significantly improves the ability to perceive complex textures and minute defects, enhances the model's detection performance and generalization ability under small sample conditions, and achieves high-precision, lightweight defect detection, making it suitable for intelligent inspection in modern industry.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120997138A_ABST
    Figure CN120997138A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of defect detection, in particular to a glass vacuum solar collector tube defect detection method based on improved RT-DETR, which comprises the following steps: collecting surface defect images of a glass vacuum collector tube, constructing a data set, carrying out classification labeling, and constructing a source domain and target domain data set required by transfer learning; constructing an improved neural network model based on an RT-DETR detection framework: selecting ResNet-18 as a backbone network, and replacing a standard convolution structure of the backbone network with a dynamic hybrid convolution module so as to enhance the multi-scale feature extraction capability of the model; a hierarchical attention fusion module is introduced into the neck network, and the information expression ability of local and global features is improved; meanwhile, a Transform decoder is integrated so as to complete target query and prediction; a transfer learning strategy is introduced, pre-training is carried out on the constructed model, images with high similarity with a target data set are screened out through cosine similarity for migration, then fine tuning training is carried out on a target domain, and the convergence speed and the detection performance of the model under the small sample condition are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of defect detection technology, and in particular to a defect detection method for glass vacuum solar collector tubes based on an improved RT-DETR. Background Technology

[0002] As a key component of solar thermal utilization systems, the surface quality of glass vacuum solar collector tubes directly affects the heat collection efficiency and service life of the entire system. However, in actual production and transportation, minute defects such as scratches, cracks, bubbles, and protrusions often appear on the surface of the collector tubes. If these defects are not detected and addressed in time, they will seriously affect product performance and even lead to failure. Therefore, efficient and accurate detection of surface defects is of great practical significance. Currently, the detection methods widely used in the industry mainly include traditional image processing, machine learning algorithms (such as SVM and KNN), and manual visual inspection. However, these methods generally suffer from poor adaptability to complex textures and minute defects, weak feature extraction capabilities, and low automation. Although deep learning methods (such as YOLO, U-Net, and Faster R-CNN) have achieved certain results in industrial defect detection in recent years, they still have significant shortcomings in multi-scale modeling capabilities, adaptability to small sample scenarios, information fusion effects, and model deployment efficiency. Therefore, there is an urgent need for a novel detection method that integrates multi-scale feature perception, attention mechanisms, and transfer learning strategies to achieve high-precision, real-time, and lightweight detection of surface defects in glass vacuum solar collector tubes, thus meeting the pressing needs of intelligent detection in modern industry. Summary of the Invention

[0003] The technical problem to be solved by this invention is that existing defect detection models have poor adaptability to complex textures and minute defects, weak feature extraction capabilities, and low automation.

[0004] Therefore, this invention provides a defect detection method for glass vacuum solar collector tubes based on an improved RT-DETR.

[0005] The technical solution adopted by this invention to solve its technical problem is: A defect detection method for glass vacuum solar collector tubes based on improved RT-DETR, including... Step 1: Collect images of surface defects in glass vacuum heat collection tubes, construct a dataset and perform classification and labeling, while expanding the data using image enhancement and other methods, and constructing the source domain and target domain datasets required for transfer learning; Step 2: Construct an improved neural network model based on the RT-DETR detection framework: Select ResNet-18 as the backbone network and replace its standard convolutional structure with a dynamically hybrid convolutional module (DICM); introduce a hierarchical attention fusion module (HAFB) into the neck network; and integrate a Transformer decoder to complete target query and prediction. Step 3: Introduce a transfer learning strategy, pre-train the constructed model on a large-scale glass defect dataset, select images with high similarity to the target dataset through cosine similarity for transfer learning, and then fine-tune the training on the target domain. Step 4: Use the trained model to detect test images on the target dataset.

[0006] Furthermore, in step two, the Dynamic Hybrid Convolutional Module (DICM) introduces depth-separable convolutional kernels with different shapes and a dynamic weight mechanism.

[0007] Furthermore, in step two, depth-separable convolution kernels of different shapes include standard square convolution kernels. k × k Used to enhance local spatial context; horizontal strip convolution kernel 1× k b Enhanced horizontal structure modeling capabilities; vertical strip convolution kernels k b ×1 is used to capture vertical features.

[0008] Furthermore, in step two, DICM first extracts channel statistical features through global average pooling; then, it uses 1×1 convolution to generate three sets of weights. w 1 ,w 2 ,w [3] Each group corresponds to a convolutional branch. The weights of each group are normalized in the branch dimension by the Softmax function. Finally, the three depthwise separable convolutions of different shapes are weighted and fused. The fused result is further processed by the BatchNorm and SiLU activation functions.

[0009] Furthermore, in step two, depth-separable convolutions of different shapes output separately. Y 1 、Y 2 、Y 3. Global average pooling extracts channel statistical features: Three sets of weights are generated using 1×1 convolution: ,Will w Decomposed into three sets of weights[ w 1 ,w 2 ,w[3], each group corresponds to a convolutional branch, which is normalized in the branch dimension by the Softmax function to obtain a i The final output feature is a weighted fusion of the three convolutional branches. Where i represents the convolution kernel, This represents element-wise multiplication along the channel dimension.

[0010] Furthermore, in step two, DICM introduces a LayerScale mechanism, which introduces a learnable scaling factor into the residual path to control the residual length: , where is the learnable scaling factor, and the MLP branch can use a convolutional gating structure or a neural operator.

[0011] Furthermore, the two learnable scaling factors are independent learnable scaling coefficients applied by the LayerScale mechanism to the residual connections of the Mixer branch and the MLP branch, wherein... It is initialized to a preset value and automatically optimized during training using gradient descent.

[0012] Furthermore, the hierarchical attention fusion module combines local and global attention branches and performs refined fusion of input features through a hierarchical feature processing path. Two random feature maps x1 and x2 are subjected to channel dimensionality reduction through 1×1 convolutions. The two dimensionality-reduced feature maps are added together and fused through 3×3 grouped convolutions (group=4) to obtain baseline fused features. Local-global attention mechanisms are applied to the two dimensionality-reduced feature maps to form multi-scale spatial semantic features. The baseline fused features and multi-scale spatial semantic features are concatenated and further fused and recombined through convolutional layers.

[0013] Furthermore, the two feature maps after dimensionality reduction in the hierarchical attention fusion module are respectively represented as follows: Baseline fusion features are Multi-scale spatial semantic features are , The baseline fusion features and multi-scale spatial semantic features are concatenated and further fused and recombined through convolutional layers to obtain... .

[0014] Furthermore, in step three, during the pre-training stage, an industrial surface defect dataset (such as Kaggle glass defect competition data) with high visual feature similarity to the target task is selected to train a basic model with good generalization ability. Subsequently, fine-tuning is performed on the target dataset, using a lower learning rate to train some layers, while freezing the low-level parameters of the backbone network to avoid overfitting.

[0015] The beneficial effects of this invention are that by replacing the standard convolutional structure with a Dynamic Inception Convolution Module (DICM), and introducing directional depthwise separable convolution and dynamic weighting mechanisms, the model has adaptive multi-scale modeling capabilities. While maintaining computational efficiency, it can significantly improve the perception of complex textures and minute defects, effectively enhancing the model's performance in the defect detection task of glass vacuum heat collection tubes.

[0016] The Hierarchical Attention Fusion Block (HAFB) achieves deep semantic enhancement of input features by introducing a local-global attention mechanism and a hierarchical feature fusion path. This module utilizes a collaborative design of local detail preservation and global context modeling to significantly improve information transfer efficiency in both spatial and channel dimensions during the feature fusion stage, enabling the model to exhibit stronger discriminative ability and robustness when dealing with multi-scale, complex background targets.

[0017] This invention also introduces a similarity-based transfer learning strategy, which pre-trains the model on large-scale glass defect source domain data and combines cosine similarity to select data that are highly correlated with the target domain for transfer learning. This further improves the model's detection performance and generalization ability under small sample conditions, accelerates the model's convergence process, reduces the risk of overfitting, and enhances the practicality of industrial deployment.

[0018] Experimental results show that the improved RT-DETR model proposed in this invention outperforms the original model in terms of accuracy, recall, and mAP, while maintaining high inference speed and significantly compressed model size, balancing performance and deployment efficiency, and possessing good real-time detection capabilities and industrial application potential. Attached Figure Description

[0019] The present invention will be further described below with reference to the accompanying drawings and embodiments.

[0020] Figure 1 This is a schematic diagram of the structure of the improved RT-DETR model in this invention.

[0021] Figure 2 This is a schematic diagram of the RT-DETR model in this invention.

[0022] Figure 3 This is a structural schematic diagram of the dynamic hybrid convolution module in this invention.

[0023] Figure 4 This is a schematic diagram of the visual structure of the HAFB module in this invention.

[0024] Figure 5This is a flowchart of the transfer learning strategy in this invention.

[0025] Figure 6 This is a schematic diagram illustrating the effect of defect detection using the original RT-DETR model in this invention.

[0026] Figure 7 This is a schematic diagram illustrating the effect of defect detection using the improved RT-DETR model in this invention. Detailed Implementation

[0027] The present invention will now be described in further detail with reference to the accompanying drawings. These drawings are simplified schematic diagrams, illustrating only the basic structure of the invention, and therefore only show the components relevant to the invention.

[0028] In the description of this invention, it should be understood that the terms "center," "longitudinal," "lateral," "length," "width," "thickness," "upper," "lower," "front," "rear," "left," "right," "vertical," "horizontal," "top," "bottom," "inner," "outer," "clockwise," "counterclockwise," "axial," "radial," and "circumferential," etc., indicating orientation or positional relationships, are based on the orientation or positional relationships shown in the accompanying drawings and are only for the convenience of describing the invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of the invention. Furthermore, features defined with "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this invention, unless otherwise stated, "a plurality of" means two or more.

[0029] In the description of this invention, it should be noted that, unless otherwise explicitly specified and limited, the terms "installation," "connection," and "linking" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection of two components. Those skilled in the art can understand the specific meaning of the above terms in this invention based on the specific circumstances.

[0030] A defect detection method for glass vacuum solar collector tubes based on improved RT-DETR is proposed. This method integrates multi-scale feature modeling, attention mechanism, and transfer learning strategy, and can achieve high-precision, high-speed, and lightweight defect detection in typical industrial scenarios such as small sample size, complex texture, and multi-scale defects. The method includes the following steps: Step 1: Data Collection Image data of defects in glass vacuum solar collector tubes during actual production were collected, including typical defect types such as scratches, abrasions, and bulges. The collected raw images were labeled and classified into three categories: point defects, line defects, and surface defects, constructing a target domain dataset. Simultaneously, to improve model robustness and data diversity, image augmentation techniques were employed to expand the dataset, including rotation, cropping, flipping, and noise perturbation. Subsequently, the dataset was divided into training, validation, and test sets in a 7:2:1 ratio. Furthermore, to support the transfer learning strategy, publicly available glass-related defect images were selected as the source domain dataset, and samples with features similar to the target domain images were selected for pre-training by calculating cosine similarity, improving the model's initial generalization ability in small sample scenarios.

[0031] Step 2: Construct and improve the RT-DETR neural network model Based on the RT-DETR detection framework (such as...) Figure 2 An improved neural network model is constructed as follows: ResNet-18 is selected as the backbone network, and its standard convolutional structure is replaced with a Dynamic Hybrid Convolutional Module (DICM) to enhance the model's ability to extract multi-scale features. The DICM module fuses depthwise separable convolutional paths in different directions (horizontal, vertical, and square) and combines a dynamic weight mechanism to complete adaptive feature fusion, improving the model's sensitivity to complex textures and minor defects. A Hierarchical Attention Fusion Module (HAFB) is introduced into the neck network. HAFB utilizes a local-global attention mechanism and multi-level feature reorganization paths to semantically enhance the feature map, improving information expression ability and context modeling effect; at the same time, a Transformer decoder is integrated to complete target query and prediction. The improved model is shown below. Figure 1 As shown.

[0032] Specifically: Step 2.1 Replace the standard convolution in BasicBlock with the Dynamic Inception Convolutional Mixer (DICM) module.

[0033] To avoid introducing computational redundancy in simple tasks and thus reducing detection speed, this paper selects ResNet-18, which has a lower computational cost, as the baseline structure of the backbone network. It also proposes a lightweight and efficient Dynamic Inception Convolutional Mixer (DICM) module to replace the standard convolution operation in BasicBlock, thereby enhancing feature extraction capabilities and improving the model's adaptability in industrial defect detection.

[0034] In traditional convolutional neural networks, the size and shape of the convolutional kernel are fixed. This static design often has limitations when dealing with inputs with different shapes, scales, and texture distributions, making it difficult to accurately model fine-grained defects while maintaining lightweight computation.

[0035] Therefore, the DICM module proposed in this paper is as follows: Figure 3 As shown, depthwise separable convolutional kernels with different shapes and a dynamic weight mechanism are introduced to achieve adaptive multi-scale fusion modeling. The module input feature map is: (1) in B,C,H,W These represent the batch size, number of channels, feature map height, and width, respectively.

[0036] First, they are fed in parallel into three different shapes of depth-separable convolution kernels: a standard square convolution kernel, and a standard square convolution kernel. k × k Used to enhance local spatial context; horizontal strip convolution kernel 1× k b Enhanced horizontal structure modeling capabilities; vertical strip convolution kernels k b ×1 is used to capture vertical features.

[0037] The output of the corresponding three-way convolution can be expressed as: (2) Each convolutional branch operates only within a channel and does not mix information between channels; therefore, the number of parameters is: (3) To achieve dynamic fusion, DICM first extracts channel statistical features through global average pooling: (4) Then, three sets of weights are generated using 1×1 convolution: (5) Will w Decomposed into three sets of weights[ w 1 ,w 2 ,w [3], each group corresponds to a convolutional branch, which is normalized in the branch dimension by the Softmax function to obtain: (6) Among them, subscript It is used to represent the weights for all three convolutional branches. The traversal variable (summation variable) is normalized. This represents the exponential summation of the weights of all three branches.

[0038] The final output feature is a weighted fusion of the three convolutional branches: (7) in This represents element-wise multiplication along the channel dimension.

[0039] The fused results are further processed using BatchNorm and SiLU activation functions to enhance nonlinear expressiveness and training stability. (8) Furthermore, to alleviate the instability of initial training and further improve training stability and information retention, DICM introduces the LayerScale mechanism, which introduces a learnable scaling factor into the residual path to control the residual length. (9) in Specifically, this mechanism applies independent learnable scaling factors (denoted as ) to the residual connections of the Mixer branch and the MLP branch. ),in Initialize to a small preset value (e.g., 1e-2) and automatically increase it during training through gradient descent. MLP branches can use convolutional gating structures or neural operators (e.g., KAN), while the LayerScale mechanism effectively balances the information flow of different branches by adaptively adjusting the weights of the residual paths, thereby enhancing the training stability and expressive power of the model.

[0040] This module achieves efficient modeling of multi-scale structural and directional information with low computational cost, and is especially suitable for expressing complex textures and minute defects in industrial images.

[0041] Step 2.2 The role of the neck network in the overall model is to coordinate and support feature representations at different levels to improve the accuracy of recognizing targets of various sizes. The AIFI module used in the neck network of the RT-DETR model first processes high-level features, and then uses the CCFM module for inter-scale interaction and fusion. Compared with YOLO, the number of structural parameters and computational cost of this neck network module has increased. Considering the need to detect a large number of targets in a single image, a novel Hierarchical Attention Fusion Block (HAFB) is proposed to address the problem of small targets being lost during the downsampling process of the meta-model in the convolution kernel.

[0042] In the field of deep learning, especially in computer vision tasks, multi-scale feature fusion and attention mechanisms have been widely proven to significantly improve the model's ability to perceive complex scenes. Traditional methods often face the challenge of effectively coordinating local and global information when fusing multi-source features, limiting the model's performance when handling targets with large scale variations and complex semantics. To address this, this paper proposes a multi-level attention fusion block (HAFB), which aims to achieve adaptive fusion of local and global features through a hierarchical attention mechanism, thereby significantly improving the robustness and task adaptability of feature representation. This module is particularly suitable for visual tasks requiring efficient processing of multi-scale inputs, such as object detection and image segmentation.

[0043] The core innovation of HAFB lies in combining local and global attention branches and performing refined fusion of input features through a hierarchical feature processing path. This design not only effectively preserves the spatial details of the input features but also enhances the semantic expressive power of the global context through an adaptive weighting mechanism, thus balancing local details and global information. The HAFB structure is shown in Figure 4.

[0044] First, the two input feature maps are: (10) The two input features, x1 and x2, originate from different stages of the backbone network and the neck structure, respectively. The shallow feature x1 is taken from the feature maps output by the backbone network at various scales, and after being processed by the RepC3 upsampling and concatenating fusion module to unify the number of channels, it is introduced to preserve local details and structural information. The deep feature x2, on the other hand, is the result of feature-structure fusion processing at the corresponding scale, containing richer contextual and semantic information. By inputting these two types of features into the HAFB module for deep fusion, spatial details and global semantic relationships can be modeled simultaneously, thereby improving the model's ability to detect targets at multiple scales.

[0045] Channel dimensionality reduction is performed using 1×1 convolutions to obtain: (11) Then The features are added together and then fused using 3×3 grouped convolutions (group=4) to obtain the baseline fused features: (12) Next, regarding and Applying local and global attention mechanisms separately, multi-scale spatial semantic features are formed: (13) Finally, The features are concatenated with the baseline and then further fused and recombined through the following convolutional layers: (14) The advantages of this design are mainly reflected in three aspects: hierarchical feature fusion, efficient attention mechanism, and enhanced cross-channel information transmission. First, by combining local and global attention mechanisms, the Hierarchical Attention Fusion Block (HAFB) can effectively capture spatial details and contextual information at different scales, significantly enhancing the expressive diversity and discriminative power of features. Second, the efficient local-global attention module can adaptively adjust the region of interest, flexibly handling features under different receptive fields, improving computational efficiency and enriching the semantic expression of features. Finally, the combination of multiple attention mechanisms and convolutional operations not only optimizes the expression of spatial features but also strengthens information exchange between channels, providing more discriminative feature representations for subsequent visual tasks. In summary, the Hierarchical Attention Fusion Block, through multi-stage, multi-scale attention mechanisms and convolutional fusion, takes into account both local details and global semantics of features, significantly improving the performance of visual models in complex multi-scale scenes.

[0046] In summary, in the overall model architecture, the input raw image first passes through the backbone network to extract multi-level basic features. The outputs of different layers contain multi-scale information ranging from low-level texture to high-level semantics. Subsequently, these features are fed into the feature fusion module, achieving preliminary fusion based on spatial scale alignment to enhance information interaction between features of different resolutions. The fused features are further input into the hierarchical attention fusion block (HAFB) designed in this paper. This module performs unified dimensionality reduction on features from different sources and extracts fine-grained spatial details and macro-level semantic information through a local-global attention mechanism, and then combines them with the guiding features generated by the backbone path for three-way fusion. The fusion result is efficiently reorganized through a reparameterized convolutional structure, ultimately outputting a more expressive multi-scale fused feature map. This feature map can be used for downstream tasks, such as classification and regression heads for object detection, or mask prediction modules in image segmentation, thereby significantly improving the model's performance in complex visual scenes.

[0047] Step 3: Introduce transfer learning strategies: Refer to... Figure 5 The model was pre-trained on a large-scale glass defect dataset. Images with high similarity to the target dataset were selected by cosine similarity for transfer learning. Then, fine-tuning training was performed on the target domain to improve the convergence speed and detection performance of the model under small sample conditions. The training set images constructed in step one are input into the detection model constructed in step two for training. In the initial training stage, pre-training is performed on the source domain data, and a strategy of freezing some layer parameters and fine-tuning other layer parameters is used to complete the transfer to the target domain. The AdamW optimizer is used to optimize the model parameters, with a learning rate of 0.01, a batch size of 4, and 200 training epochs.

[0048] Step 3.1 Employing a transfer learning strategy To improve the detection performance of the model under limited sample conditions, this paper introduces a transfer learning strategy based on the improved RT-DETR detection framework. This strategy utilizes model parameters pre-trained on a large-scale surface defect dataset and applies them to the vacuum glass solar collector tube defect detection task, thereby effectively enhancing the model's detection capability. In the pre-training stage, an industrial surface defect dataset (such as the Kaggle glass defect competition data) with high visual feature similarity to the target task is selected to train a base model with good generalization ability. Subsequently, fine-tuning is performed on the target dataset, using a lower learning rate to train some layers while freezing the low-level parameters of the backbone network to avoid overfitting. Through this strategy, the model can acquire strong defect perception capabilities in the early stages of feature learning, effectively alleviating the training instability caused by the limited number of vacuum glass solar collector tube defect samples, thus improving the overall detection accuracy and convergence efficiency. The flowchart of the entire transfer learning strategy is as follows: Figure 4 As shown.

[0049] Step 4: Use the trained model to detect test images on the target dataset, output defect localization and category recognition results, and compare them with real labeled information to evaluate key performance indicators such as model accuracy, recall, mAP, FPS and model size, and verify the superiority of the method of the present invention in terms of accuracy, robustness and lightweight deployment.

[0050] The test set images are input into the trained network, which outputs detection boxes and category information. The detection performance is comprehensively evaluated by comparing it with ground truth annotations, using key metrics such as precision, recall, average precision (mAP), frame rate (FPS), and model size. Experimental results show that the improved model, after introducing the DICM and HAFB modules, outperforms the original model in terms of precision, recall, and mAP, while maintaining a high frame rate and reducing model size, thus meeting the dual requirements of real-time performance and lightweight deployment in industrial scenarios. The formulas for evaluating model performance are as follows:

[0051]

[0052]

[0053]

[0054] Table 1 Ablation Experiment

[0055] Table 2 Comparison of the model obtained through transfer learning with the original model

[0056] Figure 6 , 7 This demonstrates a comparison of detection results for the same set of defect images using different models. The optimized model ( Figure 7 While maintaining the accuracy of the original category identification, it significantly improves the detection capabilities for small defects and multiple targets, with a higher recall rate and accompanying confidence information, facilitating subsequent screening and analysis. Although there are some low-confidence targets and a slight possibility of false detection, the overall detection is more comprehensive and sensitive, making it more suitable for scenarios with high requirements for identifying subtle defects.

[0057] Based on the above-described preferred embodiments of the present invention, and through the foregoing description, those skilled in the art can make various changes and modifications without departing from the inventive concept. The technical scope of this invention is not limited to the contents of the specification, but must be determined by the scope of the claims.

Claims

1. A defect detection method for glass vacuum solar collector tubes based on improved RT-DETR, characterized in that, include Step 1: Collect images of surface defects in glass vacuum heat collection tubes, construct a dataset and perform classification and labeling, while expanding the data using image enhancement and other methods, and constructing the source domain and target domain datasets required for transfer learning; Step 2: Construct an improved neural network model based on the RT-DETR detection framework: Select ResNet-18 as the backbone network and replace its standard convolutional structure with a dynamically hybrid convolutional module (DICM); introduce a hierarchical attention fusion module (HAFB) into the neck network; and integrate a Transformer decoder to complete target query and prediction. Step 3: Introduce a transfer learning strategy, pre-train the constructed model on a large-scale glass defect dataset, select images with high similarity to the target dataset through cosine similarity for transfer learning, and then fine-tune the training on the target domain. Step 4: Use the trained model to detect test images on the target dataset.

2. The defect detection method for glass vacuum solar collector tubes based on improved RT-DETR according to claim 1, characterized in that, In step two, the Dynamic Hybrid Convolutional Module (DICM) introduces depth-separable convolutional kernels with different shapes and a dynamic weight mechanism.

3. The defect detection method for glass vacuum solar collector tubes based on improved RT-DETR according to claim 2, characterized in that, In step two, depth-separable convolution kernels of different shapes include standard square convolution kernels. k × k Used to enhance local spatial context; horizontal strip convolution kernel 1× k b Enhanced horizontal structure modeling capabilities; vertical strip convolution kernels k b ×1 is used to capture vertical features.

4. The defect detection method for glass vacuum solar collector tubes based on improved RT-DETR according to claim 3, characterized in that, In step two, DICM first extracts channel statistical features using global average pooling; then, it generates three sets of weights using 1×1 convolution. w 1 ,w 2 ,w [3] Each group corresponds to a convolutional branch. The weights of each group are normalized in the branch dimension by the Softmax function. Finally, the three depthwise separable convolutions of different shapes are weighted and fused. The fused result is further processed by the BatchNorm and SiLU activation functions.

5. The defect detection method for glass vacuum solar collector tubes based on improved RT-DETR according to claim 4, characterized in that, In step two, depth-separable convolutions of different shapes are output separately. Y 1 、Y 2 、Y 3. Global average pooling extracts channel statistical features: Three sets of weights are generated using 1×1 convolution: ,Will w Decomposed into three sets of weights[ w 1 ,w 2 ,w [3], each group corresponds to a convolutional branch, which is normalized in the branch dimension by the Softmax function to obtain a i The final output feature is a weighted fusion of the three convolutional branches. Where i represents the convolution kernel, This represents element-wise multiplication along the channel dimension.

6. The defect detection method for glass vacuum solar collector tubes based on improved RT-DETR according to claim 5, characterized in that, In step two, DICM introduces a LayerScale mechanism, which introduces a learnable scaling factor into the residual path to control the residual length: ,in As a learnable scaling factor, MLP branches can employ convolutional gating structures or neural operators.

7. The defect detection method for glass vacuum solar collector tubes based on improved RT-DETR according to claim 1, characterized in that, The two learnable scaling factors are independent learnable scaling coefficients applied by the LayerScale mechanism to the residual connections of the Mixer branch and the MLP branch, where... It is initialized to a preset value and automatically optimized during training using gradient descent.

8. The defect detection method for glass vacuum solar collector tubes based on improved RT-DETR according to claim 1, characterized in that, The hierarchical attention fusion module combines local and global attention branches and performs refined fusion of input features through a hierarchical feature processing path: two random feature maps x1 and x2 are reduced in channel dimension by 1×1 convolution, the two feature maps after dimension reduction are added together and fused by 3×3 group convolution (group=4) to obtain the baseline fused features; Local-global attention mechanisms are applied to the two feature maps after dimensionality reduction to form multi-scale spatial semantic features; the baseline fusion features and multi-scale spatial semantic features are concatenated and further fused and recombined through convolutional layers.

9. The defect detection method for glass vacuum solar collector tubes based on improved RT-DETR according to claim 8, characterized in that, The two feature maps after dimensionality reduction in the hierarchical attention fusion module are respectively represented as follows: Baseline fusion features are Multi-scale spatial semantic features are , The baseline fusion features and multi-scale spatial semantic features are concatenated and further fused and recombined through convolutional layers to obtain... .

10. The defect detection method for glass vacuum solar collector tubes based on improved RT-DETR according to claim 1, characterized in that, In step three, during the pre-training stage, an industrial surface defect dataset (such as Kaggle glass defect competition data) with high visual similarity to the target task is selected to train a basic model with good generalization ability. Subsequently, fine-tuning is performed on the target dataset, using a low learning rate to train some layers, while freezing the low-level parameters of the backbone network to avoid overfitting.