WO2022239671A1 - 画像処理方法、コンピュータプログラム、画像処理装置、および、訓練方法 - Google Patents

画像処理方法、コンピュータプログラム、画像処理装置、および、訓練方法 Download PDF

Info

Publication number
WO2022239671A1
WO2022239671A1 PCT/JP2022/019287 JP2022019287W WO2022239671A1 WO 2022239671 A1 WO2022239671 A1 WO 2022239671A1 JP 2022019287 W JP2022019287 W JP 2022019287W WO 2022239671 A1 WO2022239671 A1 WO 2022239671A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
image data
interest
partial
generated
Prior art date
Application number
PCT/JP2022/019287
Other languages
English (en)
French (fr)
Inventor
航平 渡邉
Original Assignee
ブラザー工業株式会社
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by ブラザー工業株式会社 filed Critical ブラザー工業株式会社
Publication of WO2022239671A1 publication Critical patent/WO2022239671A1/ja

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis

Definitions

  • This specification relates to image processing using generative models.
  • Patent Literature 1 proposes a technique for classifying microscope images using a neural network.
  • a generative model that generates image data can be used as a machine learning model.
  • the generative model for example, uses input image data to generate image data corresponding to the input image data. There was room for improvement in constructing the generative model so as to generate appropriate image data.
  • This specification discloses a technique for appropriately configuring a generative model.
  • [Application Example 1] In an image processing method for processing image data, inputting attention input image data representing an optically read attention target object to a first generation model allows correspondence to the attention input image data.
  • a first generating step of generating first generated image data of interest wherein the first generative model inputs image data representing an optically read image of an object into the first generative model inputting the first generated image data of interest to a second generation model, wherein the image of the generated image data is a generative model trained so as to approximate the computer graphics image of the object;
  • the second generation model generates the image data representing the image of the object in the second generation step.
  • the second generating step which is a generative model trained to generate image data representing an image of a non-defective object by inputting to the model; a third generating step of generating difference image data of a difference image indicating a difference between the generated image data of interest and the image of generated image data of interest, wherein the first generative model is a generative adversarial network having a generative network and an identification network; wherein the identification network is an image of image data generated by inputting input image data for training into the generation network, a first partial region in a first image a first partial image data representing a first partial image showing at least part of an image of and a second part showing at least part of an image of a second partial area in a second image which is a computer graphics image for training and second partial image data representing an image into said identification network.
  • the first generative model is designed so that the image of the image data generated by inputting the image data representing the optically read image of the object to the first generative model approaches the computer graphics image of the object.
  • the second generative model can generate the second generated image data of interest representing an image of the object of interest without defects. can be generated properly. Therefore, the difference image data of the difference image indicating the difference between the image of the first generated image data of interest and the image of the second generated image data of interest is the input image data of interest regardless of the conditions for reading the object of interest. , can be adequately represented.
  • a training method for an adversarial generative network having a generative network and a discriminating network, wherein input image data for training is input to the generative network to generate first image data of a first image. randomly determining a first partial area in said first image; and a first partial image representing at least a part of an image of said first partial area in said first image.
  • the variety of images input to the identification network for training of the adversarial generative network is improved, so the identification network, and thus the adversarial generative network having the identification network and the generative network, can be appropriately can train.
  • FIG. 1 is an explanatory diagram showing an image processing apparatus as one embodiment
  • FIG. 5 is a block diagram showing an example of a first model 500
  • FIG. (A) is a block diagram showing an example of a second generative model 600
  • (B) is a block diagram showing an outline of training of the second generative model 600.
  • FIG. 5 is a flow chart showing an example of a first training process for the first model 500
  • 5 is a flow chart showing an example of a first training process for the first model 500
  • 6 is a flowchart showing an example of a second training process for the second generative model 600
  • 6 is a flowchart showing an example of inspection processing
  • 1 is a schematic diagram of an inspection process
  • FIG. (A) and (B) are schematic diagrams showing examples of images displayed on the display unit 240.
  • FIG. 1 is a schematic diagram of an inspection process
  • FIG. (A) and (B) are schematic diagrams showing examples of images displayed on the display unit 240.
  • FIG. 1 is
  • FIG. 1 is an explanatory diagram showing an image processing apparatus as one embodiment.
  • the image processing apparatus 200 is, for example, a personal computer.
  • the image processing apparatus 200 processes the image data of the photographed image of the object (in this embodiment, the label sheet LB pasted on the printer DV).
  • the image processing device 200 includes a processor 210 , a storage device 215 , a display section 240 , an operation section 250 and a communication interface 270 . These elements are connected to each other via buses.
  • Storage 215 includes volatile storage 220 and nonvolatile storage 230 .
  • the display unit 240 is a device configured to display an image, such as a liquid crystal display or an organic EL display.
  • the operation unit 250 is a device such as a button, a lever, a touch panel overlaid on the display unit 240, and configured to receive an operation by a user.
  • a user can input various instructions to the image processing apparatus 200 by operating the operation unit 250 .
  • the communication interface 270 is an interface for communicating with other devices (eg, USB interface, wired LAN interface, IEEE802.11 wireless interface).
  • a digital camera 100 is connected to the communication interface 270 .
  • the digital camera 100 optically reads the label sheet LB pasted on the printer DV to generate image data representing the read label sheet LB.
  • the label sheet LB is a rectangular sheet representing various objects including character strings.
  • Appropriate character strings are associated in advance with printer DV models. It should be noted that manufacturing errors can cause defects in the character string on the label sheet LB. For example, label sheet LB may represent an incorrect string. Also, part or all of the appropriate character string may be missing. In this embodiment, the image processing apparatus 200 inspects label sheets for defects.
  • the processor 210 is a device configured to perform data processing, such as a CPU.
  • the volatile memory device 220 is, for example, a DRAM
  • the non-volatile memory device 230 is, for example, a flash memory.
  • the nonvolatile storage device 230 stores programs 231 , 232 , 233 , the first model 500 , the first type training data 590 , the second generation model 600 and the second type training data 690 .
  • Models 500, 600 are each predictive models with artificial neural networks.
  • First model 500 includes first generative model 510 and first discriminative model 520 .
  • the first generative model 510 of the first model 500 uses the image data representing the label sheet LB optically read by the digital camera 100 to generate a computer graphics image (details will be described later) of the same label sheet LB. generates image data such as The first generative model 510 is trained to mitigate the effects of noise in the image and reading conditions.
  • First discriminative model 520 is used for training first generative model 510 .
  • the first model 500 is a program module.
  • the first type training data 590 is image data for training the first model 500 .
  • the second generative model 600 uses the image data generated by the first generative model 510 to generate image data representing a defect-free label sheet.
  • the second generative model 600 is trained so that even if the label sheet represented by the image data input to the second generative model 600 has defects, image data representing a label sheet without defects is generated. be done.
  • the second generative model 600 is a program module.
  • the second type training data 690 is image data for training the second generative model 600 .
  • the first program 231 is a program for training the first model 500.
  • a second program 232 is a program for training the second generative model 600 .
  • the third program 233 is a program for label sheet inspection processing.
  • Processor 210 temporarily stores various intermediate data used to execute programs 231, 232, and 233 in storage device 215 (eg, either volatile storage device 220 or nonvolatile storage device 230). . Details of the programs 231, 232, 233 and the models 500, 600 will be described later.
  • FIG. 2 is a block diagram showing an example of the first model 500.
  • the first model 500 is constructed using so-called Generative Adversarial Networks (GANs).
  • GANs Generative Adversarial Networks
  • the first model 500 has a first generative model 510 (ie, generative network) and a first discriminative model 520 (ie, discriminative network).
  • the image data I5id of the image I5i representing the label sheet LBi read by the digital camera 100 is input to the first generation model 510 of the first model 500 .
  • the first generation model 510 generates image data I51d representing an image I51 of the same label sheet LBi as the label sheet LBi represented by the input image data I5id.
  • the position and size of the label sheet LBi in the generated image I51 are the same as the position and size of the label sheet LBi in the input image I5i.
  • First generative model 510 is trained so that image I51 of image data I51d generated by first generative model 510 approaches a computer graphics image.
  • a computer graphics image is an image generated by a computer.
  • Computer graphics images are generated, for example, by rendering (also called rasterizing) vector data containing drawing commands for drawing objects.
  • An image representing an object read by a reading device such as the digital camera 100 (also referred to as a read image) may contain various noises generated by the reading device.
  • the read image can vary in various ways depending on the reading conditions such as the brightness of the light source during reading, the color of the light source, and the positional relationship between the object and the reading device.
  • the color of the object in the read image can vary depending on the brightness of the light source and the color of the light source.
  • the shape of the object in the read image can be geometrically distorted depending on the positional relationship between the object and the reader (e.g.
  • Computer graphics images are produced insensitive to reading conditions and noise introduced by the reading device.
  • the trained first generative model 510 mitigates the effects of reading conditions and noise contained in the image of the label sheet.
  • the image data I5id input to the first model 500 is hereinafter also referred to as input image data I5id, and the image I5i of the input image data I5id is also referred to as input image I5i.
  • the image data I51d generated by the first model 500 is also called first generated image data I51d, and the image I51 of the first generated image data I51d is also called first generated image I51.
  • the images I5i and I51 are each rectangular images (256 pixels high and 512 pixels wide).
  • the shapes of the images I5i and I51 are the same as the shape of the label sheet.
  • Image data I5id and I51d are color bitmap data indicating the color of each pixel in three channels of R (red), G (green) and B (blue).
  • the number of elements of the input image data I5id (here, height*width*number of channels) is 256*512*3.
  • Each color value of RGB is represented by 256 gradations from 0 to 255.
  • the label sheet LBi of the input image I5i may have defects such as missing character strings and typographical errors. As will be described later, if the label sheet LBi of the input image I5i has a defect, the first generated image I51 represents the label sheet LBi having the same defect.
  • the first generative model 510 is configured using a so-called autoencoder.
  • the first generative model 510 has a first encoder 512 and a first decoder 517 .
  • the first encoder 512 performs dimension reduction processing on the input image data to generate first feature data 515 indicating features of the input image.
  • the configuration of the first encoder 512 is as follows.
  • the first encoder 512 has five convolutional layers arranged in order from the upstream side. Each convolutional layer uses a stride of 2 to reduce the number of elements corresponding to the height and the number of elements corresponding to the width (the number of elements corresponding to the number of channels increases). Batch normalization is applied to each of the second to fifth convolutional layers.
  • the activation function for each layer is LeakyReLU.
  • the five convolution layers change the number of data elements from "256*512*3" to "128*256*64", “64*128*128”, “32*64*256”, "16* 32*512” and then “8*16*512”.
  • the number of elements of the first feature data 515 is 8*16*512.
  • the first decoder 517 executes dimension restoration processing on the first feature data 515 to generate first generated image data I51d.
  • the configuration of the first decoder 517 is as follows.
  • the first decoder 517 has five transposed convolution layers arranged in order from the upstream side.
  • Each transposed convolutional layer uses a stride of 2 or more (2 in this example) to increase the number of elements corresponding to the height and the number of elements corresponding to the width (the number of elements corresponding to the number of channels is reduced).
  • Batch normalization is applied to the first to fourth transposed convolutional layers. Dropout is also applied to the first two transposed convolutional layers during training.
  • the activation function for each layer is ReLU.
  • a function suitable for generating the image data I51d (for example, Tanh function or sigmoid function) is used.
  • the number of elements of the first generated image data I51d is the same as the number of elements of the input image data I5id.
  • the first generative model 510 has an architecture similar to the so-called U-Net.
  • a plurality of connections 519 are provided between the first encoder 512 and the first decoder 517 .
  • the output data from the activation function of the first convolutional layer is concatenated with the output data from the activation function of the fourth transposed convolutional layer.
  • the pair of the second convolutional layer and the third transposed convolutional layer, the pair of the third convolutional layer and the second transposed convolutional layer, the pair of the fourth convolutional layer and the first For each transposed convolutional layer pair, the output data from the activation function of the convolutional layer is concatenated with the output data from the activation function of the transposed convolutional layer. Concatenation of the two output data is performed such that the concatenated output data represents the respective channels of the two output data. For example, when output data having 64*128*256 elements and output data having 64*128*128 elements are concatenated, data having 64*128*384 elements are generated.
  • a plurality of connections 519 convey information about position from the first encoder 512 to the first decoder 517 . Thereby, the first decoder 517 can generate the image data I51d of the image I51 representing the detailed shape. Such a connection 519 is also called a skip connection.
  • the first discriminant model 520 is trained to discriminate between real image data and fake image data. Specifically, the first identification model 520 identifies the first generated image data I51d generated by the first generation model 510 as fake data, and the image data Iod of the computer graphics image Io representing the label sheet as real data. trained to identify On the other hand, first generative model 510 is trained such that trained first discriminant model 520 incorrectly discriminates first generated image data I51d from real data. Through such training, the first generative model 510 can generate the first generated image data I51d of the first generated image I51 close to the computer graphics image Io.
  • the first identification model 520 performs dimension reduction processing on the input image data to generate identification data 529 representing one value.
  • the configuration of the first identification model 520 is as follows.
  • the first discriminant model 520 has a convolutional layer group 522, a global average pooling layer 525, and a fully connected layer group 527 arranged in order from the upstream side.
  • partial image data PA1d and PA2d representing partial images PA1 and PA2 that are parts of the images I51 and Io are input to the first identification model 520 .
  • the number of elements of the partial images PA1 and PA2 is 64*64*3.
  • the convolutional layer group 522 has three convolutional layers arranged in order from the upstream side. Each convolutional layer uses a stride of 2 to reduce the number of elements corresponding to the height and the number of elements corresponding to the width (the number of elements corresponding to the number of channels increases). Batch normalization is applied to the three convolutional layers.
  • the activation function for each convolutional layer is LeakyReLU.
  • the three convolution layers change the number of data elements in the order of "64*64*3", "32*32*64”, "16*16*128", and "8*8*128".
  • the global average pooling layer 525 calculates average values for each channel.
  • the number of data elements output from the global average pooling layer 525 is 128 elements.
  • the fully bonded layer group 527 has three fully bonded layers arranged in order from the upstream side.
  • the fully connected layer group 527 reduces the number of elements to one after increasing the number of elements.
  • the three fully connected layers vary in number of elements from 128 to 512 to 256 to 1. Note that the number of elements may decrease monotonically.
  • Dropout is also applied to the second fully connected layer during training.
  • the activation function of the first two fully connected layers is ReLU.
  • a function suitable for generating identification data 529 eg, sigmoid function or Tanh function
  • the identification data 529 indicates a value of zero or more and one or less. “1” indicates “true” and “0” indicates “false”. The identification data 529 indicates the degree of certainty that the input image data is image data of a computer graphics image.
  • FIG. 3A is a block diagram showing an example of the second generative model 600.
  • Image data I 61 d in the drawing is image data input to the second generative model 600 .
  • the image data I61d is first generated image data generated by the first generation model 510 (FIG. 2) (also referred to as first generated image data I61d).
  • the first generated image data I61d represents the image I61 of the label sheet LBj.
  • the second generative model 600 uses the first generated image data I61d to generate image data I62d representing the defect-free label sheet LBjx.
  • the label sheet LBj of the image I61 of the first generated image data I61d may have various defects.
  • the trained second generation model 600 generates image data I62d representing the image I62 of the label sheet LBjx without defects even if the label sheet LBj has defects.
  • the position and size of the label sheet LBjx in the generated image I62 are the same as the position and size of the label sheet LBj in the input image I61.
  • the image data I62d generated by the second generation model 600 will also be referred to as the second generated image data I62d
  • the image I62 of the second generated image data I62d will also be referred to as the second generated image I62.
  • the second generated image data I62d is the same color bitmap data as the first generated image data I61d.
  • the number of elements (here, height*width*number of channels) of the second generated image data I62d is 256*512*3.
  • the second generative model 600 is configured using a so-called autoencoder.
  • the configuration of the second generative model 600 is the same as the configuration of the first generative model 510 (FIG. 2).
  • the second generative model 600 has a second encoder 602 and a second decoder 607 .
  • the configuration of the second encoder 602 is the same as the configuration of the first encoder 512 (FIG. 2), and the configuration of the second decoder 607 is the same as the configuration of the first decoder 517 (FIG. 2).
  • a plurality of connections 609 are provided between the second encoder 602 and the second decoder 607 .
  • the second encoder 602 performs dimension reduction processing on the input image data to generate feature data 605 indicating features of the input image.
  • First training process 4 and 5 are flowcharts showing an example of the first training process for the first model 500.
  • FIG. FIG. 5 shows the processing subsequent to FIG.
  • the processor 210 (FIG. 1) executes the processes of FIGS. 4 and 5 according to the first program 231.
  • FIG. 1 The processor 210 (FIG. 1) executes the processes of FIGS. 4 and 5 according to the first program 231.
  • the processor 210 generates input image data representing the image of the label sheet read by the digital camera 100 .
  • the operator positions the printer (eg, printer DV) so that the label sheet (eg, label sheet LB (FIG. 1)) is positioned within the shooting range of the digital camera 100 .
  • the printer eg, printer DV
  • the processor 210 causes the digital camera 100 to photograph the label sheet and acquires photographed image data from the digital camera 100 .
  • a photographed image is an image of a label sheet read by the digital camera 100 .
  • the processor 210 performs cropping processing for extracting the label sheet area from the photographed image.
  • the processor 210 displays the captured image on the display unit 240, and the operator designates a label area indicating the label sheet in the captured image.
  • Processor 210 uses the portion of the captured image data corresponding to the labeled region to generate input image data representing an image of the labeled region (also referred to as reference input image data).
  • the processor 210 adjusts the height and width of the input image represented by the reference input image data to the height and width of the image accepted by the first model 500 .
  • the processor 210 generates a plurality of input image data representing different images from each other by performing processing, also called data augmentation, on the reference input image data.
  • the processor 210 randomly selects one or more processing operations from a plurality of predetermined candidate processing operations (for example, the processing operations are selected according to random numbers).
  • Processor 210 then generates new input image data by performing the selected processing on the reference input image data.
  • the processor 210 selects and executes processing operations multiple times.
  • the plurality of candidate processing includes a plurality of defect formation processes for forming defects in the label sheet.
  • a plurality of defect forming processes may include a process of deleting part of the character string of the label sheet (the color of the pixels corresponding to the deleted character is the same color as the color of the background portion in the vicinity of the deleted character).
  • a plurality of fault-forming actions may include changing a character to another character. Defect forming operations may include removing portions of the image. Such a defect formation process can generate image data that would be generated if a label sheet with defects were photographed.
  • the multiple candidate processing processes include multiple condition change processes corresponding to changes in the reading conditions of the label sheet.
  • a plurality of condition change processes may include tone curve adjustment process, white balance adjustment process, and noise addition process.
  • Such condition change processing can generate image data that can be generated when label sheets are photographed under various reading conditions.
  • the processor 210 generates a plurality of input image data representing various defect-free label sheets and a plurality of input image data representing various defect label sheets by performing various processing processes. Any input image data represents an image of an optically read label sheet. Note that the input image data of the defective label sheet may be generated by photographing the defective label sheet.
  • the processor 210 generates multiple sets of image pairs of the input image data and original image data representing defect-free label sheets. Then, the processor 210 associates the input image data with the original image data for each image pair and stores them in the storage device 215 (nonvolatile storage device 230 in this embodiment).
  • the stored sets of image pairs constitute Type 1 training data 590 .
  • the original image data is bitmap data generated by rendering original vector data prepared in advance, and represents a computer graphics image of the label sheet.
  • the original vector data is data prepared in advance for manufacturing the label sheet.
  • the height and width of the image of the original image data are the same as the height and width of the first generated image generated by the first generation model 510 (FIG. 2), respectively.
  • the original image data is common to multiple sets of image pairs.
  • the total number of original image data included in the type 1 training data 590 may be one. It should be noted that manufacturing errors can produce defective label sheets.
  • the label sheet may be photographed a plurality of times. Shooting conditions (for example, brightness of a light source (not shown), etc.) may differ between multiple shots.
  • Processor 210 may then generate a plurality of reference input image data.
  • the processor 210 may generate a plurality of input image data using the plurality of reference input image data.
  • the processor 210 calculates a plurality of operational parameters of the first model 500 (FIG. 2), ie, a plurality of operational parameters of the first generative model 510 and the first discriminative model 520 (e.g., a plurality of convolution filters). weights and multiple biases). For example, each calculation parameter is set to a random value.
  • the processor 210 selects a subset composed of a plurality of target pairs, which are a plurality of image pairs to be processed, from the plurality of sets of image pairs included in the type 1 training data 590. A plurality of unprocessed image pairs are selected as the subset. Also, the total number of image pairs in the subset is predetermined.
  • the input image data I5id and the image data Iod in FIG. 2 indicate the target pair.
  • the image data Iod is the original image data (the image data Iod is also called the original image data Iod, and the image Io is also called the original image Io).
  • the processor 210 generates the first generated image data I51d by inputting the target pair of input image data I5id into the first generation model 510. Specifically, the processor 210 uses the calculation parameters of the first generative model 510 to calculate each layer of the first generative model 510 to generate the first generated image data I51d.
  • the processor 210 randomly determines a first partial area A1, which is a partial area in the first generated image I51.
  • the processor 210 randomly determines a preselected parameter among a plurality of parameters (eg, position, shape, size, number, etc.) defining the first partial area A1.
  • the processor 210 generates a random number and determines the first position P1, which is the position of the first partial area A1, according to the random number.
  • the shape and size of the first partial area A1 are predetermined.
  • Processor 210 also determines one first partial area A1 for one first partial image PA1.
  • the processor 210 executes a first acquisition process using the first generated image data I51d and the first partial area A1 to obtain a first partial image representing at least part of the image of the first partial area A1.
  • First partial image data PA1d of PA1 is acquired.
  • the processor 210 obtains the first partial image data PA1d of the first partial image PA1 representing the image of the first partial area A1 having the predetermined shape and size located at the first position P1. That is, processor 210 adopts the image of first partial area A1 as it is as first partial image PA1.
  • the first acquisition process may include various image processing such as image rotation and image scaling (enlargement or reduction) (details below).
  • the processor 210 generates identification data 529 by inputting the first partial image data PA1d to the first identification model 520. Specifically, processor 210 calculates identification data 529 by calculating each layer of first identification model 520 using calculation parameters of first identification model 520 .
  • the identification data 529 obtained from the first partial image data PA1d (that is, the first generated image data I51d) will also be referred to as first identification data 529f.
  • the processor 210 randomly determines a second partial area A2, which is a partial area in the original image Io.
  • the processor 210 randomly determines a preselected parameter among a plurality of parameters (eg, position, shape, size, number, etc.) defining the second partial area A2.
  • the processor 210 generates a random number and determines the second position P2, which is the position of the second partial area A2, according to the random number.
  • the shape and size of the second partial area A2 are predetermined.
  • Processor 210 also determines one second partial area A2 for one second partial image PA2.
  • the processor 210 executes a second acquisition process using the original image data Iod and the second partial area A2 to generate a second partial image PA2 showing at least part of the image of the second partial area A2. Acquire the second partial image data PA2d.
  • the processor 210 acquires the second partial image data PA2d of the second partial image PA2 representing the image of the second partial area A2 having the predetermined shape and size located at the second position P2. That is, processor 210 adopts the image of second partial area A2 as it is as second partial image PA2.
  • the second acquisition process may include various image processing such as image rotation and image scaling (described in detail below).
  • the processor 210 generates identification data 529 by inputting the second partial image data PA2d to the first identification model 520. Specifically, processor 210 calculates identification data 529 by calculating each layer of first identification model 520 using calculation parameters of first identification model 520 .
  • the identification data 529 obtained from the second partial image data PA2d (that is, the original image data Iod) will also be referred to as second identification data 529r.
  • the processor 210 calculates an identification loss according to a predetermined identification loss function using the first identification data 529f and the second identification data 529r.
  • the identification loss function may be calculated as a smaller value as the second identification data 529r is closer to “real (1)”, or as a smaller value as the first identification data 529f is closer to “false (zero)”.
  • the subset (Fig. 4: S230) includes multiple target pairs.
  • Processor 210 performs the processing of S235-S265 for each of the plurality of target pairs. Then, in S270, the processor 210 calculates, as the identification loss, the total value of the plurality of losses obtained from the plurality of target pairs according to the identification loss function.
  • the processor 210 adjusts the multiple calculation parameters of the first discrimination model 520 according to a predetermined algorithm so that the discrimination loss is reduced.
  • a predetermined algorithm for example, an algorithm using backpropagation and gradient descent may be employed.
  • the processor 210 may also perform so-called Adam's optimization.
  • processor 210 also applies batch normalization to each convolutional layer of convolutional layers 522 .
  • Processor 210 applies dropout to the second fully connected layer of fully connected layers 527 .
  • the identification loss function is such that the closer the second identification data 529r is to "real (1)", the larger the value calculated, and the closer the first identification data 529f is to "false (zero)," the larger the calculated value is.
  • the identification loss function may be the following function Fb(Dr, Df).
  • Fb(Dr, Df) log(Dr) + log(1-Df)
  • the processor 210 adjusts a plurality of calculation parameters of the first discriminant model 520 so as to increase the discriminative loss.
  • the identification loss is not a loss that should be reduced, but an evaluation value that should be increased.
  • a function ⁇ Fb(Dr, Df) obtained by adding a minus sign to the function Fb(Dr, Df) can be used as a loss function representing a loss to be reduced.
  • S280 and S285 are the same as S240 and S245 in FIG. 4, respectively.
  • processor 210 determines a new first position P1 and acquires new first partial image data PA1d.
  • the processor 210 generates new first identification data 529f by inputting the new first partial image data PA1d to the first identification model 520. Since the first discriminant model 520 has been trained in S275, the first discriminant data 529f calculated in S290 can be closer to "false (zero)."
  • the processor 210 calculates a production loss according to a predetermined production loss function using the first identification data 529f produced at S290.
  • the generation loss function may be various functions that calculate a smaller value as the first identification data 529f is closer to "real (1)".
  • the processor 210 since the subset (FIG. 4: S230) includes multiple target pairs, in S235 the processor 210 generates multiple first generated image data.
  • Processor 210 performs the processing of S280-S290 (FIG. 5) for each of the plurality of sets of first generated image data. Then, in S295, the processor 210 calculates, as the generated loss, the total value of the plurality of losses obtained from the plurality of first generated image data according to the generated loss function.
  • the processor 210 adjusts a plurality of calculation parameters of the first generative model 510 according to a predetermined algorithm so as to reduce the generative loss.
  • a predetermined algorithm for example, an algorithm using backpropagation and gradient descent may be employed.
  • the processor 210 may also perform so-called Adam's optimization.
  • the processor 210 performs four convolutional layers, 2nd through 5th, of the first encoder 512 and four transposed convolutional layers, 1st through 4th, of the first decoder 517. and to apply batch normalization.
  • the processor 210 applies dropout to the first two transposed convolutional layers of the first decoder 517 .
  • a training end condition may be any condition that indicates that the first model 500 has been properly trained.
  • the training end condition is input of an end instruction from the operator.
  • Processor 210 randomly obtains a predetermined number of image pairs from the plurality of image pairs not used for training in Type 1 training data 590 (FIG. 1).
  • the processor 210 inputs the input image data of each of the acquired image pairs to the first generative model 510 and acquires the first generative image data from the first generative model 510 .
  • the processor 210 displays on the display unit 240 a plurality of pairs of the inputted input image and the outputted first generated image.
  • the operator observes the display unit 240 to check whether the first generated image appropriately represents the computer graphics image of the same label sheet as the input image.
  • the worker operates the operation unit 250 according to the confirmation result to input a training end instruction or a training continuation instruction.
  • the conditions for ending the training may be other conditions.
  • the termination condition may be that the discrimination loss and generation loss calculated using a first predetermined number of image pairs not used for training are less than or equal to respective predetermined thresholds. you can
  • the processor 210 proceeds to S230 of FIG. 4 and executes the processing of the new subset. If it is determined that training has ended (S305: Yes), in S310 the processor 210 stores the trained first generative model 510 in the storage device 215 (here, the non-volatile storage device 230). Processor 210 then terminates the processing of FIGS.
  • a trained first generative model 510 can convert a read image of a label sheet into a computer graphics image of the same label sheet. It should be noted that the processor 210 may delete the first discriminant model 520 from the non-volatile storage device 230 when the training is finished.
  • the influence of the noise generated in the reading device and the reading conditions described above affects the entire read image (for example, the input image I5i (FIG. 2)).
  • the input image I5i (FIG. 2)
  • such effects on computer graphics images eg, original image Io (FIG. 2)
  • the first discriminant model 520 (FIG. 2) is such that the input image is a computer graphics image, even if the partial image PA1, PA2 is input instead of the entire image I51, Io of the label sheet.
  • the diversity of image data input to the first discriminant model 520 increases. For example, a plurality of second partial images PA2 representing different parts of the original image Io are input to the first identification model 520. FIG. Therefore, the speed of training of the first discriminant model 520 is reduced. As a result, the training of the first generative model 510 and the training of the first discriminative model 520 can be balanced. Therefore, in the training of this embodiment, the image I51 of the image data I51d generated by inputting the image data I5id representing the image I5i of the optically read label sheet into the first generation model 510 is generated by the computer of the label sheet. The first generative model 510 can be properly trained to approximate graphics images.
  • the first discrimination model 520 uses the first partial image data PA1d of the first partial image PA1 representing the image of the first partial area A1 in the first generated image I51 as fake image data. use. Also, the first identification model 520 uses the second partial image data PA2d of the second partial image PA2 representing the image of the second partial area A2 in the original image Io as the actual image data.
  • the original image Io represents a label sheet with no defects. Therefore, the training of this embodiment can train the first generative model 510 so that the portion of the label sheet represented by the first partial image PA1 approaches the corresponding portion of the label sheet without defects.
  • the training of this embodiment can train the first generative model 510 to generate the first generative image I51 representing the same portion of the label sheet in the input image I5i as the defect-free portion. If the label sheet LBi of the input image I5i has a defect, the first generated image I51 may include a similar defective portion due to the influence of the defective portion included in the input image I5i. In the training of the present embodiment, the first partial area A1 can be determined as a part different from the part showing the defect in the first generated image I51.
  • the first generative model 510 can be trained such that portions exhibiting similar defects in the first generated image I51 caused by portions exhibiting defects contained in the input image I5i remain intact. As described above, when the label sheet LBi of the input image I5i has a defect, the trained first generation model 510 generates the first generated image I51 representing the label sheet LBi having the same defect.
  • the processor 210 also randomly determines the first position P1 of the first partial area A1 for the first partial image PA1 (FIG. 4: S240). Processor 210 randomly determines a second position P2 of second partial area A2 for second partial image PA2 (S255). Accordingly, partial image data PA1d, PA2d of partial images PA1, PA2 at various positions P1, P2 are input to the first identification model 520. FIG. In this manner, proper training of the first generative model 510 and the first discriminative model 520 is possible as the diversity of image data input to the first discriminative model 520 is increased.
  • FIG. 6 is a flowchart showing an example of the second training process for the second generative model 600.
  • FIG. 3B is a block diagram showing an overview of the training of the second generative model 600.
  • the second generative model 600 is trained to generate defect-free label sheet image data when various label sheet image data are input.
  • Processor 210 (FIG. 1) executes the process of FIG. 6 according to second program 232 .
  • the processor 210 generates a plurality of training image data using the original image data Iod described in FIG. 230).
  • a plurality of stored training image data constitutes type 2 training data 690 (FIG. 1).
  • the processor 210 generates a plurality of training image data representing different images by performing a manipulation process, also called data augmentation, on the original image data Iod. Similar to S215 (FIG. 4), the processor 210 selects a processing process from a plurality of predetermined candidate processing processes and executes the selected processing process on the original image data Iod multiple times.
  • the plurality of candidate processings used in S410 are composed of a plurality of processings for maintaining defect-free label sheets (for example, tone curve adjustment processing, white balance adjustment processing, noise addition processing, etc.). Processing that produces defects in the label sheet, such as processing text areas, is not used. Therefore, all of the plurality of training image data represent defect-free label sheets.
  • the processor 210 initializes multiple computational parameters of the second generative model 600 (eg, multiple weights and multiple biases of the convolution filter). For example, each calculation parameter is set to a random value.
  • the processor 210 selects a subset composed of a plurality of target training image data, which are a plurality of data to be processed, from a plurality of training image data included in the second type training data 690.
  • a plurality of unprocessed training image data is selected as the subset.
  • the total number of image data in the subset is predetermined.
  • the processor 210 generates the second generated image data I6xd by inputting the target training image data I6td (FIG. 3B) into the second generation model 600 (FIG. 3). Specifically, the processor 210 uses the calculation parameters of the second generative model 600 to calculate each layer of the second generative model 600 to generate the second generated image data I6xd.
  • the processor 210 calculates the reconstruction loss according to a predetermined reconstruction loss function using the target training image data I6td input to the second generative model 600 and the second generated image data I6xd. calculate.
  • the reconstruction loss function can be various functions representing the difference between the two image data. In this example, the so-called cross-entropy is used as the reconstruction loss function. Alternatively, the sum-of-squares error may be used as the reconstruction loss function.
  • the subset (S420) includes a plurality of target training image data.
  • the processor 210 executes the process of S425 for each of the plurality of target training image data to generate a plurality of second generated image data.
  • the processor 210 calculates the total value of multiple losses L2 obtained from multiple pairs of the target training image data and the second generated image data according to the reconstruction loss function as the reconstruction loss.
  • the processor 210 adjusts a plurality of calculation parameters of the second generative model 600 according to a predetermined algorithm so that the reconstruction loss becomes small.
  • a predetermined algorithm for example, an algorithm using backpropagation and gradient descent may be employed.
  • the processor 210 may also perform so-called Adam's optimization.
  • the processor 210 performs four convolutional layers, 2nd through 5th, of the second encoder 602 and four transposed convolutional layers, 1st through 4th, of the second decoder 607. and to apply batch normalization.
  • the processor 210 applies dropout to the first two transposed convolutional layers of the second decoder 607 .
  • a training end condition may be any condition that indicates that the second generative model 600 has been properly trained.
  • the training end condition is input of an end instruction from the operator.
  • Processor 210 randomly acquires a predetermined number of image data from a plurality of training image data not used for training in type 2 training data 690 (FIG. 1).
  • the processor 210 inputs the obtained plurality of image data to the second generative model 600 and obtains the plurality of second generated image data from the second generative model 600 .
  • Processor 210 displays a plurality of pairs of input images and output second generated images on display unit 240 .
  • the operator observes the display unit 240 to check whether the second generated image appropriately represents the image of the same label sheet as the input image.
  • the worker operates the operation unit 250 according to the confirmation result to input a training end instruction or a training continuation instruction.
  • the conditions for ending the training may be other conditions.
  • the termination condition may be that the reconstruction loss calculated using a second predetermined number of training image data not used for training is less than or equal to a predetermined reconstruction threshold.
  • the processor 210 moves to S420 and executes processing of a new subset. If it is determined that the training has ended (S440: Yes), in S445 the processor 210 stores the trained second generative model 600 in the storage device 215 (here, the non-volatile storage device 230). Processor 210 then terminates the process of FIG. As described above, the second generative model 600 is trained to generate image data of the same label sheet without defects from image data of various label sheets without defects. Therefore, even if the input image data I61d (FIG. 3A) represents the defective label sheet LBj, the trained second generative model 600 can generate the image data representing the defective label sheet LBjx. Generate I62d.
  • FIG. 7 is a flowchart illustrating an example of inspection processing. Inspection processing is executed by the image processing device 200 (FIG. 1). Processor 210 executes inspection processing according to third program 233 .
  • the processor 210 causes the digital camera 100 to photograph the label sheet of interest, which is the label sheet to be inspected, and acquires the photographed image data of interest from the digital camera 100 .
  • FIG. 8 is a schematic diagram of the inspection process.
  • the image data Ixd in the figure is the photographed image data of interest Ixd of the photographed image of interest Ix.
  • the photographed image of interest Ix represents a portion of the printer DV including the label sheet of interest LBx.
  • the attention label sheet LBx has a character string defect (details will be described later).
  • the processor 210 performs cropping processing for extracting the region of the label sheet of interest from the photographed image of interest.
  • the processor 210 uses a machine learning model called an object detection model (for example, YOLOv4 (You only look once), SSD (Single Shot MultiBox Detector), R-CNN (Region Based Convolutional Neural Networks), etc.). to detect the area of the target label sheet LBx.
  • the processor 210 uses the portion of the photographed image data of interest Ixd that indicates the detected area to generate the input image data of interest Ix0d representing the label sheet of interest LBx.
  • the processor 210 adjusts the height and width of the input image of interest Ix0 represented by the input image data of interest Ix0d to the height and width of the image accepted by the first model 500 . Any other method may be used to detect the area of the target label sheet LBx. For example, the processor 210 may detect the area of the attention label sheet LBx by pattern matching using a predetermined reference pattern.
  • the processor 210 generates first generated image data of interest Ix1d by inputting the input image data of interest to the first generation model 510.
  • the processor 210 uses the calculation parameters of the first generative model 510 to calculate each layer of the first generative model 510 to generate the first generated image data of interest Ix1d.
  • the first attention generated image Ix1 of the first attention generated image data Ix1d is an image of the attention label sheet LBx, such as a computer graphics image.
  • the processor 210 generates the second generated image data of interest Ix2d by inputting the first generated image data of interest Ix1d to the second generation model 600.
  • the processor 210 uses the calculation parameters of the second generative model 600 to calculate each layer of the second generative model 600 to generate the second generated image data of interest Ix2d.
  • the second generated image of interest Ix2 of the second generated image of interest Ix2d represents the label sheet LBxm with no defects (also referred to as the correct label sheet LBxm).
  • the correct label sheet LBxm represents three character strings T1, T2, and T3.
  • the label sheet of interest LBx represents two character strings T1 and T2x.
  • the rightmost character T2e of the second character string T2x is an incorrect "9” instead of the correct "2" of the second character string T2 on the correct label sheet LBxm.
  • the third character string T3 is replaced with a blank area Ax.
  • the processor 210 generates intermediate difference image data Ix3d of an intermediate difference image Ix3 indicating the difference between the first generated image of interest Ix1 and the second generated image of interest Ix2.
  • Each pixel of the intermediate difference image Ix3 indicates the difference between the first color value of the corresponding pixel of the first generated image of interest Ix1 and the second color value of the corresponding pixel of the second generated image of interest Ix2.
  • the first color value and the second color value are RGB values.
  • the processor 210 calculates the L1 distance between the first color value and the second color value as the pixel value of the pixel in the intermediate difference image Ix3.
  • the pixel value of the pixels of the intermediate difference image Ix3 may be any value indicating the difference between the first generated image of interest Ix1 and the second generated image of interest Ix2 instead of the L1 distance (for example, L2 distance, luminance value difference calculated from RGB values, etc.).
  • the intermediate difference image Ix3 may contain various noises.
  • the color values of pixels indicating the boundary between an object such as a character and the background may differ between the first generated image of interest Ix1 and the second generated image of interest Ix2.
  • the intermediate difference image Ix3 can represent such color value deviations. Therefore, in this embodiment, the processor 210 generates differential image data Ix4d of the final differential image Ix4 by executing binarization processing of the intermediate differential image data Ix3d.
  • the threshold value for the binarization process is experimentally determined in advance so that the value of a pixel showing a defect is set to 1, and the value of each pixel showing no defect and a pixel showing noise is set to 0. be done.
  • the difference image Ix4 represents the third character string T3 missing from the target input image Ix0 and the difference image T2w of the rightmost character of the second character string T2x.
  • the processor 210 calculates the degree of anomaly DA by executing dimension reduction processing of the difference image data Ix4d.
  • the degree of abnormality DA indicates the degree of defect of the label sheet of interest LBx represented by the input image data of interest Ix0d.
  • the dimension reduction process may be various processes for calculating the degree of anomaly DA that indicates the feature of the difference image data Ix4d.
  • the processor 210 uses t-SNE (t-distributed Stochastic Neighbor Embedding) to generate two-dimensional data composed of a first value V1 and a second value V2 from the differential image data Ix4d. do.
  • FIG. 8 shows an outline of a graph showing two-dimensional data.
  • a point of interest Pi indicates two-dimensional data calculated from the differential image data Ix4d.
  • the reference point Ps is a representative point of a plurality of two-dimensional data Pr obtained from a plurality of photographed images of label sheets without defects by the same processing as the processing of S515-S540.
  • the reference point Ps is the barycentric point of the plurality of two-dimensional data Pr and is determined in advance.
  • the distance DAd is the distance between the reference point Ps and the target point Pi (sum of square error in this embodiment). Note that the distance DAd may be various values indicating the distance between the two points Ps and Pi (for example, L2 distance, L1 distance, etc.).
  • the processor 210 calculates the degree of anomaly DA by inputting the distance DAd into a predetermined evaluation function.
  • the evaluation function may be various functions that calculate the degree of abnormality DA that increases as the distance DAd increases.
  • the anomaly degree DA is close to zero in the short range, and the anomaly degree DA is close to zero in the long range. Close to the maximum value (for example, 100), in the middle range, it is preferable that the degree of anomaly DA changes greatly according to the change in the distance DAd.
  • a sigmoid function or a tanh function for example, can be used as such an evaluation function.
  • the processor 210 executes dimension reduction processing using t-SNE and an evaluation function to calculate the degree of anomaly DA from the differential image data Ix4d.
  • the degree of anomaly DA is a value of zero or more and 100 or less.
  • FIG. 9A is a schematic diagram showing an example of an image displayed on the display unit 240.
  • the display unit 240 displays a difference image Ix4 and a character string DAt indicating the degree of abnormality DA.
  • the degree of abnormality DA is 80, and "%" is shown as the unit of the degree of abnormality DA.
  • FIG. 10 is a schematic diagram of the inspection process.
  • FIG. 10 outlines S550 and S555.
  • the processor 210 performs character recognition processing on the first generated image data of interest Ix1d, and obtains a character string table of interest Tx that lists the character strings represented by the label sheet of interest LBx.
  • the character recognition processing may be various known processing. For example, an optical character recognition engine called "Tesseract OCR" from Google may be used.
  • the processor 210 uses the first generated image data of interest Ix1d instead of the input image data of interest Ix0d containing noise for character recognition. Therefore, the processor 210 can obtain proper character recognition results.
  • FIG. 10 shows an example of the noted character string table Tx.
  • the target character string table Tx indicates a first character string T1 and a second character string T2x.
  • the rightmost character T2e of the second string T2x is a false "9".
  • the third string T3 is not recognized.
  • the processor 210 compares the target character string table Tx and the original character string table To to generate a defective character string table Td that lists character strings having defects.
  • the original character string table To shows a list of character strings represented by label sheets with no defects, and is prepared in advance.
  • the processor 210 compares the noted character string table Tx and the original character string table To, and detects defects in character string units.
  • the defect character string table Td indicates a second character string T2x and a third character string T3.
  • the rightmost character T2e of the second string T2x is a false "9".
  • the defect character string table Td is a character string included in the target character string table Tx that is at least partially different from the corresponding character string included in the original character string table To (for example, the second contains the string T2x).
  • the defective character string table Td also includes character strings (for example, the third character string T3) that are included in the original character string table To but not included in the target character string table Tx. Although illustration is omitted, if the noted character string table Tx includes a character string that is not included in the original character string table To, the defective character string table Td includes that character string.
  • the processor 210 displays the character strings indicated by the defect character string table Td on the display unit 240.
  • FIG. 9B is a schematic diagram showing an example of an image displayed on the display unit 240. As shown in FIG. The display section 240 displays character strings T2x and T3 included in the defect character string table Td. By observing the display unit 240, the operator can easily recognize the defects included in the noted label sheet LBx.
  • the processor 210 ends the inspection processing of FIG. Note that the processor 210 may execute the processing of S530-S545 and the processing of S550-S560 sequentially, not in parallel.
  • the processor 210 of the image processing device 200 executes the following image processing.
  • the processor 210 inputs the input image data of interest Ix0d representing the optically read label sheet of interest LBx (FIG. 8) to the first generation model 510, thereby corresponding to the input image data of interest Ix0d. 1st generated image data of interest Ix1d is generated. 2, 4 and 5, the first generative model 510 inputs the image data I5id representing the optically read label sheet image I5i (Fig. 2) to the first generative model 510. It is a generative model trained so that the image I51 of the image data I51d generated by the above approaches the computer graphics image Io of the label sheet.
  • the processor 210 inputs the first generated image data of interest Ix1d (FIG. 8) to the second generative model 600, thereby generating a second generated image of interest representing the image Ix2 of the object of interest without defects.
  • the second generative model 600 generates a fault-free label sheet image I62 by inputting the image data I61d (FIG. 3A) representing the image of the label sheet into the second generative model 600. is a generative model trained to generate image data I62d representing
  • the processor 210 generates a difference image of a difference image Ix4 indicating the difference between the image Ix1 of the first generated image data of interest Ix1d (FIG. 8) and the image Ix2 of the second generated image data of interest Ix2d. Generate data Ix4d.
  • the first generative model 510 is generated by training the first model 500 having the first generative model 510 and the first discriminative model 520.
  • the first generative model 510 is an example of a generative network
  • the first discriminant model 520 is an example of a discriminative network
  • the first model 500 is a generative adversarial network having a generative network and a discriminative network. For example.
  • the second partial image data PA2d represents the second partial image PA2 which is a portion of the second image Io which is the training computer graphics image Io.
  • the diversity of the image data PA1d, PA2d (FIG. 2) input to the first discrimination model 520, which is an example of a discrimination network, is increased, and the training speed of the first discrimination model 520 is suppressed.
  • a balance can be achieved between training the first generative model 510 and the first discriminative model 520 of the example network. Therefore, as shown in FIG. 8, the first generative model 510 is based on the image data Ix1d generated by inputting the image data Ix0d representing the image Ix0 of the optically read label sheet LBx to the first generative model 510. is properly trained to approximate the computer graphics image of the label sheet.
  • the second generation model 600 is a second generation model representing the image of the label sheet of interest without defects.
  • Noted generated image data Ix2d can be generated appropriately. Therefore, the difference image data Ix4d of the difference image Ix4 indicating the difference between the image Ix1 of the first generated image data of interest Ix1d and the image Ix2 of the second generated image data of interest Ix2d is obtained regardless of the conditions for reading the label sheet of interest LBx. Therefore, it is possible to appropriately express the defect of the attention label sheet LBx represented by the attention input image data Ix0d.
  • the processor 210 reduces the degree of abnormality DA of the attention label sheet LBx represented by the attention input image data Ix0d by executing the dimension reduction process of the difference image data Ix4d. calculate.
  • the differential image data Ix4d adequately represents the defect of the attention label sheet LBx, so the processor 210 can use the differential image data Ix4d to calculate an appropriate degree of abnormality DA.
  • the processor 210 converts the partial image data PA1d, PA2d of the partial images PA1, PA2 of the partial areas A1, A2 at the various positions P1, P2 into the first discriminant model Enter 520. This increases the diversity of the image data input to the first discriminative model 520, so that proper training of the first generative model 510 and the first discriminative model 520 is possible.
  • FIGS. 4 and 5 show an example of a training process for a generative adversarial network having a generative network and a discriminating network.
  • This training process includes the following processes.
  • the processor 210 generates the first image data I51d of the first image I51 by inputting the training input image data I5id into the first generation model 510, which is an example of a generation network.
  • the processor 210 randomly determines the first partial area A1 in the first image I51 (in this embodiment, the first position P1 of the first partial area A1 is randomly determined).
  • processor 210 converts first partial image data PA1d representing first partial image PA1 showing at least part of the image of first partial area A1 in first image I51 to first image data I51d and the first part. obtained using the area A1.
  • the processor 210 obtains the first identification data 529f by inputting the first partial image data PA1d into the first identification model 520, which is an example of an identification network.
  • the processor 210 randomly determines the second partial area A2 in the second image Io of the second image data Iod associated with the input image data I5id (in this embodiment, the second partial area A2 is A second position P2 is randomly determined).
  • processor 210 converts second partial image data PA2d representing second partial image PA2 showing at least part of the image of second partial area A2 in second image Io to second image data Iod and the second part. obtained using area A2.
  • the processor 210 obtains the second identification data 529r by inputting the second partial image data PA2d into the first identification model 520.
  • the processor 210 adjusts the parameters of the first discriminative model 520 by using the first discriminative data 529f and the second discriminative data 529r.
  • the variety of images input to the identification network for training of the adversarial generative network is improved, so that the identification network and, in turn, the adversarial generative network having the identification network and the generative network can be appropriately trained.
  • the use of the adversarial generation network is not limited to the inspection of defects in objects such as label sheets, and may be any use.
  • a plurality of input image data representing different images are preferably used for training the first model 500 (FIGS. 4 and 5).
  • the plurality of input image data includes a plurality of input image data representing different defects of the label sheet.
  • the plurality of input image data include a plurality of input image data corresponding to reading conditions different from each other.
  • the computer graphics image data associated with the input image data may represent the same label sheet as the label sheet represented by the input image data. That is, if the input image data represents a label sheet with a defect, the computer graphics image data associated with the input image data may represent the label sheet with the same defect.
  • the trained first generation model 510 can, when image data representing a defective label sheet is input, Data representing computer graphics images of label sheets with the same defects can be suitably generated.
  • the processor 210 In the training of the first model 500 (FIGS. 4 and 5), the processor 210 generates multiple It is preferable to input a plurality of data PA1d of first partial image PA1 to first identification model 520 .
  • the processor 210 preferably obtains data of the plurality of first partial images PA1 using the plurality of first generated image data.
  • processor 210 may acquire data of a plurality of first partial images PA1 using one piece of first generated image data.
  • processor 210 calculates the number of first partial images PA1 obtained from one first generated image (that is, the number of first partial areas A1 on the first generated image) as , may be randomly determined.
  • a plurality of first positions P1 different from each other may be predetermined instead of being randomly determined.
  • the processor 210 randomly determines the size of the first partial region A1 on the first generated image (the unit is, for example, the number of pixels in a predetermined direction (eg, width direction)). you can also, the processor 210 may randomly determine the shape of the first partial region A1 on the first generated image from a plurality of predetermined shapes (eg, square, rectangle, rhombus, circle, ellipse, etc.). Generally, at S240, the processor 210 randomly determines one or more of a plurality of parameters including the position, shape, size and number of the first partial regions A1 on the first generated image. you can This further improves the diversity of the image data input to the first discriminant model 520 . Note that the remaining parameters may be determined in advance. Here, the processor 210 may randomly determine a parameter to be randomly determined among the plurality of parameters at S240.
  • the first acquisition process of S245 is various processes for acquiring the first partial image data PA1d of the first partial image PA1 representing at least part of the image of the first partial area A1 in the first generated image. good.
  • the first acquisition process may include, for example, one or both of image rotation and image scaling (enlargement or reduction). Scaling an image changes the pixel density of the image.
  • the first acquisition processing is not limited to rotation and scaling, and may include various other image processing.
  • the first acquisition process is preferably configured so that the first partial image PA1 generated by the first acquisition process shows the same image as at least part of the image of the first partial area A1.
  • the processor 210 selects one or more preselected parameters from among the one or more parameters used in the image processing of the first acquisition process (eg, a plurality of parameters including rotation angle and scaling ratio). Parameters (eg, rotation angle and/or scaling ratio) may be randomly determined.
  • the scaling ratio is the ratio of the size of the image after scaling to the size of the image before scaling (the unit is, for example, the number of pixels in a predetermined direction (eg, width direction)).
  • processor 210 may randomly select an image process to perform from a plurality of image processes including rotation and scaling.
  • the processor 210 may randomly select a parameter to be determined randomly among the one or more parameters used in the image processing of the first acquisition process.
  • the first acquisition process may include a process of adjusting the first partial image PA1 to an identification input image that is an image accepted by the first identification model 520.
  • Processor 210 may adjust the size (more generally, pixel density) of first partial image PA1, for example, by pixel density adjustment or convolution processing. Further, when the shape of first partial image PA1 before adjustment is different from the shape of the identification input image, processor 210 extracts a portion having the same shape as the shape of the identification input image from first partial image PA1 before adjustment. Thus, the adjusted first partial image PA1 may be generated. In this way, the first partial image PA1 may represent all or part of the image of the first partial area A1 in the first generated image.
  • the size of the image of the first partial area A1 in the adjusted first partial image PA1 is increased as the scaling ratio increases. Image PA1 may be adjusted.
  • processor 210 first identifies a plurality of data PA2d of a plurality of second partial images PA2 representing a plurality of images of a plurality of second partial areas A2 at a plurality of second positions P2 (FIG. 2) different from each other. Inputs to model 520 are preferred.
  • the processor 210 may obtain data of the plurality of second partial images PA2 using one piece of computer graphics image data (for example, image data Iod).
  • processor 210 calculates the number of second partial images PA2 obtained from one computer graphics image (that is, the number of second partial areas A2 on the computer graphics image) as , may be randomly determined.
  • processor 210 may acquire data of multiple second partial images PA2 using multiple computer graphics image data.
  • the plurality of second positions P2 different from each other may be determined in advance instead of being randomly determined.
  • the processor 210 randomly determines the size of the second partial region A2 on the computer graphics image (the unit is, for example, the number of pixels in a predetermined direction (eg, width direction)). you can Also, the processor 210 may randomly determine the shape of the second partial area A2 on the computer graphics image from a plurality of predetermined shapes (eg, square, rectangle, rhombus, circle, ellipse, etc.).
  • the processor 210 randomly determines one or more of a plurality of parameters including the position, shape, size and number of the second partial regions A2 on the computer graphics image. you can This further improves the diversity of the image data input to the first discriminant model 520 . Note that the remaining parameters may be determined in advance. Here, the processor 210 may randomly determine a parameter to be randomly determined among the plurality of parameters at S255.
  • the second acquisition process of S260 is various processes for acquiring the second partial image data PA2d of the second partial image PA2 representing at least part of the image of the second partial area A2 in the computer graphics image. good.
  • the second acquisition process is preferably configured such that the second partial image PA2 generated by the second acquisition process shows the same image as at least part of the image of the second partial area A2.
  • the second acquisition process may be the same as the first acquisition process, and may include, for example, one or both of image rotation and image scaling.
  • the processor 210 selects one or more preselected parameters from among the one or more parameters used in the image processing of the second acquisition process (eg, a plurality of parameters including rotation angle and scaling ratio).
  • Parameters may be randomly determined.
  • processor 210 may randomly select an image process to perform from a plurality of image processes including rotation and scaling.
  • the processor 210 may randomly select a parameter to be determined randomly among the one or more parameters used in the image processing of the second acquisition process.
  • the diversity of image data input to the first discriminative model 520 is further enhanced. Note that the remaining parameters may be determined in advance.
  • the second acquisition process may include adjusting the second partial image PA2 to an identification input image acceptable by the first identification model 520.
  • Processor 210 may adjust the size (more generally, pixel density) of second partial image PA2, for example, by adjusting the pixel density or by convolution processing.
  • processor 210 extracts a portion having the same shape as the shape of the identification input image from the second partial image PA2 before adjustment.
  • the adjusted second partial image PA2 may be generated.
  • the second partial image PA2 may represent all or part of the image of the second partial area A2 in the computer graphics image.
  • the second acquisition process including scaling is performed, the size of the image of the second partial area A2 in the adjusted second partial image PA2 is increased as the scaling ratio increases. Image PA2 may be adjusted.
  • the first model 500 may be various adversarial generative networks having a generative network and an identification network instead of the networks described in FIG. 2 and the like.
  • the height and width of the image input to the first generative model 510 may be any predetermined height and width.
  • the total number of convolutional layers of the first encoder 512 of the first generative model 510 may be any number greater than or equal to one.
  • the size of the filters in each convolutional layer may be of various sizes.
  • the first encoder 512 may include fully connected layers.
  • the convolutional layers may be omitted from the first encoder 512 .
  • the total number of transposed convolutional layers of the first decoder 517 of the first generative model 510 may be any number greater than or equal to one.
  • the size of the filters in each transposed convolutional layer may be of various sizes.
  • the first decoder 517 may include fully connected layers. From the first decoder 517, the transposed convolution layer may be omitted.
  • the total number of convolution layers in the convolution layer group 522 of the first discriminant model 520 may be any number equal to or greater than 1.
  • the size of the filters in each convolutional layer may be of various sizes.
  • the total number of fully bonded layers in fully bonded layer group 527 may be any number equal to or greater than one.
  • the number of nodes in each fully connected layer can be of various values.
  • One or two of the three modules of the convolutional layer group 522, the global average pooling layer 525, and the fully connected layer group 527 may be omitted.
  • Batch normalization may be applied to various layers of the first model 500 .
  • Dropouts may be applied to various layers of the first model 500 .
  • the second generative model 600 is not limited to the networks described with reference to FIGS. 3A, 3B, etc., and may be any network that generates a defect-free image from an input image.
  • the configuration of the second generative model 600 may differ from the configuration of the first generative model 510 .
  • the second generative model 600 may be a generative network generated by training a generative adversarial network having a generative network and a discriminating network. Batch normalization may be applied to various layers of the second generative model 600 . Dropout may be applied to various layers of the second generative model 600 .
  • the process of calculating the degree of anomaly DA from the difference image data Ix4d may be various processes of calculating the degree of anomaly DA indicating the degree of failure.
  • the processor 210 uses t-SNE to generate three-dimensional data from the difference image data Ix4d, and uses the distance between the reference point and the point of interest in the three-dimensional space to calculate the degree of anomaly DA. good.
  • Processor 210 may also use t-SNE to directly compute a single value from difference image data Ix4d. Then, the processor 210 may calculate the degree of abnormality DA by inputting one calculated value into the evaluation function.
  • processor 210 may use various dimensionality reduction processes (eg, principal component analysis) instead of t-SNE.
  • the inspection process may be any process that generates information (for example, the difference image Ix4, the degree of abnormality DA, the defect character string table Td, etc.) regarding defects in the label sheet, instead of the process shown in FIG. .
  • S540 may be omitted.
  • the processor 210 may display the difference image Ix4 on the display unit 240 in S545.
  • the binarization process (FIG. 8) of the intermediate difference image data Ix3d may be omitted, and the intermediate difference image data Ix3d may be used as the difference image data.
  • the processing of S550-S560 may be omitted.
  • the processing of S530-S545 may be omitted.
  • the method of presenting information to the user may be any method capable of transmitting information to the user instead of displaying information.
  • processor 210 may output audio describing information.
  • the shape of the label sheet may be any shape, such as a triangle, a square, a polygon with 5 or more corners, a circle, or an ellipse. In either case, the image data may represent a rectangular image.
  • the processor 210 preferably determines the area of the partial image so that the entire extracted partial image is included on the label sheet.
  • the object to be image-processed is not limited to a label sheet attached to a product such as a printer, but may be a label directly printed on the product.
  • the object is not limited to a label, but may be a tag attached to a product.
  • the object may be a container containing the product or a wrapping paper for wrapping the product.
  • Products related to objects are not limited to printers, and may be arbitrary products such as sewing machines and cutting machines.
  • the object can be any object that represents a character.
  • the number of characters represented by an object may be any integer greater than or equal to one.
  • the reading device for optically reading an object is not limited to the digital camera 100, but may be any reading device configured to optically read an object using a photoelectric conversion element such as a CCD or CMOS. (e.g. scanner).
  • the first training process (eg, FIGS. 4 and 5), the second training process (eg, FIG. 6), and the inspection process (eg, FIG. 7) may be performed by different image processing devices.
  • Any image processing device may be a type of device other than a personal computer (eg, digital camera, scanner, smart phone).
  • a plurality of devices (for example, computers) that can communicate with each other via a network may share the image processing function of the image processing device, and provide the image processing function as a whole ( A system including these devices corresponds to the image processing device).
  • part of the configuration implemented by hardware may be replaced with software, or conversely, part or all of the configuration implemented by software may be replaced with hardware.
  • the first generative model 510 of FIG. 1 may be implemented by dedicated hardware circuitry.
  • the program when part or all of the functions of the present invention are realized by a computer program, the program is provided in a form stored in a computer-readable recording medium (for example, a non-temporary recording medium). be able to.
  • the program can be used while being stored in the same or different recording medium (computer-readable recording medium) as when it was provided.
  • “Computer-readable recording medium” is not limited to portable recording media such as memory cards and CD-ROMs, but also internal storage devices such as various ROMs in computers, and hard disk drives that are connected to computers. An external storage device may also be included.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Image Analysis (AREA)

