Material defect detection method based on unsupervised algorithm visual model

By automatically segmenting and quantifying atoms and defects in TEM images using an unsupervised visual model algorithm, the problem of low efficiency in traditional TEM image analysis is solved, enabling efficient and real-time defect detection in crystal materials and reducing production costs.

CN121660958APending Publication Date: 2026-03-13HUAZHONG UNIV OF SCI & TECH
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-12
Publication Date
2026-03-13

AI Technical Summary

Technical Problem

Traditional TEM image analysis methods are inefficient, and manual analysis is slow and susceptible to experimental errors, making it difficult to locate and analyze defects and unable to efficiently assess the defect density of crystalline materials.

Method used

A material defect detection method based on an unsupervised algorithm visual model is proposed. Through a cyclic symmetric structure of generator, class encoder and discriminator, atoms and defects in TEM images are automatically segmented and quantified. The model is trained using a simulated dataset to achieve efficient defect detection.

Benefits of technology

It achieves high-precision and rapid atomic-level defect detection, supports real-time defect detection and monitoring, reduces reliance on paired data, lowers production costs, and improves production efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121660958A_ABST
    Figure CN121660958A_ABST
Patent Text Reader

Abstract

The invention provides a material defect detection method based on an unsupervised algorithm visual model. According to the method, a class encoder is introduced into an unsupervised algorithm visual model, an image generation process is guided to approach a target domain, and the situation that a generator cannot find an effective generation strategy is prevented; a loop structure is introduced to realize effective utilization of non-pairwise data, so that dependence on pairwise data is relieved, the pressure of pairwise data acquisition and processing is relieved, and the problem of data scarcity can be solved. Therefore, by means of the improved unsupervised algorithm visual model, more comprehensive information such as types, sizes, shapes, positions and distribution of the defects can be rapidly obtained, and an important reference basis is provided for defect analysis and control. In addition, the computer vision algorithm also supports real-time defect detection and monitoring, and when the algorithm is applied to real-time detection on a production line, the defects can be found and controlled in time, the influence of the defects on the product quality is avoided, and meanwhile, the production cost is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image processing technology, and in particular to a method for detecting material defects based on an unsupervised algorithm visual model. Background Technology

[0002] Defects in crystalline materials disrupt the periodic structure of the crystal, thereby modulating various physical and chemical properties of the material and enabling the fabrication of devices with different functions. Point defects of different types, locations, and densities, as well as line defects of different structures, can be used to alter the electronic tunability and mechanical flexibility of materials. Assessing the density of defects may lead to the development of more optimized manufacturing techniques to improve semiconductor devices. Therefore, atomic-scale defect analysis is commonly used in scientific research and industrial applications. Thanks to the development of transmission electron microscopy (TEM), researchers can observe these point and line defects at the atomic level and then analyze the samples. Traditionally, TEM images were manually analyzed by electron microscopy experts based on prior knowledge of different crystal structure characteristics. However, this method is only effective for a limited number of images with a finite number of atoms because the manual analysis process is slow. Furthermore, laboratory and imaging processing environments, the selection of electron microscope parameters, and minute errors in sample preparation can all blur the images. Low-quality images hinder defect localization and corresponding defect analysis.

[0003] In view of this, it is necessary to design a material defect detection method based on an unsupervised algorithm visual model to solve the above problems. Summary of the Invention

[0004] To address the shortcomings of the existing technologies, the present invention aims to provide a deep learning framework for defect detection in material characterization images, which can automatically locate and segment defects, quantitatively study phase reactions in materials, and perform atomic-level defect detection in a high-precision and high-efficiency manner.

[0005] To achieve the above objectives, this invention provides a material defect detection method based on an unsupervised algorithm visual model, comprising the following steps:

[0006] S1. Obtain electron micrographs of the target material and construct an atomic model. Simulate imaging of the constructed atomic model to generate a simulated TEM image set.

[0007] S2. Construct an unsupervised visual model to segment atoms and defects in a simulated TEM image set:

[0008] The unsupervised algorithm visual model includes:

[0009] Generator: Used to extract atomic information from the low-level features of electron microscopy images of target materials and reconstruct the information into the target domain;

[0010] Class encoder: used to extract deep features of the target domain; then compress and encode the features to form a compact and informative class code; while extracting the deep features of the target domain, the features are added to the feature maps of different sizes of the generator using residual linking to enhance the generator's ability to perceive the features of the target domain.

[0011] Discriminator: Used to identify the differences between the image generated by the generator and the electron microscope image;

[0012] S3. Visualize and quantify defects in the segmentation results of electron microscopy images of the material.

[0013] Further, in step S2, the generator includes generator one and generator two; the discriminator includes discriminator one and discriminator two; generator one, generator two, discriminator one, and discriminator two form a closed-loop cyclic symmetric structure.

[0014] Furthermore, the processing of the cyclic symmetric structure includes: generator one is responsible for transforming the image from domain A to domain B; generator two is responsible for transforming the image from domain B back to domain A; discriminator one is responsible for determining whether the input image comes from domain A; discriminator two is responsible for determining whether the input image comes from domain B; the cyclic consistency loss function is used to calculate the reconstruction error of the image after the two transformations, forcing the generator to maintain the structural consistency of the image content, so as to ensure that the image is close to the original image after the two transformations.

[0015] Furthermore, in step S2, during the training process, the parameters that the generator needs to optimize include minimizing the probability of being identified by the discriminator.

[0016] Furthermore, the generator employs a deep neural network structure, which consists of an encoder-decoder structure built from a convolutional neural network; in the generator, the target domain is a highly realistic and detailed segmented image of atoms and defects.

[0017] Furthermore, the class encoder adopts a convolutional neural network as its basic architecture; the class encoder delves deeper into the deep features of the target domain by stacking multiple convolutional layers, nonlinear activation layers, and pooling layers.

[0018] Furthermore, the discriminator employs a convolutional neural network as its basic architecture.

[0019] Furthermore, in step S1, when creating the simulated dataset, the abTEM package is used to achieve simulated imaging;

[0020] The parameters set in the abTEM package include:

[0021] Wave function: The wave function includes a plane wave; and the wave function is transmitted to the image plane through a contrast transfer function;

[0022] Imaging parameters: The imaging parameters include electron energy, spherical aberration, defocus range, and focal length spread;

[0023] Image blurring and noise: Gaussian blur is used to blur the boundaries of atoms, and Poisson noise is used to simulate noise in electron microscope images.

[0024] Furthermore, when creating the simulation dataset in step S1, the atomic model includes a normal structure model and a defect structure model; the types of the defect structure model include point defects and line defects.

[0025] Furthermore, step S3 specifically includes the following steps:

[0026] (I) Image Segmentation and Atomic Localization

[0027] (II) Defect Quantification

[0028] Calculate the proportion of defect atoms ω:

[0029] (III) Calculate the area ratio α of the single-phase region:

[0030] The beneficial effects of this invention are:

[0031] This invention provides a material defect detection method based on an unsupervised algorithmic visual model. It introduces a class encoder into the unsupervised algorithmic visual model to guide the image generation process closer to the target domain, preventing the generator from failing to find an effective generation strategy. Furthermore, it introduces a loop structure to effectively utilize unpaired data, thereby alleviating dependence on paired data and reducing the pressure of acquiring and processing paired data, while also addressing the data scarcity problem. This improved unsupervised algorithmic visual model can quickly acquire more comprehensive information such as the type, size, shape, location, and distribution of defects, providing important reference for defect analysis and control. In addition, the computer vision algorithm supports real-time defect detection and monitoring. Applying this algorithm to real-time detection on production lines can promptly detect and control defects, preventing them from affecting product quality and reducing production costs. Attached Figure Description

[0032] Figure 1 This is a schematic diagram of the structure of the unsupervised algorithm visual model provided in an embodiment of the present invention;

[0033] Figure 2 This is a schematic diagram illustrating the defect visualization and quantification process in an embodiment of the present invention;

