JP7598058B2 - Learning device, trained model generation method, data generation device, data generation method, and program - Google Patents
Learning device, trained model generation method, data generation device, data generation method, and program Download PDFInfo
- Publication number
- JP7598058B2 JP7598058B2 JP2023523716A JP2023523716A JP7598058B2 JP 7598058 B2 JP7598058 B2 JP 7598058B2 JP 2023523716 A JP2023523716 A JP 2023523716A JP 2023523716 A JP2023523716 A JP 2023523716A JP 7598058 B2 JP7598058 B2 JP 7598058B2
- Authority
- JP
- Japan
- Prior art keywords
- depth
- image
- data
- model
- generation
- 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.)
- Active
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
Landscapes
- Engineering & Computer Science (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Image Analysis (AREA)
Description
本発明は、学習装置、学習済みモデルの生成方法、データ生成装置、データ生成方法およびプログラムに関する。 The present invention relates to a learning device, a method for generating a trained model, a data generation device, a data generation method, and a program.
二次元の画像データから、その画像データに対応する三次元データ(深度情報など)を推定することは、長く関心を集めている問題の一つである。この問題を解くための方法として、二次元画像と三次元データのペアデータを教師データとして、二次元画像から三次元データを得る変換器を学習する方法が知られている。しかし、ペアデータを集めるためには専用の機器が必要であり、さらにデータ取得後もデータ間のアライメントを正確に取ることが必要であるため、データ収集コストが高いという問題がある。 Estimating three-dimensional data (such as depth information) corresponding to two-dimensional image data from that data has long been a problem that has attracted attention. One method known to solve this problem is to use paired data of two-dimensional images and three-dimensional data as training data to train a converter that can obtain three-dimensional data from two-dimensional images. However, there is a problem in that data collection costs are high because dedicated equipment is required to collect paired data, and accurate alignment between the data is also required after acquisition.
非特許文献1には、生成モデルによって視点の異なる画像データを、生成される画像データの経験分布が実画像の経験分布と一致するように学習する技術が開示されている。Non-patent document 1 discloses a technology that uses a generative model to learn image data from different viewpoints so that the empirical distribution of the generated image data matches the empirical distribution of the actual image.
しかしながら、非特許文献1に記載の技術を実現するためには、学習に用いるデータセットに、複数の異なる視点から撮像された画像データが十分な量含まれている必要がある。そのため、異なる視点に係る画像データを収集することが困難な場合に、適切な学習を行うことができない可能性がある。
本発明の目的は、三次元データに関する補足データなしに、二次元画像と、当該二次元画像に対応する三次元データとを生成することができる学習装置、学習済みモデルの生成方法、データ生成装置、データ生成方法およびプログラムを提供することにある。
However, in order to realize the technology described in Non-Patent Document 1, the dataset used for learning needs to contain a sufficient amount of image data captured from a plurality of different viewpoints. Therefore, if it is difficult to collect image data related to different viewpoints, there is a possibility that appropriate learning cannot be performed.
An object of the present invention is to provide a learning device, a method for generating a trained model, a data generation device, a data generation method, and a program that are capable of generating a two-dimensional image and three-dimensional data corresponding to the two-dimensional image without supplementary data regarding the three-dimensional data.
本発明の一態様は、潜在変数を機械学習モデルである画像生成モデルに入力することで、第1被写界深度に係る撮像画像を模擬した第1画像データを生成する画像生成部と、前記潜在変数を機械学習モデルである三次元生成モデルに入力することで、前記第1画像データに対応する三次元データを生成する三次元データ生成部と、前記第1画像データと前記三次元データとに基づいて、第2被写界深度に係る撮像画像を模擬した第2画像データを生成する変換部と、前記第1画像データおよび前記第2画像データの分布と、実際の撮像画像の経験分布との近さの度合いを示す学習基準値を算出する算出部と、前記学習基準値に基づいて前記画像生成モデルおよび前記三次元生成モデルのパラメータを更新する更新部とを備える学習装置である。One aspect of the present invention is a learning device that includes an image generation unit that generates first image data simulating a captured image related to a first depth of field by inputting latent variables into an image generation model that is a machine learning model; a three-dimensional data generation unit that generates three-dimensional data corresponding to the first image data by inputting the latent variables into a three-dimensional generation model that is a machine learning model; a conversion unit that generates second image data simulating a captured image related to a second depth of field based on the first image data and the three-dimensional data; a calculation unit that calculates a learning reference value that indicates the degree of closeness between the distribution of the first image data and the second image data and the empirical distribution of an actual captured image; and an update unit that updates parameters of the image generation model and the three-dimensional generation model based on the learning reference value.
本発明の一態様は、潜在変数を機械学習モデルである画像生成モデルに入力することで、第1被写界深度に係る撮像画像を模擬した第1画像データを生成するステップと、前記潜在変数を機械学習モデルである三次元生成モデルに入力することで、前記第1画像データに対応する三次元データを生成するステップと、前記第1画像データと前記三次元データとに基づいて、第2被写界深度に係る撮像画像を模擬した第2画像データを生成するステップと、前記第1画像データおよび前記第2画像データの分布と、実際の撮像画像の経験分布との近さの度合いを示す学習基準値を算出するステップと、前記学習基準値に基づいて前記画像生成モデルおよび前記三次元生成モデルのパラメータを更新するステップと、学習済みの前記画像生成モデルおよび前記三次元生成モデルを出力するステップとを有する学習済みモデルの生成方法である。One aspect of the present invention is a method for generating a trained model, comprising the steps of: generating first image data simulating a captured image relating to a first depth of field by inputting latent variables into an image generation model that is a machine learning model; generating three-dimensional data corresponding to the first image data by inputting the latent variables into a three-dimensional generation model that is a machine learning model; generating second image data simulating a captured image relating to a second depth of field based on the first image data and the three-dimensional data; calculating a learning reference value indicating the degree of closeness between the distribution of the first image data and the second image data and the empirical distribution of an actual captured image; updating parameters of the image generation model and the three-dimensional generation model based on the learning reference value; and outputting the trained image generation model and the three-dimensional generation model.
本発明の一態様は、上記態様に係る学習済みモデルの生成方法によって出力された画像生成モデルに潜在変数を入力することで、撮像画像を模擬した画像データを生成する画像生成部と、上記態様に係る学習済みモデルの生成方法によって出力された三次元生成モデルに前記潜在変数を入力することで、三次元データを生成する三次元データ生成部と、を備えるデータ生成装置である。One aspect of the present invention is a data generation device comprising: an image generation unit that generates image data simulating a captured image by inputting latent variables into an image generation model output by the trained model generation method relating to the above aspect; and a three-dimensional data generation unit that generates three-dimensional data by inputting the latent variables into a three-dimensional generation model output by the trained model generation method relating to the above aspect.
本発明の一態様は、上記態様に係る学習済みモデルの生成方法によって出力された画像生成モデルに潜在変数を入力することで、撮像画像を模擬した画像データを生成するステップと、上記態様に係る学習済みモデルの生成方法によって出力された三次元生成モデルに前記潜在変数を入力することで、三次元データを生成するステップと、を備えるデータ生成方法である。One aspect of the present invention is a data generation method comprising the steps of generating image data simulating a captured image by inputting latent variables into an image generation model output by the trained model generation method relating to the above aspect, and generating three-dimensional data by inputting the latent variables into a three-dimensional generation model output by the trained model generation method relating to the above aspect.
本発明の一態様は、コンピュータを、上記態様に係る学習装置として機能させるためのプログラムである。One aspect of the present invention is a program for causing a computer to function as a learning device relating to the above aspect.
上記少なくとも1つの態様によれば、三次元データに関する補足データなしに、二次元画像と、当該二次元画像に対応する三次元データとを生成することができる。According to at least one of the above aspects, a two-dimensional image and three-dimensional data corresponding to the two-dimensional image can be generated without supplementary data regarding the three-dimensional data.
〈第1の実施形態〉
《データ生成システム1の構成》
図1は、第1の実施形態に係るデータ生成システム1の構成を示す図である。データ生成システム1は、同一の被写体に係る被写界深度の深い撮像画像を模擬した画像データ(ディープデプスオブフィールドイメージ)、被写界深度の浅い撮像画像を模擬した画像データ(シャローデプスオブフィールドイメージ)、および被写体の深度を示す深度データを生成する。ディープデプスオブフィールドイメージは、ピントが合っているように見える範囲が広い画像データである。シャロ―デプスオブフィールドイメージは、ピントが合っているように見える範囲が狭い画像データである。
First Embodiment
Configuration of data generation system 1
1 is a diagram showing a configuration of a data generation system 1 according to a first embodiment. The data generation system 1 generates image data simulating an image captured with a deep depth of field of the same subject (deep depth of field image), image data simulating an image captured with a shallow depth of field (shallow depth of field image), and depth data indicating the depth of the subject. The deep depth of field image is image data with a wide range that appears to be in focus. The shallow depth of field image is image data with a narrow range that appears to be in focus.
データ生成システム1は、データ生成装置11とモデル学習装置13とを備える。
データ生成装置11は、機械学習モデルである画像生成モデルおよび三次元生成モデルを用いて、ディープデプスオブフィールドイメージ、シャローデプスオブフィールドイメージおよび深度データの組を生成する。
モデル学習装置13は、実際の撮像画像を学習用データとして用いて画像生成モデルおよび三次元生成モデルの学習を行う。なお、学習用データに係る撮像画像は、三次元データに関する補足データを有する必要はない。つまり、学習用データは深度データなどの三次元データや、視点を異ならせた撮像画像のペアなどを含まなくてもよい。
The data generation system 1 includes a
The
The
《モデル学習装置13の構成》
図2は、第1の実施形態に係るモデル学習装置13の構成を示す概略ブロック図である。第1の実施形態に係るモデル学習装置13は、学習用データ記憶部131、モデル記憶部132、潜在変数生成部133、画像生成部134、三次元データ生成部135、変換部136、識別部137、算出部138、更新部139を備える。
Configuration of
2 is a schematic block diagram showing the configuration of the
学習用データ記憶部131は、複数の画像データを記憶する。各画像データは、撮像装置によって撮像された画像である。学習用データ記憶部131は、様々な被写界深度に係る画像データを記憶する。The learning
モデル記憶部132は、画像生成モデルGI、深度生成モデルGD、識別モデルC、および被写界深度効果レンダラRを記憶する。画像生成モデルGI、深度生成モデルGDおよび識別モデルCは、いずれもニューラルネットワーク(例えば、畳み込みニューラルネットワーク、全結合ニューラルネットワーク、再帰ニューラルネットワークなど)によって構成される。被写界深度効果レンダラRは、撮像装置の光学系を模擬する数理モデルによって構成される。
The
画像生成モデルGIは、潜在変数zを入力とし、被写界深度の深い撮像画像を模擬した画像データであるディープデプスオブフィールドイメージIg dを出力とする。潜在変数は、画像データを生成するシードとなる任意の数値である。 The image generation model G I has a latent variable z as input and outputs a deep depth of field image I g d , which is image data simulating a captured image with a deep depth of field. The latent variable is an arbitrary numerical value that serves as a seed for generating image data.
深度生成モデルGDは、潜在変数zを入力とし、ディープデプスオブフィールドイメージIg dの被写体の深度を表す深度データDgを出力とする。深度データDgの要素数はディープデプスオブフィールドイメージIg dの要素数と等しい。画像生成モデルGIと深度生成モデルGDとは、一部の層(例えば、入力層および中間層)を共通とするものであってよい。 The depth generation model GD takes a latent variable z as input and outputs depth data Dg representing the depth of a subject in a deep depth-of-field image Igd . The number of elements of the depth data Dg is equal to the number of elements of the deep depth-of-field image Igd . The image generation model G I and the depth generation model GD may share some layers (e.g., an input layer and an intermediate layer).
被写界深度効果レンダラRは、ディープデプスオブフィールドイメージIg dと深度データDgの組を入力とし、ディープデプスオブフィールドイメージIg dと同じ被写体に係る被写界深度の浅い撮像画像を模擬した画像データであるシャローデプスオブフィールドイメージIg sを出力とする。被写界深度効果レンダラRの詳細については後述する。 The depth of field effect renderer R receives a pair of a deep depth of field image I g d and depth data D g as input, and outputs a shallow depth of field image I g s which is image data simulating a captured image with a shallow depth of field relating to the same subject as the deep depth of field image I g d . Details of the depth of field effect renderer R will be described later.
識別モデルCは、画像データを入力とし、入力された画像データが実際の撮像画像である確率または実際の撮像画像である度合を示す評価値を出力とする。例えば、識別モデルCは、実際の撮像画像である確率を出力する場合、入力された画像データがディープデプスオブフィールドイメージIg dまたはシャローデプスオブフィールドイメージIg sである確率が高いほど0に近い値を出力し、実際の撮像データである確率が高いほど1に近い値を出力する。 The discrimination model C receives image data as input and outputs an evaluation value indicating the probability that the input image data is an actual captured image or the degree to which it is an actual captured image. For example, when outputting the probability that the input image data is an actual captured image, the discrimination model C outputs a value closer to 0 as the probability that the input image data is a deep depth-of-field image I g d or a shallow depth-of-field image I g s increases, and outputs a value closer to 1 as the probability that it is actual captured data increases.
画像生成モデルGI、深度生成モデルGD、識別モデルCおよび被写界深度効果レンダラRは、GANs(Generative Adversarial Networks)を構成する。画像生成モデルGI、深度生成モデルGDおよび被写界深度効果レンダラRの組み合わせは、Generatorである。識別モデルCは、Discriminatorである。 The image generation model G I , the depth generation model G D , the discriminative model C, and the depth of field effect renderer R constitute GANs (Generative Adversarial Networks). The combination of the image generation model G I , the depth generation model G D, and the depth of field effect renderer R is a Generator. The discriminative model C is a Discriminator.
潜在変数生成部133は、乱数に基づいて潜在変数zを生成する。例えば、潜在変数生成部133は、ガウシアン分布や一様分布などの任意の分布において、ランダムに潜在変数zを抽出する。なお、潜在変数生成部133は、学習用データ記憶部131が記憶する画像データから潜在変数zを抽出してもよい。The latent
画像生成部134は、潜在変数生成部133が生成した潜在変数zをモデル記憶部132が記憶する画像生成モデルGIに入力することで、ディープデプスオブフィールドイメージIg
dを生成する。つまり、画像生成部134は、以下の式(1)によりディープデプスオブフィールドイメージIg
dを算出する。
The
三次元データ生成部135は、潜在変数生成部133が生成した潜在変数zをモデル記憶部132が記憶する深度生成モデルGDに入力することで、三次元データである深度データDgを生成する。つまり、三次元データ生成部135は、以下の式(2)により深度データDgを算出する。
The three-dimensional
変換部136は、画像生成部134が生成したディープデプスオブフィールドイメージIg
dと三次元データ生成部135が生成した深度データDgとをモデル記憶部132が記憶する被写界深度効果レンダラRに入力することで、シャローデプスオブフィールドイメージIg
sを生成する。つまり、変換部136は、ディープデプスオブフィールドイメージIg
dをシャローデプスオブフィールドイメージIg
sに変換する。つまり、変換部136は、以下の式(3)によりシャローデプスオブフィールドイメージIg
sを生成する。式(3)においてsは、ディープデプスオブフィールドイメージIg
dとシャローデプスオブフィールドイメージIg
sの混合度、すなわち被写界深度の深さの度合いを表す。なお、混合度sが0である場合、計算結果はディープデプスオブフィールドイメージIg
dと等しくなる。
The
ここで、被写界深度効果レンダラRについて説明する。第1の実施形態に係る被写界深度効果レンダラRは、仮想の光学系における光線の経路を計算し、仮想の光学系における開口面積を広げることで被写界深度の変換を行う。具体的には、被写界深度効果レンダラRは、深度データDgを変形関数Tを用いて変形することで、式(4)に示すように画像面上の位置座標xおよび開口面上の角度座標uと被写体の深度の関係を示す深度マップMg(x,u)を演算する。次に被写界深度効果レンダラRは、深度マップMg(x,u)に基づいて、式(5)に示すようにディープデプスオブフィールドイメージIg dから、開口面上の視線方向ごとに入射する光によって結像される画像Lg(x,u)を演算する。そして、被写界深度効果レンダラRは、式(6)に示すように光学系の開口を模擬するインディケータA(u)を用いて画像Lg(x,u)を統合することで、シャローデプスオブフィールドイメージIg sを生成する。 Here, the depth of field effect renderer R will be described. The depth of field effect renderer R according to the first embodiment calculates the path of a ray in a virtual optical system, and converts the depth of field by widening the aperture area in the virtual optical system. Specifically, the depth of field effect renderer R calculates a depth map M g (x, u) indicating the relationship between the position coordinate x on the image plane and the angle coordinate u on the aperture plane and the depth of the subject, as shown in formula (4), by transforming the depth data D g using a transformation function T. Next, the depth of field effect renderer R calculates an image L g ( x, u) formed by the light incident for each line of sight direction on the aperture plane from the deep depth of field image I g d based on the depth map M g (x, u), as shown in formula (5). Then, the depth-of-field effect renderer R generates a shallow depth-of-field image I g s by integrating the image L g (x, u) using an indicator A(u) that simulates the aperture of the optical system as shown in equation ( 6 ) .
式(5)におけるm(hat)は、ピント位置までの距離(過焦点距離)を示す。m(hat)は、学習によって獲得される値であってもよいし、所定の分布から抽出される乱数であってもよいし、定数(例えばゼロ)であってもよい。
インディケータA(u)は、開口部に相当する要素の値が正値で、開口部以外の要素の値が0であり、すべての要素の値の和が1となる行列である。インディケータA(u)が模擬する開口部の形状は例えば円形である。このように、被写界深度効果レンダラRには、光線空間を考慮した光学的な制約が与えられている。これにより、被写界深度効果レンダラRは、光学的に整合性のとれた画像変換を実現することができる。
In formula (5), m (hat) indicates the distance to the focal position (hyperfocal distance). m (hat) may be a value acquired by learning, a random number extracted from a predetermined distribution, or a constant (e.g., zero).
Indicator A(u) is a matrix in which the values of elements corresponding to openings are positive, the values of elements other than openings are 0, and the sum of the values of all elements is 1. The shape of the opening simulated by indicator A(u) is, for example, a circle. In this way, the depth of field effect renderer R is given optical constraints that take into account the light space. This allows the depth of field effect renderer R to realize optically consistent image conversion.
なお、被写界深度効果レンダラRは、深度データDg(x)に基づくワーピング関数(変形関数)によって構成されてもよいし、ニューラルネットワークモデルによって構成されてもよい。被写界深度効果レンダラRがニューラルネットワークモデルを構成に含む場合、ワーピング関数による変形結果に基づく制約を与えられてもよい。具体的には、被写界深度効果レンダラRは、ワーピング関数によって変形された深度データDgをニューラルネットワークモデルに入力するように構成されてもよい。 The depth of field effect renderer R may be configured by a warping function (transformation function) based on the depth data D g (x), or may be configured by a neural network model. When the depth of field effect renderer R includes a neural network model, it may be given a constraint based on the transformation result by the warping function. Specifically, the depth of field effect renderer R may be configured to input the depth data D g transformed by the warping function to the neural network model.
識別部137は、ディープデプスオブフィールドイメージIg
d、シャローデプスオブフィールドイメージIg
sおよび学習用データ記憶部131が記憶する撮像画像を識別モデルCに入力することで、入力された画像データが実際の撮像画像である度合を示す評価値を算出する。
The
算出部138は、画像生成モデルGI、深度生成モデルGDおよび識別モデルCの学習に用いる学習基準(損失関数)を算出する。具体的には、算出部138は、敵対的学習基準に基づいて学習基準を算出する。
敵対的学習基準LAR-GANとは、画像データが実際の撮像画像であるか撮像画像を模擬した画像データであるかの判断の正確さを示す指標である。算出部138は、以下の式(7)に示すように、敵対的学習基準LAR-GANを求める。
The
The adversarial learning criterion L AR-GAN is an index indicating the accuracy of determining whether image data is an actual captured image or image data simulating a captured image. The
式(7)において、s~Ps(s)は、ディープデプスオブフィールドイメージIg dとシャローデプスオブフィールドイメージIg sの混合度、すなわち被写界深度の深さの度合いを表す。分布Ps(s)は、0以上1以下の値域に係る分布、例えば二項分布や一様分布などを用いることができる。また、z~Pz(z)は、潜在変数zを分布Pz(z)から抽出する処理を示す。なお、式(7)では学習基準としてクロスエントロピーを用いるが、これに限られず、L1距離やL2距離、ワッサースタイン距離などの任意の距離基準に基づく学習基準を用いてもよい。 In formula (7), s to P s (s) represent the degree of mixing of the deep depth of field image I g d and the shallow depth of field image I g s , that is, the degree of depth of field. The distribution P s (s) can be a distribution related to a range of values from 0 to 1, such as a binomial distribution or a uniform distribution. In addition, z to P z (z) represent a process of extracting the latent variable z from the distribution P z (z). Note that, although cross-entropy is used as the learning criterion in formula (7), this is not limited thereto, and a learning criterion based on any distance criterion such as L1 distance, L2 distance, or Wasserstein distance may be used.
更新部139は、算出部138が算出した敵対的学習基準LAR-GANに基づいて画像生成モデルGI、深度生成モデルGDおよび識別モデルCのパラメータを更新する。具体的には、更新部139は、識別モデルCについて、敵対的学習基準LAR-GANが大きくなるようにパラメータを更新する。また更新部139は、画像生成モデルGIおよび深度生成モデルGDについて、敵対的学習基準LAR-GANが小さくなるようにパラメータを更新する。また、被写界深度効果レンダラRが学習可能なパラメータを持つ場合、被写界深度効果レンダラRについて、敵対的学習基準LAR-GANが小さくなるようにパラメータを更新する。
The
シャローデプスオブフィールドイメージIg sは、光学的制約を有する被写界深度効果レンダラRを用いて、深度データDgから生成される。そのため、識別モデルCがシャローデプスオブフィールドイメージIg sを実際の撮像画像であると誤判定させるためには、上記光学的制約の下、適切な深度データDgを生成する必要がある。したがって、第1の実施形態に係るモデル学習装置13は、上記の学習基準に従ってパラメータを更新することで、ディープデプスオブフィールドイメージIg d、シャローデプスオブフィールドイメージIg sおよび深度データDgの組が適切に生成できるように画像生成モデルGIおよび深度生成モデルGDのパラメータを更新することができる。また、被写界深度効果レンダラRが学習可能なパラメータを持つ場合、被写界深度効果レンダラRのパラメータを更新することができる。 The shallow depth-of-field image I g s is generated from the depth data D g using a depth-of-field effect renderer R having optical constraints. Therefore, in order for the discrimination model C to erroneously determine that the shallow depth-of-field image I g s is an actual captured image, it is necessary to generate appropriate depth data D g under the above optical constraints. Therefore, the model learning device 13 according to the first embodiment can update the parameters of the image generation model G I and the depth generation model G D so that a set of the deep depth-of-field image I g d , the shallow depth-of-field image I g s, and the depth data D g can be appropriately generated by updating the parameters according to the above learning criterion. In addition, when the depth-of-field effect renderer R has parameters that can be learned, the parameters of the depth-of-field effect renderer R can be updated.
《モデル学習装置13の動作》
図3は、第1の実施形態に係るモデル学習装置13の動作を示すフローチャートである。図4は、第1の実施形態に係る学習処理におけるデータの変遷を示す図である。
モデル学習装置13が学習処理を開始すると、以下に示すステップS1からステップS6の処理を、所定回数繰り返し実行する。まず潜在変数生成部133は、乱数と所定の分布とに基づいて潜在変数zを生成する(ステップS1)。次に、画像生成部134は、ステップS1で生成した潜在変数zをモデル記憶部132が記憶する画像生成モデルGIに入力することで、ディープデプスオブフィールドイメージIg
dを生成する(ステップS2)。
<<Operation of
Fig. 3 is a flowchart showing the operation of the
When the
また三次元データ生成部135は、ステップS1で生成した潜在変数zをモデル記憶部132が記憶する深度生成モデルGDに入力することで、深度データDgを生成する(ステップS3)。次に、変換部136は、0以上1以下の混合度sを所定の分布に従って決定する(ステップS4)。変換部136は、ステップS2で生成したディープデプスオブフィールドイメージIg
dと、ステップS3で生成した深度データDgに混合度sを乗算したものとを、モデル記憶部132が記憶する被写界深度効果レンダラRに入力することで、シャローデプスオブフィールドイメージIg
sを生成する(ステップS5)。なお、混合度sがゼロである場合、生成されるシャローデプスオブフィールドイメージIg
sはディープデプスオブフィールドイメージIg
dと一致する。次に、識別部137は、シャローデプスオブフィールドイメージIg
sを識別モデルCに入力することで、入力されたシャローデプスオブフィールドイメージIg
sが実際の撮像画像である度合を示す評価値を算出する(ステップS6)。
The three-dimensional
モデル学習装置13は、所定数の潜在変数zから生成されたシャローデプスオブフィールドイメージIg
sについての評価値を算出すると、以下に示すステップS7からステップS8の処理を所定回数繰り返し実行する。まず識別部137は、学習用データ記憶部131から任意の撮像画像を読み出す(ステップS7)。識別部137は、読み出した撮像画像を識別モデルCに入力することで、入力された撮像画像が実際の撮像画像である度合を示す評価値を算出する(ステップS8)。
After calculating an evaluation value for the shallow depth-of-field image I g s generated from a predetermined number of latent variables z, the
算出部138は、ステップS6で算出した評価値およびステップS8で算出した評価値を用いて、上述の式(7)に基づいて敵対的学習基準LAR-GANを算出する(ステップS9)。更新部139は、ステップS9で算出した敵対的学習基準LAR-GANに基づいて画像生成モデルGI、深度生成モデルGDおよび識別モデルCのパラメータを更新する(ステップS10)。また、被写界深度効果レンダラRが学習可能なパラメータを持つ場合、被写界深度効果レンダラRのパラメータを更新する。
The
更新部139は、ステップS1からステップS10によるパラメータの更新を、所定のエポック数だけ繰り返し実行したか否かを判定する(ステップS11)。繰り返しが所定のエポック数に満たない場合(ステップS11:NO)、モデル学習装置13はステップS1に処理を戻し、学習処理を繰り返し実行する。The
他方、繰り返しが所定のエポック数に達した場合(ステップS11:YES)、モデル学習装置13は学習処理を終了する。これにより、モデル学習装置13は、学習済みモデルである画像生成モデルGIおよび深度生成モデルGDを生成することができる。また、被写界深度効果レンダラRが学習可能なパラメータを持つ場合、学習済みモデルである被写界深度効果レンダラRを生成することができる。
On the other hand, if the repetition reaches a predetermined number of epochs (step S11: YES), the
《データ生成装置11の構成》
図5は、第1の実施形態に係るデータ生成装置11の構成を示す概略ブロック図である。
第1の実施形態に係るデータ生成装置11は、モデル記憶部111、潜在変数生成部112、画像生成部113、三次元データ生成部114、変換部115、出力部116を備える。
Configuration of
FIG. 5 is a schematic block diagram showing the configuration of a
The
モデル記憶部111は、モデル学習装置13による学習済みの画像生成モデルGIおよび深度生成モデルGD、およびモデル学習装置13と同じ被写界深度効果レンダラRを記憶する。
The model storage unit 111 stores the image generation model G I and depth generation model G D that have been trained by the
潜在変数生成部112、画像生成部113、三次元データ生成部114および変換部115は、モデル学習装置13が備える、潜在変数生成部133、画像生成部134、三次元データ生成部135および変換部136と同様の処理を実行する。なお、変換部115は、シャローデプスオブフィールドイメージIg
sを生成する際、混合度sを1として計算する。
The latent
出力部116は、画像生成部113が生成したディープデプスオブフィールドイメージIg
d、三次元データ生成部114が生成した深度データDgおよび変換部115が生成したシャローデプスオブフィールドイメージIg
sを出力する。
The
《作用・効果》
これにより、データ生成装置11は、二次元画像であるディープデプスオブフィールドイメージIg
dおよびシャローデプスオブフィールドイメージIg
sと、三次元データである深度データDgとの組を生成することができる。データ生成装置11がこれらのデータの組を生成するために用いる画像生成モデルGIおよび深度生成モデルGDは、三次元データに関する補足データなしに学習されたものである。つまり、第1の実施形態に係るデータ生成システム1によれば、三次元データに関する補足データなしに、二次元画像と、当該二次元画像に対応する三次元データとを生成することができる。
<Action and Effects>
This allows the
これは、モデル学習装置13が、ディープデプスオブフィールドイメージIg
dの経験分布およびディープデプスオブフィールドイメージIg
dと深度データDgから生成されたシャローデプスオブフィールドイメージIg
sの経験分布が、いずれも実際の撮像画像の経験分布に近くなるようにモデルを学習させるためである。つまり、ディープデプスオブフィールドイメージIg
dと深度データDgから生成されたシャローデプスオブフィールドイメージIg
sが、実際の撮像画像の経験分布に近くなるためには、適切な深度データDgが得られている必要があり、シャローデプスオブフィールドイメージIg
sが、実際の撮像画像の経験分布に近くなったということは、モデルが適切な深度データDgを得ることができるように学習されたことを示すためである。
This is because the
《実験結果》
第1の実施形態に係るデータ生成システム1を用いたデータペアの生成の実験結果の一例を説明する。実験では、学習用データとして花画像、鳥画像、顔画像に係る撮像画像が用いられた。
<Experimental Results>
A description will be given of an example of an experimental result of generating data pairs using the data generation system 1 according to the first embodiment. In the experiment, captured images related to flower images, bird images, and face images were used as learning data.
実験では、データ生成システム1は正規分布N(0,1)に基づいてランダムに潜在変数zを抽出した。画像生成モデルGI、深度生成モデルGDおよび識別モデルCは、CNNによって構成した。被写体深度効果レンダラRの変形関数Tは、Dg(x)に基づいてワーピングを行った後、CNNを適用する構成を用いた。 In the experiment, the data generation system 1 randomly extracted latent variables z based on a normal distribution N(0,1). The image generation model G I , the depth generation model G D and the discriminative model C were configured using CNN. The transformation function T of the subject depth effect renderer R was configured to apply CNN after warping based on D g (x).
実験において、非特許文献1に記載のRGBD-GANを比較例とした。
評価方法として、第1の実施形態に係るデータ生成システム1および非特許文献1の手法のそれぞれで生成されたデータペアを教師データとして用いた画像データから深度データへの変換器の精度を比較する方法を採用した。具体的には、第1の実施形態に係るデータ生成システム1および非特許文献1の手法のそれぞれで生成されたデータペアを教師データとして用いた変換器による計算結果と、実際の撮像画像と実際の深度データのペア(実ペアデータ)とを教師データとして用いた変換器による計算結果との一致度を比較した。評価尺度は、Scale-Invariant Depth Error(SIDE)を用いた。SIDEは、値が小さいほど性能がよいことを示す。
In the experiment, the RGBD-GAN described in Non-Patent Document 1 was used as a comparative example.
As an evaluation method, a method was adopted in which the accuracy of a converter from image data to depth data using data pairs generated by the data generation system 1 according to the first embodiment and the method of Non-Patent Document 1 as teacher data was compared. Specifically, the degree of agreement between the calculation result by the converter using the data pairs generated by the data generation system 1 according to the first embodiment and the method of Non-Patent Document 1 as teacher data and the calculation result by the converter using a pair of an actual captured image and actual depth data (actual pair data) as teacher data was compared. Scale-Invariant Depth Error (SIDE) was used as the evaluation scale. The smaller the SIDE value, the better the performance.
その結果、第1の実施形態に係るデータ生成システム1が非特許文献1の手法よりもSIDEの値が小さいことを確認した。すなわち、第1の実施形態に係るデータ生成システム1が非特許文献1の手法よりも実ペアデータを用いて学習した変換結果との一致度が高いことを確認した。なお、非特許文献1の手法は、視点に関する手がかりを予め取得しておく必要があるのに対し、第1の実施形態に係るデータ生成システム1ではこのような情報が不要である。また、非特許文献1の手法は、画像データと深度データのペアを生成するのに対し、第1の実施形態に係るデータ生成システム1は、ディープデプスオブフィールドイメージIg d、深度データDgおよびシャローデプスオブフィールドイメージIg sの組を得ることができる。 As a result, it was confirmed that the data generation system 1 according to the first embodiment has a smaller SIDE value than the method of Non-Patent Document 1. That is, it was confirmed that the data generation system 1 according to the first embodiment has a higher degree of agreement with the conversion result learned using actual pair data than the method of Non-Patent Document 1. Note that the method of Non-Patent Document 1 requires a clue regarding the viewpoint to be acquired in advance, whereas the data generation system 1 according to the first embodiment does not require such information. In addition, while the method of Non-Patent Document 1 generates a pair of image data and depth data, the data generation system 1 according to the first embodiment can obtain a set of a deep depth-of-field image I g d , depth data D g, and a shallow depth-of-field image I g s .
〈第2の実施形態〉
第1の実施形態に係るデータ生成システム1は、光線空間に基づく光学的な制約を有する被写界深度効果レンダラRを用いてシャローデプスオブフィールドイメージIg
sを生成する。これに対し、第2の実施形態に係るデータ生成システム1は、深度とボケ効果の大きさとの関係に基づく光学的な制約を有する被写界深度効果レンダラRを用いてシャローデプスオブフィールドイメージIg
sを生成する。
Second Embodiment
The data generation system 1 according to the first embodiment generates the shallow depth-of-field image I g s using a depth-of-field effect renderer R having optical constraints based on the light space, whereas the data generation system 1 according to the second embodiment generates the shallow depth-of-field image I g s using a depth-of-field effect renderer R having optical constraints based on the relationship between depth and the magnitude of the bokeh effect.
第2の実施形態に係る被写界深度効果レンダラRは、以下の式(8)、(9)で表されるカーネルkを用いて計算を行う。 The depth of field effect renderer R of the second embodiment performs calculations using the kernel k expressed by the following equations (8) and (9).
式(8)において,[・]はアイバーソンの記法を表し、括弧内の条件が真ならば1、偽ならば0をとる。mは、被写体の位置を基準としたピント位置の深度を示す。深度mがゼロであることは、被写体にフォーカスがあっていることを示す。深度mが正の値であることは、ピント位置が被写体より手前側に位置することを示す。深度mが負の値であることは、ピント位置が被写体より奥側に位置することを示す。この定義により,k(hat)(x,m)は,半径|m|以内の中央部のみ値1を持ち,それ以外は値0を持つ。つまり、深度|m|が大きければ大きいほど、中央の円形部の大きさは大きくなり、このカーネルを画像に畳み込んだ時のボケ効果は大きくなる。また式(9)は、k(x,m)の要素の値の合計が1となるようにk(hat)(x,m)を正規化する処理を表す式である。In formula (8), [.] represents Iverson's notation, and takes the value 1 if the condition in the brackets is true, and 0 if it is false. m represents the depth of the focus position based on the position of the subject. A depth m of zero indicates that the subject is in focus. A positive value for depth m indicates that the focus position is located in front of the subject. A negative value for depth m indicates that the focus position is located behind the subject. By this definition, k(hat)(x,m) has a value of 1 only in the center within a radius of |m|, and a value of 0 elsewhere. In other words, the larger the depth |m|, the larger the size of the circular part in the center, and the greater the blur effect when this kernel is convolved with the image. Formula (9) represents the process of normalizing k(hat)(x,m) so that the sum of the values of the elements of k(x,m) is 1.
また、第2の実施形態では、三次元データ生成部135は、Dgを算出する前段階として、三次元データ生成部135は、深度情報の確率分布P(x,m)を生成する。ここで、P(x,m)は位置座標xの深度mにおける深度の存在確率を表す。つまり、各座標xについて存在確率P(x,m)の総和は1となる。P(x,m)が得られたとき,Dg(x)は、例えば式(10)に示すように、P(x,m)に対して,各座標xごとに最大となる深度mを算出することによって求めることが可能である。
In the second embodiment, the three-
三次元データ生成部135は、式(10)の演算を行う際、前処理として、P(x,m)に対してスムージングなどを行なってもよい。そして、変換部136は、以下の式(11)にように、カーネルk(x,m)とディープデプスオブフィールドイメージIg
dとを畳み込んだ結果と、深度データの確率分布P(x,m)とを乗算し、その和をとることによりシャローデプスオブフィールドイメージIg
sを合成することができる。
When performing the calculation of formula (10), the three-dimensional
式(11)において演算子*は畳み込み演算を表す。このように、第2の実施形態に係る被写界深度効果レンダラRを用いた演算は、形状が事前に定められたカーネルkとの畳み込みと、その重み付き和とに制約される。これにより、変換部136は、第1の実施形態と同様に、光学的に整合性のとれた変換を実現することができ、変換の過程において画像の内容を大きく棄損することなくボケ度合だけを変えることができる。
また、第1の実施形態に係るデータ生成システム1では、式(3)において、深度データに混合度sを乗算することによって被写界深度の度合いを調整するが、第2の実施形態に係るデータ生成システム2においては、式(11)において、k(x,m)のmに混合度sを乗算する(つまり、k(x,s・m)とする)ことによって、被写界深度の度合いを調整することが可能である。例えば、sが0の場合、k(x,m)は中心のみが1で、それ以外は0のカーネルとなるため、式(11)の出力は、被写界深度の深い画像になる。
In formula (11), the operator * represents a convolution operation. In this way, the operation using the depth of field effect renderer R according to the second embodiment is restricted to a convolution with a kernel k whose shape is determined in advance, and a weighted sum thereof. This allows the
In the data generation system 1 according to the first embodiment, the depth of field is adjusted by multiplying the depth data by the degree of mixture s in formula (3), but in the data generation system 2 according to the second embodiment, the degree of depth of field can be adjusted by multiplying m in k(x,m) by the degree of mixture s in formula (11) (i.e., k(x,s·m)). For example, when s is 0, k(x,m) has a kernel of 1 only at the center and 0 elsewhere, so that the output of formula (11) is an image with a deep depth of field.
〈第3の実施形態〉
画像におけるボケは、被写体がピント位置より手前側にある場合と、奥側にあるために発生している場合とのそれぞれにおいて発生する。一方で、画像データから、被写体が手前側に存在するためにボケが生じているか、奥側に存在するためにボケが生じているかを判断することは困難である。そこで、第3の実施形態に係るデータ生成システム1では、ピントが合う被写体(対象物)が画像の中心近傍に存在する可能性が高く、また対象物の近傍に写る被写体は背景であることが多いというヒューリスティックスに基づいて、モデルの更新に用いる目的関数を算出する。
Third embodiment
Blurring in an image occurs when the subject is in front of the focal position and when it occurs because the subject is in the back. However, it is difficult to determine from image data whether blurring occurs because the subject is in front or in the back. Therefore, in the data generation system 1 according to the third embodiment, an objective function used for updating the model is calculated based on heuristics that a subject (object) in focus is likely to be near the center of the image, and objects near the object are often background.
第3の実施形態に係る算出部138は、式(7)に示す敵対的学習基準LAR-GANに加え、以下の式(12)、(13)で表される深度学習基準Lpを求める。
The
式(12)においてrは画像中心からの距離を示し、rthとgはそれぞれ対象物の大きさと深さを定めるハイパーパラメータである。式(12)に示す事前深度データDpは、半径rth以内はピント位置にあることを示し、中心からの距離がrthより遠いほど、ピント位置より奥側に位置することを示す。また式(13)においてλpは深度学習基準Lpの重みを表すハイパーパラメータである。深度学習基準Lpは、深度データDgと事前深度データDpとの距離がゼロに近いほど低くなる。つまり、深度学習基準Lpは、深度データDgのうち少なくともフォーカスされる可能性が高い部分と予め定めたピント位置に係る深度との距離がゼロに近いほど低くなる。なお、式(13)では学習基準としてL2距離に基づくものを用いるが、これに限られず、L1距離やワッサースタイン距離などの任意の距離基準に基づく学習基準を用いてもよい。 In formula (12), r indicates the distance from the center of the image, and r th and g are hyperparameters that determine the size and depth of the object, respectively. The pre-depth data D p shown in formula (12) indicates that the focus position is within a radius r th , and the farther the distance from the center is from r th , the deeper the focus position is. In formula (13), λ p is a hyperparameter that represents the weight of the depth learning criterion L p . The closer the distance between the depth data D g and the pre-depth data D p is to zero, the lower the depth learning criterion L p is. In other words, the closer the distance between at least a part of the depth data D g that is likely to be focused and the depth related to the predetermined focus position is to zero, the lower the depth learning criterion L p is. Note that, in formula (13), the learning criterion based on the L2 distance is used, but is not limited to this, and a learning criterion based on any distance criterion such as the L1 distance or the Wasserstein distance may be used.
上記の例では、予め定めたピント位置での深度をゼロ、当該位置以外での深度を、ピント位置より奥側となるように予め定めた値としているが、これに限られない。例えば、ヒューリスティックスに基づいて、画像の一部または全体領域における各位置での深度を予め定めておくことができる場合、深度学習基準Lpは、各位置において深度データDgと当該予め定めた深度との距離がゼロに近いほど低くなるものであってよい。また、式(13)に示す深度学習基準Lpは、画像の全体領域について深度データDgが示す深度と予め定めた深度との距離を求めるが、これに限られない。例えば深度学習基準Lpは、深度データDgのうち半径rth以内の領域や、ヒューリスティックスに基づいてフォーカスされる可能性が高いと判定された領域など、深度データDgの一部領域のみにおける距離に基づいて計算されるものであってもよい。また例えば深度学習基準Lpは、深度データDgのうち半径rthより外側の領域や、ヒューリスティックスに基づいてフォーカスされる可能性が低いと判定された領域などにおける深度が、遠景または近景に係る予め定めた深度に近いほど低くなるものであってもよい。 In the above example, the depth at the predetermined focus position is set to zero, and the depth at other positions is set to a value that is predetermined to be deeper than the focus position, but is not limited to this. For example, when the depth at each position in a part or the entire region of the image can be predetermined based on heuristics, the depth learning standard L p may be lower as the distance between the depth data D g and the predetermined depth at each position approaches zero. In addition, the depth learning standard L p shown in formula (13) obtains the distance between the depth indicated by the depth data D g and the predetermined depth for the entire region of the image, but is not limited to this. For example, the depth learning standard L p may be calculated based on the distance in only a part of the region of the depth data D g , such as a region within a radius r th of the depth data D g or a region determined to be highly likely to be focused based on heuristics. Furthermore, for example, the depth learning standard Lp may be such that the depth in an area of the depth data Dg that is outside the radius rth or an area that is determined to be unlikely to be focused based on heuristics becomes lower as the area approaches a predetermined depth related to the distant view or the near view.
更新部139は、敵対的学習基準LAR-GANと深度学習基準Lpの和に基づいて、深度生成モデルGDのパラメータを更新する。これにより、中心にフォーカスがあい、周囲が背景となる深度データDgが生成されることが促進される。なお、更新部139は、深度学習基準Lpを学習の全工程において用いてもよいし、学習の途中段階まで用いてもよい。更新部139は、深度学習基準Lpを所定のエポック数に至るまで用い、以降用いないようにすることで、実際の深度データと事前深度データDpとにギャップがあった場合のネガティブな効果を抑制することができる。
The
《変形例》
第3の実施形態に係るデータ生成システム1は、対象物が画像の中心近傍に存在する可能性が高く、また対象物の近傍に写る被写体は背景であることが多いというヒューリスティックスに基づいて、式(12)に基づいて事前深度データDpを算出するが、これに限られない。例えば、他の実施形態においては、対象物の近傍に写る被写体は前景であることが多いというヒューリスティックスに基づいて計算してもよいし、人の顔がフォーカスされる可能性が高いというヒューリスティックスに基づいて、パターンマッチング処理により検出された顔の位置に基づいて事前深度データDpを算出してもよい。また、rthおよびgをハイパーパラメータではなく学習により更新するパラメータとしてもよい。
<<Variation>>
The data generation system 1 according to the third embodiment calculates the preliminary depth data D p based on the formula (12) based on the heuristics that the object is likely to be present near the center of the image and the object near the object is likely to be the background, but is not limited to this. For example, in other embodiments, the calculation may be based on the heuristics that the object near the object is likely to be the foreground, or the preliminary depth data D p may be calculated based on the position of the face detected by the pattern matching process based on the heuristics that the human face is likely to be focused. In addition, r th and g may be parameters that are updated by learning instead of hyperparameters.
〈他の実施形態〉
以上、図面を参照して一実施形態について詳しく説明してきたが、具体的な構成は上述のものに限られることはなく、様々な設計変更等をすることが可能である。すなわち、他の実施形態においては、上述の処理の順序が適宜変更されてもよい。また、一部の処理が並列に実行されてもよい。
上述した実施形態に係るデータ生成システム1は、データ生成装置11とモデル学習装置13とを備えるが、単独のコンピュータによって構成されるものであってもよい。
Other Embodiments
Although one embodiment has been described in detail above with reference to the drawings, the specific configuration is not limited to the above, and various design changes are possible. That is, in other embodiments, the order of the above-mentioned processes may be changed as appropriate. Also, some of the processes may be executed in parallel.
The data generation system 1 according to the embodiment described above includes the
上述した実施形態に係るデータ生成システム1は、GANsによって画像生成モデルGIおよび深度生成モデルGDのパラメータを更新するが、これに限られない。例えば、他の実施形態に係るデータ生成システム1は、Variational Autoencoder、Flow Model、Denoising Diffusion Probablistic Modelなどの任意の生成モデルにおける学習基準によって画像生成モデルGIおよび深度生成モデルGDのパラメータを更新してもよい。 The data generation system 1 according to the embodiment described above updates the parameters of the image generation model G I and the depth generation model G D using GANs, but is not limited to this. For example, the data generation system 1 according to another embodiment may update the parameters of the image generation model G I and the depth generation model G D using a learning criterion in any generation model, such as a Variational Autoencoder, a Flow Model, or a Denoising Diffusion Probablistic Model.
また、上述の実施形態に係る被写界深度効果レンダラRは、光学系の制約を模擬する数理モデルであるが、これに限られない。例えば被写界深度効果レンダラRは、ニューラルネットワークによって構成された学習済みモデルであってもよい。また、光学系に関わるパラメータなど被写界深度効果レンダラRの一部のパラメータを学習パラメータとして持っていてもよい。また、被写界深度効果レンダラRが学習可能なパラメータを持つ場合、画像生成モデルGIおよび深度生成モデルGDと同時に学習してもよい。 In addition, the depth of field effect renderer R according to the above embodiment is a mathematical model that simulates the constraints of the optical system, but is not limited thereto. For example, the depth of field effect renderer R may be a trained model configured by a neural network. In addition, some parameters of the depth of field effect renderer R, such as parameters related to the optical system, may be held as training parameters. In addition, when the depth of field effect renderer R has trainable parameters, it may be trained simultaneously with the image generation model G I and the depth generation model G D.
また、上述の実施形態に係るデータ生成装置11は、ディープデプスオブフィールドイメージIg
d、シャローデプスオブフィールドイメージIg
sおよび深度データDgの組を出力するが、これに限られない。例えば、他の実施形態に係るデータ生成装置11は、ディープデプスオブフィールドイメージIg
dと深度データDgの組を出力し、シャローデプスオブフィールドイメージIg
sを出力しなくてもよい。また、他の実施形態に係るデータ生成装置11は、シャローデプスオブフィールドイメージIg
sと深度データDgの組を出力し、ディープデプスオブフィールドイメージIg
dを出力しなくてもよい。また、他の実施形態に係るデータ生成装置11は、ディープデプスオブフィールドイメージIg
dとシャローデプスオブフィールドイメージIg
sの組を出力し、深度データDgを出力しなくてもよい。また、他の実施形態に係るデータ生成装置11は、ディープデプスオブフィールドイメージIg
d、シャローデプスオブフィールドイメージIg
sおよび深度データDgの組の少なくとも一部を統合したデータを出力してもよい。例えばデータ生成装置11は、ディープデプスオブフィールドイメージIg
dと深度データDgを、深度情報を含む画像データとして出力してもよい。
Furthermore, the
〈コンピュータ構成〉
図6は、少なくとも1つの実施形態に係るコンピュータの構成を示す概略ブロック図である。
コンピュータ20は、プロセッサ21、メインメモリ23、ストレージ25、インタフェース27を備える。
上述のデータ生成装置11およびモデル学習装置13は、コンピュータ20に実装される。そして、上述した各処理部の動作は、プログラムの形式でストレージ25に記憶されている。プロセッサ21は、プログラムをストレージ25から読み出してメインメモリ23に展開し、当該プログラムに従って上記処理を実行する。また、プロセッサ21は、プログラムに従って、上述した各記憶部に対応する記憶領域をメインメモリ23に確保する。プロセッサ21の例としては、CPU(Central Processing Unit)、GPU(Graphic Processing Unit)、マイクロプロセッサなどが挙げられる。
Computer Configuration
FIG. 6 is a schematic block diagram illustrating a computer configuration according to at least one embodiment.
The
The above-mentioned
プログラムは、コンピュータ20に発揮させる機能の一部を実現するためのものであってもよい。例えば、プログラムは、ストレージに既に記憶されている他のプログラムとの組み合わせ、または他の装置に実装された他のプログラムとの組み合わせによって機能を発揮させるものであってもよい。なお、他の実施形態においては、コンピュータ20は、上記構成に加えて、または上記構成に代えてPLD(Programmable Logic Device)などのカスタムLSI(Large Scale Integrated Circuit)を備えてもよい。PLDの例としては、PAL(Programmable Array Logic)、GAL(Generic Array Logic)、CPLD(Complex Programmable Logic Device)、FPGA(Field Programmable Gate Array)が挙げられる。この場合、プロセッサ21によって実現される機能の一部または全部が当該集積回路によって実現されてよい。このような集積回路も、プロセッサの一例に含まれる。The program may be for realizing part of the functions to be performed by the
ストレージ25の例としては、磁気ディスク、光磁気ディスク、光ディスク、半導体メモリ等が挙げられる。ストレージ25は、コンピュータ20のバスに直接接続された内部メディアであってもよいし、インタフェース27または通信回線を介してコンピュータ20に接続される外部メディアであってもよい。また、このプログラムが通信回線によってコンピュータ20に配信される場合、配信を受けたコンピュータ20が当該プログラムをメインメモリ23に展開し、上記処理を実行してもよい。少なくとも1つの実施形態において、ストレージ25は、一時的でない有形の記憶媒体である。Examples of
また、当該プログラムは、前述した機能の一部を実現するためのものであってもよい。さらに、当該プログラムは、前述した機能をストレージ25に既に記憶されている他のプログラムとの組み合わせで実現するもの、いわゆる差分ファイル(差分プログラム)であってもよい。The program may be for realizing part of the above-mentioned functions. Furthermore, the program may be a so-called differential file (differential program) that realizes the above-mentioned functions in combination with another program already stored in
1…データ生成システム 11…データ生成装置 111…モデル記憶部 112…潜在変数生成部 113…画像生成部 114…三次元データ生成部 115…変換部 116…出力部 13…モデル学習装置 131…学習用データ記憶部 132…モデル記憶部 133…潜在変数生成部 134…画像生成部 135…三次元データ生成部 136…変換部 137…識別部 138…算出部 139…更新部1...
Claims (10)
前記潜在変数を機械学習モデルである三次元生成モデルに入力することで、前記第1画像データに対応する三次元データを生成する三次元データ生成部と、
前記第1画像データと前記三次元データとに基づいて、第2被写界深度に係る撮像画像を模擬した第2画像データを生成する変換部と、
前記第1画像データおよび前記第2画像データの分布と実際の撮像画像の経験分布との近さの度合いを示す学習基準値を算出する算出部と、
前記学習基準値に基づいて前記画像生成モデルおよび前記三次元生成モデルのパラメータを更新する更新部と
を備える学習装置。 an image generation unit that generates first image data simulating a captured image related to the first depth of field by inputting the latent variables into an image generation model that is a machine learning model;
a three-dimensional data generation unit that generates three-dimensional data corresponding to the first image data by inputting the latent variables into a three-dimensional generation model that is a machine learning model;
A conversion unit that generates second image data simulating a captured image related to a second depth of field based on the first image data and the three-dimensional data;
a calculation unit that calculates a learning reference value indicating a degree of similarity between a distribution of the first image data and the second image data and an empirical distribution of an actual captured image;
and an update unit that updates parameters of the image generation model and the three-dimensional generation model based on the learning reference value.
請求項1に記載の学習装置。 The learning device according to claim 1 , wherein the second depth of field is shallower than the first depth of field.
請求項1または請求項2に記載の学習装置。 The learning device according to claim 1 or 2, wherein the conversion unit generates the second image data by inputting the first image data and the three-dimensional data into a mathematical model that simulates constraints of an optical system.
前記学習基準値は、前記識別部による識別しにくさの度合いを示し、
前記更新部は、前記学習基準値に基づいてさらに前記識別モデルのパラメータを更新する
請求項1から請求項3の何れか1項に記載の学習装置。 an identification unit that inputs at least one of the first image data and the second image data and the actual captured image into an identification model that is a machine learning model that receives image data as input and determines whether the image data is an actual captured image or image data simulating a captured image, and identifies the input image data;
the learning reference value indicates a degree of difficulty in discrimination by the discrimination unit,
The learning device according to claim 1 , wherein the update unit further updates parameters of the discrimination model based on the learning reference value.
請求項1から請求項4の何れか1項に記載の学習装置。 The learning device described in any one of claims 1 to 4, wherein the learning reference value is the sum of a first reference value indicating the degree of closeness between the distribution of image data and the empirical distribution of actual captured images, and a second reference value relating to the distance between each position relating to at least a portion of the three-dimensional data and a predetermined depth.
前記変換部は、前記三次元データまたは深度の大きさを表すパラメータに係数を乗算することで、前記第2被写界深度の深さを異ならせる
請求項1から請求項5の何れか1項に記載の学習装置。 The three-dimensional data is depth data representing a depth based on a hyperfocal distance,
The learning device according to claim 1 , wherein the conversion unit varies the second depth of field by multiplying the three-dimensional data or a parameter representing a magnitude of depth by a coefficient.
前記潜在変数を機械学習モデルである三次元生成モデルに入力することで、前記第1画像データに対応する三次元データを生成するステップと、
前記第1画像データと前記三次元データとに基づいて、第2被写界深度に係る撮像画像を模擬した第2画像データを生成するステップと、
前記第1画像データおよび前記第2画像データの分布と、実際の撮像画像の経験分布との近さの度合いを示す学習基準値を算出するステップと、
前記学習基準値に基づいて前記画像生成モデルおよび前記三次元生成モデルのパラメータを更新するステップと、
学習済みの前記画像生成モデルおよび前記三次元生成モデルを出力するステップと
を有する学習済みモデルの生成方法。 A step of generating first image data simulating a captured image related to a first depth of field by inputting the latent variables into an image generation model that is a machine learning model;
generating three-dimensional data corresponding to the first image data by inputting the latent variables into a three-dimensional generation model that is a machine learning model;
generating second image data simulating a captured image relating to a second depth of field based on the first image data and the three-dimensional data;
calculating a learning reference value indicating a degree of similarity between a distribution of the first image data and the second image data and an empirical distribution of an actual captured image;
updating parameters of the image generation model and the three-dimensional generation model based on the learning reference value;
A method for generating a trained model comprising the steps of: outputting the trained image generation model and the trained three-dimensional generation model.
請求項7に記載の学習済みモデルの生成方法によって出力された三次元生成モデルに前記潜在変数を入力することで、三次元データを生成する三次元データ生成部と、
を備えるデータ生成装置。 An image generation unit that generates image data simulating a captured image by inputting a latent variable into an image generation model output by the trained model generation method according to claim 7;
A three-dimensional data generation unit that generates three-dimensional data by inputting the latent variables into a three-dimensional generation model output by the trained model generation method according to claim 7;
A data generating device comprising:
請求項7に記載の学習済みモデルの生成方法によって出力された三次元生成モデルに前記潜在変数を入力することで、三次元データを生成するステップと、
を備えるデータ生成方法。 A step of generating image data simulating a captured image by inputting latent variables into an image generation model output by the trained model generation method according to claim 7;
A step of generating three-dimensional data by inputting the latent variables into a three-dimensional generation model output by the trained model generation method according to claim 7;
A data generation method comprising:
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| PCT/JP2021/019579 WO2022249232A1 (en) | 2021-05-24 | 2021-05-24 | Learning device, learned model generation method, data generation device, data generation method, and program |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JPWO2022249232A1 JPWO2022249232A1 (en) | 2022-12-01 |
| JP7598058B2 true JP7598058B2 (en) | 2024-12-11 |
Family
ID=84229611
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2023523716A Active JP7598058B2 (en) | 2021-05-24 | 2021-05-24 | Learning device, trained model generation method, data generation device, data generation method, and program |
Country Status (2)
| Country | Link |
|---|---|
| JP (1) | JP7598058B2 (en) |
| WO (1) | WO2022249232A1 (en) |
Families Citing this family (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP7513928B1 (en) | 2023-06-09 | 2024-07-10 | 株式会社プロテリアル | Prediction device, prediction method, and program |
Citations (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2020042818A (en) | 2018-09-07 | 2020-03-19 | バイドゥ オンライン ネットワーク テクノロジー (ベイジン) カンパニー リミテッド | Method for generating three-dimensional data, apparatus for generating three-dimensional data, computer device, and computer-readable storage medium |
-
2021
- 2021-05-24 JP JP2023523716A patent/JP7598058B2/en active Active
- 2021-05-24 WO PCT/JP2021/019579 patent/WO2022249232A1/en not_active Ceased
Patent Citations (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2020042818A (en) | 2018-09-07 | 2020-03-19 | バイドゥ オンライン ネットワーク テクノロジー (ベイジン) カンパニー リミテッド | Method for generating three-dimensional data, apparatus for generating three-dimensional data, computer device, and computer-readable storage medium |
Non-Patent Citations (1)
| Title |
|---|
| Atsuhiro Noguchi, et al.,RGBD-GAN: Unsupervised 3D Representation Learning From Natural Image Datasets via RGBDS Image Synthesis,ICLR 2020,2019年09月27日,p.1-21,DOI: 10.48550/arXiv.1909.12573 |
Also Published As
| Publication number | Publication date |
|---|---|
| JPWO2022249232A1 (en) | 2022-12-01 |
| WO2022249232A1 (en) | 2022-12-01 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US11232286B2 (en) | Method and apparatus for generating face rotation image | |
| US12380687B2 (en) | Object detection method and apparatus, and computer storage medium | |
| CN111161349B (en) | Object attitude estimation method, device and equipment | |
| CN113096234B (en) | Method and device for generating three-dimensional grid model by using multiple color pictures | |
| CN114170290B (en) | Image processing method and related equipment | |
| JP2023529527A (en) | Method and apparatus for generating point cloud data | |
| US12175792B2 (en) | Method and apparatus for generating object model, electronic device and storage medium | |
| CN109844818B (en) | Methods and associated systems for building deformable 3D models of elements | |
| CN112699885A (en) | Semantic segmentation training data augmentation method and system based on antagonism generation network GAN | |
| CN114120067A (en) | Object identification method, device, equipment and medium | |
| CN117372604B (en) | 3D face model generation method, device, equipment and readable storage medium | |
| CN113034675A (en) | Scene model construction method, intelligent terminal and computer readable storage medium | |
| KR102277100B1 (en) | A method of generating hologram with random phase using deep learning and artificial intelligence | |
| KR20250107418A (en) | Elctronic device and method to restore scene image of target view | |
| KR20240049098A (en) | Method and appratus of neural rendering based on view augmentation | |
| CN115147577A (en) | VR scene generation method, device, equipment and storage medium | |
| Vázquez‐Delgado et al. | Real‐time multi‐window stereo matching algorithm with fuzzy logic | |
| JP7598058B2 (en) | Learning device, trained model generation method, data generation device, data generation method, and program | |
| CN120236167A (en) | 3D Gaussian model training method, map reconstruction method, equipment and medium | |
| Zhao et al. | Distance transform pooling neural network for LiDAR depth completion | |
| Zhang et al. | [Retracted] A 3D Face Modeling and Recognition Method Based on Binocular Stereo Vision and Depth‐Sensing Detection | |
| CN116758212A (en) | 3D reconstruction method, device, equipment and medium based on adaptive denoising algorithm | |
| Cao et al. | Automatic Tracking Method of Basketball Flight Trajectory Based on Data Fusion and Sparse Representation Model | |
| JP7824550B2 (en) | Estimation device, learning device, estimation method, learning method, and program | |
| WO2023100774A1 (en) | Training method, training system, and training program |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20230829 |
|
| TRDD | Decision of grant or rejection written | ||
| A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20241029 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20241111 |
|
| R150 | Certificate of patent or registration of utility model |
Ref document number: 7598058 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
| S533 | Written request for registration of change of name |
Free format text: JAPANESE INTERMEDIATE CODE: R313533 |
|
| R350 | Written notification of registration of transfer |
Free format text: JAPANESE INTERMEDIATE CODE: R350 |