Abstract

生成モデルを適切に構成する。注目入力画像データを第1生成モデルに入力することによって、注目入力画像データに対応する第1注目生成画像データを生成する。第1生成モデルは、光学的に読み取られた対象物の画像を表す画像データを第1生成モデルに入力することによって生成される画像データの画像が対象物のコンピュータグラフィックス画像に近づくように訓練された生成モデルである。第1注目生成画像データを第2生成モデルに入力することによって、不具合の無い注目対象物の画像を表す第2注目生成画像データを生成する。第1注目生成画像データの画像と第2注目生成画像データの画像との間の差分を示す差分画像の差分画像データを生成する。

Description

画像処理方法、コンピュータプログラム、画像処理装置、および、訓練方法
 本明細書は、生成モデルを使用する画像処理に関する。
 従来から、ニューラルネットワークとも呼ばれる機械学習モデルが画像処理に使用されている。例えば、特許文献1は、ニューラルネットワークを使用して顕微鏡画像を分類する技術を提案している。
特許第6767966号公報
 機械学習モデルとしては、画像データを生成する生成モデルが使用され得る。生成モデルは、例えば、入力された画像データを使用して、入力された画像データに対応する画像データを生成する。適切な画像データを生成するように生成モデルを構成する点については、工夫の余地があった。
 本明細書は、生成モデルを適切に構成する技術を開示する。
 本明細書に開示された技術は、以下の適用例として実現することが可能である。
