WO2022003773A1 - 学習装置、生成装置、学習方法、生成方法、及びプログラム - Google Patents

学習装置、生成装置、学習方法、生成方法、及びプログラム Download PDF

Info

Publication number
WO2022003773A1
WO2022003773A1 PCT/JP2020/025510 JP2020025510W WO2022003773A1 WO 2022003773 A1 WO2022003773 A1 WO 2022003773A1 JP 2020025510 W JP2020025510 W JP 2020025510W WO 2022003773 A1 WO2022003773 A1 WO 2022003773A1
Authority
WO
WIPO (PCT)
Prior art keywords
layout
loss
generation
input
model
Prior art date
Application number
PCT/JP2020/025510
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 日本電信電話株式会社
Priority to JP2022533275A priority Critical patent/JP7396492B2/ja
Priority to PCT/JP2020/025510 priority patent/WO2022003773A1/ja
Publication of WO2022003773A1 publication Critical patent/WO2022003773A1/ja

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N20/00Machine learning

Definitions

  • the disclosed technology relates to a learning device, a generation device, a learning method, a generation method, and a program.
  • Non-Patent Document 1 repeatedly predicts a word to be placed next and an appropriate placement location of an object corresponding to the word from the current layout state by inputting a sentence, and finally. Generates a layout that corresponds to the entered sentence. After that, the illustration of each object is combined with the generated layout to generate an illustration image that visualizes the document.
  • Non-Patent Document 2 takes a sentence as an input and finally generates an image through a three-step process of a bounding box generation module, an object shape generation module, and an image generation module.
  • the bounding box generation module generates layout information which is an object and a positional relationship between the objects.
  • the object shape generation module generates the shape of each object.
  • the image generation module generates the entire image from the output of the object shape module so that it looks like a real image.
  • These techniques first generate a layout showing the positional relationship of multiple objects, synthesize an illustration with the generated layout, or other methods in order to visualize a document that describes a scene in which multiple objects are related to each other.
  • I prepare a neural network and generate an image.
  • Non-Patent Document 1 does not include a scene in which three or more people are present at the same time. At this time, if a sentence explaining a scene in which three or more people exist is input, a scene in which only two people exist is generated. As described above, there is a problem regarding the correspondence between the input sentence and the learning data.
  • the disclosed technique is made in view of the above points, and is provided with a learning device, a generation device, a learning method, a generation method, and a program for generating an appropriate layout according to a real scene.
  • the purpose is made in view of the above points, and is provided with a learning device, a generation device, a learning method, a generation method, and a program for generating an appropriate layout according to a real scene. The purpose.
  • the first aspect of the present disclosure is a learning device, which is an input image, an input layout showing a positional relationship between an object in the input image and the object, an input sentence relating to drawing of the input image, and a type of data set.
  • a reception unit that accepts training data including data types indicating And various models including a target identification model that outputs the probability that the image corresponds to the predetermined target data by inputting the image, a storage unit that stores the parameters of the various models, and the learning received by the reception unit.
  • the input statement of the data is input to the layout generation model, the generation unit that generates the generation layout by the output of the layout generation model, the data type received from the reception unit, and the generation generated by the generation unit.
  • the loss calculation unit that accepts the layout, the relationship-based identification model, and the target identification model, calculates the loss indicating a predetermined error according to the domain, and outputs the calculation result, and the loss received from the loss calculation unit.
  • a parameter update unit for updating at least the parameters of the layout generation model among the various models based on the calculation result of the above is included.
  • the second aspect of the present disclosure is a generation device, which is a layout generation model pre-learned using a reception unit that accepts an input sentence and a loss indicating a predetermined error according to a domain, and uses the sentence as an input.
  • the input statement is input to the layout generation model that generates the generation layout including the class and attributes of the object, the generation layout is generated as the output of the layout generation model, and the generation image is generated by inputting the layout and the predetermined data set.
  • a generation unit for inputting the generation layout into the synthesizer and generating a generated image as an output of the synthesizer is included.
  • a third aspect of the present disclosure is a learning method, in which an input image, an input layout showing a positional relationship between an object in the input image and the object, an input sentence relating to drawing of the input image, and a type of data set.
  • a layout generation model that accepts training data including data types and generates a generative layout that includes object classes and attributes by inputting sentences, a relationship-based identification model that extracts layout features by inputting layout, and an image.
  • various models including a target identification model that outputs the probability that the image corresponds to the predetermined target data as input, the input sentence of the received training data is used as an input to the layout generation model.
  • a generation layout is generated by the output of the layout generation model, the received data type, the generated generation layout, the relationship-based identification model, and the target identification model are accepted, and a predetermined error according to the domain is shown.
  • the feature is that the computer executes a process including calculating the loss, outputting the calculation result, and updating at least the parameters of the layout generation model among the various models based on the received loss calculation result. And.
  • a fourth aspect of the present disclosure is a generation method, which is a layout generation model that accepts an input sentence and is pre-learned using a loss indicating a predetermined error according to a domain, and is a class of objects using the sentence as an input.
  • a synthesizer that inputs the input statement to the layout generation model that generates the generation layout including the attributes, generates the generation layout as the output of the layout generation model, and generates the generated image by inputting the layout and the predetermined data set. It is characterized in that a computer executes a process including inputting the generated layout and generating a generated image as an output of the synthesizer.
  • the technique of the present disclosure proposes a technique for generating a scene that is a realistic layout and does not exist in the target data set, that is, the illustration data set, as shown in the above problem.
  • the content to be learned is distinguished between the illustration data (target domain) and the actual image data (source domain), and a method of diverting the necessary knowledge in each is examined.
  • the layout information of other real image data sets the knowledge of possible scenes is supplemented, and accurate and natural illustration layouts and illustration images are generated even for scenes that do not exist in the illustration data set. .. In this way, appropriate scene generation was made possible by learning and generation that diverted layout knowledge so as to fill the gap between domains.
  • FIG. 1 is a conceptual diagram showing the relationship between various models and the like used in the method of the present disclosure and various calculated losses.
  • various models are used, and the parameters of a predetermined model among various models are updated by using the calculation results of various losses.
  • the various models are a layout generation model, a relationship-based discriminative model, and a target discriminative model.
  • the various losses are relationship-based loss, object loss, and domain hostile loss. Details of various models and various losses will be described later.
  • FIG. 2 is a block diagram showing the hardware configuration of the learning device 100.
  • the learning device 100 includes a CPU (Central Processing Unit) 11, a ROM (Read Only Memory) 12, a RAM (Random Access Memory) 13, a storage 14, an input unit 15, a display unit 16, and a communication interface ( It has I / F) 17.
  • the configurations are connected to each other via the bus 19 so as to be communicable with each other.
  • the CPU 11 is a central arithmetic processing unit that executes various programs and controls each part. That is, the CPU 11 reads the program from the ROM 12 or the storage 14, and executes the program using the RAM 13 as a work area. The CPU 11 controls each of the above configurations and performs various arithmetic processes according to the program stored in the ROM 12 or the storage 14. In the present embodiment, the learning program is stored in the ROM 12 or the storage 14.
  • the ROM 12 stores various programs and various data.
  • the RAM 13 temporarily stores a program or data as a work area.
  • the storage 14 is composed of a storage device such as an HDD (Hard Disk Drive) or an SSD (Solid State Drive), and stores various programs including an operating system and various data.
  • the input unit 15 includes a pointing device such as a mouse and a keyboard, and is used for performing various inputs.
  • the display unit 16 is, for example, a liquid crystal display and displays various information.
  • the display unit 16 may adopt a touch panel method and function as an input unit 15.
  • the communication interface 17 is an interface for communicating with other devices such as terminals.
  • a wired communication standard such as Ethernet (registered trademark) or FDDI
  • a wireless communication standard such as 4G, 5G, or Wi-Fi (registered trademark) is used.
  • FIG. 3 is a block diagram showing the configuration of the learning device of the present embodiment.
  • Each functional configuration is realized by the CPU 11 reading the learning program stored in the ROM 12 or the storage 14, deploying it in the RAM 13, and executing it.
  • the learning device 100 includes a reception unit 110, a storage unit 112, a generation unit 114, a loss calculation unit 116, and a parameter update unit 118.
  • the reception unit 110 receives learning data.
  • the training data includes one or more sets of an input image y for learning, an input layout s for learning, an input sentence x for learning regarding drawing of the input image, and a data type d for learning indicating the type of the data set. It is the data to be included.
  • the input image y is a scene described by the input sentence.
  • the input layout s indicates each object in the input image, the type of each object, the attribute of each object, and the positional relationship of each object.
  • the data set is either the target data of the target domain or the source data of the source domain, and is accepted together with the data type d.
  • the input sentence x is a matrix having a size of V ⁇ N
  • V is the length of each word in the sentence and the associated vector
  • N is the number of words in the sentence.
  • any vector may be used as long as it is a vector that uniquely defines each word.
  • the input image y is a tensor having a size of width ⁇ height ⁇ number of channels.
  • the width of the input image x for learning is W
  • the height is H
  • the number of channels is D.
  • the coordinates in front of the upper left corner of the tensor are set to (0, 0, 0)
  • the coordinates corresponding to the dth channel are set in the back from the front leftmost corner to the right w and down h, and in the back are the coordinates corresponding to the dth channel (w, h, d).
  • the width dimension is described as dimension 1
  • the vertical width dimension is described as dimension 2
  • the channel number dimension is described as dimension 3 for each tensor. That is, the size of the dimension 1 of the input image x for learning is W, the size of the dimension 2 is H, and the size of the dimension 3 is D.
  • the input layout s is a tensor showing the class of each object existing in the input image x and the attributes of each object.
  • the horizontal width is W / gw and the vertical width is H / gh
  • the number of channels is the number of classes.
  • the number of attribute items may be any word indicating a predefined type of object.
  • examples of the term indicating the type of an object include person, sports ball, and the like.
  • the attribute of the object includes information on the size of the object, and in addition, any information indicating the state of the object may be used.
  • the number of attribute items A is the sum of the number of types of information regarding the size of the object and the information indicating the state of the object.
  • the information regarding the size of the object may be any numerical value indicating the size of the object.
  • the numerical value indicating the size of the object for example, the ratio of the horizontal and vertical lengths of the object size to the horizontal and vertical lengths of the image can be mentioned.
  • any numerical value or word indicating the state of the object may be used. Examples of the word indicating the state of the object include words indicating the color of the object such as red and blue.
  • Examples of the numerical value indicating the state of the object include a numerical value indicating the direction of the object.
  • 0 is shown when the orientation is in the initial state stored in the data set
  • 1 mag is shown when the orientation is reversed left and right.
  • any numerical value or symbol that can determine whether the input data is the target data or the source data may be used.
  • the data type d is a numerical value, for example, it is 0 for target data and 1 for source data.
  • the reception unit 110 outputs to the generation unit 114 and the loss calculation unit 116 a set of one or more learning data of the input sentence x, the input image y, the input layout s, and the data type d described above. Further, in the processing after the reception unit 110, the processing differs depending on the data type d, so the data type d is determined.
  • the storage unit 112 stores layout generation models, relationship-based discrimination models, various models including target discrimination models, and parameters of these various models as various models.
  • the layout generation model is a model that generates a generation layout including an object class and attributes by using an input sentence x as an input. For example, if the content of the input sentence is, for example, "three people are sitting on a forest bench", the layout generation model generates a layout corresponding to each of the three people and the bench.
  • the relationship-based discriminative model is a model that extracts the features of the layout by inputting the layout.
  • the target discriminative model is a model that inputs an image and outputs the probability that it is an image of natural target data, that is, the probability that it looks like target data.
  • the storage unit 112 stores a synthesizer with a target data set.
  • a synthesizer is a synthesizer pre-learned to generate a generated image with a layout as input.
  • the target dataset contains illustrations and images that synthesize the illustrations.
  • the generated image is an image obtained by synthesizing the data of the target data set corresponding to the layout, that is, the illustration data, based on the layout. For example, if layouts corresponding to three people are input, each of the illustration data showing the three people corresponding to the layout is combined with an image having the same size as the input image x. Further, as the image to be combined with the illustration, an appropriate image may be selected from the target data set as the object to be combined from the contents such as the class of the object in the layout.
  • the layout generation model, the relationship-based discrimination model, and the target discrimination model are each neural networks, and the storage unit 112 stores the parameters of each neural network.
  • the layout generation model may use any neural network that takes the input sentence x as an input and generates the generated layouts s'.
  • the relationship-based discriminative model may be any neural network that extracts features that represent the positional relationships of the objects in the layout. Any target identification model may be used as long as it is a neural network that discriminates between the input image y and the generated image y'.
  • the generation unit 114 receives the input sentence x, the input image y, the input layout s, and the data type d from the reception unit 110. Further, the generation unit 114 acquires the layout generation model and the parameters of the layout generation model from the storage unit 112. Then, the generation unit 114 uses the input sentence x as an input to the layout generation model, and generates the generation layout s'by the output of the layout generation model.
  • the processing of the generation unit 114 differs depending on the data type d.
  • the generation unit 114 When the data type d is the target data, the generation unit 114 further accepts the synthesizer from the storage unit 112, inputs the generation layout s'and the data set of the target data corresponding to the data type d to the synthesizer, and inputs the data set of the target data corresponding to the data type d to the synthesizer. Generate a generated image y'as an output. As described above, the output of the generation unit 114 is the generation layout s'(when the data type d is the target data, the generation image y').
  • the generation unit 114 acquires the layout generation model and the parameters of the layout generation model from the storage unit 112.
  • the generation unit 114 inputs the input sentence x into the layout generation model to generate the generation layout s'.
  • the generated layout s'and the target data set are input to the synthesizer to generate the generated image y'.
  • the synthesizer selects an illustration corresponding to the object class indicated by the generated layout s'from the target data set, scales and converts it according to the attribute information of the object class, and has the same size as the input image s. It is combined with an image to generate a generated image y'.
  • the loss calculation unit 116 receives the determination result of the data type d from the reception unit 110, and receives the generation layout s'and the generation image y'from the generation unit 114.
  • the processing of the loss calculation unit 116 differs depending on the data type d.
  • the data type d is the target data
  • the relationship-based identification model and the target identification model are acquired from the storage unit 112.
  • the data type d is source data
  • the relationship-based discriminative model is acquired from the storage unit 112.
  • the loss calculation unit 116 calculates two or three types of losses according to the data type d, and outputs the loss calculation result.
  • Types of losses include relationship-based losses, object losses, and domain hostile losses.
  • any index may be used as long as it is an index indicating how similar the generated layout s'is to the positional relationship between the objects in the input layout s.
  • the input layout s and the generated layout s' are input to the relation-based discriminative model, and the squared error of the output value is used.
  • the output values of the relation-based discriminative model are the input relation feature r and the generation relation feature r', respectively.
  • the parameters of the layout generation model are updated so that the value of this square error is reduced.
  • this loss is referred to as a relational base loss.
  • the relationship-based loss is a loss indicating an index regarding the positional relationship between objects in the generation layout and the input layout of the present disclosure.
  • the second loss may be any index as long as the generated layout s'is an index for determining how accurately the object in the input layout s is held. For example, when the number of objects in the input layout s is 5, and the generated layout s'has 4 out of 5, the error rate is 0.2. Update the parameters of the layout generation model to make this smaller.
  • this loss is referred to as an object loss.
  • the object loss is a loss indicating an index relating to the object itself in the generation layout and the input layout of the present disclosure.
  • An object checker for checking the error rate may be stored in the storage unit 112, and the object checker may be used.
  • the third loss may be any index as long as the input image y is an image of real target data and the generated image y'is an image of fake target data. For example, it is an output value when a certain image is input to the target discriminative model.
  • the parameters of the target discriminative model are updated so that the output value is small, and at the same time, the parameters of the layout generation model are updated so that the output value is large.
  • this loss is referred to as a domain hostile loss.
  • the domain hostile loss is a loss indicating an index regarding the distinctiveness of the authenticity determination of the generated image and the input image.
  • the loss calculation unit 116 calculates the above three types of losses when the data type d is the target data. Further, when the data type d is the source data, the loss calculation unit 116 calculates two types of losses, a relational base loss and an object loss.
  • the parameter update unit 118 receives various losses from the loss calculation unit 116.
  • the processing of the parameter update unit 118 differs depending on the data type d.
  • the data type d is the target data
  • the layout generation model and the target identification model are acquired from the storage unit 112.
  • the layout generation model is acquired from the storage unit 112.
  • the parameter update unit 118 updates the parameters of the layout generation model by using the relationship base loss, the object loss, and the domain hostile loss. It also updates the parameters of the target discriminative model using domain hostile loss.
  • the parameter update unit 118 updates the parameters of the layout generation model by using the relationship base loss and the object loss.
  • any method can be used to update the parameters of the layout generation model so that the relationship base loss and object loss are small, and when the domain hostile loss is received, the domain hostile loss is large. good.
  • the parameters are updated so that the total loss is small, with the linear sum of the relationship base loss, the object loss, and the domain hostile loss and the negative value having the same absolute value as the total loss.
  • the parameters are similarly updated so that the total loss becomes smaller as the total loss for the relational base loss and the object loss.
  • any method may be used as long as the domain hostile loss is updated to be small.
  • the parameters updated as described above are stored in the storage unit 112.
  • FIG. 4 is a flowchart showing the flow of learning processing by the learning device 100.
  • the learning process is performed by the CPU 11 reading the learning program from the ROM 12 or the storage 14, expanding the learning program into the RAM 13, and executing the program.
  • the learning device 100 receives the learning data as an input and performs the following processing.
  • the CPU 11 functions as each part of the learning device 100.
  • step S100 the CPU 11 receives the learning data as the reception unit 110.
  • the training data are an input sentence x, an input image y, an input layout s, and a data type d.
  • step S102 the CPU 11 determines whether the data type d is the target data or the source data as the reception unit 110. The branch due to the determination proceeds to step S104 if it is target data and to step S118 if it is source data, depending on the determination result of the data type d.
  • the determination result for the data type d is output to each unit, and each unit performs appropriate processing according to the determination result.
  • step S104 the CPU 11 acquires the layout generation model, the parameters of the layout generation model, and the synthesizer from the storage unit 112 as the generation unit 114.
  • step S106 the CPU 11 generates the generation layout s'by the output of the layout generation model as the input statement x as the input to the layout generation model as the generation unit 114.
  • step S108 the CPU 11 inputs the generation layout s'and the data set of the target data corresponding to the data type d to the synthesizer as the generation unit 114, and generates the generated image y'as the output of the synthesizer.
  • step S110 the CPU 11 acquires the relationship-based discrimination model and the target discrimination model from the storage unit 112 as the loss calculation unit 116.
  • step S112 the CPU 11 calculates the relationship base loss, the object loss, and the domain hostile loss as the loss calculation unit 116.
  • the relational base loss is calculated by inputting the generated layout s'and the input layouts s into the relational base discriminative model and obtaining the square error of the output value.
  • the object loss is calculated by obtaining the error rate from the number of objects in the input layout s and the number of objects in the generated layout s'.
  • the domain hostile loss is calculated by obtaining the output value when the generated image y'is input to the target discriminative model.
  • step S114 the CPU 11 acquires the layout generation model and the target identification model from the storage unit 112 as the parameter update unit 118.
  • step S116 the CPU 11 updates the parameters of the layout generation model by using the relationship base loss, the object loss, and the domain hostile loss as the parameter update unit 118. It also updates the parameters of the target discriminative model using domain hostile loss.
  • the updated parameters are stored in the storage unit 112.
  • steps S118 and subsequent steps are processing when the determination result of the data type d is source data.
  • step S118 the CPU 11 acquires the layout generation model and the parameters of the layout generation model from the storage unit 112 as the generation unit 114.
  • step S120 the CPU 11 generates the generation layout s'by the output of the layout generation model as the input statement x as the input to the layout generation model as the generation unit 114.
  • step S122 the CPU 11 acquires the relationship-based discriminative model from the storage unit 112 as the loss calculation unit 116.
  • step S124 the CPU 11 calculates the relational base loss and the object loss as the loss calculation unit 116.
  • step S126 the CPU 11 acquires a layout generation model from the storage unit 112 as the parameter update unit 118.
  • step S1208 the CPU 11 updates the parameters of the layout generation model by using the relationship base loss and the object loss as the parameter update unit 118.
  • the above is the learning processing routine.
  • the learning device 100 of the present embodiment it is possible to learn a model for generating an appropriate layout according to a real scene.
  • FIG. 5 is a block diagram showing the configuration of the generator of the present embodiment.
  • the generation device 200 includes a reception unit 210, a storage unit 212, a generation unit 214, and an output unit 216.
  • the generation device 200 can also be configured with the same hardware configuration as the learning device 100. As shown in FIG. 2, the generation device 200 includes a CPU 21, a ROM 22, a RAM 23, a storage 24, an input unit 25, a display unit 26, and a communication I / F 27. Each configuration is communicably connected to each other via a bus 29. The generation program is stored in the ROM 22 or the storage 24.
  • the reception unit 210 accepts only the input sentence x *.
  • the input sentence x * at the time of layout generation processing is specifically data in the same format as the input sentence x at the time of learning processing.
  • the storage unit 212 stores a layout generation model in which parameters are learned by the learning device 100, and a synthesizer.
  • the parameters are learned using various losses including the relationship-based loss, the object loss, and the domain hostile loss described above.
  • the generation unit 214 receives the input sentence x * from the reception unit 210, and acquires the layout generation model, the parameters of the layout generation model, and the synthesizer from the storage unit 212.
  • the generation unit 214 generates the generation layout s'and the generation image y'.
  • the generation method of the generation layout s'and the generation image y' is the same as that of the generation unit 114 of the learning device 100.
  • the output unit 216 receives and outputs the generated layout s'and the generated image y'from the generation unit 214.
  • FIG. 6 is a flowchart showing the flow of the generation process by the generation device 200.
  • the generation training process is performed by the CPU 21 reading the generation program from the ROM 22 or the storage 24, expanding it into the RAM 13, and executing the program.
  • the generation device 200 receives an input sentence as an input and performs the following processing.
  • the CPU 21 functions as each part of the generation device 200.
  • step S200 the CPU 21 receives the input sentence x * as the reception unit 210.
  • step S202 the CPU 21 acquires the layout generation model, the parameters of the layout generation model, and the synthesizer from the storage unit 212 as the generation unit 214.
  • step S204 the CPU 21 generates the generated layout s'by the output of the layout generation model as the input statement x * as the input to the layout generation model as the generation unit 214.
  • step S206 the CPU 21 inputs the generated layout s'and the data set of the target data to the synthesizer as the generation unit 214, and generates the generated image y'as the output of the synthesizer.
  • step S208 the CPU 21 outputs the generated layout s'and the generated image y'as the output unit 216.
  • the above is the generation processing routine.
  • the generation device 200 of the present embodiment it is possible to generate an appropriate layout according to the actual scene and output a generated image obtained by synthesizing the layout.
  • the learning device 100 by learning with the data type d as the source data, layout knowledge from another data set different from the target domain can be diverted.
  • Relational base loss is a global condition that captures the approximate spatial relationship between objects.
  • Object loss is a local condition that the presence or absence of an object must be satisfied.
  • the relationship base loss and the object loss are set as the common loss of the target domain and the source domain, and the domain hostile loss is set as the loss peculiar to the target domain. This made it possible to learn the points of correctly inferring the attributes of an object and the object, and the points of generating a natural illustration.
  • various processors other than the CPU may execute the learning process or the generation process executed by the CPU reading the software (program) in the above embodiment.
  • PLD Programmable Logic Device
  • FPGA Field-Programmable Gate Array
  • ASIC Application Specific Integrated Circuit
  • An example is a dedicated electric circuit or the like, which is a processor having a circuit configuration designed exclusively for the purpose.
  • the learning process or the generation process may be executed by one of these various processors, or a combination of two or more processors of the same type or different types (for example, a plurality of FPGAs, and a CPU and an FPGA). It may be executed by the combination of).
  • the hardware-like structure of these various processors is, more specifically, an electric circuit in which circuit elements such as semiconductor elements are combined.
  • the learning program or the generation program is stored (installed) in the storage 14 in advance has been described, but the present invention is not limited to this.
  • the program is stored in a non-temporary medium such as a CD-ROM (Compact Disk Read Only Memory), a DVD-ROM (Digital Versaille Disk Online Memory), and a USB (Universal Serial Bus) memory. It may be provided in the form. Further, the program may be downloaded from an external device via a network.
  • Appendix 1 With memory With at least one processor connected to the memory Including The processor Accepts training data including an input image, an input layout showing the positional relationship between the object in the input image and the object, an input sentence related to drawing the input image, and a data type indicating the type of the data set.
  • a layout generation model that generates a generated layout including the class and attributes of an object by inputting a sentence, a relationship-based discriminative model that extracts layout features by inputting a layout, and an image corresponding to a predetermined target data by inputting an image.
  • various models including a target discriminative model that outputs probabilities,
  • the input sentence of the received learning data is used as an input to the layout generation model, and a generation layout is generated by the output of the layout generation model.
  • the received data type, the generation layout generated by the generation unit, the relationship-based discrimination model, and the target discrimination model are received, the loss indicating a predetermined error according to the domain is calculated, and the calculation result is output. death, Based on the received loss calculation result, at least the parameters of the layout generation model among the various models are updated.
  • a learning device configured to be.
  • Appendix 2 A non-temporary storage medium that stores a program that can be executed by a computer to perform a learning process. Accepts training data including an input image, an input layout showing the positional relationship between the object in the input image and the object, an input sentence related to drawing the input image, and a data type indicating the type of the data set.
  • a layout generation model that generates a generated layout including the class and attributes of an object by inputting a sentence, a relationship-based discriminative model that extracts layout features by inputting a layout, and an image corresponding to a predetermined target data by inputting an image.
  • the input sentence of the received learning data is used as an input to the layout generation model, and a generation layout is generated by the output of the layout generation model.
  • the received data type, the generation layout generated by the generation unit, the relationship-based discrimination model, and the target discrimination model are received, the loss indicating a predetermined error according to the domain is calculated, and the calculation result is output. death, Based on the received loss calculation result, at least the parameters of the layout generation model among the various models are updated.