[0034] Figure 3 This is a schematic diagram of an image generated by the generator in an embodiment of the present invention. Detailed Implementation

[0035] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be described in detail below with reference to the accompanying drawings and specific embodiments.

[0036] Additionally, it should be noted that the terms “comprising,” “including,” or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus.

[0037] like Figures 1-3 As shown, a material defect detection method based on an unsupervised algorithm visual model includes the following steps:

[0038] S1. Obtain electron micrographs of the target material and construct an atomic model. Simulate imaging of the constructed atomic model to generate a simulated TEM image set.

[0039] (a) Obtain electron micrographs of the target material

[0040] Using Python code, electron micrographs of the target material were extracted to serve as part of the test set for the unsupervised algorithm visual model.

[0041] (b) Creating a simulated dataset

[0042] 1) Atomic models are constructed using Materials Studio software; the atomic models include normal structure models and defect structure models; the types of defect structure models include point defects and line defects; the method for creating the defect structure models is as follows:

[0043] Point defects: created by randomly deleting atoms from the structure;

[0044] Line defects: such as heterojunctions, are achieved by selecting the average of the cell parameters of two materials (e.g., WS2 and MoS2) as the new lattice parameters, then adding a vacuum layer, and establishing a highly symmetrical initial structure (e.g., bridging and voids) by translating and rotating the relative positions.

[0045] 2) The constructed atomic model is simulated and imaged using the abTEM package to generate a set of simulated TEM images;

[0046] S2. Build an unsupervised visual model to segment atoms and defects in a simulated TEM image set;

[0047] The unsupervised algorithm visual model includes:

[0048] Generator: Used to extract the atomic arrangement, morphology and potential defect information from the low-level features of electron microscopy images of target materials, and reconstruct the information into a target domain;

[0049] During training, the generator needs to continuously optimize the following internal parameters: minimizing the risk of being identified by the discriminator, i.e. maximizing the probability that the image generated by the generator will be misclassified as a real image; when the GAN reaches convergence, the generator will be able to skillfully accept electron microscope images as input and output high-quality target domains.

[0050] The generator processes two key types of data: one is the input electron microscope image (category A), and the other is the expected output target, i.e., the target domain (category B); the generator understands and captures the inherent correlation and mapping pattern between the electron microscope image and the corresponding target domain;

[0051] The generator adopts a deep neural network structure, which consists of an encoder-decoder structure built by a convolutional neural network (CNN). Through multi-layer convolution, pooling, activation and deconvolution operations, it gradually extracts and constructs high-level and complex image content from low-level features.

[0052] Class encoder: used to extract deep features of the target domain; then compress and encode the features to form a compact and informative class code; while extracting the deep features of the target domain, the features are added to the feature maps of different sizes of the generator using residual linking, which enhances the generator's ability to perceive the features of the target domain; and promotes the consistency between the generated image and the target domain in style, content and other dimensions.

[0053] The class encoder uses a convolutional neural network (CNN) as its basic architecture. In the design of the class encoder, multiple layers of convolutional layers, non-linear activation layers, and possible pooling layers are stacked to explore the deep features of the target domain layer by layer.

[0054] Discriminator: Used to identify the differences between the image generated by the generator and the electron microscope image;

[0055] The discriminator's task is to distinguish between the generated image G(x,c) and the image x input to the network; where G(·) generates a new image based on the image x in the input domain A and the encoder's encoding of the image in the target domain B.

[0056] The discriminator is built on a convolutional neural network. During training, the generator continuously improves its ability to generate images in an attempt to deceive the discriminator, while the discriminator improves its discrimination ability to prevent being deceived by the generator. This process allows both the generator and discriminator of the GAN to be continuously optimized, eventually reaching a relatively balanced state.

[0057] S3. Visualize and quantify the defects in the segmentation results.