[適用例1]画像データを処理する画像処理方法であって、光学的に読み取られた注目対象物を表す注目入力画像データを第1生成モデルに入力することによって、前記注目入力画像データに対応する第1注目生成画像データを生成する第1生成工程であって、前記第1生成モデルは、光学的に読み取られた対象物の画像を表す画像データを前記第1生成モデルに入力することによって生成される画像データの画像が前記対象物のコンピュータグラフィックス画像に近づくように訓練された生成モデルである、前記第1生成工程と、前記第1注目生成画像データを第2生成モデルに入力することによって、不具合の無い注目対象物の画像を表す第2注目生成画像データを生成する第2生成工程であって、前記第2生成モデルは、対象物の画像を表す画像データを前記第2生成モデルに入力することによって不具合の無い対象物の画像を表す画像データを生成するように訓練された生成モデルである、前記第2生成工程と、前記第1注目生成画像データの画像と前記第2注目生成画像データの画像との間の差分を示す差分画像の差分画像データを生成する第3生成工程と、を備え、前記第1生成モデルは、生成ネットワークと識別ネットワークとを有する敵対的生成ネットワークの訓練によって生成された前記生成ネットワークであり、前記識別ネットワークは、訓練用の入力画像データを前記生成ネットワークに入力することによって生成された画像データの画像である第1画像中の第1部分領域の画像の少なくとも一部を示す第1部分画像を表す第1部分画像データと、訓練用のコンピュータグラフィックス画像である第2画像中の第2部分領域の画像の少なくとも一部を示す第2部分画像を表す第2部分画像データと、を前記識別ネットワークに入力することによって、訓練されている、画像処理方法。
 この構成によれば、識別ネットワークへ入力される画像データの多様性が増加し、識別ネットワークの訓練の速度が抑制されるので、生成ネットワークの訓練と識別ネットワークの訓練とのバランスをとることができる。従って、第1生成モデルは、光学的に読み取られた対象物の画像を表す画像データを第1生成モデルに入力することによって生成される画像データの画像が対象物のコンピュータグラフィックス画像に近づくように適切に訓練される。このような第1生成モデルによって生成される第1注目生成画像データが第2生成モデルに入力されるので、第2生成モデルは、不具合の無い注目対象物の画像を表す第2注目生成画像データを適切に生成できる。従って、第1注目生成画像データの画像と第2注目生成画像データの画像との間の差分を示す差分画像の差分画像データは、注目対象物の読取りの条件に拘わらずに、注目入力画像データによって表される注目対象物の不具合を、適切に表すことができる。
[適用例2]生成ネットワークと識別ネットワークとを有する敵対的生成ネットワークの訓練方法であって、訓練用の入力画像データを生成ネットワークに入力することによって、第1画像の第1画像データを生成する工程と、前記第1画像中の第1部分領域をランダムに決定する工程と、前記第1画像中の前記第1部分領域の画像の少なくとも一部を示す第1部分画像を表す第1部分画像データを、前記第1画像データと前記第1部分領域とを使用して取得する工程と、前記第1部分画像データを識別ネットワークに入力することによって、第1識別データを取得する工程と、前記入力画像データに対応付けられた第2画像データの第2画像中の第2部分領域をランダムに決定する工程と、前記第2画像中の前記第2部分領域の画像の少なくとも一部を示す第2部分画像を表す第2部分画像データを、前記第2画像データと前記第2部分領域とを使用して取得する工程と、前記第2部分画像データを前記識別ネットワークに入力することによって、第2識別データを取得する工程と、前記第1識別データと前記第2識別データとを使用することによって、前記識別ネットワークのパラメータを調整する工程と、を備える、訓練方法。
 この構成によれば、敵対的生成ネットワークの訓練のために識別ネットワークに入力される画像の多様性が向上するので、識別ネットワーク、ひいては、識別ネットワークと生成ネットワークを有する敵対的生成ネットワークを、適切に訓練できる。
 なお、本明細書に開示の技術は、種々の態様で実現することが可能であり、例えば、画像処理方法および画像処理装置、敵対的生成ネットワークの訓練方法および訓練装置、それらの方法または装置の機能を実現するためのコンピュータプログラム、そのコンピュータプログラムを記録した記録媒体(例えば、一時的ではない記録媒体)、等の形態で実現することができる。
一実施例としての画像処理装置を示す説明図である。 第1モデル500の例を示すブロック図である。 (A)は、第2生成モデル600の例を示すブロック図である。(B)は、第2生成モデル600の訓練の概要を示すブロック図である。 第1モデル500の第1訓練処理の例を示すフローチャートである。 第1モデル500の第1訓練処理の例を示すフローチャートである。 第2生成モデル600の第2訓練処理の例を示すフローチャートである。 検査処理の例を示すフローチャートである。 検査処理の概略図である。 (A)、(B)は、表示部240に表示される画像の例を示す概略図である。 検査処理の概略図である。
A.第1実施例:
A1.装置構成:
 図1は、一実施例としての画像処理装置を示す説明図である。本実施例では、画像処理装置200は、例えば、パーソナルコンピュータである。画像処理装置200は、対象物(本実施例では、プリンタDVに貼られたラベルシートLB)の撮影画像の画像データを処理する。画像処理装置200は、プロセッサ210と、記憶装置215と、表示部240と、操作部250と、通信インタフェース270と、を備えている。これらの要素は、バスを介して互いに接続されている。記憶装置215は、揮発性記憶装置220と、不揮発性記憶装置230と、を含んでいる。
 表示部240は、液晶ディスプレイ、有機ELディスプレイなどの、画像を表示するように構成された装置である。操作部250は、ボタン、レバー、表示部240上に重ねて配置されたタッチパネルなどの、ユーザによる操作を受け取るように構成された装置である。ユーザは、操作部250を操作することによって、種々の指示を画像処理装置200に入力可能である。通信インタフェース270は、他の装置と通信するためのインタフェースである(例えば、USBインタフェース、有線LANインタフェース、IEEE802.11の無線インタフェース)。通信インタフェース270には、デジタルカメラ100が接続されている。デジタルカメラ100は、プリンタDVに貼られたラベルシートLBを光学的に読み取ることによって、読み取られたラベルシートLBを表す画像データを生成する。本実施例では、ラベルシートLBは、矩形状のシートであり、文字列を含む種々のオブジェクトを表している。適切な文字列は、予めプリンタDVのモデルに対応付けられている。なお、製造時のエラーは、ラベルシートLBの文字列の不具合を引き起こし得る。例えば、ラベルシートLBは、誤った文字列を表し得る。また、適切な文字列の一部または全部が、欠ける場合がある。本実施例では、画像処理装置200は、ラベルシートの不具合に関する検査を行う。
 プロセッサ210は、データ処理を行うように構成された装置であり、例えば、CPUである。揮発性記憶装置220は、例えば、DRAMであり、不揮発性記憶装置230は、例えば、フラッシュメモリである。不揮発性記憶装置230は、プログラム231、232、233と、第1モデル500と、第1種訓練データ590と、第2生成モデル600と、第2種訓練データ690と、を格納している。モデル500、600は、それぞれ、人工ニューラルネットワークを有する予測モデルである。第1モデル500は、第1生成モデル510と第1識別モデル520とを含んでいる。
 第1モデル500の第1生成モデル510は、デジタルカメラ100によって光学的に読み取られたラベルシートLBを表す画像データを使用して、同じラベルシートLBのコンピュータグラフィックス画像(詳細は、後述)のような画像データを生成する。第1生成モデル510は、画像に含まれるノイズと読取条件との影響を緩和するように、訓練される。第1識別モデル520は、第1生成モデル510の訓練のために、使用される。本実施例では、第1モデル500は、プログラムモジュールである。第1種訓練データ590は、第1モデル500の訓練のための画像データである。
 第2生成モデル600は、第1生成モデル510によって生成された画像データを使用して、不具合の無いラベルシートを表す画像データを生成する。第2生成モデル600は、第2生成モデル600に入力される画像データによって表されるラベルシートが不具合を有する場合であっても、不具合の無いラベルシートを表す画像データを生成するように、訓練される。本実施例では、第2生成モデル600は、プログラムモジュールである。第2種訓練データ690は、第2生成モデル600の訓練のための画像データである。
 第1プログラム231は、第1モデル500の訓練のためのプログラムである。第2プログラム232は、第2生成モデル600の訓練のためのプログラムである。第3プログラム233は、ラベルシートの検査処理のためのプログラムである。プロセッサ210は、プログラム231、232、233の実行に使用される種々の中間データを、記憶装置215(例えば、揮発性記憶装置220、不揮発性記憶装置230のいずれか)に、一時的に格納する。プログラム231、232、233と、モデル500、600と、の詳細については、後述する。
A2.第1モデル500の構成:
 図2は、第1モデル500の例を示すブロック図である。第1モデル500は、いわゆる敵対的生成ネットワーク(GAN : Generative Adversarial Networks)を使用して構成されている。第1モデル500は、第1生成モデル510(すなわち、生成ネットワーク)と第1識別モデル520(すなわち、識別ネットワーク)とを有している。
 第1モデル500の第1生成モデル510には、デジタルカメラ100によって読み取られたラベルシートLBiを表す画像I5iの画像データI5idが入力される。第1生成モデル510は、入力された画像データI5idによって表されるラベルシートLBiと同じラベルシートLBiの画像I51を表す画像データI51dを生成する。生成される画像I51内のラベルシートLBiの位置と大きさとは、入力される画像I5i内のラベルシートLBiの位置と大きさと、それぞれ同じである。第1生成モデル510は、第1生成モデル510によって生成される画像データI51dの画像I51がコンピュータグラフィックス画像に近づくように、訓練される。コンピュータグラフィックス画像は、コンピュータによって生成される画像である。コンピュータグラフィックス画像は、例えば、オブジェクトを描画するための描画コマンドを含むベクタデータのレンダリング(ラスタライズとも呼ばれる)によって、生成される。デジタルカメラ100などの読取装置によって読み取られた対象物を表す画像(読取画像とも呼ぶ)は、読取装置で生じる種々のノイズを含み得る。また、読取画像は、読取時の光源の明るさ、光源の色、対象物と読取装置との間の位置関係、などの読取りの条件に応じて、種々に変化し得る。読取画像中の対象物の色は、光源の明るさと光源の色とに応じて、種々に変化し得る。読取画像中の対象物の形状は、対象物と読取装置との間の位置関係に応じて、幾何学的に歪み得る(例えば、矩形の対象物は、読取画像中では、台形または平行四辺形で表され得る)。コンピュータグラフィックス画像は、読取装置で生じるノイズと読取りの条件との影響を受けずに生成される。訓練済の第1生成モデル510は、ラベルシートの画像に含まれるノイズと読取りの条件との影響を緩和する。
 以下、第1モデル500に入力される画像データI5idを、入力画像データI5idとも呼び、入力画像データI5idの画像I5iを、入力画像I5iとも呼ぶ。また、第1モデル500によって生成される画像データI51dを、第1生成画像データI51dとも呼び、第1生成画像データI51dの画像I51を、第1生成画像I51とも呼ぶ。なお、本実施例では、画像I5i、I51は、それぞれ、矩形状の画像である(高さは256画素、幅は512画素)。画像I5i、I51の形状は、ラベルシートの形状と同じである。また、画像データI5id、I51dは、それぞれ、R(赤)G(緑)B(青)の3チャンネルで各画素の色を示すカラービットマップデータである。入力画像データI5idの要素数(ここでは、高さ*幅*チャンネル数)は、256*512*3である。RGBのそれぞれの色値は、ゼロから255までの256階調で表される。
 なお、入力画像I5iのラベルシートLBiは、文字列の欠損や、誤記などの、不具合を有し得る。後述するように、入力画像I5iのラベルシートLBiが不具合を有する場合、第1生成画像I51は、同じ不具合を有するラベルシートLBiを表す。
 第1生成モデル510は、いわゆるオートエンコーダを使用して構成されている。第1生成モデル510は、第1エンコーダ512と、第1デコーダ517と、を有している。第1エンコーダ512は、入力された画像データに対して次元削減処理を実行して、入力された画像の特徴を示す第1特徴データ515を生成する。本実施例では、第1エンコーダ512の構成は、以下の通りである。第1エンコーダ512は、上流側から順に並ぶ、5個の畳込層を有している。各畳込層は、2のストライドを使用して、高さに相当する要素数と幅に相当する要素数とを削減する(チャンネル数に相当する要素数は、増大する)。2番目から5番目までの各畳込層には、バッチノーマライゼーションが適用されている。各層の活性化関数は、LeakyReLUである。5個の畳込層は、データの要素数を、「256*512*3」から、「128*256*64」、「64*128*128」、「32*64*256」、「16*32*512」、「8*16*512」の順に、変化させる。第1特徴データ515の要素数は、8*16*512である。
 第1デコーダ517は、第1特徴データ515に対して次元復元処理を実行して、第1生成画像データI51dを生成する。本実施例では、第1デコーダ517の構成は、以下の通りである。第1デコーダ517は、上流側から順に並ぶ、5個の転置畳込層を有している。各転置畳込層は、2以上のストライド(本実施例では、2)を使用して、高さに相当する要素数と幅に相当する要素数とを増大する(チャンネル数に相当する要素数は、低減する)。1番目から4番目までの4個の転置畳込層には、バッチノーマライゼーションが適用されている。また、訓練時に、1番目から2番目までの2個の転置畳込層には、ドロップアウトが適用される。各層の活性化関数は、ReLUである。なお、最後の転置畳込層の活性化関数としては、画像データI51dの生成に適した関数(例えば、Tanh関数、または、シグモイド関数)が使用される。第1生成画像データI51dの要素数は、入力画像データI5idの要素数と同じである。
 また、本実施例では、第1生成モデル510は、いわゆるU-Netと同様のアーキテクチャを有している。第1エンコーダ512と第1デコーダ517との間には、複数のコネクション519が設けられている。具体的には、1番目の畳込層の活性化関数からの出力データが、4番目の転置畳込層の活性化関数からの出力データに連結される。同様に、2番目の畳込層と3番目の転置畳込層のペアと、3番目の畳込層と2番目の転置畳込層とのペアと、4番目の畳込層と1番目の転置畳込層とのペアと、のそれぞれに関して、畳込層の活性化関数からの出力データが、転置畳込層の活性化関数からの出力データに連結される。2個の出力データの連結は、連結された出力データが2個の出力データのそれぞれのチャンネルを示すように、行われる。例えば、64*128*256の要素を有する出力データと、64*128*128の要素を有する出力データと、が連結される場合、64*128*384の要素を有するデータが生成される。5個の転置畳込層による転置畳込と4個のコネクション519による連結とによって、データの要素数は、「8*16*512」から、「16*32*512(転置畳込)」、「16*32*1024(連結)」、「32*64*256(転置畳込)」、「32*64*512(連結)」、「64*128*256(転置畳込)」、「64*128*384(連結)」、「128*256*128(転置畳込)」、「128*256*192(連結)」、「256*512*3(転置畳込)」の順に変化する。複数のコネクション519は、位置に関する情報を、第1エンコーダ512から第1デコーダ517へ伝達する。これにより、第1デコーダ517は、詳細な形状を表す画像I51の画像データI51dを生成できる。このようなコネクション519は、スキップコネクションとも呼ばれる。
 第1識別モデル520は、実画像データと偽画像データとを識別するように、訓練される。具体的には、第1識別モデル520は、第1生成モデル510によって生成された第1生成画像データI51dを偽データと識別し、ラベルシートを表すコンピュータグラフィックス画像Ioの画像データIodを実データと識別するように、訓練される。一方、第1生成モデル510は、訓練された第1識別モデル520が第1生成画像データI51dを実データと誤って識別するように、訓練される。このような訓練により、第1生成モデル510は、コンピュータグラフィックス画像Ioに近い第1生成画像I51の第1生成画像データI51dを生成できる。
 第1識別モデル520は、入力された画像データに対して次元削減処理を実行して、1個の値を示す識別データ529を生成する。本実施例では、第1識別モデル520の構成は、以下の通りである。第1識別モデル520は、上流側から順に並ぶ、畳込層群522と、グローバル平均プーリング層525と、全結合層群527と、を有している。後述するように、第1識別モデル520には、画像I51、Ioの一部分である部分画像PA1、PA2を表す部分画像データPA1d、PA2dが、入力される。部分画像PA1、PA2の要素数は、64*64*3である。
 畳込層群522は、上流側から順に並ぶ3個の畳込層を有している。各畳込層は、2のストライドを使用して、高さに相当する要素数と幅に相当する要素数とを、削減する(チャンネル数に相当する要素数は、増大する)。3個の畳込層には、バッチノーマライゼーションが適用されている。各畳込層の活性化関数は、LeakyReLUである。3個の畳込層は、データの要素数を、「64*64*3」から、「32*32*64」、「16*16*128」、「8*8*128」の順に、変化させる。
 グローバル平均プーリング層525は、チャンネル毎の平均値を算出する。本実施例では、グローバル平均プーリング層525から出力されるデータの要素数は、128である。
 全結合層群527は、上流側から順に並ぶ3個の全結合層を有している。全結合層群527は、要素数を増大させた後、要素数を1まで低減させる。本実施例では、3個の全結合層は、要素数を、128から、512、256、1の順に変化させる。なお、要素数は、単調に減少してもよい。また、訓練時に、2番目の全結合層に、ドロップアウトが適用される。1番目から2番目までの2個の全結合層の活性化関数は、ReLUである。最後の全結合層の活性化関数としては、識別データ529の生成に適した関数(例えば、シグモイド関数、または、Tanh関数)が使用される。
 本実施例では、識別データ529は、ゼロ以上、1以下の値を示している。「1」は、「実」を示し、「0」は、「偽」を示している。識別データ529は、入力された画像データがコンピュータグラフィックス画像の画像データであることの確信の度合いを示している。
A3.第2生成モデル600の構成:
 図3(A)は、第2生成モデル600の例を示すブロック図である。図中の画像データI61dは、第2生成モデル600に入力される画像データである。本実施例では、画像データI61dは、第1生成モデル510(図2)によって生成される第1生成画像データである(第1生成画像データI61dとも呼ぶ)。第1生成画像データI61dは、ラベルシートLBjの画像I61を表している。第2生成モデル600は、第1生成画像データI61dを使用して、不具合の無いラベルシートLBjxを表す画像データI62dを生成する。上述したように、第1生成画像データI61dの画像I61のラベルシートLBjは、種々の不具合を有し得る。訓練済の第2生成モデル600は、ラベルシートLBjが不具合を有する場合であっても、不具合の無いラベルシートLBjxの画像I62を表す画像データI62dを生成する。生成される画像I62内のラベルシートLBjxの位置と大きさとは、入力される画像I61内のラベルシートLBjの位置と大きさと、それぞれ同じである。以下、第2生成モデル600によって生成される画像データI62dを、第2生成画像データI62dとも呼び、第2生成画像データI62dの画像I62を、第2生成画像I62とも呼ぶ。なお、本実施例では、第2生成画像データI62dは、第1生成画像データI61dと同じカラービットマップデータである。第2生成画像データI62dの要素数(ここでは、高さ*幅*チャンネル数)は、256*512*3である。
 第2生成モデル600は、いわゆるオートエンコーダを使用して構成されている。本実施例では、第2生成モデル600の構成は、第1生成モデル510(図2)の構成と、同じである。第2生成モデル600は、第2エンコーダ602と、第2デコーダ607と、を有している。第2エンコーダ602の構成は、第1エンコーダ512(図2)の構成と同じであり、第2デコーダ607の構成は、第1デコーダ517(図2)の構成と同じである。第2エンコーダ602と第2デコーダ607との間には、複数のコネクション609が設けられている。第2エンコーダ602は、入力された画像データに対して次元削減処理を実行して、入力された画像の特徴を示す特徴データ605を生成する。
A4.第1訓練処理:
 図4、図5は、第1モデル500の第1訓練処理の例を示すフローチャートである。図5は、図4の続きの処理を示している。プロセッサ210(図1)は、第1プログラム231に従って、図4、図5の処理を実行する。
 S210では、プロセッサ210は、デジタルカメラ100によって読み取られたラベルシートの画像を表す入力画像データを生成する。本実施例では、作業者は、ラベルシート(例えば、ラベルシートLB(図1))がデジタルカメラ100の撮影範囲内に位置するように、プリンタ(例えば、プリンタDV)を配置する。ここで、不具合の無いラベルシートが使用される。プロセッサ210は、デジタルカメラ100にラベルシートを撮影させ、撮影画像データをデジタルカメラ100から取得する。撮影画像は、デジタルカメラ100によって読み取られたラベルシートの画像である。プロセッサ210は、撮影画像からラベルシートの領域を抽出するクロッピング処理を行う。本実施例では、プロセッサ210は、撮影画像を表示部240に表示し、作業者が、撮影画像のうちラベルシートを示すラベル領域を指定する。プロセッサ210は、撮影画像データのうちのラベル領域に対応する部分を使用して、ラベル領域の画像を表す入力画像データを生成する(基準入力画像データとも呼ぶ)。プロセッサ210は、基準入力画像データによって表される入力画像の高さと幅とを、第1モデル500によって受け入れられる画像の高さと幅とに調整する。
 S215では、プロセッサ210は、データオーギュメンテーションとも呼ばれる加工処理を基準入力画像データに対して行うことによって、互いに異なる画像を表す複数の入力画像データを生成する。本実施例では、プロセッサ210は、予め決められた複数の候補加工処理から、ランダムに1以上の加工処理を選択する(例えば、乱数に従って加工処理が選択される)。そして、プロセッサ210は、選択した加工処理を基準入力画像データに対して実行することによって、新たな入力画像データを生成する。プロセッサ210は、加工処理の選択と実行とを、複数回行う。
 本実施例では、複数の候補加工処理は、ラベルシートの不具合を形成する複数の不具合形成処理を含んでいる。複数の不具合形成処理は、ラベルシートの文字列の一部を削除する処理を含んでよい(削除された文字に対応する画素の色は、削除された文字の近傍の背景部分の色と同じ色に変更される)。複数の不具合形成処理は、文字を別の文字に変更する処理を含んでよい。複数の不具合形成処理は、画像の一部を削除する処理を含んでよい。このような不具合形成処理は、不具合を有するラベルシートが撮影された場合に生成され得る画像データを、生成可能である。
 また、複数の候補加工処理は、ラベルシートの読取条件の変化に相当する複数の条件変化処理を含んでいる。複数の条件変化処理は、トーンカーブ調整処理、ホワイトバランス調整処理、ノイズ付加処理を含んでよい。このような条件変化処理は、種々の読取条件の下でラベルシートが撮影された場合に生成され得る画像データを、生成可能である。
 プロセッサ210は、種々の加工処理を実行することによって、不具合の無い種々のラベルシートを表す複数の入力画像データと、不具合を有する種々のラベルシートの複数の入力画像データとを、生成する。いずれの入力画像データも、光学的に読み取られたラベルシートの画像を表している。なお、不具合を有するラベルシートの撮影によって、不具合を有するラベルシートの入力画像データが生成されてもよい。
 S220では、プロセッサ210は、入力画像データと、不具合の無いラベルシートを表す原本画像データと、の複数組の画像ペアを生成する。そして、プロセッサ210は、各画像ペアに関して、入力画像データと原本画像データとを対応付けて記憶装置215(本実施例では、不揮発性記憶装置230)に格納する。格納された複数組の画像ペアは、第1種訓練データ590を構成する。原本画像データは、予め準備された原本ベクタデータのレンダリングによって生成されるビットマップデータであり、ラベルシートのコンピュータグラフィックス画像を表している。原本ベクタデータは、ラベルシートの製造のために予め準備されているデータである。原本画像データの画像の高さと幅とは、第1生成モデル510(図2)によって生成される第1生成画像の高さと幅と、それぞれ同じである。本実施例では、原本画像データは、複数組の画像ペアに共通である。第1種訓練データ590に含まれる原本画像データの総数は、1個であってよい。なお、製造時のエラーにより、不具合を有するラベルシートが製造され得る。
 なお、S210では、ラベルシートの複数回の撮影が行われてよい。複数回の撮影の間では、撮影条件(例えば、図示しない光源の明るさ等)が異なってよい。そして、プロセッサ210は、複数の基準入力画像データを生成してよい。S215では、プロセッサ210は、複数の基準入力画像データを使用して、複数の入力画像データを生成してよい。
 S225では、プロセッサ210は、第1モデル500(図2)の複数の演算パラメータ、すなわち、第1生成モデル510と第1識別モデル520とのそれぞれの複数の演算パラメータ(例えば、畳込フィルタの複数の重みと複数のバイアスなど)を、初期化する。例えば、各演算パラメータは、乱数値に設定される。
 S230では、プロセッサ210は、第1種訓練データ590に含まれる複数組の画像ペアから、処理対象の複数の画像ペアである複数の対象ペアで構成されるサブセットを選択する。サブセットとしては、未処理の複数の画像ペアが選択される。また、サブセットの画像ペアの総数は、予め決められている。以下、図2の入力画像データI5idと画像データIodとが、対象ペアを示していることとする。ここで、画像データIodが、原本画像データである(画像データIodを、原画像データIodとも呼び、画像Ioを、原画像Ioとも呼ぶ)。
 S235では、プロセッサ210は、対象ペアの入力画像データI5idを第1生成モデル510に入力することによって、第1生成画像データI51dを生成する。具体的には、プロセッサ210は、第1生成モデル510の演算パラメータを使用して、第1生成モデル510の各層の演算を行うことによって、第1生成画像データI51dを生成する。
 S240では、プロセッサ210は、第1生成画像I51中の一部の領域である第1部分領域A1を、ランダムに決定する。第1部分領域A1を定める複数のパラメータ(例えば、位置、形状、大きさ、数など)のうち、予め選択されたパラメータを、プロセッサ210は、ランダムに決定する。本実施例では、プロセッサ210は、乱数を生成し、乱数に従って第1部分領域A1の位置である第1位置P1を決定する。第1部分領域A1の形状と大きさとは、予め決められている。また、プロセッサ210は、1個の第1部分画像PA1のための1個の第1部分領域A1を、決定する。
 S245では、プロセッサ210は、第1生成画像データI51dと第1部分領域A1とを使用する第1取得処理を実行することによって、第1部分領域A1の画像の少なくとも一部を示す第1部分画像PA1の第1部分画像データPA1dを取得する。本実施例では、プロセッサ210は、第1位置P1に配置された所定形状と所定サイズとを有する第1部分領域A1の画像を示す第1部分画像PA1の第1部分画像データPA1dを取得する。すなわち、プロセッサ210は、第1部分領域A1の画像を、そのまま、第1部分画像PA1として採用する。これに代えて、第1取得処理は、画像の回転や画像のスケーリング(拡大、または、縮小)などの種々の画像処理を含んでよい(詳細は、後述)。
 S250では、プロセッサ210は、第1部分画像データPA1dを第1識別モデル520に入力することによって、識別データ529を生成する。具体的には、プロセッサ210は、第1識別モデル520の演算パラメータを使用して、第1識別モデル520の各層の演算を行うことによって、識別データ529を算出する。以下、第1部分画像データPA1d(すなわち、第1生成画像データI51d)から得られる識別データ529を、第1識別データ529fとも呼ぶ。
 S255では、プロセッサ210は、原画像Io中の一部の領域である第2部分領域A2を、ランダムに決定する。第2部分領域A2を定める複数のパラメータ(例えば、位置、形状、大きさ、数など)のうち、予め選択されたパラメータを、プロセッサ210は、ランダムに決定する。本実施例では、プロセッサ210は、乱数を生成し、乱数に従って第2部分領域A2の位置である第2位置P2を決定する。第2部分領域A2の形状と大きさとは、予め決められている。また、プロセッサ210は、1個の第2部分画像PA2のための1個の第2部分領域A2を、決定する。
 S260では、プロセッサ210は、原画像データIodと第2部分領域A2とを使用する第2取得処理を実行することによって、第2部分領域A2の画像の少なくとも一部を示す第2部分画像PA2の第2部分画像データPA2dを取得する。本実施例では、プロセッサ210は、第2位置P2に配置された所定形状と所定サイズとを有する第2部分領域A2の画像を示す第2部分画像PA2の第2部分画像データPA2dを取得する。すなわち、プロセッサ210は、第2部分領域A2の画像を、そのまま、第2部分画像PA2として採用する。これに代えて、第2取得処理は、画像の回転や画像のスケーリングなどの種々の画像処理を含んでよい(詳細は、後述)。
 S265では、プロセッサ210は、第2部分画像データPA2dを第1識別モデル520に入力することによって、識別データ529を生成する。具体的には、プロセッサ210は、第1識別モデル520の演算パラメータを使用して、第1識別モデル520の各層の演算を行うことによって、識別データ529を算出する。以下、第2部分画像データPA2d(すなわち、原画像データIod)から得られる識別データ529を、第2識別データ529rとも呼ぶ。
 S270(図5)では、プロセッサ210は、第1識別データ529fと第2識別データ529rとを使用して、予め決められた識別損失関数に従って、識別損失を算出する。識別損失関数は、第2識別データ529rが「実(1)」に近いほど小さい値を算出し、第1識別データ529fが「偽(ゼロ)」に近いほど小さい値を算出するような、種々の関数であってよい。例えば、第2識別データ529rを、Drとし、第1識別データ529fを、Dfとする場合に、識別損失関数は、以下の関数Fa(Dr、Df)であってよい。
 Fa(Dr、Df)=(1-Dr)+(Df)
 本実施例では、サブセット(図4:S230)は、複数組の対象ペアを含んでいる。プロセッサ210は、複数組の対象ペアのそれぞれに関して、S235-S265の処理を実行する。そして、S270では、プロセッサ210は、複数組の対象ペアから識別損失関数に従って取得される複数の損失の合計値を、識別損失として算出する。
 S275では、プロセッサ210は、識別損失が小さくなるように、予め決められたアルゴリズムに従って、第1識別モデル520の複数の演算パラメータを調整する。アルゴリズムとしては、例えば、誤差逆伝播法と勾配降下法とを使用したアルゴリズムが採用されてよい。また、プロセッサ210は、いわゆるAdamの最適化を行ってよい。また、本実施例では、プロセッサ210は、畳込層群522の各畳込層に、バッチノーマライゼーションを適用する。プロセッサ210は、全結合層群527のうちの2番目の全結合層に、ドロップアウトを適用する。
 なお、識別損失関数は、第2識別データ529rが「実(1)」に近いほど大きい値を算出し、第1識別データ529fが「偽(ゼロ)」に近いほど大きい値を算出するような関数であってよい。例えば、識別損失関数は、以下の関数Fb(Dr、Df)であってよい。
 Fb(Dr、Df)=log(Dr)+log(1-Df)
 この場合、識別損失が大きいほど、第1識別モデル520の性能は良好である。プロセッサ210は、識別損失が大きくなるように、第1識別モデル520の複数の演算パラメータを調整する。なお、この場合、第1識別モデル520にとっては、識別損失は、小さくすべき損失ではなく、大きくすべき評価値である。なお、関数Fb(Dr、Df)にマイナスの符号を付して得られる関数-Fb(Dr、Df)は、小さくすべき損失を表す損失関数として使用可能である。
 S280、S285は、図4のS240、S245と、それぞれ同じである。S280、S285では、プロセッサ210は、新たな第1位置P1を決定し、新たな第1部分画像データPA1dを取得する。
 S290では、プロセッサ210は、新たな第1部分画像データPA1dを第1識別モデル520に入力することによって、新たな第1識別データ529fを生成する。S275で第1識別モデル520が訓練されているので、S290で算出される第1識別データ529fは、「偽(ゼロ)」により近い値になり得る。
 S295では、プロセッサ210は、S290で生成された第1識別データ529fを使用して、予め決められた生成損失関数に従って、生成損失を算出する。生成損失関数は、第1識別データ529fが「実(1)」に近いほど、小さい値を算出する種々の関数であってよい。例えば、第1識別データ529fをDfとする場合に、生成損失関数は、以下の関数Fc(Df)であってよい。
   Fc(Df)=(1-Df)
 本実施例では、サブセット(図4:S230)が複数組の対象ペアを含んでいるので、S235では、プロセッサ210は、複数の第1生成画像データを生成する。プロセッサ210は、複数組の第1生成画像データのそれぞれに関して、S280-S290(図5)の処理を実行する。そして、S295では、プロセッサ210は、複数の第1生成画像データから生成損失関数に従って取得される複数の損失の合計値を、生成損失として算出する。
 S300では、プロセッサ210は、生成損失が小さくなるように、予め決められたアルゴリズムに従って、第1生成モデル510の複数の演算パラメータを調整する。アルゴリズムとしては、例えば、誤差逆伝播法と勾配降下法とを使用したアルゴリズムが採用されてよい。また、プロセッサ210は、いわゆるAdamの最適化を行ってよい。また、本実施例では、プロセッサ210は、第1エンコーダ512の2番目から5番目までの4個の畳込層と、第1デコーダ517の1番目から4番目までの4個の転置畳込層と、に、バッチノーマライゼーションを適用する。プロセッサ210は、第1デコーダ517の1番目から2番目までの2個の転置畳込層に、ドロップアウトを適用する。
 S305では、プロセッサ210は、訓練終了条件が満たされるか否かを判断する。訓練終了条件は、第1モデル500が適切に訓練されたことを示す任意の条件であってよい。本実施例では、訓練終了条件は、作業者からの終了指示が入力されることである。プロセッサ210は、第1種訓練データ590(図1)中の訓練に使用されていない複数の画像ペアから、所定数の画像ペアをランダムに取得する。プロセッサ210は、取得した複数の画像ペアのそれぞれの入力画像データを第1生成モデル510に入力し、第1生成モデル510から複数の第1生成画像データを取得する。プロセッサ210は、入力された入力画像と出力された第1生成画像との複数のペアを、表示部240に表示する。作業者は、表示部240を観察して、第1生成画像が入力画像と同じラベルシートのコンピュータグラフィックス画像を適切に表しているか否かを確認する。作業者は、確認結果に応じて、操作部250を操作して、訓練の終了指示、または、継続指示を入力する。
 なお、訓練の終了条件は、他の条件であってよい。例えば、終了条件は、訓練に使用されていない予め決められた第1数の画像ペアを使用して算出される識別損失と生成損失とが、それぞれに対応する所定の閾値以下であることであってよい。
 訓練が終了していないと判断される場合(S305:No)、プロセッサ210は、図4のS230へ移行し、新たなサブセットの処理を実行する。訓練が終了したと判断される場合(S305:Yes)、S310で、プロセッサ210は、訓練済の第1生成モデル510を、記憶装置215(ここでは、不揮発性記憶装置230)に格納する。そして、プロセッサ210は、図4、図5の処理を終了する。訓練済の第1生成モデル510は、ラベルシートの読取画像を、同じラベルシートのコンピュータグラフィックス画像に変換できる。なお、訓練が終了した場合、プロセッサ210は、第1識別モデル520を、不揮発性記憶装置230から削除してよい。
 なお、上述した読取装置で生じるノイズと読取りの条件との影響は、読取画像(例えば、入力画像I5i(図2))の全体に、及ぶ。一方、コンピュータグラフィックス画像(例えば、原画像Io(図2))に対するそのような影響は、小さい。従って、読取画像の一部分のみと、コンピュータグラフィックス画像の一部分のみと、が使用可能な場合であっても、読取画像とコンピュータグラフィックス画像との識別は容易である。このように、第1識別モデル520(図2)は、ラベルシートの画像I51、Ioの全体ではなく部分画像PA1、PA2が入力される場合であっても、入力された画像がコンピュータグラフィックス画像であるか否かを適切に識別できる。また、本実施例の訓練では、第1識別モデル520へ入力される画像データの多様性が増加する。例えば、原画像Io中の互いに異なる部分を示す複数の第2部分画像PA2が、第1識別モデル520に入力される。従って、第1識別モデル520の訓練の速度が抑制される。この結果、第1生成モデル510の訓練と第1識別モデル520の訓練とのバランスをとることができる。従って、本実施例の訓練は、光学的に読み取られたラベルシートの画像I5iを表す画像データI5idを第1生成モデル510に入力することによって生成される画像データI51dの画像I51がラベルシートのコンピュータグラフィックス画像に近づくように、第1生成モデル510を適切に訓練できる。
 また、本実施例の訓練では、第1識別モデル520は、第1生成画像I51中の第1部分領域A1の画像を示す第1部分画像PA1の第1部分画像データPA1dを、偽画像データとして使用する。また、第1識別モデル520は、原画像Io中の第2部分領域A2の画像を示す第2部分画像PA2の第2部分画像データPA2dを、実画像データとして使用する。原画像Ioは、不具合の無いラベルシートを表している。従って、本実施例の訓練は、第1部分画像PA1によって表されるラベルシートの部分が、不具合の無いラベルシートの対応する部分に近づくように、第1生成モデル510を訓練できる。また、第1生成モデル510には、ラベルシートの不具合の無い部分を含む種々の入力画像I5iの種々の入力画像データI5idが入力される。従って、本実施例の訓練は、入力画像I5i中のラベルシートの不具合の無い部分と同じ部分を表す第1生成画像I51を生成するように、第1生成モデル510を訓練できる。仮に、入力画像I5iのラベルシートLBiが不具合を有する場合、第1生成画像I51は、入力画像I5iに含まれる不具合を示す部分の影響により、同様の不具合を示す部分を含み得る。本実施例の訓練では、第1部分領域A1は、第1生成画像I51内の不具合を示す部分とは異なる部分に決定され得る。従って、第1生成モデル510は、入力画像I5iに含まれる不具合を示す部分に起因する第1生成画像I51内の同様の不具合を示す部分がそのまま残るように、訓練され得る。以上により、訓練済の第1生成モデル510は、入力画像I5iのラベルシートLBiが不具合を有する場合、同じ不具合を有するラベルシートLBiを表す第1生成画像I51を生成する。
 また、プロセッサ210は、第1部分画像PA1のための第1部分領域A1の第1位置P1を、ランダムに決定する(図4:S240)。プロセッサ210は、第2部分画像PA2のための第2部分領域A2の第2位置P2を、ランダムに決定する(S255)。従って、種々の位置P1、P2の部分画像PA1、PA2の部分画像データPA1d、PA2dが、第1識別モデル520に入力される。このように、第1識別モデル520へ入力される画像データの多様性が増加するので、第1生成モデル510と第1識別モデル520との適切な訓練が、可能である。
A5.第2訓練処理:
 図6は、第2生成モデル600の第2訓練処理の例を示すフローチャートである。図3(B)は、第2生成モデル600の訓練の概要を示すブロック図である。本実施例では、第2生成モデル600は、種々のラベルシートの画像データが入力される場合に、不具合のないラベルシートの画像データを生成するように、訓練される。プロセッサ210(図1)は、第2プログラム232に従って、図6の処理を実行する。
 S410では、プロセッサ210は、図2で説明した原画像データIodを使用して複数の訓練画像データを生成し、生成した複数の訓練画像データを記憶装置215(本実施例では、不揮発性記憶装置230)に格納する。格納された複数の訓練画像データは、第2種訓練データ690(図1)を構成する。本実施例では、プロセッサ210は、データオーギュメンテーションとも呼ばれる加工処理を原画像データIodに対して行うことによって、互いに異なる画像を表す複数の訓練画像データを生成する。プロセッサ210は、S215(図4)と同様に、予め決められた複数の候補加工処理からの加工処理の選択と、原画像データIodに対する選択された加工処理の実行とを、複数回行う。なお、S410で使用される複数の候補加工処理は、不具合の無いラベルシートを維持する複数の加工処理で構成されている(例えば、トーンカーブ調整処理、ホワイトバランス調整処理、ノイズ付加処理など)。文字の領域を加工する処理のようなラベルシートの不具合を生成する加工処理は、使用されない。従って、複数の訓練画像データは、いずれも、不具合の無いラベルシートを表している。
 S415では、プロセッサ210は、第2生成モデル600の複数の演算パラメータ(例えば、畳込フィルタの複数の重みと複数のバイアスなど)を、初期化する。例えば、各演算パラメータは、乱数値に設定される。
 S420では、プロセッサ210は、第2種訓練データ690に含まれる複数の訓練画像データから、処理対象の複数のデータである複数の対象訓練画像データで構成されるサブセットを選択する。サブセットとしては、未処理の複数の訓練画像データが選択される。サブセットの画像データの総数は、予め決められている。
 S425では、プロセッサ210は、対象訓練画像データI6td(図3(B))を、第2生成モデル600(図3)に入力することによって、第2生成画像データI6xdを生成する。具体的には、プロセッサ210は、第2生成モデル600の演算パラメータを使用して、第2生成モデル600の各層の演算を行うことによって、第2生成画像データI6xdを生成する。
 S430では、プロセッサ210は、第2生成モデル600に入力された対象訓練画像データI6tdと、第2生成画像データI6xdと、を使用して、予め決められた再構成損失関数に従って、再構成損失を算出する。再構成損失関数は、2個の画像データの間の差分を表す種々の関数であってよい。本実施例では、再構成損失関数として、いわゆる交差エントロピーが使用される。これに代えて、再構成損失関数として、二乗和誤差が使用されてよい。本実施例では、サブセット(S420)は、複数の対象訓練画像データを含んでいる。プロセッサ210は、複数の対象訓練画像データのそれぞれに関して、S425の処理を実行し、複数の第2生成画像データを生成する。S430では、プロセッサ210は、対象訓練画像データと第2生成画像データとの複数のペアから再構成損失関数に従って取得される複数の損失L2の合計値を、再構成損失として算出する。
 S435では、プロセッサ210は、再構成損失が小さくなるように、予め決められたアルゴリズムに従って、第2生成モデル600の複数の演算パラメータを調整する。アルゴリズムとしては、例えば、誤差逆伝播法と勾配降下法とを使用したアルゴリズムが採用されてよい。また、プロセッサ210は、いわゆるAdamの最適化を行ってよい。また、本実施例では、プロセッサ210は、第2エンコーダ602の2番目から5番目までの4個の畳込層と、第2デコーダ607の1番目から4番目までの4個の転置畳込層と、に、バッチノーマライゼーションを適用する。プロセッサ210は、第2デコーダ607の1番目から2番目までの2個の転置畳込層に、ドロップアウトを適用する。
 S440では、プロセッサ210は、訓練終了条件が満たされるか否かを判断する。訓練終了条件は、第2生成モデル600が適切に訓練されたことを示す任意の条件であってよい。本実施例では、訓練終了条件は、作業者からの終了指示が入力されることである。プロセッサ210は、第2種訓練データ690(図1)中の訓練に使用されていない複数の訓練画像データから、所定数の画像データをランダムに取得する。プロセッサ210は、取得した複数の画像データを第2生成モデル600に入力し、第2生成モデル600から複数の第2生成画像データを取得する。プロセッサ210は、入力された画像と出力された第2生成画像との複数のペアを、表示部240に表示する。作業者は、表示部240を観察して、第2生成画像が入力された画像と同じラベルシートの画像を適切に表しているか否かを確認する。作業者は、確認結果に応じて、操作部250を操作して、訓練の終了指示、または、継続指示を入力する。
 なお、訓練の終了条件は、他の条件であってよい。例えば、終了条件は、訓練に使用されていない予め決められた第2数の訓練画像データを使用して算出される再構成損失が、所定の再構成閾値以下であることであってよい。
 訓練が終了していないと判断される場合(S440:No)、プロセッサ210は、S420へ移行し、新たなサブセットの処理を実行する。訓練が終了したと判断される場合(S440:Yes)、S445で、プロセッサ210は、訓練済の第2生成モデル600を、記憶装置215(ここでは、不揮発性記憶装置230)に格納する。そして、プロセッサ210は、図6の処理を終了する。以上のように、第2生成モデル600は、不具合の無い種々のラベルシートの画像データから、不具合の無い同じラベルシートの画像データを生成するように訓練される。従って、訓練済の第2生成モデル600は、入力される画像データI61d(図3(A))が不具合を有するラベルシートLBjを表す場合であっても、不具合の無いラベルシートLBjxを表す画像データI62dを生成する。
A6.検査処理:
 図7は、検査処理の例を示すフローチャートである。検査処理は、画像処理装置200(図1)によって実行される。プロセッサ210は、第3プログラム233に従って、検査処理を実行する。
 S510では、プロセッサ210は、検査対象のラベルシートである注目ラベルシートをデジタルカメラ100に撮影させ、注目撮影画像データをデジタルカメラ100から取得する。図8は、検査処理の概略図である。図中の画像データIxdは、注目撮影画像Ixの注目撮影画像データIxdである。注目撮影画像Ixは、注目ラベルシートLBxを含むプリンタDVの一部分を表している。図8の例では、注目ラベルシートLBxは、文字列の不具合を有している(詳細は、後述)。
 S515では、プロセッサ210は、注目撮影画像から注目ラベルシートの領域を抽出するクロッピング処理を行う。本実施例では、プロセッサ210は、物体検出モデルと呼ばれる機械学習モデル(例えば、YOLOv4 (You only look once)、SSD (Single Shot MultiBox Detector)、R-CNN (Region Based Convolutional Neural Networks) など)を使用して、注目ラベルシートLBxの領域を検出する。プロセッサ210は、注目撮影画像データIxdのうちの検出された領域を示す部分を使用して、注目ラベルシートLBxを表す注目入力画像データIx0dを生成する。プロセッサ210は、注目入力画像データIx0dによって表される注目入力画像Ix0の高さと幅とを、第1モデル500によって受け入れられる画像の高さと幅とに調整する。なお、注目ラベルシートLBxの領域の検出方法は、他の任意の方法であってよい。例えば、プロセッサ210は、予め決められた基準パターンを使用するパターンマッチングによって、注目ラベルシートLBxの領域を検出してもよい。
 S520では、プロセッサ210は、注目入力画像データを第1生成モデル510に入力することによって、第1注目生成画像データIx1dを生成する。プロセッサ210は、第1生成モデル510の演算パラメータを使用して、第1生成モデル510の各層の演算を行うことによって、第1注目生成画像データIx1dを生成する。第1注目生成画像データIx1dの第1注目生成画像Ix1は、コンピュータグラフィックス画像のような注目ラベルシートLBxの画像である。
 S530では、プロセッサ210は、第1注目生成画像データIx1dを第2生成モデル600に入力することによって、第2注目生成画像データIx2dを生成する。プロセッサ210は、第2生成モデル600の演算パラメータを使用して、第2生成モデル600の各層の演算を行うことによって、第2注目生成画像データIx2dを生成する。第2注目生成画像データIx2dの第2注目生成画像Ix2は、不具合の無いラベルシートLBxmを表している(正解ラベルシートLBxmとも呼ぶ)。図8の例では、正解ラベルシートLBxmは、3個の文字列T1、T2、T3を表している。一方、注目入力画像Ix0によって示されるように、注目ラベルシートLBxは、2個の文字列T1、T2xを表している。第2文字列T2xの最も右側の文字T2eは、正解ラベルシートLBxmの第2文字列T2の正しい「2」に代えて、誤った「9」である。注目ラベルシートLBx上では、第3文字列T3は、空白領域Axに置換されている。
 S535では、プロセッサ210は、第1注目生成画像Ix1と第2注目生成画像Ix2との間の差分を示す中間差分画像Ix3の中間差分画像データIx3dを生成する。中間差分画像Ix3の各画素は、第1注目生成画像Ix1の対応する画素の第1色値と、第2注目生成画像Ix2の対応する画素の第2色値と、の間の差を示している。本実施例では、第1色値と第2色値とは、RGB値である。プロセッサ210は、第1色値と第2色値との間のL1距離を、中間差分画像Ix3の画素の画素値として算出する。なお、中間差分画像Ix3の画素の画素値は、L1距離に代えて、第1注目生成画像Ix1と第2注目生成画像Ix2との間の差を示す任意の値であってよい(例えば、L2距離、RGB値から算出される輝度値の差分、など)。
 中間差分画像Ix3は、種々のノイズを含み得る。例えば、文字などのオブジェクトと背景との境界を示す画素の色値は、第1注目生成画像Ix1と第2注目生成画像Ix2との間で、異なり得る。中間差分画像Ix3は、このような色値のズレを、表し得る。そこで、本実施例では、プロセッサ210は、中間差分画像データIx3dの二値化処理を実行することによって、最終的な差分画像Ix4の差分画像データIx4dを生成する。二値化処理の閾値は、不具合を示す画素の値を1に設定し、不具合の無い画素とノイズを示す画素とのぞれぞれの値をゼロに設定するように、予め実験的に決定される。図8の例では、差分画像Ix4は、注目入力画像Ix0から欠けている第3文字列T3と、第2文字列T2xの最も右側の文字の差分画像T2wと、を表している。
 S540では、プロセッサ210は、差分画像データIx4dの次元削減処理を実行することによって、異常度DAを算出する。異常度DAは、注目入力画像データIx0dによって表される注目ラベルシートLBxの不具合の度合いを示している。次元削減処理は、差分画像データIx4dの特徴を示す異常度DAを算出する種々の処理であってよい。本実施例では、プロセッサ210は、t-SNE(t-distributed Stochastic Neighbor Embedding)を使用して、差分画像データIx4dから、第1値V1と第2値V2とで構成される2次元データを生成する。図8には、2次元データを示すグラフの概略が示されている。横軸は第1値V1を示し、縦軸は第2値V2を示している。注目点Piは、差分画像データIx4dから算出された2次元データを示している。基準点Psは、不具合の無いラベルシートの複数の撮影画像からS515-S540の処理と同じ処理によって得られる複数の2次元データPrの代表点である。本実施例では、基準点Psは、複数の2次元データPrの重心点であり、予め決められている。距離DAdは、基準点Psと注目点Piとの間の距離である(本実施例では、二乗和誤差)。なお、距離DAdは、2個の点Ps、Piの間の距離を示す種々の値であってよい(例えば、L2距離、L1距離など)。
 プロセッサ210は、予め決められた評価関数に距離DAdを入力することによって、異常度DAを算出する。評価関数は、距離DAdが大きいほど大きい異常度DAを算出する種々の関数であってよい。ここで、距離DAdの全範囲が、短範囲と中範囲と長範囲との3つの範囲に区分される場合に、短範囲では、異常度DAがゼロに近く、長範囲では、異常度DAが最大値(例えば、100)に近く、中範囲では、距離DAdの変化に応じて異常度DAが大きく変化することが好ましい。このような評価関数としては、例えば、シグモイド関数、または、tanh関数を採用可能である。
 このように、本実施例では、プロセッサ210は、t-SNEと評価関数とを使用する次元削減処理を実行して、差分画像データIx4dから異常度DAを算出する。本実施例では、異常度DAは、ゼロ以上、100以下の値である。
 S545では、プロセッサ210(図1)は、差分画像Ix4と異常度DAとを、表示部240に表示する。図9(A)は、表示部240に表示される画像の例を示す概略図である。表示部240は、差分画像Ix4と、異常度DAを示す文字列DAtと、を表している。図9(A)では、異常度DAは、80であり、異常度DAの単位として「%」が示されている。作業者は、表示部240を観察することによって、注目ラベルシートLBxのうちの不具合を有する部分と、異常の度合いとを、容易に認識できる。
 図7の実施例では、プロセッサ210は、S530-S545の処理と並行して、S550、S555、S560の処理を実行する。図10は、検査処理の概略図である。図10には、S550、S555の概略が示されている。S550(図7)では、プロセッサ210は、第1注目生成画像データIx1dの文字認識処理を実行し、注目ラベルシートLBxによって表される文字列のリストを示す注目文字列テーブルTxを取得する。文字認識処理は、公知の種々の処理であってよい。例えば、Google社の「Tesseract OCR」と呼ばれる光学文字認識エンジンが、使用されてよい。なお、本実施例では、プロセッサ210は、ノイズを含む注目入力画像データIx0dではなく、第1注目生成画像データIx1dを、文字認識に使用する。従って、プロセッサ210は、適切な文字認識結果を、取得できる。
 図10には、注目文字列テーブルTxの例が示されている。図示するように、注目文字列テーブルTxは、第1文字列T1と、第2文字列T2xと、を示している。第2文字列T2xの最も右側の文字T2eは、誤った「9」である。第3文字列T3は、認識されない。
 S555では、プロセッサ210は、注目文字列テーブルTxと、原本文字列テーブルToと、を比較することにより、不具合を有する文字列のリストを示す不具合文字列テーブルTdを生成する。原本文字列テーブルToは、不具合の無いラベルシートによって表される文字列のリストを示しており、予め準備されている。プロセッサ210は、注目文字列テーブルTxと原本文字列テーブルToとを比較し、文字列単位で、不具合を検出する。図10の例では、不具合文字列テーブルTdは、第2文字列T2xと、第3文字列T3と、を示している。第2文字列T2xの最も右側の文字T2eは、誤った「9」である。
 このように、不具合文字列テーブルTdは、注目文字列テーブルTxに含まれる文字列であって、原本文字列テーブルToに含まれる対応する文字列と少なくとも一部が異なる文字列(例えば、第2文字列T2x)を、含んでいる。また、不具合文字列テーブルTdは、原本文字列テーブルToに含まれ、かつ、注目文字列テーブルTxに含まれない文字列(例えば、第3文字列T3)を、含んでいる。図示を省略するが、注目文字列テーブルTxが、原本文字列テーブルToに含まれない文字列を含む場合、不具合文字列テーブルTdは、その文字列を含んでいる。
 S560では、プロセッサ210(図1)は、不具合文字列テーブルTdによって示される文字列を、表示部240に表示する。図9(B)は、表示部240に表示される画像の例を示す概略図である。表示部240は、不具合文字列テーブルTdに含まれる文字列T2x、T3を表している。作業者は、表示部240を観察することによって、注目ラベルシートLBxに含まれる不具合を、容易に認識できる。
 S530-S545の処理とS550-S560の処理とが終了した場合、プロセッサ210は、図7の検査処理を終了する。なお、プロセッサ210は、S530-S545の処理と、S550-S560の処理とを、並行ではなく、順番に実行してよい。
 以上のように、本実施例では、画像処理装置200のプロセッサ210は、以下の画像処理を実行する。図7のS520では、プロセッサ210は、光学的に読み取られた注目ラベルシートLBx(図8)を表す注目入力画像データIx0dを第1生成モデル510に入力することによって、注目入力画像データIx0dに対応する第1注目生成画像データIx1dを生成する。図2、図4、図5で説明したように、第1生成モデル510は、光学的に読み取られたラベルシートの画像I5i(図2)を表す画像データI5idを第1生成モデル510に入力することによって生成される画像データI51dの画像I51がラベルシートのコンピュータグラフィックス画像Ioに近づくように訓練された生成モデルである。
 また、図7のS530では、プロセッサ210は、第1注目生成画像データIx1d(図8)を第2生成モデル600に入力することによって、不具合の無い注目対象物の画像Ix2を表す第2注目生成画像データIx2dを生成する。図6で説明したように、第2生成モデル600は、ラベルシートの画像を表す画像データI61d(図3(A))を第2生成モデル600に入力することによって不具合の無いラベルシートの画像I62を表す画像データI62dを生成するように訓練された生成モデルである。
 また、図7のS535では、プロセッサ210は、第1注目生成画像データIx1d(図8)の画像Ix1と第2注目生成画像データIx2dの画像Ix2との間の差分を示す差分画像Ix4の差分画像データIx4dを生成する。
 図2、図5、図6で説明したように、第1生成モデル510は、第1生成モデル510と第1識別モデル520とを有する第1モデル500の訓練によって生成される。ここで、第1生成モデル510は、生成ネットワークの例であり、第1識別モデル520は、識別ネットワークの例であり、第1モデル500は、生成ネットワークと識別ネットワークとを有する敵対的生成ネットワークの例である。
 図4のS250、S260、図2で説明したように、第1識別モデル520は、第1部分画像データPA1dと第2部分画像データPA2dとを第1識別モデル520に入力することによって、訓練されている。S235-S245、図2で説明したように、第1部分画像データPA1dは、訓練用の入力画像データI5idを第1生成モデル510に入力することによって生成された画像データI51dの画像である第1画像I51の一部分である第1部分画像PA1を表している。S250-S260、図2で説明したように、第2部分画像データPA2dは、訓練用のコンピュータグラフィックス画像Ioである第2画像Ioの一部分である第2部分画像PA2を表している。
 以上により、識別ネットワークの例である第1識別モデル520へ入力される画像データPA1d、PA2d(図2)の多様性が増加し、第1識別モデル520の訓練の速度が抑制されるので、生成ネットワークの例である第1生成モデル510の訓練と第1識別モデル520の訓練とのバランスをとることができる。従って、図8に示すように、第1生成モデル510は、光学的に読み取られたラベルシートLBxの画像Ix0を表す画像データIx0dを第1生成モデル510に入力することによって生成される画像データIx1dの画像Ix1がラベルシートのコンピュータグラフィックス画像に近づくように適切に訓練される。このような第1生成モデル510によって生成される第1注目生成画像データIx1dが第2生成モデル600に入力されるので、第2生成モデル600は、不具合の無い注目ラベルシートの画像を表す第2注目生成画像データIx2dを適切に生成できる。従って、第1注目生成画像データIx1dの画像Ix1と第2注目生成画像データIx2dの画像Ix2との間の差分を示す差分画像Ix4の差分画像データIx4dは、注目ラベルシートLBxの読取りの条件に拘わらずに、注目入力画像データIx0dによって表される注目ラベルシートLBxの不具合を、適切に表すことができる。
 さらに、本実施例では、S540(図7)で、プロセッサ210は、差分画像データIx4dの次元削減処理を実行することによって、注目入力画像データIx0dによって表される注目ラベルシートLBxの異常度DAを算出する。上述したように、差分画像データIx4dは、注目ラベルシートLBxの不具合を適切に表すので、プロセッサ210は、差分画像データIx4dを使用して、適切な異常度DAを算出できる。
 また、図4のS240、S255、図2で説明したように、第1画像I51上の第1部分領域A1の第1位置P1は、ランダムに決定されており、第2画像Io上の第2部分領域A2の第2位置P2は、ランダムに決定されている。第1モデル500の訓練では(図4、図5)、プロセッサ210は、種々の位置P1、P2の部分領域A1、A2の部分画像PA1、PA2の部分画像データPA1d、PA2dを、第1識別モデル520に入力する。これにより、第1識別モデル520へ入力される画像データの多様性が増加するので、第1生成モデル510と第1識別モデル520との適切な訓練が、可能である。
 また、上述したように、図4、図5は、生成ネットワークと識別ネットワークとを有する敵対的生成ネットワークの訓練処理の例を示している。この訓練処理は、以下の処理を備えている。S235では、プロセッサ210は、訓練用の入力画像データI5idを生成ネットワークの例である第1生成モデル510に入力することによって、第1画像I51の第1画像データI51dを生成する。S240では、プロセッサ210は、第1画像I51中の第1部分領域A1をランダムに決定する(本実施例では、第1部分領域A1の第1位置P1が、ランダムに決定される)。S245では、プロセッサ210は、第1画像I51中の第1部分領域A1の画像の少なくとも一部を示す第1部分画像PA1を表す第1部分画像データPA1dを、第1画像データI51dと第1部分領域A1とを使用して取得する。S250では、プロセッサ210は、第1部分画像データPA1dを識別ネットワークの例である第1識別モデル520に入力することによって、第1識別データ529fを取得する。S255では、プロセッサ210は、入力画像データI5idに対応付けられた第2画像データIodの第2画像Io中の第2部分領域A2をランダムに決定する(本実施例では、第2部分領域A2の第2位置P2が、ランダムに決定される)。S260では、プロセッサ210は、第2画像Io中の第2部分領域A2の画像の少なくとも一部を示す第2部分画像PA2を表す第2部分画像データPA2dを、第2画像データIodと第2部分領域A2とを使用して取得する。S265では、プロセッサ210は、第2部分画像データPA2dを第1識別モデル520に入力することによって、第2識別データ529rを取得する。S270、S275では、プロセッサ210は、第1識別データ529fと第2識別データ529rとを使用することによって、第1識別モデル520のパラメータを調整する。以上により、敵対的生成ネットワークの訓練のために識別ネットワークに入力される画像の多様性が向上するので、識別ネットワーク、ひいては、識別ネットワークと生成ネットワークを有する敵対的生成ネットワークを、適切に訓練できる。なお、敵対的生成ネットワークの用途は、ラベルシートなどの対象物の不具合に関する検査に限らず、任意の用途であってよい。
B.変形例:
(1)第1モデル500の訓練(図4、図5)には、互いに異なる画像を表す複数の入力画像データが使用されることが好ましい。複数の入力画像データは、ラベルシートの互いに異なる不具合を示す複数の入力画像データを含むことが好ましい。また、複数の入力画像データは、互いに異なる読取条件に対応する複数の入力画像データを含むことが好ましい。
 また、入力画像データに対応付けられるコンピュータグラフィックス画像のデータは、入力画像データによって表されるラベルシートと同じラベルシートを表してよい。すなわち、入力画像データが不具合を有するラベルシートを表す場合、その入力画像データに対応付けられるコンピュータグラフィックス画像のデータは、同じ不具合を有するラベルシートを表してよい。このような注目入力画像データとコンピュータグラフィックス画像のデータとのペアを訓練に用いることによって、訓練済の第1生成モデル510は、不具合を有するラベルシートを表す画像データが入力される場合に、同じ不具合を有するラベルシートのコンピュータグラフィックス画像を表すデータを、適切に生成できる。
(2)第1モデル500の訓練(図4、図5)では、プロセッサ210は、互いに異なる複数の第1位置P1(図2)の複数の第1部分領域A1の複数の画像を示す複数の第1部分画像PA1の複数のデータPA1dを、第1識別モデル520に入力することが好ましい。ここで、プロセッサ210は、複数の第1生成画像データを使用して複数の第1部分画像PA1のデータを取得することが好ましい。これに代えて、プロセッサ210は、1個の第1生成画像データを使用して複数の第1部分画像PA1のデータを取得してもよい。ここで、S240(図4)では、プロセッサ210は、1個の第1生成画像から取得される第1部分画像PA1の数(すなわち、第1生成画像上の第1部分領域A1の数)を、ランダムに決定してよい。互いに異なる複数の第1位置P1は、ランダムに決定される代わりに、予め決められていてもよい。また、S240では、プロセッサ210は、第1生成画像上の第1部分領域A1の大きさ(単位は、例えば、予め決められた方向(例えば、幅方向)の画素数)を、ランダムに決定してよい。また、プロセッサ210は、予め決められた複数の形状(例えば、四角形、長方形、菱形、円、楕円など)から、第1生成画像上の第1部分領域A1の形状をランダムに決定してよい。一般的には、プロセッサ210は、S240で、第1生成画像上の第1部分領域A1の位置と形状と大きさと数とを含む複数のパラメータのうちの1以上のパラメータを、ランダムに決定してよい。これにより、第1識別モデル520に入力される画像データの多様性は、更に向上する。なお、残りのパラメータは、予め決められてよい。ここで、プロセッサ210は、S240で、複数のパラメータのうちのランダムに決定すべきパラメータを、ランダムに決定してよい。
 また、S245の第1取得処理は、第1生成画像中の第1部分領域A1の画像の少なくとも一部を示す第1部分画像PA1の第1部分画像データPA1dを取得する種々の処理であってよい。第1取得処理は、例えば、画像の回転と画像のスケーリング(拡大、または、縮小)の一方または両方を含んでよい。画像のスケーリングは、画像の画素密度を変更する。第1取得処理は、回転とスケーリングとに限らず、他の種々の画像処理を含んでよい。第1取得処理は、第1取得処理によって生成された第1部分画像PA1が第1部分領域A1の画像の少なくとも一部と同じ画像を示すように構成されていることが好ましい。第1取得処理では、プロセッサ210は、第1取得処理の画像処理で使用される1以上のパラメータ(例えば、回転角度とスケーリング比率とを含む複数のパラメータ)のうちの予め選択された1以上のパラメータ(例えば、回転角度とスケーリング比率との一方または両方)を、ランダムに決定してよい。スケーリング比率は、スケーリングの前の画像の大きさ(単位は、例えば、予め決められた方向(例えば、幅方向)の画素数)に対するスケーリングの後の画像の大きさの比率である。第1取得処理では、プロセッサ210は、回転とスケーリングとを含む複数の画像処理から、実行すべき画像処理を、ランダムに選択してよい。第1取得処理では、プロセッサ210は、第1取得処理の画像処理で使用される1以上のパラメータのうちのランダムに決定すべきパラメータを、ランダムに選択してよい。ランダムに決定されたパラメータを第1取得処理の画像処理で使用することによって、第1識別モデル520に入力される画像データの多様性は、更に向上する。なお、残りのパラメータは、予め決められてよい。
 いずれの場合も、第1取得処理は、第1部分画像PA1を、第1識別モデル520によって受け入れられる画像である識別入力画像に調整する処理を含んでよい。プロセッサ210は、例えば、画素密度の調整、または、畳込処理によって、第1部分画像PA1の大きさ(より一般的には、画素密度)を調整してよい。また、調整前の第1部分画像PA1の形状が識別入力画像の形状と異なる場合、プロセッサ210は、調整前の第1部分画像PA1から、識別入力画像の形状と同じ形状を有する部分を抽出することによって、調整済の第1部分画像PA1を生成してよい。このように、第1部分画像PA1は、第1生成画像中の第1部分領域A1の画像の全体または一部を示してよい。スケーリングを含む第1取得処理が実行される場合、調整済の第1部分画像PA1の中の、第1部分領域A1の画像の大きさが、スケーリング比率が大きいほど大きくなるように、第1部分画像PA1が調整されてよい。
 同様に、プロセッサ210は、互いに異なる複数の第2位置P2(図2)の複数の第2部分領域A2の複数の画像を示す複数の第2部分画像PA2の複数のデータPA2dを、第1識別モデル520に入力することが好ましい。ここで、プロセッサ210は、1個のコンピュータグラフィックス画像データ(例えば、画像データIod)を使用して複数の第2部分画像PA2のデータを取得してよい。ここで、S255(図4)では、プロセッサ210は、1個のコンピュータグラフィックス画像から取得される第2部分画像PA2の数(すなわち、コンピュータグラフィックス画像上の第2部分領域A2の数)を、ランダムに決定してよい。これに代えて、プロセッサ210は、複数のコンピュータグラフィックス画像データを使用して複数の第2部分画像PA2のデータを取得してもよい。互いに異なる複数の第2位置P2は、ランダムに決定される代わりに、予め決められていてもよい。また、S255では、プロセッサ210は、コンピュータグラフィックス画像上の第2部分領域A2の大きさ(単位は、例えば、予め決められた方向(例えば、幅方向)の画素数)を、ランダムに決定してよい。また、プロセッサ210は、予め決められた複数の形状(例えば、四角形、長方形、菱形、円、楕円など)から、コンピュータグラフィックス画像上の第2部分領域A2の形状をランダムに決定してよい。一般的には、プロセッサ210は、S255で、コンピュータグラフィックス画像上の第2部分領域A2の位置と形状と大きさと数とを含む複数のパラメータのうちの1以上のパラメータを、ランダムに決定してよい。これにより、第1識別モデル520に入力される画像データの多様性は、更に向上する。なお、残りのパラメータは、予め決められてよい。ここで、プロセッサ210は、S255で、複数のパラメータのうちのランダムに決定すべきパラメータを、ランダムに決定してよい。
 また、S260の第2取得処理は、コンピュータグラフィックス画像中の第2部分領域A2の画像の少なくとも一部を示す第2部分画像PA2の第2部分画像データPA2dを取得する種々の処理であってよい。第2取得処理は、第2取得処理によって生成された第2部分画像PA2が第2部分領域A2の画像の少なくとも一部と同じ画像を示すように構成されていることが好ましい。第2取得処理は、第1取得処理と同じであってよく、例えば、画像の回転と画像のスケーリングの一方または両方を含んでよい。第2取得処理では、プロセッサ210は、第2取得処理の画像処理で使用される1以上のパラメータ(例えば、回転角度とスケーリング比率とを含む複数のパラメータ)のうちの予め選択された1以上のパラメータ(例えば、回転角度とスケーリング比率との一方または両方)を、ランダムに決定してよい。第2取得処理では、プロセッサ210は、回転とスケーリングとを含む複数の画像処理から、実行すべき画像処理を、ランダムに選択してよい。第2取得処理では、プロセッサ210は、第2取得処理の画像処理で使用される1以上のパラメータのうちのランダムに決定すべきパラメータを、ランダムに選択してよい。ランダムに決定されたパラメータを第2取得処理の画像処理で使用することによって、第1識別モデル520に入力される画像データの多様性は、更に向上する。なお、残りのパラメータは、予め決められてよい。
 いずれの場合も、第2取得処理は、第2部分画像PA2を、第1識別モデル520によって受け入れられる識別入力画像に調整する処理を含んでよい。プロセッサ210は、例えば、画素密度の調整、または、畳込処理によって、第2部分画像PA2の大きさ(より一般的には、画素密度)を調整してよい。また、調整前の第2部分画像PA2の形状が識別入力画像の形状と異なる場合、プロセッサ210は、調整前の第2部分画像PA2から、識別入力画像の形状と同じ形状を有する部分を抽出することによって、調整済の第2部分画像PA2を生成してよい。このように、第2部分画像PA2は、コンピュータグラフィックス画像中の第2部分領域A2の画像の全体または一部を示してよい。スケーリングを含む第2取得処理が実行される場合、調整済の第2部分画像PA2の中の、第2部分領域A2の画像の大きさが、スケーリング比率が大きいほど大きくなるように、第2部分画像PA2が調整されてよい。
(3)第1モデル500は、図2等で説明したネットワークに代えて、生成ネットワークと識別ネットワークとを有する種々の敵対的生成ネットワークであってよい。例えば、第1生成モデル510に入力される画像の高さと幅とは、予め決められた任意の高さと幅とであってよい。第1生成モデル510の第1エンコーダ512の畳込層の総数は、1以上の任意の数であってよい。各畳込層のフィルタのサイズは、種々のサイズであってよい。第1エンコーダ512は、全結合層を含んでよい。第1エンコーダ512からは、畳込層が、省略されてよい。同様に、第1生成モデル510の第1デコーダ517の転置畳込層の総数は、1以上の任意の数であってよい。各転置畳込層のフィルタのサイズは、種々のサイズであってよい。第1デコーダ517は、全結合層を含んでよい。第1デコーダ517からは、転置畳込層が、省略されてよい。
 第1識別モデル520の畳込層群522の畳込層の総数は、1以上の任意の数であってよい。各畳込層のフィルタのサイズは、種々のサイズであってよい。全結合層群527の全結合層の総数は、1以上の任意の数であってよい。各全結合層のノード数は、種々の値であってよい。畳込層群522とグローバル平均プーリング層525と全結合層群527との3個のモジュールのうち1個または2個のモジュールが、省略されてよい。
 バッチノーマライゼーションは、第1モデル500の種々の層に適用されてよい。ドロップアウトは、第1モデル500の種々の層に適用されてよい。
(4)第2生成モデル600は、図3(A)、図3(B)等で説明したネットワークに限らず、入力された画像から不具合のない画像を生成する任意のネットワークであってよい。例えば、第2生成モデル600の構成は、第1生成モデル510の構成と異なってよい。また、第2生成モデル600は、生成ネットワークと識別ネットワークとを有する敵対的生成ネットワークの訓練によって生成された生成ネットワークであってよい。バッチノーマライゼーションは、第2生成モデル600の種々の層に適用されてよい。ドロップアウトは、第2生成モデル600の種々の層に適用されてよい。
(5)差分画像データIx4dから異常度DAを算出する処理(図7:S540)は、不具合の度合いを示す異常度DAを算出する種々の処理であってよい。例えば、プロセッサ210は、t-SNEを使用して差分画像データIx4dから3次元データを生成し、3次元空間における基準点と注目点との間の距離を使用して異常度DAを算出してよい。また、プロセッサ210は、t-SNEを使用して、差分画像データIx4dから1個の値を直接的に算出してよい。そして、プロセッサ210は、算出された1個の値を評価関数に入力することによって、異常度DAを算出してよい。また、プロセッサ210は、t-SNEに代えて、種々の次元削減処理(例えば、主成分解析)を使用してよい。
(6)検査処理は、図7に示す処理に代えて、ラベルシートの不具合に関する情報(例えば、差分画像Ix4、異常度DA、不具合文字列テーブルTdなど)を生成する任意の処理であってよい。例えば、S540は、省略されてよい。この場合、S545では、プロセッサ210は、差分画像Ix4を表示部240に表示してよい。また、差分画像データを生成する処理(S535)において、中間差分画像データIx3dの二値化処理(図8)が省略され、中間差分画像データIx3dが、差分画像データとして使用されてよい。また、S550-S560の処理は、省略されてよい。これに代えて、S530-S545の処理が省略されてよい。
 また、S545、S560において、ユーザに情報を提示する方法は、情報の表示に代えて、ユーザに情報を伝達可能な任意の方法であってよい。例えば、プロセッサ210は、情報を説明する音声を出力してよい。
(7)ラベルシートの形状は、任意の形状であってよく、例えば、三角形、四角形、5以上の角を有する多角形、円、または、楕円であってよい。いずれの場合も、画像データは、矩形状の画像を表してよい。図4のS240、S255では、プロセッサ210は、抽出される部分画像の全体がラベルシートに含まれるように、部分画像の領域を決定することが好ましい。
(8)画像処理の対象である対象物は、プリンタなどの製品に貼られるラベルシートに限らず、製品に直接的に印刷されるラベルであってよい。対象物は、ラベルに限らず、製品に取り付けられる札でもよい。対象物は、製品を収容する容器、または、製品を包む包装紙であってよい。対象物に関連する製品は、プリンタに限らず、ミシン、カッティングマシンなどの任意の製品であってよい。一般的に、対象物は、文字を表す任意の対象物であってよい。対象物によって表される文字の数は、1以上の任意の整数であってよい。
(9)対象物を光学的に読み取る読取装置は、デジタルカメラ100に限らず、CCDやCMOSなどの光電変換素子を用いて光学的に対象物を読み取るように構成された任意の読取装置であってよい(例えば、スキャナ)。
(10)第1訓練処理(例えば、図4、図5)、第2訓練処理(例えば、図6)、検査処理(例えば、図7)は、互いに異なる画像処理装置によって実行されてよい。いずれの画像処理装置も、パーソナルコンピュータとは異なる種類の装置(例えば、デジタルカメラ、スキャナ、スマートフォン)であってもよい。また、ネットワークを介して互いに通信可能な複数の装置(例えば、コンピュータ)が、画像処理装置による画像処理の機能を一部ずつ分担して、全体として、画像処理の機能を提供してもよい(これらの装置を備えるシステムが画像処理装置に対応する)。
 上記各実施例において、ハードウェアによって実現されていた構成の一部をソフトウェアに置き換えるようにしてもよく、逆に、ソフトウェアによって実現されていた構成の一部あるいは全部をハードウェアに置き換えるようにしてもよい。例えば、図1の第1生成モデル510は、専用のハードウェア回路によって実現されてよい。
 また、本発明の機能の一部または全部がコンピュータプログラムで実現される場合には、そのプログラムは、コンピュータ読み取り可能な記録媒体(例えば、一時的ではない記録媒体)に格納された形で提供することができる。プログラムは、提供時と同一または異なる記録媒体(コンピュータ読み取り可能な記録媒体)に格納された状態で、使用され得る。「コンピュータ読み取り可能な記録媒体」は、メモリーカードやCD-ROMのような携帯型の記録媒体に限らず、各種ROM等のコンピュータ内の内部記憶装置や、ハードディスクドライブ等のコンピュータに接続されている外部記憶装置も含み得る。
 以上、実施例、変形例に基づき本発明について説明してきたが、上記した発明の実施の形態は、本発明の理解を容易にするためのものであり、本発明を限定するものではない。本発明は、その趣旨を逸脱することなく、変更、改良され得ると共に、本発明にはその等価物が含まれる。
100…デジタルカメラ、200…画像処理装置、210…プロセッサ、215…記憶装置、220…揮発性記憶装置、230…不揮発性記憶装置、231…第1プログラム、232…第2プログラム、233…第3プログラム、240…表示部、250…操作部、270…通信インタフェース、500…第1モデル、510…第1生成モデル、512…第1エンコーダ、515…第1特徴データ、517…第1デコーダ、519…コネクション、520…第1識別モデル、522…畳込層群、525…グローバル平均プーリング層、527…全結合層群、529…識別データ、529f…第1識別データ、529r…第2識別データ、590…第1種訓練データ、600…第2生成モデル、602…第2エンコーダ、607…第2デコーダ、609…コネクション、690…第2種訓練データ

Claims (11)

  1.  画像データを処理する画像処理方法であって、
     光学的に読み取られた注目対象物を表す注目入力画像データを第1生成モデルに入力することによって、前記注目入力画像データに対応する第1注目生成画像データを生成する第1生成工程であって、前記第1生成モデルは、光学的に読み取られた対象物の画像を表す画像データを前記第1生成モデルに入力することによって生成される画像データの画像が前記対象物のコンピュータグラフィックス画像に近づくように訓練された生成モデルである、前記第1生成工程と、
     前記第1注目生成画像データを第2生成モデルに入力することによって、不具合の無い注目対象物の画像を表す第2注目生成画像データを生成する第2生成工程であって、前記第2生成モデルは、対象物の画像を表す画像データを前記第2生成モデルに入力することによって不具合の無い対象物の画像を表す画像データを生成するように訓練された生成モデルである、前記第2生成工程と、
     前記第1注目生成画像データの画像と前記第2注目生成画像データの画像との間の差分を示す差分画像の差分画像データを生成する第3生成工程と、
     を備え、
     前記第1生成モデルは、生成ネットワークと識別ネットワークとを有する敵対的生成ネットワークの訓練によって生成された前記生成ネットワークであり、
     前記識別ネットワークは、訓練用の入力画像データを前記生成ネットワークに入力することによって生成された画像データの画像である第1画像中の第1部分領域の画像の少なくとも一部を示す第1部分画像を表す第1部分画像データと、訓練用のコンピュータグラフィックス画像である第2画像中の第2部分領域の画像の少なくとも一部を示す第2部分画像を表す第2部分画像データと、を前記識別ネットワークに入力することによって、訓練されている、
     画像処理方法。
  2.  請求項1に記載の画像処理方法であって、さらに、
     前記差分画像データの次元削減処理を実行することによって、前記注目入力画像データによって表される前記注目対象物の異常度を算出する算出工程を備える、
     画像処理方法。
  3.  請求項1または2に記載の画像処理方法であって、
     前記第1画像上の前記第1部分領域の位置は、ランダムに決定されており、
     前記第2画像上の前記第2部分領域の位置は、ランダムに決定されている、
     画像処理方法。
  4.  請求項1から3のいずれかに記載の画像処理方法であって、
     前記第1画像上の前記第1部分領域の形状は、ランダムに決定されており、
     前記第2画像上の前記第2部分領域の形状は、ランダムに決定されている、
     画像処理方法。
  5.  請求項1から4のいずれかに記載の画像処理方法であって、
     前記第1画像上の前記第1部分領域の大きさは、ランダムに決定されており、
     前記第2画像上の前記第2部分領域の大きさは、ランダムに決定されている、
     画像処理方法。
  6.  請求項1から5のいずれかに記載の画像処理方法であって、
     前記第1画像から取得される前記第1部分画像の数は、ランダムに決定されており、
     前記第2画像から取得される前記第2部分画像の数は、ランダムに決定されている、
     画像処理方法。
  7.  請求項1から6のいずれかに記載の画像処理方法であって、
     前記第1部分画像データは、ランダムに決定された角度による画像の回転を含む処理を実行することによって、取得されており、
     前記第2部分画像データは、ランダムに決定された角度による画像の回転を含む処理を実行することによって、取得されている、
     画像処理方法。
  8.  請求項1から7のいずれかに記載の画像処理方法であって、
     前記第1部分画像データは、ランダムに決定されたスケーリング比率による画像のスケーリングを含む処理を実行することによって、取得されており、
     前記第2部分画像データは、ランダムに決定されたスケーリング比率による画像のスケーリングを含む処理を実行することによって、取得されている、
     画像処理方法。
  9.  画像データを処理するコンピュータのためのコンピュータプログラムであって、
     光学的に読み取られた注目対象物を表す注目入力画像データを第1生成モデルに入力することによって、前記注目入力画像データに対応する第1注目生成画像データを生成する第1生成機能であって、前記第1生成モデルは、光学的に読み取られた対象物の画像を表す画像データを前記第1生成モデルに入力することによって生成される画像データの画像が前記対象物のコンピュータグラフィックス画像に近づくように訓練された生成モデルである、前記第1生成機能と、
     前記第1注目生成画像データを第2生成モデルに入力することによって、不具合の無い注目対象物の画像を表す第2注目生成画像データを生成する第2生成機能であって、前記第2生成モデルは、対象物の画像を表す画像データを前記第2生成モデルに入力することによって不具合の無い対象物の画像を表す画像データを生成するように訓練された生成モデルである、前記第2生成機能と、
     前記第1注目生成画像データの画像と前記第2注目生成画像データの画像との間の差分を示す差分画像の差分画像データを生成する第3生成機能と、
     をコンピュータに実現させ、
     前記第1生成モデルは、生成ネットワークと識別ネットワークとを有する敵対的生成ネットワークの訓練によって生成された前記生成ネットワークであり、
     前記識別ネットワークは、訓練用の入力画像データを前記生成ネットワークに入力することによって生成された画像データの画像である第1画像中の第1部分領域の画像の少なくとも一部を示す第1部分画像を表す第1部分画像データと、訓練用のコンピュータグラフィックス画像である第2画像中の第2部分領域の画像の少なくとも一部を示す第2部分画像を表す第2部分画像データと、を前記識別ネットワークに入力することによって、訓練されている、
     コンピュータプログラム。
  10.  画像データを処理する画像処理装置であって、
     光学的に読み取られた注目対象物を表す注目入力画像データを第1生成モデルに入力することによって、前記注目入力画像データに対応する第1注目生成画像データを生成する第1生成部であって、前記第1生成モデルは、光学的に読み取られた対象物の画像を表す画像データを前記第1生成モデルに入力することによって生成される画像データの画像が前記対象物のコンピュータグラフィックス画像に近づくように訓練された生成モデルである、前記第1生成部と、
     前記第1注目生成画像データを第2生成モデルに入力することによって、不具合の無い注目対象物の画像を表す第2注目生成画像データを生成する第2生成部であって、前記第2生成モデルは、対象物の画像を表す画像データを前記第2生成モデルに入力することによって不具合の無い対象物の画像を表す画像データを生成するように訓練された生成モデルである、前記第2生成部と、
     前記第1注目生成画像データの画像と前記第2注目生成画像データの画像との間の差分を示す差分画像の差分画像データを生成する第3生成部と、
     を備え、
     前記第1生成モデルは、生成ネットワークと識別ネットワークとを有する敵対的生成ネットワークの訓練によって生成された前記生成ネットワークであり、
     前記識別ネットワークは、訓練用の入力画像データを前記生成ネットワークに入力することによって生成された画像データの画像である第1画像中の第1部分領域の画像の少なくとも一部を示す第1部分画像を表す第1部分画像データと、訓練用のコンピュータグラフィックス画像である第2画像中の第2部分領域の画像の少なくとも一部を示す第2部分画像を表す第2部分画像データと、を前記識別ネットワークに入力することによって、訓練されている、
     画像処理装置。
  11.  生成ネットワークと識別ネットワークとを有する敵対的生成ネットワークの訓練方法であって、
     訓練用の入力画像データを生成ネットワークに入力することによって、第1画像の第1画像データを生成する工程と、
     前記第1画像中の第1部分領域をランダムに決定する工程と、
     前記第1画像中の前記第1部分領域の画像の少なくとも一部を示す第1部分画像を表す第1部分画像データを、前記第1画像データと前記第1部分領域とを使用して取得する工程と、
     前記第1部分画像データを識別ネットワークに入力することによって、第1識別データを取得する工程と、
     前記入力画像データに対応付けられた第2画像データの第2画像中の第2部分領域をランダムに決定する工程と、
     前記第2画像中の前記第2部分領域の画像の少なくとも一部を示す第2部分画像を表す第2部分画像データを、前記第2画像データと前記第2部分領域とを使用して取得する工程と、
     前記第2部分画像データを前記識別ネットワークに入力することによって、第2識別データを取得する工程と、
     前記第1識別データと前記第2識別データとを使用することによって、前記識別ネットワークのパラメータを調整する工程と、
     を備える、訓練方法。
PCT/JP2022/019287 2021-05-11 2022-04-28 画像処理方法、コンピュータプログラム、画像処理装置、および、訓練方法 WO2022239671A1 (ja)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2021-080357 2021-05-11
JP2021080357A JP2022174516A (ja) 2021-05-11 2021-05-11 画像処理方法、コンピュータプログラム、画像処理装置、および、訓練方法

Publications (1)

Publication Number Publication Date
WO2022239671A1 true WO2022239671A1 (ja) 2022-11-17

Family

ID=84028334

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2022/019287 WO2022239671A1 (ja) 2021-05-11 2022-04-28 画像処理方法、コンピュータプログラム、画像処理装置、および、訓練方法

Country Status (2)

Country Link
JP (1) JP2022174516A (ja)
WO (1) WO2022239671A1 (ja)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6767966B2 (ja) * 2014-04-09 2020-10-14 エントルピー インコーポレーテッドEntrupy Inc. 微視的差異からの機械学習を使用する物体の真贋鑑定
WO2020230777A1 (ja) * 2019-05-15 2020-11-19 ブラザー工業株式会社 機械学習モデルのトレーニング方法、データ生成装置、および、学習済みの機械学習モデル
WO2020230776A1 (ja) * 2019-05-15 2020-11-19 ブラザー工業株式会社 機械学習モデルのトレーニング方法、データ生成装置、および、学習済みの機械学習モデル
JP2021026729A (ja) * 2019-08-08 2021-02-22 ブラザー工業株式会社 画像処理装置、および、学習済みの機械学習モデル

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6767966B2 (ja) * 2014-04-09 2020-10-14 エントルピー インコーポレーテッドEntrupy Inc. 微視的差異からの機械学習を使用する物体の真贋鑑定
WO2020230777A1 (ja) * 2019-05-15 2020-11-19 ブラザー工業株式会社 機械学習モデルのトレーニング方法、データ生成装置、および、学習済みの機械学習モデル
WO2020230776A1 (ja) * 2019-05-15 2020-11-19 ブラザー工業株式会社 機械学習モデルのトレーニング方法、データ生成装置、および、学習済みの機械学習モデル
JP2021026729A (ja) * 2019-08-08 2021-02-22 ブラザー工業株式会社 画像処理装置、および、学習済みの機械学習モデル

Also Published As

Publication number Publication date
JP2022174516A (ja) 2022-11-24

Similar Documents

Publication Publication Date Title
CN111401372B (zh) 一种扫描文档图文信息提取与鉴别的方法
JP2019091249A (ja) 欠陥検査装置、欠陥検査方法、及びそのプログラム
Christlein et al. A study on features for the detection of copy-move forgeries
CN112132196B (zh) 一种结合深度学习和图像处理的烟盒缺陷识别方法
JP2021005266A (ja) 画像判別モデル構築方法、画像判別モデル、および画像判別方法
US20220180122A1 (en) Method for generating a plurality of sets of training image data for training machine learning model
CN114120349B (zh) 基于深度学习的试卷识别方法及系统
Mazumdar et al. Universal image manipulation detection using deep siamese convolutional neural network
US20230281797A1 (en) Defect discrimination apparatus for printed images and defect discrimination method
CN114399505B (zh) 工业检测中的检测方法、检测装置
CN116342536A (zh) 基于轻量化模型的铝带材表面缺陷检测方法、系统及设备
WO2022239671A1 (ja) 画像処理方法、コンピュータプログラム、画像処理装置、および、訓練方法
US20230316697A1 (en) Association method, association system, and non-transitory computer-readable storage medium
CN113076916A (zh) 基于几何特征加权融合的动态人脸表情识别方法及系统
CN115861259A (zh) 一种基于模板匹配的引线框架表面缺陷检测方法及装置
US11625886B2 (en) Storage medium storing program, training method of machine learning model, and image generating apparatus
US20220172453A1 (en) Information processing system for determining inspection settings for object based on identification information thereof
CN115457015A (zh) 一种基于视觉交互感知双流网络的图像无参考质量评估方法及装置
JP2022156761A (ja) データ処理装置、データ処理方法、コンピュータプログラム
CN108038516B (zh) 基于低维图像编码与集成学习的白胚布平整度分级方法
WO2023013546A1 (ja) コンピュータプログラム、生成装置、および、生成方法
JP2023023777A (ja) コンピュータプログラム、生成装置、および、生成方法
JP7557169B2 (ja) 方法、システム、および、コンピュータプログラム
JP2023129869A (ja) 印刷画像の欠陥判別装置、およびその判別方法
WO2023223883A1 (ja) コンピュータプログラム、および、データ処理装置

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: 22807373

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 22807373

Country of ref document: EP

Kind code of ref document: A1