Abstract

現実のシーンに即した適切なレイアウトを生成することができる。 学習装置は、入力文を、文を入力として物体のクラス及び属性を含むレイアウト生成モデルへの入力として、レイアウト生成モデルの出力により生成レイアウトを生成する生成部と、ドメインに応じた所定の誤差を示すロスを計算し、計算結果を出力するロス計算部とを含む。また学習装置は、ロス計算部から受け付けたロスの計算結果に基づいて、各種モデルのうち少なくともレイアウト生成モデルのパラメータを更新するパラメータ更新部を含む。

Description

学習装置、生成装置、学習方法、生成方法、及びプログラム
 開示の技術は、学習装置、生成装置、学習方法、生成方法、及びプログラムに関する。
 シーンを説明する文書を可視化するイラストを自動で生成するいくつかの技術開発が為され、開示されてきている。
 例えば、非特許文献1の技術は、文を入力として、現在のレイアウトの状態から次に配置すべき単語の予測及び当該単語に相当する物体の適切な配置場所の予測を繰り返し行い、最終的に入力された文に対応するレイアウトを生成する。その後、生成したレイアウトに各物体のイラストを合成し、文書を可視化するイラスト画像を生成する。
 また、非特許文献2の技術は、文を入力として、バウンディングボックス生成モジュール、物体形状生成モジュール、及び画像生成モジュールの3段階の処理を経て最終的に画像を生成する。バウンディングボックス生成モジュールは、物体及び物体の位置関係であるレイアウト情報を生成する。物体形状生成モジュールは、各物体の形状を生成する。画像生成モジュールは、物体形状モジュールの出力から、本物の画像のように見えるよう画像全体を生成する。
 これらの技術は、複数の物体が相互に関係するシーンを説明する文書を可視化するために、まず複数の物体の位置関係を示すレイアウトを生成し、生成したレイアウトにイラストを合成したり、他のニューラルネットワークを用意して画像を生成したりしている。
