A rapid surface defect detection method and system based on GAN and attention fusion mechanism
A rapid surface defect detection method based on GAN-based data augmentation and attention fusion mechanism solves the detection challenge in complex industrial environments, achieving high-precision and rapid surface defect detection.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CHONGQING ENSHOWING TECH CO LTD
- Filing Date
- 2022-09-01
- Publication Date
- 2026-04-28
AI Technical Summary
Existing technologies struggle to efficiently detect surface defects in complex environments, especially in industrial settings. High costs of acquiring training data, insufficient computing power, uneven lighting, and complex backgrounds all contribute to the difficulty of detection.
A simulated image sample is generated using a GAN-based data augmentation network, and a fast surface defect detection network with an attention fusion mechanism is combined to achieve high-precision localization and segmentation through an information extraction module, a fast sampling module, and an attention fusion module.
It achieves high-precision and rapid surface defect detection in complex backgrounds, improves detection accuracy and reduces network depth, thereby increasing detection speed.
Smart Images

Figure CN115409813B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of surface defect detection technology, and specifically to a rapid surface defect detection method and system based on GAN and attention fusion mechanism. Background Technology
[0002] Defect detection is a crucial part of product manufacturing and maintenance. Surface defects, such as scratches, are a special type of defect that is more difficult to detect. Traditional methods cannot handle surface defect images with complex background textures and discontinuous defect areas. With the maturity of convolutional neural networks, CNN methods such as UNet / YOLO can be used to detect surface defects. However, for defects in industrial environments, existing methods struggle to achieve satisfactory detection results, mainly due to several challenges: 1) High cost of training data acquisition: real-world surface defects are relatively rare, and image annotation requires a large number of personnel. 2) Harsh production environments with poor cooling conditions prevent the use of high-performance GPUs, yet fast detection speeds are still required, thus placing high demands on the network's inference speed and accuracy. 3) Complex workpiece textures, uneven lighting, and low contrast between surface defects and the background further complicate detection. Summary of the Invention
[0003] In order to overcome the shortcomings of the existing technology, the purpose of this invention is to provide a rapid surface defect detection method and system based on GAN and attention fusion mechanism.
[0004] To achieve the above-mentioned objectives of the present invention, the present invention provides a data augmentation method, comprising the following steps:
[0005] Obtain a real image sample set;
[0006] Construct a GAN-based data augmentation network, which includes a generator and a discriminator;
[0007] The data augmentation network is trained by using adaptive variable data and real image samples in the generator to adaptively generate simulated image samples; prediction modules are added to the intermediate and final feature layers of the discriminator to distinguish the authenticity of features at different scales between simulated and real image samples; when the discriminator cannot distinguish between authenticity, the real image samples are augmented according to the characteristics of the data augmentation network at this time.
[0008] The images generated using this method have clear details, natural transitions, and better match the distribution of real data. A prediction module is also added in the intermediate stage of the discriminator, enabling finer-grained identification and optimizing the generation of image details.
[0009] A preferred approach to this data augmentation method involves adding random noise when the generator produces simulated image samples. This preferred approach improves the image's detail.
[0010] This invention also proposes a rapid surface defect detection method, comprising the following steps:
[0011] Obtain a sample set of surface defect images;
[0012] A rapid surface defect detection network is constructed, which includes:
[0013] The information extraction module is used to extract underlying detailed information;
[0014] A fast sampling module is used to extract high-level semantic information;
[0015] The attention fusion module fuses the high-level semantic information with the low-level detail information, and combines the low-level detail information extracted by the information extraction module to locate surface defects, and uses the high-level semantic information extracted by the fast sampling module to segment the surface defect location.
[0016] The fast surface defect detection network is trained using a set of surface defect image samples;
[0017] A fast surface defect detection network trained from scratch is used for surface defect detection.
[0018] This rapid surface defect detection method accurately detects surface defects by quickly locating and segmenting them, and has the advantage of high precision.
[0019] The preferred embodiment of the rapid surface defect detection method is as follows: the information extraction module includes a first convolutional layer for integrating information and changing the number of channels, a second convolutional layer using dilated convolution, and a third convolutional layer with a jumper structure incorporating a residual network, wherein the first convolutional layer, the second convolutional layer, and the third convolutional layer are stacked sequentially.
[0020] In this preferred scheme, the first convolutional layer is used to integrate information and change the number of channels. The second convolutional layer adopts dilated convolution with an expansion rate of 2, which can obtain a larger field of view and alleviate the field of view limitation caused by the low overall number of network layers. The third convolutional layer adds a jumper structure similar to a residual network to enrich the path of information flow and reduce the loss of useful information.
[0021] The preferred embodiment of this rapid surface defect detection method is as follows: the rapid sampling module includes a fourth convolutional layer employing dilated convolution and a fifth convolutional layer for feature reconstruction.
[0022] In this preferred scheme, the fourth convolutional layer uses dilated convolution with a stride of 2 and an expansion rate of 2. The fifth convolutional layer is used to reorganize features. The first convolution uses dilated convolution, which further improves the network's field of vision. However, because the stride is not 1, the features after convolution are relatively coarse. Therefore, the second convolution also plays a lubricating role.
[0023] The preferred embodiment of the rapid surface defect detection method is as follows: the attention fusion module includes a sixth convolutional layer and a seventh convolutional layer. The input information extraction module of the sixth convolutional layer extracts low-level detail information, and the input fast sampling module of the seventh convolutional layer extracts high-level semantic information.
[0024] The attention fusion module also includes a convolutional layer with a 3x3 kernel, which fuses information from the outputs of convolutional layer six and convolutional layer seven.
[0025] The attention fusion module also includes convolutional layer eight and convolutional layer nine. The output of the convolutional layer with a 3x3 kernel is connected to convolutional layer eight and convolutional layer nine. The output of convolutional layer six is combined with the output of convolutional layer eight, and the output of convolutional layer seven is combined with the output of convolutional layer nine. The results of the two MUL operations are then combined and output.
[0026] This preferred solution achieves precise feature fusion by giving the information extraction module and the fast sampling module pixel-level attention to the features.
[0027] The preferred embodiment of this fast surface defect detection method is as follows: based on the above data augmentation method, the defect image sample set is augmented with defect image samples, and the fast defect detection network is trained using the augmented defect image samples.
[0028] This invention also proposes a data augmentation system, including a storage module, a processing module, and a sample acquisition module. The storage module and the processing module are communicatively connected, and the sample acquisition module is connected to the processing module and sends sample information to the processing module. The storage module stores at least one executable instruction, which causes the processing module to perform operations corresponding to the data augmentation method described above based on the sample information. This data augmentation system possesses all the advantages of the aforementioned data augmentation method.
[0029] This invention also proposes a rapid surface defect detection system, comprising a storage unit, a processing unit, and a sample acquisition unit. The storage unit and the processing unit are communicatively connected, and the sample acquisition unit is connected to the processing unit and sends sample information to the processing unit. The storage unit stores at least one executable instruction, which causes the processing unit to perform operations corresponding to the rapid surface defect detection method described above based on the sample information. This rapid surface defect detection system possesses all the advantages of the aforementioned rapid defect detection method.
[0030] The beneficial effects of the present invention are as follows: The data augmentation method mentioned in the present invention achieves overall distribution through the generator of the GAN-based data augmentation network, and then scores the features of different scales of the discriminator to improve the discrimination ability. Random noise is added during the upsampling process of the generation network to improve the details of the generated image, thus solving the problem that the mainstream methods are not effective in generating large-area background images.
[0031] The rapid surface defect detection method mentioned in this invention locates surface defects through a rapid sampling module, then precisely segments them using detailed information extracted by an information extraction module, and finally fuses high-level and low-level information using an attention fusion module. The entire network achieves more accurate surface defect detection than mainstream methods. The network uses dilated convolutions to limit its depth, thus requiring fewer parameters and enabling faster detection.
[0032] Additional aspects and advantages of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. Attached Figure Description
[0033] The above and / or additional aspects and advantages of the present invention will become apparent and readily understood from the description of the embodiments taken in conjunction with the following drawings, in which:
[0034] Figure 1 This is a schematic diagram of a data augmentation network structure;
[0035] Figure 2 This is a schematic diagram illustrating the principle of rapid surface defect detection.
[0036] Figure 3 This is a flowchart of a rapid surface defect detection process;
[0037] Figure 4 This is a schematic diagram of the surface defect inspection network structure;
[0038] Figure 5 This is a schematic diagram of the network structure of the information extraction module;
[0039] Figure 6 This is a schematic diagram of the network structure of the fast sampling module;
[0040] Figure 7 This is a schematic diagram of the network structure of the attention fusion module;
[0041] Figure 8 This is a schematic diagram of the output network structure;
[0042] Figure 9 This is a schematic diagram of a data augmentation comparison experiment, in which... Figure 9 (a) is a label. Figure 9 (b) is a real image. Figure 9 (c) is the SPADE extension effect. Figure 9 (d) shows the expansion effect of Pix2PixHD. Figure 9 (e) The extended effects of the method presented in this paper;
[0043] Figure 10 This is a detailed schematic diagram of the data augmentation and comparison experiment. Figure 10 (a) is a detailed image of the SPADE expansion effect. Figure 10 (b) is a detailed image of the Pix2PixHD expansion effect. Figure 10 (c) is a detailed diagram of the extended effect of the method presented in this paper;
[0044] Figure 11 These are artificially fabricated images of surface defects, among which... Figure 11 (a) is a label. Figure 11 (b) is a forged image;
[0045] Figure 12 It is data augmentation network augmentation data, among which Figure 12 (a) tag, Figure 12 (b) To generate an image;
[0046] Figure 13 This is a data augmentation comparison diagram, where the image in the upper left corner is the original image. Detailed Implementation
[0047] Embodiments of the present invention are described in detail below. Examples of these embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and should not be construed as limiting the present invention.
[0048] In the description of this invention, unless otherwise specified and limited, it should be noted that the terms "installation", "connection" and "linking" should be interpreted broadly. For example, they can refer to mechanical or electrical connections, or internal connections between two components. They can be direct connections or indirect connections through an intermediate medium. Those skilled in the art can understand the specific meaning of the above terms according to the specific circumstances.
[0049] like Figure 1 As shown, this invention provides an embodiment of a data augmentation method. The specific steps of this embodiment are as follows:
[0050] Obtain a set of real image samples and perform image preprocessing.
[0051] In this embodiment, the image sample dataset comes from a factory and consists of 20 images acquired by an industrial camera using a ring light, with a resolution of 5472x3648. Since the image resolution is too high, it cannot be used to train the convolutional neural network model. Therefore, each image is cropped into 24 images with a resolution of 912x912, and images containing surface defects are selected as training and testing data, totaling 80 images. 70 of these images are randomly selected for training, and 10 are used for testing.
[0052] Construct a GAN-based data augmentation network, which includes a generator and a discriminator.
[0053] In this embodiment, the generator attempts to allow the network to find its own distribution that can characterize the image, thereby achieving adaptive modeling through a learnable input variable. Furthermore, prediction modules are added to the intermediate and final feature layers of the discriminator to score features at different scales, achieving finer-grained identification.
[0054] The data augmentation network is trained by using adaptive variable data and real image samples in the generator to adaptively generate simulated image samples, such as... Figure 1 As shown, the adaptive variable and semantic map are combined and fed into the generator. The generator network updates the input adaptive variable. The semantic map only provides content information, while the introduced adaptive variable fits the style of the image to obtain simulated image samples. The simulated image samples and real image samples are then compared in a discriminator to distinguish the authenticity of features at different scales. When the discriminator cannot distinguish between authenticity, the real image samples are augmented using the characteristics of the data augmentation network. In this embodiment, a capacitive stylus and Procreate software are used on an iPad device to draw lines of different widths on a drawing board using different sized stylus tips to simulate real annotated images. The drawn images are exported, preprocessed, and then the input variables are obtained. These input variables are fed into the proposed data augmentation network to obtain simulated images similar to real images, such as... Figure 12 As shown, by using real images fed into the network as annotations, complete training data can be formed by combining them with simulated images.
[0055] To generate varied and detailed textures, this embodiment employs a Stochastic Variation strategy, adding random noise to the network. This includes random variations in hair position, beard, and skin pores that do not affect the overall image appearance, enhancing the diversity of certain parts of the simulated image while also making the details more refined. Therefore, this embodiment adds pixel-level random noise during the generator's upsampling process to improve detail.
[0056] In this embodiment, the training environment and implementation details of the data augmentation network are shown in Tables 1 and 2.
[0057] Table 1 Training Environment
[0058]
[0059] Table 2 Implementation Details
[0060]
[0061] To demonstrate the superiority of the proposed method, some comparative experiments were conducted. In addition to the mainstream Pix2Pix method, the more advanced SPADE method was also selected for comparison. The results are as follows: Figure 9 and Figure 10 As shown. From Figure 9 and Figure 10 As can be seen, the generated images from Pix2PixHD and SPADE have unnatural textures and do not conform to realistic lighting conditions. In contrast, the method used in this embodiment exhibits a natural transition, with the image moving from bright to dark along the direction of illumination. This demonstrates that the network has learned the true data distribution, rather than averaging and repeating pixel values within each semantic object. Figure 10 The diagrams show enlarged details of several methods. SPADE exhibits a meshing problem, failing to generate images in many areas. Pix2PixHD also suffers from texture duplication in local areas. These issues were not observed in the results of the method presented in this chapter. The image generated by this method has clear details, natural transitions, and better reflects the distribution of real-world data, demonstrating the method's superiority.
[0062] For example, a comparison can be made between the data augmentation method proposed in this application and the data augmentation method using artificial forgery and data enhancement techniques.
[0063] Artificial Forgery: After gaining sufficient understanding of the image and surface defects, a capacitive stylus and Procreate software are used on an iPad to draw on a workpiece image without surface defects, creating forged data similar to real data. Appropriate brushes and colors are selected, and the brush strokes are adjusted to different sizes to simulate surface defects of varying widths. Different drawing pressures are used to blend brush pixels and image pixels at different ratios, simulating the indistinctness between surface defect areas and background areas. Subtracting the drawn image pixel-by-pixel from the original image yields the label image. The resulting forged data is as follows: Figure 11 As shown, from the human eye's perspective, it is very similar to real surface defects, making it difficult to distinguish between the real and fake. This has also been confirmed by professionals at the factory.
[0064] Data augmentation: Data augmentation is widely used in computer vision tasks, and researchers have proposed many computer vision libraries for convenient image data augmentation. The Imgaug library is a Python-based data augmentation library that encapsulates commonly used data augmentation methods. This example demonstrates how to process a surface defect dataset using the Imgaug library, including operations such as rotation, flipping, translation, cropping, adding noise, scaling, and affine transformations, each performed with a 50% probability. Figure 13 It shows a comparison between the enhanced image and the original image.
[0065] Results and Analysis: The datasets were augmented using three different methods, with each method adding a uniform 480 samples. Combined with the original 70 samples in the training set, the total size of the augmented datasets was 550. After augmentation, the datasets were used to train the proposed surface defect detection network. Predictions were made on the test set, and the results were evaluated. The experimental results are shown in Table 3.
[0066] Table 3 Experimental Results
[0067]
[0068] The experimental results show that manually fabricated data not only failed to improve performance but actually degraded the network. This demonstrates that although hand-drawn images may appear identical to real surface defects to the human eye, they do not reflect the true data distribution, and using them for training actually increases interference. Both data augmentation and the proposed data augmentation network improve network performance, with the proposed method outperforming data augmentation. This proves that data augmentation merely transforms existing data and does not truly increase the amount of data. The proposed method learns the true distribution of the data, even exceeding the boundaries of the real data, thus truly achieving data augmentation.
[0069] This invention also proposes an embodiment of a rapid surface defect detection method, which is based on GAN and attention fusion mechanism, such as... Figure 2 and Figure 3 As shown, the specific steps are as follows:
[0070] Obtain a sample set of surface defect images.
[0071] Establish a rapid surface defect detection network, such as Figure 4 As shown, the network includes an Information Extraction Module (IEM), an Information Extraction Module (FSM), and an Attention Fusion Module (AFM).
[0072] The information extraction module is a key component of this rapid surface defect detection network, used to effectively extract information. The structure of the information extraction module is as follows: Figure 5As shown, the network consists of three stacked convolutional layers, each with a 3x3 kernel. The first convolutional layer integrates information and changes the number of channels. The second convolutional layer uses dilated convolution with a dilation rate of 2, which provides a wider field of view and alleviates the limitation caused by the low overall number of layers in the network. The third convolutional layer incorporates a jumper structure similar to a residual network, enriching the information flow path and reducing the loss of useful information. The backbone network uses four IEM modules stacked sequentially.
[0073] The fast sampling module is used to extract high-level semantic information, and its structure is as follows: Figure 6 As shown, the network consists of two convolutional layers: the fourth and fifth. The fourth convolutional layer uses dilated convolution with a stride of 2 and an expansion rate of 2, while the fifth convolutional layer is used for feature reconstruction. The dilated convolution in the fourth layer further enhances the network's field of view, but because the stride is not 1, the features after convolution are relatively coarse. Therefore, the fifth convolutional layer also serves as a smoothing agent.
[0074] The information extraction module and the fast sampling module obtain low-level detail information and high-level semantic information respectively. Directly fusing the two will lead to feature misalignment. Features lose some information during downsampling, including positional information. When low-resolution features are upscaled using interpolation, the features may already be misaligned; adding them to high-resolution features will only add noise. Therefore, this embodiment introduces an attention fusion module to solve this problem. By giving pixel-level attention to both feature sets, it precisely fuses high-level semantic information and low-level detail information. In this embodiment, as shown... Figure 7 As shown, the attention fusion module includes convolutional layer six and convolutional layer seven. The input information extraction module of convolutional layer six extracts low-level detail information, and the input fast sampling module of convolutional layer seven extracts high-level semantic information. The attention fusion module also includes a convolutional layer with a 3x3 kernel, which fuses the outputs of convolutional layers six and seven. Furthermore, the attention fusion module includes convolutional layers eight and nine. The outputs of the 3x3 kernel convolutional layer are connected to convolutional layers eight and nine. The outputs of convolutional layers six and eight undergo a multiplication principle (MUL), and the outputs of convolutional layers seven and nine undergo a multiplication principle (MUL). The results of the two MUL operations are then combined and output by the output network, as shown in the diagram. Figure 8 As shown, this attention fusion module locates surface defects through an information extraction module, then uses detailed information extracted by a fast sampling module for precise segmentation, and finally fuses high-level and low-level information using the attention fusion module. The entire network achieves more accurate surface defect detection than mainstream methods. The overall detection network uses dilated convolutions to limit its depth, resulting in fewer parameters and faster detection compared to mainstream methods.
[0075] The fast surface defect detection network is trained using a sample set of surface defect images.
[0076] Train the network using the environment and implementation details shown in Tables 4 and 5.
[0077] Table 4 Training Environment
[0078]
[0079] Table 5 Implementation Details
[0080]
[0081] A fast surface defect detection network trained from scratch is used for surface defect detection.
[0082] To verify the superior performance of the proposed defect detection network across various aspects, several mainstream methods in image segmentation and edge extraction were selected for comparison: UNet, RCF, PSPNet, and BDCN. UNet is a commonly used network in defect detection research, while RCF and BDCN are commonly used and relatively advanced networks in edge extraction tasks. PSPNet is an excellent model in the segmentation field. Experimental data for each network are shown in Table 6. It is worth noting that in methods employing deep supervision, weights are generally not set for each supervisor. However, due to its complex bidirectional cascaded structure, the BDCN method still fails to converge after training. Therefore, the data in the table is obtained using the loss weights from the original paper.
[0083] Table 6 Comparison of experimental results
[0084]
[0085] As can be seen, the method proposed in this paper achieves the best results, with an improvement of 3.3 percentage points over the worst BDCN method and 1.2 to 1.5 percentage points over other methods. BDCN's bidirectional cascaded structure is difficult to train and performs poorly for this research topic; PSPNet uses ResNet34 as its backbone, and although the network depth is already quite deep, its overly aggressive downsampling still leads to some accuracy loss; RCF predicts almost entirely low-level information, resulting in inaccurate localization of surface defects and thus accuracy loss. In contrast, the method in this paper, through localization and segmentation, accurately detects surface defects and achieves the best score. Based on the data, the experimental results demonstrate the superiority of the method in terms of accuracy.
[0086] Compared to other methods, the proposed method offers a significant speed advantage while maintaining detection accuracy. BDCN is the slowest at 17.5 FPS, while the method presented in this paper nearly doubles its speed. PSPNet and UNet have similar processing speeds, at 18.4 FPS and 19.9 FPS, respectively. Even compared to the relatively higher RCF, the proposed method achieves a 3.6 FPS improvement.
[0087] In this embodiment of the rapid surface defect detection method, the surface defect image sample set can be expanded according to the above data augmentation method, and the expanded surface defect image samples can be used to train the rapid surface defect detection network.
[0088] This application also proposes an embodiment of a data augmentation system, which includes a storage module, a processing module, and a sample acquisition module. The storage module and the processing module are communicatively connected. The sample acquisition module is connected to the processing module and sends sample information to the processing module. The storage module is used to store at least one executable instruction, which causes the processing module to perform an operation corresponding to the data augmentation method described above based on the sample information.
[0089] This application also proposes an embodiment of a rapid surface defect detection system, which includes a storage unit, a processing unit, and a sample acquisition unit. The storage unit and the processing unit are communicatively connected. The sample acquisition unit is connected to the processing unit and sends sample information to the processing unit. The storage unit is used to store at least one executable instruction, which causes the processing unit to perform an operation corresponding to the rapid surface defect detection method described above based on the sample information.
[0090] In the description of this specification, references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.
[0091] Although embodiments of the invention have been shown and described, those skilled in the art will understand that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the claims and their equivalents.
Claims
1. A rapid surface defect detection method, characterized in that, Includes the following steps: Obtain a sample set of surface defect images; A rapid surface defect detection network is constructed, which includes: The information extraction module is used to extract underlying detailed information; A fast sampling module is used to extract high-level semantic information; The attention fusion module fuses the high-level semantic information with the low-level detail information, and combines the low-level detail information extracted by the information extraction module to locate surface defects, and uses the high-level semantic information extracted by the fast sampling module to segment the surface defect location. The attention fusion module includes a sixth convolutional layer and a seventh convolutional layer. The sixth convolutional layer is input to the low-level detail information extracted by the information extraction module, and the seventh convolutional layer is input to the high-level semantic information extracted by the fast sampling module. The attention fusion module also includes a convolutional layer with a 3x3 kernel, which fuses information from the outputs of convolutional layer six and convolutional layer seven. The attention fusion module also includes convolutional layer eight and convolutional layer nine. The output of the convolutional layer with a 3x3 kernel is connected to convolutional layer eight and convolutional layer nine. The output of convolutional layer six is MULted with the output of convolutional layer eight, and the output of convolutional layer seven is MULted with the output of convolutional layer nine. The results of the two MULts are then combined and output. The fast surface defect detection network is trained using a set of surface defect image samples; A fast surface defect detection network trained from scratch is used for surface defect detection.
2. The rapid surface defect detection method according to claim 1, characterized in that, There are four information extraction modules, and the four information extraction modules are stacked in sequence.
3. The rapid surface defect detection method according to claim 1 or 2, characterized in that, The information extraction module includes a first convolutional layer for integrating information and changing the number of channels, a second convolutional layer using dilated convolution, and a third convolutional layer with a jumper structure incorporating a residual network. The first, second, and third convolutional layers are stacked sequentially.
4. The rapid surface defect detection method according to claim 1, characterized in that, The fast sampling module includes a fourth convolutional layer employing dilated convolution and a fifth convolutional layer for feature recombination.
5. The rapid surface defect detection method according to claim 1, characterized in that, The surface defect image sample set is augmented with surface defect image samples, and the fast surface defect detection network is trained using the augmented surface defect image samples. The steps for augmenting surface defect image samples are as follows: Obtain a real image sample set; Construct a GAN-based data augmentation network, which includes a generator and a discriminator; The data augmentation network is trained by using adaptive variable data and surface defect image samples in the generator to adaptively generate simulated image samples. A prediction module is added to the intermediate and final feature layers of the discriminator to distinguish the authenticity of features at different scales between the simulated image samples and the surface defect image samples. When the discriminator cannot distinguish between authenticity, the surface defect image samples are augmented according to the characteristics of the data augmentation network at this time.
6. The rapid surface defect detection method according to claim 5, characterized in that, Random noise is added when the generator generates simulated image samples.
7. A rapid surface defect detection system, characterized in that, The method includes a storage unit, a processing unit, and a sample acquisition unit. The storage unit and the processing unit are communicatively connected. The sample acquisition unit is connected to the processing unit and sends sample information to the processing unit. The storage unit is used to store at least one executable instruction. The executable instruction causes the processing unit to perform the operation corresponding to the rapid surface defect detection method as described in any one of claims 1-6 based on the sample information.
Citation Information
Patent Citations
Super-resolution denoising method and device for a low-dose CT image
CN113516586A
Workpiece defect detection method and device fusing multi-attention mechanism
CN113822885A