WO2021106961A1 - 画像生成装置 - Google Patents
画像生成装置 Download PDFInfo
- Publication number
- WO2021106961A1 WO2021106961A1 PCT/JP2020/043904 JP2020043904W WO2021106961A1 WO 2021106961 A1 WO2021106961 A1 WO 2021106961A1 JP 2020043904 W JP2020043904 W JP 2020043904W WO 2021106961 A1 WO2021106961 A1 WO 2021106961A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- image data
- unit
- trained model
- learning
- image
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Ceased
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T1/00—General purpose image data processing
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T5/00—Image enhancement or restoration
- G06T5/50—Image enhancement or restoration using two or more images, e.g. averaging or subtraction
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N5/00—Details of television systems
- H04N5/222—Studio circuitry; Studio devices; Studio equipment
- H04N5/262—Studio circuits, e.g. for mixing, switching-over, change of character of image, other special effects ; Cameras specially adapted for the electronic generation of special effects
Definitions
- the present invention relates to an image generator.
- Patent Document 1 discloses an image generator that generates intermediate image data by morphing processing.
- the difficulty of predicting the new image data generated from the first image data and the second image data is not set in the morphing process. Therefore, there is a concern that the new image data can be easily predicted from the first image data and the second image data. Further, since the intermediate image data is an intermediate image data between the first image data and the second image data, the new image data is apparently the data recalled from the first image data or the second image data. There is a concern. Therefore, after setting the difficulty of prediction, it is required to generate image data having a new design property that is not easy to predict from the first image data and the second image data.
- an object of the present invention is to provide an image generation device capable of generating image data having a new design property that is not easy to predict from a plurality of image data after setting the difficulty of prediction.
- the image generator of the present invention includes a recording unit that records a plurality of first image data and a plurality of second image data, a first specific gravity of the first domain of the first image data, and the above.
- a setting unit for setting the second specific weight of the second domain of the second image data, and learned corresponding to the first specific weight and the second specific weight from the plurality of first image data and the plurality of second image data.
- a learning unit that generates a model for each value of the first specific gravity and the second specific gravity, a trained model storage unit that stores a plurality of the trained models, and a plurality of the trained model storage units that are stored in the trained model storage unit.
- a trained model selection unit that selects one trained model from the trained models, a test image data input unit that inputs test image data, and the trained model selected by the trained model selection unit. It is characterized by including an image data generation unit that generates new image data from the test image data input from the test image data input unit.
- the values of the first specific density and the second specific gravity indicating the difficulty of prediction can be set, and a trained model corresponding to each of the values of the first specific density and the second specific gravity is generated, and a plurality of trained models are generated.
- New image data is generated from the test image data using one of the trained models of.
- the degree of conversion of the test image data changes according to the trained model corresponding to the values of the first specific density and the second specific gravity.
- the new image data may become image data that is difficult to predict from the first image data and the second image data, and may have a new design property. Therefore, the image generation device of the present embodiment can generate new image data having a new design property that is not easy to predict from the plurality of first and second image data after setting the difficulty of prediction.
- the learning unit may generate a trained model according to the Cycle GAN method.
- the learning unit may perform the calculation used in the Cycle GAN method by the number of learning times set in each of the learned models to generate each of the learned models.
- the image generator of the present invention may further include an output unit that outputs new image data.
- an image generation device capable of generating image data having a new design property that is not easy to predict from a plurality of image data after setting the difficulty of prediction. can do.
- FIG. 1 is a block diagram of an image generator according to an embodiment of the present invention.
- FIG. 2 is a diagram for explaining the third term in the formula of the loss function of the learning unit.
- FIG. 3 is a flowchart showing the trained model generation steps.
- FIG. 4 is a flowchart showing the learning process in the trained model generation step.
- FIG. 5 is a flowchart showing an image generation step.
- FIG. 1 is a block diagram of the image generation device 10 according to the present embodiment.
- the image generation device 10 generates a trained model from a plurality of image data according to the Cycle GAN method in the hostile generation network (GAN (Generative Adversarial Network)) method, and generates new image data using the generated trained model. To do.
- GAN Geneative Adversarial Network
- FIG. 1 an example of generating a trained model from each domain of two image data is shown.
- a domain indicates a feature in image data.
- the image generation device 10 includes a recording unit 21, a first image data input unit 23, a second image data input unit 25, a specific gravity input unit 27, a learning frequency input unit 29, a learning unit 41, and an image data generation unit. It includes a control unit 40 including 47, a trained model storage unit 51, a test image data input unit 53, a trained model selection unit 55, and an image output unit 57.
- each block of the image generation device 10 may be configured by hardware, may be configured by software, or may be configured by a combination of hardware and software.
- the recording unit 21 records a plurality of first image data and a plurality of second image data.
- Each first image data is data in which the appearance of each first image data is similar when each first image data is output as an image (for example, a still image), and the appearance of each first image data.
- the first image data has been described, but the same applies to each of the second image data.
- each first image data is image data indicating cat's eyes
- each first image data is data classified into the same category such as cat's eyes.
- each second image data is image data indicating a vehicle headlight
- each second image data is data classified into the same category such as a vehicle headlight, and is the first data.
- the data is classified into a category different from the image data.
- the plurality of first image data has a first domain
- the plurality of second image data has a second domain.
- the first image data is image data indicating the eyes of a cat
- the first domain indicates, for example, the size and shape of the eyes.
- the second image data is image data indicating a vehicle headlight
- the second domain indicates, for example, the size and shape of the vehicle headlight.
- the recording unit 21 records training image data and test image data, which will be described later.
- the recording unit 21 is, for example, a memory.
- the first image data input unit 23 inputs to the learning unit 41 an instruction to cause the learning unit 41 of the control unit 40 to read a plurality of first image data recorded in the recording unit 21.
- the second image data input unit 25 inputs to the learning unit 41 an instruction to cause the learning unit 41 to read a plurality of second image data recorded in the recording unit 21.
- the specific gravity input unit 27 learns the specific density ⁇ A of the first domain of the first image data used at the time of learning of the learning unit 41 and the specific gravity ⁇ B of the second domain of the second image data used at the time of learning of the learning unit 41. It is input to the setting unit 43 described later of 41.
- the specific densities ⁇ A and ⁇ B indicate the difficulty of prediction described later.
- the values of the specific densities ⁇ A and ⁇ B can be appropriately set by the user.
- the learning number input unit 29 inputs the learning number of the learning unit 41, which will be described later, to the setting unit 43.
- the first image data input unit 23, the second image data input unit 25, the specific gravity input unit 27, and the learning frequency input unit 29 are devices for input such as a keyboard and a mouse.
- the control unit 40 includes a CPU (Central Processing Unit) and a memory.
- the control unit 40 comprehensively controls the operation of the image generation device 10 by reading and executing the control program recorded in the memory by the CPU.
- the learning unit 41 has a setting unit 43.
- the setting unit 43 sets the specific densities ⁇ A and ⁇ B input from the specific densities input unit 27, and inputs the set specific densities ⁇ A and ⁇ B to the generation unit 45 and the identification unit 46 described later of the learning unit 41. Further, the setting unit 43 sets the learning number input from the learning number input unit 29, and inputs the set learning number to the generation unit 45 and the identification unit 46.
- the learning unit 41 has a generation unit 45 and an identification unit 46, and the generation unit 45 and the identification unit 46 form a neural network in machine learning.
- the fake image data and the training image data used in the generation unit 45 and the identification unit 46 will be described.
- the learning unit 41 is mainly both the generation unit 45 and the identification unit 46.
- the fake image data is fake data obtained by converting a certain image data so as to approximate it to the training image data.
- the training image data is real data that is a basis for improving the accuracy of the fake image data in order to approximate the fake image data to the training image data.
- the approximation here indicates the appearance when the image data is output as an image (for example, a still image).
- the training image data becomes the second image data
- the fake image data approximates the first image data to the second image data which is the training image data. It becomes the converted fake second image data.
- the training image data becomes the first image data
- the fake image data approximates the second image data to the first image data which is the training image data. It becomes the fake first image data converted into.
- the generation unit 45 reads the above-mentioned image data from the recording unit 21, converts the image data, and generates fake image data from the image data.
- the fake image data is input to the identification unit 46.
- the identification unit 46 discriminates between the fake image data input from the generation unit 45 and the training image data read from the recording unit 21.
- the identification unit 46 calculates information regarding the deviation between the fake image data and the training image data, and outputs the information to the generation unit 45.
- the generation unit 45 reads image data different from the image data read from the recording unit 21 from the recording unit 21, and converts the other image data read from the other image data based on the information from the identification unit 46. To generate fake image data different from the above. Another fake image data is input to the identification unit 46, and the identification unit 46 discriminates between the other fake image data and the training image data.
- the generation unit 45 and the identification unit 46 compete with each other alternately, and as a result, the generation unit 45 and the identification unit 46 deepen the learning.
- the generation unit 45 can generate fake image data that is close to the training image data.
- the identification unit 46 does not output the information to the generation unit 45, and the generation unit 45 does not generate the fake image data.
- the generation unit 45 and the identification unit 46 have image data. Both the first image data and the second image data are generated and identified, and this point will be described below.
- the Cycle GAN method is represented by the following loss function equation (1).
- a special loss function called "Cycle loss”, which is the third term, is added to the loss function which is the first term and the second term.
- the first term of the equation (1) is a loss function that converts the first image data into fake image data approximated to the second image data.
- X is shows the first image data
- Y represents a second image data
- G represents the generator 45 for generating a false image data from the first image data
- D Y is the training image data
- the identification unit 46 for distinguishing from the fake image data is shown.
- the second term of the equation (1) is a loss function that converts the second image data into fake image data approximated to the first image data.
- Y represents a second image data
- X is shows the first image data
- F is shows a generator 45 which generates false image data from the second image data
- D X is the training image data
- the identification unit 46 for distinguishing from the fake image data is shown.
- the specific densities ⁇ A and ⁇ B set by the setting unit 43 are integrated as coefficients.
- the third term of the formula (1) is represented by the following formula (2).
- the equation (2) will be described below with reference to FIG.
- the generation unit 45 reduces the difference between the first image data real_X and the restored first image data rec_X by the specific gravity ⁇ A, thereby reducing the difference between the first image data real_X and the fake image data fake_Y. Suppress excessive conversion to.
- the specific density ⁇ A is integrated, and the smaller the specific density ⁇ A, the weaker the above-mentioned suppression, the greater the degree of conversion of the first image data real_X, and the more dynamically the first image data real_X becomes. Will be converted. Therefore, the fake image data fake_Y generated by the conversion is not more similar to the second image data which is the training image data, and is a new image having a new design that is difficult to predict from the first image data real_X. It becomes data.
- the fake image data fake_Y generated by the conversion is not similar to the second image data which is the training image data, and is a new image having a new design that is not easy to predict from the first image data real_X. It becomes data.
- the smaller the specific density ⁇ A the more difficult it is to predict, and the fake image data fake_Y becomes image data that is more difficult to predict from the first image data real_X.
- the identification unit 46 denoted D Y in Figure 2 identifies the second image data is a training image data false image data fake_Y generated by the generator 45.
- the generation unit 45 reduces the difference between the second image data real_Y and the restored second image data rec_Y by the specific gravity ⁇ B, so that the fake image data fake_X from the second image data real_Y Suppress excessive conversion to.
- the specific density ⁇ B is integrated, and the smaller the specific density ⁇ B, the weaker the above-mentioned suppression, the greater the degree of conversion of the second image data real_Y, and the more dynamically the second image data real_Y. Will be converted. Therefore, the fake image data fake_X generated by the conversion is not more similar to the first image data which is the training image data, and is a new image having a new design that is difficult to predict from the second image data real_Y. It becomes data.
- the fake image data fake_X generated by the conversion is not similar to the first image data which is the training image data, and is a new image having a new design that is not easy to predict from the second image data real_Y. It becomes data.
- the smaller the specific density ⁇ B the more difficult it is to predict, and the fake image data fake_X becomes image data that is more difficult to predict from the second image data real_Y.
- the identification unit 46 denoted as D x in Figure 2 identifies the first image data is a training image data false image data fake_X generated by the generator 45.
- the learning process which is a calculation using the loss function represented by the above equation (1), is performed by the learning unit 41 for the number of learning times set by the setting unit 43, so that the specific gravity ⁇ A
- One trained model in ⁇ B is constructed.
- the trained model is constructed for each value of the specific densities ⁇ A and ⁇ B.
- the first, second, and third trained models are constructed as trained models.
- the first trained model is constructed with a specific density ⁇ A1 and a specific density ⁇ B1 smaller than the specific density ⁇ A1
- the second trained model is constructed with a specific density ⁇ A2 and a specific density ⁇ B2 having the same specific density ⁇ A2
- the third trained model is constructed with a specific density ⁇ A3. It is constructed with a specific density ⁇ B3 larger than the specific density ⁇ A3.
- the trained model storage unit 51 stores each trained model constructed as described above as independent data.
- the trained model is input to the trained model storage unit 51 each time the trained model is constructed as one model by the learning unit 41.
- the trained model storage unit 51 is, for example, a memory.
- the test image data input unit 53 inputs to the image data generation unit 47 an instruction to cause the image data generation unit 47 to read the test image data recorded in the recording unit 21.
- the test image data is an image used when the image data generation unit 47 generates the image data.
- the test image data is, for example, image data showing a cat's eyes such as the first image data, or image data showing a vehicle headlight such as the second image data.
- the trained model selection unit 55 selects a trained model from the trained model storage unit 51, and inputs an instruction to the image data generation unit 47 to read the selected trained model into the image data generation unit 47.
- test image data input unit 53 and the trained model selection unit 55 are devices for input such as a keyboard and a mouse.
- the image data generation unit 47 accesses the trained model storage unit 51 according to the instruction from the trained model selection unit 55, and reads the trained model selected by the trained model selection unit 55 from the trained model storage unit 51. Next, the image data generation unit 47 generates new image data from the test image data using the read learned model. The generated new image data is input to the image output unit 57.
- the image output unit 57 is, for example, a monitor.
- the image output unit 57 outputs new image data generated by the image data generation unit 47 as an image.
- the operation of the image generation device 10 includes a trained model generation step and an image generation step as main steps.
- FIG. 3 is a flowchart showing the trained model generation steps.
- Step S1 the first image data input unit 23 inputs an instruction to cause the learning unit 41 to read a plurality of first image data, and the learning unit 41 inputs a plurality of first image data from the recording unit 21. read out. Further, the second image data input unit 25 inputs an instruction to cause the learning unit 41 to read the second image data, and the learning unit 41 reads the second image data from the recording unit 21.
- the process proceeds to step S2.
- Step S2 the specific gravity input unit 27 inputs the specific densities ⁇ A1 and ⁇ B1 to the setting unit 43, and the setting unit 43 sets the specific densities ⁇ A1 and ⁇ B1 as the specific densities ⁇ A and ⁇ B.
- the set specific densities ⁇ A1 and ⁇ B1 are input to the generation unit 45 and the identification unit 46, and the process proceeds to step S3.
- Step S3 the learning number input unit 29 inputs the learning number of the learning unit 41 to the setting unit 43, and the setting unit 43 sets the input learning number.
- the set number of learnings is input to the generation unit 45 and the identification unit 46, and the process proceeds to step S4.
- the number of learnings is set to, for example, 100 times.
- Step S4 the learning unit 41 checks the current number of learning times. If the number of learnings is less than 100, the process proceeds to step S5, and if the number of learnings is not less than 100, the process proceeds to step S7.
- the trained model generation step is started and the process shifts to the first step S4, the number of trainings is set to 0.
- Step S5 In this step, the learning unit 41 shifts to the learning process described later. When the learning process is completed, the process proceeds to step S6.
- Step S6 In this step, the learning unit 41 adds one to the current number of learnings, and the process returns to step S4.
- Step S7 the first trained model corresponding to the specific densities ⁇ A1 and ⁇ B1 set in step S2 is completed by the learning process 100 times, and the completed first trained model is stored in the trained model storage unit 51. It is stored.
- FIG. 4 is a flowchart showing the learning process of the learning unit 41.
- Step S11 the learning unit 41 allocates the order i to each of the first image data and each second image data read from the recording unit 21 in step S1. As described above, since the number of the first image data and the number of the second image data are 14,000 each, the order i is 1 to 14000. When the order is assigned, the process proceeds to step S12.
- Step S12 the learning unit 41 checks the order i of the first image data and the second image data to be learned. If the order i is less than 14,000 described above, the process proceeds to step S13. If the order i is not less than 14,000, it is assumed that the learning process is performed on all the first image data and all the second image data with the specific densities ⁇ A1 and ⁇ B1 set in step S2, and the process proceeds to step S6.
- Step S13 the learning unit 41 acquires the i-th first image data and the second image data, and the process proceeds to step S14.
- i is set to 1.
- Step S14 the learning unit 41 performs a calculation using the loss function represented by the equation (1) for the i-th first image data and the i-th second image data, and the process proceeds to step S15.
- Step S15 learning is performed in the learning unit 41, and the process proceeds to step S16.
- Step S16 the learning unit 41 adds one of the current order i, and the process returns to step S12.
- the first image data and the second image data in the 1st to 14000th positions are expressed by the equation (1).
- the learning process which is a calculation using the shown loss function, is performed 100 times.
- the first trained model corresponding to the specific densities ⁇ A1 and ⁇ B1 is completed.
- the second trained corresponding to the specific densities ⁇ A2 and ⁇ B2 is similar to the generation of the first trained model.
- the model is generated by 100 learning processes.
- the third trained model corresponding to the specific gravities ⁇ A3 and ⁇ B3 is generated by 100 times of learning processing in the same manner as the generation of the first trained model. ..
- the trained model is generated for each value of the specific densities ⁇ A and ⁇ B set in step S2, and each generated trained model is stored in the trained model storage unit 51.
- each trained model is stored in the trained model storage unit 51, the process in the trained model generation step ends.
- FIG. 5 is a flowchart showing an image generation step.
- the image generation step is performed after a plurality of trained models have been constructed by the trained model generation step.
- Step S21 the test image data is input from the recording unit 21 to the image data generation unit 47 by the test image data input unit 53. Further, the trained model selected by the trained model selection unit 55 is input from the trained model storage unit 51 to the image data generation unit 47.
- the test image data is image data indicating the cat's eyes such as the first image data, and is data classified into the same category as the first image data.
- the training image data is the second image data.
- Step S22 the image data generation unit 47 checks the trained model input to the image data generation unit 47. If the input trained model is the first trained model, the process proceeds to step S23. If the input trained model is the second trained model, the process proceeds to step S24. If the input trained model is the third trained model, the process proceeds to step S25.
- Step S23 the image data generation unit 47 generates new image data from the test image data using the first trained model.
- the specific gravity ⁇ A1 is larger than the specific density ⁇ B1. Therefore, the degree of conversion of the test image data becomes large, and the new image data is closer to the first domain than the second domain, and the image data has a new design that is not easy to predict from the test image data.
- the new image data generated in this step is the image data indicating the vehicle headlight that most closely resembles the cat's eyes. Then, the new image data is input to the image output unit 57, and the process proceeds to step S26.
- Step S24 the image data generation unit 47 generates new image data from the test image data using the second trained model.
- the second trained model since the specific gravity ⁇ A2 is the same as the specific density ⁇ B2, the new image data is an intermediate image data between the cat's eyes and the vehicle headlight. Then, the new image data is input to the image output unit 57, and the process proceeds to step S26.
- Step S25 the image data generation unit 47 generates new image data from the test image data using the third trained model.
- the specific density ⁇ A3 is smaller than the specific density ⁇ B3. Therefore, the degree of conversion of the test image data becomes larger, and the new image data is closer to the second domain than the first domain, and the image data has a new design that is difficult to predict from the test image data.
- the new image data generated in this step is image data showing a vehicle headlight that approximates the eyes of a cat. Then, the new image data is input to the image output unit 57, and the process proceeds to step S26.
- Step S26 the image output unit 57 outputs new image data as an image, and the process in the image generation step ends.
- the image generation device 10 of the present embodiment includes a recording unit 21 that records a plurality of first image data and a plurality of second image data, and a first specific gravity and a first domain of the first image data. 2
- the setting unit 43 for setting the second specific weight of the second domain of the image data is provided.
- the image generation device 10 generates a trained model corresponding to the first specific gravity and the second specific gravity from the plurality of first image data and the plurality of second image data for each value of the first specific gravity and the second specific gravity.
- a trained model storage unit 51 that stores a plurality of trained models, and a trained model selection unit 55 that selects one trained model from a plurality of trained models stored in the trained model storage unit 51. Further prepare.
- the image generation device 10 is input from the test image data input unit 53 using the test image data input unit 53 for inputting the test image data and the trained model selected by the trained model selection unit 55. It further includes an image data generation unit 47 that generates new image data from the test image data.
- the values of the specific gravity ⁇ A and the specific gravity ⁇ B indicating the difficulty of prediction can be set, and a trained model corresponding to each value of the specific gravity ⁇ A and the specific gravity ⁇ B is generated, and a plurality of trainings are performed.
- New image data is generated from the test image data using one trained model from the completed models.
- the degree of conversion of the test image data changes according to the trained model corresponding to the values of the specific gravity ⁇ A and the specific gravity ⁇ B.
- the new image data can become image data that is difficult to predict from the first image data and the second image data, which are training image data, and can be provided with new designability. Therefore, the image generation device 10 of the present embodiment can generate new image data having a new design property that is not easy to predict from the plurality of first and second image data after setting the difficulty of prediction. ..
- the setting unit 43 sets a plurality of specific densities ⁇ A and a plurality of specific densities ⁇ B
- the learning unit 41 sets a plurality of learned models corresponding to the plurality of specific radii ⁇ A and the plurality of specific densities ⁇ B.
- the image data generation unit 47 generates new image data using one trained model from among the plurality of trained models. By generating a plurality of trained models, various kinds of new image data can be generated as compared with the case where only one trained model is generated.
- the image data generation unit 47 may be the generation unit 45 learned in the learning unit 41.
- the learning unit 41 may provide the generation unit 45 learned in the learning process to the image data generation unit 47.
- the number of learnings set in step S3 may be set for each learned model to be constructed. Therefore, for example, the number of trainings in the construction of the first trained model may be the same as the number of trainings in the construction of other trained models, and may be more or less than the number of trainings in the construction of other trained models. Good. As the number of learnings increases, when a trained model with a large number of learnings is used, new image data having a new design that is not easy to predict can be easily generated from the plurality of first and second image data. Also, the smaller the number of trainings, the faster the trained model can be generated. Further, although the learning unit 41 generates three trained models, it is not necessary to limit the learning unit 41 to this, and at least one trained model may be generated.
- the learning unit 41 generates a trained model according to the Cycle GAN method, but the learning unit 41 does not have to be limited to this.
- the setting unit 43 sets the specific densities input from the specific densities input unit 27 as the specific densities ⁇ A and ⁇ B, but it is not necessary to be limited to these.
- the setting unit 43 may set the specific densities preset in the memory of the control unit 40 as the specific densities ⁇ A and ⁇ B.
- the setting unit 43 sets the value input from the learning number input unit 29 as the learning number, but the setting unit 43 does not have to be limited to this.
- the setting unit 43 may set a value preset in the memory of the control unit 40 as the number of learnings.
- Each first image data is described as image data indicating the eyes of a cat, but it is not necessary to be limited to this, and image data indicating the eyes of other animals may be used.
- an image generation device capable of generating image data having a new design that is not easy to predict from a plurality of image data after setting the difficulty of prediction is provided, and the image generation is performed.
- the device can be used in the field of image generation and the like.
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Image Analysis (AREA)
Abstract
画像生成装置(10)は、記録部(21)と、第1画像データの第1ドメインの第1比重及び第2画像データの第2ドメインの第2比重をそれぞれ設定する設定部(43)と、複数の第1画像データ及び複数の第2画像データから第1比重及び第2比重に対応する学習済モデルを第1比重及び第2比重の値毎に生成する学習部(41)と、学習済モデル格納部51と、学習済モデル選択部55とを備える。また、画像生成装置(10)は、テスト用画像データ入力部53と、選択される学習済モデルを用いてテスト用画像データから新たな画像データを生成する画像データ生成部(47)とを備える。
Description
本発明は、画像生成装置に関する。
近年、画像処理技術が進展しており、注目される画像処理技術の1つとしてモーフィング処理が挙げられる。モーフィング処理とは、原画像となる第1画像データと目的画像となる第2画像データとの間に、第1画像データと第2画像データとをつなぐ中間画像データを生成し、第1画像データを第2画像データに滑らかに変化させる処理である。特許文献1には、モーフィング処理によって中間画像データを生成する画像生成装置が開示されている。
モーフィング処理において生成される中間画像データを新たな画像データとして利用する場合、モーフィング処理では、第1画像データ及び第2画像データから生成される新たな画像データの予想の困難性は設定されない。従って、新たな画像データは、第1画像データ及び第2画像データから予想が容易となる懸念がある。また、中間画像データは、第1画像データ及び第2画像データの中間的な画像データであるため、新たな画像データは、見た目上、第1画像データまたは第2画像データから想起されるデータとなる懸念がある。従って、予想の困難性を設定したうえで、第1画像データ及び第2画像データから予想が容易ではない新たなデザイン性を備える画像データの生成が求められる。
そこで、本発明は、予想の困難性を設定したうえで、複数の画像データから予想が容易ではない新たなデザイン性を備える画像データを生成し得る画像生成装置を提供することを目的とする。
上記課題を解決するため、本発明の画像生成装置は、複数の第1画像データ及び複数の第2画像データを記録する記録部と、前記第1画像データの第1ドメインの第1比重及び前記第2画像データの第2ドメインの第2比重をそれぞれ設定する設定部と、前記複数の第1画像データ及び前記複数の第2画像データから前記第1比重及び前記第2比重に対応する学習済モデルを前記第1比重及び前記第2比重の値毎に生成する学習部と、複数の前記学習済モデルを格納する学習済モデル格納部と、前記学習済モデル格納部に格納される前記複数の学習済モデルから1つの学習済モデルを選択する学習済モデル選択部と、テスト用画像データを入力するテスト用画像データ入力部と、前記学習済モデル選択部によって選択される前記学習済モデルを用いて前記テスト用画像データ入力部から入力される前記テスト用画像データから新たな画像データを生成する画像データ生成部と、備えることを特徴とする。
本発明の画像生成装置では、予想の困難性を示す第1比重及び第2比重の値は設定可能であり、第1比重及び第2比重の値毎に対応する学習済モデルが生成され、複数の学習済モデルのなかから1つの学習済モデルを用いてテスト用画像データから新たな画像データを生成する。新たな画像データの生成時において、第1比重及び第2比重の値に対応する学習済モデルに応じてテスト用画像データの変換度合いが変化する。変換度合いが変化すると、新たな画像データは、第1画像データ及び第2画像データから予想が困難な画像データとなり得、新たなデザイン性を備えることになり得る。従って、本実施形態の画像生成装置は、予想の困難性を設定したうえで、複数の第1,2画像データから予想が容易ではない新たなデザイン性を備える新たな画像データを生成し得る。
また、本発明の画像生成装置では、前記学習部は、Cycle GAN方式に従って学習済モデルを生成してもよい。
また、本発明の画像生成装置では、前記学習部は、前記Cycle GAN方式において用いられる計算をそれぞれの前記学習済モデルに設定される学習回数行いそれぞれの前記学習済モデルを生成してもよい。この構成によって、学習回数が多いほど、学習回数が多い学習済モデルが用いられる場合に、複数の第1,2画像データから予想が容易ではない新たなデザイン性を備える新たな画像データが生成され易くなり得る。また、学習回数が少ないほど、学習済モデルは早く生成され得る。
また、本発明の画像生成装置は、新たな画像データを出力する出力部をさらに備えてもよい。
以上のように、本発明によれば、予想の困難性を設定したうえで、複数の画像データから予想が容易ではない新たなデザイン性を備える画像データを生成することができる画像生成装置を提供することができる。
以下、本発明に係る画像生成装置の好適な実施形態について図面を参照しながら詳細に説明する。以下に例示する実施形態は、本発明の理解を容易にするためのものであり、本発明を限定して解釈するためのものではない。本発明は、その趣旨を逸脱することなく、変更、改良することができる。また、本発明は、以下に例示する各実施形態における構成要素を適宜組み合わせてもよい。なお、理解の容易のため、それぞれの図において一部が誇張して記載される場合等がある。
図1は、本実施形態における画像生成装置10のブロック図である。画像生成装置10は、敵対的生成ネットワーク(GAN(Generative Adversarial Network))方式におけるCycle GAN方式に従って複数の画像データから学習済モデルを生成し、生成した学習済モデルを用いて新たな画像データを生成する。本実施形態の画像生成装置10では、2つの画像データのそれぞれのドメインから学習済モデルを生成する例が示されている。ドメインとは、画像データにおける特徴を示す。
画像生成装置10は、記録部21と、第1画像データ入力部23と、第2画像データ入力部25と、比重入力部27と、学習回数入力部29と、学習部41及び画像データ生成部47を含む制御部40と、学習済モデル格納部51と、テスト用画像データ入力部53と、学習済モデル選択部55と、画像出力部57とを備える。ここで、画像生成装置10の各ブロックは、ハードウェアによって構成されていてもよいし、ソフトウェアによって構成されていてもよいし、ハードウェアとソフトウェアの組み合わせによって構成されていてもよい。
記録部21は、複数の第1画像データ及び複数の第2画像データを記録する。それぞれの第1画像データは、それぞれの第1画像データを画像(例えば、静止画)として出力した場合においてそれぞれの第1画像データの見た目が近似したデータであり、それぞれの第1画像データの見た目が同じとは限らない。ここでは、第1画像データについて説明したが、それぞれの第2画像データについても同様である。例えば、それぞれの第1画像データが猫の目を示す画像データである場合、それぞれの第1画像データは、猫の目といった同じカテゴリーに区分されるデータである。また、例えば、それぞれの第2画像データが車両用前照灯を示す画像データである場合、それぞれの第2画像データは、車両用前照灯といった同じカテゴリーに区分されるデータであり、第1画像データとは異なるカテゴリーに区分されるデータである。複数の第1画像データは第1ドメインを有し、複数の第2画像データは第2ドメインを有する。第1画像データが猫の目を示す画像データである場合、第1ドメインは、例えば目の大きさや形状等を示す。第2画像データが車両用前照灯を示す画像データである場合、第2ドメインは、例えば車両用前照灯の大きさや形状等を示す。本実施形態の画像生成装置10では、例えば、第1画像データの数及び第2画像データの数は、それぞれ14000個とされる。また、記録部21は、後述する訓練用画像データ及びテスト用画像データを記録する。記録部21は、例えば、メモリである。
第1画像データ入力部23は、記録部21に記録される複数の第1画像データを制御部40の学習部41に読み出させる指示を学習部41に入力する。
第2画像データ入力部25は、記録部21に記録される複数の第2画像データを学習部41に読み出させる指示を学習部41に入力する。
比重入力部27は、学習部41の学習時に用いられる第1画像データの第1ドメインの比重λAと、学習部41の学習時に用いられる第2画像データの第2ドメインの比重λBとを学習部41の後述する設定部43に入力する。比重λAと比重λBとは、後述する予想の困難性を示す。比重λA,λBの値は、使用者によって適宜設定可能となっている。
学習回数入力部29は、学習部41の後述する学習回数を設定部43に入力する。
第1画像データ入力部23、第2画像データ入力部25、比重入力部27、及び学習回数入力部29は、キーボード、マウスといった入力するためのデバイスである。
制御部40は、CPU(Central Processing Unit)とメモリとを備える。制御部40は、CPUがメモリに記録されている制御プログラムを読み出して実行することによって、画像生成装置10の動作を統括的に制御する。
次に、制御部40における学習部41について説明する。
学習部41は、設定部43を有する。
設定部43は、比重入力部27から入力された比重λA,λBを設定し、設定した比重λA,λBを学習部41の後述する生成部45及び識別部46に入力する。また、設定部43は、学習回数入力部29から入力された学習回数を設定し、設定した学習回数を生成部45及び識別部46に入力する。
また、学習部41は生成部45及び識別部46を有し、生成部45及び識別部46は機械学習におけるニューラルネットワークを構成する。
次に、生成部45及び識別部46において用いられる偽画像データ及び訓練用画像データについて説明する。なお、以下において、学習部41とは、主に生成部45及び識別部46の両方であることを示す。
偽画像データとは、ある画像データを訓練用画像データに近似させるように変換したfakeデータである。訓練用画像データとは、偽画像データを訓練用画像データに近似させるために偽画像データの精度を向上させるための基となるrealデータである。ここでいう近似とは、画像データを画像(例えば、静止画)として出力した場合の見た目を示す。例えば、上記した画像データが第1画像データである場合、訓練用画像データは第2画像データとなり、偽画像データは第1画像データを訓練用画像データである第2画像データに近似させるように変換した偽の第2画像データとなる。逆に、上記した画像データが第2画像データである場合、訓練用画像データは第1画像データとなり、偽画像データは第2画像データを訓練用画像データである第1画像データに近似させるように変換した偽の第1画像データとなる。
生成部45は、上記のある画像データを記録部21から読み出し、当該画像データを変換して当該画像データから偽画像データを生成する。偽画像データは、識別部46に入力される。
識別部46は、生成部45から入力された偽画像データと記録部21から読み出した訓練用画像データとを識別する。
また、識別部46は、偽画像データが訓練用画像データに近似していない場合、偽画像データ及び訓練用画像データのずれに関する情報を算出して、当該情報を生成部45に出力する。生成部45は、記録部21から読み出した上記画像データとは別の画像データを記録部21から読み出すと共に、読み出した別の画像データから識別部46からの情報を基に上記とは変換の程度を変えて上記とは別の偽画像データを生成する。別の偽画像データは識別部46に入力され、識別部46は別の偽画像データと訓練用画像データとを識別する。生成部45の生成と識別部46の識別とが交互に繰り返されることで、生成部45及び識別部46は交互に競合し、結果として、生成部45及び識別部46は学習を深める。学習が深まることで、生成部45は、訓練用画像データに近似した偽画像データを生成可能となる。偽画像データが訓練用画像データに近似している場合、識別部46は情報を生成部45に出力せず、生成部45は偽画像データを生成しない。本実施形態の学習部41では、上記のように生成部45及び識別部46が交互に競合する過程において、Cycle GAN方式が用いられているため、生成部45及び識別部46は、画像データが第1画像データ及び第2画像データである場合の両方において、生成及び識別を行っており、この点について以下に説明する。
Cycle GAN方式は、下記損失関数の式(1)によって表される。この損失関数の式(1)では、第1項及び第2項である損失関数に、第3項である「Cycle loss」と呼ばれる特別な損失関数が付け加えられている。
式(1)の第1項は、第1画像データを第2画像データに近似させた偽画像データへ変換する損失関数である。第1項において、Xは第1画像データを示し、Yは第2画像データを示し、Gは第1画像データから偽画像データを生成する生成部45を示し、DYは訓練用画像データと偽画像データとを識別する識別部46を示す。
式(1)の第2項は、第2画像データを第1画像データに近似させた偽画像データへ変換する損失関数である。第2項において、Yは第2画像データを示し、Xは第1画像データを示し、Fは第2画像データから偽画像データを生成する生成部45を示し、DXは訓練用画像データと偽画像データとを識別する識別部46を示す。
ここで、式(2)について、図2を用いて以下に説明する。
式(2)の第1項では、図2においてGと示される生成部45が第1本体部として第1画像データreal_Xから訓練用画像データである第2画像データに近似させた偽画像データfake_Yを生成し、図2においてFと示される生成部45が第1復元部として当該偽画像データfake_Yを第1画像データrec_Xに復元する処理を行っている。式(2)の第1項では、生成部45は、比重λAによって第1画像データreal_Xと復元した第1画像データrec_Xとの差を少なくすることで、第1画像データreal_Xから偽画像データfake_Yへの過度な変換を抑制する。式(2)の第1項では比重λAが積算されており、比重λAが小さいほど、上記した抑制が弱まり、第1画像データreal_Xの変換度合いがより大きくなり、第1画像データreal_Xはダイナミックに変換される。従って、変換によって生成される偽画像データfake_Yは、訓練用画像データである第2画像データとはより似ておらず、第1画像データreal_Xから予想が困難な新たなデザイン性を備える新たな画像データとなる。逆に、比重λAが大きいほど、上記した抑制が強まり、第1画像データreal_Xの変換度合いが大きくなり、第1画像データreal_Xは比重λAが小さい場合に比べてダイナミックに変換されない。従って、変換によって生成される偽画像データfake_Yは、訓練用画像データである第2画像データとは似ておらず、第1画像データreal_Xから予想が容易ではない新たなデザイン性を備える新たな画像データとなる。上記したように、比重λAが小さいほど、予想の困難性がより高まり、偽画像データfake_Yは第1画像データreal_Xから予想がより困難な画像データとなる。また、比重λAが大きいほど、予想の困難性が高まり、偽画像データfake_Yは第1画像データreal_Xから予想が困難な画像データとなる。第1画像データreal_Xと第1画像データrec_Xとの差は、cycle-consistency lossと呼ばれる再構築誤差である。なお、図2においてDYと示される識別部46は、生成部45によって生成される偽画像データfake_Yと訓練用画像データである第2画像データとを識別している。
式(2)の第1項では、図2においてGと示される生成部45が第1本体部として第1画像データreal_Xから訓練用画像データである第2画像データに近似させた偽画像データfake_Yを生成し、図2においてFと示される生成部45が第1復元部として当該偽画像データfake_Yを第1画像データrec_Xに復元する処理を行っている。式(2)の第1項では、生成部45は、比重λAによって第1画像データreal_Xと復元した第1画像データrec_Xとの差を少なくすることで、第1画像データreal_Xから偽画像データfake_Yへの過度な変換を抑制する。式(2)の第1項では比重λAが積算されており、比重λAが小さいほど、上記した抑制が弱まり、第1画像データreal_Xの変換度合いがより大きくなり、第1画像データreal_Xはダイナミックに変換される。従って、変換によって生成される偽画像データfake_Yは、訓練用画像データである第2画像データとはより似ておらず、第1画像データreal_Xから予想が困難な新たなデザイン性を備える新たな画像データとなる。逆に、比重λAが大きいほど、上記した抑制が強まり、第1画像データreal_Xの変換度合いが大きくなり、第1画像データreal_Xは比重λAが小さい場合に比べてダイナミックに変換されない。従って、変換によって生成される偽画像データfake_Yは、訓練用画像データである第2画像データとは似ておらず、第1画像データreal_Xから予想が容易ではない新たなデザイン性を備える新たな画像データとなる。上記したように、比重λAが小さいほど、予想の困難性がより高まり、偽画像データfake_Yは第1画像データreal_Xから予想がより困難な画像データとなる。また、比重λAが大きいほど、予想の困難性が高まり、偽画像データfake_Yは第1画像データreal_Xから予想が困難な画像データとなる。第1画像データreal_Xと第1画像データrec_Xとの差は、cycle-consistency lossと呼ばれる再構築誤差である。なお、図2においてDYと示される識別部46は、生成部45によって生成される偽画像データfake_Yと訓練用画像データである第2画像データとを識別している。
式(2)の第2項では、図2においてFと示される生成部45が第2本体部として第2画像データreal_Yから訓練用画像データである第1画像データに近似させた偽画像データfake_Xを生成し、図2においてGと示される生成部45が第2復元部として当該偽画像データfake_Xを第2画像データrec_Yに復元する処理を行っている。式(2)の第2項では、生成部45は、比重λBによって第2画像データreal_Yと復元した第2画像データrec_Yとの差を少なくすることで、第2画像データreal_Yから偽画像データfake_Xへの過度な変換を抑制する。式(2)の第2項では比重λBが積算されており、比重λBが小さいほど、上記した抑制が弱まり、第2画像データreal_Yの変換度合いがより大きくなり、第2画像データreal_Yはダイナミックに変換される。従って、変換によって生成される偽画像データfake_Xは、訓練用画像データである第1画像データとはより似ておらず、第2画像データreal_Yから予想が困難な新たなデザイン性を備える新たな画像データとなる。逆に、比重λBが大きいほど、上記した抑制が強まり、第2画像データreal_Yの変換度合いが大きくなり、第2画像データreal_Yは比重λBが小さい場合に比べてダイナミックに変換されない。従って、変換によって生成される偽画像データfake_Xは、訓練用画像データである第1画像データとは似ておらず、第2画像データreal_Yから予想が容易ではない新たなデザイン性を備える新たな画像データとなる。上記したように、比重λBが小さいほど、予想の困難性がより高まり、偽画像データfake_Xは第2画像データreal_Yから予想がより困難な画像データとなる。また、比重λAが大きいほど、予想の困難性が高まり、偽画像データfake_Xは第2画像データreal_Yから予想が困難な画像データとなる。第2画像データreal_Yと第2画像データrec_Yとの差は、cycle-consistency lossと呼ばれる再構築誤差である。なお、図2においてDxと示される識別部46は、生成部45によって生成される偽画像データfake_Xと訓練用画像データである第1画像データとを識別している。
本実施形態の画像生成装置10では、上記式(1)で示される損失関数を用いる計算である学習処理を、学習部41が設定部43によって設定される学習回数を行うことで、比重λA,λBにおける1つの学習済モデルが構築される。当該学習済モデルは、比重λA,λBの値毎に構築される。
本実施形態の画像生成装置10では、学習済モデルとして、第1,2,3学習済モデルが構築される例が示されている。第1学習済モデルは比重λA1と比重λA1よりも小さい比重λB1とによって構築され、第2学習済モデルは比重λA2と比重λA2と同じ比重λB2とによって構築され、第3学習済モデルは比重λA3と比重λA3よりも大きい比重λB3とによって構築される。
ここで、図1に戻り、画像生成装置10の各ブロックの説明を続ける。
学習済モデル格納部51は、上記のように構築されたそれぞれの学習済モデルを独立したデータとして格納する。学習済モデルは、学習部41によって1つのモデルとして構築される度に学習済モデル格納部51に入力される。学習済モデル格納部51は、例えば、メモリである。
テスト用画像データ入力部53は、記録部21に記録されるテスト用画像データを画像データ生成部47に読み出させる指示を画像データ生成部47に入力する。テスト用画像データは、画像データ生成部47の画像データ生成時に用いられる画像である。テスト用画像データは、例えば、第1画像データのような猫の目を示す画像データや、第2画像データのような車両用前照灯を示す画像データである。
学習済モデル選択部55は、学習済モデル格納部51から学習済モデルを選択し、選択した学習済モデルを画像データ生成部47に読み出させる指示を画像データ生成部47に入力する。
テスト用画像データ入力部53及び学習済モデル選択部55は、キーボード、マウスといった入力するためのデバイスである。
画像データ生成部47は、学習済モデル選択部55からの指示によって学習済モデル格納部51にアクセスし、学習済モデル選択部55によって選択された学習済モデルを学習済モデル格納部51から読み出す。次に、画像データ生成部47は、読み出した学習済モデルを用いてテスト用画像データから新たな画像データを生成する。生成された新たな画像データは、画像出力部57に入力される。
画像出力部57は、例えば、モニタである。画像出力部57は、画像データ生成部47によって生成される新たな画像データを画像として出力する。
次に、画像生成装置10の動作について説明する。画像生成装置10の動作は、学習済モデル生成ステップと、画像生成ステップとを主なステップとして備える。
図3は、学習済モデル生成ステップを示すフローチャートである。
(ステップS1)
本ステップでは、第1画像データ入力部23は複数の第1画像データを学習部41に読み出させる指示を学習部41に入力し、学習部41は複数の第1画像データを記録部21から読み出す。また、第2画像データ入力部25は第2画像データを学習部41に読み出させる指示を学習部41に入力し、学習部41は第2画像データを記録部21から読み出す。学習部41が複数の第1画像データ及び複数の第2画像データを読み出すと、処理はステップS2に移行する。
本ステップでは、第1画像データ入力部23は複数の第1画像データを学習部41に読み出させる指示を学習部41に入力し、学習部41は複数の第1画像データを記録部21から読み出す。また、第2画像データ入力部25は第2画像データを学習部41に読み出させる指示を学習部41に入力し、学習部41は第2画像データを記録部21から読み出す。学習部41が複数の第1画像データ及び複数の第2画像データを読み出すと、処理はステップS2に移行する。
(ステップS2)
本ステップでは、比重入力部27は比重λA1,λB1を設定部43に入力し、設定部43は比重λA,λBとして比重λA1,λB1を設定する。設定された比重λA1,λB1は生成部45及び識別部46に入力され、処理はステップS3に移行する。
本ステップでは、比重入力部27は比重λA1,λB1を設定部43に入力し、設定部43は比重λA,λBとして比重λA1,λB1を設定する。設定された比重λA1,λB1は生成部45及び識別部46に入力され、処理はステップS3に移行する。
(ステップS3)
本ステップでは、学習回数入力部29は学習部41の学習回数を設定部43に入力し、設定部43は入力学習回数を設定する。設定された学習回数は生成部45及び識別部46に入力され、処理はステップS4に移行する。ここでは、学習回数を例えば100回とする。
本ステップでは、学習回数入力部29は学習部41の学習回数を設定部43に入力し、設定部43は入力学習回数を設定する。設定された学習回数は生成部45及び識別部46に入力され、処理はステップS4に移行する。ここでは、学習回数を例えば100回とする。
(ステップS4)
本ステップでは、学習部41は、現在の学習回数をチェックする。学習回数が100回未満である場合には処理はステップS5に移行し、学習回数が100回未満でない場合には処理はステップS7に移行する。なお、学習済モデル生成ステップが開始されて処理が一度目のステップS4に移行した場合、学習回数は0とされる。
本ステップでは、学習部41は、現在の学習回数をチェックする。学習回数が100回未満である場合には処理はステップS5に移行し、学習回数が100回未満でない場合には処理はステップS7に移行する。なお、学習済モデル生成ステップが開始されて処理が一度目のステップS4に移行した場合、学習回数は0とされる。
(ステップS5)
本ステップでは、学習部41は、後述する学習処理に移行する。学習処理が終了すると、処理はステップS6に移行する。
本ステップでは、学習部41は、後述する学習処理に移行する。学習処理が終了すると、処理はステップS6に移行する。
(ステップS6)
本ステップでは、学習部41は現在の学習回数を1つ加算し、処理はステップS4に戻る。
本ステップでは、学習部41は現在の学習回数を1つ加算し、処理はステップS4に戻る。
(ステップS7)
本ステップでは、ステップS2において設定された比重λA1,λB1に対応する第1学習済モデルが100回の学習処理により完成したことになり、完成した第1学習済モデルは学習済モデル格納部51に格納される。
本ステップでは、ステップS2において設定された比重λA1,λB1に対応する第1学習済モデルが100回の学習処理により完成したことになり、完成した第1学習済モデルは学習済モデル格納部51に格納される。
次に、ステップS5における学習部41の学習処理について説明する。図4は、学習部41の学習処理を示すフローチャートである。
(ステップS11)
本ステップでは、学習部41は、ステップS1において記録部21から読み出したそれぞれの第1画像データ及びそれぞれの第2画像データに順番iを割り振る。上記したように、第1画像データの数及び第2画像データの数がそれぞれ14000個であるため、順番iは1から14000となる。順番が割り振られると、処理はステップS12に進む。
本ステップでは、学習部41は、ステップS1において記録部21から読み出したそれぞれの第1画像データ及びそれぞれの第2画像データに順番iを割り振る。上記したように、第1画像データの数及び第2画像データの数がそれぞれ14000個であるため、順番iは1から14000となる。順番が割り振られると、処理はステップS12に進む。
(ステップS12)
本ステップでは、学習部41は、これから学習処理を行う第1画像データ及び第2画像データの順番iをチェックする。順番iが上記した14000未満であれば、処理はステップS13に進む。順番iが14000未満でなければ、全ての第1画像データ及び全ての第2画像データにステップS2において設定された比重λA1,λB1で学習処理が行われたとして、処理はステップS6に進む。
本ステップでは、学習部41は、これから学習処理を行う第1画像データ及び第2画像データの順番iをチェックする。順番iが上記した14000未満であれば、処理はステップS13に進む。順番iが14000未満でなければ、全ての第1画像データ及び全ての第2画像データにステップS2において設定された比重λA1,λB1で学習処理が行われたとして、処理はステップS6に進む。
(ステップS13)
本ステップでは、学習部41はi番目の第1画像データ及び第2画像データを取得し、処理はステップS14に進む。なお、学習処理が開始されて処理が一度目のステップS13に移行した場合、iは1とされる。
本ステップでは、学習部41はi番目の第1画像データ及び第2画像データを取得し、処理はステップS14に進む。なお、学習処理が開始されて処理が一度目のステップS13に移行した場合、iは1とされる。
(ステップS14)
本ステップでは、学習部41はi番目の第1画像データ及びi番目の第2画像データに対して式(1)で示される損失関数を用いる計算を行い、処理はステップS15に進む。
本ステップでは、学習部41はi番目の第1画像データ及びi番目の第2画像データに対して式(1)で示される損失関数を用いる計算を行い、処理はステップS15に進む。
(ステップS15)
本ステップでは、学習部41において学習を行い、処理はステップS16に進む。
本ステップでは、学習部41において学習を行い、処理はステップS16に進む。
(ステップS16)
本ステップでは、学習部41は現在の順番iを1つ加算し、処理はステップS12に戻る。
本ステップでは、学習部41は現在の順番iを1つ加算し、処理はステップS12に戻る。
図3及び図4に示す処理では、比重λA,λBが比重λA1,λB1と設定された状態で、1番目から14000番目それぞれにおける第1画像データ及び第2画像データに対して式(1)で示される損失関数を用いる計算である学習処理が100回行われる。学習処理が100回行われると、比重λA1,λB1に対応する第1学習済モデルが完成する。
第1学習済モデルが完成した後に、比重λA,λBがステップS2において比重λA2,λB2に設定されると、第1学習済モデルの生成と同様に、比重λA2,λB2に対応する第2学習済モデルが100回の学習処理により生成される。また、比重λA,λBが比重λA3,λB3に設定されると、第1学習済モデルの生成と同様に、比重λA3,λB3に対応する第3学習済モデルが100回の学習処理により生成される。従って、学習済モデルはステップS2において設定された比重λA,λBの値毎に生成され、生成されたそれぞれの学習済モデルは学習済モデル格納部51に格納される。それぞれの学習済モデルが学習済モデル格納部51に格納されると、学習済モデル生成ステップにおける処理は終了する。
次に、図5を参照して、画像生成ステップについて説明する。図5は、画像生成ステップを示すフローチャートである。画像生成ステップは、学習済モデル生成ステップによって、複数の学習済モデルが構築された後に行われる。
(ステップS21)
本ステップでは、テスト用画像データがテスト用画像データ入力部53によって記録部21から画像データ生成部47に入力される。また、学習済モデル選択部55によって選択された学習済モデルが学習済モデル格納部51から画像データ生成部47に入力される。ここでは、テスト用画像データは、第1画像データのような猫の目を示す画像データとしており、第1画像データと同じカテゴリーに区分されるデータである。また、訓練用画像データは、第2画像データとしている。
本ステップでは、テスト用画像データがテスト用画像データ入力部53によって記録部21から画像データ生成部47に入力される。また、学習済モデル選択部55によって選択された学習済モデルが学習済モデル格納部51から画像データ生成部47に入力される。ここでは、テスト用画像データは、第1画像データのような猫の目を示す画像データとしており、第1画像データと同じカテゴリーに区分されるデータである。また、訓練用画像データは、第2画像データとしている。
(ステップS22)
本ステップでは、画像データ生成部47は、画像データ生成部47に入力された学習済モデルをチェックする。入力された学習済モデルが第1学習済モデルである場合、処理はステップS23に移行する。入力された学習済モデルが第2学習済モデルである場合、処理はステップS24に移行する。入力された学習済モデルが第3学習済モデルである場合、処理はステップS25に移行する。
本ステップでは、画像データ生成部47は、画像データ生成部47に入力された学習済モデルをチェックする。入力された学習済モデルが第1学習済モデルである場合、処理はステップS23に移行する。入力された学習済モデルが第2学習済モデルである場合、処理はステップS24に移行する。入力された学習済モデルが第3学習済モデルである場合、処理はステップS25に移行する。
(ステップS23)
本ステップでは、画像データ生成部47は、第1学習済モデルを用いてテスト用画像データから新たな画像データを生成する。ここで、第1学習済モデルでは、比重λA1が比重λB1よりも大きくされている。従って、テスト用画像データの変換度合いが大きくなり、新たな画像データは、第2ドメインよりも第1ドメインに近似し、テスト用画像データから予想が容易ではない新たなデザイン性を備える画像データとなる。本ステップにおいて生成される新たな画像データは、猫の目に最も近似した車両用前照灯を示す画像データとなる。そして、新たな画像データは画像出力部57に入力され、処理はステップS26に移行する。
本ステップでは、画像データ生成部47は、第1学習済モデルを用いてテスト用画像データから新たな画像データを生成する。ここで、第1学習済モデルでは、比重λA1が比重λB1よりも大きくされている。従って、テスト用画像データの変換度合いが大きくなり、新たな画像データは、第2ドメインよりも第1ドメインに近似し、テスト用画像データから予想が容易ではない新たなデザイン性を備える画像データとなる。本ステップにおいて生成される新たな画像データは、猫の目に最も近似した車両用前照灯を示す画像データとなる。そして、新たな画像データは画像出力部57に入力され、処理はステップS26に移行する。
(ステップS24)
本ステップでは、画像データ生成部47は、第2学習済モデルを用いてテスト用画像データから新たな画像データを生成する。第2学習済モデルでは、比重λA2が比重λB2と同じであるため、新たな画像データは、猫の目と車両用前照灯との中間の画像データとなる。そして、新たな画像データは画像出力部57に入力され、処理はステップS26に移行する。
本ステップでは、画像データ生成部47は、第2学習済モデルを用いてテスト用画像データから新たな画像データを生成する。第2学習済モデルでは、比重λA2が比重λB2と同じであるため、新たな画像データは、猫の目と車両用前照灯との中間の画像データとなる。そして、新たな画像データは画像出力部57に入力され、処理はステップS26に移行する。
(ステップS25)
本ステップでは、画像データ生成部47は、第3学習済モデルを用いてテスト用画像データから新たな画像データを生成する。ここで、第3学習済モデルでは、比重λA3が比重λB3よりも小さくされている。従って、テスト用画像データの変換度合いがより大きくなり、新たな画像データは、第1ドメインよりも第2ドメインに近似し、テスト用画像データから予想が困難な新たなデザイン性を備える画像データとなる。本ステップにおいて生成される新たな画像データは、猫の目に近似した車両用前照灯を示す画像データとなる。そして、新たな画像データは画像出力部57に入力され、処理はステップS26に移行する。
本ステップでは、画像データ生成部47は、第3学習済モデルを用いてテスト用画像データから新たな画像データを生成する。ここで、第3学習済モデルでは、比重λA3が比重λB3よりも小さくされている。従って、テスト用画像データの変換度合いがより大きくなり、新たな画像データは、第1ドメインよりも第2ドメインに近似し、テスト用画像データから予想が困難な新たなデザイン性を備える画像データとなる。本ステップにおいて生成される新たな画像データは、猫の目に近似した車両用前照灯を示す画像データとなる。そして、新たな画像データは画像出力部57に入力され、処理はステップS26に移行する。
(ステップS26)
本ステップでは、画像出力部57は新たな画像データを画像として出力し、画像生成ステップにおける処理は終了する。
本ステップでは、画像出力部57は新たな画像データを画像として出力し、画像生成ステップにおける処理は終了する。
以上のように、本実施形態の画像生成装置10は、複数の第1画像データ及び複数の第2画像データを記録する記録部21と、第1画像データの第1ドメインの第1比重及び第2画像データの第2ドメインの第2比重をそれぞれ設定する設定部43とを備える。画像生成装置10は、複数の第1画像データ及び複数の第2画像データから第1比重及び第2比重に対応する学習済モデルを第1比重及び第2比重の値毎に生成する学習部41と、複数の学習済モデルを格納する学習済モデル格納部51と、学習済モデル格納部51に格納される複数の学習済モデルから1つの学習済モデルを選択する学習済モデル選択部55とをさらに備える。また、画像生成装置10は、テスト用画像データを入力するテスト用画像データ入力部53と、学習済モデル選択部55によって選択される学習済モデルを用いてテスト用画像データ入力部53から入力されるテスト用画像データから新たな画像データを生成する画像データ生成部47とをさらに備える。
本実施形態の画像生成装置10では、予想の困難性を示す比重λA及び比重λBの値は設定可能であり、比重λA及び比重λBの値毎に対応する学習済モデルが生成され、複数の学習済モデルのなかから1つの学習済モデルを用いてテスト用画像データから新たな画像データを生成する。新たな画像データの生成時において、比重λA及び比重λBの値に対応する学習済モデルに応じてテスト用画像データの変換度合いが変化する。変換度合いが変化すると、新たな画像データは、訓練用画像データである第1画像データ及び第2画像データから予想が困難な画像データとなり得、新たなデザイン性を備えることになり得る。従って、本実施形態の画像生成装置10は、予想の困難性を設定したうえで、複数の第1,2画像データから予想が容易ではない新たなデザイン性を備える新たな画像データを生成し得る。
また、本実施形態の画像生成装置10では、設定部43は複数の比重λA及び複数の比重λBを設定し、学習部41は複数の比重λA及び複数の比重λBに対応する複数の学習済モデルを生成する。また、本実施形態の画像生成装置10では、画像データ生成部47は、複数の学習済モデルのなかから1つの学習済モデルを用いて新たな画像データを生成する。複数の学習済モデルが生成されることによって、1つの学習済モデルのみが生成される場合に比べて、様々な種類の新たな画像データが生成され得る。
以上、本発明について、上記実施形態を例に説明したが、本発明はこれらに限定されるものではない。
画像データ生成部47は、学習部41において学習した生成部45であってもよい。または、学習部41は、学習処理において学習した生成部45を画像データ生成部47に提供してもよい。
ステップS3において設定される学習回数は、構築されるそれぞれの学習済モデル毎に設定されてもよい。従って、例えば、第1学習済モデルの構築における学習回数は、他の学習済モデルの構築における学習回数と同じであってもよいし、他の学習済モデルの構築よりも多くても少なくてもよい。学習回数が多いほど、学習回数が多い学習済モデルが用いられる場合に、複数の第1,2画像データから予想が容易ではない新たなデザイン性を備える新たな画像データが生成され易くなり得る。また、学習回数が少ないほど、学習済モデルは早く生成され得る。また、学習部41は、3つの学習済モデルを生成しているが、これに限定する必要はなく、少なくとも1つの学習済モデルを生成すればよい。
学習部41は、Cycle GAN方式に従って学習済モデルを生成するが、これに限定される必要はない。
設定部43は、比重入力部27から入力された比重を比重λA,λBとして設定しているが、これに限定される必要はない。例えば、設定部43は、制御部40のメモリに予め設定される比重を比重λA,λBとして設定してもよい。また、設定部43は、学習回数入力部29から入力された値を学習回数として設定しているが、これに限定される必要はない。例えば、設定部43は、制御部40のメモリに予め設定される値を学習回数として設定してもよい。
それぞれの第1画像データは、猫の目を示す画像データとして説明しているが、これに限定される必要はなく、他の動物の目などを示す画像データであってもよい。
本発明によれば、予想の困難性を設定したうえで、複数の画像データから予想が容易ではない新たなデザイン性を備える画像データを生成することができる画像生成装置が提供され、当該画像生成装置は画像生成の分野等において利用可能である。
Claims (4)
- 複数の第1画像データ及び複数の第2画像データを記録する記録部と、
前記第1画像データの第1ドメインの第1比重及び前記第2画像データの第2ドメインの第2比重をそれぞれ設定する設定部と、
前記複数の第1画像データ及び前記複数の第2画像データから前記第1比重及び前記第2比重に対応する学習済モデルを前記第1比重及び前記第2比重の値毎に生成する学習部と、
複数の前記学習済モデルを格納する学習済モデル格納部と、
前記学習済モデル格納部に格納される前記複数の学習済モデルから1つの学習済モデルを選択する学習済モデル選択部と、
テスト用画像データを入力するテスト用画像データ入力部と、
前記学習済モデル選択部によって選択される前記学習済モデルを用いて前記テスト用画像データ入力部から入力される前記テスト用画像データから新たな画像データを生成する画像データ生成部と、
を備えることを特徴とする画像生成装置。 - 前記学習部は、Cycle GAN方式に従って前記学習済モデルを生成する
ことを特徴とする請求項1に記載の画像生成装置。 - 前記学習部は、前記Cycle GAN方式において用いられる計算をそれぞれの前記学習済モデルに設定される学習回数行いそれぞれの前記学習済モデルを生成する
ことを特徴とする請求項2に記載の画像生成装置。 - 前記新たな画像データを出力する出力部をさらに備える
ことを特徴とする請求項1から3のいずれか1項に記載の画像生成装置。
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2021561466A JPWO2021106961A1 (ja) | 2019-11-27 | 2020-11-25 |
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2019-214201 | 2019-11-27 | ||
| JP2019214201 | 2019-11-27 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2021106961A1 true WO2021106961A1 (ja) | 2021-06-03 |
Family
ID=76129498
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/JP2020/043904 Ceased WO2021106961A1 (ja) | 2019-11-27 | 2020-11-25 | 画像生成装置 |
Country Status (2)
| Country | Link |
|---|---|
| JP (1) | JPWO2021106961A1 (ja) |
| WO (1) | WO2021106961A1 (ja) |
Citations (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2019093126A (ja) * | 2017-11-24 | 2019-06-20 | キヤノンメディカルシステムズ株式会社 | 医用データ処理装置、磁気共鳴イメージング装置及び学習済みモデル生成方法 |
-
2020
- 2020-11-25 WO PCT/JP2020/043904 patent/WO2021106961A1/ja not_active Ceased
- 2020-11-25 JP JP2021561466A patent/JPWO2021106961A1/ja active Pending
Patent Citations (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2019093126A (ja) * | 2017-11-24 | 2019-06-20 | キヤノンメディカルシステムズ株式会社 | 医用データ処理装置、磁気共鳴イメージング装置及び学習済みモデル生成方法 |
Non-Patent Citations (1)
| Title |
|---|
| SUGIURA, AKIHIKO,: "A simple test of pediatric depression using facial expressions cognition", vol. 20, no. 6, June 2009 (2009-06-01), pages 8 - 31 * |
Also Published As
| Publication number | Publication date |
|---|---|
| JPWO2021106961A1 (ja) | 2021-06-03 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN114339409B (zh) | 视频处理方法、装置、计算机设备及存储介质 | |
| US20220215267A1 (en) | Processes and methods for enabling artificial general intelligence capable of flexible calculation, prediction, planning and problem solving with arbitrary and unstructured data inputs and outputs | |
| KR20240083896A (ko) | 시계열 데이터 생성 방법 및 그 시스템 | |
| Ding et al. | Enhance image-to-image generation with llava-generated prompts | |
| CN116912629A (zh) | 基于多任务学习的通用图像文字描述生成方法及相关装置 | |
| JP2021184217A (ja) | モデル生成プログラム、モデル生成装置、及びモデル生成方法 | |
| JP6622369B1 (ja) | 訓練データを生成する方法、コンピュータおよびプログラム | |
| WO2020202244A1 (ja) | モデル生成装置、モデル調整装置、モデル生成方法、モデル調整方法、及び、記録媒体 | |
| CN119128152A (zh) | 数据处理方法及装置、模型优化方法及装置 | |
| CN116842153A (zh) | 一种基于反馈特征学习的多模态情感分析方法、系统 | |
| JP2020087310A (ja) | 学習方法、学習装置、プログラムおよび記録媒体 | |
| US11568303B2 (en) | Electronic apparatus and control method thereof | |
| WO2021111596A1 (ja) | 情報学習システム、情報学習方法、情報学習用プログラム、及び情報学習装置 | |
| CN119295840B (zh) | 一种扩散模型融合方法、装置及电子设备 | |
| WO2021106961A1 (ja) | 画像生成装置 | |
| KR102813612B1 (ko) | 신경망 구조 설계를 위한 프루닝 방법 및 이를 위한 컴퓨팅 장치 | |
| JPWO2020110272A1 (ja) | 機械学習装置、機械学習方法、及びプログラム | |
| CN114443954A (zh) | 基于高阶图结构的一对多跨域推荐方法及系统 | |
| JP4773680B2 (ja) | 情報処理装置および方法、プログラム記録媒体、並びにプログラム | |
| WO2021220343A1 (ja) | データ生成装置、データ生成方法、学習装置及び記録媒体 | |
| US7324980B2 (en) | Information processing apparatus and method | |
| Abdylgahni et al. | An improved image generation conditioned on text using stable diffusion model | |
| JP7438544B2 (ja) | ニューラルネットワーク処理装置、コンピュータプログラム、ニューラルネットワーク製造方法、ニューラルネットワークデータの製造方法、ニューラルネットワーク利用装置、及びニューラルネットワーク小規模化方法 | |
| JPWO2018066083A1 (ja) | 学習プログラム、情報処理装置および学習方法 | |
| CN113096206A (zh) | 基于注意力机制网络的人脸生成方法、装置、设备及介质 |
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: 20892675 Country of ref document: EP Kind code of ref document: A1 |
|
| ENP | Entry into the national phase |
Ref document number: 2021561466 Country of ref document: JP Kind code of ref document: A |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 20892675 Country of ref document: EP Kind code of ref document: A1 |