[0058] This setup allows for accurate and efficient identification and classification of various defects by leveraging computer vision algorithms to analyze the material's structure. Compared to traditional physical inspection methods, computer vision algorithms significantly reduce inspection time and improve production efficiency. Secondly, computer vision algorithms can quickly acquire more comprehensive information such as the type, size, shape, location, and distribution of defects, providing crucial reference for defect analysis and control. Furthermore, computer vision algorithms support real-time defect detection and monitoring. Applying these algorithms to real-time inspection on production lines allows for timely detection and control of defects, preventing them from impacting product quality and reducing production costs. Moreover, introducing a class encoder into the unsupervised visual model guides the image generation process closer to the target domain, preventing the generator from failing to find an effective generation strategy.

[0059] Specifically, in some embodiments of the present invention, in step S2, the generator includes generator one and generator two; the discriminator includes discriminator one and discriminator two; generator one, generator two, discriminator one, and discriminator two form a closed-loop cyclic symmetric structure. The processing steps of the cyclic symmetric structure include: Generator 1 is responsible for converting the image from domain A to domain B; Generator 2 is responsible for converting the image from domain B back to domain A (i.e., each generator is responsible for converting an image from one domain to an image from another domain); Discriminator 1 is responsible for determining whether the input image comes from domain A; Discriminator 2 is responsible for determining whether the input image comes from domain B (i.e., each discriminator is responsible for determining whether the input image belongs to its corresponding domain); The cyclic consistency loss function is used to calculate the reconstruction error of the image after two conversions, forcing the generator to maintain the structural consistency of the image content, so as to ensure that the image is close to the original image after two conversions; (i.e., if an image from domain A is converted to an image from domain B by G, and then converted back to domain A by F, the converted image should be as similar as possible to the original image; this structure is beneficial for the generator to retain the atomic position information during the conversion from domain A to domain B, but the style becomes a black and white image (i.e., the image after segmentation)).

[0060] The core purpose of this setup, which introduces a loop structure, is to enable the effective use of unpaired data, thereby alleviating the dependence on paired data, reducing the pressure of acquiring and processing paired data, and also solving the problem of data scarcity.

[0061] Specifically, in some embodiments of the present invention, when creating the simulated dataset in step S1, the abTEM package is used to achieve simulated imaging;

[0062] The parameters set in the abTEM package include:

[0063] Wave function: The wave function includes a plane wave; and the wave function is transmitted to the image plane through a contrast transfer function (CTF);

[0064] Imaging parameters: The imaging parameters include electron energy, spherical aberration (1-3 μm), defocus range (-4-4 nm), and focal length diffusion.

[0065] Image blurring and noise: Gaussian blur is used to blur the boundaries of atoms, and Poisson noise is used to simulate noise in electron microscope images.

[0066] With this setup, the improved imaging method ensures the diversity of the dataset by adjusting imaging parameters (such as spherical aberration, defocus range, focal length spread, etc.), thereby improving the robustness of the model. This improved imaging method also significantly reduces the simulation imaging time of the atomic model.

[0067] Specifically, in some embodiments of the present invention, step S3 includes the following steps:

[0068] (I) Image Segmentation and Atomic Localization

[0069] Based on the differences in atomic brightness values ​​and by setting different thresholds, normal atoms, defective atoms, and boundaries are segmented in the image. The segmented image is binarized to simplify the pixel values ​​into two levels (black and white), thus making the image present a clear black and white effect. The outlines and centers of normal and defective atoms are located by detecting connected regions, thereby realizing the localization of atomic outlines and centers.

[0070] (II) Defect Quantification

[0071] By using thresholds A and B, normal atomic and point defects are distinguished from line defects, and normal atomic, point and line defects are stored in different arrays respectively.

[0072] Remove the outline coordinate list containing fewer than 2 but more than 30 elements, keeping only the shape of the atoms;

[0073] Calculate the proportion ω of defect atoms:

[0074] (III) Calculate the area ratio α of the single-phase region:

[0075] Calculate the proportion α of the single-phase region area:

[0076] When calculating the total area, it is necessary to locate the boundary of the polygon, which often requires calculating the area of ​​the polygon triangles. In the markerdiagram, locate the coordinates of the boundary, and starting from these vertices, draw straight lines to divide the polygon into multiple triangles. By summing the areas of each triangle, the total area of ​​the polygon can be calculated.

[0077] This setup visualizes and quantifies defects. By understanding and controlling the location and density of defects, we can better understand and predict the properties and behavior of materials, and further optimize their performance.

[0078] The following describes the working principle of the material defect detection method based on an unsupervised algorithm visual model provided by this invention:

[0079] Example

[0080] like Figures 1-3 As shown in the figure, this embodiment provides a material defect detection method based on an unsupervised algorithm visual model, including the following steps:

[0081] S1. Obtain electron micrographs of the target material and construct an atomic model. Simulate imaging of the constructed atomic model to generate a simulated TEM image set.

[0082] (a) Obtain electron micrographs of the target material

[0083] The obtained electron micrographs of the target material were used as part of the test set for the unsupervised algorithm visual model.

[0084] (b) Creating a simulated dataset

[0085] 1) The atomic model is constructed using Materials Studio software; the atomic model includes a normal structure model and a defective structure model; the method for creating the defective structure model is as follows:

[0086] Point defects: created by randomly deleting atoms from the structure;

[0087] Line defects: such as heterojunctions, by selecting the average value of the cell parameters of two materials, WS2 and MoS2, as the new lattice parameters, then adding a vacuum layer, and establishing a highly symmetrical initial structure by translating and rotating the relative positions;

[0088] 2) The constructed atomic model is simulated and imaged using the abTEM package to generate a set of simulated TEM images;

[0089] The parameter selection options in the abTEM package include:

[0090] Wave function selection: A plane wave is selected as the wave function, and it is transmitted to the image plane by comparison transfer function;

[0091] Imaging parameters: Set reasonable imaging parameters, including electron energy (300KV), spherical aberration (randomly selected 1~3μm), defocus range (-4~4nm) and focal length spread (30°A).

[0092] Image blurring and noise: Gaussian blurring is used to blur atomic boundaries, and Poisson noise is used to simulate noise in electron microscope images; the blurred and noise-processed images are combined to generate the final simulated TEM image;

[0093] The simulation imaging time for each atomic model containing approximately 4,500 atoms has been reduced to 7 seconds;

[0094] S2. Build an unsupervised visual model to segment atoms and defects in a simulated TEM image set;

[0095] The unsupervised algorithm visual model includes:

[0096] Generator: Used to extract the atomic arrangement, morphology and potential defect information from the low-level features of electron microscopy images of target materials, and reconstruct the information into a target domain;

[0097] The generator understands and captures the inherent correlation and mapping patterns between the electron microscope images and the corresponding segmented atomic and defect result images.

[0098] During training, the generator needs to continuously optimize the following internal parameters: to minimize the probability of being identified as a risk by the discriminator; when the GAN reaches convergence, the generator will be able to skillfully accept electron microscopy images as input and output high-quality target domains.

[0099] The generator adopts a deep neural network structure, which consists of an encoder-decoder structure built by a convolutional neural network (CNN). Through multi-layer convolution, pooling, activation and deconvolution operations, it gradually extracts and constructs high-level and complex image content from low-level features.

[0100] Class encoder: used to extract deep features of the target domain; then compress and encode the features to form a compact and informative class code; while extracting the deep features of the target domain, the features are added to the feature maps of different sizes of the generator using residual linking to enhance the generator's ability to perceive the features of the target domain.

[0101] The encoder uses a convolutional neural network (CNN) as its basic architecture. In the design of the encoder, multiple layers of convolutional layers, nonlinear activation layers, and possible pooling layers are stacked to explore the deep features of the target domain image layer by layer.

[0102] Discriminator: Used to identify the differences between the image generated by the generator and the electron microscope image;

[0103] The discriminator is built on a convolutional neural network. During training, the generator continuously improves its ability to generate images in an attempt to deceive the discriminator, while the discriminator improves its discrimination ability to prevent being deceived by the generator. This process allows both the generator and discriminator of the GAN to be continuously optimized, eventually reaching a relatively balanced state.