Tan Fuwen, Feng Song, Ordonez Vicente. "Text2Scene: Generating Compositional Scenes from Textual Descriptions. ", In proc. IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2019. Wenbo Li, Pengchuan Zhang, Lei Zhang, Qiuyuan Huang, Xiaodong He, Siwei Lyu, Jianfeng Gao. "Object-driven Text-to-Image Synthesis via Adversarial Training. " In proc. IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2019.
 もっともこれらの技術は、現実にあり得るレイアウトであっても、学習に用いたイラストデータセットに存在しないシーンのレイアウトの生成は困難であるという問題がある。例えば、非特許文献1で使用されたAbstractデータセットには、人が3人以上同時に存在するシーンが含まれていない。このとき、3人以上存在するシーンを説明する文を入力すると、2人しか存在しないシーンが生成されてしまう。このように、入力文と学習データとの対応に関する課題がある。
 開示の技術は、上記の点に鑑みてなされたものであり、現実のシーンに即した適切なレイアウトを生成するための学習装置、生成装置、学習方法、生成方法、及びプログラムを提供することを目的とする。
 本開示の第1態様は、学習装置であって、入力画像と、前記入力画像中の物体及び前記物体の位置関係を示す入力レイアウトと、前記入力画像の描画に関する入力文と、データセットの種類を示すデータ種類とを含む学習データを受け付ける受付部と、文を入力として物体のクラス及び属性を含む生成レイアウトを生成するレイアウト生成モデル、レイアウトを入力としてレイアウトの特徴を抽出する関係ベース識別モデル、及び画像を入力として所定のターゲットデータに対応した画像である確率を出力するターゲット識別モデルを含む各種モデル、並びに前記各種モデルのパラメータが格納されている記憶部と、前記受付部により受け付けた前記学習データのうちの入力文を、前記レイアウト生成モデルへの入力として、前記レイアウト生成モデルの出力により生成レイアウトを生成する生成部と、前記受付部から受け付けたデータ種類と、前記生成部によって生成した生成レイアウトと、前記関係ベース識別モデルと、前記ターゲット識別モデルとを受け付け、ドメインに応じた所定の誤差を示すロスを計算し、計算結果を出力するロス計算部と、前記ロス計算部から受け付けたロスの計算結果に基づいて、前記各種モデルのうち少なくとも前記レイアウト生成モデルのパラメータを更新するパラメータ更新部と、を含む。
 本開示の第2態様は、生成装置であって、入力文を受け付ける受付部と、ドメインに応じた所定の誤差を示すロスを用いて予め学習されたレイアウト生成モデルであって、文を入力として物体のクラス及び属性を含む生成レイアウトを生成するレイアウト生成モデルへ前記入力文を入力し、前記レイアウト生成モデルの出力として、生成レイアウトを生成し、レイアウト及び所定のデータセットを入力として生成画像を生成する合成器に、前記生成レイアウトを入力し、前記合成器の出力として、生成画像を生成する生成部と、を含む。
 本開示の第3態様は、学習方法であって、入力画像と、前記入力画像中の物体及び前記物体の位置関係を示す入力レイアウトと、前記入力画像の描画に関する入力文と、データセットの種類を示すデータ種類とを含む学習データを受け付け、文を入力として物体のクラス及び属性を含む生成レイアウトを生成するレイアウト生成モデル、レイアウトを入力としてレイアウトの特徴を抽出する関係ベース識別モデル、及び画像を入力として所定のターゲットデータに対応した画像である確率を出力するターゲット識別モデルを含む各種モデルを用いて、前記受け付けた前記学習データのうちの入力文を、前記レイアウト生成モデルへの入力として、前記レイアウト生成モデルの出力により生成レイアウトを生成し、前記受け付けたデータ種類と、前記生成した生成レイアウトと、前記関係ベース識別モデルと、前記ターゲット識別モデルとを受け付け、ドメインに応じた所定の誤差を示すロスを計算し、計算結果を出力し、前記受け付けたロスの計算結果に基づいて、前記各種モデルのうち少なくとも前記レイアウト生成モデルのパラメータを更新する、ことを含む処理をコンピュータが実行することを特徴とする。
 本開示の第4態様は、生成方法であって、入力文を受け付け、ドメインに応じた所定の誤差を示すロスを用いて予め学習されたレイアウト生成モデルであって、文を入力として物体のクラス及び属性を含む生成レイアウトを生成するレイアウト生成モデルへ前記入力文を入力し、前記レイアウト生成モデルの出力として、生成レイアウトを生成し、レイアウト及び所定のデータセットを入力として生成画像を生成する合成器に、前記生成レイアウトを入力し、前記合成器の出力として、生成画像を生成する、ことを含む処理をコンピュータが実行することを特徴とする。
 開示の技術によれば、現実のシーンに即した適切なレイアウトを生成することができる。
