An adaptive line-of-sight detection method for aircraft rivet defects

By introducing DySample dynamic upsampling and FASSHead feature aggregation detection head into aircraft rivet defect detection, the problem of decreased detection accuracy caused by changes in detection distance was solved, achieving efficient and accurate rivet defect detection.

CN120655612BActive Publication Date: 2026-01-30CIVIL AVIATION FLIGHT UNIV OF CHINA
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202510769444.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-06-10
Publication Date
2026-01-30
Estimated Expiration
2045-06-10

AI Technical Summary

Technical Problem

Existing methods for detecting defects in aircraft rivets are prone to missed or false detections when the detection distance changes, making it difficult to adapt to the decrease in detection accuracy at different distances.

Method used

We employ the DySample dynamic upsampling strategy and the FASSHead feature aggregation detection head, and improve the model's detection stability and accuracy at different distances through the distance convolution kernel deformation mapping function and the adaptive feature pyramid fusion module.

Benefits of technology

It achieves efficient, accurate and fully automated aircraft rivet defect detection at different detection distances, reduces the instability of detection results, and improves detection accuracy and recall rate.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120655612B_ABST
    Figure CN120655612B_ABST
Patent Text Reader

Abstract

This invention relates to the field of target detection technology and discloses a line-of-sight adaptive detection method for aircraft rivet defects. First, an image dataset of aircraft rivet defects under different detection distance conditions is collected and preprocessed. Then, the preprocessed image data is labeled and stored in YOLO format to obtain an aircraft rivet line-of-sight adaptive detection dataset, which is then divided into training, validation, and test sets. The neck network and detection head of the YOLOv11n model are improved to construct an aircraft rivet defect line-of-sight adaptive algorithm. Transfer training and frozen training methods are used to guide model training, resulting in a trained AeroScope-YOLOv11n aircraft rivet defect line-of-sight adaptive detection model. This model is then used to detect the target image, yielding the aircraft rivet defect line-of-sight adaptive detection result. This invention achieves efficient, accurate, and fully automated detection of rivet defects on aircraft surfaces, while avoiding the problem of unstable detection results due to changes in detection distance.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of target detection technology, and specifically to a line-of-sight adaptive detection method for aircraft rivet defects. Background Technology

[0002] Rivets are among the most basic and widely used connecting elements in aircraft structures. Their main function is to securely connect various aircraft components together, ensuring the stability and integrity of the overall structure. Although individual rivets are small in size and light in weight, their large number and wide distribution throughout the aircraft structure have a significant impact on overall aircraft performance and safety. Because aircraft are subjected to complex dynamic loads during flight, such as aerodynamic loads, inertial forces, vibrations, and temperature changes, rivets must not only maintain reliable connections but also possess good durability and fatigue resistance. Defects such as loosening, breakage, or corrosion in rivets can lead to localized structural failures or even serious safety accidents. Therefore, before each flight, maintenance engineers conduct a walk-around inspection of the aircraft, one important task of which is to check the fuselage surface for defects and for any loose or detached rivets to ensure the aircraft is in airworthiness condition.

[0003] Currently, aircraft rivet defect detection methods mainly rely on manual visual inspection and image recognition-based rivet defect detection. The former suffers from problems such as high workload for maintenance engineers, low inspection efficiency, and strong subjectivity in the results. In recent years, the rapid development of image target detection technology has significantly improved the accuracy of aircraft rivet detection. Detection methods have evolved from early reliance on manual feature extraction and simple classifiers to a stage of automatic feature learning based on deep learning, giving rise to advanced algorithms such as Faster R-CNN, YOLO series, and SSD. These target detection models based on convolutional neural networks have demonstrated excellent performance in rivet defect identification and dimensional measurement. Through large-scale labeled data training, the models can accurately capture normal and abnormal rivet features, effectively identifying various defects such as deformation, cracks, and missing parts, significantly improving detection accuracy and efficiency, and reducing the subjective errors and missed detection problems of traditional manual inspection.

[0004] Image recognition-based rivet defect detection has improved efficiency and accuracy to some extent. However, in practical applications, it has been found that changes in the detection distance leading to variations in the clarity of the input image can easily result in missed or false detections of rivet defects. Existing algorithms primarily focus on optimization for fixed-distance scenarios, lagging behind research on model robustness under varying distances. Models trained on single-distance data struggle to adapt to missed defects caused by target shrinkage and blurred details at long distances, or feature extraction interference caused by near-distance imaging distortion, leading to decreased detection accuracy at different detection distances. Summary of the Invention

