A deep learning defect detection method based on neural network

By designing a dual-channel neural network and adaptive attention mechanism, combined with a temperature quenching algorithm, the problem of insufficient dynamic perception and generalization capabilities of defect detection methods in the existing technology in big data and complex data processing is solved, and higher perception capabilities and robustness are achieved.

CN118396964BActive Publication Date: 2025-05-13JIANGSU YINGHUA MFG CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410562745.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-05-08
Publication Date
2025-05-13
Estimated Expiration
2044-05-08

AI Technical Summary

Technical Problem

Existing deep learning-based defect detection methods have weak dynamic perception, limited generalization ability, and reduced robustness when processing large batches of data and complex data, especially in the case of subtle defect recognition and data set imbalance.

Method used

A deep learning defect detection method based on neural network is designed, using a dual-channel neural network to send the preprocessed data set into a dual-channel neural network, using the combination of static and dynamic convolution, introducing an adaptive attention mechanism and a short time series, adjusting the location information of the defect area, calculating attention value as weight fusion, building a deep learning defect detection model, and using a temperature quenching algorithm for iterative update.

Benefits of technology

Through distributed processing and adaptive attention mechanisms, the processing performance and generalization capabilities of neural networks for large data volumes and complex data are improved, the attention to different defective image areas is enhanced, perception and distinction capabilities are improved, and additional parameters and computational costs of neural networks are controlled.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118396964B_ABST
    Figure CN118396964B_ABST
Patent Text Reader

Abstract

The present invention discloses a deep learning defect detection method based on a neural network, including: designing a dual-channel neural network, performing distributed processing of static and dynamic convolution on images in a defect data set, increasing the input amount of the data set, and improving the performance and generalization ability of the neural network for large data volume or complex data processing; in addition, the present invention uses the attention value as the attention learning weight to fuse with the parallel convolution kernel and send it to the pooling layer, and uses the position information of the defect image area to dynamically adjust the attention weights of different areas, thereby improving the model's attention to different defect image areas and enhancing the perception and distinction capabilities of the neural network; finally, a temperature quenching algorithm is used to control the additional parameters and calculation costs brought by the custom layer between the hidden layer and the output layer of the neural network, which brings new possibilities for research and application in related fields.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of machine learning, and in particular to a deep learning defect detection method based on a neural network. Background Art

[0002] The neural network-based deep learning defect detection method is a method that applies deep learning technology to detect product defects in the manufacturing process. This method usually uses convolutional neural networks (CNNs) or other deep learning models to automatically learn to extract features from raw image data and perform defect detection and classification.

[0003] With the development of the times, neural networks and deep learning models are constantly being optimized, and neural network and deep learning technologies have achieved great success in the fields of image processing and pattern recognition. Their advantages are that they can automatically learn high-level feature representations from raw data and can adapt to various complex data structures and defect types.

[0004] At present, many deep learning-based defect detection methods have been proposed, including CNN-based methods, RNN-based methods, GAN-based methods, etc. Although these methods have achieved good results in different data sets and application scenarios, there are still some problems. For example, for pre-processed defect image sets or defect data, centralized processing is usually used, resulting in weak dynamic perception of defects in the image by the neural network. If a large amount of data is encountered, the accuracy of subsequent model training will be reduced. If the most advanced YOLOv8 model is used, not only will the recognition of subtle defects be weak, but it will also cause an imbalance in the defect data set, resulting in limited generalization of the model and reduced robustness.

[0005] Therefore, a model that can perform distributed processing, has defect perception, strong generalization ability, and high robustness is needed. Summary of the invention

[0006] The purpose of this section is to summarize some aspects of embodiments of the present invention and briefly introduce some preferred embodiments. Some simplifications or omissions may be made in this section and the specification abstract and the invention title of this application to avoid blurring the purpose of this section, the specification abstract and the invention title, and such simplifications or omissions cannot be used to limit the scope of the present invention.

[0007] In view of the above existing problems, the present invention is proposed. Therefore, the present invention provides a deep learning defect detection method based on a neural network to solve the problems mentioned in the background technology.

[0008] In order to solve the above technical problems, the present invention provides the following technical solutions: a deep learning defect detection method based on a neural network, comprising:

[0009] Acquire a defect data set that needs to be detected, and preprocess the data set;

[0010] Design a dual-channel neural network, send the preprocessed data set to the dual-channel neural network, divide the convolution layer in the dual-channel neural network into static convolution and dynamic convolution, use an adaptive attention mechanism in the dynamic convolution, and send the static convolution to a fully connected layer;

[0011] Introducing a short time series into the adaptive attention mechanism, obtaining the position information of the defective image area, adjusting the position information of the defective area, calculating the attention values ​​at different area positions, and fusing the attention values ​​with the parallel convolution kernel as the attention learning weights and sending them to the pooling layer;

[0012] A deep learning defect detection model is constructed, the fusion features are used as model training values, and a temperature quenching algorithm is used to iteratively update the training values.

[0013] As a preferred solution of the neural network-based deep learning defect detection method of the present invention, wherein: obtaining a defect data set to be detected and preprocessing the data set include:

[0014] Converting the acquired defect data set into an image set, creating image coordinates corresponding to the image set, and recording the image coordinates as original image coordinates;

[0015] The image coordinates are expanded by random coordinate inversion, and the expanded image coordinates are compared with the original image coordinates.

[0016] As a preferred solution of the neural network-based deep learning defect detection method of the present invention, a dual-channel neural network is designed, including:

[0017] In the dual-channel neural network, two input channels are provided, the neural network comprises a plurality of convolutional layers, and each convolutional layer comprises two sub-pixel convolutional layers, and each sub-pixel convolutional layer is set to 5×5;

[0018] In the first pass, no sub-pixel convolutional layers are included;

[0019] In the second channel, the sub-pixel convolution layer is connected to the activation function Leaky-ReLU, and the activation function is connected to a fully connected layer, and the output is performed through the fully connected layer.

[0020] As a preferred solution of the neural network-based deep learning defect detection method described in the present invention, the adaptive attention mechanism includes:

[0021] The adaptive attention mechanism is integrated into the convolution layer of the current neural network, multiple convolution kernels are adopted, and a single kernel method is used on the basis of the multiple convolution kernels, and multiple convolution kernels are processed simultaneously by aggregating parameters to form parallel convolution kernels.

[0022] As a preferred solution of the neural network-based deep learning defect detection method of the present invention, wherein: a short time series is introduced into the adaptive attention mechanism to obtain the position information of the defect image area, including:

[0023] Extract sequence features from short time series;

[0024] The sequence features are learned through an adaptive attention mechanism to obtain the position information of the defect image area.

[0025] As a preferred solution of the neural network-based deep learning defect detection method described in the present invention, wherein: adjusting the defect area position information, calculating the attention value at different area positions, and using the attention value as the attention learning weight to fuse with the parallel convolution kernel and send it to the pooling layer, including:

[0026] Get the attention learning weight and parallel convolution kernel fusion function:

[0027]

[0028] Where n represents the number of neurons in the neural network; Represents the loss process of the image set in n neurons; and Represent the expanded image coordinates x i ,y i The pixel point I; g represents the attention value; θ n Represented as the threshold of the neuron in the neural network; ω j Represented as the attention learning weight ω of different regions j; Represented as the sequence features in the short time series p, Represented as alternating sliding windows of short time series p;

[0029] The fusion function is sent to the pooling layer as a fusion feature, and an additional custom layer is added to the pooling layer. The output of the pooling layer is received as input through the custom layer and connected to the fully connected layer.

[0030] As a preferred solution of the neural network-based deep learning defect detection method described in the present invention, a deep learning defect detection model is constructed, the fusion features are used as model training values, and the temperature quenching algorithm is used to iteratively update the training values, including:

[0031] Selecting a random feature from the model training value as an original solution, removing the selected original solution from the model training value, and randomly selecting a feature as an optimal solution;

[0032] Generate an adjacent solution in the original solution and calculate the objective function of the adjacent solution;

[0033] If the objective function of the adjacent solution is larger than the original solution but smaller than the optimal solution, it is taken as the original solution; if the objective function of the adjacent solution is larger than the optimal solution, it is taken as the optimal solution; if the objective function of the adjacent solution is smaller than the original solution, it is eliminated.

[0034] As a preferred solution of the neural network-based deep learning defect detection method of the present invention, it also includes:

[0035] Update the current original solution and the optimal solution. When the optimal solution exceeds the maximum range of the model training value, stop the iteration and output the previous solution of the current solution as the optimal solution; otherwise, regenerate the adjacent solution and calculate the objective function of the adjacent solution.

[0036] As a preferred solution of the neural network-based deep learning defect detection method of the present invention, it also includes:

[0037] The temperature quenching algorithm also includes a regularized feature selection strategy.

[0038] Compared with the prior art, the invention has the following beneficial effects: the invention obtains a defect data set to be detected and preprocesses the data set; designs a dual-channel neural network, sends the preprocessed data set into the dual-channel neural network, divides the convolution layer in the dual-channel neural network into static convolution and dynamic convolution, uses an adaptive attention mechanism in the dynamic convolution, and sends the static convolution into the fully connected layer; introduces a short time series into the adaptive attention mechanism to obtain the position information of the defect image area, adjusts the position information of the defect area, calculates the attention value at different area positions, and uses the attention value as the attention learning weight to fuse with the parallel convolution kernel and send it into the pooling layer; constructs a deep learning defect detection model, uses the fused features as the model training values, and uses the temperature quenching algorithm to quench the training values. Iterative update; the present invention designs a dual-channel neural network to perform distributed processing of static and dynamic convolution on the images in the defect data set, thereby increasing the input amount of the data set and improving the performance and generalization ability of the neural network for large data volumes or complex data processing; in addition, the present invention uses the attention value as the attention learning weight to fuse with the parallel convolution kernel and send it to the pooling layer, and uses the position information of the defect image area to dynamically adjust the attention weights of different areas, thereby improving the model's attention to different defect image areas and enhancing the perception and distinction capabilities of the neural network; finally, the temperature quenching algorithm is used to control the additional parameters and computational costs brought by the custom layer between the hidden layer and the output layer of the neural network, which brings new possibilities for research and application in related fields. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for describing the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work. Among them:

[0040] Figure 1 This is an overall flow chart of a deep learning defect detection method based on a neural network according to an embodiment of the present invention;

[0041] Figure 2 A flow chart of a temperature quenching algorithm of a deep learning defect detection method based on a neural network according to an embodiment of the present invention;

[0042] Figure 3 A graph showing the relationship between the running speed and the loss value of the deep learning defect detection method based on a neural network according to an embodiment of the present invention;

[0043] Figure 4A graph showing the relationship between the neuron threshold and the average defect detection accuracy in the neural network of the GM method of the deep learning defect detection method based on a neural network according to an embodiment of the present invention and the method of the present invention;

[0044] Figure 5 This is a graph showing the relationship between the learning rate and the number of iterations under the temperature quenching algorithm of the neural network-based deep learning defect detection method described in one embodiment of the present invention. DETAILED DESCRIPTION

[0045] In order to make the above-mentioned purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are described in detail below in conjunction with the drawings of the specification. Obviously, the described embodiments are part of the embodiments of the present invention, but not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary persons in the art without creative work should fall within the scope of protection of the present invention.

[0046] In the following description, many specific details are set forth to facilitate a full understanding of the present invention, but the present invention may also be implemented in other ways different from those described herein, and those skilled in the art may make similar generalizations without violating the connotation of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed below.

[0047] Secondly, the term "one embodiment" or "embodiment" as used herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The term "in one embodiment" that appears in different places in this specification does not necessarily refer to the same embodiment, nor does it refer to a separate or selective embodiment that is mutually exclusive with other embodiments.

[0048] The present invention is described in detail with reference to schematic diagrams. When describing the embodiments of the present invention, for the sake of convenience, the cross-sectional diagrams showing the device structure will not be partially enlarged according to the general scale, and the schematic diagrams are only examples, which should not limit the scope of protection of the present invention. In addition, in actual production, the three-dimensional dimensions of length, width and depth should be included.

[0049] At the same time, in the description of the present invention, it should be noted that the directions or positional relationships indicated by the terms "upper, lower, inner and outer" are based on the directions or positional relationships shown in the drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific direction, be constructed and operated in a specific direction, and therefore cannot be understood as limiting the present invention. In addition, the terms "first, second or third" are only used for descriptive purposes and cannot be understood as indicating or implying relative importance.

[0050] In the present invention, unless otherwise clearly specified and limited, the terms "install, connect, connect" should be understood in a broad sense, for example: it can be a fixed connection, a detachable connection or an integral connection; it can also be a mechanical connection, an electrical connection or a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal communication of two components. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0051] Example 1

[0052] Reference Figure 1 and Figure 2 , which is the first embodiment of the present invention, and provides a deep learning defect detection method based on a neural network, comprising:

[0053] S1. Obtain the defect data set that needs to be detected and preprocess the data set;

[0054] Specifically, the defect dataset is obtained by using a Visual-Data dataset, a high-resolution camera, or a defect dataset input by other models;

[0055] Further, the acquired defect data set is converted into an image set, image coordinates corresponding to the image set are created, and the image coordinates are recorded as original image coordinates;

[0056] Furthermore, the image coordinates are expanded by random coordinate inversion, and the expanded image coordinates are compared with the original image coordinates;

[0057] Specifically, the expanded image coordinates are compared with the original image coordinates in the following manner: if the expanded image coordinates are larger than the original image coordinates, the deconvolution algorithm is used to process the image; if the expanded image coordinates are smaller than the original image coordinates, EDSR is called in channel 2 of the dual-channel neural network to process the image;

[0058] It should be noted that if the coordinates of the expanded image are larger than those of the original image, the details of the defect image may become clearer, but it may also cause the defect image to be distorted or deformed; similarly, since the coordinates of the expanded image are smaller than those of the original image, it may cause the details of the defect image to be lost or the resolution to be reduced, but it may also bring higher computing efficiency and faster processing speed; in order to better solve this problem, on the one hand, we divide it into static and dynamic processing, that is, different channels are processed differently; in addition, we also introduce the call-type EDSR, which is called when the details of the defect image are lost or the resolution is reduced, instead of treating it as a whole like the traditional method, and also processing the defect image without losing details or resolution, saving the neural network processing time;

[0059] Specifically, EDSR uses a deep residual network, in which the deep residual network uses residual connections. In the subsequent training of the loss value of the deep learning defect detection model, the model only needs to add a regularized feature selection strategy without worrying about the gradient vanishing and gradient exploding problems.

[0060] S2. Design a two-channel neural network, feed the preprocessed data set into the two-channel neural network, divide the convolution layer in the two-channel neural network into static convolution and dynamic convolution, use the adaptive attention mechanism in the dynamic convolution, and feed the static convolution into the fully connected layer;

[0061] Furthermore, in the dual-channel neural network, there are two input channels, the neural network includes several convolutional layers, and each convolutional layer includes 2 sub-pixel convolutional layers, and each sub-pixel convolutional layer is set to 5×5;

[0062] Preferably, in order not to excessively increase the receptive field and the number of parameters, the present invention preferably sets the sub-pixel convolution layer to 5×5, and while controlling the convolution kernel size, it can achieve the best result in conjunction with channel processing;

[0063] Furthermore, in the first pass, no sub-pixel convolutional layer is included;

[0064] It should be noted that the static convolution of the first channel is mainly used to process static defect images, and the output data of the static convolution layer is sent to the pooling layer for processing, which can effectively reduce the dimension of the features and retain subtle feature information; the dynamic convolution of the second channel is mainly used to process dynamic defect images, and the output data of the dynamic convolution layer is sent to the adaptive attention mechanism for processing, so that the neural network can dynamically adjust the degree of attention to different areas, so as to better perceive the dynamic features in the image;

[0065] Furthermore, in the second channel, the sub-pixel convolution layer is connected to the activation function Leaky-ReLU, and the activation function is connected to a fully connected layer, and the output is obtained through the fully connected layer;

[0066] It should be noted that the reason for connecting the sub-pixel convolution layer to the activation function is that after the output of each sub-pixel convolution layer, Leaky-ReLU will produce a very small negative slope, which enables it to produce a small gradient at the output of the neural network, thereby alleviating the problem of neuron death;

[0067] Specifically, by inserting the above-mentioned EDSR into the dynamic convolutional layer and cooperating with the adaptive attention mechanism, an end-to-end image super-resolution reconstruction network can be constructed, which can better adapt to the feature distribution of the input image and generate high-resolution images with high quality and high fidelity;

[0068] S3, introduce short time series into the adaptive attention mechanism, obtain the position information of the defective image area, adjust the position information of the defective area, calculate the attention value at different area positions, and use the attention value as the attention learning weight to fuse with the parallel convolution kernel and send it to the pooling layer;

[0069] Furthermore, the adaptive attention mechanism is integrated into the convolution layer of the current neural network, multiple convolution kernels are adopted, and a single kernel method is used on the basis of multiple convolution kernels, and multiple convolution kernels are processed simultaneously by aggregating parameters to form parallel convolution kernels;

[0070] It should be noted that the convolution layer of the current neural network refers to the convolution layer in the channel 1 or channel 2 currently being processed; multiple convolution kernels refer to the use of multiple single kernels in the sub-pixel convolution layer;

[0071] Furthermore, the sequence features in the short time series are extracted;

[0072] Specifically, the sequence features extracted from short time series are expressed as:

[0073] p=α[s1,s2,s3,…,s i ]

[0074]

[0075] Furthermore, the sequence features in the short time series are learned through the adaptive attention mechanism to obtain the position information of the defective image area;

[0076] It should be noted that the feature learning may include learning the feature dependency in a short time series, combining the feature dependency with the defect image processed by the neural network, and using multimodal feature representation. Since the present invention does not involve subsequent processing thereof, it will not be described in detail here.

[0077] S4. Build a deep learning defect detection model, use the fusion features as model training values, and use the temperature quenching algorithm to iteratively update the training values;

[0078] Furthermore, by constructing a deep learning defect detection model, the attention learning weight and parallel convolution kernel fusion function can be obtained, which is expressed as:

[0079]

[0080] Where n represents the number of neurons in the neural network; Represents the loss process of the image set in n neurons; and Represent the expanded image coordinates x i ,y iThe pixel point I; g represents the attention value; θ n Represented as the threshold of the neuron in the neural network; ω j Represented as the attention learning weight ω of different regions j; Represented as the sequence features in the short time series p, It is represented as alternating sliding windows f of short time series p;

[0081] Furthermore, the attention learning weights and the parallel convolution kernel fusion function are sent to the pooling layer as fusion features. An additional custom layer is added to the pooling layer, and the output of the pooling layer is received as input through the custom layer to connect to the fully connected layer.

[0082] For example, the Python code definition of a custom layer is as follows:

[0083]

[0084]

[0085] Furthermore, the fusion features are used as model training values, and the temperature quenching algorithm is used to iteratively update the training values. Figure 2 , the steps are as follows:

[0086] S401, selecting a random feature from the model training value as an original solution, removing the selected original solution from the model training value, and then randomly selecting a feature as the optimal solution;

[0087] S402, generating an adjacent solution in the original solution, and calculating the objective function of the adjacent solution;

[0088] S403, if the objective function of the adjacent solution is larger than the original solution but smaller than the optimal solution, then it is used as the original solution; if the objective function of the adjacent solution is larger than the optimal solution, then it is used as the optimal solution; if the objective function of the adjacent solution is smaller than the original solution, then it is eliminated;

[0089] S404, updating the current original solution and the optimal solution. When the optimal solution exceeds the maximum range of the model training value, the iteration is stopped and the previous solution of the current solution is output as the optimal solution; otherwise, the process returns to S402;

[0090] Specifically, the temperature quenching algorithm also includes a regularized feature selection strategy;

[0091] It should be noted that although sending the fusion function as a fusion feature into the pooling layer enables the neural network to make better use of the loss information and learn more useful feature representations, it increases the complexity of the output layer of the neural network and introduces additional computational costs. To solve this problem, we found that the temperature quenching algorithm has a low cost for the additional parameter output of the neural network because it only needs to fine-tune the softmax function, that is, fine-tune the random features obtained each time; and because EDSR is called earlier, there is no need to worry about the gradient problem, which implicitly improves the model performance.