本開示の手法で用いる各種モデル等、及び計算される各種ロスの関係を示す概念図である。 学習装置及び生成装置のハードウェア構成を示すブロック図である。 本実施形態の学習装置の構成を示すブロック図である。 学習装置による学習処理の流れを示すフローチャートである。 本実施形態の生成装置の構成を示すブロック図である。 生成装置による生成処理の流れを示すフローチャートである。
 以下、開示の技術の実施形態の一例を、図面を参照しつつ説明する。なお、各図面において同一又は等価な構成要素及び部分には同一の参照符号を付与している。また、図面の寸法比率は、説明の都合上誇張されており、実際の比率とは異なる場合がある。
 まず、本開示の概要について説明する。我々は日常的に、製品や作業のマニュアルを読解したり、メール又は会議の履歴から概要を掴むなど、大量の文書データに触れ、それらの内容を理解している。特に、複数の物体が複雑に関係するようなシーンを描写する文を読解する際には、その情景を想起する必要があり、理解に時間がかかる。このような複雑なシーンの理解を助ける手法として、文が描写する情景を可視化したイラストを共に認識する手法が挙げられる。例えば、事故発生状況を説明した文書に、その時の状況を可視化したイラストが付与されていれば、人は容易にその状況を想起できる。更に、文書中に明記されていない部分が明確化されれば、理解を更に深める助けになると共に、認識齟齬の回避にも繋がる。従って、シーンを説明する文書を可視化したイラストを付与することが、人が複雑なシーンを素早く正確に理解する助けになる。
 このようなシーンを説明する文書を可視化するイラストを自動で生成する技術について上記開示の技術がある。これに対して、本開示の技術は、上記課題に示したように、現実にあり得るレイアウトであって、ターゲットデータセット、すなわちイラストデータセットに存在しないシーンの生成に関する技術を提案する。本開示の手法では、イラストデータ(ターゲットドメイン)と実画像データ(ソースドメイン)とで学習する内容を区別し、それぞれにおいて必要な知識を転用する手法を検討した。例えば、他の実画像データセットのレイアウト情報を転用することで現実にあり得るシーンの知識を補い、イラストデータセットに存在しないシーンについても正確に、かつ自然なイラストレイアウトとイラスト画像とを生成する。このように、ドメイン間ギャップを埋めるようにレイアウト知識を転用した学習及び生成により、適切なシーン生成を可能とした。
 図1は、本開示の手法で用いる各種モデル等、及び計算される各種ロスの関係を示す概念図である。図1に示すように、本開示の手法では、各種モデルを用いると共に、各種ロスの計算結果を用いて各種モデルのうちの所定のモデルのパラメータを更新する。各種モデルは、レイアウト生成モデル、関係ベース識別モデル、及びターゲット識別モデルである。各種ロスは、関係ベースロス、物体ロス、及びドメイン敵対ロスである。各種モデル及び各種ロスの詳細については後述する。
 以下、本開示の実施形態について学習装置及び生成装置に分けて説明する。