[0005] To address the above problems, the present invention aims to provide a line-of-sight adaptive detection method for aircraft rivet defects, achieving efficient, accurate, and fully automated detection of rivet defects on aircraft surfaces, while avoiding the problem of unstable detection results due to changes in detection distance. The technical solution is as follows: A line-of-sight adaptive detection method for aircraft rivet defects, comprising the following steps:

[0006] Step 1: Collect image datasets of aircraft rivet defects under different detection distance conditions, and preprocess the original image datasets;

[0007] Step 2: Use the Labelimg image annotation tool to systematically annotate the preprocessed image data and save it in YOLO format to obtain the aircraft rivet line-of-sight adaptive detection dataset;

[0008] Step 3: Divide the aircraft rivet line-of-sight adaptive detection dataset into a training set, a validation set, and a test set to ensure a balanced distribution of samples across all detection distance ranges;

[0009] Step 4: Improve the neck network and detector head of the YOLOv11n model:

[0010] The neck network employs the Dysample dynamic upsampling strategy, which uses a distance convolution kernel deformation mapping function to maintain high-resolution detail features during close-range detection and enhance semantic information transmission during long-range detection.

[0011] The detection head uses the FASSHead feature aggregation detection head, which constructs a hierarchical feature group and an adaptive feature pyramid fusion module through a decoupled structure to improve the model's detection accuracy of small rivet targets when the distance changes.

[0012] Furthermore, by combining transfer training with the pre-trained YOLOv11 model as the base model, the learned knowledge is transferred to the new aircraft rivet defect detection task to accelerate the learning process and improve performance. During the training process, a freeze training strategy is adopted to freeze the early layers of the model and retain the low-level feature extraction capabilities learned in the pre-trained model, so that it can better adapt to the specific needs of the aircraft rivet defect detection task, and finally obtain the AeroScope-YOLOv11n aircraft rivet defect line-of-sight adaptive detection model.

[0013] Step 5: Use the trained AeroScope-YOLOv11n aircraft rivet defect line-of-sight adaptive detection model to detect the image to be inspected and obtain the aircraft rivet defect line-of-sight adaptive detection results.

[0014] Compared with the prior art, the advantages of the present invention are:

[0015] 1) The core innovation of this invention is the neck network based on the DySample dynamic upsampling strategy. It proposes a distance convolution kernel deformation mapping function to achieve high-resolution detail preservation at close range and contextual semantic fusion at long range. It also adaptively adjusts the interpolation weights to optimize the feature pyramid, thereby improving the model's detection stability for small targets at different distances.

[0016] 2) This invention constructs the FASSHead feature aggregation detection head, which combines distance-level semantic fusion and edge-aware constraints, and uses multi-scale feature fusion and dynamic attention mechanism to progressively enhance features, accurately locate the boundaries of complex damage areas at different distances, and improve detection stability in different viewing distance scenarios. Attached Figure Description

[0017] Figure 1 This is a flowchart of the adaptive line-of-sight detection process for aircraft rivet defects according to the present invention.

[0018] Figure 2 This is the original image of a normal type of rivet according to the present invention.

[0019] Figure 3 This is the original image showing the rivet defect types of the present invention.

[0020] Figure 4 This is a label diagram for the normal type of rivets of this invention.

[0021] Figure 5 This is a label diagram for rivet defect types in this invention.

[0022] Figure 6 The diagram shows the line-of-sight adaptive detection network model for aircraft rivet defects based on AeroScope-YOLOv11n, which is constructed for this invention.

[0023] Figure 7 This is a structural diagram of the Dysample module of the present invention.

[0024] Figure 8 This is a structural diagram of the FASSHead feature aggregation detection head of the present invention.

[0025] Figures 9(a) and 9(b) are comparison diagrams of the detection results before and after the improvement of the detection distance of 50cm in this invention.

[0026] Figures 10(a) and 10(b) are comparison diagrams of the detection results before and after the improvement of the detection distance of 100cm in this invention.

[0027] Figures 11(a) and 11(b) are comparison diagrams of the detection results before and after the improvement of the detection distance of 150cm in this invention. Detailed Implementation