[0092] Example 2

[0093] Reference Figures 3 to 5 , which is the second embodiment of the present invention, and this embodiment provides a deep learning defect detection method based on a neural network, comprising: verifying the beneficial effects of the present invention by means of simulation experiments;

[0094] To verify the feasibility of the scheme of the present invention, we used the deep learning framework of PyTorch 2.0, PyCharmCommunity2023 version and CUDA 11.2 development environment, and trained and tested the model on the Ubuntu 20.04.2LTS operating system; the experimental hardware configuration included an Intel Core i7-11700K 8-core 16-thread CPU and an NVIDIAGeForce RTX-3070GPU; the defect dataset in VisualData was used to simulate large batches of data or complex data, and 10,000,000 random defect samples in the dataset were taken as the processing capacity of the neural network input layer; the dual-channel neural network designed in the present invention was compared with traditional methods and a variety of neural network processing methods to obtain the processing results, which will be referred to in Table 1;

[0095] Table 1 Defect image processing results under each neural network processing

[0096]

[0097] From Table 1, we can see that, in the most similar method, the present invention neural network and the GM neural network can effectively improve the neural network running speed by ≈4% by using dual channels and short time series, and increase the perception ability of the neural network; moreover, it can also maintain a low loss value when the running speed is low, indicating that the present invention neural network can improve the generalization ability of the subsequent model, refer to Figure 3 ; Secondly, since RNN only uses a single channel, it runs the fastest, but by comparison, it will reduce the performance of the neural network for large amounts of data or complex data processing, that is, the ability to distinguish is poor; therefore, it is not difficult to see that the neural network of the present invention is obviously better;

[0098] refer to Figure 4 We compare the GM neural network in Table 1 with the neural network of the present invention, take the test set 7,500,000; take the validation set 2,500,000; the defect sample ratio is 1:3; send them together to the deep learning defect detection model constructed by the present invention, set the neuron threshold θ of the neural network to: 0.1-0.5, and use the fusion features of its output layer as the model training values ​​α and β respectively, perform temperature quenching algorithm training, set the model's learning rate lr to 0.0008-0.0002, and the number of iterations epoch is once every 10,000 iterations. Train various defect categories to obtain defect detection accuracy, refer to Table 2;

[0099] Table 2 Comparison results

[0100]

[0101] From Table 2, it can be seen that when the number of neurons is large, the average accuracy of the model training results of the method of the present invention is still 3.576% higher than that of GM, which shows that the method of the present invention uses the temperature quenching algorithm to control the additional parameters in the neural network and reduce the calculation cost of the number of participating layers;

[0102] And through Figure 5 It can be seen that the learning rate of the first iteration is at a relatively high level of 0.0008. As the number of iterations increases, the learning rate continues to decrease, indicating that the range of finding the optimal solution according to the temperature quenching algorithm is gradually narrowing. On the one hand, the accuracy of the model in detecting defects is improved, and on the other hand, the overfitting of the model is prevented; therefore, the scheme of the present invention can bring new possibilities for research and application in related fields.

[0103] Those skilled in the art will appreciate that the embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the application can adopt the form of complete hardware embodiments, complete software embodiments, or embodiments in combination with software and hardware. Moreover, the 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.) that contain computer-usable program codes. The scheme in the embodiments of the present application can be implemented in various computer languages, for example, object-oriented programming language Java and literal scripting language JavaScript, etc.

