The present disclosure relates to an image generation device, an image generation method, and a program.
Utilization of AI is being studied in a case where a defect is detected (screened) from an inspection image. In order to correctly detect a defect from a certain inspection image, AI needs to be trained with a sufficient amount of defect images.
In addition, in order to check whether or not a defect is properly detected by the trained screening AI, it is necessary to adjust the detection accuracy or the like, by comparing the detectabilities of the inspector and the screening AI with each other using a test piece into which an artificial defect is inserted.
As a technique related to the above contents, PTL 1 discloses a method for producing an artificial defect material and an FRP structure.
[PTL 1] Japanese Unexamined Patent Application Publication No. 2016-090281
For the above reason, it is necessary to manufacture a large number of test pieces in order to develop the screening AI, which increases the development cost.
An object of the present invention is to efficiently train a screening AI that detects a defect from an inspection image.
According to one aspect of the present invention, an image generation device includes an image generation unit that by using an image generation algorithm that is trained based on a defect image that is an inspection image, in which a defect is shown, and a label image in which a label corresponding to a type and a shape of the defect is attached to the defect image, inputs a label image for image generation that is generated by attaching a desired label to a background image, and generates a pseudo defect image by drawing a pseudo defect corresponding to the label attached to the label image for image generation, on the background image, in which the image generation unit draws a type of pseudo defect corresponding to color of the label.
Further, according to one aspect of the present invention, an image generation method includes a step of, by using an image generation algorithm that is trained based on a defect image that is an inspection image, in which a defect is shown, and a label image in which a label corresponding to a type and a shape of the defect is attached to the defect image, inputting a label image for image generation that is generated by attaching a desired label to a background image and generating a pseudo defect image by drawing a pseudo defect corresponding to the label attached to the label image for image generation, on the background image, in which in the step of generating the pseudo defect image, a type of pseudo defect corresponding to color of the label is drawn.
Further, according to one aspect of the present invention, a program causes a computer to execute a step of, by using an image generation algorithm that is trained based on a defect image that is an inspection image, in which a defect is shown, and a label image in which a label corresponding to a type and a shape of the defect is attached to the defect image, inputting a label image for image generation that is generated by attaching a desired label to a background image and generating a pseudo defect image by drawing a pseudo defect corresponding to the label attached to the label image for image generation, on the background image, in which in the step of generating the pseudo defect image, a type of pseudo defect corresponding to color of the label is drawn.
According to the above-described image generation device, image generation method, and program, the screening AI that detects a defect from an inspection image can be efficiently trained.
Hereinafter, an image generation device according to a first embodiment will be described in detail with reference to
The image generation device 1 according to the first embodiment shown in
In the present embodiment, the screening AI is an AI that receives an ultrasonic inspection image for a structure used in, for example, an aircraft, or the like, as an input, and detects a defect from the inspection image. Further, the image generation device 1 according to the present embodiment is a device that draws a pseudo defect with respect to an ultrasonic inspection image of a normal portion of the structure, and generates a pseudo defect image by ultrasonic inspection.
As shown in
The image generation unit 10 is implemented by operating the CPU according to a program prepared in advance. The processing content of the image generation unit 10 will be described later.
The memory 11 is a so-called main storage device, and provides a storage area necessary for the operation of the CPU 10.
The output device 12 is a so-called liquid crystal display monitor, a speaker, or the like.
The input device 13 is an input device such as a mouse, a keyboard, and a touch sensor.
The recording medium 14 is a large-capacity auxiliary storage device such as an HDD or an SSD. In the present embodiment, the image generation algorithm AR that has been trained in advance is recorded.
The image generation algorithm AR is an image generation AI that is trained, in the training stage, based on a pair of a defect image that is an inspection image, in which an actual defect is shown, and a label image (described later) with a label corresponding to the type and shape of the defect. The above-described image generation unit 10, by using the image generation algorithm AR, draws a pseudo defect corresponding to the label on the background image, from the label image for image generation in which the background image of the good portion is labeled, and generates a pseudo defect image.
In the present embodiment, it is assumed that the image generation algorithm AR is pix2pix, which is an image generation algorithm using a Generative Adversarial Network (GAN). pix2pix can generate, from one image, the other image that is paired with the one image, by training the relationship between two paired images.
In another embodiment, the image generation algorithm AR is not limited to pix2pix, and may be another algorithm having the same function.
As shown in
The above-described screening AI is required to properly detect defects (at the same level as the determination of the inspector) in all the inspection images acquired in this way.
A prior training method for the image generation algorithm AR will be described in detail with reference to
In the inspection by an ordinary inspector, a test piece (criteria sample) in which a defect is artificially formed is prepared corresponding to the structure X (
In the present embodiment, the image generation algorithm AR is trained using a pair of a defect image PD that is an inspection image (an inspection image in which a defect to be detected is shown) of the test piece and a label image PD in which a label corresponding to the type and shape of the defect is attached to the defect image PL.
For example, in the example shown in
In the training stage, a large number of pairs of such defect images PD and label images PL are prepared, and the correspondence thereof is trained.
As shown in
Further, in the present embodiment, in the training stage of the image generation algorithm AR, training is performed in consideration of the background pattern of the defect image PD.
Therefore, in the present embodiment, when the image generation algorithm AR is trained, training is performed while classifying the pair of the defect image PD and the label image PL by the background pattern (A, B, C). By doing so, when drawing a pseudo defect (for example, the defect D1) corresponding to a certain label color (for example, blue) on the background image, the image generation algorithm AR can draw a pseudo defect matching the background pattern (A, B, C) of the background image.
In addition,
Hereinafter, the process of the image generation unit 10 using the trained image generation algorithm AR will be described in detail with reference to
First, the image generation unit 10 acquires a label image for image generation (step S01). Here, the label image for image generation is an image in which a desired label is attached to a background image having no defects by processing.
As a specific example, the label image PI for image generation shown in
Returning to
Subsequently, the image generation algorithm AR draws a pseudo defect according to the color, shape, density, and background pattern of the label (step S03). Then, the image generation unit 10 outputs a pseudo defect image, which is an image in which the pseudo defects corresponding to the labels are drawn (step S04).
In the pseudo defect image PF shown in
Further, in the pseudo defect image PF, pseudo defects having a hue matching the background pattern of the background image BG are drawn.
Next, with reference to
The image generation algorithm AR according to the present embodiment draws a pseudo defect of the brightness corresponding to the brightness of the label attached to the label image PI for image generation. Specifically, as shown in
As described above, the image generation device 1 (image generation unit 10) according to the first embodiment draws the pseudo defect of the type (for example, “defect with black inside”, “defect with white border inside”, “defect with unclear boundary”, and “defect with gray inside”) of the color (for example, “red”, “blue”, “yellow”, and “green”) of the label attached to the label image PI for image generation.
In this way, it is possible to generate a pseudo defect image in which a desired type of pseudo defect is drawn, simply by a user selecting a label color and attaching a label.
Therefore, since a plurality of types of pseudo defect images can be used without requiring a large number of test pieces, the screening AI can be efficiently trained.
In addition, the image generation device 1 (image generation unit 10) according to the first embodiment draws a pseudo defect corresponding to a combination of a pattern (A, B, C) of a background image in the label image PI for image generation and a label.
By doing so, it is possible to draw a pseudo defect matching the background image for each background pattern.
In addition, the image generation device 1 (image generation unit 10) according to the first embodiment draws pseudo defects having different brightness, corresponding to the brightness of the label attached to the label image PI for image generation.
In this way, the brightness of the pseudo defect to be drawn can be controlled as desired by adjusting the RGB value.
In addition, in the first embodiment (and modification example), the procedures of various processes of the image generation device 1 described above are stored in a computer-readable recording medium in the form of a program, and the above various processes are performed by the program being read and executed by the computer. Further, the computer-readable recording medium is a magnetic disk, a magneto-optical disk, a CD-ROM, a DVD-ROM, a semiconductor memory, or the like. Further, this computer program may be distributed to a computer via a communication line, and the computer receiving the distribution may execute the program.
The program may be for implementing a part of the above-described functions. Further, the program may be a so-called difference file (difference program), which can implement the above-described functions in combination with a program already recorded in the computer system.
In addition, it is possible to appropriately replace the components in the above-described embodiments with known components without departing from the spirit of the present invention. It should be noted that the technical scope of the present invention is not limited to the above-described embodiments, and various modifications can be made without departing from the spirit of the present invention.
The image generation device 1, the image generation method, and the program described in each embodiment are understood as follows, for example.
(1) The image generation device (1) according to a first aspect includes an image generation unit (10) that by using an image generation algorithm (AR) that is trained based on a defect image (PD) that is an inspection image, in which a defect is shown, and a label image (PL) in which a label corresponding to a type and a shape of the defect is attached to the defect image (PD), inputs a label image (PI) for image generation that is generated by attaching a desired label to a background image, and generates a pseudo defect image (PF) by drawing a pseudo defect corresponding to the label attached to the label image (PI) for image generation, on the background image, in which the image generation unit (10) draws a type of pseudo defect corresponding to color of the label.
(2) In the image generation device (1) according to a second aspect, the image generation unit (10) draws a pseudo defect corresponding to the combination of the pattern of the background image and the label.
(3) In the image generation device (1) according to a third aspect, the image generation unit (10) draws a pseudo defect having different brightness, corresponding to brightness of the label.
(4) The image generation method according to a fourth aspect includes a step of, by using an image generation algorithm AR that is trained based on a defect image that is an inspection image, in which a defect is shown, and a label image in which a label corresponding to a type and a shape of the defect is attached to the defect image, inputting a label image for image generation that is generated by attaching a desired label to a background image and generating a pseudo defect image by drawing a pseudo defect corresponding to the label attached to the label image for image generation, on the background image, in which in the step of generating the pseudo defect image, a type of pseudo defect corresponding to color of the label is drawn.
(5) A program according to a fifth aspect causes a computer to execute a step of, by using an image generation algorithm AR that is trained based on a defect image that is an inspection image, in which a defect is shown, and a label image in which a label corresponding to a type and a shape of the defect is attached to the defect image, inputting a label image for image generation that is generated by attaching a desired label to a background image and generating a pseudo defect image by drawing a pseudo defect corresponding to the label attached to the label image for image generation, on the background image, in which in the step of generating the pseudo defect image, a type of pseudo defect corresponding to color of the label is drawn.
According to the above-described image generation device, image generation method, and program, the screening AI that detects a defect from an inspection image can be efficiently trained.
Filing Document | Filing Date | Country | Kind |
---|---|---|---|
PCT/JP2020/032124 | 8/26/2020 | WO |