An aircraft skin defect detection method, system, device and medium based on a RetinaNet network

The aircraft skin defect detection method based on RetinaNet network solves the problem of low detection efficiency for defects with different shapes and large scale variations. It enables rapid identification and localization of defects of different types and sizes, meeting the real-time requirements of aircraft skin surface inspection.

CN118967594BActive Publication Date: 2025-11-11CHENGDU AIRCRAFT INDUSTRY GROUP
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202410981423.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-22
Publication Date
2025-11-11
Estimated Expiration
2044-07-22

AI Technical Summary

Technical Problem

Existing methods for detecting defects in aircraft skin cannot effectively detect defects with varying shapes and large size variations, and they are inefficient. Manual inspection is also inefficient and prone to errors.

Method used

An aircraft skin defect detection method based on RetinaNet network is adopted. By classifying and labeling images, defect detection anchor boxes are generated, a classifier and detector are constructed, the cross-union ratio is calculated, and the defect detection network is updated to achieve efficient detection of multi-scale defects.

Benefits of technology

It enables rapid identification and location of defects of different types and scales, replacing manual inspection and meeting the real-time inspection requirements of aircraft skin surface defects.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118967594B_ABST
    Figure CN118967594B_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of inspection detection, in particular to a kind of aircraft skin defect detection method, system, equipment and medium based on RetinaNet network;First, the aircraft skin defect image collected is classified and labeled, and the aircraft skin defect image is extracted according to the defect detection network constructed, to obtain output feature map;Second, according to output feature map, randomly generate defect detection anchor frame;Then, according to the defect detection network, a classifier and a detector are constructed, the real frame of the defect of the aircraft skin defect image is calculated, and the intersection-over-union of the defect detection anchor frame and the real frame is calculated;Finally, according to the intersection-over-union, the sample type of anchor frame is calculated, the defect detection network is updated, and multi-scale aircraft skin defect image is obtained according to the updated defect detection network;Efficient detection of different types and different scales of defects is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of inspection and testing technology, and more specifically, to a method, system, equipment, and medium for detecting defects in aircraft skin based on RetinaNet networks. Background Technology

[0002] Aircraft manufacturing involves a large amount of assembly. During this process, the use of tools and the movement of parts can easily cause various defects on the aircraft surface. If these defects are not detected and properly addressed in a timely manner, they will directly affect the delivery of the aircraft.

[0003] Currently, the inspection of aircraft surfaces mainly relies on manual inspection. Due to the limitations of human vision and the fatigue of manual work, manual inspection is inefficient, lacks objectivity, and is prone to "false positives and false negatives".

[0004] In recent years, intelligent inspection based on machine vision has become one of the important basic research and technologies in the field of intelligent manufacturing. At the same time, due to its ability to handle images with complex backgrounds and tiny defects, deep learning-based defect detection methods have gradually become dominant in this field.

[0005] Defects on aircraft surfaces are characterized by their diverse shapes and large scale variations, necessitating the research of a method and system capable of detecting various types and scales of defects.

[0006] Chinese invention patent application number "202011626199.0", entitled "A method for detecting and classifying defects on the surface of aircraft skin paint", constructs a defect detection and classification network, but cannot locate the position of defects in the image; Chinese invention patent application number "202210197322.4", entitled "A method and system for detecting damage on the surface of aircraft skin based on deep learning", constructs a defect segmentation network, but it belongs to a two-stage method, which is difficult to guarantee in terms of detection efficiency and real-time performance. Summary of the Invention

[0007] This invention addresses the limitations of existing defect detection methods, which are unable to detect aircraft surface defects of varying shapes and scales and suffer from low detection efficiency. It proposes a RetinaNet-based method, system, device, and medium for aircraft skin defect detection. First, the acquired aircraft skin defect images are classified and labeled. Then, the defect detection network is used to extract the defect images, resulting in an output feature map. Next, defect detection anchor boxes are randomly generated based on the output feature map. Then, a classifier and detector are constructed using the defect detection network to calculate the ground truth bounding boxes of the aircraft skin defects and the intersection-union ratio (IU) between the defect detection anchor boxes and the ground truth bounding boxes. Finally, the IU is used to calculate the sample type of the anchor boxes, update the defect detection network, and obtain multi-scale aircraft skin defect images. This achieves efficient detection of defects of different types and scales.