[0104] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (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 device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device 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.

[0105] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising 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.

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

[0107] Although the preferred embodiments of the present application have been described, those skilled in the art may make other 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 falling within the scope of the present application.

[0108] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.

Claims

1. A deep learning defect detection method based on neural network, characterized in that: include: Acquire a defect data set that needs to be detected, and preprocess the data set; Design a dual-channel neural network, send the preprocessed data set to the dual-channel neural network, divide the convolution layer in the dual-channel neural network into static convolution and dynamic convolution, use an adaptive attention mechanism in the dynamic convolution, and send the static convolution to a fully connected layer; Introducing a short time series into the adaptive attention mechanism, obtaining the position information of the defective image area, adjusting the position information of the defective area, calculating the attention values ​​at different area positions, and fusing the attention values ​​with the parallel convolution kernel as the attention learning weights and sending them to the pooling layer; Construct a deep learning defect detection model, use the fusion features as model training values, and use a temperature quenching algorithm to iteratively update the training values; The deep learning defect detection model is constructed, the fusion features are used as model training values, and the temperature quenching algorithm is used to iteratively update the training values, including: Selecting a random feature from the model training value as an original solution, removing the selected original solution from the model training value, and randomly selecting a feature as an optimal solution; Generate an adjacent solution in the original solution and calculate the objective function of the adjacent solution; If the objective function of the adjacent solution is larger than the original solution but smaller than the optimal solution, it is taken as the original solution; if the objective function of the adjacent solution is larger than the optimal solution, it is taken as the optimal solution; if the objective function of the adjacent solution is smaller than the original solution, it is eliminated; Also includes: Update the current original solution and the optimal solution. When the optimal solution exceeds the maximum range of the model training value, stop the iteration and output the previous solution of the current solution as the optimal solution; otherwise, regenerate the adjacent solution and calculate the objective function of the adjacent solution; Also includes: The temperature quenching algorithm also includes a regularized feature selection strategy.

2. The deep learning defect detection method based on neural network according to claim 1, characterized in that: Obtain a defect data set that needs to be detected and preprocess the data set, including: Converting the acquired defect data set into an image set, creating image coordinates corresponding to the image set, and recording the image coordinates as original image coordinates; The image coordinates are expanded by random coordinate inversion, and the expanded image coordinates are compared with the original image coordinates.

3. The neural network-based deep learning defect detection method according to claim 2, characterized in that: Design a two-channel neural network, including: In the dual-channel neural network, two input channels are provided, the neural network comprises a plurality of convolutional layers, and each convolutional layer comprises two sub-pixel convolutional layers, and each sub-pixel convolutional layer is set to 5×5; In the first pass, no sub-pixel convolutional layers are included; In the second channel, the sub-pixel convolution layer is connected to the activation function Leaky-ReLU, and the activation function is connected to a fully connected layer, and the output is performed through the fully connected layer.

4. The deep learning defect detection method based on neural network according to claim 2 or 3, characterized in that: Adaptive attention mechanism, including: The adaptive attention mechanism is integrated into the convolution layer of the current neural network, multiple convolution kernels are adopted, and a single kernel method is used on the basis of the multiple convolution kernels, and multiple convolution kernels are processed simultaneously by aggregating parameters to form parallel convolution kernels.

5. The deep learning defect detection method based on neural network according to claim 4, characterized in that: Introducing short time series into the adaptive attention mechanism, the position information of the defective image area is obtained, including: Extract sequence features from short time series; The sequence features are learned through an adaptive attention mechanism to obtain the position information of the defect image area.

6. The neural network-based deep learning defect detection method according to claim 5, characterized in that: Adjust the position information of the defect area, calculate the attention value at different area positions, and use the attention value as the attention learning weight to fuse with the parallel convolution kernel and send it to the pooling layer, including: Get the attention learning weight and parallel convolution kernel fusion function: Where n represents the number of neurons in the neural network; Represents the loss process of the image set in n neurons; and Represent the expanded image coordinates x i ,y i The pixel point I; g represents the attention value; θ n Represented as the threshold of the neuron in the neural network; ω j It is represented as the attention learning weight ω of different regions j; k∈p{f i =s i+1 } is represented as the sequence feature in the short time series p, f i =s i+1 It is represented as an alternating sliding window f of a short time series p; N is the total number of neurons; The fusion function is sent to the pooling layer as a fusion feature, and an additional custom layer is added to the pooling layer. The output of the pooling layer is received as input through the custom layer and connected to the fully connected layer.

Citation Information

Patent Citations

  • Infrared thermal image defect detection and quantification method based on spatial-temporal feature extraction

    CN112508853A

  • Fault diagnosis method and device based on dynamic separable convolutional neural network

    CN115374810A