[学習装置]
 学習装置の構成について説明する。
 図2は、学習装置100のハードウェア構成を示すブロック図である。
 図2に示すように、学習装置100は、CPU(Central Processing Unit)11、ROM(Read Only Memory)12、RAM(Random Access Memory)13、ストレージ14、入力部15、表示部16及び通信インタフェース(I/F)17を有する。各構成は、バス19を介して相互に通信可能に接続されている。
 CPU11は、中央演算処理ユニットであり、各種プログラムを実行したり、各部を制御したりする。すなわち、CPU11は、ROM12又はストレージ14からプログラムを読み出し、RAM13を作業領域としてプログラムを実行する。CPU11は、ROM12又はストレージ14に記憶されているプログラムに従って、上記各構成の制御及び各種の演算処理を行う。本実施形態では、ROM12又はストレージ14には、学習プログラムが格納されている。
 ROM12は、各種プログラム及び各種データを格納する。RAM13は、作業領域として一時的にプログラム又はデータを記憶する。ストレージ14は、HDD(Hard Disk Drive)又はSSD(Solid State Drive)等の記憶装置により構成され、オペレーティングシステムを含む各種プログラム、及び各種データを格納する。
 入力部15は、マウス等のポインティングデバイス、及びキーボードを含み、各種の入力を行うために使用される。
 表示部16は、例えば、液晶ディスプレイであり、各種の情報を表示する。表示部16は、タッチパネル方式を採用して、入力部15として機能してもよい。
 通信インタフェース17は、端末等の他の機器と通信するためのインタフェースである。当該通信には、たとえば、イーサネット(登録商標)若しくはFDDI等の有線通信の規格、又は、4G、5G、若しくはWi-Fi(登録商標)等の無線通信の規格が用いられる。
 次に、学習装置100の各機能構成について説明する。図3は、本実施形態の学習装置の構成を示すブロック図である。各機能構成は、CPU11がROM12又はストレージ14に記憶された学習プログラムを読み出し、RAM13に展開して実行することにより実現される。
 図3に示すように、学習装置100は、受付部110と、記憶部112と、生成部114と、ロス計算部116と、パラメータ更新部118とを含んで構成されている。
 受付部110は、学習データを受け付ける。学習データは、学習用の入力画像yと、学習用の入力レイアウトsと、入力画像の描画に関する学習用の入力文xと、データセットの種類を示す学習用のデータ種類dとを1セット以上含むデータである。入力画像yは、入力文が描写するシーンである。入力レイアウトsは、入力画像中の各物体、各物体の種類、各物体の属性、及び各物体の位置関係を示す。データセットは、ターゲットドメインのターゲットデータか、又はソースドメインのソースデータの何れかであり、データ種類dと共に受け付ける。
 以下、各種学習データの具体的な例について説明する。具体的には、入力文xは、サイズがV×Nの行列であり、Vは文中の各単語及び紐づくベクトルの長さであり、Nは文中の単語数である。文中の各単語及び紐づくベクトルは、各単語を一意に定めるベクトルであれば何を用いてもよい。
 入力画像yは、サイズが横幅×縦幅×チャネル数のテンソルであり、ここでは、学習用の入力画像xの横幅をW、縦幅をH、チャネル数をDとする。また、テンソルの最左上手前の座標を(0、0、0)とし、最左上手前から右にw、下にh進み、奥にd枚目のチャネルに相当する座標を(w、h、d)と表記する。また、説明の簡単のため、各テンソルについて、横幅の次元を次元1、縦幅の次元を次元2、チャネル数の次元を次元3と記載する。すなわち、学習用の入力画像xの次元1のサイズはW、次元2のサイズはH、次元3のサイズはDとなる。
 入力レイアウトsは、入力画像xに存在する各物体のクラス、及び各物体の属性を示すテンソルである。例えば、非特許文献1では、学習用の入力画像xの横と縦とのグリッド数をgw、ghとするとき、横幅がW/gw、縦幅がH/ghであり、チャネル数はクラス数×属性項目数である。ここでクラス数をC、属性項目数をAとする。物体のクラスとは、予め定義されている物体の種類を示す言葉であれば何を用いてもよい。例えば、物体の種類を示す言葉としては、person、又はsports ball等が挙げられる。物体の属性とは、物体のサイズに関する情報を含み、これに加えて、物体の状態を示す情報であれば何を用いてもよい。属性項目数Aとは、物体のサイズに関する情報及び物体の状態を示す情報の種類数の和である。物体のサイズに関する情報とは物体のサイズを示す数値であれば何でもよい。物体のサイズを示す数値としては、例えば、物体サイズの横と縦との長さの各々の、画像の横と縦との長さに対する比が挙げられる。物体の状態を示す情報とは、物体の状態を示す数値又は言葉であれば何を用いてもよい。物体の状態を示す言葉としては、例えば、赤及び青などの物体の色を示す言葉が挙げられる。物体の状態を示す数値としては、例えば、物体の向きを示す数値などが挙げられる。非特許文献1の手法では、データセットに格納されている初期状態の向きであれば0、左右に逆転していた場合は1等と数値で示している。
 データ種類dは、入力されたデータが、ターゲットデータか、又はソースデータかを判別できる数値又は記号であれば何を用いてもよい。データ種類dを数値とする場合は、例えば、ターゲットデータであれば0、ソースデータであれば1である。
 受付部110は、以上説明した、入力文x、入力画像y、入力レイアウトs、及びデータ種類dの1以上の学習データのセットを、生成部114及びロス計算部116に出力する。また、受付部110以降の処理では、データ種類dに応じて処理が異なるため、データ種類dの判定を行っておく。
 記憶部112には、各種モデルとしてレイアウト生成モデル、関係ベース識別モデル、及びターゲット識別モデルを含む各種モデル、並びにこれらの各種モデルのパラメータが格納されている。レイアウト生成モデルは、入力文xを入力として物体のクラス及び属性を含む生成レイアウトを生成するモデルである。例えば、入力文の内容が例えば、「森のベンチに3人座っている」だったとすれば、レイアウト生成モデルは、3人の人物の各々、及びベンチに対応するレイアウトを生成する。関係ベース識別モデルは、レイアウトを入力としてレイアウトの特徴を抽出するモデルである。ターゲット識別モデルは、画像を入力として自然なターゲットデータの画像である確率、すなわちターゲットデータらしさの確率を出力するモデルである。また、記憶部112には、ターゲットデータセットが付随した合成器が格納されている。合成器はレイアウトを入力として生成画像を生成するように予め学習された合成器である。ターゲットデータセットには、イラスト及びイラストを合成する画像が含まれる。生成画像とは、レイアウトを元に、レイアウトに対応するターゲットデータセットのデータ、すなわちイラストデータを合成した画像である。例えば、3人の人物に対応するレイアウトが入力されたとすれば、レイアウトに対応する3人の人物を示すイラストデータの各々が、入力画像xと同じサイズの画像に合成される。またイラストを合成する画像は、レイアウトの物体のクラス等の内容から適切な画像を合成対象としてターゲットデータセットから選択すればよい。
 (各種モデルの説明)
 具体的には、レイアウト生成モデル、関係ベース識別モデル、及びターゲット識別モデルは、それぞれニューラルネットワークであり、記憶部112には、各ニューラルネットワークのパラメータが格納されている。レイアウト生成モデルは、入力文xを入力とし、生成レイアウトs’を生成するニューラルネットワークであれば何を用いてもよい。関係ベース識別モデルは、レイアウトの物体の位置関係を表現する特徴を抽出するニューラルネットワークであれば何を用いてもよい。ターゲット識別モデルは、入力画像yと生成画像y’とを識別するニューラルネットワークであれば何を用いてもよい。
 生成部114は、受付部110から入力文x、入力画像y、入力レイアウトs、及びデータ種類dを受け付ける。また、生成部114は、記憶部112からレイアウト生成モデル、及び当該レイアウト生成モデルのパラメータを取得する。そして、生成部114は、入力文xを、レイアウト生成モデルへの入力として、レイアウト生成モデルの出力により生成レイアウトs’を生成する。ここで、生成部114の処理は、データ種別dに応じて異なる。生成部114は、データ種類dがターゲットデータのときには、記憶部112から合成器を更に受け付け、合成器に生成レイアウトs’及びデータ種類dに対応したターゲットデータのデータセットを入力し、合成器の出力として生成画像y’を生成する。以上のように、生成部114の出力は、生成レイアウトs’(データ種別dがターゲットデータのときは更に生成画像y’)である。
 生成部114の具体的態様について説明する。生成部114は、まず、記憶部112からレイアウト生成モデル及び当該レイアウト生成モデルのパラメータを取得する。次に、生成部114は、入力文xをレイアウト生成モデルに入力して生成レイアウトs’を生成する。データ種類dがターゲットデータのときには、合成器に生成レイアウトs’とターゲットデータセットとを入力し、生成画像y’を生成する。合成器は、具体的には、生成レイアウトs’が示す物体のクラスに相当するイラストをターゲットデータセットから選択し、当該物体のクラスの属性情報に従って拡縮、変換し、入力画像sと同じサイズの画像に合成し、生成画像y’を生成する。
 ロス計算部116は、受付部110からデータ種類dの判定結果を受け付け、生成部114から生成レイアウトs’及び生成画像y’を受け付ける。ここで、ロス計算部116の処理は、データ種別dに応じて異なる。データ種別dがターゲットデータの場合、記憶部112から関係ベース識別モデル及びターゲット識別モデルを取得する。データ種別dがソースデータの場合、記憶部112から関係ベース識別モデルを取得する。ロス計算部116は、データ種別dに応じて、2種類又は3種類のロスを計算し、ロスの計算結果を出力する。以下にロスの種類について説明する。ロスの種類は、関係ベースロス、物体ロス、及びドメイン敵対ロスがある。
 一つ目のロスは、生成レイアウトs’が、入力レイアウトsの物体間の位置関係とどの程度似通っているか否かを示す指標であれば何を用いてもよい。例えば、入力レイアウトsと生成レイアウトs’とを関係ベース識別モデルに入力し、その出力値の二乗誤差とする。関係ベース識別モデルの出力値はそれぞれ入力関係特徴r及び生成関係特徴r’である。この二乗誤差の値を小さくするようにレイアウト生成モデルのパラメータを更新する。以下、このロスを関係ベースロスと呼ぶ。以上のように、関係ベースロスは、本開示の生成レイアウト及び入力レイアウトにおける物体間の位置関係に関する指標を示すロスでる。
 二つ目のロスは、生成レイアウトs’が、入力レイアウトs中の物体をどれだけ正確に持つか判定する指標であれば何を用いてもよい。例えば、入力レイアウトs中の物体数が5つのとき、生成レイアウトs’が5つ中4つ持つとき、誤り率として0.2とする。これを小さくするようにレイアウト生成モデルのパラメータを更新する。以下、このロスを物体ロスと呼ぶ。以上のように、物体ロスは、本開示の生成レイアウト及び入力レイアウトにおける物体自体に関する指標を示すロスである。なお、記憶部112に、上記の誤り率のチェックを行う物体チェック器を格納しておき、物体チェック器を用いるようにしてもよい。
 三つ目のロスは、入力画像yが、本物のターゲットデータの画像であり、生成画像y’が、偽物のターゲットデータの画像であることを判定する指標であれば何を用いてもよい。例えば、ある画像をターゲット識別モデルに入力したときの出力値である。当該出力値を小さくするようにターゲット識別モデルのパラメータを更新し、同時に当該出力値を大きくするようにレイアウト生成モデルのパラメータを更新する。以下、このロスをドメイン敵対ロスと呼ぶ。以上のように、ドメイン敵対ロスは、生成画像及び入力画像の真偽判定の識別性に関する指標を示すロスである。
 ロス計算部116は、データ種類dがターゲットデータのとき、上記3種類のロスを計算する。また、ロス計算部116は、データ種類dがソースデータのときは関係ベースロス及び物体ロスの2種類のロスを計算する。
 パラメータ更新部118は、ロス計算部116から各種ロスを受け付ける。パラメータ更新部118の処理は、データ種別dに応じて異なる。データ種別dが、ターゲットデータの場合、記憶部112からレイアウト生成モデル、及びターゲット識別モデルを取得する。データ種別dが、ソースデータの場合、記憶部112からレイアウト生成モデルを取得する。パラメータ更新部118は、データ種別dがターゲットデータの場合、関係ベースロス、物体ロス、及びドメイン敵対ロスを用いて、レイアウト生成モデルのパラメータを更新する。また、ドメイン敵対ロスを用いて、ターゲット識別モデルのパラメータを更新する。一方、パラメータ更新部118は、データ種別dがソースデータの場合、関係ベースロス、及び物体ロスを用いて、レイアウト生成モデルのパラメータを更新する。レイアウト生成モデルのパラメータを更新するとき、関係ベースロス、物体ロス、が小さくなるように、かつ、ドメイン敵対ロスを受け取った時は、ドメイン敵対ロスが大きくなるように更新すればどんな方法であってもよい。例えば、ターゲットデータの場合、関係ベースロス、物体ロス、及びドメイン敵対ロスと絶対値が同じ負の値との線形和を全体ロスとして、全体ロスが小さくなるようにパラメータを更新する。また、ソースデータの場合も同様に関係ベースロス、及び物体ロスに対する全体ロスとして、全体ロスが小さくなるようにパラメータを更新する。ターゲット識別モデルのパラメータを更新するとき、ドメイン敵対ロスが小さくなるように更新すればどんな方法であってもよい。以上のようにして更新したパラメータは記憶部112に格納する。
 次に、学習装置100の作用について説明する。
 図4は、学習装置100による学習処理の流れを示すフローチャートである。CPU11がROM12又はストレージ14から学習プログラムを読み出して、RAM13に展開して実行することにより、学習処理が行なわれる。学習装置100は、入力として、学習データを受け付けて以下の処理を行う。CPU11が学習装置100の各部として機能する。
 ステップS100において、CPU11は、受付部110として、学習データを受け付ける。学習データは、入力文x、入力画像y、入力レイアウトs、及びデータ種類dである。
 ステップS102において、CPU11は、受付部110として、データ種類dがターゲットデータであるか、ソースデータであるかを判定する。当該判定による分岐は、データ種類dの判定結果に応じて、ターゲットデータであればステップS104へ移行し、ソースデータであればステップS118へ移行する。なお、データ種類dについての当該判定結果は、各部に出力し、判定結果に応じて各部が適宜処理を行う。
 ステップS104において、CPU11は、生成部114として、記憶部112からレイアウト生成モデル、及び当該レイアウト生成モデルのパラメータ、並びに合成器を取得する。
 ステップS106において、CPU11は、生成部114として、入力文xを、レイアウト生成モデルへの入力として、レイアウト生成モデルの出力により生成レイアウトs’を生成する。
 ステップS108において、CPU11は、生成部114として、合成器に生成レイアウトs’及びデータ種類dに対応したターゲットデータのデータセットを入力し、合成器の出力として生成画像y’を生成する。以上によりロス計算部116には、生成レイアウトs’及び生成画像y’が出力される。
 ステップS110において、CPU11は、ロス計算部116として、記憶部112から関係ベース識別モデル及びターゲット識別モデルを取得する。
 ステップS112において、CPU11は、ロス計算部116として、関係ベースロス、物体ロス、及びドメイン敵対ロスを計算する。具体的には、関係ベースロスは、生成レイアウトs’と入力レイアウトsとを関係ベース識別モデルに入力し、その出力値の二乗誤差を求めることにより計算する。物体ロスは、入力レイアウトs中の物体数と、生成レイアウトs’の物体数とから誤り率を求めることにより計算する。ドメイン敵対ロスは、生成画像y’をターゲット識別モデルに入力したときの出力値を求めることにより計算する。
 ステップS114において、CPU11は、パラメータ更新部118として、記憶部112からレイアウト生成モデル、及びターゲット識別モデルを取得する。
 ステップS116において、CPU11は、パラメータ更新部118として、関係ベースロス、物体ロス、及びドメイン敵対ロスを用いて、レイアウト生成モデルのパラメータを更新する。また、ドメイン敵対ロスを用いて、ターゲット識別モデルのパラメータを更新する。更新したパラメータは記憶部112に格納する。
 以上が、データ種類dの判定結果がターゲットデータであった場合の処理である。以下ステップS118以降はデータ種類dの判定結果がソースデータであった場合の処理である。
 ステップS118において、CPU11は、生成部114として、記憶部112からレイアウト生成モデル、及び当該レイアウト生成モデルのパラメータを取得する。
 ステップS120において、CPU11は、生成部114として、入力文xを、レイアウト生成モデルへの入力として、レイアウト生成モデルの出力により生成レイアウトs’を生成する。
 ステップS122において、CPU11は、ロス計算部116として、記憶部112から関係ベース識別モデルを取得する。
 ステップS124において、CPU11は、ロス計算部116として、関係ベースロス、及び物体ロスを計算する。
 ステップS126において、CPU11は、パラメータ更新部118として、記憶部112からレイアウト生成モデルを取得する。
 ステップS128において、CPU11は、パラメータ更新部118として、関係ベースロス、及び物体ロスを用いて、レイアウト生成モデルのパラメータを更新する。以上が学習処理ルーチンである。
 以上説明したように本実施形態の学習装置100によれば、現実のシーンに即した適切なレイアウトを生成するためのモデルを学習できる。
