Data enhancement method, electronic device and storage medium
By distinguishing high-frequency samples and long-tail samples and image fusion processing on the defect image sample set in semiconductor manufacturing inspection, an extended sample set is generated, which solves the problem of poor detection performance of the detection algorithm model for long-tail samples and improves Assay performance and sample authenticity.
Patent Information
- Application Number
- CN202410738375.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-07
- Publication Date
- 2024-09-24
- Estimated Expiration
- 2044-06-07
AI Technical Summary
In the semiconductor manufacturing inspection process, due to the uneven distribution of the number of samples of defect types, the inspection algorithm model performs poorly on long-tail sample detection. The existing data enhancement methods cannot effectively improve the inspection performance, and there are differences between synthetic samples and real samples. large and underrepresented.
By obtaining the defect image sample set, distinguish it into high-frequency samples and long-tail samples, mark defect areas respectively, combine identification frames, fuse images, perform image repair, generate an initial extended sample set, enhance the number of long-tail samples, and improve detection performance .
Effectively expand the number of long-tail samples, improve the detection performance of the detection algorithm model for defect types with a small number of samples, avoid over-fitting, and enhance sample authenticity.
Smart Images

Figure CN118314061B
Abstract
Description
Technical Field
[0001] The present application generally relates to the field of data processing technology. More specifically, the present application relates to a data enhancement method, an electronic device and a storage medium. Background Art
[0002] At present, in the semiconductor manufacturing inspection process, due to the uneven distribution of the number of samples of each defect type, it is easy to cause the detection algorithm model to perform poorly when detecting defect types with a small number of samples (long-tail samples), which reduces the overall performance of the inspection. The existing technology for this problem mainly uses methods such as oversampling to enhance long-tail samples, but the amount of information generated by the samples is limited, which easily causes the detection model to overfit the training samples and cannot be well generalized to the actual test samples, making it difficult to effectively improve the detection performance. In addition, the existing technology also attempts to use simple image processing methods (such as rotation, cropping, adding noise, etc.) to augment long-tail samples, but the synthesized samples are quite different from the real samples, which easily leads to insufficient representativeness of the detection model training. Furthermore, the data enhancement method of the existing technology focuses on the enrichment of the overall sample set, and does not distinguish the long-tail samples for targeted augmentation. Moreover, in the normal inspection process, high-definition re-judgment and picture taking of good samples will not be saved, but the defect classification scenario relies on high-definition re-judgment pictures, so there is a lack of good samples to generate small samples to augment the long-tail samples.
[0003] In view of this, there is an urgent need to provide a data enhancement method to efficiently expand the sample size of long-tail samples, which is conducive to improving the detection performance of the detection algorithm model when detecting defect types with a small number of samples. Summary of the invention
[0004] In order to at least solve one or more of the technical problems mentioned above, the present application proposes a data enhancement method, an electronic device and a storage medium in multiple aspects. The data enhancement method can efficiently expand the number of samples of long-tail samples, which is conducive to improving the detection performance of the detection algorithm model when detecting defect types with a small number of samples.
[0005] In a first aspect, the present application provides a data enhancement method, comprising:
[0006] Acquire a defect image sample set; divide the image samples in the defect image sample set into high-frequency samples and long-tail samples; respectively mark the detected defects in the high-frequency samples and the long-tail samples to obtain a first defect area identification frame corresponding to each image sample in the high-frequency samples and a second defect area identification frame corresponding to each image sample in the long-tail samples; combine each first defect area identification frame with each second defect area identification frame to obtain a plurality of defect identification frame combinations; based on the plurality of defect identification frame combinations, fuse the defect area image corresponding to each second defect area identification frame into the image sample of the high-frequency sample to obtain an initial extended sample set; perform image restoration on the image fusion area of each extended sample image in the initial extended sample set to obtain a target extended sample set.
[0007] In some embodiments, fusing the defect area image corresponding to each second defect area identification frame into the image sample of the high-frequency sample based on multiple defect identification frame combinations includes: aligning the center points of the second defect area identification frame in the defect identification frame combination with the first defect area identification frame; and pasting the defect area image corresponding to the second defect area identification frame into the image sample of the high-frequency sample.
[0008] In some embodiments, pasting the defect area image corresponding to the second defect area identification box into the image sample of the high-frequency sample includes: superimposing the pixel points of the defect area image corresponding to the second defect area identification box on the pixel points in the first defect area identification box in the image sample of the high-frequency sample.
[0009] In some embodiments, after replacing the pixel points in the first defect area identification frame in the image sample of the high-frequency sample with the pixel points of the defect area image corresponding to the second defect area identification frame, the method also includes: if the superposition generates a foreground and background superposition area, determining the grayscale values of the pixel points in the foreground and background superposition area according to a preset weight; wherein the foreground and background superposition area is the area generated by the superposition of the non-defect background area in the defect area image corresponding to the second defect area identification frame and the background area in the first defect area identification frame in the image sample of the high-frequency sample.
[0010] In some embodiments, determining the grayscale values of pixels in the foreground and background superposition area according to preset weights includes: determining the grayscale values of pixels in the foreground and background superposition area according to 50% of the grayscale values of pixels in the non-defective background area in the defective area image and 50% of the grayscale values of pixels in the background area in the first defective area identification frame.
[0011] In some embodiments, performing image restoration on the image fusion region of each extended sample image in the initial extended sample set includes: performing image restoration on the foreground and background superposition region by using a stable diffusion image restoration algorithm.
[0012] In some embodiments, distinguishing image samples in a defect image sample set into high-frequency samples and long-tail samples includes: determining image samples corresponding to defect types whose sample occupancy ratio is lower than a preset ratio as long-tail samples; wherein the sample occupancy ratio is the ratio of the number of image samples to the total number of samples in the defect image sample set; and determining the remaining image samples in the defect image sample set as high-frequency samples.
[0013] In some embodiments, respectively labeling the detected defects in the high-frequency samples and the long-tail samples includes: respectively labeling the detected defects in the high-frequency samples and the long-tail samples by using a SAM segmentation algorithm.
[0014] In a second aspect, the present application provides an electronic device, comprising: a processor; and a memory, on which a program code for data enhancement is stored, and when the program code is executed by the processor, the electronic device implements the method as described above.
[0015] In a third aspect, the present application provides a non-transitory machine-readable storage medium having stored thereon a program code for data enhancement, and when the program code is executed by a processor, the method as described above can be implemented.
[0016] The technical solution provided by this application may have the following beneficial effects:
[0017] The data enhancement method, electronic device and storage medium provided by the present application obtain a defect image sample set, and then distinguish the image samples in the defect image sample set into high-frequency samples and long-tail samples, and then respectively mark the detected defects in the high-frequency samples and the long-tail samples, and obtain a first defect area identification box corresponding to each image sample in the high-frequency samples and a second defect area identification box corresponding to each image sample in the long-tail samples, so as to extract the features of the high-frequency samples and the long-tail samples.
[0018] Furthermore, the present application can combine each first defect area identification frame and each second defect area identification frame to obtain multiple defect identification frame combinations, and then fuse the defect area image corresponding to each second defect area identification frame into the image sample of the high-frequency sample based on the multiple defect identification frame combinations to obtain the initial extended sample set, thereby effectively expanding the number of samples of long-tail samples, which is beneficial to improving the detection performance of the detection algorithm model when detecting defect types with a small number of samples, and improving the detection accuracy of the detection algorithm model for defect types with a small number of samples. Then, the image fusion area of each extended sample image in the initial extended sample set is repaired to obtain the target extended sample set, which is beneficial to improving the authenticity of the extended sample and effectively avoiding the occurrence of overfitting of the detection algorithm model.
[0019] In general, the present application can efficiently expand the sample size of long-tail samples, which is beneficial to improving the detection performance of the detection algorithm model when detecting defect types with a small number of samples. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] By reading the detailed description below with reference to the accompanying drawings, the above and other purposes, features and advantages of the exemplary embodiments of the present application will become easy to understand. In the accompanying drawings, several embodiments of the present application are shown in an exemplary and non-limiting manner, and the same or corresponding reference numerals represent the same or corresponding parts, wherein:
[0021] Figure 1 An exemplary flow chart of a data enhancement method according to some embodiments of the present application is shown;
[0022] Figure 2 An exemplary flow chart showing a data enhancement method according to some other embodiments of the present application is shown;
[0023] Figure 3 An exemplary flow chart of a data enhancement method according to some further embodiments of the present application is shown;
[0024] Figure 4 A schematic diagram of the structure of an electronic device shown in an embodiment of the present application is shown. DETAILED DESCRIPTION
[0025] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all of the embodiments. For the simplicity and clarity of the description, the figure marks may be repeated in the drawings to indicate corresponding or similar elements when deemed appropriate. In addition, the present application sets forth many specific details in order to provide a thorough understanding of the embodiments described herein. However, it will be understood by those of ordinary skill in the art that the embodiments described herein may be practiced without these specific details. In other cases, well-known methods, processes, and components are not described in detail to avoid blurring the embodiments described herein. Moreover, the description should not be regarded as limiting the scope of the embodiments described herein. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without making creative work are within the scope of protection of the present application.
[0026] It should be understood that the possible terms "first" or "second" etc. in the claims, specifications and drawings disclosed in this application are used to distinguish different objects, rather than to describe a specific order. The terms "include" and "comprise" used in the specification and claims of this application indicate the presence of the described features, wholes, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or their collections.
[0027] It should also be understood that the terms used in this application specification are only for the purpose of describing specific embodiments and are not intended to limit the present application. As used in this application specification and claims, unless the context clearly indicates otherwise, the singular forms of "a", "an" and "the" are intended to include plural forms. It should also be further understood that the term "and / or" used in this application specification and claims refers to any combination of one or more of the associated listed items and all possible combinations, and includes these combinations.
[0028] As used in this specification and claims, the term "if" can be interpreted as "when" or "upon" or "in response to determining" or "in response to detecting," depending on the context. Similarly, the phrases "if it is determined" or "if [described condition or event] is detected" can be interpreted as meaning "upon determination" or "in response to determining" or "upon detection of [described condition or event]" or "in response to detecting [described condition or event]," depending on the context.
[0029] At present, in the semiconductor manufacturing inspection process, due to the uneven distribution of the number of samples of each defect type, it is easy to cause the detection algorithm model to perform poorly when detecting defect types with a small number of samples (long-tail samples), which reduces the overall performance of the inspection. The existing technology for this problem mainly uses methods such as oversampling to enhance long-tail samples, but the amount of information generated by the samples is limited, which easily causes the detection model to overfit the training samples and cannot be well generalized to the actual test samples, making it difficult to effectively improve the detection performance. In addition, the existing technology also attempts to use simple image processing methods (such as rotation, cropping, adding noise, etc.) to augment long-tail samples, but the synthesized samples are quite different from the real samples, which easily leads to insufficient representativeness of the detection model training. Furthermore, the data enhancement method of the existing technology focuses on the enrichment of the overall sample set, and does not distinguish the long-tail samples for targeted augmentation. Moreover, in the normal inspection process, high-definition re-judgment and picture taking of good samples will not be saved, but the defect classification scenario relies on high-definition re-judgment pictures, so there is a lack of good samples to generate small samples to augment the long-tail samples.
[0030] In view of this, there is an urgent need to provide a data enhancement method to efficiently expand the sample size of long-tail samples, which is conducive to improving the detection performance of the detection algorithm model when detecting defect types with a small number of samples.
[0031] The specific implementation of the present application is described in detail below with reference to the accompanying drawings.
[0032] Figure 1 An exemplary flow chart showing the data enhancement method of some embodiments of the present application is shown in Figure 1 , the data enhancement method 100 shown in the embodiment of the present application may include:
[0033] In step S101, a defect image sample set is obtained. In an embodiment of the present application, the aforementioned defect image sample set can be collected by high-definition re-shooting of defective products by an industrial camera, wherein the defective product can be a defective semiconductor device, such as a wafer, etc. It is understandable that the specific types of defective products can be various, such as display screens, etc., and the type of defective products needs to be determined according to the actual application situation, and the present application does not impose any restrictions in this regard. It can also be understood that the methods for obtaining defect image sample sets can be various, and in actual applications, the appropriate acquisition method needs to be determined according to the actual application situation, and the present application does not impose any restrictions.
[0034] In step S102, the image samples in the defect image sample set are divided into high-frequency samples and long-tail samples. In the embodiment of the present application, the high-frequency samples refer to image samples corresponding to defect types with a large number of samples; the long-tail samples refer to image samples corresponding to defect types with a small number of samples.
[0035] In step S103, the detected defects in the high-frequency samples and the long-tail samples are respectively annotated to obtain a first defect region identification frame corresponding to each image sample in the high-frequency samples and a second defect region identification frame corresponding to each image sample in the long-tail samples. In the embodiment of the present application, the detected defects in the high-frequency samples and the long-tail samples can be annotated with target detection frames to accurately identify the regions of the detected defects. The first defect region identification frame and the second defect region identification frame can be the minimum circumscribed rectangle of the detected defects.
[0036] In step S104, each first defect region identification frame and each second defect region identification frame are combined to obtain multiple defect identification frame combinations. In the embodiment of the present application, each first defect region identification frame and each second defect region identification frame can be randomly matched and combined to form multiple defect identification frame combinations.
[0037] In step S105, based on the multiple defect identification frame combinations, the defect area image corresponding to each second defect area identification frame is fused to the image sample of the high-frequency sample to obtain an initial extended sample set. In the embodiment of the present application, the defect area image corresponding to the second defect area identification frame in the defect identification frame combination can be fused to the image sample corresponding to the first defect area identification frame in the current defect identification frame combination, so that a new synthetic sample can be effectively generated by combining the features of the high-frequency sample and the features of the long-tail sample to form an initial extended sample set.
[0038] In step S106, image restoration is performed on the image fusion region of each extended sample image in the initial extended sample set to obtain the target extended sample set. In order to improve the authenticity of each extended sample image in the initial extended sample set, in an embodiment of the present application, image restoration can be performed on the image fusion region of each extended sample image in the initial extended sample set, thereby optimizing the image quality of the image fusion region, improving the authenticity, and effectively avoiding the occurrence of overfitting of the detection algorithm model.
[0039] The present application can obtain a defect image sample set, and then distinguish the image samples in the defect image sample set into high-frequency samples and long-tail samples, and then respectively mark the detected defects in the high-frequency samples and the long-tail samples, and obtain the first defect area identification frame corresponding to each image sample in the high-frequency samples and the second defect area identification frame corresponding to each image sample in the long-tail samples, so as to extract the features of the high-frequency samples and the long-tail samples. Furthermore, the present application can combine each first defect area identification frame and each second defect area identification frame to obtain multiple defect identification frame combinations, and then fuse the defect area image corresponding to each second defect area identification frame into the image sample of the high-frequency sample based on the multiple defect identification frame combinations to obtain the initial extended sample set, so as to effectively expand the number of samples of the long-tail samples, which is conducive to improving the detection performance of the detection algorithm model when detecting defect types with a small number of samples, and improving the detection accuracy of the detection algorithm model for defect types with a small number of samples. Then, the image fusion area of each extended sample image in the initial extended sample set is image repaired to obtain the target extended sample set, which is conducive to improving the authenticity of the extended sample and effectively avoiding the occurrence of overfitting of the detection algorithm model.
[0040] In general, the present application can efficiently expand the sample size of long-tail samples, which is beneficial to improving the detection performance of the detection algorithm model when detecting defect types with a small number of samples.
[0041] In some embodiments, the defect area image corresponding to each second defect area identification frame can be fused into the image sample of the high-frequency sample by superposition. Figure 2The image fusion process is explained in detail. Figure 2 An exemplary flowchart showing the data enhancement method of some other embodiments of the present application is shown in Figure 2 , the data enhancement method 200 shown in the embodiment of the present application may include:
[0042] In step S201, the second defect region identification frame in the defect identification frame combination is aligned with the first defect region identification frame for center point. In the embodiment of the present application, before image fusion is performed, the second defect region identification frame paired in the defect identification frame combination needs to be aligned with the first defect region identification frame for center point, so that the defects in the first defect region identification frame can be covered as much as possible in the subsequent process, so as to avoid the defects in the first defect region identification frame from interfering with the generated sample.
[0043] In step S202, the defect area image corresponding to the second defect area identification frame is pasted into the image sample of the high-frequency sample. In the embodiment of the present application, the pixel points of the defect area image corresponding to the second defect area identification frame can be superimposed on the pixel points in the first defect area identification frame in the image sample of the high-frequency sample. In some application scenarios, if the superposition does not produce a foreground and background superposition area, the pixel points of the defect area image corresponding to the second defect area identification frame can be replaced with the pixel points in the first defect area identification frame in the image sample of the high-frequency sample.
[0044] In step S203, if the superposition generates a foreground and background superposition area, the grayscale value of the pixel point in the foreground and background superposition area is determined according to the preset weight. In the embodiment of the present application, the aforementioned foreground and background superposition area refers to the area generated by the superposition of the non-defective background area in the defective area image corresponding to the second defective area identification frame and the background area in the first defective area identification frame in the image sample of the high-frequency sample. It can be understood that in other application scenarios, assuming that the detected defect corresponding to the second defective area identification frame is an oblique defect, then when the second defective area identification frame is used as its minimum circumscribed rectangle, the second defective area identification frame must include a non-defective background area other than the detected defect. At this time, when the pixel point of the defective area image corresponding to the second defective area identification frame is superimposed on the pixel point in the first defective area identification frame in the image sample of the high-frequency sample, the non-defective background area will be superimposed with the background area in the first defective area identification frame. Thereby generating a foreground and background superposition area.
[0045] In an embodiment of the present application, the preset weight can be set to 50% of the grayscale value of the pixel points in the non-defective background area in the defective area image and the grayscale value of the pixel points in the background area in the first defective area identification frame. Then, for example, if the superposition generates a foreground and background superposition area, the grayscale value of the pixel points in the foreground and background superposition area is determined according to 50% of the grayscale value of the pixel points in the non-defective background area in the defective area image and 50% of the grayscale value of the pixel points in the background area in the first defective area identification frame. This ensures that the fused image maintains a balance between the foreground and background in the foreground and background superposition area.
[0046] For example, the grayscale value of a pixel in the foreground and background superposition area can be calculated according to the following formula:
[0047]
[0048] in, is the gray value of the pixel in the foreground and background superposition area, is the gray value of the pixel in the non-defective background area of the defective area image, is the grayscale value of the pixel points in the background area in the first defect area identification frame. It can be understood that the pixel points in the non-defect background area in the defect area image correspond one-to-one with the pixel points in the background area in the first defect area identification frame. When performing mixed overlay calculation to calculate the grayscale value of the pixel points in the foreground and background overlay areas, the grayscale value of the corresponding pixel points needs to be substituted into the formula for calculation.
[0049] In step S204, image restoration is performed on the image fusion area of each extended sample image in the initial extended sample set. In an embodiment of the present application, image restoration can be performed on the foreground and background superposition area by a stable diffusion image restoration algorithm. Stable diffusion is an image restoration technology that uses existing information in an image to fill in missing or damaged areas. When the present application processes the foreground and background superposition area, the stable diffusion technology can be used to smoothly transition this area to create natural and coherent visual content.
[0050] In some embodiments, high-frequency samples and long-tail samples can be distinguished according to a preset ratio. Figure 3 The formation process of the combination of multiple defect identification frames is described in detail. Figure 3 An exemplary flow chart showing the data enhancement method of some other embodiments of the present application is shown in Figure 3 The data enhancement method 300 shown in the embodiment of the present application may include:
[0051] In step S301, a defect image sample set is obtained. In the embodiment of the present application, the content of step S301 is substantially the same as that of step S101, and will not be described in detail here.
[0052] In step S302, the image samples corresponding to the defect types whose sample occupancy ratio is lower than the preset ratio are determined as long-tail samples, and the remaining image samples in the defect image sample set are determined as high-frequency samples. The aforementioned sample occupancy ratio is the ratio of the number of image samples to the total number of samples in the defect image sample set. In the embodiment of the present application, the preset ratio can be set to 5%, that is, when the sample occupancy ratio is lower than 5%, the image samples corresponding to the defect type corresponding to the sample occupancy ratio are determined as long-tail samples, otherwise, they are determined as high-frequency samples.
[0053] It is understandable that there are various ways to set the preset ratio. In practical applications, the specific value of the preset ratio needs to be determined according to the actual application situation. This application does not impose any restrictions in this regard.
[0054] In step S303, the detected defects in the high-frequency samples and the long-tail samples are respectively annotated by the SAM segmentation algorithm. The aforementioned SAM (Semi-Automatic Masking) segmentation algorithm is a semi-automatic image segmentation method that combines an automated algorithm with manual intervention to improve the accuracy of segmentation. SAM can effectively help annotate samples that are difficult to accurately identify through fully automated methods, thereby segmenting the detected defects for annotation.
[0055] In step S304, each first defect region identification frame and each second defect region identification frame are combined to obtain multiple defect identification frame combinations. In the embodiment of the present application, each first defect region identification frame and each second defect region identification frame can be randomly matched and combined to form multiple defect identification frame combinations.
[0056] Corresponding to the aforementioned application function implementation method embodiment, the present application also provides an electronic device for executing a data enhancement method and a corresponding embodiment.
[0057] Figure 4 FIG. 4 is a block diagram showing a hardware configuration of an electronic device 400 that can implement the data enhancement method of an embodiment of the present application. Figure 4 As shown, the electronic device 400 may include a processor 410 and a memory 420. Figure 4 In the electronic device 400, only the components related to this embodiment are shown. Therefore, it is obvious to those skilled in the art that the electronic device 400 may also include components related to this embodiment. Figure 4 The components shown in the figure are different from the common components. For example: fixed-point arithmetic units.
[0058] The electronic device 400 may correspond to a computing device having various processing functions, for example, a function for generating a neural network, training or learning a neural network, quantizing a floating-point neural network to a fixed-point neural network, or retraining a neural network. For example, the electronic device 400 may be implemented as various types of devices, such as a personal computer (PC), a server device, a mobile device, etc.
[0059] The processor 410 controls all functions of the electronic device 400. For example, the processor 410 controls all functions of the electronic device 400 by executing a program stored in the memory 420 on the electronic device 400. The processor 410 may be implemented by a central processing unit (CPU), a graphics processing unit (GPU), an application processor (AP), an artificial intelligence processor chip (IPU), etc. provided in the electronic device 400. However, the present application is not limited thereto.
[0060] In some embodiments, the processor 410 may include an input / output (I / O) unit 411 and a computing unit 412. The I / O unit 411 may be used to receive various data, such as a defect image sample set. Exemplarily, the computing unit 412 may be used to distinguish image samples in the defect image sample set received via the I / O unit 411 into high-frequency samples and long-tail samples; and then respectively mark the detected defects in the high-frequency samples and the long-tail samples to obtain a first defect region identification frame corresponding to each image sample in the high-frequency samples and a second defect region identification frame corresponding to each image sample in the long-tail samples; combine each first defect region identification frame and each second defect region identification frame to obtain a plurality of defect identification frame combinations; based on the plurality of defect identification frame combinations, fuse the defect region image corresponding to each second defect region identification frame into the image sample of the high-frequency sample to obtain an initial extended sample set; and perform image restoration on the image fusion region of each extended sample image in the initial extended sample set to obtain a target extended sample set. This target extended sample set may be output by the I / O unit 411, for example. The output data may be provided to the memory 420 for being read and used by other devices (not shown), or may be directly provided to other devices for use.
[0061] The memory 420 is hardware for storing various data processed in the electronic device 400. For example, the memory 420 can store processed data and data to be processed in the electronic device 400. The memory 420 can store data sets involved in the data enhancement method process that has been processed or to be processed by the processor 410, for example, a defective image sample set, etc. In addition, the memory 420 can store applications, drivers, etc. to be driven by the electronic device 400. For example: the memory 420 can store various programs related to the data enhancement method to be executed by the processor 410. The memory 420 can be a DRAM, but the present application is not limited thereto. The memory 420 can include at least one of a volatile memory or a non-volatile memory. The non-volatile memory can include a read-only memory (ROM), a programmable ROM (PROM), an electrically programmable ROM (EPROM), an electrically erasable programmable ROM (EEPROM), a flash memory, a phase change RAM (PRAM), a magnetic RAM (MRAM), a resistive RAM (RRAM), a ferroelectric RAM (FRAM), etc. The volatile memory may include dynamic RAM (DRAM), static RAM (SRAM), synchronous DRAM (SDRAM), PRAM, MRAM, RRAM, ferroelectric RAM (FeRAM), etc. In an embodiment, the memory 420 may include at least one of a hard disk drive (HDD), a solid state drive (SSD), a high-density flash memory (CF), a secure digital (SD) card, a micro secure digital (Micro-SD) card, a mini secure digital (Mini-SD) card, an extreme digital (xD) card, caches, or a memory stick.
[0062] In summary, the specific functions implemented by the memory 420 and the processor 410 of the electronic device 400 provided in the implementation mode of this specification can be explained in comparison with the aforementioned implementation modes in this specification, and can achieve the technical effects of the aforementioned implementation modes, and will not be repeated here.
[0063] In this embodiment, the processor 410 may be implemented in any suitable manner. For example, the processor 410 may take the form of a microprocessor or processor and a computer-readable medium storing a computer-readable program code (such as software or firmware) executable by the (micro)processor, a logic gate, a switch, an application specific integrated circuit (ASIC), a programmable logic controller, and an embedded microcontroller, etc.
[0064] It should also be understood that any module, unit, component, server, computer, terminal or device that executes instructions exemplified herein may include or otherwise access computer-readable media, such as storage media, computer storage media or data storage devices (removable and / or non-removable) such as disks, optical disks or tapes. Computer storage media may include volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information, such as computer-readable instructions, data structures, program modules or other data.
[0065] Although multiple embodiments of the present application have been shown and described herein, it is obvious to those skilled in the art that such embodiments are provided only by way of example. Those skilled in the art can think of many changes, modifications and alternatives without departing from the thought and spirit of the present application. It should be understood that in the process of practicing the present application, various alternatives to the embodiments of the present application described herein can be adopted. The attached claims are intended to limit the scope of protection of the present application, and therefore cover equivalents or alternatives within the scope of these claims.
Claims
1. A data enhancement method, characterized in that: include: Obtain a defect image sample set; Distinguishing the image samples in the defect image sample set into high-frequency samples and long-tail samples; Respectively marking the detected defects in the high-frequency samples and the long-tail samples to obtain a first defect region identification frame corresponding to each image sample in the high-frequency samples and a second defect region identification frame corresponding to each image sample in the long-tail samples; Combining each first defect area identification frame and each second defect area identification frame to obtain a plurality of defect identification frame combinations; Based on the combination of the plurality of defect identification frames, the defect area image corresponding to each second defect area identification frame is fused into the image sample of the high-frequency sample to obtain an initial extended sample set; Image restoration is performed on the image fusion region of each extended sample image in the initial extended sample set to obtain a target extended sample set.
2. The data enhancement method according to claim 1, characterized in that The step of fusing the defect area image corresponding to each second defect area identification frame into the image sample of the high-frequency sample based on the combination of the plurality of defect identification frames comprises: Aligning the center points of the second defect area identification frame and the first defect area identification frame in the defect identification frame combination; Paste the defect area image corresponding to the second defect area identification frame into the image sample of the high-frequency sample.
3. The data enhancement method according to claim 2, characterized in that: The step of pasting the defect area image corresponding to the second defect area identification frame to the image sample of the high-frequency sample comprises: The pixel points of the defect area image corresponding to the second defect area identification frame are superimposed on the pixel points in the first defect area identification frame in the image sample of the high-frequency sample.
4. The data enhancement method according to claim 3, characterized in that: After superimposing the pixel points of the defect area image corresponding to the second defect area identification frame on the pixel points in the first defect area identification frame in the image sample of the high-frequency sample, the method further includes: If the superposition generates a foreground and background superposition area, determining the grayscale value of the pixel points in the foreground and background superposition area according to a preset weight; The foreground and background superposition area is an area generated by superimposing a non-defective background area in the defective area image corresponding to the second defective area identification frame and a background area in the first defective area identification frame in the image sample of the high-frequency sample.
5. The data enhancement method according to claim 4, characterized in that: Determining the grayscale value of the pixel point in the foreground and background superposition area according to the preset weight includes: The grayscale values of the pixels in the foreground and background superposition area are determined according to 50% of the grayscale values of the pixels in the non-defective background area in the defective area image and 50% of the grayscale values of the pixels in the background area in the first defective area identification frame.
6. The data enhancement method according to claim 4, characterized in that: The performing image restoration on the image fusion area of each extended sample image in the initial extended sample set comprises: The image is repaired in the foreground and background superposition area by using a stable diffusion image repair algorithm.
7. The data enhancement method according to claim 1, characterized in that: The step of distinguishing the image samples in the defect image sample set into high-frequency samples and long-tail samples comprises: Determine the image samples corresponding to the defect types whose sample occupancy ratio is lower than a preset ratio as the long-tail samples; wherein the sample occupancy ratio is the ratio of the number of image samples to the total number of samples in the defect image sample set; and The remaining image samples in the defective image sample set are determined as the high-frequency samples.
8. The data enhancement method according to claim 1, characterized in that: The marking of the detected defects in the high-frequency samples and the long-tail samples respectively includes: The detected defects in the high-frequency samples and the long-tail samples are respectively marked by the SAM segmentation algorithm.
9. An electronic device, characterized in that: include: processor; as well as A memory having a program code for data enhancement stored therein, wherein when the program code is executed by the processor, the electronic device implements the method as claimed in any one of claims 1 to 8.
10. A non-transitory machine-readable storage medium having a program code for data enhancement stored thereon, wherein when the program code is executed by a processor, the method according to any one of claims 1 to 8 is implemented.