[0028] The present invention will now be described in further detail with reference to the accompanying drawings and specific embodiments.

[0029] An adaptive line-of-sight detection method for aircraft rivet defects includes rivet line-of-sight detection image data acquisition and preprocessing, dataset creation and annotation, model training, rivet line-of-sight stability detection and recognition, and detection result evaluation. The process is as follows: Figure 1 As shown, where:

[0030] Step S1: The maintenance engineer uses image acquisition equipment such as a camera to photograph the damage to the aircraft rivets under different detection distances, obtains the image and video data, and then preprocesses the data.

[0031] The specific process is as follows:

[0032] Step S1.1: Collect images of aircraft rivets at different detection distances, including pictures and video samples taken from multiple angles and covering various weather conditions.

[0033] Step S1.2: Screen the collected image and video samples to ensure that the number of damage samples at different detection distances is basically balanced, preventing the model from developing a preference for the more numerous categories during training. At the same time, each detection distance should include as many diverse representations as possible to avoid a single sample type.

[0034] Step S1.3: Preprocess the acquired image data. First, use Gaussian filtering to reduce random noise in the image, thereby improving image clarity.

[0035]

[0036] In the formula, G(x, y) is the value of the Gaussian function at the point (x, y), σ is the standard deviation, and e is the base of the natural logarithm.

[0037] Then, contrast enhancement techniques are used to emphasize key features in the image, making the damaged area more prominent and easier to identify. Finally, edge sharpening is applied to enhance the details of the rivet and its damaged contours, ensuring more accurate identification and classification in subsequent analysis and model training.

[0038] Specifically:

[0039] 1) Geometric transformations, including flipping (horizontal / vertical), rotation (±15° range), and scaling (0.8-1.2 linear coefficients).

[0040] 2) Color transformation: The brightness gain coefficient is adjusted from 0.7 to 1.3, and nonlinear gamma contrast enhancement is performed with γ∈[0.5,2.0]. Gaussian noise (σ≤15) and salt-and-pepper noise (density∈[1%,5%]) are injected to enhance the characteristics of the damaged area and simulate the real noise environment.

[0041] Salt and pepper noise is a random occurrence of white or black dots, which may be black pixels in bright areas or white pixels in dark areas.

[0042] The above data augmentation methods simulate the changes in angle and shooting distance that may occur during the actual rivet defect detection process.

[0043] Step S2: Label the preprocessed data. Use Labelimg to systematically label the preprocessed image data and store it in YOLO format to obtain the aircraft rivet line-of-sight adaptive detection dataset.

[0044] The specific process is as follows:

[0045] Step S2.1: Classify the damage to aircraft rivets at different visual distances. This is divided into two types: normal and abnormal. The normal state indicates that the rivet structure is intact, the connection performance is good, and it can stably fix various aircraft components, such as... Figure 2 As shown. Anomalies include damage types such as rust, deformation, and detachment, commonly found on the rivet head and its surrounding area, caused by long-term use or mechanical stress, such as... Figure 3 As shown, by classifying the rivet state under different viewing distances, the accuracy and stability of detection at different distances are improved.

[0046] Step S2.2: Label the processed dataset to construct an adaptive detection dataset for aircraft rivets based on line-of-sight. The labeling categories are "normal" and "abnormal". "Normal" is labeled in green, indicating that the rivet structure is intact and in good condition, such as... Figure 4 As shown. "Abnormal" is marked in orange, covering abnormal conditions such as rust, deformation, and peeling, for example... Figure 5 As shown, detailed annotation at different viewing distances effectively improves the accuracy of rivet defect detection and the model's generalization ability.

[0047] Step S3: Divide the labeled line-of-sight dataset into training, validation, and test sets in a ratio of 7:2:1. Use a stratified random sampling strategy during the division process to ensure that the samples in each detection distance interval maintain the same proportional distribution in the training, validation, and test sets and are representative.

[0048] Step S4: Based on the YOLOv11n model, a line-of-sight adaptive algorithm for aircraft rivet defects is constructed by fusing transfer training and freeze training strategies. After model training, the AeroScope-YOLOv11n aircraft rivet defect line-of-sight adaptive detection model is obtained, as shown below. Figure 6 As shown.

[0049] The specific process is as follows:

[0050] Step S4.1: Based on the YOLOv11n backbone network, load pre-trained weights from general datasets such as COCO as initialization parameters, retaining the ability to extract general features such as edges and textures. That is, combine transfer training to use the pre-trained YOLOv11 model as the base model, and transfer the learned knowledge to the aircraft rivet defect detection task.

[0051] Subsequently, the YOLOv11n backbone network was trained on a dataset of aircraft rivet defects. The first few layers of the YOLOv11n backbone network were frozen, and its parameters were fixed to preserve the low-level feature extraction capabilities already learned in the pre-trained model, while reducing the amount of training computation.

[0052] Step S4.2: Optimize the structure and functionality of the backbone network, neck network, and decoupled detection head of the YOLOv11 model after transfer training and frozen training, respectively, to improve its accuracy and adaptability in aircraft rivet defect detection. Specifically:

[0053] The backbone network achieves efficient object detection through a hierarchical downsampling and feature fusion mechanism: The input image size is 640×640, and efficient object detection is achieved through hierarchical feature extraction and fusion. The first layer of the network uses a 64-channel convolutional kernel (kernel size 3×3, stride 2) for 4x downsampling, generating a 320×320×64 feature map. This is further compressed to 160×160×128 through a 128-channel convolution of the same size, completing shallow texture feature capture. The cross-stage feature enhancement module C3k2 implements this through a two-stage residual connection and channel compression mechanism. Feature enhancement is performed to gradually extract high-level semantic information. A feature pyramid is constructed using cascaded downsampling operations, and spatial compression is performed through 256, 512, and 1024-channel convolutions to form multi-scale feature maps of 80×80×256, 40×40×512, and 20×20×1024 as the basis for detection. To further enhance global perception capabilities, cascaded 5×5 max pooling is then used to aggregate multiple receptive field features to enhance global contextual information. Finally, the C2PSA attention mechanism at the end suppresses background noise through channel recalibration and spatial weighting, thereby improving the sensitivity to small targets.

[0054] The neck network employs a bidirectional feature pyramid architecture, achieving multi-scale target localization through multi-level upsampling and cross-level feature fusion. First, the deep feature map undergoes 2x nearest neighbor upsampling to generate a 40×40×512 feature map, which is then concatenated with the same-scale feature P4 output from the backbone network along the channel dimension, forming a 40×40×1024 fused feature map. Subsequently, the C3k2 module reconstructs the features, preserving key semantic information. The fused P4 feature is upsampled to 80×80 resolution, concatenated with image features of the same size in the backbone network, and then compressed to 256 channels by C3k2, constructing an 80×80×256 fine-grained feature map specifically for small target detection. After obtaining high-level semantic features, the network downsamples the P3 feature through a 3×3 convolution, concatenates it with the previously fused P4 feature, and then processes it through C3k2 to generate a 40×40×512 mid-scale feature map. Similarly, downsampling continues and the data is concatenated with the P5 features output by the SPPF module to ultimately form a large-scale feature map of 20×20×1024. This path uses a hierarchical feature backpropagation mechanism to inject shallow spatial details into deep features, enhancing the boundary localization accuracy of medium and large-sized targets.

[0055] The decoupled detection head achieves multi-scale detection by fusing bidirectional feature pyramids, generating three levels of optimized features: small (80×80×256), medium (40×40×512), and large (20×20×1024), enabling collaborative reasoning for target classification and localization. Furthermore, the SimOTA positive / negative sample allocation strategy is used for label assignment. First, a center-prior method is used to determine candidate regions and construct a cost function. Then, based on the magnitude of the cost function, the k candidate boxes with the lowest cost are selected. Finally, duplicate candidate boxes are removed based on the global situation to obtain the final predicted box, achieving efficient and accurate target detection.

[0056] Step S4.3: Further improvements are made to the neck network. Based on the DySample dynamic upsampling strategy, a distance-based kernel deformation mapping function is developed and applied to maintain high-resolution detail features during close-range detection. When the distance signal D is less than a set threshold, the deformation mapping function in detection mode generates a small-scale kernel offset through parameter adjustment. The offset constraint ensures that the sampling range of the deformed kernel is highly converged to the local neighborhood of the target pixel. Compared to the global sampling of traditional fixed kernels, high-density sampling in local regions can maximize the preservation of high-frequency detail information in the input feature map. For texture features, it effectively avoids texture blurring by maintaining the spatial topological relationship of local pixels.

[0057] To enhance semantic information transmission during long-distance detection, when the distance signal D exceeds a set threshold, the deformation mapping function dynamically adjusts its parameters during detection, driving the convolutional kernel sampling points to generate large-scale spatial shifts. This breaks through the local neighborhood limitations of traditional convolution, enabling the convolutional kernel sampling range to extend to semantically relevant context regions, thus constructing a multi-scale feature fusion network.

[0058] In long-range small target detection, due to low imaging resolution, weak feature signals, and susceptibility to noise interference, the model integrates background semantic information and correlates the contextual features of aircraft rivets to achieve feature enhancement and semantic completion, effectively compensating for the lack of local pixel information. For example... Figure 7 As shown, X represents the input image or dataset; H represents the image height, W represents the width, and C represents the number of channels; sH, sW: s represents the scaling factor, and sH and sW represent scaling in the height and width directions, respectively. 2g divides the image into two groups or performs double processing. S is the dynamic sampling grid, and O is the displacement.

[0059] To explain the above principles more deeply and precisely, the core process will be quantitatively described below using mathematical formulas:

[0060]

[0061] In the formula, the input feature map (i, j) and the upsampling ratio are s; G i,j The original rule sampling grid coordinates are sH and sW, which represent the scaling factor multiplied by the original image height H and width W, respectively, i.e., the scaled image size.

[0062]

[0063] Where S is the dynamic sampling grid; O is the displacement; S i,j The coordinates are in the dynamically sampled grid. Δx represents the x-coordinate of the point in the i-th row and j-th column of the original regular sampling grid. i,j This represents the offset in the x-axis direction; Δy represents the ordinate of the point in the i-th row and j-th column of the original regular sampling grid; i,j This represents the offset along the y-axis.

[0064] The above equation represents the initial position of each point in the sampling grid before any offset is applied. To ensure smooth sampling and reduce artifacts, the displacement O is adjusted according to static and dynamic factors and superimposed on the original grid G ​​to generate a more adaptive dynamic sampling grid S. This can improve the ability to handle complex structures while maintaining quality.

[0065] Step S4.4: Further construct the decoupled detection head, building the FASSHead feature aggregation detection head. Through the decoupled structure, a hierarchical feature group and an adaptive feature pyramid fusion module are constructed, significantly improving the model's detection accuracy for small rivet targets in scenarios with varying distances. In the multi-scale feature fusion architecture, the feature maps generate hierarchical fusion feature groups HMF-1, HMF-2, and HMF-3 through dynamic weight allocation and dimension alignment mechanisms.

[0066] When generating HMF-1, a 3×3 max pooling operation is first performed on the D-3 layer feature map to extract key spatial feature points, followed by feature enhancement through a 3×3 convolutional layer. Simultaneously, the D-2 layer feature map uses a 3×3 convolution to match the channel dimension with the feature representation. When constructing HMF-2, the D-3 layer feature map adjusts the number of channels using a 3×3 convolution, while the D-1 layer feature map compresses its feature dimension using a 1×1 convolution and then uses bilinear interpolation to double the resolution, achieving spatial alignment with the D-3 layer. For HMF-3 generation, the D-2 layer feature map first undergoes dimensionality reduction through a 1×1 convolution, then its resolution is doubled through nearest-neighbor upsampling; the D-1 layer feature map also undergoes a 1×1 convolution and then a 4x upsampling operation to ensure consistency in spatial size and channel dimension between the two layers. Figure 8 As shown, T represents the step size, indicating how many times the resolution changes.

[0067] In the adaptive feature pyramid fusion module, taking HMF-3 as an example, the features from layers D-1, D-2, and D-3 are represented as f1, f2, and f3, respectively. To generate the final fused features, these features are first multiplied by the learnable weight coefficients ω3, φ3, and ψ3, respectively, and then summed.

[0068]

[0069] Among them, f1 1→l This refers to the features f1 from layer D-1 after being transformed into the target layer l. f2 is the feature transformed from layer D-2 to the target layer l; f3 3→l The features of layer D-3, f3, are transformed into the features of the target layer l.

[0070] The adaptive feature pyramid fusion module is a specific functional module in the decoupled detection head, mainly used for the fusion of multi-scale features.

[0071] The same applies to the fusion feature groups HMF-1 and HMF-2.

[0072] The weight coefficient generation process involves first adjusting the feature maps of each level to the same spatial size through bicubic interpolation, and then generating corresponding weights through a 1×1 convolutional layer. After the feature maps are concatenated, they are normalized by the Softmax function so that the weight coefficients are limited to the range of [0,1] and the sum is 1, thereby achieving a reasonable allocation of the contribution ratio of different feature maps and realizing adaptive fusion of feature distance.

[0073]

[0074] in, represents the weight coefficients of the target layer l, where i represents different feature map sources; and These are the exponential forms of the unnormalized weight coefficients from different feature map sources.

[0075] Bicubic interpolation is an image processing technique used to change the resolution of an image while maintaining its quality.

[0076] Step S5: Based on the self-built aircraft rivet line-of-sight adaptive detection dataset, the trained AeroScope-YOLOv11n model is used to detect the image to be inspected, and the line-of-sight adaptive detection results of aircraft rivet defects are obtained. The results are then evaluated in multiple dimensions.

[0077] A multi-dimensional evaluation framework integrating line-of-sight accuracy adaptability and cross-line-of-sight scale consistency is established. Line-of-sight accuracy: Test samples are collected at 0.5-meter intervals within a detection distance range of 0.5 to 1.5 meters, and the mean average precision (mAP) is plotted as a function of detection distance. The accuracy of the model in identifying rivet defects at different detection distances is quantitatively analyzed. Dynamic line-of-sight response: Continuous line-of-sight changes experienced by the detection device during movement are simulated. The fluctuations in the model's detection accuracy in continuous images are recorded and analyzed to verify the model's real-time detection performance and robustness in practical application scenarios.

[0078] The specific process is as follows:

[0079] Step S5.1: The detection results are evaluated using precision (P), recall (R), and mean average precision (mAP). This invention uses mAP@0.5 for comparison, where 0.05 is the step size and a threshold of 10 IoUs is used. Then, the average precision is calculated as follows:

[0080]

[0081] In the formula, TP is a true positive sample that the model correctly predicts as positive; FP is a false positive sample that the model incorrectly predicts as positive; FN is a false negative sample that the model incorrectly predicts as negative; m is the number of detected categories; M is the total number of categories to be detected, and in this paper, M = 2.

[0082] Step S5.2: Based on the self-built dataset, use the trained model to perform detection and compare it with mainstream algorithms YOLOv5n, YOLOv6n, YOLOv7n, YOLOv8n, YOLOv9t, YOLOv10n and YOLOv11. The evaluation index of the detection results is shown in Table 1. Figures 9(a) and 9(b) are comparison images of the detection results before and after the improvement at a shooting distance of 50cm. Figures 10(a) and 10(b) are comparison images of the detection results before and after the improvement at a shooting distance of 100cm. Figures 11(a) and 11(b) are comparison images of the detection results before and after the improvement at a shooting distance of 150cm.

[0083] Table 1. Results of the comparative experiment

[0084]

[0085] As shown in Table 1, the improved AeroScope-YOLOv11n algorithm performs best on the aircraft rivet line-of-sight adaptive dataset. Compared with the original YOLOv11n model, it improves precision by 1.7%, recall by 5.5%, and mAP by 5.3%. Compared with YOLOv5n, YOLOv8n, and YOLOv10n of the same size, the mAP increases by 7.9%, 6.6%, and 5.8%, respectively. Compared with the more complex YOLOv6n model, the mAP increases by 6.6%. In conclusion, the improved AeroScope-YOLOv11n algorithm effectively reduces the impact of changes in shooting distance on detection results while ensuring real-time performance, achieving optimal overall model performance.

Claims

1. A method for visual distance adaptive rivet defect detection of an aircraft, characterized in that, The method comprises the following steps: Step 1: Collect image data sets about aircraft rivet defects under different detection distance conditions, and pretreat the original image data sets; Step 2: Systematically label the pretreated image data, and store it in YOLO format to obtain an aircraft rivet distance adaptive detection data set; Step 3: Divide the aircraft rivet distance adaptive detection data set into a training set, a validation set and a test set, and ensure that the sample distribution of each detection distance interval is balanced; Step 4: Improve the neck network and detection head of the YOLOv11n model: The neck network adopts a Dysample dynamic upsampling strategy, and through a distance convolution kernel morphing mapping function, high-resolution detail features are maintained during near-distance detection, and semantic information transmission is enhanced during long-distance detection; The detection head adopts a FASSHead feature aggregation detection head, and through a decoupling structure, a hierarchical feature group and an adaptive feature pyramid fusion module are constructed to improve the detection accuracy of the rivet when the distance changes; An aircraft rivet defect distance adaptive algorithm is constructed by fusing a transfer training and a freezing training strategy, and finally an AeroScope-YOLOv11n aircraft rivet defect distance adaptive detection model is obtained; Step 5: Use the trained AeroScope-YOLOv11n aircraft rivet defect distance adaptive detection model to detect the image to be detected, and obtain an aircraft rivet defect distance adaptive detection result; The step 4 specifically comprises: Step 4.1: Load the general data set pre-training weight based on the YOLOv11n backbone network as the initialization parameter to retain the general feature extraction capability including edges and textures; that is, the pre-trained YOLOv11 model is used as a basic model by combining transfer training to transfer the learned knowledge to the aircraft rivet defect detection task; then the first few layers of the YOLOv11n backbone network are frozen; Step 4.2: The backbone network, neck network and decoupling detection head of the YOLOv11n model after freezing the parameters are respectively optimized in structure and function; Step 4.3: Further improve the neck network to construct a DySample dynamic upsampling strategy and design a distance convolution kernel morphing mapping function: ; where (i, j) is the input feature map, and s is a scaling factor; is the original rule sampling grid coordinates; and respectively represent the original image height and width; Maintain high-resolution detail features during near-distance detection, specifically: when the distance signal D is less than the set threshold, the morphing mapping function in the detection mode generates a small-scale convolution kernel offset through parameter adjustment, and the offset constraint makes the sampling range of the morphed convolution kernel highly converge to the local neighborhood of the target pixel; Enhance semantic information transmission during long-distance detection, specifically: when the distance signal D is greater than the set threshold, the morphing mapping function in the detection mode dynamically adjusts the parameter configuration to drive the convolution kernel sampling point to produce a large-scale spatial offset; break through the local neighborhood limit of the traditional convolution, and promote the convolution kernel sampling range to expand to the context area containing semantic information, thereby constructing a multi-scale feature fusion network; The coordinates of the original grid G e R in the sampling grid before any offset is applied are defined as follows: 2×sH×sW G = (Gx, Gy) ; S is a dynamic sampling grid; O is a displacement amount; is a coordinate in the dynamic sampling grid; is a horizontal coordinate of a point in the th row and the th column of the original regular sampling grid; is a displacement amount in the axis direction; is a vertical coordinate of a point in the th row and the th column of the original regular sampling grid; is a displacement amount in the axis direction; The displacement O is adjusted according to static and dynamic factors, and is superimposed on the original grid G to generate a more adaptive dynamic sampling grid S; Step 4.4: Further construction of the decoupled detection head, constructing the FASSHead feature aggregation detection head, including decoupling structure construction, hierarchical feature group and adaptive feature pyramid fusion module; In the multi-scale feature fusion architecture, the feature maps are generated through dynamic weight distribution and dimension alignment mechanism to generate hierarchical fusion feature groups HMF-1, HMF-2 and HMF-3, each fusion feature group includes D-1, D-2 and D-3 layer features. In the adaptive feature pyramid fusion module, for the fusion feature group HMF-3, the features f1, f2, f3 from the D-1, D-2, D-3 layers are weighted and summed to generate the final fusion feature As shown in the following formula: ; wherein, is a D-1 layer feature converted to a target layer after conversion; is a D-2 layer feature converted to a target layer after conversion; is a D-3 layer feature converted to a target layer after conversion; , and are corresponding weight coefficients, respectively. The fusion feature groups HMF-1 and HMF-2 are the same.

2. The method of visual distance adaptive rivet defect detection for aircraft as claimed in claim 1, wherein, The pre-processing of the original image data set in step 1 includes: Gaussian filtering is used to reduce random noise in the image and improve image clarity, and the formula is as follows: ; where G(x, y) is the value of the Gaussian function at point (x, y), is the standard deviation, and e is the base of the natural logarithm. The visual distance adaptive data set of the aircraft rivet defect is subjected to data enhancement, specifically: 1) Geometric transformation: including flipping, rotating and scaling; 2) Color transformation: using brightness gain coefficient adjustment, nonlinear gamma contrast enhancement, adding Gaussian noise and salt and pepper noise injection to strengthen damage area features and simulate real noise environment.

3. The method of visual distance adaptive rivet defect detection for aircraft as claimed in claim 1, wherein, The step 2 specifically includes: Step S2.1: The damage condition of the aircraft rivet at different visual distances is divided into two types of normal state and abnormal state; the normal state represents that the rivet structure is complete and the connection performance is good; the abnormal state includes rivet corrosion, deformation and falling off; Step S2.2: Defect positioning and labeling are performed on the rivets in the normal state and the abnormal state in the pre-processed image data, and the labeling categories of the normal state and the abnormal state are "normal" and "abnormal", and different colors are used for labeling.

4. The method of visual inspection of rivet defects on an aircraft according to claim 1, characterized in that, In step 4.2, the structure optimization and function construction specifically are: The first part: the backbone network realizes efficient target detection through hierarchical downsampling and feature fusion mechanism: the input image size is 640×640, the first layer uses 64-channel convolution kernel for 4 times downsampling to generate 320×320×64 feature map, then through 128-channel convolution compression to 160×160×128, shallow texture features are extracted; Then through the cross-stage feature enhancement module C3k2 for two-stage residual connection and channel compression, high-level semantic information is gradually extracted, and a feature pyramid is constructed by cascading down-sampling to output 80×80×256, 40×40×512 and 20×20×1024 multi-scale feature maps; the cascaded 5×5 maximum pooling is introduced to aggregate multi-receptive field information, and the C2PSA attention mechanism is used for channel recalibration and spatial weighting; The second part: the neck network adopts a bidirectional feature pyramid architecture, and multi-scale target positioning is realized through multi-level up-sampling and cross-level feature fusion. First, 2 times nearest neighbor up-sampling is performed on the deep feature map to generate a 40*40*512 feature map, which is spliced with the P4 feature output by the backbone network and then reconstructed by C3k2 to retain key semantic information. Continue to up-sample and fuse with the corresponding features of the backbone network to form an 80*80*256 fine-grained feature map dedicated to small target detection. Then, through down-sampling and C3k2 processing, a 40*40*512 medium-scale feature map and a 20*20*1024 large-scale feature map are sequentially constructed; The third part: the decoupling detection head realizes decoupling prediction of target classification and positioning based on multi-scale feature maps, and outputs three-level optimized features of small, medium and large; In the label assignment stage, the positive and negative sample assignment strategy SimOTA is adopted, the center prior method is used to determine the candidate region, the cost cost function is constructed, and the k lowest cost candidate boxes are selected, and finally the optimal prediction box is obtained through the de-duplication operation.

5. The method of visual inspection of rivet defects on an aircraft according to claim 1, characterized in that, In step 4.4, when generating the fusion feature group HMF-1, first, 3*3 maximum pooling operation is performed on the D-3 layer feature map to extract spatial key feature points, and then 3*3 convolution layer is used for feature enhancement; At the same time, the D-2 layer feature map is matched in channel dimension and feature expression through 3*3 convolution; When constructing the fusion feature group HMF-2, the D-3 layer feature map is adjusted in channel number through 3*3 convolution, and the D-1 layer feature map is compressed in feature dimension through 1*1 convolution, and then the resolution is increased by 2 times through bilinear interpolation, realizing the spatial alignment with the D-3 layer; For the generation of the fusion feature group HMF-3, the D-2 layer feature map is first reduced in dimension through 1*1 convolution, and then the resolution is increased by 1 times through nearest neighbor up-sampling; The D-1 layer feature map is also processed by 1*1 convolution, and then 4 times up-sampling operation is adopted to ensure the consistency of the two layers of features in spatial size and channel dimension.

6. The method of visual inspection of rivet defects on an aircraft according to claim 1, characterized in that, In step 4.4, the generation process of the weight coefficient is as follows: each level feature map is first adjusted to the same spatial size through bicubic interpolation, and then the corresponding weight is generated through 1*1 convolution layer; After splicing, the features are normalized by the Softmax function, so that the weight coefficient is limited in the range of [0, 1] and the sum is 1, as shown in the following formula: ; wherein, denotes the target layer of weight coefficients, wherein denotes different feature map sources; , and are the exponential form of the unnormalized weight coefficients of the different feature map sources, respectively.

Citation Information

Patent Citations

  • Aviation rivet classification and anomaly detection method based on deep learning

    CN115965598A