A method for aircraft engine blade defect detection based on network architecture search
By unifying the convolutional neural network and the visual Transformer network, and combining the evolutionary algorithm to search for the optimal architecture, the problem of inter-class differences and size differences in surface defect detection of aeroengine blades is solved, automated design and efficient detection are achieved, and detection intelligence is improved. level and model applicability.
Patent Information
- Application Number
- CN202411110848.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-14
- Publication Date
- 2024-10-29
- Estimated Expiration
- 2044-08-14
AI Technical Summary
In the existing technology, in the surface defect detection of aero-engine blades, the differences between classes are small and the size differences are large, which increases the difficulty of detection. In addition, the manual design of the neural network architecture is time-consuming and does not have good migration capabilities, making it unable to adapt to a variety of complex scenarios.
Adopt a method based on network architecture search to unify the architecture and parameters of the convolutional neural network and visual Transformer network, build a super network, and search for the optimal network architecture through evolutionary algorithms, reducing manual intervention and parameter adjustment, and is suitable for a variety of practical scenarios defect detection.
It realizes the automatic design of the optimal neural network architecture, improves the intelligence level of aero-engine blade defect detection, reduces the cost of trial and error and parameter adjustment, and enhances the transferability and applicability of the model.
Smart Images

Figure CN118628499B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of aircraft engine blade defect detection, and in particular to an aircraft engine blade defect detection method based on network architecture search. Background Art
[0002] At present, visual inspection of surface defects of aircraft engine blades mainly faces two problems in actual scenarios: small inter-class differences and large size differences. To solve these two problems, it is necessary to fully combine the advantages of the two neural network structures, CNN and visual Transformer, to achieve better aircraft engine blade defect feature extraction in complex actual scenarios.
[0003] The most commonly used way to combine CNN and visual transformer is for experts to adapt the parameters and architecture of CNN and visual transformer based on the experience of previous deep neural network design, and according to the task type and application scenario. However, manually designing the neural network architecture requires a lot of professional knowledge, and requires repeated parameter adjustment and trial and error. Designing a suitable convolution and transformer hybrid neural network takes a lot of time and computing resources. When the application scenario changes, the design needs to be repeated, and the transferability and scalability are poor. Therefore, it is necessary to develop a search method that can automatically design a suitable neural network architecture according to the application scenario, so as to be applicable to accurate aerospace engine blade surface defect detection in a variety of actual scenarios without manual intervention and parameter adjustment. Summary of the invention
[0004] Based on this, it is necessary to provide an aero-engine blade defect detection method based on network architecture search, which includes:
[0005] S1: Unify the architecture and parameters of the convolutional neural network and the visual Transformer network and integrate them into a super network architecture;
[0006] S2: constructing an architecture search objective function of a super network, wherein the architecture search objective function includes a mutual information function;
[0007] S3: Obtain an ImageNet dataset and a defect detection dataset of an aircraft engine blade, train a super network based on the ImageNet dataset and the defect detection dataset, and update the mutual information of the super network;
[0008] S4: using an evolutionary algorithm, and searching for an optimal network architecture of a super network based on the architecture search objective function and the mutual information;
[0009] S5: calculating the recognition accuracy of the optimal network architecture, screening the optimal network architecture according to the recognition accuracy, and using the screened optimal network architecture as a detection framework of the feature extraction network;
[0010] S6: Inputting the image of the aircraft engine blade to be inspected into the inspection framework to obtain defect detection results.
[0011] Beneficial effects: This method can automatically design the optimal neural network architecture that suits the current scenario according to the changes in the scenario, greatly reducing the cost of trial and error and parameter adjustment of manually designed neural networks, as well as the problem that a single neural network model cannot be applied to a variety of complex working conditions. It helps to improve the level of intelligence of aircraft engine blade defect detection in actual industrial manufacturing scenarios. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0013] Figure 1 This is a flow chart of an aircraft engine blade defect detection method based on network architecture search according to an embodiment of the present application. DETAILED DESCRIPTION
[0014] In order to make the above-mentioned purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are described in detail below in conjunction with the accompanying drawings. In the following description, many specific details are set forth to facilitate a full understanding of the present application. However, the present application can be implemented in many other ways different from those described herein, and those skilled in the art can make similar improvements without violating the connotation of the present application, so the present application is not limited by the specific embodiments disclosed below.
[0015] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In the description of this application, the meaning of "plurality" is at least two, such as two, three, etc., unless otherwise clearly and specifically defined.
[0016] like Figure 1 As shown, this embodiment provides an aircraft engine blade defect detection method based on network architecture search, the method comprising:
[0017] S1: Unify the architecture and parameters of the convolutional neural network and the visual Transformer network and integrate them into a super network architecture.
[0018] Convolutional neural networks can aggregate pixel contexts from the neighborhood and provide local detailed features for classification and detection of difficult-to-distinguish defects. They can effectively solve the problem of small differences between defect classes. However, due to the limitation of narrow receptive field, convolutional neural networks find it difficult to infer the global contours of large-sized defects, which makes it difficult for the detection head to detect large-sized defects and causes missed detections.
[0019] The visual Transformer network can learn global feature dependencies through the self-attention mechanism, use global information to infer overall defects, and accurately regress the boundaries of defects of various sizes. However, due to its coefficient query and matching mechanism, the visual Transformer network has difficulty distinguishing subtle differences between similar defect types (such as nicks and scratches, pressure and collision, etc.), and often mistakenly classifies similar defects into the same category, resulting in a large number of false detections.
[0020] Therefore, it is necessary to fully combine the advantages of both convolutional neural networks and visual Transformer networks to achieve better aircraft engine blade defect feature extraction in complex actual scenarios.
[0021] However, due to the essential differences between the architectures of convolutional neural networks and visual Transformer networks, it is necessary to unify the architectures and parameters of convolutional neural networks and visual Transformer networks; specifically, the following processes are involved:
[0022] S1.1: deconstructing the visual Transformer network, extracting parameters in the visual Transformer network, and reconstructing the architecture of the visual Transformer network;
[0023] Furthermore, the process of reconstructing the architecture of the visual Transformer network includes:
[0024] Step 1: For a given input feature map, a first output feature map is obtained through the visual Transformer network; the calculation formula for each first pixel in the first output feature map is:
[0025] ;
[0026] ;
[0027] ;
[0028] in, Indicates the first output feature map i Line j The first pixel of the column; Concat(·) represents the concatenation function; Represents the mapping function of the first attention head; Indicates l The mapping function of the attention head; Indicates N The mapping function of the attention head; Indicates the first i Row, No. j Column pixels; Indicates l Layer linear mapping layer weight parameters; represents the multi-head attention function; Indicates l The query vector of the attention head; Indicates l The index vector of the attention heads; Indicates l The value vector of the attention heads; Q represents the query matrix; K represents the index matrix; V represents the value matrix; d The dimension representing multi-head attention;
[0029] Step 2: Extract the linear mapping layer in the multi-head attention from the calculation of the multi-head attention to obtain the architecture of the reconstructed visual Transformer network. The calculation formula is:
[0030] , , ;
[0031] ;
[0032] ;
[0033] in, Indicates l The query matrix of the attention head i Row, No. j Elements of a column; Indicates l The index matrix of the attention head i Row, No. j Elements of a column; Indicates l The value matrix of the attention head i Row, No. j Elements of a column; Indicates the first pixel of the spliced multi-head attention; Represents a concatenation operation.
[0034] Deconstruct the convolutional neural network and reconstruct the architecture of the convolutional neural network by analogy with the architecture of the visual Transformer network;
[0035] Furthermore, the process of reconstructing the architecture of the convolutional neural network includes:
[0036] Step 1: For a given input feature map, a second output feature map is obtained through the convolutional neural network; the calculation formula for each second pixel in the second output feature map is:
[0037] ;
[0038] in, Indicates the first i Line j The second pixel of the column; s Indicates the convolution kernel size; m represents the convolution kernel m The relative position of the parameters; n represents the convolution kernel n The relative position of the parameters; Indicates the first i+m Row, No. j+n Column pixels; represents the convolution kernel m Row, No. n Column parameters;
[0039] Step 2: By analogy with the architecture of the visual Transformer network, the linear mapping layer is separated from the convolution kernel to obtain the architecture of the reconstructed convolutional neural network. The calculation formula is:
[0040] , , ;
[0041] ;
[0042] ;
[0043] in, represents the offset function; Indicates l Layer linear mapping layer weight parameters; It means that the concatenated intermediate feature map has been l The output feature map of the layer linear mapping layer; Representation and parameters The first i Row, No. j Elements of a column; express The intermediate feature map obtained after the first linear mapping layer; express The intermediate feature map obtained after the second linear mapping layer; express The intermediate feature map obtained after the third linear mapping layer; Represents the first layer of linear mapping layer with parameters The corresponding position p Row, No. q Column parameters; Represents the linear mapping layer in the second layer with parameters The corresponding position p Row, No. q Column parameters; Indicates the third layer of linear mapping layer and parameters The corresponding position p Row, No. q Column parameters.
[0044] S1.2: Integrate the reconstructed architecture of the convolutional neural network and the architecture of the visual Transformer network to obtain the architecture of the super network.
[0045] The expression of the architecture of the super network is:
[0046] , , ;
[0047] ;
[0048] .
[0049] Depending on the selected operation, the output features corresponding to the different operations will be obtained. If Transformer is selected, the 3×N intermediate features can be regarded as N groups of query vectors, index vectors and value vectors. According to the calculation paradigm of the Transformer architecture, each group of query, index and value vectors is independently self-attention calculated, and then the attention matrices of each group are spliced together to project the final Transformer feature map output. If the convolution operation is selected, the 3 × N feature matrix will first be mapped into a fully connected layer. The intermediate feature matrix of The feature matrix of can be regarded as the convolution kernel The features obtained by N sets of convolution operations are then aggregated through the sliding window to finally obtain the output features of the convolution operation. Thanks to the unified architecture, all learnable parameters can share weights in the two network architectures.
[0050] S2: constructing an architecture search objective function of a super network, wherein the architecture search objective function includes a mutual information function.
[0051] The expression of the architecture search objective function is:
[0052] ;
[0053] ;
[0054] ;
[0055] ;
[0056] in, represents the architecture search target; X represents the Xth input image; Y represents the label corresponding to the input image X; Z represents the feature extracted by the super network; represents the neural network architecture to be searched; represents the balance coefficient; Represents the mutual information function between feature Z and label Y; represents KL divergence; Represents the joint probability of feature Z and label Y; represents the marginal probability of feature Z; represents the marginal probability of label Y; represents tensor product; Represents the parameters of the super network; Represents the mutual information function between the input image X and the label Y; Denotes the original distribution P(Z|X) with respect to the parameter Gaussian variational distribution of ; represents the expectation; N represents the number of images in the defect detection dataset; Indicates the defect detection dataset i Feature map of an image; Indicates the defect detection dataset i The label of the image; Indicates the defect detection dataset i The original image of the image; Represents the neural network mapping function from the original distribution to the rational distribution; Represents the neural network mapping function The natural exponential distribution of , Represents the probability distribution of the input image X.
[0057] The architecture search objective is affected only by the input images and labels, not the defect detection network, and since the super network is evaluated solely via mutual information, which measures the amount of useful information retained, bias from other components in the defect detection network is eliminated.
[0058] S3: Obtain an ImageNet dataset and a defect detection dataset of aircraft engine blades, train a super network based on the ImageNet dataset and the defect detection dataset, and update the mutual information of the super network.
[0059] Specifically, the step includes:
[0060] S3.1: randomly initialize the super network, and iteratively train the initialized super network on the ImageNet dataset, wherein each iteration generates a sub-network based on the architecture search objective function, and retains the information of the super network to the sub-network through the mutual information until the super network is trained to converge;
[0061] S3.2: Freeze the parameters of the first two layers of the trained super network, and randomly initialize the mutual information function; train the super network with frozen parameters on the defect detection data set until convergence, and synchronously update the mutual information.
[0062] In this embodiment, the defect detection dataset of aircraft engine blades is the aircraft engine blade surface defect detection dataset ABSDD, which contains 2400 images, of which 1000 are defective images and 1400 are non-defective images; the dataset covers four typical defect types: holes, scratches, pits, and burns. In this embodiment, 60% of the images are randomly selected for training, 20% for verification, and 20% for recognition accuracy testing.
[0063] Furthermore, the update formula of mutual information includes:
[0064] The update formula of the mutual information function between feature Z and label Y is:
[0065] ;
[0066] Mutual Information Function Medium Parameters The update formula is:
[0067] ;
[0068] in, represents the original distribution P( | ) About parameters Gaussian variational distribution, Indicates the feature Z i elements; Indicates the first i elements.
[0069] S4: Using an evolutionary algorithm, and based on the architecture search objective function and the mutual information, searching for the optimal network architecture of the super network.
[0070] Specifically, the step includes:
[0071] S4.1: Initialize the population , Evolution times , calculate the cost , crossover probability , mutation probability ;
[0072] S4.2: Random sampling in the super network after secondary training The sub-network is used as the initial population;
[0073] S4.3: Sampled sub-networks according to the crossover probability Performing a crossover operation to generate a new sub-network; the crossover operation includes crossover combination of layers, layer connection relationships or nodes in the sub-network;
[0074] S4.4: The newly generated sub-network is mutated according to the probability Performing a mutation operation to generate a mutant sub-network; the mutation operation includes adding, deleting or modifying the network structure;
[0075] S4.5: evaluating the mutual information of each variant sub-network according to the architecture search objective function;
[0076] S4.6: Merge each variant sub-network with the parent network and select the mutual information front of the variant sub-network The merged networks are combined into a new super network; the new super network is trained through S3;
[0077] S4.7: Repeat S4.2-S4.6 until the maximum number of iterations is reached or convergence is achieved;
[0078] S4.8: Select the sub-network architecture with the largest mutual information as the optimal network architecture.
[0079] S5: Calculate the recognition accuracy of the optimal network architecture, screen the optimal network architecture according to the recognition accuracy, and use the screened optimal network architecture as a detection framework of the feature extraction network.
[0080] Specifically, step S5 includes:
[0081] S5.1: Input the defect detection data set into the super network formed by the optimal network architecture, and calculate the recognition accuracy rate corresponding to the optimal network architecture; the calculation formula of the recognition accuracy rate is:
[0082] ;
[0083] Among them, Precision represents the recognition accuracy, TP represents the samples predicted correctly by the network, and FP represents the samples predicted incorrectly by the network;
[0084] S5.2: Compare the recognition accuracy with a set threshold. In this embodiment, the aircraft engine defect detection accuracy is generally required to be greater than 95% to meet the needs of actual production and processing;
[0085] When the recognition accuracy is less than the set threshold, the search space of the optimal network architecture is doubled (for example, the number of channels is increased from 128 to 256, and the number of search layers is increased from 4 to 8), and S3 and S4 are returned to search and optimize again;
[0086] When the recognition accuracy is greater than or equal to the set threshold, the corresponding optimal network architecture is used as the detection framework of the feature extraction network for aircraft engine blade defect detection.
[0087] In this embodiment, the optimal network architecture searched is represented by a dictionary, which includes each parameter for building the network, and then passed into the network building function to form the final network architecture. In the defect detection data set, the specific network architecture parameters searched are as follows:
[0088] best_arch = dict(
[0089] embed_dims = [64, 128, 320, 512],
[0090] depths = [4, 5, 7, 3],
[0091] num_heads = [[1, 1, 1, 1], [2, 2, 2, 2, 2], [5, 5, 5, 5, 5, 5,5], [8, 8, 8]],
[0092] mlp_ratio = [[7.5, 8.0, 8.0, 7.5], [8.5, 7.5, 8.0, 7.5, 8.0],[4.0, 4.5, 4.5, 3.5, 3.5, 4.0, 3.5], [3.5, 3.5, 4.0]],
[0093] kernel = [[1, 1, 3, 1], [1, 3, 1, 1, 1], [1, 1, 3, 5, 3, 1, 1],[1, 1, 1]]);
[0094] The specific numbers in embed_dims mean that 64 is the number of channels / dimensions of the feature embedding selection module in the first level, 128 is the number of channels / dimensions of the feature embedding selection module in the second level, 320, 512, and so on are the number of channels / dimensions of the feature embedding selection module in the third and fourth levels.
[0095] In depths, 4 means that the first level contains 4 feature extraction blocks, and so on. 5, 7, and 3 mean that the second, third, and fourth levels contain 5, 7, and 3 feature extraction blocks respectively.
[0096] In num_heads, [1, 1, 1, 1] represents the number of heads in the 4 feature extraction blocks in the first level, [2, 2, 2, 2, 2] represents the number of heads in the 5 extraction blocks in the second level, and [5, 5, 5, 5, 5,5], [8, 8, 8] and so on.
[0097] In mlp_ratio, [7.5, 8.0, 8.0, 7.5] represents the channel number expansion ratio of the middle layer of the convolutional feedforward neural network in the four feature extraction blocks in the first level (the feedforward neural network consists of three layers of 1×1 convolutional layers, including input layer, middle layer and output layer, where the input layer and output layer are equal to the dimension of the current level in embed_dims, and the number of middle layer channels = the number of input channels × channel number expansion ratio), [8.5, 7.5, 8.0, 7.5, 8.0], [4.0, 4.5, 4.5,3.5, 3.5, 4.0, 3.5], [3.5, 3.5, 4.0] and so on.
[0098] In the kernel, [1, 1, 3, 1] represents the specific operation selected in the weight-shared convolution and visual Transformer hybrid module among the four feature extraction blocks in the first level, where 1 represents the selection of visual Transformer and 3 represents the selection of 3×3 convolution; [1, 3, 1, 1, 1], [1, 1, 3, 5, 3, 1, 1], [1, 1, 1] and so on, where the character 5 represents the selection of 5×5 convolution.
[0099] S6: Input the image of the aircraft engine blade to be inspected into the detection framework with the optimal network architecture as the feature extraction network to obtain the defect detection result.
[0100] In this embodiment, the defect detection framework used is YOLOv8, where the feature extraction network is the network architecture searched in S5.2, and the process of obtaining the defect detection result includes:
[0101] S6.1: scaling the image of the aircraft engine blade to be inspected to 1024×1024 pixels, normalizing it, and scaling its pixel value to the interval [0,1];
[0102] S6.2: Use the searched optimal network architecture to extract features from the processed image and obtain a feature map;
[0103] S6.3: Generate a series of candidate regions on the feature map using anchor boxes of different scales and ratios;
[0104] S6.4: For each candidate region, use a fully connected layer to make predictions, including object category probability, bounding box coordinates, and confidence scores;
[0105] S6.5: Perform non-maximum suppression post-processing on the prediction results, and retain the bounding box with the highest confidence score based on the confidence score, while suppressing other bounding boxes that overlap with it to a large extent (remove overlapping bounding boxes);
[0106] S6.6: Output whether there is a defect, the defect category and the bounding box coordinates as the detection result.
[0107] The method provided in this embodiment has the following beneficial effects:
[0108] 1. It can automatically design the optimal neural network architecture that suits the current scenario according to the changes in the scenario, greatly reducing the cost of trial and error and parameter adjustment of manually designed neural networks, as well as the problem that a single neural network model cannot be applied to a variety of complex working conditions. It helps to improve the level of intelligence of aircraft engine blade defect detection in actual industrial manufacturing scenarios.
[0109] 2. The proposed convolution and visual Transformer hybrid architecture can unify the basic operations of multiple architectures and share parameter weights, greatly improving the training efficiency of the super network.
[0110] 3. It can be plug-and-play in any aircraft engine blade defect detection model and has good portability and scalability.
[0111] The technical features of the above-described embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above-described embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0112] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be construed as limiting the scope of the patent application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent application shall be subject to the attached claims.
Claims
1. A method for aircraft engine blade defect detection based on network architecture search, It is characterized in that include: S1: Unify the architecture and parameters of the convolutional neural network and the visual Transformer network and integrate them into a super network architecture; The architecture of the super network is expressed as: , , ; ; ; in, Indicates l The query matrix of the attention head i Row, No. j Elements of a column; Indicates l The query vector of the attention head; Representation and parameters The first i Row, No. j Elements of a column; Indicates l The index matrix of the attention head i Row, No. j Elements of a column; Indicates l The index vector of the attention heads; Indicates l The value matrix of the attention head i Row, No. j Elements of a column; Indicates l The value vector of the attention heads; Indicates the first output feature map i Line j The first pixel of the column; Indicates the first pixel of the spliced multi-head attention; Represents a splicing operation; Indicates l Layer linear mapping layer weight parameters; represents the multi-head attention function; It means that the concatenated intermediate feature map has been l The output feature map of the layer linear mapping layer; Indicates the first i Line j The second pixel of the column; s Indicates the convolution kernel size; m represents the convolution kernel m The relative position of the parameters; n represents the convolution kernel n The relative position of the parameters; represents the offset function; S2: constructing an architecture search objective function of a super network, wherein the architecture search objective function includes a mutual information function; The expression of the architecture search objective function is: ; ; ; ; in, represents the architecture search target; X represents the Xth input image; Y represents the label corresponding to the input image X; Z represents the feature extracted by the super network; represents the neural network architecture to be searched; represents the balance coefficient; Represents the mutual information function between feature Z and label Y; represents KL divergence; Represents the joint probability of feature Z and label Y; represents the marginal probability of feature Z; represents the marginal probability of label Y; represents tensor product; Represents the parameters of the super network; Represents the mutual information function between the input image X and the label Y; Denotes the original distribution P(Z|X) with respect to the parameter Gaussian variational distribution of ; represents the expectation; N represents the number of images in the defect detection dataset; Indicates the defect detection dataset i Feature map of an image; Indicates the defect detection dataset i The label of the image; Indicates the defect detection dataset i The original image of the image; Represents the neural network mapping function from the original distribution to the rational distribution; Represents the neural network mapping function The natural exponential distribution of , Represents the probability distribution of the input image X; S3: Obtain an ImageNet dataset and a defect detection dataset of an aircraft engine blade, train a super network based on the ImageNet dataset and the defect detection dataset, and update the mutual information of the super network; S4: using an evolutionary algorithm, and searching for an optimal network architecture of a super network based on the architecture search objective function and the mutual information; S5: calculating the recognition accuracy of the optimal network architecture, screening the optimal network architecture according to the recognition accuracy, and using the screened optimal network architecture as a detection framework of the feature extraction network; S6: Inputting the image of the aircraft engine blade to be inspected into the inspection framework to obtain defect detection results.
2. The method for detecting defects in aircraft engine blades based on network architecture search according to claim 1, It is characterized in that S1 includes: S1.1: deconstructing the visual Transformer network, extracting parameters in the visual Transformer network, and reconstructing the architecture of the visual Transformer network; Deconstruct the convolutional neural network and reconstruct the architecture of the convolutional neural network by analogy with the architecture of the visual Transformer network; S1.2: Integrate the reconstructed architecture of the convolutional neural network and the architecture of the visual Transformer network to obtain the architecture of the super network.
3. The method for detecting defects in aircraft engine blades based on network architecture search according to claim 2, It is characterized in that The step of deconstructing the visual Transformer network, extracting parameters in the visual Transformer network, and reconstructing the architecture of the visual Transformer network includes: Step 1: For a given input feature map, a first output feature map is obtained through the visual Transformer network; the calculation formula for each first pixel in the first output feature map is: ; ; ; in, Indicates the first output feature map i Line j The first pixel of the column; Concat(·) represents the concatenation function; Represents the mapping function of the first attention head; Indicates l The mapping function of the attention head; Indicates N The mapping function of the attention head; Indicates the first i Row, No. j Column pixels; Indicates l Layer linear mapping layer weight parameters; represents the multi-head attention function; Indicates l The query vector of the attention head; Indicates l The index vector of the attention heads; Indicates l The value vector of the attention heads; Q represents the query matrix; K represents the index matrix; V represents the value matrix; d The dimension representing multi-head attention; Step 2: Extract the linear mapping layer in the multi-head attention from the calculation of the multi-head attention to obtain the architecture of the reconstructed visual Transformer network. The calculation formula is: , , ; ; ; in, Indicates l The query matrix of the attention head i Row, No. j Elements of a column; Indicates l The index matrix of the attention head i Row, No. j Elements of a column; Indicates l The value matrix of the attention head i Row, No. j Elements of a column; Indicates the first pixel of the spliced multi-head attention; Represents a concatenation operation.
4. The method for detecting defects in aircraft engine blades based on network architecture search according to claim 3, It is characterized in that Deconstructing the convolutional neural network and reconstructing the architecture of the convolutional neural network by analogy with the architecture of the visual Transformer network includes: Step 1: For a given input feature map, a second output feature map is obtained through the convolutional neural network; the calculation formula for each second pixel in the second output feature map is: ; in, Indicates the first i Line j The second pixel of the column; s Indicates the convolution kernel size; m represents the convolution kernel m The relative position of the parameters; n represents the convolution kernel n The relative position of the parameters; Indicates the first i+m Row, No. j+n Column pixels; represents the convolution kernel m Row, No. n Column parameters; Step 2: By analogy with the architecture of the visual Transformer network, the linear mapping layer is separated from the convolution kernel to obtain the architecture of the reconstructed convolutional neural network. The calculation formula is: , , ; ; ; in, represents the offset function; Indicates l Layer linear mapping layer weight parameters; It means that the concatenated intermediate feature map has been l The output feature map of the layer linear mapping layer; Representation and parameters The first i Row, No. j Elements of a column; express The intermediate feature map obtained after the first linear mapping layer; express The intermediate feature map obtained after the second linear mapping layer; express The intermediate feature map obtained after the third linear mapping layer; Represents the first layer of linear mapping layer with parameters The corresponding position p Row, No. q Column parameters; Represents the linear mapping layer in the second layer with parameters The corresponding position p Row, No. q Column parameters; Indicates the third layer of linear mapping layer and parameters The corresponding position p Row, No. q Column parameters.
5. The method for detecting defects in aircraft engine blades based on network architecture search according to claim 1, It is characterized in that In S3, the training of the super network based on the ImageNet dataset and the defect detection dataset and updating the mutual information of the super network includes: S3.1: randomly initialize the super network, and iteratively train the initialized super network on the ImageNet dataset, wherein each iteration generates a sub-network based on the architecture search objective function, and retains the information of the super network to the sub-network through the mutual information until the super network is trained to converge; S3.2: Freeze the parameters of the first two layers of the trained super network, and randomly initialize the mutual information function; train the super network with frozen parameters on the defect detection data set until convergence, and synchronously update the mutual information.
6. The method for detecting defects in aircraft engine blades based on network architecture search according to claim 5, It is characterized in that The update formula of mutual information includes: The update formula of the mutual information function between feature Z and label Y is: ; Mutual Information Function Medium Parameters The update formula is: ; in, represents the original distribution P( | ) About parameters Gaussian variational distribution, Indicates the feature Z i elements; Indicates the first i elements.
7. The method for detecting defects in aircraft engine blades based on network architecture search according to claim 5, It is characterized in that S4 include: S4.1: Initialize the population , Evolution times , calculate the cost , crossover probability , mutation probability ; S4.2: Random sampling in the super network after secondary training The sub-network is used as the initial population; S4.3: Sampled sub-networks according to the crossover probability Performing a crossover operation to generate a new sub-network; the crossover operation includes crossover combination of layers, layer connection relationships or nodes in the sub-network; S4.4: The newly generated sub-network is mutated according to the probability Performing a mutation operation to generate a mutant sub-network; the mutation operation includes adding, deleting or modifying the network structure; S4.5: evaluating the mutual information of each variant sub-network according to the architecture search objective function; S4.6: Merge each variant sub-network with the parent network and select the mutual information front of the variant sub-network The merged networks are combined into a new super network; the new super network is trained through S3; S4.7: Repeat S4.2-S4.6 until the maximum number of iterations is reached or convergence is achieved; S4.8: Select the sub-network architecture with the largest mutual information as the optimal network architecture.
8. The method for detecting defects in aircraft engine blades based on network architecture search according to claim 1, It is characterized in that S5 include: S5.1: Input the defect detection data set into the optimal network architecture, and calculate the recognition accuracy rate corresponding to the optimal network architecture. The calculation formula of the recognition accuracy rate is: ; Among them, Precision represents the recognition accuracy, TP represents the samples predicted correctly by the network, and FP represents the samples predicted incorrectly by the network; S5.2: Compare the recognition accuracy with a set threshold, When the recognition accuracy is less than the set threshold, the search space of the optimal network architecture is doubled, and the process returns to S3 and S4 to search and optimize again; When the recognition accuracy is greater than or equal to the set threshold, the corresponding optimal network architecture is used as the detection framework of the feature extraction network for aircraft engine blade defect detection.
Citation Information
Patent Citations
Surface defect detection method based on differentiable neural architecture search
CN117173091A
