Pseudo defect image generation device

The pseudo-defect image generating device addresses the limitations of existing methods by using a defect library and placement rules to create pseudo-defect images across various specifications and positions, enhancing the efficiency of machine learning for visual inspection.

JP7821689B2Active Publication Date: 2026-02-27ASTEMO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
JP2022094217
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Filing Date
2022-06-10
Publication Date
2026-02-27
Estimated Expiration
2042-06-10

AI Technical Summary

Technical Problem

Existing methods struggle to generate pseudo-defective product images for machine learning in visual inspection, as they are limited to products with the same specifications and cannot easily create images with defects in different positions, requiring extensive preparation work for each specification.

Method used

A pseudo-defect image generating device that utilizes a defect library, defect placement rules, and a pseudo-defect image generating unit to place defect images on normal product images based on management information, allowing for the creation of pseudo-defect images across multiple specifications and positions.

Benefits of technology

Enables the easy generation of varied pseudo-defect images for multiple processed products with different specifications, reducing the effort required for image preparation and improving the efficiency of machine learning for visual inspection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007821689000001
    Figure 0007821689000001
  • Figure 0007821689000002
    Figure 0007821689000002
  • Figure 0007821689000003
    Figure 0007821689000003
Patent Text Reader

Abstract

To provide an artificial defect image creation device that, in performing appearance inspection of finished articles using machine learning, can share an image of a defective part among species to save time and effort for collecting the image of the defective part.SOLUTION: An artificial defect image creation device creates an artificial defect image to be learned by a leaning device, and the artificial defect image creation device comprises: a defect library that stores defect part images; a defect arrangement rule that, based on management information in which a processing item and details permitted for processing are associated with each other, designates a defect according to the processing item and an inspection area; and an artificial defect image creation unit that, based on the defect arrangement rule, arranges the defect part image in the inspection area on a normal article image to create an artificial defect image.SELECTED DRAWING: Figure 2
Need to check novelty before this filing date? Find Prior Art

Description

[Technical Field]

[0001] The present invention relates to a pseudo defect image generating device that supplies pseudo defect images for machine learning to a learning device that generates a classifier for visual inspection. [Background technology]

[0002] When applying machine learning to the visual inspection of processed products with predetermined specifications, it is first necessary to generate a classifier by machine learning a large number of images of defective products and images of normal products of the same specifications. Furthermore, to improve the inspection accuracy of this classifier, it is necessary to machine learn a number of images of defective products equivalent to the number of images of normal products. However, since the number of defective products is usually far smaller than the number of normal products, it has been difficult to prepare a number of images of defective products equivalent to the number of images of normal products.

[0003] Therefore, various methods have been proposed to compensate for the lack of defective product images. For example, the abstract of Patent Document 1 discloses a training data generation device including: "a defective part data storage unit that stores defective part data, which is image data of defective part images; a good product data storage unit that stores good product data, which is image data of good product images; a training data generation unit that generates training data, which is image data of training images obtained by combining the good product images with the defective part images, based on the defective part data, the good product data, and generation parameters; a training data storage unit that stores the training data; and a generation parameter setting unit that sets the generation parameters."

[0004] In this way, in Patent Document 1, a defective product image is generated by combining a non-defective product image with an image of a defective part, thereby compensating for the lack of defective product images. [Prior art documents] [Patent documents]

[0005] [Patent Document 1] Japanese Patent Publication No. 2020-027424 Summary of the Invention [Problem to be solved by the invention]

[0006] However, the learning data generated in Patent Document 1 is a pseudo-defective product image created by changing the size, angle, color, brightness, etc. of a defective part image and combining it with the same position on a good product image, as exemplified in paragraphs 0047-0048, Figure 6, etc. of the document. Therefore, the pseudo-defective product images that can be generated in Patent Document 1 are limited to pseudo-defective product images of processed products with the same specifications as an actually captured defective product image, and it was not possible to generate pseudo-defective product images of processed products with different specifications. Furthermore, Patent Document 1 was not able to generate pseudo-defective product images with defective parts in positions different from those of the actually captured defective product image, even for processed products with the same specifications.

[0007] For this reason, in Patent Document 1, if it is desired to generate a large number of pseudo-defective product images for each of processed products with multiple specifications, it is necessary to prepare defective part images for each specification of the processed product or for each position of the defective part, which requires a considerable amount of effort in the preparation work before generating learning data.

[0008] In light of this problem, the present invention aims to provide a pseudo-defect image generation device that can easily generate a variety of pseudo-defect images by using a common defect image when generating pseudo-defect images for multiple processed products with different specifications. [Means for solving the problem]

[0009] In order to solve the above problems, the pseudo-defect image generating device of the present invention is a pseudo-defect image generating device that generates pseudo-defect images for a learning device to learn, and is equipped with a defect library that stores defect portion images, defect placement rules that specify defects and inspection areas according to processing items based on management information that corresponds processing items to the contents that are permissible for the processing, and a pseudo-defect image generating unit that places the defect portion images in the inspection areas on a normal product image based on the defect placement rules to generate pseudo-defect images. [Effects of the Invention]

[0010] According to the pseudo-defect image generating device of the present invention, when generating pseudo-defect images for multiple processed products with different specifications, a common defect image can be used to easily generate a variety of pseudo-defect images. [Brief explanation of the drawings]

[0011] [Figure 1] Schematic diagram of a visual inspection system. [Figure 2] 1 is a diagram showing an outline of a pseudo defect image generating device according to a first embodiment. [Figure 3] 10 is a flowchart of a pseudo defect image generation process. [Figure 4A] FIG. 10 is a diagram illustrating an example of a GUI for a setting unit according to the first embodiment. [Figure 4B] FIG. 10 is a diagram illustrating an example of a GUI for a setting unit according to the first embodiment. [Figure 4C] FIG. 10 is a diagram illustrating an example of a GUI for a setting unit according to the first embodiment. [Figure 4D] FIG. 10 is a diagram illustrating an example of a GUI for a setting unit according to the first embodiment. [Figure 5] FIG. 10 is a diagram showing an outline of a pseudo defect image generating device according to a second embodiment. [Figure 6] FIG. 10 shows the arrangement of defects in Example 2. [Figure 7] FIG. 10 shows an image of a normal product in Example 3. [Figure 8] FIG. 10 is a diagram showing an outline of a pseudo-defect image generating device according to a fourth embodiment. [Figure 9] FIG. 10 is a diagram showing an outline of a pseudo-defect image generating device according to a fifth embodiment. [Figure 10] FIG. 10 shows an image of a normal product in Example 5. DETAILED DESCRIPTION OF THE INVENTION

[0012] Hereinafter, an embodiment of the pseudo defect image generating device of the present invention will be described with reference to the drawings. [Example]

[0013] First, a pseudo defect image generating apparatus 10 according to a first embodiment of the present invention will be described with reference to FIGS. 1 to 4D.

[0014] Fig. 1 is a schematic diagram of an appearance inspection system that inspects the appearance of a workpiece 1. As shown in the figure, this appearance inspection system includes a camera 2 that captures an image of the workpiece 1, an appearance inspection device 3 that performs an appearance inspection of the workpiece 1 based on an image P captured by the camera 2, and a transport device 4 that transports the workpiece 1 into the imaging range of the camera 2. Note that Fig. 1 illustrates two types of workpieces 1A and 1B with different specifications as the inspection targets, but there may be three or more types of workpieces 1 to be inspected.

[0015] The visual inspection device 3 incorporates a determiner 3a generated by a learning device 20. The learning device 20 is a device that generates the determiner 3a by using machine learning such as a deep neural network or a support vector machine on pseudo-defect images supplied from a pseudo-defect image generating device 10 (described later) as well as actually captured images of normal products and defective products. The generated determiner 3a is capable of visually inspecting all of the processed products 1 with different specifications that have been manufactured through the same processing process, and can sequentially determine whether the processed products 1 with various specifications that are sequentially transported by the transport device 4 are normal or not.

[0016] For example, the inspection object of the judger 3a is an engine piston (worked product 1A, 1B) of different specifications, both of which are manufactured through a casting process and a crown surface cutting process, and the metal processed portion W (W A , W B When defects (such as blowholes, scratches, and dents) of the processed product 1 are to be inspected, the learning device 20 performs machine learning on images of normal and defective products of the metal processed part W for each specification, thereby generating a classifier 3a that can perform visual inspection of any processed product 1.

[0017] The pseudo defect image generating device 10 of this embodiment, which can easily generate a variety of defective product images to be supplied to the learning device 20, will now be described in detail.

[0018] FIG. 2 is a diagram illustrating an outline of a pseudo-defect image generating device 10 according to a first embodiment. As shown in the figure, the pseudo-defect image generating device 10 according to the first embodiment includes a defective product image library 11, a normal product image library 12, a defect library 13, a setting user interface (hereinafter referred to as a "setting UI 14"), and a pseudo-image generating unit 15. The pseudo-defect image generating device 10 generates a pseudo-defect image according to a setting input from the setting UI 14 and outputs the generated pseudo-defect image to a learning device 20. Specifically, the pseudo-defect image generating device 10 is a computer including hardware such as a calculation device such as a CPU, a main storage device such as a semiconductor memory, an auxiliary storage device such as a hard disk, and a communication device. The calculation device executes a predetermined program loaded into the main storage device, and the auxiliary storage device stores predetermined data, thereby realizing the functions described below. However, the following description will be given in order of details of each unit, omitting such well-known techniques as appropriate.

[0019] The defective product image library 11 is a storage unit that stores defective product images Pa of at least one specification of processed product 1 (for example, processed product 1A). The defective product image Pa is an image that includes a defect blob b, which will be described later. The normal product image library 12 stores normal product images Pn (for example, normal product images Pn) of at least two specifications of processed product 1 (for example, processed products 1A and 1B). A , Pn B ) The defect library 13 is a storage unit that stores at least one pair of a defect label l and a defect patch p extracted from a defective product image Pa. The defect label l and the defect patch p will be described in detail later.

[0020] The setting UI 14 is a user interface that the user uses to set and input the defect label l and the inspection area R, and to generate a pseudo-defective product image, and specifically includes a display device such as a monitor, and an input device such as a keyboard, a mouse, a touch panel, etc. Details of the setting UI 14 will be described later with reference to FIGS. 4A to 4D.

[0021] The pseudo image generating unit 15 is composed of a defect library generating unit 15a, an inspection area generating unit 15b, a defect placement rule generating unit 15c, and a pseudo defective product image generating unit 15d.

[0022] The defect library generation unit 15a is a functional unit that mainly generates a defect label l and a defect patch p from a defective product image Pa. Therefore, the defect library generation unit 15a first acquires the defective product image Pa from the defective product image library 11 and displays it on the display of the setting UI 14. Thereafter, when the user specifies an arbitrary defect part blob b on the defective product image Pa displayed on the display, the defect library generation unit 15a stores the position and shape of the defect part blob b as a defect label l in the defect library 13. The defect library generation unit 15a also cuts out a portion that is the same as the defect label l from the defective product image Pa and stores it as a defect patch p in the defect library 13. Furthermore, the defect library generation unit 15a also stores the defect type, etc. of the defect part blob b registered by the user in the defect library 13.

[0023] In the example of Figure 2, the defect blob b in the defective product image Pa is a blowhole, and the defect library 13 stores a pair of data: a defect label l, which is information specifying the position and shape of the blowhole, and a defect patch p, which is image data of the vicinity of the blowhole. Normally, if the processing process of the processed product 1 is the same, the appearance of the defect does not depend on the specifications, so the defect library generated here can be shared even with processed products 1 (e.g., processed product 1B) with different specifications manufactured using the same processing process.

[0024] The inspection area generating unit 15b is a functional unit that generates an inspection area R on the normal product image Pn. For example, A Corresponding to the inspection area R A When generating the normal product image Pn, the inspection area generating unit 15b first selects the normal product image Pn from the normal product image library 12. A and displays it on the display of the setting UI 14. The user selects the periphery of the inspection target area (for example, the metal processed part W) on the displayed image. AWhen the contour line data traced by the mouse cursor is traced, the inspection area generating unit 15b converts the contour line data traced by the mouse cursor into the inspection area R. A Retain as.

[0025] If the specifications of the workpiece 1 to be inspected differ, the shape and size of the product will differ, so the inspection area R needs to be generated for each specification. Therefore, the inspection area generation unit 15b generates the normal product image Pn of the workpiece 1B in the same manner as above. B The inspection area R corresponding to B Hold.

[0026] It is also possible to generate multiple inspection areas R for one workpiece 1; for example, the casting surface and metal processed portion of the crown surface of an engine piston may be designated as different inspection areas, or the interior of the metal processed portion may be divided into multiple inspection areas according to their importance.

[0027] The defect placement rule generation unit 15c is a functional unit that generates a defect placement rule r based on pre-prepared management information i, etc. The management information i describes management items (inspection area R, defect type) and allowable contents (defect size specifications, etc.) in association with each other for each inspection process. The defect placement rule generation unit 15c stores the inspection area type, defect type, defect size, and placement method specified by the user on the setting UI 14 based on the management information i as a defect placement rule r.

[0028] For the inspection area R, one corresponding to the inspection area R described in the management information i is selected and specified from the inspection area types generated by the inspection area generation unit 15b. For the defect type, one corresponding to the defect type described in the management information i is selected and specified from the defect types stored in the defect library 13. For the defect size, the defect size described in the management information i is specified. For the placement method, one is selected and specified for each inspection area from pre-prepared placement methods, such as random placement, placement at equal intervals, and placement along the contour of the inspection area R. Normally, if the processing process is the same, the defect occurrence area within the processing area does not depend on the product type, and therefore the defect placement rule can be shared between product types.

[0029] The pseudo-defective product image generating unit 15d is a functional unit that generates a pseudo-defective product image Pv based on the defect placement rule r. Hereinafter, the pseudo-defective product image Pv of the processed product 1A will be described with reference to the flowchart of FIG. A The pseudo-defective product image generation process will be described in detail below, taking the case where the pseudo-defective product image is generated as an example.

[0030] First, in step S1, the pseudo-defective product image generating unit 15d selects a normal product image Pn of the processed product 1A from the normal product image library 12. A Get.

[0031] Next, in step S2, the pseudo-defective product image generating unit 15d generates a normal product image Pn A Inspection area R A The data is acquired from the inspection area generating unit 15b.

[0032] In step S3, the pseudo-defective product image generation unit 15d acquires defect patches p and defect labels l corresponding to the defect type and defect size specified in the defect placement rule r from the defect library 13. Specifically, defect patches p and defect labels l of the same defect type as the defect type specified in the defect placement rule r but of a size equal to or larger than the defect size specified in the defect placement rule r are acquired. This is to allow the determiner 3a to learn based on the pseudo-defective product image Pv in which only defect patches p of a specified size or larger are arranged.

[0033] In step S4, the pseudo-defective product image generating unit 15d extracts a portion corresponding to the defect label l from the defect patch p and generates a normal product image Pn A Upper inspection area R A The pseudo-defective product image Pv A For example, if the defect placement rule r specifies placement along the contour of the inspection area R as the placement method, the pseudo-defective product image Pv A As shown in the example, the inspection area R A The defect patch p is arranged along the contour of the defect patch p. Although not shown, the pseudo-defective product image Pv AA pseudo defect label image is also generated in which defect labels are placed at the same positions as the defect patch p.

[0034] On the other hand, the pseudo-defective image Pv of the processed product 1B, which has a different specification of the metal processed part W from the processed product 1A. B When generating the inspection area R, the same process as in Figure 3 is used. B A pseudo-defective product image Pv with defect patches p arranged along the contour of B However, the pseudo-defective product image Pv B Since the defect patch p and defect label l used in generating the pseudo-defective image Pv are common, even if the defective image of the processed product 1B cannot be prepared, as long as the defective image of the processed product 1A is prepared, the pseudo-defective image Pv B can be generated.

[0035] <Example of the GUI for Settings UI14> Next, a specific example of a GUI (Graphical User Interface) of the setting UI 14 will be described with reference to FIGS. 4A to 4D.

[0036] 4A shows an example of a GUI for generating a defect library. As shown in this figure, the processing menu M on the display of the setting UI 14 lists processes that can be executed by the pseudo-defect image generation device 10, and the user can select a desired one from these.

[0037] For example, when the user selects defect library generation M1, the defect library generation unit 15a acquires defective product image Pa from the defective product image library 11 and displays it in image display area V. When the user traces a defect area in defective product image Pa with mouse cursor C, the traced area is displayed as defect blob b. The user also inputs the defect type (e.g., a blowhole) and defect size (e.g., 0.5 mm) of defect blob b in defect type setting area B1. Thereafter, when the user selects save M2 from the processing menu M, the defect library generation unit 15a stores the defect blob b as defect label l in the defect library 13, and also extracts a portion identical to the defect label l from defective product image Pa as defect patch p, and stores this in the defect library 13 together with the defect type (e.g., a blowhole) specified by the user.

[0038] FIG. 4B shows an example of a GUI for generating an inspection area R. As shown here, the name of the inspection target product can be input in the product type setting area B2. When the user selects the inspection area generation M3 from the processing menu M and then inputs the product type name (in the figure, the product 1A is input), the inspection area generation unit 15b selects the normal product image Pn of the product 1A from the normal product image library 12. A is acquired and displayed in the image display area V. The area on the displayed image traced by the user with the mouse cursor C is displayed as the inspection area R. The inspection area name can also be input in the inspection area type input area B3. The user inputs the inspection area type (in the figure, the inspection area R A When the user selects Save M2 from the processing menu M, the inspection area generation unit 15b creates the inspection area R of the processed product 1A. A Retain as.

[0039] FIG. 4C shows an example of a GUI for generating a defect placement rule r. In the placement rule setting area B4, it is possible to input a method for placing defects in the pseudo-defective product image Pv. After the user selects placement rule setting M4 from the processing menu M, the user inputs the inspection area type, defect type, defect size, and placement method (in the figure, the inspection area R is inputted in this order). A, blowhole, 0.5 mm, along the inspection area contour are input), and if Save M2 is selected from the processing menu M, the defect placement rule generation unit 15c stores the inspection area type, defect type, defect size, and placement method specified by the user as a set, as a defect placement rule r.

[0040] FIG. 4D shows an example of a GUI for generating a pseudo-defective product image Pv. When the user selects the pseudo-defective product image generation M5 from the processing menu M and inputs the product type and the type of inspection area (in the figure, the processed product 1A and the inspection area R A ), the pseudo-defective product image generating unit 15d selects the normal product image Pn of the processed product 1A from the normal product image library 12. A is acquired and displayed in the image display area V. Furthermore, the inspection area generating unit 15b acquires the inspection area R A and overwrites and displays it in the image display area V. Furthermore, a defect patch p and a defect label l corresponding to the specified defect type and defect size are obtained from the defect library 13, and are overwritten and displayed in the image display area V in the specified arrangement manner (along the contour in the figure). When the user selects save M2, the pseudo-defective product image generation unit 15d holds the displayed image as a pseudo-defective product image Pv. Note that this processing is equivalent to that described in the flowchart of FIG. 3.

[0041] According to the present embodiment described above, it is possible to provide a pseudo-defect image generating device that can share patch images and labels of defect portions between product types, thereby reducing the effort required to collect images of defect portions for each product type. It is also possible to provide a pseudo-defect image generating device that can share defect placement rules for placing defects in an inspection area between product types, thereby reducing the effort required to specify defect placement for each product type. It is also possible to provide a pseudo-defect image generating device that can determine defect size and defect spacing according to the settings of the image area size and processing density during learning and evaluation of the learning device, thereby generating pseudo-defect images with defect placements that are efficient for learning. [Example]

[0042] Next, a second embodiment of the present invention will be described with reference to Figures 5 and 6. Note that a duplicated description of points common to the above-mentioned embodiments will be omitted.

[0043] In the first embodiment, the pseudo-defective product image Pv was generated without taking into consideration the specifications of the learning device 20, but in the pseudo-defective product image generating device 10 of the present embodiment, the pseudo-defective product image Pv is generated taking into consideration the specifications of the learning device 20. In order to determine the presence or absence of a defect through machine learning in the learning device 20 and to output the result together with the position of the defect, it is preferable to, for example, divide the input image into small rectangular areas, determine the presence or absence of a defect for each divided rectangular area, and determine the position corresponding to the rectangular area where the defect is located as the position of the defect.

[0044] For this reason, the image region size and processing density during learning and evaluation are set as specifications for the learning device 20 of this embodiment. The image region size refers to the size of the rectangular region described above. The processing density refers to the degree of overlap when dividing into rectangular regions. For example, a processing density of 1 means that there is no overlap between rectangular regions, a processing density of 2 means that the rectangular regions overlap by 1 / 2, and a processing density of 3 means that the rectangular regions overlap by 2 / 3.

[0045] In this embodiment, the operation of the pseudo-defective product image generating unit 15d is basically the same as in the first embodiment, but differs in the following respects: The pseudo-defective product image generating unit 15d in this embodiment generates the pseudo-defective product image Pv based on information acquired from the learning device 20 (image region size, processing density).

[0046] For example, the pseudo-defective product image Pv of processed product 1A A When generating the pseudo-defective product image, the pseudo-defective product image generating unit 15d of this embodiment first performs steps S1 and S2 similar to those of the first embodiment.

[0047] Then, in step S3, defect patches p and defect labels l are acquired that are the same defect type as the defect type specified in the defect placement rule r, are equal to or larger than the defect size specified in the defect placement rule r, and are smaller than the image region size Ls acquired from the learning device 20. The reason for limiting acquisition to defect patches p smaller than the image region size Ls acquired from the learning device 20 is that only defect patches p smaller than the image region size Ls, which is a specification of the learning device 20, are acquired as the pseudo-defective product image Pv A This is to avoid a decrease in learning efficiency due to the occurrence of rectangular areas that only contain defects when the input image to the learning device 20 is divided into small rectangular areas.

[0048] Next, in step S4, a portion corresponding to the defect label l is extracted from the defect patch p, and a normal product image Pn A Upper inspection area R A , according to the placement method specified in the defect placement rule r, the defect interval Δx is placed so as to satisfy the following two formulas as shown in FIG. 6 from the image region size Ls, processing density Ld, and defect label size Dl obtained from the learning device 20, and a pseudo-defective product image Pv A Generate.

[0049] Ls+Dl≦Δx This is because by arranging the defect patches p so that there is one or less in the rectangular area 60, it is possible to avoid a decrease in learning efficiency due to two or more defect patches being arranged in the image area.

[0050] Δx <Ls+Dl+Ls / Ld This is to avoid a decrease in learning efficiency caused by placing no defect patches within the image region size Ls by placing one or more defect patches within the image region size Ls. Note that although Fig. 6 shows the defect placement in the horizontal direction, the same applies to the defect placement in the vertical direction.

[0051] According to this embodiment, the defect size and defect interval can be determined according to the settings of the image area size and processing density during learning and evaluation of the learning device, and a pseudo-defect image generating device can be provided that generates pseudo-defect images with defect arrangements that are efficient for learning. [Example]

[0052] Next, a third embodiment of the present invention will be described with reference to Fig. 7. Note that a duplicated description of points common to the above-mentioned embodiments will be omitted.

[0053] For example, in this embodiment, the pseudo-defective product image Pv A When generating the pseudo-defective product image, the pseudo-defective product image generating unit 15d of this embodiment first performs steps S1, S2, and S3 similar to those of the first embodiment.

[0054] Then, in step S4, a portion corresponding to the defect label l is extracted from the defect patch p, and a normal product image Pn A Upper inspection area R A The pseudo-defective product image Pv A Generate.

[0055] At this time, the gradation value of the defect patch p is corrected and synthesized. For example, as shown in FIG. A The gradation value of the point 70 where the above defect patch p is to be synthesized is Ba, the gradation value of the point 71 corresponding to the defect label l of the defect patch p is Bc, and the gradation value of the point 72 corresponding to the background that does not correspond to the defect label l of the defect patch p is Bb. The corrected gradation value Bd of the defect patch is determined and synthesized based on the following formula.

[0056] Bd=Ba×Bc / Bb According to this embodiment, it is possible to provide a pseudo-defect image generating device that generates a pseudo-defect image with natural gradations when the gradation values ​​of the normal product image and the gradation values ​​of the background of the defect patch are different. [Example]

[0057] Next, a fourth embodiment of the present invention will be described with reference to Fig. 8. Note that a duplicated description of points common to the above-mentioned embodiments will be omitted.

[0058] As shown in FIG. 8, a normal defect comparison unit 80 is added to the defect library generation unit 15a of this embodiment, and generates a defect patch p and a defect label l from a defective product image Pa using a method different from that of the first embodiment.

[0059] Specifically, the defect library generation unit 15a first acquires a defective product image Pa from the defective product image library 11, and acquires a normal product image Pn from the normal product image library 12. Then, the normal defect comparison unit 80 compares the two images, and designates an area with a difference of a predetermined amount or more as a defect blob b, designates the defect blob b as a defect label l, and designates a portion identical to the defect label l extracted from the defective product image Pa as a defect patch p, which is stored in the defect library 13 together with a defect type designated by the user, such as a blowhole.

[0060] In other words, according to this embodiment, a pseudo defect image generating device can be provided that can create a defect library without the user having to specify a defect blob b, thereby reducing the user's effort in creating a defect library. [Example]

[0061] Next, a fifth embodiment of the present invention will be described with reference to Figures 9 and 10. Note that a duplicated description of points common to the fourth embodiment will be omitted.

[0062] As shown in Figure 10, the defect library generation unit 15a of this embodiment has a texture extraction unit 90 added to the normal defect comparison unit 80, and generates a defect patch p and a defect label l from a defective product image Pa using a method different from that of embodiments 1 and 4.

[0063] Specifically, the defect library generation unit 15a first acquires a normal product image Pn from the normal product image library 12 and displays it on the display of the setting UI 14. The workpiece 1A to be inspected has undergone some processing before inspection. For example, the workpiece 1A to be inspected is a cast part, and part of its surface has been machined.

[0064] In this case, as shown in FIG. 10, the normal product image Pn A In the above image, the processed product 1A is divided into a casting surface portion 101 and a machined portion 102. The texture cutout unit 90 defines a region designated by the user on the displayed image, for example, a region corresponding to a casting surface cutout portion 103 designated by tracing the casting surface portion 101 with a mouse cursor C, as a defect label l, and defines the same portion as the defect label l as a normal product image Pn. A The defect extracted from the defect library 13 is defined as a defect patch p and stored together with a defect type, for example, a casting surface remaining defect, in the defect library 13. From this defect library, a casting surface remaining defect can be synthesized by arranging the defect in the metal processed part with reference to the defect placement rule.