[0008] The present invention is specifically implemented as follows:

[0009] A method for aircraft skin defect detection based on RetinaNet network is proposed. First, the collected aircraft skin defect images are classified and labeled, and the defect images are extracted according to the constructed defect detection network to obtain output feature maps. Second, defect detection anchor boxes are randomly generated according to the output feature maps. Then, a classifier and detector are constructed according to the defect detection network to calculate the ground truth bounding boxes of the aircraft skin defect images and to calculate the intersection-union ratio (IU) between the defect detection anchor boxes and the ground truth bounding boxes. Finally, the sample type of the anchor boxes is calculated according to the IU, the defect detection network is updated, and multi-scale aircraft skin defect images are obtained according to the updated defect detection network.

[0010] To better realize the present invention, the aircraft skin defect detection method based on RetinaNet network further includes the following steps:

[0011] Step S1: Classify and label the collected aircraft skin defect images, and extract the aircraft skin defect images according to the constructed defect detection network to obtain output feature maps at different scales;

[0012] Step S2: Based on the output feature map, randomly generate defect detection anchor boxes of different shapes and sizes;

[0013] Step S3: Construct a classifier and detector based on the defect detection network, classify image defects and detect the location of image defects, calculate the ground truth bounding boxes of aircraft skin defect images, and calculate the intersection-union ratio of defect detection anchor boxes and ground truth bounding boxes;

[0014] Step S4: Calculate the sample type of the anchor frame based on the cross-union ratio, calculate the Focal loss of the sample, backpropagate the Focal loss, update the defect detection network parameters, and obtain multi-scale aircraft skin defect images.

[0015] To better realize the present invention, step S1 further includes the following steps:

[0016] Step S11: Classify and label the collected aircraft skin defect images, and convert the aircraft skin defect images into COCO data format;

[0017] Step S12: Construct a defect detection network that includes a ResNet network and an FPN network;

[0018] Step S13: Input the aircraft skin defect image into the constructed defect detection network, set the number of convolutional kernels, convolutional layer stride, max pooling layer stride, and number of channels, and extract output feature maps at different scales.

[0019] To better realize the present invention, step S2 further includes the following steps:

[0020] Step S21: Traverse the output feature map and generate defect detection anchor boxes at the origin of the output feature map;

[0021] Step S22: Traverse the positions of the output feature map and map the output feature map to the aircraft skin defect image according to the set stride.

[0022] Step S23: Add defect detection anchor boxes to the aircraft skin defect image corresponding to the output feature map to obtain the defect detection anchor boxes corresponding to each position in the output feature map.

[0023] To better realize the present invention, step S3 further includes the following steps:

[0024] Step S31: Construct a classifier and detector based on the defect detection network and the number of defect detection anchor boxes;

[0025] Step S32: Classify the defects in the aircraft skin defect image according to the constructed classifier, detect the location of the defects in the aircraft skin defect image according to the constructed detector, and calculate the ground truth bounding box of the defects in the aircraft skin defect image.

[0026] Step S33: Calculate the intersection-union ratio of the defect detection anchor frame and the real frame based on the area where the defect detection anchor frame intersects with the real frame and the area where the defect detection anchor frame merges with the real frame.

[0027] To better realize the present invention, step S4 further includes the following steps:

[0028] Step S41: Determine the sample type of the defect detection anchor frame based on the cross-union ratio;

[0029] Step S42: Calculate the Focal loss of the sample based on the set sample weighting parameters and sample control weights, call the gradient descent method to backpropagate the Focal loss, and update the defect detection network parameters.

[0030] Step S43: Obtain multi-scale aircraft skin defect images based on the updated defect detection network.

[0031] To better implement the present invention, the specific operation of step S41 is as follows: if the maximum value of the cross-union ratio is greater than or equal to the set maximum threshold, the defect detection anchor box is a positive sample of the real box corresponding to the predicted maximum cross-union ratio; if the minimum value of the cross-union ratio is less than the set minimum threshold, the defect detection anchor box is a negative sample of the real box corresponding to the predicted minimum cross-union ratio.

