Training method and device of aircraft surface defect recognition model, equipment and medium

Generative adversarial networks are used to generate simulation image data, expand training data sets, and train convolutional neural networks, which solves the problem of time-consuming and labor-intensive data set construction in aircraft surface defect detection, and improves detection efficiency and accuracy.

CN118628864APending Publication Date: 2024-09-10CHINA TELECOM CORP LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202410757092.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-12
Publication Date
2024-09-10

Smart Images

  • Figure CN118628864A
    Figure CN118628864A
Patent Text Reader

Abstract

The embodiment of the invention provides a training method and device for an aircraft surface defect recognition model, equipment and a medium. The method comprises the following steps: acquiring image data containing aircraft surface defects; training a pre-constructed to-be-trained generative adversarial network based on the image data to obtain the generative adversarial network; performing data expansion processing on the image data based on the generative adversarial network to obtain a model training data set; and based on the model training data set, training a pre-constructed convolutional neural network used for carrying out aircraft surface defect identification to obtain the aircraft surface defect identification model. According to the embodiment of the invention, the loss of human resources and time in the process of constructing the data set can be reduced, and the efficiency of aircraft surface defect detection is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of artificial intelligence technology, and in particular to a training method, device, equipment and medium for an aircraft surface defect recognition model. Background Art

[0002] The surface of an aircraft may have certain quality defects due to scratches, lightning strikes, etc. during long-term flight operations, such as corrosion, impact pits, cracks, scratches, lightning strikes, paint peeling, etc. Aircraft surface defects will bring additional resistance and even cause premature transition. Accurately identifying aircraft surface quality defects can provide a reference for aircraft maintenance, thereby improving the safety and economic benefits of aircraft maintenance operations.

[0003] At present, the commonly used methods for aircraft surface defect detection mainly use two methods: manual visual inspection and machine vision inspection. Manual visual inspection is greatly affected by factors such as personnel's professional level and fatigue level, which will lead to low efficiency and accuracy of aircraft surface defect detection. Machine vision inspection is usually based on deep learning technology, and the current surface defect detection based on deep learning technology is mainly based on building data sets and training convolutional neural networks. When detecting aircraft surface defects based on deep learning, in the process of building data sets, due to the particularity of surface defect types and the large demand for data, defect images can only be taken manually and require time to accumulate, which consumes a lot of human resources and time. Summary of the invention

[0004] The technical problem to be solved by the embodiments of the present application is to provide a training method, device, equipment and medium for an aircraft surface defect recognition model to reduce the loss of human resources and time in the process of constructing a data set and improve the efficiency and accuracy of aircraft surface defect detection.

[0005] In a first aspect, an embodiment of the present application provides a method for training an aircraft surface defect recognition model, the method comprising:

[0006] Acquire image data containing surface defects of the aircraft;

[0007] Training a pre-constructed generative adversarial network to be trained based on the image data to obtain a generative adversarial network;

[0008] Performing data expansion processing on the image data based on the generative adversarial network to obtain a model training data set;

[0009] A pre-built convolutional neural network for aircraft surface defect recognition is trained based on the model training data set to obtain the aircraft surface defect recognition model.

[0010] Optionally, the generative adversarial network to be trained includes: a generator, a discriminator and an optimizer.

[0011] The step of training a pre-constructed generative adversarial network to be trained based on the image data to obtain a generative adversarial network includes:

[0012] Calling the generator to process the image data to generate simulated image data of the same category as the image data;

[0013] Calling the discriminator to determine whether the categories of the simulated image data and the image data are consistent based on the category determination rule, and obtaining a determination result;

[0014] Based on the judgment result, the category of the simulation image data and the category of the image data, a first loss value of the generative adversarial network to be trained is calculated;

[0015] When the first loss value is within a preset range, using the trained generative adversarial network to be trained as the final generative adversarial network;

[0016] The optimizer is called to adjust the model parameters of the generative adversarial network to be trained based on the first loss value when the first loss value is outside a preset range, and the generative adversarial network to be trained is continued to be trained until the generative adversarial network to be trained converges to obtain the generative adversarial network.

[0017] Optionally, performing data expansion processing on the image data based on the generative adversarial network to obtain a model training data set includes:

[0018] Calling the generator of the generative adversarial network to process the image data to generate initial simulated image data consistent with the category of the image data;

[0019] Calling the discriminator of the generative adversarial network to determine whether the categories of the initial simulated image data and the image data are consistent, and outputting a probability value that the categories of the initial simulated image data and the image data are consistent;

[0020] Target simulation image data whose probability value is greater than a set threshold is screened out from the initial simulation image data, and the model training data set is determined based on the target simulation image data and the image data.

[0021] Optionally, each sample image in the model training data set is annotated with aircraft surface defect annotation information.

[0022] The method of training a pre-built convolutional neural network for aircraft surface defect recognition based on the model training data set to obtain the aircraft surface defect recognition model includes:

[0023] Inputting the sample image into the convolutional neural network;

[0024] Obtaining aircraft surface defect prediction information corresponding to the sample image output by the convolutional neural network;

[0025] Based on the aircraft surface defect annotation information and the aircraft surface defect prediction information, a second loss value of the convolutional neural network is calculated;

[0026] When the second loss value is within a preset range, the trained convolutional neural network is used as the aircraft surface defect recognition model.

[0027] Optionally, after training a pre-built convolutional neural network for aircraft surface defect recognition based on the model training data set to obtain the aircraft surface defect recognition model, the method further includes:

[0028] Acquire an image of a target aircraft to be identified, wherein the image to be identified is an image obtained by photographing the outer surface of the target aircraft;

[0029] Inputting the image to be identified into the aircraft surface defect recognition model so that the aircraft surface defect recognition model processes the image to be identified;