[0065] According to this embodiment, a pseudo-defect image generating device can be provided that does not require defective product images Pa, can create a defect library from normal product images Pn, and can reduce the user's effort in collecting images of defective areas. [Example]

[0066] Next, a sixth embodiment of the present invention will be described. Note that a description of points common to the above-described embodiments will be omitted. In the above-described embodiments, the defect library generation unit 15a generates the defect patch p from the defective product image Pa. However, for example, the defect patch p may be an image artificially generated to imitate a defect portion. Note that the image artificially generated to imitate a defect portion is an image equivalent to a defect drawn by a user using paint software or the like. [Explanation of symbols]

[0067] 1...Processed products 2. Camera 3...Visual inspection equipment 3a...Judgment device 4...Transportation device 10...Pseudo defect image generating device 11...Defective Product Image Library 12...Normal product image library 13...Defect Library 14. Settings UI 15...Pseudo image generation unit 15a...Defect library generation unit 15b...Inspection area generation unit 15c...Defect placement rule generation unit 15d…False defective product image generation unit 20...Learning device Pn...Normal product image Pa...Defective product image Pv…Image of pseudo-defective product V...Image display area C...Mouse cursor M...Processing menu M1: Defect library generation M2…Save M3...Inspection area generation M4…Placement rule settings M5…Image generation of pseudo-defective products B1: Defect type setting area B2…Type setting area B3: Test area type input area B4: Placement rule setting area i…Management information r...defect placement rule b...defect blob l...Defect label p...defect patch R...Inspection area W…Metal processing department

Claims

1. A pseudo defect image generating device that generates a pseudo defect image for a learning device to learn, a defect library storing images of defective portions; a defect placement rule that specifies defects and inspection areas according to the processing items based on management information that associates processing items with permissible processing contents; a pseudo-defect image generating unit that generates a pseudo-defect image by arranging the defective portion image in the inspection area on the normal product image based on the defect arrangement rule; Equipped with an image region size to be learned and a processing density for learning are set in the learning device; The pseudo defect image generating device is characterized in that the pseudo defect image generating unit generates the pseudo defect image so that the arrangement interval of the defects is equal to or greater than the image area size and equal to or less than the processing density.

2. 2. The pseudo defect image generating apparatus according to claim 1, further comprising: a defective product image library storing defective product images of processed products of at least one specification; a normal product image library storing normal product images of processed products of at least two specifications; It has The defective part image stored in the defect library is cut out from the defective product image, A pseudo-defect image generating device characterized in that when the pseudo-defect image generating unit generates the pseudo-defect image, a common defect portion image is used regardless of whether a pseudo-defect image of a processed product of any specification is generated.

3. 2. The pseudo defect image generating apparatus according to claim 1, The pseudo-defect image generating device is characterized in that the pseudo-defect image generating unit generates the pseudo-defect image by correcting the gradation value of the defective portion image according to the gradation value of the normal product image.

4. 2. The pseudo defect image generating apparatus according to claim 1, The pseudo-defect image generating device is characterized in that the pseudo-defect image generating unit stores in the defect library an image of a defective part extracted by comparing an image of a defective product with an image of a normal product.

5. 2. The pseudo defect image generating apparatus according to claim 1, The pseudo-defect image generating device is characterized in that the pseudo-defect image generating unit stores an image of a region designated by a user from a normal product image as a defective portion image in the defect library.

6. 2. The pseudo defect image generating apparatus according to claim 1, 10. A pseudo-defect image generating device, wherein the defect portion image is an image artificially generated to imitate an actual defect.

Citation Information

Patent Citations

  • Pseudo defective image automatic creation device and imaging inspection device

    JP2005156334A

  • Appearance inspection apparatus, and apparatus, method and program for generating appearance inspection discriminator

    JP2011214903A

  • Learning data generating device, discrimination model generating device, and program

    JP2020027424A

  • Analyzer and analyzing method

    JP2021128406A

  • Machine learning model generation device, method, program, inspection device, inspection method, and print device

    WO2020022024A1