WO2025254298A1 - 불량 제품 이미지를 생성하고, 비전 검사를 위해 라벨링하는 전자장치 및 방법 - Google Patents
불량 제품 이미지를 생성하고, 비전 검사를 위해 라벨링하는 전자장치 및 방법Info
- Publication number
- WO2025254298A1 WO2025254298A1 PCT/KR2025/002330 KR2025002330W WO2025254298A1 WO 2025254298 A1 WO2025254298 A1 WO 2025254298A1 KR 2025002330 W KR2025002330 W KR 2025002330W WO 2025254298 A1 WO2025254298 A1 WO 2025254298A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- image
- defective product
- defect
- information
- electronic device
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/0002—Inspection of images, e.g. flaw detection
- G06T7/0004—Industrial image inspection
- G06T7/001—Industrial image inspection using an image reference approach
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
- G06T7/11—Region-based segmentation
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/70—Determining position or orientation of objects or cameras
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/70—Arrangements for image or video recognition or understanding using pattern recognition or machine learning
- G06V10/82—Arrangements for image or video recognition or understanding using pattern recognition or machine learning using neural networks
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/70—Arrangements for image or video recognition or understanding using pattern recognition or machine learning
- G06V10/86—Arrangements for image or video recognition or understanding using pattern recognition or machine learning using syntactic or structural representations of the image or video pattern, e.g. symbolic string recognition; using graph matching
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V20/00—Scenes; Scene-specific elements
- G06V20/70—Labelling scene content, e.g. deriving syntactic or semantic representations
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/20—Special algorithmic details
- G06T2207/20081—Training; Learning
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/20—Special algorithmic details
- G06T2207/20084—Artificial neural networks [ANN]
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/30—Subject of image; Context of image processing
- G06T2207/30108—Industrial image inspection
- G06T2207/30164—Workpiece; Machine component
Definitions
- the present invention relates to an electronic device and method for generating an image of a defective product and labeling it for vision inspection.
- a smart factory is a manufacturing system that operates by applying Information and Communications Technology (ICT) combined with digital automation solutions throughout the production process, from design and development to manufacturing.
- ICT Information and Communications Technology
- vision inspection detects product defects during the manufacturing process.
- a vision inspection model trained to determine product defects using images of both normal and defective products must first be developed. The vision inspection model then determines whether a product is pass or fail based on images captured by cameras installed on the manufacturing line.
- the model is created based on a limited number of defective cases, and the model is retrained and improved whenever an undetected defective product occurs.
- An object of the present invention is to provide an electronic device and method for labeling defective product images for more efficiently learning a vision inspection model.
- An object of the present invention is to provide an electronic device and method for generating defective product images and performing vision inspection using the images in order to train a higher-performance vision inspection model.
- An object of the present invention is to provide an electronic device and method for generating defective product images more diversely and randomly.
- An object of the present invention is to provide an electronic device and method for generating a defective product image not only for the appearance of the product but also for a failure type in which the product is damaged and its internal structure is exposed.
- a processor may be included that inputs defect information consisting of text and images indicating defects that may occur in a product into an image generation model constructed to generate a defective product image, obtains a defective product image including a defect corresponding to the defect information through the image generation model, identifies labeling information including a defect location and a defect type of the obtained defective product image based on the defect information, and stores the defective product image by matching it with the labeling information.
- the above processor can generate the defect information using a plurality of predefined defect types and text corresponding to each of the defect types.
- the above processor can quantify the characteristics of each of a plurality of defective product images generated based on the same defect information through an image analysis library, determine a normal distribution according to the quantification, and label the generated defective product image if the numerical value for the characteristic of the defective product image generated based on the same defect information as the defect information is included in the normal distribution.
- the above processor can store defective product images that deviate from the normal distribution by matching them with new labeling information.
- the processor may acquire a learning data set including an external structure image of a normal product and first prompt information corresponding to the external structure image, an internal structure image of a normal product and second prompt information corresponding to the internal structure image, and a defective product test image and third prompt information corresponding to the defective product test image, and may build the image generation model by applying a feature model generated based on the learning data set to a base model trained to generate a defective product image.
- the above feature model may be a Low-Rank Adaptation (LoRA) model that fine-tunes the base model so that the defective product image corresponds to the product.
- LoRA Low-Rank Adaptation
- the above defect information may further include text describing features to be excluded from the defective product image.
- the above processor can receive defect information including a masking image indicating a defect that may occur in the product.
- the processor can adjust the external structure image, the internal structure image, and the defective product test image to each include a target area, and generate the feature model using the adjusted images.
- the processor can input defect information including the adjusted internal structure image into the image generation model to obtain an adjusted defective product image, and can generate a defective product image by combining the adjusted defective product image and the remaining area of the internal structure image excluding the target area.
- the above processor can filter the acquired defective product image based on whether the degree of defect exceeds a threshold by comparing the acquired defective product image with an external structural image or an internal structural image of the product.
- a method for generating labeling information of a defective product image performed by an electronic device may include the steps of: inputting defect information consisting of text and images indicating defects that may occur in a product into an image generation model constructed to generate a defective product image; obtaining a defective product image including a defect corresponding to the defect information through the image generation model; identifying labeling information including a defect location and a defect type of the obtained defective product image based on the defect information; and storing the defective product image by matching it with the labeling information.
- the quality of generated defective product images be improved, but also the consistency of labeling information of defective product images can be improved, thereby improving the performance of a vision inspection model.
- the biased performance of existing vision inspection models can be dramatically improved by generating a variety of defective product images. Furthermore, by utilizing a generative model, defective product images can be extracted at a very high productivity rate, with quality nearly identical to actual images. Ultimately, this can shorten the development time of vision inspection models and enhance their performance.
- FIG. 1 is a schematic diagram illustrating an electronic device according to one embodiment of the present invention.
- FIG. 2 is a block diagram illustrating the configuration of an electronic device according to one embodiment of the present invention.
- FIG. 3 is a diagram illustrating an operation flow chart of an electronic device according to one embodiment of the present invention.
- FIG. 4 is a drawing illustrating a construction of a feature model according to one embodiment of the present invention.
- FIG. 5 is a drawing showing an external structural image and an internal structural image of a normal product according to one embodiment of the present invention.
- FIG. 6 is a drawing illustrating a defective product image generation operation of an electronic device according to a first embodiment of the present invention.
- FIG. 7 is a drawing illustrating a defective product image generation operation of an electronic device according to a second embodiment of the present invention.
- FIG. 8 is a drawing illustrating a defective product image generation operation of an electronic device according to a third embodiment of the present invention.
- FIG. 1 is a schematic diagram illustrating an electronic device according to one embodiment of the present invention.
- An electronic device (100) is a device that generates an image of a defective product and labels it for vision inspection, and can be implemented as a computer, server, laptop, smart phone, tablet PC, smart pad, etc.
- An electronic device (100) can build an image generation model (20) using defect information (10) used to generate a defective product image, and obtain a defective product image (31) from the built image generation model (20).
- Labeling information means specific information about where the defect occurred and what type of defect it is in each generated defective product image (31), and the included content and format are not limited to any one.
- the electronic device (100) can sufficiently obtain defective product images (31) and normal product images (40) and build a vision inspection model (50) with balanced proportions.
- the electronic device (100) can input the product's appearance image (60) obtained from the process line into a vision inspection model (50) to inspect good or defective products and obtain inspection information (70).
- the electronic device (100) of the present invention can perform all of the following: constructing an image generation model (20) for generating a defective product image (31), generating a defective product image (31) using the image generation model (20), matching labeling information to the defective product image (31), constructing a vision inspection model (50) using the defective product image (31) and a normal product image (40), and performing product inspection using the vision inspection model (50).
- a plurality of electronic devices (100) may be separately provided to individually or selectively perform the operations listed above, and are not limited to any one of them.
- the current vision inspection model suffers from performance issues due to the imbalance in training data between normal and defective product images. Furthermore, the labeling process for defective product images to be used in the vision inspection model is cumbersome, requiring manual labeling.
- a method for generating various defective product images is proposed to improve the biased performance of a vision inspection model, and at this time, a defective product image including a defect occurring in the product's external appearance as well as a defective product image including a defect occurring in the product's internal structure is proposed to be implemented.
- the present invention proposes a method for automatically labeling generated defective product images so that they can be easily used as training data for a vision inspection model. Subsequently, a method for building and utilizing a vision inspection model using defective product images is proposed.
- the present invention can expand the defect range of a defective product image and further increase the applicability of a vision inspection model using the same.
- FIG. 2 is a block diagram illustrating the configuration of an electronic device according to one embodiment of the present invention.
- An electronic device (100) may include an input unit (110), a communication unit (120), a display unit (130), a storage unit (140), and a processor (150).
- the input unit (110) generates input data in response to user input of the electronic device (100).
- the user input may be a user input that initiates the operation of the electronic device (100), a user input required to build an image generation model and a vision inspection model, a user input that inputs defect information, a user input that sets a target area, etc.
- the user input may be applied without limitation if it is required to generate a defective product image, match label information, or perform vision inspection.
- the input unit (110) includes at least one input means.
- the input unit (110) may include a keyboard, a key pad, a dome switch, a touch panel, a touch key, a mouse, a menu button, etc.
- the communication unit (120) can perform communication with an external device such as a server to transmit and receive defect information, an external structure image of a normal product, an internal structure image of a normal product, a test image of a defective product, prompt information corresponding to each image, labeling information, inspection information, etc.
- an external device such as a server to transmit and receive defect information, an external structure image of a normal product, an internal structure image of a normal product, a test image of a defective product, prompt information corresponding to each image, labeling information, inspection information, etc.
- the communication unit (120) can perform wireless communication such as 5G (5th generation communication), LTE-A (long term evolution-advanced), LTE (long term evolution), Wi-Fi (wireless fidelity), Bluetooth, or wired communication such as LAN (local area network), WAN (Wide Area Network), and power line communication.
- wireless communication such as 5G (5th generation communication), LTE-A (long term evolution-advanced), LTE (long term evolution), Wi-Fi (wireless fidelity), Bluetooth, or wired communication such as LAN (local area network), WAN (Wide Area Network), and power line communication.
- the display unit (130) displays display data according to the operation of the electronic device (100).
- the display unit (130) may display a screen that displays the process of generating a defective product image, a screen that displays the generated defective product image, a screen that matches a label to the generated defective product image, a screen that performs a vision inspection, a screen that receives user input, etc.
- the display unit (130) includes a liquid crystal display (LCD), a light emitting diode (LED) display, an organic light emitting diode (OLED) display, a micro electro mechanical systems (MEMS) display, and an electronic paper display.
- the display unit (130) may be implemented as a touch screen by being combined with the input unit (110).
- the storage unit (140) stores the operation programs of the electronic device (100).
- the storage unit (140) includes non-volatile storage that can preserve data (information) regardless of whether power is supplied, and volatile memory that cannot preserve data if power is not supplied and into which data to be processed by the processor (150) is loaded.
- the storage includes flash memory, hard-disc drive (HDD), solid-state drive (SSD), read-only memory (ROM), etc., and the memory includes buffer, random access memory (RAM), etc.
- the storage unit (140) can store defect information (10), an image generation model (20), a defective product image (31), labeling information (32), a normal product image (40), a vision inspection model (50), a product image (60), inspection information (70), etc.
- the storage unit (140) can store operation programs, etc. required in the process of constructing an image generation model (20), creating a defective product image (31) using the image generation model (20), matching labeling information (32) to the defective product image (31), constructing a vision inspection model (50), and inspecting a product using the vision inspection model (50).
- the processor (150) can control at least one other component (e.g., hardware or software component) of the electronic device (100) by executing software such as a program, and can perform various data processing or operations.
- component e.g., hardware or software component
- the processor (150) can control at least one other component (e.g., hardware or software component) of the electronic device (100) by executing software such as a program, and can perform various data processing or operations.
- a processor (150) inputs defect information consisting of text and images indicating defects that may occur in a product into an image generation model constructed to generate a defective product image, obtains a defective product image including a defect corresponding to the defect information through the image generation model, identifies labeling information including a defect location and a defect type of the obtained defective product image based on the defect information, and stores the defective product image by matching it with the labeling information.
- a processor (150) can generate a vision inspection model that inspects whether a product is defective by using defective product images obtained from an image generation model, labeling information regarding defects included in the defective product images, and normal product images.
- the processor (150) may construct at least one of an image generation model and a vision inspection model, or may receive and store a previously constructed image generation model and a vision inspection model from the outside and use them, but is not limited to either one.
- the processor (150) may perform at least a portion of the data analysis, processing, and result information generation for performing the above operations using at least one of a machine learning, neural network, or deep learning algorithm as a rule-based or artificial intelligence (AI) algorithm.
- a machine learning, neural network, or deep learning algorithm as a rule-based or artificial intelligence (AI) algorithm.
- AI artificial intelligence
- the neural network may include models such as a CNN (Convolutional Neural Network), a DNN (Deep Neural Network), and an RNN (Recurrent Neural Network).
- FIG. 3 is a diagram illustrating an operation flow chart of an electronic device according to one embodiment of the present invention.
- a processor (150) can input defect information consisting of text and images indicating defects that may occur in a product into an image generation model constructed to generate a defective product image (S10).
- Defective product images refer to product images created to include external defects such as scratches, breaks, and dents on the product.
- the image generation model of the present invention is a generative artificial intelligence model. It can be constructed by applying a feature model implemented to fine-tune the features of a base model trained to generate defective product images to the base model. The process of constructing the image generation model is described with reference to FIG. 4.
- Defect information is the information required to create a defective product image.
- Defect information may include text describing potential defects in a product, particularly text related to the location of the defect and text describing the defect itself (hereinafter referred to as "first text"), text describing features to be excluded from the defective product image (hereinafter referred to as "second text"), a normal product image, a masking image displaying potential defects in the product, and more.
- text related to the location of a defect may be, for example, "Plastic Texture,” “Inner Structure,” “Under Cover,” “Cover,” etc.
- Text describing the defect itself may be, for example, “stained,” “crack,” “failure,” “dent,” “leakage,” “damaged,” “broken,” “open,” etc.
- the text related to the location of a product defect and the text indicating the defect itself may be combined and entered, for example, "Open Inner Structure.”
- various other applications may be applied, and the content or expression format included in the first text is not limited to any one.
- the second text is text that indicates features to be excluded from the defective product image, and may include, for example, “clean”, “clear”, “pass”, “normal”, etc.
- the first text and the second text can be input in the form of a prompt, and the processor (150) can apply the defect information with an appropriate weight.
- the processor (150) can generate defect information using a plurality of predefined defect types and text corresponding to each defect type. This can be achieved by pre-defining the defect types and corresponding texts through Prompt Engineering development, thereby establishing the relationship between the defect types and text. This prevents the problem of unfamiliar images intermingling with the overall direction of defective product image generation, which is characteristic of generative AI technology.
- the types of defects may include surface scratches, surface marks, surface contamination, cover damage (medium), cover damage (small), foreign substances, etc., and the types or number of defects are not limited to any one.
- the text corresponding to a surface scratch might be "(abnormal surface, Damaged):1.0, Scratched:1.2, stained:0.1, broken:0.8".
- the text corresponding to a surface dent might be "(abnormal surface, Damaged):1.0, Scratched:0.3, punched:1.5, stained:0.1, broken:0.8".
- the text corresponding to surface contamination might be "stained:1.1, dirty:1.0".
- the text corresponding to cover damage (medium) might be "(abnormal surface, Damaged):1.3, Scratched:1.5, punched:0.6, broken:1.3, cutting off cover:1.5”.
- the text corresponding to cover damage (small) might be "(abnormal surface, Damaged):1, Scratched:1.0, punched:0.3, broken:1.3, cutting off cover:1.0".
- the text corresponding to foreign matter might be "(abnormal surface):1.0, Scratched:0.1, punched:0.1, foreign matter contamination:1.0".
- the number following each text represents the weighting factor applied when inputting defect information into the image generation model, and is typically expressed as a decimal number between 0 and 2.
- the actual application of these weighting factors varies depending on the conditions under which the base model and feature model are trained, so it's important to develop appropriate numbers and the desired generation level in advance.
- Text-based defect information can include additional product information.
- defect information can include terms such as "circuit braker" or "MCCB.”
- a normal product image can serve as base information for the image generation model to reference when generating a defective product image.
- the processor (150) can input a normal product image—i.e., an external structural image or an internal structural image—into the image generation model and acquire a defective product image based on the input (IMG2IMG function).
- the normal product image can utilize one or more of the normal product test images used to form the feature model.
- the processor (150) can receive defect information including a masking image indicating a defect that may occur in a product.
- the processor (150) can obtain a defective product image by using an inpaint function that masks a normal product image so that a defect is generated only in a specific area.
- a masking image is an image that indicates a defect in a specific area
- the processor (150) can use the inpaint function to change only a specific area of a normal product image into a masking image.
- the inpaint function it is more efficient when generating an image to intensively improve types that were not detected by an existing image model or were over-detected as defects when they were not.
- a processor (150) can obtain a defective product image including a defect corresponding to defect information through an image generation model (S20).
- generative models based on denoising techniques are advantageous for generating defects from normal product images, demonstrating superior image quality and image generation efficiency. Therefore, while the present invention is described based on examples generated using a generative model based on denoising techniques, the same invention structure can be utilized even if more advanced solutions emerge in the future.
- a processor (150) can identify labeling information including a defective location and defective type of a defective product image acquired based on defect information (S30).
- multiple defects may exist within a single defective product image generated based on defect information.
- the multiple defects may include multiple occurrences of the same defect type or at least one occurrence of multiple defect types.
- the processor (150) may identify multiple labeling information pieces including multiple defect locations and at least one defect type based on the defect information. When multiple labeling information pieces are identified, the processor (150) may assign weights to each defect type based on the size of the defect, the importance of the defect type, etc.
- the processor (150) can identify the file name of the labeling information based on the hyper parameters required for generating a defective product image, or the storage path and file name of the defective product image to be generated.
- the processor (150) can directly obtain information regarding the type and location of defects included in the labeling information from masking images or prompt information.
- the processor (150) can obtain labeling information by defining the file name of the defective product image to contain information about the type and location of the defect (e.g., location_type.jpg) and then reading the file name.
- a processor (150) can store a defective product image by matching it with labeling information (S40).
- the processor (150) can insert labeling information into the metadata of a defective product image and match it.
- various matching methods for defective product images and labeling information can be employed, and are not limited to any one.
- the biased performance of existing vision inspection models can be dramatically improved by generating a variety of defective product images. Furthermore, by utilizing a generative model, defective product images can be extracted at a very high productivity rate, with quality nearly identical to actual images. Ultimately, this can shorten the development time of vision inspection models and enhance their performance.
- FIG. 4 is a drawing illustrating a construction of a feature model according to one embodiment of the present invention.
- FIG. 4 is a diagram illustrating the construction of an image generation model according to one embodiment of the present invention.
- FIG. 4 illustrates the construction of an image generation model, as described in relation to S10 of FIG. 3.
- the processor (150) can obtain a learning data set (421) including an external structure image of a normal product and first prompt information corresponding to the external structure image, an internal structure image of a normal product and second prompt information corresponding to the internal structure image, and a defective product test image and third prompt information corresponding to the defective product test image.
- An external structural image of a normal product refers to an image of the product's exterior
- an internal structural image refers to an image that allows for the internal structure of the product to be seen.
- an internal structural image could be an image of a normal product with its cover removed.
- an internal structural image can be an image taken during the manufacturing process, or it can be sufficient if it allows for at least a portion of the product's interior to be seen.
- Prompt information represents each image and can be constructed by matching each image.
- Each image and prompt information can be acquired externally or generated through user input that inputs prompt information corresponding to each image.
- the acquisition path or method is not limited to any one.
- first prompt information such as "Circuit breaker” (product name), "Plastic texture,” “Outer structure,” etc.
- second prompt information such as "Circuit breaker” (product name), "Plastic texture,” “Inner structure,” etc.
- third prompt information such as "Circuit breaker” (product name), "Plastic texture,” “stained,” “crack,” etc.
- a processor (150) can build an image generation model (430) by applying a feature model (420) generated based on a learning data set (421) to a previously built base model (410).
- the base model (410) can be selected as a model that well reflects the characteristics of the target product. Since this model varies depending on the field and product conditions, it is recommended that a field expert conduct testing to select the appropriate model.
- the base model (410) may be Stable Diffusion, a denoising technique-based model.
- the base model may include the v1.5 pruned-emaonly.safetensor model.
- an image generation model (430) can be built by adding a feature model (420) to a base model (410).
- the feature model (420) can be, for example, a Low-Rank Adaptation (LoRA) model. Even if the number of defective product test images is not large when generating a LoRA model, it is not a major problem because the base model (410) has a lot of defect information about the defect type.
- LoRA Low-Rank Adaptation
- the processor (150) can set defect information and hyperparameters.
- Hyperparameters are variables that directly affect the image generation quality, and a process of finding optimal values through repeated execution is required.
- the feature model (420) can learn about not only the external structure of a normal product but also its internal structure using the previously constructed learning data set (421). Therefore, the image generation model (430) constructed using this feature model (420) can easily generate images of defective products even when the internal structure of the product is visible during the defect generation process.
- FIG. 5 is a drawing showing an external structural image and an internal structural image of a normal product according to one embodiment of the present invention.
- the left image of Fig. 5 is an external structural image (510) of a normal product
- the right image is an internal structural image (520) of a normal product with the cover removed. If a request is made to generate a defective product image with a visible defect in the internal structure, a feature model trained solely on the external structural image (510) will have difficulty generating a suitable defective product image because it cannot properly represent the internal structure of the product.
- FIG. 6 is a drawing illustrating a defective product image generation operation of an electronic device according to a first embodiment of the present invention.
- FIG. 6 illustrates a process for generating a defective product image, as described in relation to S10 and S20 of FIG. 3.
- FIG. 6 also illustrates a process for identifying labeling information, as described in relation to S30 of FIG. 3.
- the processor (150) can input defect information including a normal product image (611), a masking image (612), a first text (620), and a second text (630) into an image generation model (430) that applies a feature model (420) to a base model (410) to generate a defective product image (640).
- the processor (150) can identify defect location information from the masking image (612) and identify defect type information from the first text (620) and the second text (630). Accordingly, the processor (150) can obtain labeling information (650) including defect location information and defect type information corresponding to the generated defective product image (640).
- the present invention enables the generation of various types of defective product images by adding a set of internal structure images.
- defective product images can be generated for types where defects occur only in the external structure without revealing the internal structure, types where defects occur only in the external structure with the internal structure revealed, and types where defects occur in both the internal and external structures with the internal structure revealed.
- a first text (620) including "Circuit breaker, Plastic Texture, Broken, Damaged” and a second text (630) including "Open Inner Structure, heavy damaged cover” can be input.
- a first text (620) including "Circuit breaker, Plastic Texture, Broken, Damaged, heavy damaged cover, Open Inner Structure, Clean Inner Structure” and a second text (630) including "Damaged Inner Structure” may be input.
- the defective product image (640) illustrated in FIG. 6 may include a defect in which a portion of the surface paint of the product is peeled off and the inner structure is visible.
- a first text (620) including "Circuit breaker, Plastic Texture, Broken, Damaged, heavy damaged cover, Open Inner Structure, Damaged Inner Structure” and a second text (630) including "Clean Inner Structure” can be input.
- the processor (150) may input a normal product image (611) corresponding to the defective product image to be generated. For example, if the defective product image to be generated includes a defect occurring in the external structure, the processor (150) may input defect information including the external structure image into the image generation model. Conversely, if the defective product image to be generated includes a defect while showing the internal structure, the processor (150) may input defect information including the internal structure image into the image generation model.
- the processor (150) can input a masking image (612) showing defects that may occur in the product along with a normal product image (611).
- the scope of defective product images can be expanded by generating defective product images that are related to the internal structure of the product and include defects.
- defect inspection can be applied even when the inside of a product is visible while the outside of the product is damaged, thereby further improving the performance of a vision inspection model.
- FIG. 7 is a drawing illustrating a defective product image generation operation of an electronic device according to a second embodiment of the present invention.
- Fig. 7 proposes a method for conserving computing resources by adjusting the normal product image.
- the processor (150) can adjust the learning data set (710) to include a target area.
- the target area refers to an area where defects are primarily determined to occur in a product, and can be set as coordinates within an image, etc.
- the adjusting technique can be, for example, cropping the test image of the learning data set (710) so that only the target area remains, and any other technique used to extract the target area can be applied without limitation.
- the processor (150) can generate a feature model using an adjusted learning data set (720) including an external structure image/internal structure image of an adjusted normal product and an adjusted defective product test image.
- the processor (150) can build an image generation model (430) by using the adjusted learning data set (720) as learning images.
- the learning speed can be increased by reducing the resources required for learning, such as GPU memory, by half.
- the processor (150) can adjust the normal product image (730) to be included in the defect information to include the same target area as the adjusted learning data set (720).
- the processor (150) can input defect information including an adjusted normal product image (730) into the image generation model (430) to obtain an adjusted defective product image (770).
- the processor (150) can input defect information including a first text (740) and a second text (750) into the image generation model (430) in addition to the adjusted normal product image (730) to generate an adjusted defective product image (770).
- the processor (150) can similarly set defect information and hyper parameters, and can generate an adjusted defective product image (770) through inpaint settings.
- the processor (150) can generate a final defective product image (790) by combining the remaining area (780) excluding the target area of the normal product image with the adjusted defective product image (770). At this time, the processor (150) can store the remaining area (780) when generating the adjusted normal product image (730).
- FIG. 8 is a drawing illustrating a defective product image generation operation of an electronic device according to a third embodiment of the present invention.
- a method is proposed for selecting meaningful images from among generated defective product images and generating labeling information for the selected images to be used in building a vision inspection model.
- the processor (150) can create a vision inspection model that inspects whether a product is defective by using defective product images obtained from an image generation model, labeling information about defects included in the defective product images, and normal product images.
- the processor (150) can adjust a normal product image (810) into a target area (811) and a remaining area (812), and obtain a defective product image (820) using the target area (811) as an input image.
- the processor (150) can generate a final defective product image (840) by combining the defective product image (820) with the remaining area (812).
- the processor (150) can generate the defective product image (820) through an inpaint function using a masking image (830).
- the processor (150) can filter the acquired defective product image (840) by comparing the normal product image (810) with the acquired defective product image (840) depending on whether the degree of defect exceeds a threshold. That is, if there is no significant difference in the defective generated portion compared to the original, the defective product image can be excluded from the results.
- the image analysis library used to quantify the image characteristics of defective product images may be the HOG (Histogram of Oriented Gradient) library in Python OpenCV.
- HOG Histogram of Oriented Gradient
- this library is not limited to this library, and other image analysis libraries such as SIFT (Scale Invariant Feature Transform), Haar feature, and Ferns can also be utilized.
- the processor (150) labels defective images within a normal distribution using the corresponding defect information based on numerical information of a plurality of defective product images generated based on the same defect information, and stores defective product images that deviate from the normal distribution (have outliers) by matching them with new labeling information.
- the processor (150) can numerically analyze multiple defective product images generated based on the same defect information and, if they deviate from this, label a new label as another type.
- the processor (150) can generate a vision inspection model that inspects whether a product is defective by using defective product images obtained from an image generation model, labeling information about defects included in the defective product images, and normal product images.
- the quality of generated defective product images be improved, but also the consistency of labeling information of defective product images can be improved, thereby improving the performance of a vision inspection model.
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Multimedia (AREA)
- Evolutionary Computation (AREA)
- Databases & Information Systems (AREA)
- Computing Systems (AREA)
- Artificial Intelligence (AREA)
- General Health & Medical Sciences (AREA)
- Medical Informatics (AREA)
- Software Systems (AREA)
- Health & Medical Sciences (AREA)
- Computational Linguistics (AREA)
- Quality & Reliability (AREA)
- Image Analysis (AREA)
- Image Processing (AREA)
Abstract
본 발명의 일 실시예에 따른 전자장치에 있어서, 불량 제품 이미지를 생성하도록 구축된 이미지 생성 모델에 제품에 발생 가능한 결함을 나타내는 텍스트 및 이미지로 이루어진 결함 정보를 입력하고, 상기 이미지 생성 모델을 통해 상기 결함 정보에 대응하는 결함을 포함하는 불량 제품 이미지를 획득하고, 상기 결함 정보에 기초하여 상기 획득한 불량 제품 이미지의 불량 위치 및 불량 유형을 포함하는 라벨링 정보를 식별하고, 상기 불량 제품 이미지를 상기 라벨링 정보와 매칭하여 저장하는 프로세서를 포함할 수 있다.
Description
본 발명은 불량 제품 이미지를 생성하고, 비전 검사를 위해 라벨링하는 전자장치 및 방법에 관한 것이다.
최근 사물인터넷(Internet Of Things, IOT), 인공지능(Artificial Intelligence, AI) 등 관련 기술의 발달에 따라, 스마트 팩토리(smart factory)가 화제가 되고 있다. 스마트 팩토리는 설계, 개발, 제조 등 생산 과정에 디지털 자동화 솔루션이 결합된 정보통신기술(Information and Communications Technology, ICT)을 적용하여 운영되는 제조 시스템을 통칭한다.
스마트 팩토리와 관련된 기술 중 하나로, 공정 과정에서 제품의 불량 여부를 검사하는 비전 검사가 있다. 비전 검사를 수행하기 위해서는 먼저 정상 제품 이미지와 불량 제품 이미지를 가지고 제품의 불량 여부를 판정하도록 학습된 비전 검사용 모델의 개발이 선행되어야 한다. 이후, 제조 라인에 설치된 카메라가 찍은 이미지를 기반으로 비전 검사용 모델이 제품의 양/불 판정을 하게 된다.
그러나, 제조업 생산라인의 출하 시 양품과 불량품의 비율을 고려하면, 압도적으로 양품이 많다. 이로 인해 비전 검사용 모델의 학습을 위한 데이터가 양품에 치우쳐 모델의 불량품 검출 성능이 떨어질 수밖에 없다.
현재로서는 부족한 불량 사례를 기반으로 모델을 생성하고, 검출이 되지 않은 불량품이 발생할 때마다 모델을 재학습하여 개선시키는 형태로 운영되고 있다.
이는 비효율적이고, 자동 비전 검사 솔루션을 도입하는 의미가 퇴색되는 바, 비전 검사용 모델의 학습을 위한 불량 제품 이미지의 확보 방안이 필요하다.
한편, 창의적이고 다양한 불량 제품 이미지를 생성하는데 성공하더라도, 이를 비전 검사용 모델에 활용하기 위해서는 각 불량 제품 이미지에서 불량이 어디에 발생하였는지, 어떤 유형의 불량인지에 대한 구체적인 정보가 필요한데, 이 정보를 만드는 작업을 라벨링(labeling)이라고 한다.
비전 검사용 모델 개발을 위해 개발자는 이미지별로 일일이 라벨링을 수행해야 하며, 이를 자동화하고 효율화하기 위한 많은 기법들이 있음에도 불구하고, 라벨링 작업은 여전히 모델 개발에 드는 리소스 중 큰 부분을 차지한다.
본 발명의 목적은 보다 효율적으로 비전 검사용 모델의 학습을 위한 불량 제품 이미지를 라벨링하는 전자장치 및 방법을 제공하는 것이다.
본 발명의 목적은 보다 성능 높은 비전 검사용 모델을 학습시키기 위해 불량 제품 이미지를 생성하고, 이를 이용하여 비전 검사를 수행하는 전자장치 및 방법을 제공하는 것이다.
본 발명의 목적은 보다 다양하고 랜덤하게 불량 제품 이미지를 생성하는 전자장치 및 방법을 제공하는 것이다.
본 발명의 목적은 제품의 외관 뿐 아니라 제품이 파손되어 내부 구조가 드러나는 형태의 고장 유형에 대해서도 불량 제품 이미지를 생성하는 전자장치 및 방법을 제공하는 것이다.
본 발명의 일 실시예에 따른 전자장치에 있어서, 불량 제품 이미지를 생성하도록 구축된 이미지 생성 모델에 제품에 발생 가능한 결함을 나타내는 텍스트 및 이미지로 이루어진 결함 정보를 입력하고, 상기 이미지 생성 모델을 통해 상기 결함 정보에 대응하는 결함을 포함하는 불량 제품 이미지를 획득하고, 상기 결함 정보에 기초하여 상기 획득한 불량 제품 이미지의 불량 위치 및 불량 유형을 포함하는 라벨링 정보를 식별하고, 상기 불량 제품 이미지를 상기 라벨링 정보와 매칭하여 저장하는 프로세서를 포함할 수 있다.
상기 프로세서는, 기 정의된 복수의 불량 유형 및 상기 각 불량 유형에 대응하는 텍스트를 이용하여 상기 결함 정보를 생성할 수 있다.
상기 프로세서는, 동일한 결함 정보에 기초하여 생성된 복수의 불량 제품 이미지 각각의 특성을 이미지 분석 라이브러리를 통해 수치화하여 상기 수치화에 따른 정규 분포를 결정하고, 상기 결함 정보와 동일한 결함 정보에 기초하여 생성된 불량 제품 이미지의 특성에 대한 수치가 상기 정규 분포에 포함되는 경우 상기 생성된 불량 제품 이미지를 라벨링할 수 있다.
상기 프로세서는, 정규 분포를 벗어나는 불량 제품 이미지는 새로운 라벨링 정보와 매칭하여 저장할 수 있다.
상기 프로세서는, 정상 제품의 외부 구조 이미지와 상기 외부 구조 이미지에 대응하는 제1프롬프트 정보, 정상 제품의 내부 구조 이미지와 상기 내부 구조 이미지에 대응하는 제2프롬프트 정보 및 불량 제품 시험 이미지와 상기 불량 제품 시험 이미지에 대응하는 제3프롬프트 정보를 포함하는 학습 데이터 셋을 획득하고, 불량 제품 이미지를 생성하도록 학습된 베이스 모델에 상기 학습 데이터 셋을 기반으로 생성된 특징 모델을 적용하여 상기 이미지 생성 모델을 구축할 수 있다.
상기 특징 모델은, 상기 불량 제품 이미지가 제품에 대응하도록 상기 베이스 모델을 미세 조정하는 로라(Low-Rank Adaptation, LoRA) 모델일 수 있다.
상기 결함 정보는 상기 불량 제품 이미지에서 제외될 특징을 묘사하는 텍스트를 더 포함할 수 있다.
상기 프로세서는, 제품에 발생 가능한 결함이 표시된 마스킹 이미지를 포함하는 결함 정보를 수신할 수 있다.
상기 프로세서는, 상기 외부 구조 이미지, 상기 내부 구조 이미지 및 상기 불량 제품 시험 이미지가 각각 타겟 영역을 포함하도록 조정하고, 상기 조정된 이미지들을 이용하여 상기 특징 모델을 생성할 수 있다.
상기 프로세서는, 상기 이미지 생성 모델에 상기 조정된 내부 구조 이미지를 포함하는 결함 정보를 입력하여 조정된 불량 제품 이미지를 획득하고, 상기 조정된 불량 제품 이미지와 상기 내부 구조 이미지의 타겟 영역을 제외한 나머지 영역을 조합하여 불량 제품 이미지를 생성할 수 있다.
상기 프로세서는, 제품의 외부 구조 이미지 혹은 내부 구조 이미지와 상기 획득된 불량 제품 이미지를 비교하여 결함 정도가 임계치를 초과하는지 여부에 따라 상기 획득된 불량 제품 이미지를 필터링할 수 있다.
본 발명의 일 실시예에 따른 전자장치에 의해 수행되는 불량 제품 이미지의 라벨링 정보를 생성하는 방법 있어서, 불량 제품 이미지를 생성하도록 구축된 이미지 생성 모델에 제품에 발생 가능한 결함을 나타내는 텍스트 및 이미지로 이루어진 결함 정보를 입력하는 단계; 상기 이미지 생성 모델을 통해 상기 결함 정보에 대응하는 결함을 포함하는 불량 제품 이미지를 획득하는 단계; 상기 결함 정보에 기초하여 상기 획득한 불량 제품 이미지의 불량 위치 및 불량 유형을 포함하는 라벨링 정보를 식별하는 단계; 상기 불량 제품 이미지를 상기 라벨링 정보와 매칭하여 저장하는 단계를 포함할 수 있다.
본 발명의 일 실시예에 따르면, 불량 제품 이미지의 라벨링을 자동적으로 수행함으로써, 비전 검사용 모델을 구축하기 위한 리소스를 최소화할 수 있다.
본 발명의 일 실시예에 따르면, 생성된 불량 제품 이미지들의 품질을 높일 뿐 아니라, 불량 제품 이미지의 라벨링 정보의 정합성을 높여 비전 검사용 모델의 성능을 높일 수 있다.
본 발명의 일 실시예에 따르면, 기존의 비전 검사용 모델의 편향된 성능을, 다양한 불량 제품 이미지의 생성을 통해 비약적으로 상승시킬 수 있다. 또한 생성형 모델을 활용하여 불량 제품 이미지를 실제 이미지와 거의 동일한 품질로, 매우 생산성이 높은 속도로 뽑아낼 수 있다. 궁극적으로, 비전 검사용 모델의 개발 기간을 단축시킬 수 있으며 모델의 성능을 증대시킬 수 있다.
도 1은 본 발명의 일 실시예에 따른 전자장치를 도시한 개략도이다.
도 2는 본 발명의 일 실시예에 따른 전자장치의 구성을 도시한 블럭도이다.
도 3은 본 발명의 일 실시예에 따른 전자장치의 동작 흐름도를 도시한 도면이다.
도 4는 본 발명의 일 실시예에 따른 특징 모델의 구축 모습을 도시한 도면이다.
도 5는 본 발명의 일 실시예에 따른 정상 제품의 외부 구조 이미지 및 내부 구조 이미지를 도시한 도면이다.
도 6은 본 발명의 제1실시예에 따른 전자장치의 불량 제품 이미지 생성 동작 모습을 도시한 도면이다.
도 7은 본 발명의 제2실시예에 따른 전자장치의 불량 제품 이미지 생성 동작 모습을 도시한 도면이다.
도 8은 본 발명의 제3실시예에 따른 전자장치의 불량 제품 이미지 생성 동작 모습을 도시한 도면이다.
이하, 본 발명에 따른 바람직한 실시 형태를 첨부된 도면을 참조하여 상세하게 설명한다. 첨부된 도면과 함께 이하에 개시될 상세한 설명은 본 발명의 예시적인 실시형태를 설명하고자 하는 것이며, 본 발명이 실시될 수 있는 유일한 실시형태를 나타내고자 하는 것이 아니다. 도면에서 본 발명을 명확하게 설명하기 위해서 설명과 관계없는 부분은 생략할 수 있고, 명세서 전체를 통하여 동일 또는 유사한 구성 요소에 대해서는 동일한 참조 부호를 사용할 수 있다.
도 1은 본 발명의 일 실시예에 따른 전자장치를 도시한 개략도이다.
본 발명의 일 실시예에 따른 전자장치(100)는 불량 제품 이미지를 생성하고, 비전 검사를 위해 라벨링하는 장치로, 컴퓨터, 서버, 노트북, 스마트 폰, 태블릿 PC, 스마트 패드 등으로 구현될 수 있다.
전자장치(100)는 불량 제품 이미지를 생성하는 데 활용되는 결함 정보(10)를 이용하여 이미지 생성 모델(20)을 구축하고, 구축된 이미지 생성 모델(20)로부터 불량 제품 이미지(31)를 획득할 수 있다.
이때, 전자장치(100)는 생성된 각 불량 제품 이미지(31)에 대응하는 라벨링 정보를 매칭할 수 있다. 라벨링 정보는 생성된 각 불량 제품 이미지(31)에서 불량이 어디에 발생하였는지, 어떤 유형의 불량인지에 대한 구체적인 정보를 의미하며, 포함되는 내용 및 형식은 어느 하나에 한정되지 않는다.
이를 통해, 전자장치(100)는 불량 제품 이미지(31)와 정상 제품 이미지(40)를 충분히 획득하고, 균형된 비중으로 비전 검사용 모델(50)을 구축할 수 있다.
후속적으로 전자장치(100)는 공정 라인에서 획득되는 제품의 외관 이미지(60)를 비전 검사용 모델(50)에 입력하여 양품 혹은 불량품을 검사하여 검사 정보(70)를 획득할 수 있다.
도 1에 도시된 바와 같이, 본 발명의 전자장치(100)는 불량 제품 이미지(31) 생성을 위한 이미지 생성 모델(20) 구축, 이미지 생성 모델(20)을 이용한 불량 제품 이미지(31) 생성, 불량 제품 이미지(31)에 라벨링 정보 매칭, 불량 제품 이미지(31) 및 정상 제품 이미지(40)를 이용한 비전 검사용 모델(50) 구축, 비전 검사용 모델(50)을 이용한 제품 검사를 모두 수행할 수 있다. 다만, 상기 나열된 동작들을 각각 혹은 선택적으로 수행하도록 복수의 전자장치(100)가 별도로 마련될 수 있으며, 어느 하나에 한정되는 것은 아니다.
앞서 서술한 바와 같이, 현재 구축되는 비전 검사용 모델의 경우 정상 제품 이미지와 불량 제품 이미지 간 학습 데이터의 불균형으로 인해 그 성능이 떨어지는 문제점이 있다. 또한, 불량 제품 이미지를 비전 검사용 모델에 사용하기 위해 라벨링 작업을 일일이 수행하여야 하는 번거로움이 존재한다.
본 발명에서는 비전 검사용 모델의 편향된 성능을 개선하기 위해 다양한 불량 제품 이미지를 생성하는 방안에 대해 제안하고, 이때 제품의 외관에 발생한 결함을 포함하는 불량 제품 이미지 뿐 아니라, 제품의 내부 구조 상 발생한 결함을 포함하는 불량 제품 이미지를 구현하도록 제안한다.
또한, 본 발명에서는 생성된 불량 제품 이미지를 용이하게 비전 검사용 모델의 학습 데이터로 활용할 수 있도록 자동적으로 라벨링하는 방안을 제안한다. 후속적으로 불량 제품 이미지를 활용하여 비전 검사용 모델 구축 및 활용하는 방안에 대해 제안한다.
이를 통해, 본 발명에서는 불량 제품 이미지의 결함 범위를 확장할 수 있고, 이를 이용한 비전 검사용 모델의 적용성을 더욱 높일 수 있다.
이하, 도면들을 참조하여 본 발명의 일 실시예에 따른 전자장치(100)의 구성 및 동작에 대해 구체적으로 설명한다.
도 2는 본 발명의 일 실시예에 따른 전자장치의 구성을 도시한 블럭도이다.
본 발명의 일 실시예에 따른 전자장치(100)는 입력부(110), 통신부(120), 표시부(130), 저장부(140) 및 프로세서(150)를 포함할 수 있다.
입력부(110)는 전자장치(100)의 사용자 입력에 대응하여 입력데이터를 발생시킨다. 예를 들어, 사용자 입력은 전자장치(100)의 동작을 시작하게 하는 사용자 입력, 이미지 생성 모델 및 비전 검사용 모델을 구축하는 데 필요한 사용자 입력, 결함 정보를 입력하는 사용자 입력, 타겟 영역을 설정하는 사용자 입력 등일 수 있으며, 이 외에도 불량 제품 이미지 생성, 라벨링 정보 매칭, 비전 검사를 수행하기 위해 필요한 사용자 입력인 경우 제한하지 않고 적용 가능하다.
입력부(110)는 적어도 하나의 입력수단을 포함한다. 입력부(110)는 키보드(key board), 키패드(key pad), 돔 스위치(dome switch), 터치패널(touch panel), 터치 키(touch key), 마우스(mouse), 메뉴 버튼(menu button) 등을 포함할 수 있다.
통신부(120)는 결함 정보, 정상 제품의 외부 구조 이미지, 정상 제품의 내부 구조 이미지, 불량 제품 시험 이미지, 각 이미지에 대응하는 프롬프트 정보, 라벨링 정보, 검사 정보 등을 송수신하기 위해 서버 등 외부장치와의 통신을 수행할 수 있다.
이를 위해, 통신부(120)는 5G(5th generation communication), LTE-A(long term evolution-advanced), LTE(long term evolution), Wi-Fi(wireless fidelity), Bluetooth 등의 무선 통신, 혹은 LAN(local area network), WAN(Wide Area Network), 전력선 통신 등의 유선 통신을 수행할 수 있다.
표시부(130)는 전자장치(100)의 동작에 따른 표시 데이터를 표시한다. 표시부(130)는 불량 제품 이미지를 생성하는 과정을 표시하는 화면, 생성된 불량 제품 이미지를 표시하는 화면, 생성된 제품 불량 이미지에 라벨링을 매칭하는 화면, 비전 검사를 수행하는 화면, 사용자 입력을 수신하는 화면 등을 표시할 수 있다.
표시부(130)는 액정 디스플레이(LCD; liquid crystal display), 발광 다이오드(LED; light emitting diode) 디스플레이, 유기 발광 다이오드(OLED; organic LED) 디스플레이, 마이크로 전자기계 시스템(MEMS; micro electro mechanical systems) 디스플레이 및 전자 종이(electronic paper) 디스플레이를 포함한다. 표시부(130)는 입력부(110)와 결합되어 터치 스크린(touch screen)으로 구현될 수 있다.
저장부(140)는 전자장치(100)의 동작 프로그램들을 저장한다. 저장부(140)는 전원의 제공 유무와 무관하게 데이터(정보)를 보존할 수 있는 비휘발성 속성의 스토리지(storage)와, 프로세서(150)에 의해 처리되기 위한 데이터가 로딩되며 전원이 제공되지 않으면 데이터를 보존할 수 없는 휘발성 속성의 메모리(memory)를 포함한다. 스토리지에는 플래시메모리(flash-memory), HDD(hard-disc drive), SSD(solid-state drive) ROM(Read Only Memory) 등이 있으며, 메모리에는 버퍼(buffer), 램(RAM; Random Access Memory) 등이 있다.
저장부(140)는 결함 정보(10), 이미지 생성 모델(20), 불량 제품 이미지(31), 라벨링 정보(32), 정상 제품 이미지(40), 비전 검사용 모델(50), 제품 이미지(60), 검사 정보(70) 등을 저장할 수 있다. 저장부(140)는 이미지 생성 모델(20) 구축, 이미지 생성 모델(20)을 이용한 불량 제품 이미지(31) 생성, 불량 제품 이미지(31)에 라벨링 정보(32) 매칭, 비전 검사용 모델(50) 구축, 비전 검사용 모델(50)을 이용한 제품 검사 등을 수행하는 과정에서 필요한 연산 프로그램 등을 저장할 수 있다.
프로세서(150)는 프로그램 등 소프트웨어를 실행하여 전자장치(100)의 적어도 하나의 다른 구성요소(예: 하드웨어 또는 소프트웨어 구성요소)를 제어할 수 있고, 다양한 데이터 처리 또는 연산을 수행할 수 있다.
본 발명의 일 실시예에 따른 프로세서(150)는 불량 제품 이미지를 생성하도록 구축된 이미지 생성 모델에 제품에 발생 가능한 결함을 나타내는 텍스트 및 이미지로 이루어진 결함 정보를 입력하고, 상기 이미지 생성 모델을 통해 상기 결함 정보에 대응하는 결함을 포함하는 불량 제품 이미지를 획득하고, 상기 결함 정보에 기초하여 상기 획득한 불량 제품 이미지의 불량 위치 및 불량 유형을 포함하는 라벨링 정보를 식별하고, 상기 불량 제품 이미지를 상기 라벨링 정보와 매칭하여 저장할 수 있다.
본 발명의 일 실시예에 따른 프로세서(150)는 이미지 생성 모델로부터 획득한 불량 제품 이미지들, 상기 불량 제품 이미지들이 포함하는 결함에 관한 라벨링 정보 및 정상 제품 이미지들을 이용하여 제품의 불량여부를 검사하는 비전 검사용 모델을 생성할 수 있다.
이때, 프로세서(150)가 이미지 생성 모델 및 비전 검사용 모델 중 적어도 하나를 구축하거나, 기 구축된 이미지 생성 모델 및 비전 검사용 모델을 외부로부터 수신 및 저장하여 이용할 수 있으며 어느 하나에 한정되는 것은 아니다.
한편, 프로세서(150)는 상기 동작들을 수행하기 위한 데이터 분석, 처리, 및 결과 정보 생성 중 적어도 일부를 규칙 기반 또는 인공지능(Artificial Intelligence) 알고리즘으로서 기계학습, 신경망 네트워크(neural network), 또는 딥러닝 알고리즘 중 적어도 하나를 이용하여 수행할 수 있다. 신경망 네트워크의 예로는, CNN (Convolutional Neural Network), DNN (Deep Neural Network), RNN (Recurrent Neural Network)과 같은 모델을 포함할 수 있다.
도 3은 본 발명의 일 실시예에 따른 전자장치의 동작 흐름도를 도시한 도면이다.
본 발명의 일 실시예에 따른 프로세서(150)는 불량 제품 이미지를 생성하도록 구축된 이미지 생성 모델에 제품에 발생 가능한 결함을 나타내는 텍스트 및 이미지로 이루어진 결함 정보를 입력할 수 있다(S10).
불량 제품 이미지는 제품에 찍힘, 깨짐, 실금 등과 같은 외관상 불량을 포함하도록 생성된 제품 이미지를 의미한다.
본 발명의 이미지 생성 모델은 생성형 인공지능 모델로, 불량 제품 이미지를 생성하도록 학습된 베이스 모델에 베이스 모델의 특징을 미세 조정하도록 구현된 특징 모델을 적용하여 구축될 수 있다. 이미지 생성 모델을 구축하는 과정은 도 4를 참조하여 설명한다.
결함 정보는 불량 제품 이미지를 생성하는 데 필요한 정보이다. 결함 정보는 제품에 발생 가능한 결함, 특히 제품의 결함 발생 위치와 관련된 텍스트 및 결함 자체를 묘사하는 텍스트(이하, 제1텍스트라 한다.), 불량 제품 이미지에서 제외될 특징을 묘사하는 텍스트(이하, 제2텍스트라 한다.), 정상 제품 이미지, 제품에 발생 가능한 결함이 표시된 마스킹 이미지 등을 포함할 수 있다.
예를 들어, 결함 발생 위치와 관련된 텍스트는, 예를 들어 "플라스틱 재질"(Plastic Texture), "내부 구조"(Inner structure), "커버 아래(Under cover)", "커버"(cover) 등일 수 있다. 결함 자체를 묘사하는 텍스트는, 예를 들어 "얼룩진"(stained), "깨짐"(crack), "실패"(failure), "찍힘", "실금", "손상"(damaged), "파손"(broken), "드러나는"(open) 등일 수 있다. 이때, 제품 결함 발생 위치와 관련된 텍스트와 결함 자체를 의미하는 텍스트는 결합되어 입력될 수 있으며, 예를 들어 "내부 구조가 드러나는"(Open Inner Structure)일 수 있다. 이외에도 다양하게 적용될 수 있으며, 제1텍스트에 포함되는 내용이나 표현 형식은 어느 하나에 한정되지 않는다.
제2텍스트는 불량 제품 이미지에서 제외될 특징을 나타내는 텍스트로, 예를 들어, "깨끗한"(clean, clear), "통과"(pass), "정상"(normal) 등을 포함할 수 있다.
이때, 외부 구조에만 결함이 발생하고 내부 구조에는 결함이 없는 불량 제품 이미지를 생성하고자 하는 경우, "내부 구조"(Inner structure), "커버 아래(Under cover)" 등을 제2텍스트로 입력할 수 있다. 관련하여, 보다 구체적인 예시는 도 6을 참고하여 설명한다.
제1텍스트 및 제2텍스트는 프롬프트(prompt) 형식으로 입력될 수 있으며, 프로세서(150)는 결함 정보를 적당한 가중치와 함께 적용할 수 있다.
한편, 프로세서(150)는 기 정의된 복수의 불량 유형 및 각 불량 유형에 대응하는 텍스트를 이용하여 결함 정보를 생성할 수 있다. 이는, 불량 유형과 이를 위한 텍스트도 Prompt Engineering 개발을 통해 사전에 정의함으로써, 불량 유형과 텍스트의 연관관계를 확정해 놓을 수 있다. 이를 통해, 생성형 AI 기술의 특성상 전체적인 불량 제품 이미지의 생성 방향과 생소한 이미지가 섞일 수 있는 문제를 방지할 수 있다.
예를 들어, 불량 유형은 표면 긁힘, 표면 찍힘, 표면 오염, 커버 파손(중), 커버 파손(소), 이물질 등일 수 있으며, 불량 유형이나 개수는 어느 하나에 한정되지 않는다.
표면 긁힘에 대응하는 텍스트는 "(abnormal surface, Damaged):1.0, Scratched:1.2, stained:0.1, broken:0.8"일 수 있다. 표면 찍힘에 대응하는 텍스트는 "(abnormal surface, Damaged):1.0, Scratched:0.3, punched:1.5, stained:0.1, broken:0.8"일 수 있다.
표면 오염에 대응하는 텍스트는 "stained:1.1, dirty:1.0"일 수 있다. 커버 파손(중)에 대응하는 텍스트는 "(abnormal surface, Damaged):1.3, Scratched:1.5, punched:0.6, broken:1.3, cutting off cover:1.5"일 수 있다. 커버 파손(소)에 대응하는 텍스트는 "(abnormal surface, Damaged):1, Scratched:1.0, punched:0.3, broken:1.3, cutting off cover:1.0"일 수 있다. 이물질에 대응하는 텍스트는 "(abnormal surface):1.0, Scratched:0.1, punched:0.1, foreign matter contamination:1.0"일 수 있다.
이 때 각 텍스트 뒤의 숫자는 이미지 생성 모델에 결함 정보 입력 시의 가중치를 의미하며, 일반적으로 0 내지 2까지의 소수점으로 표현될 수 있다. 해당 가중치 숫자의 실제 적용 정도는 베이스 모델과 특징 모델 학습 시의 조건에 따라 달라지므로 적절한 숫자와 원하는 생성 정도를 사전에 개발해 둘 필요가 있다.
텍스트로 된 결함 정보는 제품 정보를 더 포함할 수 있다. 예를 들어, 대상 제품이 MCCB인 경우, "circuit braker", "MCCB" 등을 결함 정보로 포함할 수 있다.
정상 제품 이미지는 이미지 생성 모델이 불량 제품 이미지를 생성하는데 참고하기 위한 베이스 정보일 수 있다. 프로세서(150)는 이미지 생성 모델에 정상 제품 이미지 - 즉 외부 구조 이미지 혹은 내부 구조 이미지 -를 입력하여 이를 기반으로 불량 제품 이미지를 획득할 수 있다(IMG2IMG 기능). 이때, 정상 제품 이미지는 특징 모델을 형성하는데 이용된 정상 제품 시험 이미지 중 하나 이상을 활용할 수 있다.
프로세서(150)는 제품에 발생 가능한 결함이 표시된 마스킹 이미지를 포함하는 결함 정보를 수신할 수 있다. 프로세서(150)는 정상 제품 이미지 중 특정 영역에만 불량이 생성되도록 마스킹을 하는 인페인트 기능을 사용하여 불량 제품 이미지를 획득할 수 있다. 특히, 마스킹 이미지는 특정 부분에 결함을 표시한 이미지로, 프로세서(150)는 인페인트(inpaint) 기능을 이용하여 정상 제품 이미지의 특정 부분만 마스킹 이미지로 변경할 수 있다. 인페인트 기능을 활용할 경우, 기존 이미지 모델에서 검출하지 못했거나, 불량이 아닌데 불량으로 과 검출하는 유형들을 집중적으로 개선하기 위한 이미지 생성 시 더 효율적이다.
본 발명의 일 실시예에 따른 프로세서(150)는 이미지 생성 모델을 통해 결함 정보에 대응하는 결함을 포함하는 불량 제품 이미지를 획득할 수 있다(S20).
일반적인 생성형 모델과 달리 디노이즈 기법 기반의 생성형 모델을 사용하는 것이 정상 제품 이미지로부터 불량을 생성하기에 유리하며, 생성된 이미지의 품질과 이미지 생성 효율면에서 매우 우수함을 보인다. 따라서 본 발명은 디노이즈 기법 기반의 생성형 모델을 기반으로 생성되는 예를 기준으로 기술되나 추후 더 개선된 솔루션이 나올 경우에도 동일한 발명 구성으로 활용될 수 있을 것이다.
본 발명의 일 실시예에 따른 프로세서(150)는 결함 정보에 기초하여 획득한 불량 제품 이미지의 불량 위치 및 불량 유형을 포함하는 라벨링 정보를 식별할 수 있다(S30).
결함 정보는 앞서 서술한 바와 같이, 불량 유형을 나타내는 텍스트(프롬프트), 정상 제품 이미지, 마스킹 이미지 등을 포함할 수 있다. 프로세서(150)는 결함 정보 중 텍스트(프롬프트)로부터 생성된 불량 제품 이미지의 불량 유형을 식별할 수 있다. 프로세서(150)는 결함 정보 중 마스킹 이미지로부터 불량 제품 이미지의 불량 위치를 식별할 수 있다. 이때, 불량 위치는 좌표 정보로 획득될 수 있다.
이때, 결함 정보에 기초하여 생성된 하나의 불량 제품 이미지 내에는 복수 개의 불량이 존재할 수 있다. 복수 개의 불량은 동일 불량 유형이 복수개 발생하거나, 복수의 불량 유형이 적어도 하나씩 발생하는 것을 모두 포함할 수 있다. 프로세서(150)는 결함 정보에 기초하여 복수의 불량 위치 및 적어도 하나의 불량 유형을 포함하는 복수의 라벨링 정보를 식별할 수 있다. 프로세서(150)는 복수의 라벨링 정보가 식별되는 경우, 불량의 크기, 불량 유형의 중요도 등에 기초하여 각 불량 유형별 가중치를 부여할 수 있다.
이 외에도, 프로세서(150)는 불량 제품 이미지 생성에 필요한 하이퍼 파라미터들이나, 생성할 불량 제품 이미지의 저장 경로 및 파일명 등에 기초하여, 라벨링 정보의 파일명을 식별할 수 있다.
이때, 라벨링 정보를 획득하는 방법은 다양하게 구현될 수 있다. 예를 들어, 프로세서(150)는 앞서 서술한 바와 같이, 마스킹 이미지나 프롬프트 정보들로부터 직접적으로 라벨링 정보에 포함되는 불량 유형, 불량 위치에 관한 정보를 획득할 수 있다.
다른 예로, 프로세서(150)는 불량 제품 이미지의 파일명을 이러한 불량 유형, 불량 위치에 관한 정보가 담기도록 정의(예: 위치_유형.jpg)한 후, 파일명을 읽어들임으로써 라벨링 정보를 획득할 수 있다.
본 발명의 일 실시예에 따른 프로세서(150)는 불량 제품 이미지를 라벨링 정보와 매칭하여 저장할 수 있다(S40).
예를 들어, 프로세서(150)는 라벨링 정보를 불량 제품 이미지의 메타데이터로 삽입하여 매칭할 수 있다. 이 외에도 불량 제품 이미지와 라벨링 정보의 매칭 방법은 다양하게 채용될 수 있으며, 어느 하나에 제한되지 않는다.
본 발명의 일 실시예에 따르면, 불량 제품 이미지(학습 데이터)의 라벨링을 자동적으로 수행함으로써, 비전 검사용 모델을 구축하기 위한 리소스를 최소화할 수 있다.
본 발명의 일 실시예에 따르면, 기존의 비전 검사용 모델의 편향된 성능을, 다양한 불량 제품 이미지의 생성을 통해 비약적으로 상승시킬 수 있다. 또한 생성형 모델을 활용하여 불량 제품 이미지를 실제 이미지와 거의 동일한 품질로, 매우 생산성이 높은 속도로 뽑아낼 수 있다. 궁극적으로, 비전 검사용 모델의 개발 기간을 단축시킬 수 있으며 모델의 성능을 증대시킬 수 있다.
도 4는 본 발명의 일 실시예에 따른 특징 모델의 구축 모습을 도시한 도면이다.
도 4는 본 발명의 일 실시예에 따른 이미지 생성 모델의 구축 모습을 도시한 도면이다. 도 4는 도 3의 S10과 관련하여 서술한 바와 같이, 이미지 생성 모델을 구축하는 모습을 도시한다.
프로세서(150)는 정상 제품의 외부 구조 이미지와 외부 구조 이미지에 대응하는 제1프롬프트 정보, 정상 제품의 내부 구조 이미지와 내부 구조 이미지에 대응하는 제2프롬프트 정보 및 불량 제품 시험 이미지와 불량 제품 시험 이미지에 대응하는 제3프롬프트 정보를 포함하는 학습 데이터 셋(421)을 획득할 수 있다.
정상 제품의 외부 구조 이미지는 제품의 외관을 촬영한 이미지를 의미하며, 정상 제품의 내부 구조 이미지는 제품의 내부를 확인할 수 있는 이미지를 의미한다. 내부 구조 이미지는, 예를 들어, 정상 제품의 커버를 제거한 이미지일 수 있다. 이 외에도, 내부 구조 이미지는 제품의 제조 과정에서 촬영된 이미지 등 제품의 내부 중 적어도 일 부분을 볼 수 있으면 족하다.
프롬프트 정보는 각 이미지를 나타내는 정보로, 각 이미지와 매칭되어 구축될 수 있다. 이때, 각 이미지와 프롬프트 정보는 외부로부터 획득되거나, 각 이미지에 대응하는 프롬프트 정보를 입력하는 사용자 입력을 통해 생성될 수 있으며, 획득 경로나 방식은 어느 하나에 한정되지 않는다.
예를 들어, 정상 제품의 외부 구조 이미지의 경우, "Circuit breaker"(제품명), "플라스틱 재질"(Plastic texture), "외부 구조"(Outer structure)등과 같은 제1프롬프트 정보와 매칭될 수 있다. 또한, 정상 제품의 내부 구조 이미지의 경우, "Circuit breaker"(제품명), "플라스틱 재질"(Plastic texture), "내부 구조"(Inner structure) 등과 같은 제2프롬프트 정보와 매칭될 수 있다. 불량 제품 시험 이미지의 경우, "Circuit breaker"(제품명), "플라스틱 재질"(Plastic texture), "얼룩진"(stained), "깨짐"(crack) 등과 같은 제3프롬프트 정보와 매칭될 수 있다.
본 발명의 일 실시예에 따른 프로세서(150)는 기 구축된 베이스 모델(410)에 학습 데이터 셋(421)을 기반으로 생성된 특징 모델(420)을 적용하여 이미지 생성 모델(430)을 구축할 수 있다.
베이스 모델(410)은 대상 제품의 특성을 잘 반영하는 모델로 채택될 수 있으며, 이는 현장 및 제품 조건에 따라 다양하므로 현장 전문가가 테스트를 통해 선정하는 것이 바람직하다. 예를 들어, 베이스 모델(410)은 디노이즈 기법 기반의 모델 중 하나인 스테이블 디퓨전(Stable Diffusion)일 수 있다. 베이스 모델은 스테이블 디퓨전 중에서도 v1.5 pruned-emaonly.safetensor 모델을 포함할 수 있다.
다만, 생성형 인공지능 모델들은 주로 인물을 위주로 학습되는 것인 바, 출력되는 이미지가 제품에 대응하도록 미세 조정이 필요하며, 이를 위해 베이스 모델(410)에 특징 모델(420)을 부가하여 이미지 생성 모델(430)을 구축할 수 있다. 특징 모델(420)은 예를 들어, 로라(Low-Rank Adaptation, LoRA) 모델일 수 있다. 로라 모델 생성시 불량 제품 시험 이미지의 개수가 많지 않아도 베이스 모델(410)에서 가지고 있는 불량 유형에 대한 결함 정보를 많이 가지고 있으므로 크게 문제되지는 않는다.
이미지 생성 모델(430)의 생성 방법은 스테이블 디퓨전의 드림부스 확장(Dreambooth Extension) 모듈을 활용하는 방법과 Kohya-ss 모듈을 활용하는 방법 등이 있다.
이때, 이미지 생성 모델(430) 구축 시, 프로세서(150)는 결함 정보, 하이퍼 파라미터를 설정할 수 있다. 하이퍼 파라미터는 이미지 생성 품질에 직접적인 영향을 미치는 변수들로, 반복 수행을 통해 최적값을 찾는 과정이 필요하다.
본 발명의 일 실시예에 따른 특징 모델(420)은 앞서 구축한 학습 데이터 셋(421)을 이용하여 정상 제품의 외부 구조 뿐 아니라 내부 구조에 대하여도 학습할 수 있다. 따라서 이러한 특징 모델(420)을 이용하여 구축된 이미지 생성 모델(430)은 결함 발생 과정에서 제품의 내부 구조가 보이는 경우에도 불량 제품 이미지를 무리 없이 생성할 수 있다.
도 5는 본 발명의 일 실시예에 따른 정상 제품의 외부 구조 이미지 및 내부 구조 이미지를 도시한 도면이다.
도 5의 왼쪽 이미지는 정상 제품의 외부 구조 이미지(510)이고, 오른쪽 이미지는 정상 제품의 커버를 제거한 내부 구조 이미지(520)이다. 만일 내부 구조가 보이는 결함을 가지는 불량 제품 이미지를 생성하도록 요청하는 경우, 외부 구조 이미지(510)로만 학습된 특징 모델은 제품의 내부 구조를 제대로 표현할 수 없어 적합한 불량 제품 이미지를 생성하기 어려울 것이다.
반면, 본 발명에서는 이러한 내부 구조 이미지(520)도 함께 학습하는 바, 내부 구조를 포함하는 다양한 유형의 불량 제품 이미지를 생성할 수 있다.
도 6은 본 발명의 제1실시예에 따른 전자장치의 불량 제품 이미지 생성 동작 모습을 도시한 도면이다.
도 6은 도 3의 S10 및 S20과 관련하여 서술한 바와 같이, 불량 제품 이미지를 생성하는 모습을 도시한다. 또한, 도 6은 도 3의 S30과 관련하여 서술한 바와 같이, 라벨링 정보를 식별하는 모습을 도시한다.
도 6을 참조하면, 프로세서(150)는 베이스 모델(410)에 특징 모델(420)을 적용한 이미지 생성 모델(430)에 정상 제품 이미지(611), 마스킹 이미지(612), 제1텍스트(620), 제2텍스트(630)를 포함하는 결함 정보를 입력하여 불량 제품 이미지(640)를 생성할 수 있다. 또한, 프로세서(150)는 마스킹 이미지(612)로부터 불량 위치 정보를 식별하고, 제1텍스트(620) 및 제2텍스트(630)로부터 불량 유형 정보를 식별할 수 있다. 이로써, 프로세서(150)는 생성된 불량 제품 이미지(640)에 대응하는 불량 위치 정보 및 불량 유형 정보를 포함하는 라벨링 정보(650)를 획득할 수 있다.
한편, 본 발명에서는 내부 구조 이미지 셋을 추가함으로써 다양한 유형의 불량 제품 이미지를 생성할 수 있게 되었다. 예를 들어, 내부 구조가 드러나지 않고 외부 구조에만 불량이 발생한 유형, 내부 구조가 드러난 상태로 외부 구조에만 불량이 발생한 유형, 내부 구조가 드러난 상태로 내부 구조 및 외부 구조에 불량이 발생한 유형 등의 불량 제품 이미지를 생성할 수 있다.
각 유형에 대응하는 불량 제품 이미지를 생성하기 위해서는 결함을 나타내는 제1텍스트(620)와 불량 제품 이미지에서 제외될 특징을 묘사하는 제2텍스트(630)를 적절히 선택하여 이미지 생성 모델(430)에 입력하는 것이 필요하다.
예를 들어, 내부 구조가 드러나지 않고 외부 구조에만 불량이 발생한 유형의 불량 제품 이미지를 생성하기 위해, "Circuit breaker, Plastic Texture, Broken, Damaged"를 포함하는 제1텍스트(620), "Open Inner Structure, heavy damaged cover"를 포함하는 제2텍스트(630)를 입력할 수 있다.
내부 구조가 드러난 상태로 외부 구조에만 불량이 발생한 유형의 불량 제품 이미지를 생성하기 위해, "Circuit breaker, Plastic Texture, Broken, Damaged, heavy damaged cover, Open Inner Structure, Clean Inner Structure"를 포함하는 제1텍스트(620), "Damaged Inner Structure"를 포함하는 제2텍스트(630)를 입력할 수 있다. 이때, 내부 구조가 드러난 상태로 외부 구조에만 불량이 발생하도록 하는 제1텍스트(620) 및 제2텍스트(630)를 입력한 경우, 도 6에 도시된 불량 제품 이미지(640)와 같이, 제품의 표면 도장이 일부 벗겨져 내부 구조가 보이는 결함을 포함할 수 있다.
내부 구조가 드러난 상태로 내부 구조 및 외부 구조에 불량이 발생한 유형의 불량 제품 이미지를 생성하기 위해, "Circuit breaker, Plastic Texture, Broken, Damaged, heavy damaged cover, Open Inner Structure, Damaged Inner Structure"를 포함하는 제1텍스트(620), "Clean Inner Structure"를 포함하는 제2텍스트(630)를 입력할 수 있다.
프로세서(150)는 마찬가지로 결함 정보, 하이퍼 파라미터를 설정할 수 있으며, 인페인트 설정을 통해 불량 제품 이미지(640)를 생성할 수 있다.
한편, 프로세서(150)는 생성하고자 하는 불량 제품 이미지에 대응하는 정상 제품 이미지(611)를 입력할 수 있다. 예를 들어, 생성하고자 하는 불량 제품 이미지가 외부 구조에 발생한 결함을 포함시키고자 하는 경우, 프로세서(150)는 외부 구조 이미지를 포함하는 결함 정보를 이미지 생성 모델에 입력할 수 있다. 반대로, 생성하고자 하는 불량 제품 이미지가 내부 구조가 보이면서 결함을 포함하도록 하는 경우, 프로세서(150)는 내부 구조 이미지를 포함하는 결함 정보를 이미지 생성 모델에 입력할 수 있다.
프로세서(150)는 정상 제품 이미지(611)와 함께 제품에 발생 가능한 결함이 표시된 마스킹 이미지(612)를 입력할 수 있다.
본 발명의 일 실시예에 따르면, 제품 내부 구조와 관련되고, 결함을 포함하는 불량 제품 이미지를 생성함으로써, 불량 제품 이미지의 범위를 확장할 수 있다.
본 발명의 일 실시예에 따르면, 제품의 외부에 손상을 입으면서 제품 내부가 보이는 경우까지 불량 검사를 적용할 수 있는 바, 비전 검사용 모델의 성능을 한층 더 향상시킬 수 있다.
도 7은 본 발명의 제2실시예에 따른 전자장치의 불량 제품 이미지 생성 동작 모습을 도시한 도면이다.
앞서 도 6과 관련하여 서술한 불량 제품 이미지 생성 방안은, 정상 제품 이미지(611)의 전체를 입력으로 하여 불량 제품 이미지를 생성한다. 다만, 비전 검사용 이미지의 해상도가 높음에 따라, 컴퓨팅 자원(Computing Resource)의 부족으로 이미지 생성 모델의 학습 및 이미지 생성이 되지 않는 이슈가 발생할 수 있다. 도 7에서는 정상 제품 이미지를 조정하여 컴퓨팅 자원을 절약하는 방안에 대해 제안한다.
프로세서(150)는 학습 데이터 셋(710)이 각각 타겟 영역을 포함하도록 조정할 수 있다. 타겟 영역은 제품 상 주로 불량이 발생하는 것으로 설정된 영역을 의미하며, 이미지 내 좌표 등으로 설정될 수 있다.
조정하는 기법은 예를 들어, 타겟 영역만 남도록 학습 데이터 셋(710)의 시험 이미지를 크롭(crop)할 수 있으며, 이 외에도 타겟 영역을 추출하는 데 사용되는 기법이면 제한 없이 적용 가능하다.
프로세서(150)는 조정된 정상 제품의 외부 구조 이미지/내부 구조 이미지 및 조정된 불량 제품 시험 이미지를 포함하는 조정된 학습 데이터 셋(720)을 이용하여 특징 모델을 생성할 수 있다.
프로세서(150)는 조정된 학습 데이터 셋(720)을 학습 이미지로 두어 이미지 생성 모델(430)을 구축할 수 있다. 이 경우, 학습에 필요한 GPU 메모리 등 리소스를 절반으로 줄여 학습 속도를 높일 수 있다.
이후 이미지 생성 모델(430)을 이용하는 과정에서도, 프로세서(150)는 결함 정보에 포함할 정상 제품 이미지(730)를 조정된 학습 데이터 셋(720)과 동일한 타겟 영역을 포함하도록 조정할 수 있다.
프로세서(150)는 이미지 생성 모델(430)에 조정된 정상 제품 이미지(730)를 포함하는 결함 정보를 입력하여 조정된 불량 제품 이미지(770)를 획득할 수 있다. 이때, 프로세서(150)는 앞서 서술한 바와 같이, 조정된 정상 제품 이미지(730) 외에도 이미지 생성 모델(430)에 제1텍스트(740), 제2텍스트(750)를 포함하는 결함 정보를 입력하여 조정된 불량 제품 이미지(770)를 생성할 수 있다. 이때, 프로세서(150)는 마찬가지로 결함 정보, 하이퍼 파라미터를 설정할 수 있으며, 인페인트 설정을 통해 조정된 불량 제품 이미지(770)를 생성할 수 있다.
프로세서(150)는 조정된 불량 제품 이미지(770)에 정상 제품 이미지의 타겟 영역을 제외한 나머지 영역(780)을 조합(combine)하여 최종 불량 제품 이미지(790)를 생성할 수 있다. 이때, 프로세서(150)는 조정된 정상 제품 이미지(730)를 생성할 때 나머지 영역(780)을 저장해둘 수 있다.
도 8은 본 발명의 제3실시예에 따른 전자장치의 불량 제품 이미지 생성 동작 모습을 도시한 도면이다.
도 8에서는 생성된 불량 제품 이미지들 중 유의미한 이미지들을 선별하고, 선별된 이미지들이 비전 검사용 모델 구축에 이용되기 위한 라벨링 정보를 생성하는 방안에 대해 제안한다.
먼저, 프로세서(150)는 이미지 생성 모델로부터 획득한 불량 제품 이미지들, 상기 불량 제품 이미지들이 포함하는 결함에 관한 라벨링 정보 및 정상 제품 이미지들을 이용하여 제품의 불량여부를 검사하는 비전 검사용 모델을 생성할 수 있다.
도 8을 참조하면, 프로세서(150)는 정상 제품 이미지(810)를 타겟 영역(811)과 나머지 영역(812)으로 조정하고, 타겟 영역(811)을 입력 이미지로 하여 불량 제품 이미지(820)를 획득할 수 있다. 이때, 불량 제품 이미지(820)는 조정된 사이즈인 바, 프로세서(150)는 불량 제품 이미지(820)를 나머지 영역(812)과 조합하여 최종 불량 제품 이미지(840)를 생성할 수 있다. 이때, 프로세서(150)는 마스킹 이미지(830)를 이용하여 인페인트 기능을 통해 불량 제품 이미지(820)를 생성할 수 있다.
이후 프로세서(150)는 정상 제품 이미지(810)와 획득된 불량 제품 이미지(840)를 비교하여 결함 정도가 임계치를 초과하는지 여부에 따라 획득된 불량 제품 이미지를 필터링할 수 있다. 즉, 불량 생성부분을 원본과 비교하여 유의미한 차이가 없을 경우, 해당 불량 제품 이미지를 결과에서 제외시킬 수 있다.
이때, 프로세서(150)는 마스킹 이미지(830) 등과 같은 결함 정보를 라벨링 정보(860)로 두고, 라벨링 정보(860)와 필터링된 불량 제품 이미지(840)를 각각 매칭하여 저장할 수 있다. 라벨링 정보(860)는 불량 위치 정보 및 불량 유형 정보를 포함할 수 있다.
한편, 앞서 서술한 바와 같이, 사전에 정의된 불량 유형에 맞춰 개발된 텍스트에 따라 불량 제품 이미지를 생성할 경우, 사전에 정의된 텍스트를 이용하여 라벨링할 수 있다. 그러나, 정의된 텍스트로 생성된 이미지라 하더라도, 생성형 AI 기술의 특성상 다양한 형태와 정도로 랜덤하게 이미지가 생성될 수 있으므로, 전체적인 생성 방향과 생소한 이미지가 섞일 수 있다. 따라서, 전체적인 라벨링의 정합성을 올릴 수 있는 방안이 필요하다.
프로세서(150)는 결함 정보에 기초하여 생성된 불량 제품 이미지를 이미지 분석 라이브러리를 통해 수치화할 수 있다.
불량 제품 이미지의 이미지 특성을 수치화하기 위해 사용되는 이미지 분석 라이브러리는, 파이썬 오픈 CV의 HOG(Histogram of Oriented Gradient) 라이브러리일 수 있다. 다만, 이에 한정되지 않으며, SIFT(Scale Invariant Feature Transform), Haar feature, Ferns 등의 이미지 분석 라이브러리가 활용될 수 있다.
프로세서(150)는 동일한 결함 정보에 기초하여 생성된 복수의 불량 제품 이미지들의 수치 정보에 기초하여 정규 분포 내 불량 이미지는 해당 결함 정보를 이용하여 라벨링하고, 정규 분포를 벗어나는(이상치를 가지는) 불량 제품 이미지는 새로운 라벨링 정보와 매칭하여 저장할 수 있다.
즉, 프로세서(150)는 동일한 결함 정보에 기초하여 생성된 복수의 불량 제품 이미지를 수치적으로 분석하여, 이를 벗어나는 경우 새로운 라벨링을 기타 유형으로 라벨링할 수 있다.
프로세서(150)는 이미지 생성 모델로부터 획득한 불량 제품 이미지들, 불량 제품 이미지들이 포함하는 결함에 관한 라벨링 정보 및 정상 제품 이미지들을 이용하여 제품의 불량여부를 검사하는 비전 검사용 모델을 생성할 수 있다.
본 발명의 일 실시예에 따르면, 생성된 불량 제품 이미지들의 품질을 높일 뿐 아니라, 불량 제품 이미지의 라벨링 정보의 정합성을 높여 비전 검사용 모델의 성능을 높일 수 있다.
Claims (12)
- 전자장치에 있어서,불량 제품 이미지를 생성하도록 구축된 이미지 생성 모델에 제품에 발생 가능한 결함을 나타내는 텍스트 및 이미지로 이루어진 결함 정보를 입력하고,상기 이미지 생성 모델을 통해 상기 결함 정보에 대응하는 결함을 포함하는 불량 제품 이미지를 획득하고,상기 결함 정보에 기초하여 상기 획득한 불량 제품 이미지의 불량 위치 및 불량 유형을 포함하는 라벨링 정보를 식별하고,상기 불량 제품 이미지를 상기 라벨링 정보와 매칭하여 저장하는 프로세서를 포함하는 전자장치.
- 제1항에 있어서,상기 프로세서는,기 정의된 복수의 불량 유형 및 상기 각 불량 유형에 대응하는 텍스트를 이용하여 상기 결함 정보를 생성하는 전자장치.
- 제2항에 있어서,상기 프로세서는,동일한 결함 정보에 기초하여 생성된 복수의 불량 제품 이미지 각각의 특성을 이미지 분석 라이브러리를 통해 수치화하여 상기 수치화에 따른 정규 분포를 결정하고,상기 결함 정보와 동일한 결함 정보에 기초하여 생성된 불량 제품 이미지의 특성에 대한 수치가 상기 정규 분포에 포함되는 경우 상기 생성된 불량 제품 이미지를 라벨링하는 전자장치.
- 제3항에 있어서,상기 프로세서는,정규 분포를 벗어나는 불량 제품 이미지는 새로운 라벨링 정보와 매칭하여 저장하는 전자장치.
- 제1항에 있어서,상기 프로세서는,정상 제품의 외부 구조 이미지와 상기 외부 구조 이미지에 대응하는 제1프롬프트 정보, 정상 제품의 내부 구조 이미지와 상기 내부 구조 이미지에 대응하는 제2프롬프트 정보 및 불량 제품 시험 이미지와 상기 불량 제품 시험 이미지에 대응하는 제3프롬프트 정보를 포함하는 학습 데이터 셋을 획득하고,불량 제품 이미지를 생성하도록 학습된 베이스 모델에 상기 학습 데이터 셋을 기반으로 생성된 특징 모델을 적용하여 상기 이미지 생성 모델을 구축하는 전자장치.
- 제5항에 있어서,상기 특징 모델은, 상기 불량 제품 이미지가 제품에 대응하도록 상기 베이스 모델을 미세 조정하는 로라(Low-Rank Adaptation, LoRA) 모델인 것을 특징으로 하는 전자장치.
- 제1항에 있어서,상기 결함 정보는 상기 불량 제품 이미지에서 제외될 특징을 묘사하는 텍스트를 더 포함하는 전자장치.
- 제1항에 있어서,상기 프로세서는,제품에 발생 가능한 결함이 표시된 마스킹 이미지를 포함하는 결함 정보를 수신하는 전자장치.
- 제5항에 있어서,상기 프로세서는,상기 외부 구조 이미지, 상기 내부 구조 이미지 및 상기 불량 제품 시험 이미지가 각각 타겟 영역을 포함하도록 조정하고,상기 조정된 이미지들을 이용하여 상기 특징 모델을 생성하는 전자장치.
- 제9항에 있어서,상기 프로세서는,상기 이미지 생성 모델에 상기 조정된 내부 구조 이미지를 포함하는 결함 정보를 입력하여 조정된 불량 제품 이미지를 획득하고,상기 조정된 불량 제품 이미지와 상기 내부 구조 이미지의 타겟 영역을 제외한 나머지 영역을 조합하여 불량 제품 이미지를 생성하는 전자장치.
- 제1항에 있어서,상기 프로세서는,제품의 외부 구조 이미지 혹은 내부 구조 이미지와 상기 획득된 불량 제품 이미지를 비교하여 결함 정도가 임계치를 초과하는지 여부에 따라 상기 획득된 불량 제품 이미지를 필터링하는 전자장치.
- 전자장치에 의해 수행되는 불량 제품 이미지의 라벨링 정보를 생성하는 방법 있어서,불량 제품 이미지를 생성하도록 구축된 이미지 생성 모델에 제품에 발생 가능한 결함을 나타내는 텍스트 및 이미지로 이루어진 결함 정보를 입력하는 단계;상기 이미지 생성 모델을 통해 상기 결함 정보에 대응하는 결함을 포함하는 불량 제품 이미지를 획득하는 단계;상기 결함 정보에 기초하여 상기 획득한 불량 제품 이미지의 불량 위치 및 불량 유형을 포함하는 라벨링 정보를 식별하는 단계;상기 불량 제품 이미지를 상기 라벨링 정보와 매칭하여 저장하는 단계를 포함하는 방법.
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| KR1020240074261A KR20250175081A (ko) | 2024-06-07 | 2024-06-07 | 불량 제품 이미지를 생성하고, 비전 검사를 위해 라벨링하는 전자장치 및 방법 |
| KR10-2024-0074261 | 2024-06-07 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2025254298A1 true WO2025254298A1 (ko) | 2025-12-11 |
Family
ID=97961173
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/KR2025/002330 Pending WO2025254298A1 (ko) | 2024-06-07 | 2025-02-18 | 불량 제품 이미지를 생성하고, 비전 검사를 위해 라벨링하는 전자장치 및 방법 |
Country Status (2)
| Country | Link |
|---|---|
| KR (1) | KR20250175081A (ko) |
| WO (1) | WO2025254298A1 (ko) |
Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| KR20210041155A (ko) * | 2019-10-04 | 2021-04-15 | 현대자동차주식회사 | Gan 기반의 불량 이미지를 포함하는 학습 데이터 생성 장치 및 그 방법 |
| KR20220149727A (ko) * | 2020-03-09 | 2022-11-08 | 나노트로닉스 이미징, 인코포레이티드 | 결함 검출 시스템 |
| KR102579783B1 (ko) * | 2020-09-28 | 2023-09-18 | (주)미래융합정보기술 | 제품 결함 이미지 원격 학습을 통한 비전 검사 시스템 |
| KR102655359B1 (ko) * | 2023-12-29 | 2024-04-05 | 주식회사 더매트릭스 | 생성형 ai 모델을 이용해 인페인팅 서비스 제공 서버, 시스템, 방법 및 프로그램 |
| KR20240063621A (ko) * | 2022-11-03 | 2024-05-10 | 신플렛주식회사 | 물품 불량 검출 방법 및 이를 위한 인공 신경망 학습 방법 |
-
2024
- 2024-06-07 KR KR1020240074261A patent/KR20250175081A/ko active Pending
-
2025
- 2025-02-18 WO PCT/KR2025/002330 patent/WO2025254298A1/ko active Pending
Patent Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| KR20210041155A (ko) * | 2019-10-04 | 2021-04-15 | 현대자동차주식회사 | Gan 기반의 불량 이미지를 포함하는 학습 데이터 생성 장치 및 그 방법 |
| KR20220149727A (ko) * | 2020-03-09 | 2022-11-08 | 나노트로닉스 이미징, 인코포레이티드 | 결함 검출 시스템 |
| KR102579783B1 (ko) * | 2020-09-28 | 2023-09-18 | (주)미래융합정보기술 | 제품 결함 이미지 원격 학습을 통한 비전 검사 시스템 |
| KR20240063621A (ko) * | 2022-11-03 | 2024-05-10 | 신플렛주식회사 | 물품 불량 검출 방법 및 이를 위한 인공 신경망 학습 방법 |
| KR102655359B1 (ko) * | 2023-12-29 | 2024-04-05 | 주식회사 더매트릭스 | 생성형 ai 모델을 이용해 인페인팅 서비스 제공 서버, 시스템, 방법 및 프로그램 |
Also Published As
| Publication number | Publication date |
|---|---|
| KR20250175081A (ko) | 2025-12-16 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN110658198B (zh) | 光学检测方法、光学检测装置及光学检测系统 | |
| CN114240939A (zh) | 一种主板元器件外观缺陷检测方法、系统、设备及介质 | |
| WO2016171341A1 (ko) | 클라우드 기반 병리 분석 시스템 및 방법 | |
| CN112669267B (zh) | 一种电路板缺陷检测方法、装置、电子设备和存储介质 | |
| WO2022158628A1 (ko) | 머신러닝 모델에 기반한 디스플레이 패널의 결함 판정 시스템 | |
| WO2018147712A1 (ko) | 인쇄 회로 기판에 실장된 부품을 검사하는 장치, 그 동작 방법 및 컴퓨터 판독 가능한 기록 매체 | |
| WO2020149493A1 (ko) | 전자 장치 및 이의 제어 방법 | |
| WO2023182796A1 (ko) | 제품 이미지를 기반으로 불량 제품을 감지하는 인공 지능 장치 및 그 방법 | |
| WO2022114665A1 (ko) | 태양전지 셀에 대한 이미지 분류 방법 및 장치 | |
| US20220091576A1 (en) | Detection of defect in edge device manufacturing by artificial intelligence | |
| WO2020256407A1 (ko) | 제품 검사를 위한 자동 학습 방법 및 시스템 | |
| WO2023182795A1 (ko) | 제품 이미지를 기반으로 불량 제품을 감지하는 인공 지능 장치 및 그 방법 | |
| WO2024049201A1 (ko) | 배터리 전극 검사 장치 및 방법 | |
| WO2025254298A1 (ko) | 불량 제품 이미지를 생성하고, 비전 검사를 위해 라벨링하는 전자장치 및 방법 | |
| CN109256341B (zh) | 用于检测单晶硅太阳能电池的方法和装置 | |
| WO2020050550A1 (en) | Methods and systems for performing editing operations on media | |
| WO2018131737A1 (ko) | 불량 패널 검사 장치 | |
| WO2025254299A1 (ko) | 불량 제품 이미지를 생성하고, 이를 이용하여 비전 검사를 수행하는 전자장치 및 방법 | |
| WO2022250190A1 (ko) | 딥러닝 모델을 이용한 영상검사 대상체의 결함 판정시스템 | |
| WO2025116678A1 (ko) | 불량 제품 이미지를 생성하고, 이를 이용하여 비전 검사를 수행하는 전자장치 | |
| WO2021132831A1 (ko) | 인공지능 학습데이터 생성을 위한 크라우드소싱 기반 프로젝트의 작업자 및 검수자의 증감 운영 방법 | |
| WO2024155119A1 (ko) | 데이터의 클래스를 결정하기 위한 장치, 방법 및 명령을 기록한 기록 매체 | |
| WO2023085610A1 (ko) | 멀티-태스크 모델의 학습을 수행하는 방법 및 전자 장치 | |
| WO2025084517A1 (ko) | 결함 이미지 생성 방법 및 이를 위한 장치 | |
| WO2025220850A1 (ko) | 공정 검사용 사용자 인터페이스를 제공하는 전자장치 및 이를 이용한 공정 검사 방법 |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 25820417 Country of ref document: EP Kind code of ref document: A1 |