[0032] Based on the aforementioned aircraft skin defect detection method based on RetinaNet network, in order to better realize the present invention, a further proposed aircraft skin defect detection system based on RetinaNet network is proposed for use in the aforementioned aircraft skin defect detection method based on RetinaNet network; including an extraction unit, an anchor box generation unit, a ground truth box calculation unit, and an update unit.

[0033] The extraction unit is used to classify and label the collected aircraft skin defect images, and extract the aircraft skin defect images according to the constructed defect detection network to obtain the output feature map.

[0034] The anchor frame generation unit is used to randomly generate defect detection anchor frames based on the output feature map.

[0035] The real bounding box calculation unit is used to construct a classifier and detector based on the defect detection network, calculate the real bounding box of the aircraft skin defect image, and calculate the intersection-union ratio of the defect detection anchor box and the real bounding box.

[0036] The updating unit is used to calculate the sample type of the anchor frame according to the cross-union ratio, update the defect detection network, and obtain multi-scale aircraft skin defect images based on the updated defect detection network.

[0037] Based on the aforementioned RetinaNet-based aircraft skin defect detection method, to better realize the present invention, an electronic device is further proposed, characterized in that it includes a memory and a processor; the memory stores a computer program; when the computer program is executed on the processor, the aforementioned RetinaNet-based aircraft skin defect detection method is implemented.

[0038] Based on the aforementioned RetinaNet-based aircraft skin defect detection method, to better realize the present invention, a computer-readable storage medium is further proposed, characterized in that the computer-readable storage medium stores computer instructions; when the computer instructions are executed on the aforementioned electronic device, the aforementioned RetinaNet-based aircraft skin defect detection method is implemented.

[0039] The present invention has the following beneficial effects:

[0040] (1) This invention proposes a method for detecting aircraft skin defects based on RetinaNet network. This method overcomes the shortcomings of poor real-time performance of commonly used deep learning detection models and can quickly identify and locate surface defects of different types and sizes, replacing manual detection.

[0041] (2) This invention is an improvement on the RetinaNet network model and belongs to the one-stage method, which can quickly detect and locate defects in images and meet the requirements of real-time detection of defects on aircraft skin surfaces. Attached Figure Description

[0042] Figure 1 This is a flowchart illustrating the aircraft skin defect detection method based on RetinaNet network provided by the present invention.

[0043] Figure 2 This is a schematic diagram of multi-scale feature map extraction of defect images provided by the present invention. Detailed Implementation

[0044] To more clearly illustrate the technical solutions of the embodiments of the present invention, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. It should be understood that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments, and therefore should not be regarded as a limitation on the scope of protection. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0045] In the description of this invention, it should be noted that, unless otherwise explicitly specified and limited, the terms "set up," "connected," and "linked" 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.

[0046] Example 1:

[0047] This embodiment proposes an aircraft skin defect detection method based on a RetinaNet network. First, the acquired aircraft skin defect images are classified and labeled, and then the defect images are extracted using a constructed defect detection network to obtain output feature maps. Second, defect detection anchor boxes are randomly generated based on the output feature maps. Then, a classifier and detector are constructed using the defect detection network to calculate the ground truth bounding boxes of the aircraft skin defects and to calculate the intersection-union ratio (IU) between the defect detection anchor boxes and the ground truth bounding boxes. Finally, the sample type of the anchor boxes is calculated based on the IU, and the defect detection network is updated. Multi-scale aircraft skin defect images are obtained using the updated defect detection network. The specific steps include:

[0048] Step S1: Classify and label the collected aircraft skin defect images, and extract the aircraft skin defect images according to the constructed defect detection network to obtain output feature maps at different scales.

[0049] Step S1 specifically includes the following steps:

[0050] Step S11: Classify and label the collected aircraft skin defect images, and convert the aircraft skin defect images into COCO data format;

[0051] Step S12: Construct a RetinaNet network, which includes a ResNet network and an FPN network, i.e., a defect detection network;

[0052] Step S13: Input the aircraft skin defect image into the constructed defect detection network, set the number of convolutional kernels, convolutional layer stride, max pooling layer stride, and number of channels, and extract output feature maps at different scales.

[0053] Step S2: Based on the output feature map, randomly generate defect detection anchor boxes of different shapes and sizes.

[0054] Step S2 specifically includes the following steps:

[0055] Step S21: Traverse the output feature map and generate defect detection anchor boxes at the origin of the output feature map;

[0056] Step S22: Traverse the positions of the output feature map and map the output feature map to the aircraft skin defect image according to the set stride.

[0057] Step S23: Add defect detection anchor boxes to the aircraft skin defect image corresponding to the output feature map to obtain the defect detection anchor boxes corresponding to each position in the output feature map.

[0058] Step S3: Construct a classifier and detector based on the defect detection network, classify image defects and detect the location of image defects, calculate the ground truth bounding boxes of aircraft skin defect images, and calculate the intersection-union ratio (IUU) of defect detection anchor boxes and ground truth bounding boxes.

[0059] Step S3 specifically includes the following steps:

[0060] Step S31: Construct a classifier and detector based on the defect detection network and the number of defect detection anchor boxes;

[0061] Step S32: Classify the defects in the aircraft skin defect image according to the constructed classifier, detect the location of the defects in the aircraft skin defect image according to the constructed detector, and calculate the ground truth bounding box of the defects in the aircraft skin defect image.

[0062] Step S33: Calculate the intersection-union ratio of the defect detection anchor frame and the real frame based on the area where the defect detection anchor frame intersects with the real frame and the area where the defect detection anchor frame merges with the real frame.

[0063] Step S4: Calculate the sample type of the anchor frame based on the cross-union ratio, calculate the Focal loss of the sample, backpropagate the Focal loss, update the defect detection network parameters, and obtain multi-scale aircraft skin defect images.

[0064] Furthermore, step S4 specifically includes the following steps:

[0065] Step S41: Determine the sample type of the defect detection anchor frame based on the cross-union ratio;

[0066] The specific operation of step S41 is as follows: if the maximum value of the cross-union ratio is greater than or equal to the set maximum threshold, then the defect detection anchor box is a positive sample of the real box corresponding to the predicted maximum cross-union ratio; if the minimum value of the cross-union ratio is less than the set minimum threshold, then the defect detection anchor box is a negative sample of the real box corresponding to the predicted minimum cross-union ratio.

[0067] Step S42: Calculate the Focal loss of the sample based on the set sample weighting parameters and sample control weights, call the gradient descent method to backpropagate the Focal loss, and update the defect detection network parameters.

[0068] Step S43: Obtain multi-scale aircraft skin defect images based on the updated defect detection network.

[0069] Working principle: This embodiment first classifies and labels the collected aircraft skin defect images, and extracts the aircraft skin defect images based on the constructed defect detection network to obtain output feature maps; secondly, based on the output feature maps, defect detection anchor boxes are randomly generated; then, a classifier and detector are constructed based on the defect detection network to calculate the ground truth bounding boxes of the aircraft skin defect images, and the intersection-union ratio (IU) between the defect detection anchor boxes and the ground truth bounding boxes is calculated; finally, the sample type of the anchor boxes is calculated based on the IU, the defect detection network is updated, and multi-scale aircraft skin defect images are obtained based on the updated defect detection network; thus achieving efficient detection of defects of different types and scales.

[0070] Example 2:

[0071] This embodiment is based on the above embodiment 1, such as... Figure 1 , Figure 2 As shown, a specific embodiment will be described in detail, which includes the following steps.

[0072] Step S1: Classify and label the aircraft skin defect images, convert them to COCO data format, build ResNet and FPN networks, and extract output feature maps of five different scales from the aircraft skin defect images.

[0073] In step S1, aircraft skin defects include five categories: scratches, dents, pits, abrasions, and protrusions.

[0074] The steps for building a ResNet and FPN network and extracting output feature maps at five different scales from aircraft skin defect images are as follows:

[0075] S11: The ResNet network consists of 5 different stages: stage 0, stage 1, stage 2, stage 3, and stage 4.

[0076] S12: In stage 0, the original defect image of size 3×2048×2048 is passed through a convolutional layer with a kernel of 7×7 and a max pooling layer with a kernel of 3×3, respectively, to output a feature map of size 64×512×512. The number of convolutional kernels in the convolutional layer is set to 64, and the stride of both the convolutional layer and the max pooling layer is set to 2.

[0077] S13: In stages 1 to 4, the 64×512×512 feature map is processed through different sub-modules to output four feature maps of different scales: c2, c3, c4, and c5. The number of sub-modules is set to 3, 4, 6, and 3, respectively; the number of channels for c2, c3, c4, and c5 are 256, 512, 1024, and 2048, respectively; the sizes of c2, c3, c4, and c5 are 512×512, 256×256, 128×128, and 4, respectively; and the stride of each feature map and the original image is 4, 8, 16, and 32, respectively.

[0078] S14: The FPN network receives the last three feature maps c3, c4, and c5 from the ResNet output and uses them to construct feature maps, outputting five feature maps P3, P4, P5, P6, and P7 at different scales. The number of channels for P3, P4, P5, P6, and P7 is 256. The sizes of P3, P4, P5, P6, and P7 are 512×512, 256×256, 128×128, 32×32, and 16×16, respectively. The strides of P3, P4, P5, P6, and P7 are 8, 16, 32, 64, and 128, respectively.

[0079] Step S2: Based on different feature output maps, randomly generate anchor boxes of different shapes and sizes to detect defects, and build a classifier and detector based on a convolutional neural network. The classifier is responsible for classifying defects in the image, and the detector is responsible for detecting the location of defects in the image.

[0080] S21: Traverse the 5 output feature maps P3, P4, P5, P6 and P7, and generate 9 different anchor boxes at the origin of each feature map. The 9 anchor boxes contain 3 scales and 3 aspect ratios. The 3 scales are set to 8, 16 and 32 respectively. The 3 aspect ratios are set to 0.5, 1.0 and 2.0 respectively.

[0081] S22: Traverse the position of each feature map in the five output feature maps P3, P4, P5, P6 and P7, and map them onto the original map according to the stride;

[0082] S23: Add 9 different anchor boxes to the original image positions corresponding to the feature map, to obtain all the anchor boxes in the original image corresponding to each position in the feature map. Among them, P3 corresponds to 589824 anchor boxes; P4 corresponds to 147456 anchor boxes; P5 corresponds to 36864 anchor boxes; P6 corresponds to 9216 anchor boxes; P7 corresponds to 2304 anchor boxes. The total number of anchor boxes in the original image is K = 785664.

[0083] Building a classifier and detector based on a convolutional neural network means that the output module includes two branches: classification and detection. Each branch contains four convolutional layers without parameter sharing. The classifier has 5*K output channels, and the detection output channels have 4*K, where K is the number of anchor boxes.

[0084] In the classifier, the input image is passed sequentially through four convolutional layers with a kernel size of 3×3 and one output convolutional layer. The first four convolutional layers are followed by the non-linear activation function ReLU, and their output channels are all set to 256. The output channels of the output convolutional layer are 5*K.

[0085] In the detector, the input image is passed sequentially through four convolutional layers with a kernel size of 3×3 and one output convolutional layer. The first four convolutional layers are followed by the non-linear activation function ReLU, and their output channels are all set to 256. The output convolutional layer is followed by the Sigmoid function, and its output channels are 4*K.

[0086] Step S3: Calculate the Intersection over Union (IoU) of the ground true box and different anchor boxes for each defect in the original image, and calculate the positive and negative samples for classification and detection based on the IoU.

[0087] The steps for calculating the Intersection over Union (IoU) of the ground true box and different anchor boxes for each defect in the original image, and then calculating the positive and negative samples for classification and detection based on the IoU, are as follows:

[0088] S31: Calculate the IoU value between each anchor box and all real boxes. The calculation formula is as follows:

[0089] iou = S1 / S2;

[0090] Where S1 represents the area where the anchor frame and the real frame intersect, and S2 represents the area where the anchor frame and the real frame merge.

[0091] S32: Find the maximum IoU between each anchor box and all ground truth boxes. If the maximum IoU is greater than or equal to the set maximum threshold, then the anchor box is a positive sample of the ground truth box corresponding to the predicted maximum IoU. The maximum threshold is set to 0.5.

[0092] S33: Find the minimum IOU between each anchor box and all ground truth boxes. If the minimum IOU is less than the set minimum threshold, the anchor box is a negative sample. The minimum threshold is set to 0.4.

[0093] Step S4: Calculate the Focal loss of the sample during training, and backpropagate the Focal loss using gradient descent, while updating all parameters in the network.

[0094] Focal loss is:

[0095] loss = -α(1-p) γ log(p)

[0096] Where α is the weighting parameter for positive and negative samples; γ is the weight controlling the difficulty of samples; p is the predicted value of the sample during model training. In this embodiment, α is set to 0.25 and γ is set to 2.

[0097] The other parts of this embodiment are the same as those in Embodiment 1 above, so they will not be described again.

[0098] Example 3:

[0099] Based on any one of Embodiments 1-2 above, this embodiment proposes an aircraft skin defect detection system based on RetinaNet network, used to execute the above-described aircraft skin defect detection method based on RetinaNet network; it includes an extraction unit, an anchor frame generation unit, a ground truth frame calculation unit, and an update unit;

[0100] The extraction unit is used to classify and label the collected aircraft skin defect images, and extract the aircraft skin defect images according to the constructed defect detection network to obtain the output feature map.

[0101] The anchor frame generation unit is used to randomly generate defect detection anchor frames based on the output feature map.

[0102] The real bounding box calculation unit is used to construct a classifier and detector based on the defect detection network, calculate the real bounding box of the aircraft skin defect image, and calculate the intersection-union ratio of the defect detection anchor box and the real bounding box.

[0103] The updating unit is used to calculate the sample type of the anchor frame according to the cross-union ratio, update the defect detection network, and obtain multi-scale aircraft skin defect images based on the updated defect detection network.

[0104] This embodiment also proposes an electronic device, characterized in that it includes a memory and a processor; the memory stores a computer program; when the computer program is executed on the processor, it implements the above-described aircraft skin defect detection method based on RetinaNet network.

[0105] This embodiment also proposes a computer-readable storage medium, characterized in that the computer-readable storage medium stores computer instructions; when the computer instructions are executed on the aforementioned electronic device, the aforementioned aircraft skin defect detection method based on RetinaNet network is implemented.

[0106] The other parts of this embodiment are the same as any one of the above embodiments 1-2, so they will not be described again.

[0107] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention in any way. Any simple modifications or equivalent changes made to the above embodiments based on the technical essence of the present invention shall fall within the protection scope of the present invention.

Claims

1. A method for detecting aircraft skin defects based on RetinaNet network, characterized in that, First, the collected aircraft skin defect images are classified and labeled, and the aircraft skin defect images are extracted according to the constructed defect detection network to obtain the output feature map; then, defect detection anchor boxes are randomly generated according to the output feature map. Then, a classifier and detector are constructed based on the defect detection network to calculate the ground truth bounding boxes of the aircraft skin defect images and to calculate the intersection-union ratio (IU) between the defect detection anchor boxes and the ground truth bounding boxes. Finally, the sample type of the anchor boxes is calculated based on the IU, the defect detection network is updated, and multi-scale aircraft skin defect images are obtained based on the updated defect detection network. The aircraft skin defect detection method based on RetinaNet network specifically includes the following steps: Step S1: Classify and label the collected aircraft skin defect images, and extract the aircraft skin defect images according to the constructed defect detection network to obtain output feature maps at different scales; Step S2: Based on the output feature map, randomly generate defect detection anchor boxes of different shapes and sizes; Step S3: Construct a classifier and detector based on the defect detection network, classify image defects and detect the location of image defects, calculate the ground truth bounding boxes of aircraft skin defect images, and calculate the intersection-union ratio of defect detection anchor boxes and ground truth bounding boxes; Step S4: Calculate the sample type of the anchor frame based on the cross-union ratio, calculate the Focal loss of the sample, backpropagate the Focal loss, update the defect detection network parameters, and obtain multi-scale aircraft skin defect images. Step S1 specifically includes the following steps: Step S11: Classify and label the collected aircraft skin defect images, and convert the aircraft skin defect images into COCO data format; Step S12: Construct a defect detection network that includes a ResNet network and an FPN network; Step S13: Input the aircraft skin defect image into the constructed defect detection network, set the number of convolutional kernels, convolutional layer stride, max pooling layer stride, and number of channels, and extract output feature maps at different scales.

2. The aircraft skin defect detection method based on RetinaNet network according to claim 1, characterized in that, Step S2 specifically includes the following steps: Step S21: Traverse the output feature map and generate defect detection anchor boxes at the origin of the output feature map; Step S22: Traverse the positions of the output feature map and map the output feature map to the aircraft skin defect image according to the set stride. Step S23: Add defect detection anchor boxes to the aircraft skin defect image corresponding to the output feature map to obtain the defect detection anchor boxes corresponding to each position in the output feature map.

3. The aircraft skin defect detection method based on RetinaNet network according to claim 2, characterized in that, Step S3 specifically includes the following steps: Step S31: Construct a classifier and detector based on the defect detection network and the number of defect detection anchor boxes; Step S32: Classify the defects in the aircraft skin defect image according to the constructed classifier, detect the location of the defects in the aircraft skin defect image according to the constructed detector, and calculate the ground truth bounding box of the defects in the aircraft skin defect image. Step S33: Calculate the intersection-union ratio of the defect detection anchor frame and the real frame based on the area where the defect detection anchor frame intersects with the real frame and the area where the defect detection anchor frame merges with the real frame.

4. The aircraft skin defect detection method based on RetinaNet network according to claim 3, characterized in that, Step S4 specifically includes the following steps: Step S41: Determine the sample type of the defect detection anchor frame based on the cross-union ratio; Step S42: Calculate the Focal loss of the sample based on the set sample weighting parameters and sample control weights, call the gradient descent method to backpropagate the Focal loss, and update the defect detection network parameters. Step S43: Obtain multi-scale aircraft skin defect images based on the updated defect detection network.

5. The aircraft skin defect detection method based on RetinaNet network according to claim 4, characterized in that, The specific operation of step S41 is as follows: if the maximum value of the cross-union ratio is greater than or equal to the set maximum threshold, then the defect detection anchor box is a positive sample of the real box corresponding to the predicted maximum cross-union ratio; if the minimum value of the cross-union ratio is less than the set minimum threshold, then the defect detection anchor box is a negative sample of the real box corresponding to the predicted minimum cross-union ratio.

6. An aircraft skin defect detection system based on a RetinaNet network, used to execute the aircraft skin defect detection method based on a RetinaNet network as described in claim 1; characterized in that, It includes an extraction unit, an anchor box generation unit, a ground truth box calculation unit, and an update unit; The extraction unit is used to classify and label the collected aircraft skin defect images, and extract the aircraft skin defect images according to the constructed defect detection network to obtain the output feature map. The anchor frame generation unit is used to randomly generate defect detection anchor frames based on the output feature map. The real bounding box calculation unit is used to construct a classifier and detector based on the defect detection network, calculate the real bounding box of the aircraft skin defect image, and calculate the intersection-union ratio of the defect detection anchor box and the real bounding box. The updating unit is used to calculate the sample type of the anchor frame according to the cross-union ratio, update the defect detection network, and obtain multi-scale aircraft skin defect images based on the updated defect detection network.

7. An electronic device, characterized in that, It includes a memory and a processor; the memory stores a computer program; when the computer program is executed on the processor, it implements the aircraft skin defect detection method based on RetinaNet network as described in any one of claims 1-5.

8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions; when the computer instructions are executed on the electronic device as described in claim 7, the aircraft skin defect detection method based on the RetinaNet network as described in any one of claims 1-5 is implemented.

Citation Information

Patent Citations

  • Method for realizing aircraft skin paint spraying surface defect detection and classification

    CN112669292A

  • Aircraft skin surface damage detection method and system based on deep learning

    CN114565579A

  • Insulator defect detection method based on improved YOLOv7

    CN115731164A

  • Aircraft skin defect detection and network model training method

    CN117252842A