[0030] Obtain an aircraft surface defect recognition result corresponding to the image to be recognized output by the aircraft surface defect recognition model.

[0031] Optionally, after obtaining the aircraft surface defect recognition result corresponding to the image to be recognized output by the aircraft surface defect recognition model, the method further includes:

[0032] When the aircraft surface defect identification result indicates that there are defects on the surface of the target aircraft, obtaining defect description information of the outer surface of the target aircraft;

[0033] The image to be identified and the defect description information are displayed in a visual interface.

[0034] Optionally, the generator is a U-type network, the discriminator is a densely connected network, and the optimizer is an Adam network.

[0035] In a second aspect, an embodiment of the present application provides a training device for an aircraft surface defect recognition model, the device comprising:

[0036] An image data acquisition module, used to acquire image data containing surface defects of the aircraft;

[0037] An adversarial network acquisition module, used to train a pre-constructed generative adversarial network to be trained based on the image data to obtain a generative adversarial network;

[0038] A training data set acquisition module, used to perform data expansion processing on the image data based on the generative adversarial network to obtain a model training data set;

[0039] The defect recognition model acquisition module is used to train a pre-built convolutional neural network for aircraft surface defect recognition based on the model training data set to obtain the aircraft surface defect recognition model.

[0040] Optionally, the generative adversarial network to be trained includes: a generator, a discriminator and an optimizer.

[0041] The adversarial network acquisition module includes:

[0042] a simulation image data generating unit, configured to call the generator to process the image data and generate simulation image data of the same category as the image data;

[0043] A judgment result acquisition unit, used for calling the discriminator to judge whether the categories of the simulation image data and the image data are consistent based on the category judgment rule, and obtaining a judgment result;

[0044] A first loss calculation unit, configured to calculate a first loss value of the generative adversarial network to be trained based on the judgment result, the category of the simulated image data, and the category of the image data;

[0045] A first adversarial network acquisition unit, configured to use the trained generative adversarial network to be trained as the final generative adversarial network when the first loss value is within a preset range;

[0046] The second adversarial network acquisition unit is used to call the optimizer to adjust the model parameters of the generative adversarial network to be trained based on the first loss value when the first loss value is outside a preset range, and continue to train the generative adversarial network to be trained until the generative adversarial network to be trained converges to obtain the generative adversarial network.

[0047] Optionally, the training data set acquisition module includes:

[0048] An initial simulated image generating unit, configured to call the generator of the generative adversarial network to process the image data and generate initial simulated image data consistent with the category of the image data;

[0049] A probability value output unit, configured to call the discriminator of the generative adversarial network to determine whether the categories of the initial simulated image data and the image data are consistent, and output a probability value that the categories of the initial simulated image data and the image data are consistent;

[0050] The training data set determination unit is used to screen out the target simulation image data whose probability value is greater than a set threshold from the initial simulation image data, and determine the model training data set based on the target simulation image data and the image data.

[0051] Optionally, each sample image in the model training data set is annotated with aircraft surface defect annotation information.

[0052] The defect recognition model acquisition module includes:

[0053] A sample image input unit, used to input the sample image into the convolutional neural network;

[0054] A defect prediction information output unit, used to obtain aircraft surface defect prediction information corresponding to the sample image output by the convolutional neural network;

[0055] A second loss calculation unit, configured to calculate a second loss value of the convolutional neural network based on the aircraft surface defect annotation information and the aircraft surface defect prediction information;

[0056] A defect recognition model acquisition unit is used to use the trained convolutional neural network as the aircraft surface defect recognition model when the second loss value is within a preset range.

[0057] Optionally, the device further comprises:

[0058] Acquire an image of a target aircraft to be identified, wherein the image to be identified is an image obtained by photographing the outer surface of the target aircraft;

[0059] Inputting the image to be identified into the aircraft surface defect recognition model so that the aircraft surface defect recognition model processes the image to be identified;

[0060] Obtain an aircraft surface defect recognition result corresponding to the image to be recognized output by the aircraft surface defect recognition model.

[0061] Optionally, the device further comprises:

[0062] When the aircraft surface defect identification result indicates that there are defects on the surface of the target aircraft, obtaining defect description information of the outer surface of the target aircraft;

[0063] The image to be identified and the defect description information are displayed in a visual interface.

[0064] Optionally, the generator is a U-type network, the discriminator is a densely connected network, and the optimizer is an Adam network.

[0065] In a third aspect, an embodiment of the present application provides an electronic device, including:

[0066] A processor, a memory, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the training method for an aircraft surface defect recognition model described in any one of the above items is implemented.

[0067] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium. When the instructions in the storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute any of the above-mentioned training methods for an aircraft surface defect recognition model.

[0068] Compared with the prior art, the embodiments of the present application have the following advantages:

[0069] In an embodiment of the present application, image data containing defects on the surface of an aircraft is obtained. A pre-constructed generative adversarial network to be trained is trained based on the image data to obtain a generative adversarial network. Data expansion processing is performed on the image data based on the generative adversarial network to obtain a model training data set. A pre-constructed convolutional neural network for aircraft surface defect recognition is trained based on the model training data set to obtain an aircraft surface defect recognition model. The embodiment of the present application generates more images as a training data set by training a generative adversarial network, thereby overcoming the problem of insufficient training samples and reducing human resources and time loss in the process of constructing a data set. At the same time, the method of using a model to identify aircraft surface defects can improve the efficiency and accuracy of aircraft surface defect recognition.

[0070] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0071] Figure 1 A flowchart of the steps of a method for training an aircraft surface defect recognition model provided in an embodiment of the present application;

[0072] Figure 2 A schematic diagram of an intelligent identification process for aircraft surface defect inspection provided in an embodiment of the present application;

[0073] Figure 3 A schematic diagram of a generative adversarial network training process provided in an embodiment of the present application;

[0074] Figure 4 A schematic diagram of a convolutional neural network training process provided in an embodiment of the present application;

[0075] Figure 5 A schematic diagram of a functional module of a generative adversarial network provided in an embodiment of the present application;

[0076] Figure 6 A schematic diagram of the structure of a training device for an aircraft surface defect recognition model provided in an embodiment of the present application;

[0077] Figure 7 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0078] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, the present application is further described in detail below in conjunction with the accompanying drawings and specific implementation methods.

[0079] The terms used in the embodiments of the present application are only for the purpose of describing specific embodiments, and are not intended to limit the present application. The singular forms "a", "said" and "the" used in the embodiments of the present application and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings.

[0080] Reference Figure 1 , shows a flowchart of the steps of a method for training an aircraft surface defect recognition model provided by an embodiment of the present application, such as Figure 1 As shown, the training method of the aircraft surface defect recognition model may include: step 101, step 102, step 103 and step 104.

[0081] Step 101: Acquire image data containing surface defects of an aircraft.

[0082] The embodiments of the present application can be applied to a scenario where more images are generated as training data sets by training a generative adversarial network to train an aircraft surface defect recognition model.

[0083] An aircraft refers to a device that flies within the atmosphere or in space outside the atmosphere (outer space). In this example, the aircraft may be an airplane, an airship, a manned spacecraft, or other equipment.

[0084] When training an aircraft surface defect recognition model, image data containing aircraft surface defects may be obtained.

[0085] In a specific implementation, the image data containing defects on the aircraft surface may be a data set composed of a number of images containing complete three-dimensional positioning data on the aircraft surface.

[0086] In practical applications, taking aircraft as an example, the aircraft smart maintenance site intelligent operator system can set the working parameters of the sensor through the high-definition image sensor API (Application Programming Interface) interface (i.e., application program interface), and read the high-definition image acquisition data of the aircraft surface through the sensor API interface, and store the acquired data in real time. Among them, the aircraft smart maintenance site intelligent operator system is equipped with a data acquisition interface and a defect data comprehensive query interface. The data acquisition interface includes a data acquisition device control interface and a data acquisition interface. The defect data comprehensive query interface is used to query aircraft surface defect-related data, including flight number, defect number; the category, location, image information, marked personnel, etc. of a specific defect.

[0087] The smart operator system of aircraft intelligent maintenance site can control the image acquisition equipment to achieve high-definition imaging scanning coverage of a part of the upper surface of the aircraft at a data acquisition position. And according to the multi-camera acquisition rules for full coverage of the upper surface of the aircraft, the data acquisition system is guided to realize multi-camera data acquisition and complete the acquisition of high-definition image data of all areas of the upper surface of the aircraft.

[0088] The aircraft smart maintenance on-site intelligent operator system can overall splice, deduplicate and stitch the data from different areas on the aircraft surface acquired by the acquisition system to form a complete high-definition map of the aircraft surface with three-dimensional positioning data, thereby obtaining a historical data set containing aircraft defect image data.

[0089] After the aircraft surface data is acquired, the intelligent recognition algorithm can automatically detect aircraft surface defects and classify and identify specific categories of defects.

[0090] Furthermore, the high-definition image data of the aircraft surface needs to meet the requirements that the actual detail resolution of the surface image reaches 1mm, and the data acquisition time needs to be less than 90 minutes;

[0091] The position marking accuracy in the surface inspection work platform needs to be within 20cm, so as to guide maintenance workers to find the defect location quickly and accurately on site.

[0092] The pixel accuracy rate in the intelligent recognition assistance for surface defect inspection needs to be above 85%, and the average cross-ratio needs to be above 72%.

[0093] The database supports retrospective query of historical aircraft skin inspection process data, including flight number, inspection time, panoramic images, detail images and other process data.

[0094] After the image data containing the aircraft surface defects are acquired, step 102 is executed.

[0095] Step 102: training a pre-constructed generative adversarial network to be trained based on the image data to obtain a generative adversarial network.

[0096] After acquiring image data containing surface defects of the aircraft, a pre-constructed generative adversarial network to be trained can be trained based on the image data to obtain a generative adversarial network.

[0097] Generative Adversarial Networks (GAN) is an unsupervised learning method in which the generator network and the discriminator network learn through mutual competition.

[0098] In this embodiment, a generative adversarial network to be trained may be constructed first, and the generative adversarial network to be trained may include: a generator, a discriminator, and an optimizer. The training process of the generative adversarial network may be described in detail in combination with the following specific implementation methods.

[0099] In a specific implementation of the present application, the above step 102 may include:

[0100] Sub-step A1: calling the generator to process the image data to generate simulated image data of the same category as the image data.

[0101] In this embodiment, the image data can be calibrated, and the number of training rounds, the learning rate of the optimizer, and the number of processing batches of the generator can be set respectively. Then, the image data can be input into the generative adversarial network for cyclic training until the number of iteration rounds reaches the number of training rounds.

[0102] During the specific training process, the generator may be called to process the image data to generate simulated image data of the same category as the image data.

[0103] Sub-step A2: calling the discriminator to determine whether the categories of the simulated image data and the image data are consistent based on the category determination rule, and obtaining a determination result.

[0104] Then, the simulated image data can be used as the input of the discriminator, and the discriminator is called to judge whether the categories of the simulated image data and the image data are consistent based on the category judgment rule to obtain a judgment result.

[0105] In a specific implementation, the discriminator can determine whether the simulated image data and the image data are of the same category based on the category determination rules, and convert the judgment result into 1 or 0 and output it, where 1 indicates that the category of the simulated image data is consistent with that of the original input image data, and 0 indicates inconsistency.

[0106] Sub-step A3: Based on the judgment result, the category of the simulated image data and the category of the image data, a first loss value of the generative adversarial network to be trained is calculated.

[0107] After obtaining the judgment result output by the discriminator, the first loss value of the generative adversarial network to be trained can be calculated based on the judgment result, the category of the simulated image data and the category of the image data.

[0108] In this example, the loss function of the generative adversarial network may be, but is not limited to, a Wasserstein distance function.

[0109] In specific implementations, the loss function of a generative adversarial network usually consists of two parts: the loss of the generator and the loss of the discriminator. The following will introduce the calculation methods of these two parts respectively:

[0110] 1. Generator loss:

[0111] The goal of the generator is to generate samples that are as close to real data as possible to deceive the discriminator. Therefore, the loss function of the generator usually measures the difference between the generated fake samples and the real samples. Commonly used loss functions include cross entropy loss, least squares loss, etc.

[0112] 2. Loss of the discriminator:

[0113] The goal of the discriminator is to correctly distinguish between real samples and fake samples generated by the generator. Therefore, the loss function of the discriminator usually consists of two parts: one part measures the discriminator's score for real samples, and the other part measures the discriminator's score for fake samples.

[0114] After calculating the first loss value of the generative adversarial network to be trained based on the judgment result, the category of the simulated image data and the category of the image data, sub-step A4 is executed, or sub-step A5 is executed.

[0115] Sub-step A4: when the first loss value is within a preset range, the trained generative adversarial network to be trained is used as the final generative adversarial network.

[0116] When the first loss value is within a preset range, the trained generative adversarial network to be trained can be used as the final generative adversarial network.

[0117] Sub-step A5: When the first loss value is outside a preset range, the optimizer is called to adjust the model parameters of the generative adversarial network to be trained based on the first loss value, and the generative adversarial network to be trained is continued to be trained until the generative adversarial network to be trained converges to obtain the generative adversarial network.

[0118] When the first loss value is outside a preset range, the optimizer can be called to adjust the model parameters of the generative adversarial network to be trained based on the first loss value, and continue to train the generative adversarial network to be trained until the generative adversarial network to be trained converges to obtain a generative adversarial network.

[0119] The training process of the generative adversarial network can be combined with Figure 3 and Figure 5 This is described in detail as follows.

[0120] like Figure 3 and Figure 5 As shown, the constructed generative adversarial network can include:

[0121] The generator is used to generate simulated image data of the same category as the image data according to the input image data, and output the image data and the simulated image data.

[0122] The discriminator determines whether the simulated image data and the image data are of the same category based on the category determination rules, converts the determination result into 1 or 0 and outputs it.

[0123] The loss function counts the output of the discriminator and calculates the difference between the simulated image data and the input image data.

[0124] The optimizer updates the parameters of the generator according to the difference value.

[0125] In an optional example of the present application, the generator is a U-type network, the discriminator is a densely connected network, the loss function is a Wasserstein distance function, and the optimizer is Adam.

[0126] Furthermore, the steps of training the generative adversarial network inputting the historical data set specifically include:

[0127] 1. Calibrate the aircraft defect image data in the historical data set.

[0128] 2. Set the number of training rounds, the learning rate of the optimizer, and the number of processing batches of the generator respectively.

[0129] 3. Input the historical data set into the generative adversarial network for cyclic training until the number of iterations reaches the number of training rounds.

[0130] The category determination rules are:

[0131] The calibrated image data is judged whether the simulated image data passed by the generator contains aircraft surface defects. If so, it is judged to be consistent in category, otherwise, it is inconsistent in category.

[0132] 3. For the uncalibrated image data, determine whether the simulated image data passed by the generator contains aircraft surface defects. If not, it is judged to be consistent in category, and if so, it is inconsistent in category.

[0133] Furthermore, defect types include: cracks, scratches, lightning strikes, and paint peeling. When calibrating the data, different defect types are calibrated for training, so as to train for different types of defects and enable classification and identification when defects on the aircraft surface are identified.

[0134] Specifically, based on the defect database provided by China Southern Airlines for algorithm training, data is marked and an algorithm training data set is formed. The system classifies and organizes daily operation data, and continuously supplements and optimizes the algorithm training data set to improve the algorithm's recognition ability.

[0135] After the generative adversarial network is trained, step 103 is performed.

[0136] Step 103: Perform data expansion processing on the image data based on the generative adversarial network to obtain a model training data set.

[0137] After the generative adversarial network is trained, data augmentation processing can be performed on the image data based on the generative adversarial network to obtain a model training data set. The implementation process can be described in detail in conjunction with the following specific implementation method.

[0138] In a specific implementation of the present application, the above step 103 may include:

[0139] Sub-step B1: calling the generator of the generative adversarial network to process the image data to generate initial simulated image data consistent with the category of the image data.

[0140] In this embodiment, when expanding the sample data set for training the aircraft surface defect recognition model, the pre-acquired image data containing aircraft surface defects can be input into the generative adversarial network to call the generator of the generative adversarial network to process the image data and generate initial simulated image data consistent with the image data category.

[0141] In practical applications, the generator is designed to generate images from random noise, which should be similar to the real images in the training data to some extent. In this step, the given image data (which may be real images or some kind of labels) are taken as conditions or inputs (in some conditional GANs), and the generator is called to generate initial simulated image data consistent with the category of these image data.

[0142] Sub-step B2: calling the discriminator of the generative adversarial network to determine whether the categories of the initial simulated image data and the image data are consistent, and outputting a probability value that the categories of the initial simulated image data and the image data are consistent.

[0143] Then, the discriminator of the generative adversarial network can be called to determine whether the categories of the initial simulated image data and the image data are consistent, and output the probability value that the initial simulated image data is consistent with the image data category.

[0144] The discriminator is a network in the GAN that is trained to distinguish between real images and fake images generated by the generator. In this step, the initial simulated image data and the original image data can be provided to the discriminator together. The task of the discriminator is to determine whether the category of these initial simulated image data is consistent with that of the original image data, and output a probability value indicating its confidence that these images belong to the same category.

[0145] Sub-step B3: Filtering out target simulation image data whose probability value is greater than a set threshold from the initial simulation image data, and determining the model training data set based on the target simulation image data and the image data.

[0146] Finally, target simulation image data having a probability value greater than a set threshold can be screened out from the initial simulation image data, and a model training data set can be determined based on the target simulation image data and the image data.

[0147] In a specific implementation, a threshold for screening simulated images can be pre-set to determine which initial simulated image data are of high quality, that is, they are very consistent with the category of the original image data. By comparing the probability value output by the discriminator with this threshold, the target simulated image data with a probability value greater than the threshold can be screened out. Then, the model training data set can be determined based on the screened target simulated image data and the original image data.

[0148] The embodiment of the present application can effectively generate simulated data that is very similar to real data through the trained generative adversarial network, thereby increasing the diversity and scale of the training data set without increasing the cost of actual data collection. This is very valuable in many deep learning applications, especially when real data is difficult to obtain or the labeling cost is high.

[0149] After performing data expansion processing on the image data based on the generative adversarial network to obtain a model training data set, step 104 is executed.

[0150] Step 104: Based on the model training data set, a pre-built convolutional neural network for aircraft surface defect recognition is trained to obtain the aircraft surface defect recognition model.

[0151] After the image data is expanded based on the generative adversarial network to obtain a model training data set, the pre-built convolutional neural network for aircraft surface defect recognition can be trained based on the model training data set to obtain an aircraft surface defect recognition model.

[0152] In this embodiment, the aircraft surface defect recognition model can be a convolutional neural network, CNN (Convolutional Neural Networks): it is a type of feedforward neural network that includes convolution calculations and has a deep structure, and is one of the representative algorithms of deep learning.

[0153] The convolutional neural network in the embodiment of the present application may include:

[0154] The backbone network is used to calculate the data of aircraft surface defects based on the input historical data set and convert it into predictive calibration data;

[0155] The loss function is calculated based on the predicted calibration data and the image data with defects to obtain the loss value;

[0156] The optimizer updates the parameters of the backbone network according to the loss value;

[0157] Among them, the backbone network is the MobileNetV3 network, the starting layer is the Ghost convolutional layer, the loss function is the cross entropy loss function, and the optimizer is Adam.

[0158] In the specific implementation, a convolutional neural network can be constructed first and then pruned. The specific pruning process can be: halving the number of channels of the MobileNetV3 network and deleting the middle layer with a step size of 1.

[0159] The training process of the aircraft surface defect recognition model can be described in detail in combination with the following specific implementation methods.

[0160] In a specific implementation of the present application, the above step 104 may include:

[0161] Sub-step C1: inputting the sample image into the convolutional neural network.

[0162] In this embodiment, each sample image in the model training data set is annotated with aircraft surface defect annotation information, wherein the aircraft surface defect annotation information may include: defect type, such as cracks, scratches, lightning strike points, paint peeling, etc. Defect location, such as the front side of the aircraft, the tail side, etc. Information such as the annotation box of the defect location.

[0163] Before training the convolutional neural network, you can set the number of training rounds, the learning rate of the optimizer, and the number of processing batches of the generator.

[0164] After obtaining the model training data set, the sample images can be input into the convolutional neural network for training.

[0165] After the sample image is input into the convolutional neural network, sub-step C2 is performed.

[0166] Sub-step C2: Obtain aircraft surface defect prediction information corresponding to the sample image output by the convolutional neural network.

[0167] After the sample image is input into the convolutional neural network, the aircraft surface defect prediction information corresponding to the sample image output by the convolutional neural network can be obtained.

[0168] In a specific implementation, after calibrating the model training data, the model training data can be input into the backbone network of the convolutional neural network for prediction to obtain predicted calibration data, that is, the aircraft surface defect prediction information in this embodiment.

[0169] Sub-step C3: Based on the aircraft surface defect annotation information and the aircraft surface defect prediction information, calculate the second loss value of the convolutional neural network.

[0170] Furthermore, the second loss value of the convolutional neural network can be calculated based on the aircraft surface defect annotation information and the aircraft surface defect prediction information.

[0171] Sub-step C4: When the second loss value is within a preset range, the trained convolutional neural network is used as the aircraft surface defect recognition model.

[0172] After calculating the second loss value of the convolutional neural network, it can be determined whether the second loss value is within the preset range. If the second loss value is within the preset range, it means that the convolutional neural network has converged. At this time, the trained convolutional neural network can be used as the aircraft surface defect recognition model.

[0173] In the specific implementation, the calibration data after calibration can be extracted from the model training data set, and the loss value and accuracy can be calculated based on the predicted calibration data and calibration data. It is determined whether the accuracy of the backbone network of the current round is greater than that of the previous round. If so, the parameters of the backbone network of the current round are saved. If not, the parameters of the backbone network of the previous round are saved, and the loss value is input into the optimizer to update the parameters of the backbone network. And the predicted calibration data is recalculated until the current round is equal to the training round.

[0174] In an embodiment of the present application, after the aircraft surface defect recognition model is trained, the aircraft surface defect recognition model can be used in the aircraft surface defect detection scenario. Specifically, an image to be recognized of the target aircraft can be obtained, and the image to be recognized is an image obtained by photographing the outer surface of the target aircraft. Then, the image to be recognized can be input into the aircraft surface defect recognition model, so that the aircraft surface defect recognition model processes the image to be recognized. Finally, the aircraft surface defect recognition result corresponding to the image to be recognized output by the aircraft surface defect recognition model can be obtained.

[0175] After obtaining the target aircraft surface defect recognition result, if the target aircraft surface defect recognition result indicates that there is a defect on the surface of the target aircraft, the defect description information of the outer surface of the target aircraft can be obtained. The image to be recognized and the defect description information are displayed in the visualization interface.

[0176] In practical applications, before realizing aircraft surface defect recognition based on the collected aircraft surface data, a visualization interface can be built based on PyQt5. The visualization interface combines the spatial positioning method of aircraft skin defects to realize the positioning display after image defect recognition, which is convenient for user query.

[0177] The training process of the aircraft label defect recognition model can be as follows: Figure 4 As shown:

[0178] First, data images and labels can be input, where the data images are the model training data set, and the labels are the defect annotation information added to the images in the model training data set.

[0179] Then, the convolutional neural network can be trained with the dataset images to determine whether the training times have been reached. If reached, the training is terminated. If not, the predicted labels output by the network model can be obtained and compared with the true labels to calculate the loss value.

[0180] Furthermore, the accuracy of the model prediction can be calculated based on the number of predicted labels that are consistent with the actual labels, and it can be determined whether the accuracy is greater than the accuracy calculated from the last training result.

[0181] If the currently calculated accuracy is not greater than the accuracy calculated from the last training result, the saved model will not be updated.

[0182] If the currently calculated accuracy is greater than the accuracy calculated from the last training result, the saved model is updated and it is determined again whether the number of training times has reached the training number.

[0183] The embodiment of the present application generates more images as training data sets by training a generative adversarial network, thereby overcoming the problem of insufficient training samples and reducing the human resources and time loss in the process of building a data set. At the same time, the use of a model to identify aircraft surface defects can improve the efficiency and accuracy of aircraft surface defect identification.

[0184] The training process of the aircraft surface defect recognition model provided in this embodiment can be combined with Figure 2 The following description is given.

[0185] like Figure 2 As mentioned above, the intelligent identification process of aircraft surface defect inspection may include:

[0186] 1. Configure the deep learning environment, install Pycharm for program writing, install Python and Pytorch for building deep neural networks, and install Cuda and Cudnn to accelerate neural network operations.

[0187] 2. Use the improved U-type network (UNet) as the generator of GAN, and the improved densely connected network (DenseNet) as the discriminator of GAN. Use the collected small sample data of aircraft surface defects to train it. Use Wasserstein distance with gradient penalty as the loss, Adam optimizer, learning rate set to 0.0001, set to 2, train for 600 rounds, and save the generated valid defect images as the training data set.

[0188] 3. Halve the number of channels of the original MobileNetV3 network, delete the middle layer with a step size of 1, reduce the redundant structure in the network, introduce Ghost convolution at the starting layer of the network, reduce the computational complexity of the original convolution, use the training data set obtained in the previous step, use the cross entropy loss function as the loss, use the Adam optimizer, set the learning rate to 0.001, set the batch size to 256, train for 600 rounds, and save the model with the highest accuracy.

[0189] 4. Develop a visualization interface based on PyQt5 to deploy the model trained in the previous step and display the images and categories of aircraft surface defects.

[0190] The intelligent identification method for aircraft surface defect inspection in the embodiment of the present application is based on the Pytorch deep learning framework, and uses Python language to build a GAN network model and a CNN network model. The limited aircraft surface defect data set is sent to the GAN for training, so that it can generate effective aircraft surface defect images, expand the number of defect samples, and use the expanded aircraft surface defect images as the training data set; the built CNN is trained using the training data set, so that it can accurately identify the surface defect category of the aircraft based on the image. It has the following beneficial effects:

[0191] 1. Generate more images as training data sets by training generative adversarial networks, overcome the problem of insufficient training samples, and reduce human resources and time loss in the process of building data sets.

[0192] 2. Calibrate the image data with aircraft defects in the historical data set to obtain the calibration data of the aircraft defect image data, so as to verify it in the subsequent network calculation result test, so that after multiple rounds of iterative training, the network's computing performance can be as close to the actual performance as possible.

[0193] 3. MobileNetV3 is selected as the backbone network and optimized for the aircraft surface defect detection task by pruning the model from the two dimensions of feature channels and intermediate layers and introducing Ghost convolution, so that it has fewer parameters and calculations while taking less time to infer.

[0194] 4. In order to ensure the matching between the convolutional neural network and the generative adversarial network, the training sets of the two are converted from the same historical data set, which improves the matching degree between the two after training. In addition, the training set of the convolutional neural network is directly expanded based on the historical data set using the trained generative adversarial network, so that the training data of the convolutional neural network is more accurate than that obtained by direct expansion, and the original data and bionic data are more corresponding.

[0195] The training method of the aircraft surface defect recognition model provided in the embodiment of the present application is by acquiring image data containing aircraft surface defects. Based on the image data, a pre-constructed generative adversarial network to be trained is trained to obtain a generative adversarial network. Based on the generative adversarial network, data expansion processing is performed on the image data to obtain a model training data set. Based on the model training data set, a pre-constructed convolutional neural network for aircraft surface defect recognition is trained to obtain an aircraft surface defect recognition model. The embodiment of the present application generates more images as training data sets by training a generative adversarial network, thereby overcoming the problem of insufficient training samples and reducing human resources and time loss in the process of constructing data sets. At the same time, the method of using a model to identify aircraft surface defects can improve the efficiency and accuracy of aircraft surface defect recognition.

[0196] Reference Figure 6 , shows a schematic diagram of the structure of a training device for an aircraft surface defect recognition model provided by an embodiment of the present application, such as Figure 6 As shown, the training device 600 for the aircraft surface defect recognition model may include the following modules:

[0197] An image data acquisition module 610 is used to acquire image data containing surface defects of the aircraft;

[0198] An adversarial network acquisition module 620 is used to train a pre-constructed generative adversarial network to be trained based on the image data to obtain a generative adversarial network;

[0199] A training data set acquisition module 630 is used to perform data expansion processing on the image data based on the generative adversarial network to obtain a model training data set;

[0200] The defect recognition model acquisition module 640 is used to train a pre-built convolutional neural network for aircraft surface defect recognition based on the model training data set to obtain the aircraft surface defect recognition model.

[0201] Optionally, the generative adversarial network to be trained includes: a generator, a discriminator and an optimizer.

[0202] The adversarial network acquisition module includes:

[0203] a simulation image data generating unit, configured to call the generator to process the image data and generate simulation image data of the same category as the image data;

[0204] A judgment result acquisition unit, used for calling the discriminator to judge whether the categories of the simulation image data and the image data are consistent based on the category judgment rule, and obtaining a judgment result;

[0205] A first loss calculation unit, configured to calculate a first loss value of the generative adversarial network to be trained based on the judgment result, the category of the simulated image data, and the category of the image data;

[0206] A first adversarial network acquisition unit, configured to use the trained generative adversarial network to be trained as the final generative adversarial network when the first loss value is within a preset range;

[0207] The second adversarial network acquisition unit is used to call the optimizer to adjust the model parameters of the generative adversarial network to be trained based on the first loss value when the first loss value is outside a preset range, and continue to train the generative adversarial network to be trained until the generative adversarial network to be trained converges to obtain the generative adversarial network.

[0208] Optionally, the training data set acquisition module includes:

[0209] An initial simulated image generating unit, configured to call the generator of the generative adversarial network to process the image data and generate initial simulated image data consistent with the category of the image data;

[0210] A probability value output unit, configured to call the discriminator of the generative adversarial network to determine whether the categories of the initial simulated image data and the image data are consistent, and output a probability value that the categories of the initial simulated image data and the image data are consistent;

[0211] The training data set determination unit is used to screen out the target simulation image data whose probability value is greater than a set threshold from the initial simulation image data, and determine the model training data set based on the target simulation image data and the image data.

[0212] Optionally, each sample image in the model training data set is annotated with aircraft surface defect annotation information.

[0213] The defect recognition model acquisition module includes:

[0214] A sample image input unit, used to input the sample image into the convolutional neural network;

[0215] A defect prediction information output unit, used to obtain aircraft surface defect prediction information corresponding to the sample image output by the convolutional neural network;

[0216] A second loss calculation unit, configured to calculate a second loss value of the convolutional neural network based on the aircraft surface defect annotation information and the aircraft surface defect prediction information;

[0217] A defect recognition model acquisition unit is used to use the trained convolutional neural network as the aircraft surface defect recognition model when the second loss value is within a preset range.

[0218] Optionally, the device further comprises:

[0219] Acquire an image of a target aircraft to be identified, wherein the image to be identified is an image obtained by photographing the outer surface of the target aircraft;

[0220] Inputting the image to be identified into the aircraft surface defect recognition model so that the aircraft surface defect recognition model processes the image to be identified;

[0221] Obtain an aircraft surface defect recognition result corresponding to the image to be recognized output by the aircraft surface defect recognition model.

[0222] Optionally, the device further comprises:

[0223] When the aircraft surface defect identification result indicates that there are defects on the surface of the target aircraft, obtaining defect description information of the outer surface of the target aircraft;

[0224] The image to be identified and the defect description information are displayed in a visual interface.

[0225] Optionally, the generator is a U-type network, the discriminator is a densely connected network, and the optimizer is an Adam network.

[0226] The training device for the aircraft surface defect recognition model provided in the embodiment of the present application obtains image data containing aircraft surface defects. Based on the image data, a pre-constructed generative adversarial network to be trained is trained to obtain a generative adversarial network. Based on the generative adversarial network, data expansion processing is performed on the image data to obtain a model training data set. Based on the model training data set, a pre-constructed convolutional neural network for aircraft surface defect recognition is trained to obtain an aircraft surface defect recognition model. The embodiment of the present application generates more images as training data sets by training a generative adversarial network, thereby overcoming the problem of insufficient training samples and reducing human resources and time loss in the process of constructing data sets. At the same time, the method of using a model to identify aircraft surface defects can improve the efficiency and accuracy of aircraft surface defect recognition.

[0227] An embodiment of the present application also provides an electronic device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program, when executed by the processor, implements the above-mentioned training method for the aircraft surface defect recognition model.

[0228] Figure 7 FIG. 7 is a schematic diagram showing the structure of an electronic device 700 according to an embodiment of the present invention. Figure 7As shown, the electronic device 700 includes a central processing unit (CPU) 701, which can perform various appropriate actions and processes according to computer program instructions stored in a read-only memory (ROM) 702 or computer program instructions loaded from a storage unit 708 into a random access memory (RAM) 703. In the RAM 703, various programs and data required for the operation of the electronic device 700 can also be stored. The CPU 701, the ROM 702, and the RAM 703 are connected to each other via a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.

[0229] Multiple components in the electronic device 700 are connected to the I / O interface 705, including: an input unit 706, such as a keyboard, a mouse, a microphone, etc.; an output unit 707, such as various types of displays, speakers, etc.; a storage unit 708, such as a disk, an optical disk, etc.; and a communication unit 709, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 709 allows the electronic device 700 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0230] The various processes and processing described above may be performed by the processing unit 701. For example, the method of any of the above embodiments may be implemented as a computer software program, which is tangibly contained in a computer-readable medium, such as the storage unit 708. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 700 via the ROM 702 and / or the communication unit 709. When the computer program is loaded into the RAM 703 and executed by the CPU 701, one or more actions in the method described above may be performed.

[0231] In addition, an embodiment of the present application also provides a computer-readable storage medium on which a computer program is stored, and when the program is executed by a processor, the training method of the above-mentioned aircraft surface defect recognition model is implemented.

[0232] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.

[0233] Those skilled in the art will appreciate that the embodiments of the present application can be provided as methods, devices, or computer program products. Therefore, the present application can adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0234] The embodiments of the present application are described with reference to the flowcharts and / or block diagrams of the methods, terminals (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing terminal to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0235] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing terminal to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0236] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal so that a series of operating steps are executed on the computer or other programmable terminal to produce a computer-implemented process, thereby providing instructions for implementing the process in the computer or other programmable terminal. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0237] Although the preferred embodiments of the present application have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present application.

[0238] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or terminal including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or terminal. In the absence of further restrictions, the elements defined by the statement "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or terminal including the elements.

[0239] The above is a detailed introduction to a training method for an aircraft surface defect recognition model, a training device for an aircraft surface defect recognition model, an electronic device and a computer-readable storage medium provided in the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for general technical personnel in this field, according to the idea of ​​the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. A training method for an aircraft surface defect recognition model, characterized in that: The method comprises: Acquire image data containing surface defects of the aircraft; Training a pre-constructed generative adversarial network to be trained based on the image data to obtain a generative adversarial network; Performing data expansion processing on the image data based on the generative adversarial network to obtain a model training data set; A pre-built convolutional neural network for aircraft surface defect recognition is trained based on the model training data set to obtain the aircraft surface defect recognition model.

2. The method according to claim 1, characterized in that: The generative adversarial network to be trained includes: a generator, a discriminator and an optimizer. The step of training a pre-constructed generative adversarial network to be trained based on the image data to obtain a generative adversarial network includes: Calling the generator to process the image data to generate simulated image data of the same category as the image data; Calling the discriminator to determine whether the categories of the simulated image data and the image data are consistent based on the category determination rule, and obtaining a determination result; Based on the judgment result, the category of the simulation image data and the category of the image data, a first loss value of the generative adversarial network to be trained is calculated; When the first loss value is within a preset range, using the trained generative adversarial network to be trained as the final generative adversarial network; The optimizer is called to adjust the model parameters of the generative adversarial network to be trained based on the first loss value when the first loss value is outside a preset range, and the generative adversarial network to be trained is continued to be trained until the generative adversarial network to be trained converges to obtain the generative adversarial network.

3. The method according to claim 1, characterized in that: The step of performing data expansion processing on the image data based on the generative adversarial network to obtain a model training data set includes: Calling the generator of the generative adversarial network to process the image data to generate initial simulated image data consistent with the category of the image data; Calling the discriminator of the generative adversarial network to determine whether the categories of the initial simulated image data and the image data are consistent, and outputting a probability value that the categories of the initial simulated image data and the image data are consistent; Target simulation image data whose probability value is greater than a set threshold is screened out from the initial simulation image data, and the model training data set is determined based on the target simulation image data and the image data.

4. The method according to claim 1, characterized in that: Each sample image in the model training data set is annotated with aircraft surface defect annotation information. The method of training a pre-built convolutional neural network for aircraft surface defect recognition based on the model training data set to obtain the aircraft surface defect recognition model includes: Inputting the sample image into the convolutional neural network; Obtaining aircraft surface defect prediction information corresponding to the sample image output by the convolutional neural network; Based on the aircraft surface defect annotation information and the aircraft surface defect prediction information, a second loss value of the convolutional neural network is calculated; When the second loss value is within a preset range, the trained convolutional neural network is used as the aircraft surface defect recognition model.

5. The method according to claim 1, characterized in that After training the pre-built convolutional neural network for aircraft surface defect recognition based on the model training data set to obtain the aircraft surface defect recognition model, the method further includes: Acquire an image of a target aircraft to be identified, wherein the image to be identified is an image obtained by photographing the outer surface of the target aircraft; Inputting the image to be identified into the aircraft surface defect recognition model so that the aircraft surface defect recognition model processes the image to be identified; Obtain an aircraft surface defect recognition result corresponding to the image to be recognized output by the aircraft surface defect recognition model.

6. The method according to claim 5, characterized in that After obtaining the aircraft surface defect recognition result corresponding to the image to be recognized output by the aircraft surface defect recognition model, the method further includes: When the aircraft surface defect identification result indicates that there are defects on the surface of the target aircraft, obtaining defect description information of the outer surface of the target aircraft; The image to be identified and the defect description information are displayed in a visual interface.

7. The method according to claim 2, characterized in that The generator is a U-type network, the discriminator is a densely connected network, and the optimizer is an Adam network.

8. A training device for an aircraft surface defect recognition model, characterized in that: The device comprises: An image data acquisition module, used to acquire image data containing surface defects of the aircraft; An adversarial network acquisition module, used to train a pre-constructed generative adversarial network to be trained based on the image data to obtain a generative adversarial network; A training data set acquisition module, used to perform data expansion processing on the image data based on the generative adversarial network to obtain a model training data set; The defect recognition model acquisition module is used to train a pre-built convolutional neural network for aircraft surface defect recognition based on the model training data set to obtain the aircraft surface defect recognition model.

9. An electronic device, characterized in that: include: A processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the processor implements the training method for an aircraft surface defect recognition model according to any one of claims 1 to 7 when executing the program.

10. A computer-readable storage medium, characterized in that: When the instructions in the storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute the training method for an aircraft surface defect recognition model according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Unmanned aerial vehicle inspection defect image recognition method based on pattern generative adversarial network

    CN115861732A