[0104] The generator includes Generator 1 and Generator 2, and the discriminator includes Discriminator 1 and Discriminator 2; Generator 1, Generator 2, Discriminator 1, and Discriminator 2 form a closed-loop cyclic symmetric structure.

[0105] The processing steps of the cyclic symmetric structure include: Generator 1 is responsible for converting the image from domain A to domain B; Generator 2 is responsible for converting the image from domain B back to domain A; Discriminator 1 is responsible for determining whether the input image comes from domain A; Discriminator 2 is responsible for determining whether the input image comes from domain B; The cyclic consistency loss function is used to calculate the reconstruction error of the image after the two conversions, forcing the generator to maintain the structural consistency of the image content, so as to ensure that the image is as close as possible to the original image after the two conversions;

[0106] S3. Visualize and quantify the defects in the segmentation results.

[0107] (I) Image Segmentation and Atomic Localization

[0108] Based on the differences in atomic brightness values, normal atoms, defective atoms, and boundaries are segmented in the image by setting different thresholds. The segmented image is then binarized to simplify the pixel values ​​into two levels (0 (black) and 255 (white)), thus giving the image a distinct black and white effect. The contours and centers of normal and defective atoms are located by detecting connected regions, thereby achieving the localization of atomic contours and centers.

[0109] (II) Defect Quantification

[0110] By using thresholds A and B, normal atomic and point defects are distinguished from line defects, and normal atomic, point and line defects are stored in different arrays respectively.

[0111] Remove the outline coordinate list containing fewer than 2 but more than 30 elements, keeping only the shape of the atoms;

[0112] Calculate the proportion ω of defect atoms:

[0113] (III) Calculate the area ratio of single-phase regions

[0114] like Figure 2 As shown, calculate the proportion α of the single-phase region area:

[0115] To calculate the total area, locate the coordinates of the boundary in the marker diagram, and starting from these vertices, draw straight lines to divide the polygon into multiple triangles. By summing the areas of each triangle, calculate the total area of ​​the polygon (the area of ​​phase A is S1+S2+S3, the area of ​​phase B is S4, and the total area is S1+S2+S3+S4).

[0116] Finally, using the trained unsupervised visual model, 20,000 electron microscope images were generated. In machine learning and deep learning, the scarcity of datasets is a common problem. When training data is insufficient to cover the complexity of the model or the needs of a specific domain, the model may experience overfitting, underfitting, or other performance issues. STEM images represent a small dataset, urgently requiring data augmentation. The cyclic symmetric structure of this method perfectly achieves this function, as detailed below:

[0117] The two trained generators are used to iterate through the images of the two domains to obtain images of both domains. For the simulated STEM image, a segmented defect image is generated using the model, and this segmented defect image is used as input to generate the corresponding STEM image. The magnification of the generated electron micrograph is determined by the input domain. Figure 3 (a) Specifically, the generator input images are electron microscope images at different magnifications; the degree of noise addition is determined by the target domain, such as... Figure 3 (b) Specifically, this involves feeding images containing different levels of noise into the class encoder, forming different class codes (c). The image types generated in this way can be manipulated. Furthermore, images generated using this method require an average processing time of only 0.07 seconds per image, thus this model has the potential to be used with larger datasets.

[0118] This method automatically segments defects in classical material systems, and the model achieves a measurement accuracy of up to 96.9% on both simulated and real electron microscope images.

[0119] In summary, this invention provides a material defect detection method based on an unsupervised algorithmic visual model. An encoder-like approach is introduced into the unsupervised algorithmic visual model to guide the image generation process closer to the target domain, preventing the generator from failing to find an effective generation strategy. Furthermore, a loop structure is introduced to effectively utilize unpaired data, thereby alleviating dependence on paired data and reducing the pressure of acquiring and processing paired data, while also addressing the data scarcity problem. This improved unsupervised algorithmic visual model can quickly acquire more comprehensive information such as the type, size, shape, location, and distribution of defects, providing important reference for defect analysis and control. In addition, the computer vision algorithm supports real-time defect detection and monitoring. Applying this algorithm to real-time detection on production lines can promptly identify and control defects, preventing them from affecting product quality and reducing production costs.