[生成装置]
 次に、生成装置について説明する。図5は、本実施形態の生成装置の構成を示すブロック図である。
 図5に示すように、生成装置200は、受付部210と、記憶部212と、生成部214と、出力部216とを含んで構成されている。
 なお、生成装置200も学習装置100と同様のハードウェア構成によって構成できる。図2に示すように、生成装置200は、CPU21、ROM22、RAM23、ストレージ24、入力部25、表示部26及び通信I/F27を有する。各構成は、バス29を介して相互に通信可能に接続されている。ROM22又はストレージ24には、生成プログラムが格納されている。
 受付部210は、入力文xのみを受け付ける。レイアウト生成処理時の入力文xは、具体的には学習処理時の入力文xと同様の形式のデータである。
 記憶部212には、学習装置100でパラメータが学習されたレイアウト生成モデル、及び合成器が格納されている。レイアウト生成モデルは、上述した関係ベースロス、物体ロス、及びドメイン敵対ロスを含む各種ロスを用いてパラメータが学習されている。
 生成部214は、受付部210から入力文xを受け付け、記憶部212からレイアウト生成モデル及び当該レイアウト生成モデルのパラメータ、並びに合成器を取得する。生成部214は、生成レイアウトs’及び生成画像y’を生成する。生成レイアウトs’及び生成画像y’の生成手法は学習装置100の生成部114と同様である。
 出力部216は、生成部214から生成レイアウトs’及び生成画像y’を受け取り、出力する。
 次に、生成装置200の作用について説明する。
 図6は、生成装置200による生成処理の流れを示すフローチャートである。CPU21がROM22又はストレージ24から生成プログラムを読み出して、RAM13に展開して実行することにより、生成習処理が行なわれる。生成装置200は、入力として、入力文を受け付けて以下の処理を行う。CPU21が生成装置200の各部として機能する。
 ステップS200において、CPU21は、受付部210として、入力文xを受け付ける。
 ステップS202において、CPU21は、生成部214として、記憶部212からレイアウト生成モデル、及び当該レイアウト生成モデルのパラメータ、並びに合成器を取得する。
 ステップS204において、CPU21は、生成部214として、入力文xを、レイアウト生成モデルへの入力として、レイアウト生成モデルの出力により生成レイアウトs’を生成する。
 ステップS206において、CPU21は、生成部214として、合成器に生成レイアウトs’及びターゲットデータのデータセットを入力し、合成器の出力として生成画像y’を生成する。
 ステップS208において、CPU21は、出力部216として、生成レイアウトs’及び生成画像y’を出力する。以上が生成処理ルーチンである。
 以上説明したように本実施形態の生成装置200によれば、現実のシーンに即した適切なレイアウトを生成し、当該レイアウトを合成した生成画像を出力できる。
 ここで、上述した学習装置100に関する効果についての補足を説明する。学習装置100においては、データ種類dをソースデータとしても学習を行うことで、ターゲットドメインとは異なる他のデータセットからのレイアウト知識を転用することができる。
 また、物体の捉え方に関して、パラメータ学習に用いるロスの種類として、関係ベースロスと物体ロスとに分けて、大局的条件と、局所的条件とをチェック機構として設けた。関係ベースロスは物体同士のおおよその空間関係を捉えた大局的条件である。物体ロスは物体の有無を必ず満たしたいという局所的条件である。
 また、関係ベースロス及び物体ロスを、ターゲットドメイン及びソースドメインの共通のロスをとし、ドメイン敵対ロスをターゲットドメインに固有のロスとした。これにより物体と当該物体の属性を正しく推論する点、及び自然なイラストを生成する点をそれぞれ分けて学習させることができるようにした。
 なお、上記実施形態でCPUがソフトウェア(プログラム)を読み込んで実行した学習処理又は生成処理を、CPU以外の各種のプロセッサが実行してもよい。この場合のプロセッサとしては、FPGA(Field-Programmable Gate Array)等の製造後に回路構成を変更可能なPLD(Programmable Logic Device)、及びASIC(Application Specific Integrated Circuit)等の特定の処理を実行させるために専用に設計された回路構成を有するプロセッサである専用電気回路等が例示される。また、学習処理又は生成処理を、これらの各種のプロセッサのうちの1つで実行してもよいし、同種又は異種の2つ以上のプロセッサの組み合わせ(例えば、複数のFPGA、及びCPUとFPGAとの組み合わせ等)で実行してもよい。また、これらの各種のプロセッサのハードウェア的な構造は、より具体的には、半導体素子等の回路素子を組み合わせた電気回路である。
 また、上記実施形態では、学習プログラム又は生成プログラムがストレージ14に予め記憶(インストール)されている態様を説明したが、これに限定されない。プログラムは、CD-ROM(Compact Disk Read Only Memory)、DVD-ROM(Digital Versatile Disk Read Only Memory)、及びUSB(Universal Serial Bus)メモリ等の非一時的(non-transitory)記憶媒体に記憶された形態で提供されてもよい。また、プログラムは、ネットワークを介して外部装置からダウンロードされる形態としてもよい。
 以上の実施形態に関し、更に以下の付記を開示する。
 (付記項1)
 メモリと、
 前記メモリに接続された少なくとも1つのプロセッサと、
 を含み、
 前記プロセッサは、
 入力画像と、前記入力画像中の物体及び前記物体の位置関係を示す入力レイアウトと、前記入力画像の描画に関する入力文と、データセットの種類を示すデータ種類とを含む学習データを受け付け、
 文を入力として物体のクラス及び属性を含む生成レイアウトを生成するレイアウト生成モデル、レイアウトを入力としてレイアウトの特徴を抽出する関係ベース識別モデル、及び画像を入力として所定のターゲットデータに対応した画像である確率を出力するターゲット識別モデルを含む各種モデルを用いて、
 前記受け付けた前記学習データのうちの入力文を、前記レイアウト生成モデルへの入力として、前記レイアウト生成モデルの出力により生成レイアウトを生成し、
 前記受け付けたデータ種類と、前記生成部によって生成した生成レイアウトと、前記関係ベース識別モデルと、前記ターゲット識別モデルとを受け付け、ドメインに応じた所定の誤差を示すロスを計算し、計算結果を出力し、
 前記受け付けたロスの計算結果に基づいて、前記各種モデルのうち少なくとも前記レイアウト生成モデルのパラメータを更新する、
 ように構成されている学習装置。
 (付記項2)
 学習処理を実行するようにコンピュータによって実行可能なプログラムを記憶した非一時的記憶媒体であって、
 入力画像と、前記入力画像中の物体及び前記物体の位置関係を示す入力レイアウトと、前記入力画像の描画に関する入力文と、データセットの種類を示すデータ種類とを含む学習データを受け付け、
 文を入力として物体のクラス及び属性を含む生成レイアウトを生成するレイアウト生成モデル、レイアウトを入力としてレイアウトの特徴を抽出する関係ベース識別モデル、及び画像を入力として所定のターゲットデータに対応した画像である確率を出力するターゲット識別モデルを含む各種モデルを用いて、
 前記受け付けた前記学習データのうちの入力文を、前記レイアウト生成モデルへの入力として、前記レイアウト生成モデルの出力により生成レイアウトを生成し、
 前記受け付けたデータ種類と、前記生成部によって生成した生成レイアウトと、前記関係ベース識別モデルと、前記ターゲット識別モデルとを受け付け、ドメインに応じた所定の誤差を示すロスを計算し、計算結果を出力し、
 前記受け付けたロスの計算結果に基づいて、前記各種モデルのうち少なくとも前記レイアウト生成モデルのパラメータを更新する、
 非一時的記憶媒体。
100 学習装置
110 受付部
112 記憶部
114 生成部
116 ロス計算部
118 パラメータ更新部
200 生成装置
210 受付部
212 記憶部
214 生成部
216 出力部

Claims (8)

  1.  入力画像と、前記入力画像中の物体及び前記物体の位置関係を示す入力レイアウトと、前記入力画像の描画に関する入力文と、データセットの種類を示すデータ種類とを含む学習データを受け付ける受付部と、
     文を入力として物体のクラス及び属性を含む生成レイアウトを生成するレイアウト生成モデル、レイアウトを入力としてレイアウトの特徴を抽出する関係ベース識別モデル、及び画像を入力として所定のターゲットデータに対応した画像である確率を出力するターゲット識別モデルを含む各種モデル、並びに前記各種モデルのパラメータが格納されている記憶部と、
     前記受付部により受け付けた前記学習データのうちの入力文を、前記レイアウト生成モデルへの入力として、前記レイアウト生成モデルの出力により生成レイアウトを生成する生成部と、
     前記受付部から受け付けたデータ種類と、前記生成部によって生成した生成レイアウトと、前記関係ベース識別モデルと、前記ターゲット識別モデルとを受け付け、ドメインに応じた所定の誤差を示すロスを計算し、計算結果を出力するロス計算部と、
     前記ロス計算部から受け付けたロスの計算結果に基づいて、前記各種モデルのうち少なくとも前記レイアウト生成モデルのパラメータを更新するパラメータ更新部と、
     を含む学習装置。
  2.  レイアウト及び所定のデータセットを入力として生成画像を生成する合成器を有し、
     前記生成部は、前記合成器に前記生成レイアウト及び所定のデータセットを入力し、前記合成器の出力として生成画像を生成する請求項1に記載の学習装置。
  3.  前記ロス計算部は、前記ロスの種類として、前記生成レイアウト及び前記入力レイアウトにおける物体間の位置関係に関する指標である関係ベースロスと、前記生成レイアウト及び前記入力レイアウトにおける物体自体に関する指標である物体ロスと、前記生成画像及び前記入力画像の真偽判定の識別性に関する指標であるドメイン敵対ロスとのうち、少なくとも前記関係ベースロス及び前記物体ロスを計算する請求項2に記載の学習装置。
  4.  前記データ種類はターゲットデータ、又はソースデータとし、
     前記データ種類が前記ターゲットデータの場合は、
     前記ロス計算部は、前記関係ベースロス、前記物体ロス、及び前記ドメイン敵対ロスを計算し、
     前記パラメータ更新部は、前記関係ベースロス、前記物体ロス、及び前記ドメイン敵対ロスを用いて、前記レイアウト生成モデルのパラメータを更新し、前記ドメイン敵対ロスを用いて、前記ターゲット識別モデルのパラメータを更新し、
     前記データ種類が前記ソースデータの場合は、
     前記ロス計算部は、前記関係ベースロス、及び前記物体ロスを計算し、
     前記パラメータ更新部は、前記関係ベースロス、及び前記物体ロスの計算結果を用いて、前記レイアウト生成モデルのパラメータを更新する、請求項3に記載の学習装置。
  5.  入力文を受け付ける受付部と、
     ドメインに応じた所定の誤差を示すロスを用いて予め学習されたレイアウト生成モデルであって、文を入力として物体のクラス及び属性を含む生成レイアウトを生成するレイアウト生成モデルへ前記入力文を入力し、前記レイアウト生成モデルの出力として、生成レイアウトを生成し、
     レイアウト及び所定のデータセットを入力として生成画像を生成する合成器に、前記生成レイアウトを入力し、前記合成器の出力として、生成画像を生成する生成部と、
     を含む生成装置。
  6.  入力画像と、前記入力画像中の物体及び前記物体の位置関係を示す入力レイアウトと、前記入力画像の描画に関する入力文と、データセットの種類を示すデータ種類とを含む学習データを受け付け、
     文を入力として物体のクラス及び属性を含む生成レイアウトを生成するレイアウト生成モデル、レイアウトを入力としてレイアウトの特徴を抽出する関係ベース識別モデル、及び画像を入力として所定のターゲットデータに対応した画像である確率を出力するターゲット識別モデルを含む各種モデルを用いて、
     前記受け付けた前記学習データのうちの入力文を、前記レイアウト生成モデルへの入力として、前記レイアウト生成モデルの出力により生成レイアウトを生成し、
     前記受け付けたデータ種類と、前記生成した生成レイアウトと、前記関係ベース識別モデルと、前記ターゲット識別モデルとを受け付け、ドメインに応じた所定の誤差を示すロスを計算し、計算結果を出力し、
     前記受け付けたロスの計算結果に基づいて、前記各種モデルのうち少なくとも前記レイアウト生成モデルのパラメータを更新する、
     ことを含む処理をコンピュータに実行させる学習方法。
  7.  入力文を受け付け、
     ドメインに応じた所定の誤差を示すロスを用いて予め学習されたレイアウト生成モデルであって、文を入力として物体のクラス及び属性を含む生成レイアウトを生成するレイアウト生成モデルへ前記入力文を入力し、前記レイアウト生成モデルの出力として、生成レイアウトを生成し、
     レイアウト及び所定のデータセットを入力として生成画像を生成する合成器に、前記生成レイアウトを入力し、前記合成器の出力として、生成画像を生成する、
     ことを含む処理をコンピュータに実行させる生成方法。
  8.  請求項1~請求項5の何れか1項記載の学習装置、又は請求項6に記載の生成装置の各部の処理をコンピュータに実行させるプログラム。
PCT/JP2020/025510 2020-06-29 2020-06-29 学習装置、生成装置、学習方法、生成方法、及びプログラム WO2022003773A1 (ja)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP2022533275A JP7396492B2 (ja) 2020-06-29 2020-06-29 学習装置、生成装置、学習方法、生成方法、及びプログラム
PCT/JP2020/025510 WO2022003773A1 (ja) 2020-06-29 2020-06-29 学習装置、生成装置、学習方法、生成方法、及びプログラム

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/JP2020/025510 WO2022003773A1 (ja) 2020-06-29 2020-06-29 学習装置、生成装置、学習方法、生成方法、及びプログラム

Publications (1)

Publication Number Publication Date
WO2022003773A1 true WO2022003773A1 (ja) 2022-01-06

Family

ID=79315780

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2020/025510 WO2022003773A1 (ja) 2020-06-29 2020-06-29 学習装置、生成装置、学習方法、生成方法、及びプログラム

Country Status (2)

Country Link
JP (1) JP7396492B2 (ja)
WO (1) WO2022003773A1 (ja)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20200097569A1 (en) * 2018-09-21 2020-03-26 International Business Machines Corporation Cognitive adaptive real-time pictorial summary scenes
US10665030B1 (en) * 2019-01-14 2020-05-26 Adobe Inc. Visualizing natural language through 3D scenes in augmented reality

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6363547B2 (ja) 2015-03-30 2018-07-25 株式会社Nttドコモ 情報処理装置、及び文章画像化プログラム

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20200097569A1 (en) * 2018-09-21 2020-03-26 International Business Machines Corporation Cognitive adaptive real-time pictorial summary scenes
US10665030B1 (en) * 2019-01-14 2020-05-26 Adobe Inc. Visualizing natural language through 3D scenes in augmented reality

Also Published As

Publication number Publication date
JPWO2022003773A1 (ja) 2022-01-06
JP7396492B2 (ja) 2023-12-12

Similar Documents

Publication Publication Date Title
CN109643399B (zh) 多类别分类器的交互式性能可视化
US10592632B2 (en) Method for analyzing design of an integrated circuit
TWI423057B (zh) 佈局對原理圖錯誤系統及方法
CN111428457B (zh) 数据表的自动格式化
US20150242761A1 (en) Interactive visualization of machine-learning performance
US11093683B2 (en) Test pattern generation systems and methods
US20190325092A1 (en) Machine learning based post route path delay estimator from synthesis netlist
US20210295527A1 (en) Algorithmic approach to finding correspondence between graphical elements
CN112149379A (zh) 用于仿真集成电路的方法和设备以及计算机可读介质
CN115270705B (zh) 一种设计规则违例预测方法、装置、设备及存储介质
CN106204598A (zh) 在自动缺陷分类流程中管理缺陷的方法及系统
TW202107327A (zh) 使用基於機器學習的編碼在電子電路佈局中的圖案分類
JP7298825B2 (ja) 学習支援装置、学習装置、学習支援方法及び学習支援プログラム
JP2020197979A (ja) 三次元点群データに基づく三次元モデル生成装置
CN114065693A (zh) 超大规模集成电路结构布局的优化方法、系统和电子设备
US20080244493A1 (en) Pattern based elaboration of hierarchical l3go designs
CN113094533B (zh) 一种基于混合粒度匹配的图文跨模态检索方法
JP2007188188A (ja) レイアウト方法、cad装置、プログラム及び記憶媒体
CN114201161A (zh) 图形化编程的模块划分方法
WO2022003773A1 (ja) 学習装置、生成装置、学習方法、生成方法、及びプログラム
CN113313066A (zh) 图像识别方法、装置、存储介质以及终端
CN116226487B (zh) 一种基于图形识别的数据大屏可视化方法及系统
CN108932233A (zh) 翻译文生成方法、翻译文生成装置以及翻译文生成程序
JP2009129196A (ja) 熱解析モデル生成装置、熱解析モデル生成方法、熱解析装置および熱解析方法
WO2021074665A1 (en) Generating a 3d model of a plant layout

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

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2022533275

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

Country of ref document: EP

Kind code of ref document: A1