[0120] The above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention.

Claims

1. A method for detecting material defects based on an unsupervised visual model algorithm, characterized in that, Includes the following steps: S1. Obtain electron micrographs of the target material and construct an atomic model. Simulate imaging of the constructed atomic model to generate a simulated TEM image set. S2. Build an unsupervised visual model to segment atoms and defects in a simulated TEM image set; The unsupervised algorithm visual model includes: Generator: Used to extract atomic information from the low-level features of electron microscopy images of target materials and reconstruct the information into the target domain; Class encoder: used to extract deep features of the target domain; then compress and encode the features to form a compact and informative class code; while extracting the deep features of the target domain, the features are added to the feature maps of different sizes of the generator using residual linking to enhance the generator's ability to perceive the features of the target domain. Discriminator: Used to identify the differences between the image generated by the generator and the electron microscope image; S3. Visualize and quantify defects in the segmentation results of electron microscopy images of the material.

2. The material defect detection method based on an unsupervised algorithm visual model according to claim 1, characterized in that: In step S2, the generator includes generator one and generator two; the discriminator includes discriminator one and discriminator two; generator one, generator two, discriminator one, and discriminator two form a closed-loop cyclic symmetric structure.

3. The material defect detection method based on an unsupervised algorithm visual model according to claim 2, characterized in that: The processing procedure for the cyclic symmetric structure includes: Generator 1 is responsible for converting the image from domain A to domain B; generator 2 is responsible for converting the image from domain B back to domain A. The first discriminator is responsible for determining whether the input image comes from domain A; the second discriminator is responsible for determining whether the input image comes from domain B. The reconstruction error of the image after two transformations is calculated using the cycle consistency loss function, which forces the generator to maintain the structural consistency of the image content to ensure that the image is close to the original image after two transformations.

4. The material defect detection method based on an unsupervised visual model according to claim 3, characterized in that: In step S2, during the training process, the parameters that the generator needs to optimize include minimizing the probability of being identified by the discriminator.

5. The material defect detection method based on an unsupervised algorithm visual model according to claim 1, characterized in that: The generator employs a deep neural network structure, which consists of an encoder-decoder structure built from a convolutional neural network. In the generator, the target domain is a highly realistic and detailed segmented image of atoms and defects.

6. The material defect detection method based on an unsupervised algorithm visual model according to claim 1, characterized in that: The encoder uses a convolutional neural network as its basic architecture; the encoder delves deeper into the target domain by stacking multiple convolutional layers, nonlinear activation layers, and pooling layers.

7. The material defect detection method based on an unsupervised algorithm visual model according to claim 1, characterized in that: The discriminator uses a convolutional neural network as its basic architecture.

8. The material defect detection method based on an unsupervised algorithm visual model according to claim 1, characterized in that: In step S1, when creating the simulated dataset, the abTEM package is used to implement simulated imaging; The parameters set in the abTEM package include: Wave function: The wave function includes a plane wave; and the wave function is transmitted to the image plane through a contrast transfer function; Imaging parameters: The imaging parameters include electron energy, spherical aberration, defocus range, and focal length spread; Image blurring and noise: Gaussian blur is used to blur the boundaries of atoms, and Poisson noise is used to simulate noise in electron microscope images.

9. The material defect detection method based on an unsupervised algorithm visual model according to claim 1, characterized in that: When creating the simulation dataset in step S1, the atomic model includes a normal structure model and a defect structure model; the types of the defect structure model include point defects and line defects.

10. The material defect detection method based on an unsupervised algorithm visual model according to claim 9, characterized in that: Step S3 includes the following specific steps: (I) Image Segmentation and Atomic Localization (II) Defect Quantification Calculate the proportion of defect atoms ω: (III) Calculate the area ratio α of the single-phase region: