JP6924128B2 - Morphing image generator and morphing image generation method - Google Patents
Morphing image generator and morphing image generation method Download PDFInfo
- Publication number
- JP6924128B2 JP6924128B2 JP2017225932A JP2017225932A JP6924128B2 JP 6924128 B2 JP6924128 B2 JP 6924128B2 JP 2017225932 A JP2017225932 A JP 2017225932A JP 2017225932 A JP2017225932 A JP 2017225932A JP 6924128 B2 JP6924128 B2 JP 6924128B2
- Authority
- JP
- Japan
- Prior art keywords
- image
- stage
- layer
- post
- outputs
- 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
Landscapes
- Processing Or Creating Images (AREA)
Description
本発明は、機械学習モデルを用いてモーフィング画像を生成するモーフィング画像生成装置及びモーフィング画像生成方法に関する。 The present invention relates to a morphing image generator and a morphing image generation method for generating a morphing image using a machine learning model.
変化する前後の被写体が写っている画像に基づいて、被写体が変化する過程を段階的に表したモーフィング画像を生成する装置が知られている。特許文献1には、変化する前後の被写体の画像の中間的な画像を生成することによりモーフィング画像を生成する技術が開示されている。
There is known a device that generates a morphing image that shows the process of changing a subject stepwise based on an image showing a subject before and after the change.
モーフィング画像を生成する方法においては、被写体が変化する前の画像における頂点と被写体が変化した後の画像の頂点とを特徴点として抽出し、抽出した特徴点間の中間値を算出することにより中間画像を生成する。しかしながら、変化する前後の画像間に共通する明確な特徴点が存在しない場合、被写体が変化する前後の画像において対応付けられる特徴点を抽出することが困難であった。その結果、滑らかに変化する質の高いモーフィング画像を生成することができないという問題があった。 In the method of generating a morphing image, the vertices of the image before the subject changes and the vertices of the image after the subject changes are extracted as feature points, and the intermediate value between the extracted feature points is calculated to be intermediate. Generate an image. However, when there is no clear feature point in common between the images before and after the change, it is difficult to extract the feature points associated with the images before and after the change of the subject. As a result, there is a problem that it is not possible to generate a high-quality morphing image that changes smoothly.
そこで、本発明はこれらの点に鑑みてなされたものであり、モーフィング画像の質を向上させることができるモーフィング画像生成装置及びモーフィング画像生成方法を提供することを目的とする。 Therefore, the present invention has been made in view of these points, and an object of the present invention is to provide a morphing image generator and a morphing image generation method capable of improving the quality of a morphing image.
本発明の第1の態様に係るモーフィング画像生成装置は、被写体の少なくとも一部が変化する前の画像である第1画像と、被写体の少なくとも一部が変化した後の画像である第2画像と、を取得する画像取得部と、前記第1画像及び前記第2画像のそれぞれに、入力された画像に基づいて当該画像に含まれる被写体の種別を出力可能な機械学習モデルに含まれる複数の処理層を伝搬させる伝搬制御部と、前記複数の処理層から選択した後段処理層、及び前記後段処理層の直前の処理層である前段処理層の両方の処理層において共通に活性化している、前記第1画像に基づいて前記後段処理層及び前記前段処理層から出力された一以上の第1画像出力と前記第2画像に基づいて前記後段処理層及び前記前段処理層から出力された一以上の第2画像出力とを抽出する抽出部と、前記一以上の第1画像出力に基づいて一以上の第1画像特徴点を検出し、かつ前記一以上の第2画像出力に基づいて一以上の第2画像特徴点を検出する特徴点検出部と、前記一以上の第1画像特徴点と前記一以上の第2画像特徴点とに基づいて、前記被写体が変化する過程を段階的に表した一以上の中間画像を生成する中間画像生成部と、を有する。 The morphing image generator according to the first aspect of the present invention includes a first image which is an image before at least a part of the subject is changed and a second image which is an image after at least a part of the subject is changed. , And a plurality of processes included in the machine learning model capable of outputting the type of the subject included in the image based on the input image to each of the first image and the second image. The propagation control unit that propagates the layers, the post-stage treatment layer selected from the plurality of treatment layers, and the pre-stage treatment layer that is the treatment layer immediately before the post-stage treatment layer are commonly activated. One or more first image outputs output from the post-processing layer and the pre-processing layer based on the first image, and one or more output from the post-processing layer and the pre-processing layer based on the second image. An extraction unit that extracts the second image output, one or more first image feature points are detected based on the one or more first image outputs, and one or more based on the one or more second image outputs. The process of changing the subject is shown stepwise based on the feature point detection unit that detects the second image feature point, the one or more first image feature points, and the one or more second image feature points. It has an intermediate image generation unit that generates one or more intermediate images.
前記抽出部は、前記第1画像が前記複数の処理層の一部である前段処理層及び後段処理層の順に伝搬したことにより前記後段処理層から出力された複数の後段第1画像出力、及び前記第2画像が前段処理層及び後段処理層の順に伝搬したことにより前記後段処理層から出力された複数の後段第2画像出力から、共通に活性化している一以上の後段第1画像出力及び一以上の後段第2画像出力を抽出する後段抽出部と、前記一以上の後段第1画像出力及び前記一以上の後段第2画像出力を活性化させる要因となった前記前段処理層から出力された複数の前段第1画像出力、及び前記前段処理層から出力された複数の前段第2画像出力のうち、共通に活性化している一以上の前段第1画像出力及び一以上の前段第2画像出力を抽出する前段抽出部と、を有してもよい。 The extraction unit has a plurality of post-stage first image outputs and a plurality of post-stage first image outputs output from the post-stage processing layer because the first image propagates in the order of the pre-stage processing layer and the post-stage processing layer which are a part of the plurality of processing layers. One or more post-stage first image outputs and one or more post-stage first image outputs that are commonly activated from the plurality of post-stage second image outputs output from the post-stage processing layer due to the propagation of the second image in the order of the pre-stage processing layer and the post-stage processing layer. It is output from the post-stage extraction unit that extracts one or more post-stage second image outputs, and the pre-stage processing layer that is a factor that activates the one or more post-stage first image output and the one or more post-stage second image output. Of the plurality of pre-stage first image outputs and the plurality of pre-stage second image outputs output from the pre-stage processing layer, one or more pre-stage first image outputs and one or more pre-stage second images that are commonly activated. It may have a pre-stage extraction unit that extracts an output.
前記前段抽出部は、前記複数の前段第1画像出力及び前記複数の前段第2画像出力のうち、活性化している大きさに基づいて、前記一以上の前段第1画像出力及び前記一以上の前段第2画像出力を抽出してもよい。 The pre-stage extraction unit has one or more pre-stage first image outputs and one or more pre-stage first image outputs based on the activated size of the plurality of pre-stage first image outputs and the plurality of pre-stage second image outputs. The second image output in the first stage may be extracted.
前記機械学習モデルは、畳み込みニューラルネットワークを含み、前記後段処理層は、出力層、全結合層、正規化層、プーリング層、及び畳み込み層のうちのいずれかの層であってもよい。
前記前段処理層は、全結合層、正規化層、プーリング層、畳み込み層及び入力層のうちのいずれかの層であってもよい。
The machine learning model includes a convolutional neural network, and the post-processing layer may be any one of an output layer, a fully connected layer, a normalized layer, a pooling layer, and a convolutional layer.
The pretreatment layer may be any one of a fully bonded layer, a normalized layer, a pooling layer, a convolution layer, and an input layer.
前記抽出部は、前記複数の処理層のうち、最後尾の処理層である最後尾層を後段処理層として選択した場合において、前記最後尾層において共通に活性化している前記一以上の第1画像出力及び前記一以上の第2画像出力がない場合、前記最後尾層より前の処理層において共通に活性化している前記一以上の第1画像出力及び前記一以上の第2画像出力を抽出してもよい。 When the last layer, which is the last treatment layer, is selected as the subsequent treatment layer among the plurality of treatment layers, the extraction unit is one or more of the first ones that are commonly activated in the last treatment layer. When there is no image output and the one or more second image outputs, the one or more first image outputs and the one or more second image outputs that are commonly activated in the processing layer before the last layer are extracted. You may.
前記モーフィング画像生成装置は、前記特徴点検出部が特定した前記一以上の第1画像特徴点及び前記一以上の第2画像特徴点から、相互の対応関係に基づいて一部の第1画像特徴点及び一部の第2画像特徴点を選択する選択部をさらに有し、前記中間画像生成部は、前記一部の第1画像特徴点と前記一部の第2画像特徴点とに基づいて、前記被写体が変化する過程を段階的に表した一以上の中間画像を生成してもよい。 The morphing image generator is a part of the first image features based on the mutual correspondence from the one or more first image feature points and the one or more second image feature points specified by the feature point detection unit. Further having a selection unit for selecting a point and a part of the second image feature point, the intermediate image generation unit is based on the part of the first image feature point and the part of the second image feature point. , One or more intermediate images may be generated that stepwise represent the process of changing the subject.
前記画像取得部は、変化後の被写体と同じ種別であって異なる形状の被写体が撮像された複数の第2画像を取得し、前記中間画像生成部は、前記一以上の第1画像特徴点と前記複数の第2画像それぞれに基づく前記一以上の第2画像特徴点とに基づいて、前記複数の第2画像から1つの第2画像を選択してもよい。 The image acquisition unit acquires a plurality of second images in which subjects of the same type and different shapes as the changed subject are captured, and the intermediate image generation unit is the one or more first image feature points. One second image may be selected from the plurality of second images based on the one or more second image feature points based on each of the plurality of second images.
前記中間画像生成部は、第1画像特徴点に対応する第2画像特徴点の数が所定の基準値以上である前記複数の第2画像から1つの第2画像を選択してもよい。
前記モーフィング画像生成装置は、前記複数の処理層のうち、前記後段処理層として用いる処理層を選択する指示を受け付ける指示受付部をさらに有し、前記抽出部は、前記指示受付部が受け付けた前記指示が示す前記処理層を、前記後段処理層として使用してもよい。
The intermediate image generation unit may select one second image from the plurality of second images in which the number of second image feature points corresponding to the first image feature points is equal to or greater than a predetermined reference value.
The morphing image generation device further includes an instruction receiving unit that receives an instruction to select a processing layer to be used as the subsequent processing layer among the plurality of processing layers, and the extraction unit receives the instruction receiving unit. The treated layer indicated by the instruction may be used as the post-processed layer.
前記抽出部は、前記複数の処理層のうち一つの層を前記後段処理層として選択して前記一以上の第1画像出力及び前記一以上の第2画像出力を抽出した後に、前記前段処理層として選択した処理層を前記後段処理層として選択して、別の前記一以上の第1画像出力及び前記一以上の第2画像出力を抽出してもよい。 The extraction unit selects one of the plurality of processing layers as the post-stage processing layer, extracts the one or more first image outputs and the one or more second image outputs, and then extracts the pre-stage processing layer. The processing layer selected as may be selected as the post-stage processing layer to extract another one or more first image outputs and one or more second image outputs.
本発明の第2の態様に係るモーフィング画像生成方法は、被写体の少なくとも一部が変化する前の画像である第1画像と、被写体の少なくとも一部が変化した後の画像である第2画像と、を取得するステップと、前記第1画像及び前記第2画像のそれぞれに、入力された画像に基づいて当該画像に含まれる被写体の種別を出力可能な機械学習モデルに含まれる複数の処理層を伝搬させるステップと、前記複数の処理層から選択した後段処理層、及び前記後段処理層の直前の処理層である前段処理層の両方の処理層において共通に活性化している、前記第1画像に基づいて前記後段処理層及び前記前段処理層から出力された一以上の第1画像出力と前記第2画像に基づいて前記後段処理層及び前記前段処理層から出力された一以上の第2画像出力とを抽出するステップと、前記一以上の第1画像出力に基づいて一以上の第1画像特徴点を検出し、かつ前記一以上の第2画像出力に基づいて一以上の第2画像特徴点を検出するステップと、前記一以上の第1画像特徴点と前記一以上の第2画像特徴点とに基づいて、前記被写体が変化する過程を段階的に表した一以上の中間画像を生成するステップと、を有する。 The morphing image generation method according to the second aspect of the present invention includes a first image which is an image before at least a part of the subject is changed and a second image which is an image after at least a part of the subject is changed. , And a plurality of processing layers included in the machine learning model capable of outputting the type of the subject included in the image based on the input image in each of the first image and the second image. In the first image, which is commonly activated in both the step of propagating, the post-stage treatment layer selected from the plurality of treatment layers, and the pre-stage treatment layer which is the treatment layer immediately before the post-stage treatment layer. One or more first image outputs output from the post-stage processing layer and the pre-stage processing layer based on the above, and one or more second image outputs output from the post-stage processing layer and the pre-stage processing layer based on the second image. And one or more first image feature points are detected based on the one or more first image outputs, and one or more second image feature points are detected based on the one or more second image outputs. Based on the step of detecting the above, the one or more first image feature points, and the one or more second image feature points, one or more intermediate images representing the process of changing the subject stepwise are generated. It has steps and.
前記抽出するステップは、前記第1画像が前記複数の処理層の一部である前段処理層及び後段処理層の順に伝搬したことにより前記後段処理層から出力された複数の後段第1画像出力、及び前記第2画像が前段処理層及び後段処理層の順に伝搬したことにより前記後段処理層から出力された複数の後段第2画像出力から、共通に活性化している一以上の後段第1画像出力及び一以上の後段第2画像出力を抽出する前段抽出ステップと、前記一以上の後段第1画像出力及び前記一以上の後段第2画像出力を活性化させる要因となった前記前段処理層から出力された複数の前段第1画像出力、及び前記前段処理層から出力された複数の前段第2画像出力のうち、共通に活性化している一以上の前段第1画像出力及び一以上の前段第2画像出力を抽出する後段抽出ステップと、を有してもよい。 In the extraction step, a plurality of post-stage first image outputs output from the post-stage processing layer due to the propagation of the first image in the order of the pre-stage processing layer and the post-stage processing layer, which are a part of the plurality of processing layers. And one or more post-stage first image outputs that are commonly activated from the plurality of post-stage second image outputs output from the post-stage processing layer due to the propagation of the second image in the order of the pre-stage processing layer and the post-stage processing layer. And output from the pre-stage extraction step that extracts one or more post-stage second image outputs, and the pre-stage processing layer that is a factor that activates the one or more post-stage first image output and the one or more post-stage second image output. Of the plurality of pre-stage first image outputs and the plurality of pre-stage second image outputs output from the pre-stage processing layer, one or more pre-stage first image outputs and one or more pre-stage second images that are commonly activated. It may have a post-stage extraction step of extracting the image output.
前記モーフィング画像生成方法は、前記前段抽出ステップを実行した後に、前記一以上の前段第1画像出力及び前記一以上の前段第2画像出力を、前記複数の後段第1画像出力及び前記複数の後段第2画像出力として、前記後段抽出ステップを実行してもよい。 In the morphing image generation method, after executing the pre-stage extraction step, the one or more pre-stage first image outputs and the one or more pre-stage second image outputs are combined with the plurality of post-stage first image outputs and the plurality of post-stages. As the second image output, the subsequent extraction step may be executed.
前記モーフィング画像生成方法は、前記複数の処理層のそれぞれに対して、前記後段抽出ステップ及び前記前段抽出ステップを実行してもよい。 In the morphing image generation method, the latter-stage extraction step and the first-stage extraction step may be executed for each of the plurality of processing layers.
本発明によれば、モーフィング画像の質を向上させることができるという効果を奏する。 According to the present invention, there is an effect that the quality of the morphing image can be improved.
[モーフィング画像生成装置1の概要]
図1は、モーフィング画像を生成する処理の概要を説明するための図である。モーフィング画像生成装置1は、例えばPC(Personal Computer)である。モーフィング画像生成装置1は、変化前後の被写体が写っている複数の画像に基づいて、機械学習モデルMを用いてモーフィング画像を生成する装置である。図1に示すモーフィング画像Aは、第1画像A1に写っている人の顔から第2画像A3に写っている車に変化する過程を段階的に表した画像である。図1に示す例において、人の目は、車のヘッドライトに対応し、人の口は、車の左右のヘッドライトの間に位置するラジエターグリルに対応するものとして説明する。
[Overview of morphing image generator 1]
FIG. 1 is a diagram for explaining an outline of a process for generating a morphing image. The morphing
モーフィング画像生成装置1は、被写体の少なくとも一部が変化する前の画像である第1画像A1と、被写体の少なくとも一部が変化した後の画像である第2画像A3と、を取得する(図1の(1))。図1に示した第1画像A1は、人の顔を被写体とした画像である。図1に示した第2画像A3は、車を被写体とした画像である。
The morphing
モーフィング画像生成装置1は、取得した第1画像A1及び第2画像A3それぞれを機械学習モデルMに入力し、当該機械学習モデルMに含まれる複数の処理層を伝搬させる(図1の(2))。機械学習モデルMは、入力された画像に基づいて当該画像に含まれる被写体の種別を出力するように学習されたモデルである。
The morphing
図2は、機械学習モデルMの構成の一例を示す図である。機械学習モデルMは、畳み込みニューラルネットワーク(CNN:Convolutional Neural Network)を含む。この場合において、機械学習モデルMは、入力層M1、第1の畳み込み層M2、第2の畳み込み層M3、第1のプーリング層M4、正規化層M5、第3の畳み込み層M6、第2のプーリング層M7、第1の全結合層M8、第2の全結合層M9、及び出力層M10を有する。本明細書においては、隣接する2つの処理層のうち、第1画像A1及び第2画像A3が伝搬する際の上流側の処理層を前段処理層と称し、下流側の処理層を後段処理層と称する。 FIG. 2 is a diagram showing an example of the configuration of the machine learning model M. The machine learning model M includes a convolutional neural network (CNN). In this case, the machine learning model M is an input layer M1, a first convolution layer M2, a second convolution layer M3, a first pooling layer M4, a regularization layer M5, a third convolution layer M6, and a second. It has a pooling layer M7, a first fully connected layer M8, a second fully connected layer M9, and an output layer M10. In the present specification, of the two adjacent processing layers, the upstream processing layer when the first image A1 and the second image A3 propagate is referred to as a pre-stage processing layer, and the downstream processing layer is referred to as a post-stage processing layer. It is called.
後段処理層となり得る処理層は、第1の畳み込み層M2、第2の畳み込み層M3、第1のプーリング層M4、正規化層M5、第3の畳み込み層M6、第2のプーリング層M7、第1の全結合層M8、第2の全結合層M9、及び出力層M10のうちのいずれかの層である。また、前段処理層となり得る処理層は、入力層M1、第1の畳み込み層M2、第2の畳み込み層M3、第1のプーリング層M4、正規化層M5、第3の畳み込み層M6、第2のプーリング層M7、第1の全結合層M8、及び第2の全結合層M9のうちのいずれかの層である。モーフィング画像生成装置1は、取得した画像を機械学習モデルMに入力し、入力層M1から出力層M10までの各処理層を順伝搬させる、すなわち、推論させることにより、画像に写っている被写体の種別を出力させる。
The treatment layers that can be the subsequent treatment layers are the first convolution layer M2, the second convolution layer M3, the first pooling layer M4, the normalization layer M5, the third convolution layer M6, the second pooling layer M7, and the second. It is one of the fully bonded layer M8 of 1, the second fully bonded layer M9, and the output layer M10. The processing layers that can be the pre-stage processing layers are the input layer M1, the first convolution layer M2, the second convolution layer M3, the first pooling layer M4, the normalized layer M5, the third convolution layer M6, and the second. It is any one of the pooling layer M7, the first fully bonded layer M8, and the second fully bonded layer M9. The morphing
図1に戻り、モーフィング画像生成装置1は、機械学習モデルMが被写体の種別を出力するに至った各処理層における計算結果、すなわち、深層学習による抽象度の高い特徴量を用いて、第1画像A1及び第2画像A3に共通する特徴点を検出する(図1の(3))。ここで、モーフィング画像生成装置1は、共通する特徴点の検出を、伝搬させた順序とは逆の順序で行う。このようにすることで、モーフィング画像生成装置1は、抽象度が高い特徴量に基づく特徴点を検出することができる。
Returning to FIG. 1, the morphing
モーフィング画像生成装置1は、共通する特徴点を検出することにより、第1画像A1に写っている人の顔の目、口及び第2画像A3に写っている車のヘッドライト、ラジエターグリルにそれぞれ対応関係があることを検出する。対応関係は、第1画像特徴点が示す第1画像に含まれる画素と、第2画像特徴点が示す第2画像に含まれる画素とが一致又は近似した関係である。
By detecting common feature points, the morphing
そして、モーフィング画像生成装置1は、検出した対応関係にある第1画像A1及び第2画像A3それぞれの特徴点に基づいて、被写体が変化する過程を段階的に表した中間画像A2を生成する(図1の(4))。このようにすることで、モーフィング画像生成装置1は、モーフィング画像の質を向上させることができる。
以下、モーフィング画像生成装置1の詳細について説明する。
Then, the morphing
Hereinafter, the details of the morphing
[モーフィング画像生成装置1の構成]
図3は、モーフィング画像生成装置1の構成を示す図である。モーフィング画像生成装置1は、操作部11、記憶部12、及び制御部13を有する。
[Configuration of morphing image generator 1]
FIG. 3 is a diagram showing the configuration of the morphing
操作部11は、ユーザの操作を受け付ける入力デバイスである。
記憶部12は、例えば、ROM(Read Only Memory)、RAM(Random Access Memory)及びハードディスク等の記憶媒体である。記憶部12は、制御部13が実行する各種のプログラムを記憶する。記憶部12は、第1画像及び第2画像を記憶する。
The
The
制御部13は、例えばCPU(Central Processing Unit)である。制御部13は、記憶部12に記憶されているプログラムを実行することにより、モーフィング画像生成装置1に係る機能を制御する。制御部13は、プログラムを実行することにより、画像取得部131、伝搬制御部132、抽出部133、指示受付部136、特徴点検出部137、選択部138、及び中間画像生成部139として機能する。
The
画像取得部131は、記憶部12に記憶されている第1画像と第2画像とを取得する。画像取得部131は、取得した第1画像と第2画像とを、伝搬制御部132に入力する。
The
伝搬制御部132は、第1画像及び第2画像のそれぞれに、機械学習モデルMに含まれる複数の処理層を伝搬させる。図2に示す例において、伝搬制御部132は、第1画像及び第2画像のそれぞれに、機械学習モデルMに含まれる入力層M1から出力層M10までの各処理層を、順に伝搬させる。
The
抽出部133は、複数の処理層から選択した後段処理層、及び後段処理層の直前の処理層である前段処理層の両方の処理層において共通に活性化している、第1画像に基づいて後段処理層及び前段処理層から出力された一以上の第1画像出力と第2画像に基づいて後段処理層及び前段処理層から出力された一以上の第2画像出力とを抽出する。抽出部133が行う抽出処理の詳細については後述するが、抽出部133は、後段処理層で共通に活性化している第1画像出力の一部である後段第1画像出力及び第2画像出力の一部である後段第2画像出力を抽出する後段抽出部134と、前段処理層で共通に活性化している第1画像出力の一部である前段第1画像出力及び第2画像出力の一部である前段第2画像出力を抽出する前段抽出部135とを有する。
The
抽出部133が抽出する第1画像出力及び第2画像出力は、処理層に含まれる複数のユニットのうち、活性化しているユニットを示す情報である。ユニットは、画像に含まれる一以上の画素である。活性化の定義は、例えば、ユニットの出力値又はユニットの出力値と当該ユニットの結合の重みとの積が、所定の閾値を超えた場合でもよいし、出力の大きい順に所定の個数又は所定の割合に含まれた場合であってもよい。また、全結合層以外の処理層においては、例えば、チャンネルごとに出力の大きい順に所定の個数又は所定の割合に含まれた場合であってもよい。チャンネルは、フィルタ毎に畳み込み演算した出力である。
The first image output and the second image output extracted by the
抽出部133は、複数の処理層のうち、最後尾の処理層である最後尾層を後段処理層として選択することが好ましい。しかし、最後尾層において共通に活性化している第1画像出力及び第2画像出力がない場合がある。そこで、抽出部133は、複数の処理層のうち、最後尾層を後段処理層として選択した場合において、最後尾層において共通に活性化している一以上の第1画像出力及び一以上の第2画像出力がない場合、最後尾層より前の処理層において共通に活性化している一以上の第1画像出力及び一以上の第2画像出力を抽出してもよい。
It is preferable that the
例えば、抽出部133が、最後尾層である出力層M10を後段処理層として選択した場合において、出力層M10において共通に活性化している一以上の第1画像出力及び一以上の第2画像出力がないとする。この場合において、抽出部133は、出力層M10より前の各処理層に対して、共通に活性化している一以上の第1画像出力及び一以上の第2画像出力を繰り返し探索する。抽出部133は、例えば、出力層M10の直前の処理層である第2の全結合層M9において共通に活性化している一以上の第1画像出力及び一以上の第2画像出力があった場合、第2の全結合層M9を後段処理層として選択する。そして、抽出部133は、後段処理層として選択した第2の全結合層M9において共通に活性化している一以上の第1画像出力及び一以上の第2画像出力を抽出する。このようにすることで、抽出部133は、第1画像と第2画像とで一致する領域が少ない場合であっても、それぞれに写る被写体を対応付けることができる。
For example, when the
抽出部133は、ユーザによって指定された処理層を後段処理層として選択してもよい。具体的には、指示受付部136が、操作部11を介して、複数の処理層のうち、後段処理層として用いる処理層を選択する指示を受け付ける。そして、抽出部133は、指示受付部136が受け付けた指示が示す処理層を、後段処理層として使用する。抽出部133は、図2に示す例において、ユーザが第2の全結合層M9を選択した場合に、指示受付部136が受け付けた指示が示す第2の全結合層M9を、後段処理層として使用する。抽出部133は、抽出した第1画像出力と第2画像出力とを特徴点検出部137に入力する。
The
特徴点検出部137は、一以上の第1画像出力に基づいて一以上の第1画像特徴点を検出し、かつ一以上の第2画像出力に基づいて一以上の第2画像特徴点を検出する。具体的には、特徴点検出部137は、まず、一以上の第1画像出力及び一以上の第2画像出力に基づいて、対応する特徴点を探索する。そして、特徴点検出部137は、対応関係にある一以上の第1画像出力に基づく一以上の第1画像特徴点と、一以上の第2画像出力に基づく一以上の第2画像特徴点とを検出する。特徴点検出部137は、検出した第1画像特徴点及び第2画像特徴点を選択部138に入力する。
The feature
選択部138は、特徴点検出部137が特定した一以上の第1画像特徴点及び一以上の第2画像特徴点から、相互の対応関係に基づいて一部の第1画像特徴点及び一部の第2画像特徴点を選択する。具体的には、選択部138は、誤検出した対応関係を除去し、除去した後の対応関係に基づく一以上の第1画像特徴点及び一以上の第2画像特徴点を選択する。対応関係の誤検出は、対応関係にある第1画像特徴点及び第2画像特徴点で互いに齟齬が生じている状態であり、例えば特徴点の移動経路が中間画像の生成過程において交差する場合である。選択部138は、例えば、RANSAC(Random Sampling Consensus)法又は最小2乗メディアン(LMedS:Least Median of Square)法に基づいて絞り込みを行うことにより対応関係を除去する。また、選択部138は、指示受付部136を介して、ユーザが選んだ対応関係を選択してもよい。
The
また、例えば、第2画像が3次元空間の座標系を含むCG(Computer Graphics)画像である場合において、特徴点検出部137が検出した第2画像特徴点のうち、4点以上の第2画像特徴点が実空間中において同一直線上にあることが判明しているとする。この場合において、選択部138は、まず、対応関係に基づく第1画像特徴点及び第2画像特徴点それぞれにおいて複比を計算し、値が著しく異なっている第1画像特徴点及び第2画像特徴点があるか否かを判定する。そして、選択部138は、値が著しく異なっていると判定した第1画像特徴点及び第2画像特徴点を誤検出された特徴点であるとして、他の対応関係に基づく第1画像特徴点及び第2画像特徴点を選択する。
Further, for example, when the second image is a CG (Computer Graphics) image including a coordinate system in a three-dimensional space, the second image of four or more points among the second image feature points detected by the feature
中間画像生成部139は、一以上の第1画像特徴点と一以上の第2画像特徴点とに基づいて、被写体が変化する過程を段階的に表した一以上の中間画像を生成する。具体的には、中間画像生成部139は、選択部138が誤検出を除去した後の対応関係に基づく一部の第1画像特徴点と一部の第2画像特徴点とに基づいて、被写体が変化する過程を段階的に表した一以上の中間画像を生成する。
The intermediate
中間画像生成部139は、例えば、第1画像特徴点が示す第1画像の画素における座標と、第1画像特徴点に対応する第2画像特徴点が示す第2画像の画素における座標とに基づいて、変化ステップを計算する。そして、中間画像生成部139は、計算した変化ステップに基づいて、一以上の中間画像を生成する。変化ステップの計算方法は、公知の技術を使用できる。
The intermediate
中間画像生成部139は、所定の条件を満たす場合に、対応する第1画像特徴点と第2画像特徴点との間を補間する補間特徴点を生成してもよい。具体的には、中間画像生成部139は、所定の条件を満たす場合に、対応する第1画像特徴点と第2画像特徴点との間を補間することにより補間特徴点を生成し、複数の補間特徴点に基づいて中間画像を生成してもよい。所定の条件は、例えば、第1画像及び第2画像の被写体の種別が異なる場合、又は生成する中間画像の数が多い場合等である。
The intermediate
ところで、第1画像及び第2画像の被写体の種別が異なる場合、第2画像として選択された被写体の形状によっては、対応する特徴点を検出できない可能性がある。そこで、中間画像生成部139は、複数の第2画像からモーフィングに適した画像を選択してもよい。具体的には、まず、画像取得部131は、変化後の被写体と同じ種別であって異なる形状の被写体が撮像された複数の第2画像を取得する。この場合において、中間画像生成部139は、特徴点検出部137が検出した一以上の第1画像出力に基づく一以上の第1画像特徴点と複数の第2画像それぞれに基づく一以上の第2画像特徴点とに基づいて、複数の第2画像から1つの第2画像を選択する。
By the way, when the types of subjects in the first image and the second image are different, the corresponding feature points may not be detected depending on the shape of the subject selected as the second image. Therefore, the intermediate
中間画像生成部139は、例えば、第1画像特徴点に対応する第2画像特徴点の数が所定の基準値以上である複数の第2画像から1つの第2画像を選択する。所定の基準値は、例えば、第1画像及び第2画像の被写体の種別が同じであるか否かによって変わる変動値である。中間画像生成部139は、第1画像及び第2画像の被写体の種別が同じである場合、第1画像及び第2画像の被写体の種別が異なる場合に比べて基準値を低く設定する。反対に、中間画像生成部139は、第1画像及び第2画像の被写体の種別が異なる場合、第1画像及び第2画像の被写体の種別が同じである場合に比べて基準値を高くする。このようにすることで、中間画像生成部139は、モーフィング画像の質を向上させることができる。
The intermediate
また、中間画像生成部139は、例えば、複数の第2画像のうち、第1画像に基づく第1画像特徴点に対応する第2画像特徴点が最も多い第2画像を選択する。具体的には、ユーザが、第1画像から特定の領域(図1に示す例において、第1画像A1の目又は口の領域)を指定したとする。この場合において、中間画像生成部139は、複数の第2画像のうち、指示受付部136を介して、ユーザによって指定された第1画像における特定の領域に含まれる第1画像特徴点に対応する第2画像特徴点が最も多い第2画像を選択する。そして、中間画像生成部139は、第1画像及び選択した第2画像に基づいて、一以上の中間画像を生成する。このようにすることで、中間画像生成部139は、ユーザが意図したモーフィング画像を生成することができる。中間画像生成部139は、生成した中間画像を記憶部12に記憶させる。
Further, the intermediate
[抽出処理]
続いて、抽出部133が行う抽出処理について説明する。上述のとおり、抽出部133は、後段抽出部134及び前段抽出部135を有する。後段抽出部134は、第1画像が複数の処理層の一部である前段処理層及び後段処理層の順に伝搬したことにより後段処理層から出力された複数の後段第1画像出力、及び第2画像が前段処理層及び後段処理層の順に伝搬したことにより後段処理層から出力された複数の後段第2画像出力から、共通に活性化している一以上の後段第1画像出力及び一以上の後段第2画像出力を抽出する。
[Extraction process]
Subsequently, the extraction process performed by the
前段抽出部135は、一以上の後段第1画像出力及び一以上の後段第2画像出力を活性化させる要因となった前段処理層から出力された複数の前段第1画像出力、及び前段処理層から出力された複数の前段第2画像出力のうち、共通に活性化している一以上の前段第1画像出力及び一以上の前段第2画像出力を抽出する。
The
図4から図9は、抽出部133が行う抽出処理について説明するための図である。図4から図9は、前段処理層から後段処理層に伝搬させた状態を示している。図4から図9において、実線で示すユニットを結合する結合線は、結合するユニットから出力があったことを示し、破線で示す結合線は、結合するユニットから出力が無かったことを示す。また、結合線を示す線の太さは、結合するユニットからの出力の大きさを示す。
4 to 9 are diagrams for explaining the extraction process performed by the
図4の場合において、後段処理層は、最後尾層(例えば、出力層又は全結合層等)又は抽出部133が選択した最後尾層より前の処理層(全結合層又はプーリング層等)であり、前段処理層は、後段処理層の直前の処理層(例えば、全結合層又はプーリング層等)である。図4においては、後段処理層が出力層M20であり、前段処理層が全結合層M19であるとして説明する。 In the case of FIG. 4, the post-stage treatment layer is a treatment layer (for example, an output layer or a fully connected layer) or a treatment layer before the last layer selected by the extraction unit 133 (such as a fully connected layer or a pooling layer). Yes, the pre-stage treatment layer is a treatment layer immediately before the post-stage treatment layer (for example, a fully bonded layer or a pooling layer). In FIG. 4, it is assumed that the post-stage processing layer is the output layer M20 and the pre-stage processing layer is the fully connected layer M19.
図4(a)は、抽出前の状態であり、図4(b)は抽出後の状態である。第1画像において、出力層M20は、ユニットU5、U8が活性化しており、全結合層M19は、ユニットU2、U5、U6、U7、U8が活性化している。第2画像において、出力層M20は、ユニットU3、U5が活性化しており、全結合層M19は、ユニットU2、U4、U5、U8が活性化している。 FIG. 4A is a state before extraction, and FIG. 4B is a state after extraction. In the first image, units U5 and U8 are activated in the output layer M20, and units U2, U5, U6, U7 and U8 are activated in the fully connected layer M19. In the second image, the output layer M20 has the units U3 and U5 activated, and the fully connected layer M19 has the units U2, U4, U5 and U8 activated.
この場合において、後段抽出部134は、後段処理層である出力層M20から出力された後段第1画像出力であるユニットU5、U8、及び出力層M20から出力された後段第2画像出力であるユニットU3、U5を比較する。そして、後段抽出部134は、共通に活性化している後段第1画像出力のユニットU5及び後段第2画像出力のユニットU5を抽出する。
In this case, the
続いて、前段抽出部135は、後段第1画像出力のユニットU5を活性化させる要因となった前段処理層である全結合層M19から出力された前段第1画像出力であるユニットU2、U5、U6、及び後段第2画像出力のユニットU5を活性化させる要因となった全結合層M19から出力された前段第2画像出力であるユニットU2、U5、U8を比較する。そして、前段抽出部135は、共通に活性化している前段第1画像出力のユニットU2、U5、及び前段第2画像出力のユニットU2、U5を抽出する。
Subsequently, the
抽出部133は、出力層M20から全結合層M19までの出力を抽出すると、次の処理層に対する出力を抽出する。具体的には、抽出部133は、処理層ごとに、共通に活性化している第1画像出力及び第2画像出力を抽出する処理を、伝搬制御部132が伝搬させた順序とは逆の順序で繰り返し行う。より具体的には、抽出部133は、複数の処理層のうち一つの層を後段処理層として選択して一以上の第1画像出力及び一以上の第2画像出力を抽出した後に、前段処理層として選択した処理層を後段処理層として選択して、別の一以上の第1画像出力及び一以上の第2画像出力を抽出する。このようにすることで、抽出部133は、第1画像及び第2画像に対する比較の精度を高めることができる。
When the
図5は、第1画像に基づいて、前段処理層から後段処理層に伝搬させた状態を示している。図6は、第2画像に基づいて、前段処理層から後段処理層に伝搬させた状態を示している。図5及び図6の場合において、後段処理層は、全結合層M18であり、前段処理層は、全結合層以外の処理層(例えば、プーリング層又は畳み込み層等)である。図5及び図6においては、前段処理層がプーリング層M17であるとして説明する。また、図5及び図6において、前段処理層は、3つのチャンネルを有する。上段の第1チャンネルは、ユニットU11、U12、U13、U14、及びU15を含む。中段の第2チャンネルは、ユニットU21、U22、U23、U24、及びU25を含む。下段の第3チャンネルは、ユニットU31、U32、U33、U34、及びU35を含む。 FIG. 5 shows a state in which the image is propagated from the pre-stage processing layer to the post-stage processing layer based on the first image. FIG. 6 shows a state in which the image is propagated from the pre-stage processing layer to the post-stage processing layer based on the second image. In the case of FIGS. 5 and 6, the post-stage treatment layer is a fully-bonded layer M18, and the front-stage treatment layer is a treatment layer other than the fully-bonded layer (for example, a pooling layer or a convolution layer). In FIGS. 5 and 6, the pretreatment layer will be described as the pooling layer M17. Further, in FIGS. 5 and 6, the pretreatment layer has three channels. The first channel in the upper row includes units U11, U12, U13, U14, and U15. The second channel in the middle stage includes units U21, U22, U23, U24, and U25. The lower third channel includes units U31, U32, U33, U34, and U35.
第1画像において、プーリング層M17は、第1チャンネルに含まれるユニットU13及び第2チャンネルに含まれるユニットU21、U24が活性化している。第2画像において、全結合層M18は、第2チャンネルに含まれるユニットU22、U24、U25及び第3チャンネルに含まれるユニットU32、U33が活性化している。 In the first image, in the pooling layer M17, the units U13 included in the first channel and the units U21 and U24 included in the second channel are activated. In the second image, in the fully connected layer M18, the units U22, U24, U25 included in the second channel and the units U32, U33 included in the third channel are activated.
前段抽出部135は、後段第1画像出力のユニットU5を活性化させる要因となった前段処理層であるプーリング層M17から出力された前段第1画像出力、及び後段第2画像出力のユニットU5を活性化させる要因となったプーリング層M17から出力された前段第2画像出力を比較する。前段抽出部135は、活性化しているユニットの有無を調べ、活性化している前段第1画像出力の第1チャンネルに含まれるユニットU13及び第2チャンネルに含まれるU21、U24と、前段第2画像出力の第2チャンネルに含まれるユニットU22、U24、U25及び第3チャンネルに含まれるU32、U33とに着目する。
The front-
そして、前段抽出部135は、前段第1画像出力と前段第2画像出力との両方において活性化しているユニットが存在しているチャンネルが第2チャンネルであることから、前段第1画像出力の第2チャンネルに含まれるユニットU21、U24及び前段第2画像出力の第2チャンネルに含まれるユニットU22、U24、U25を抽出する。
Then, in the
図7の場合において、後段処理層は、プーリング層M16であり、前段処理層は、プーリング層以外の処理層(例えば、畳み込み層又は正規化層等)である。図7においては、前段処理層が畳み込み層M15であるとして説明する。また、図7において、前段処理層は、チャンネルが1つであるとして説明する。第1画像において、プーリング層M16は、ユニットU5が活性化しており、畳み込み層M15は、ユニットU3、U5が活性化している。第2画像において、プーリング層M16は、ユニットU3が活性化しており、畳み込み層M15は、ユニットU3、U4が活性化している。 In the case of FIG. 7, the post-stage treatment layer is the pooling layer M16, and the front-stage treatment layer is a treatment layer other than the pooling layer (for example, a convolution layer or a normalized layer). In FIG. 7, the pre-stage processing layer will be described as the convolution layer M15. Further, in FIG. 7, the pre-stage processing layer will be described as having one channel. In the first image, the pooling layer M16 has the unit U5 activated, and the convolution layer M15 has the units U3 and U5 activated. In the second image, the pooling layer M16 has the unit U3 activated, and the convolution layer M15 has the units U3 and U4 activated.
ここで、抽出部133は、画像の圧縮を行うプーリング層においては、直前の処理層からプーリング層に結合している複数のユニットのうち、チャンネルごとに活性化している程度に基づいて出力を抽出する。具体的には、前段抽出部135は、複数の前段第1画像出力及び複数の前段第2画像出力のうち、活性化している大きさに基づいて、一以上の前段第1画像出力及び一以上の前段第2画像出力を抽出する。前段抽出部135は、例えば、複数の前段第1画像出力及び複数の前段第2画像出力のうち、チャンネルごとに最も大きく活性化している一以上の前段第1画像出力及び一以上の前段第2画像出力を抽出する。
Here, in the pooling layer that compresses the image, the
この場合において、後段抽出部134は、直前の抽出処理において前段処理層として選択したプーリング層M16を選択して、プーリング層M16から出力された後段第1画像出力のユニットU5、及びプーリング層M16から出力された後段第2画像出力のユニットU3を抽出する。そして、前段抽出部135は、後段第1画像出力のユニットU3、U5及び後段第2画像出力のユニットU3、U4のうち、チャンネルごとに最も大きく活性化している前段第1画像出力のユニットU5、及び前段第2画像出力のユニットU4を抽出する。このようにすることで、前段抽出部135は、画像の中で特徴となる領域を特定することができる。
In this case, the
図8の場合において、後段処理層は、畳み込み層M14であり、前段処理層は、畳み込み層を含む他の処理層(例えば、正規化層又はプーリング層等)である。図8においては、前段処理層が正規化層M13であるとして説明する。また、図8において、前段処理層は、チャンネルが1つであるとして説明する。第1画像において、畳み込み層M14は、ユニットU5が活性化しており、正規化層M13は、ユニットU3、U5、U6が活性化している。第2画像において、畳み込み層M14は、ユニットU3が活性化しており、正規化層M13は、ユニットU3、U4、U5が活性化している。 In the case of FIG. 8, the post-stage treatment layer is a convolution layer M14, and the front-stage treatment layer is another treatment layer including the convolution layer (for example, a normalized layer or a pooling layer). In FIG. 8, the pre-stage processing layer will be described as the normalization layer M13. Further, in FIG. 8, the pre-stage processing layer will be described as having one channel. In the first image, the convolution layer M14 has the unit U5 activated, and the normalized layer M13 has the units U3, U5, and U6 activated. In the second image, the convolution layer M14 has the unit U3 activated, and the normalized layer M13 has the units U3, U4, and U5 activated.
この場合において、後段抽出部134は、直前の抽出処理において前段処理層として選択した畳み込み層M14を選択して、畳み込み層M14から出力された後段第1画像出力のユニットU5、及び畳み込み層M14から出力された後段第2画像出力のユニットU3を抽出する。
In this case, the
続いて、前段抽出部135は、後段第1画像出力のユニットU5を活性化させる要因となった前段処理層である正規化層M13から出力された前段第1画像出力、及び後段第2画像出力のユニットU4を活性化させる要因となった前段処理層である正規化層M13から出力された前段第2画像出力を比較する。ここで、前段抽出部135は、後段処理層が畳み込み層である場合、後段抽出部134が後段処理層から抽出したユニットに結合する前段処理層の複数のユニットのうち、前段第1画像出力と前段第2画像出力とにおいて位置が相対的に同じであり、かつチャンネルが共通するユニットを抽出する。この場合、前段抽出部135は、前段第1画像出力と前段第2画像出力とにおいて位置が相対的に同じであり、かつチャンネルが共通するユニットとして、前段第1画像出力のユニットU5、U6、及び前段第2画像出力のユニットU3、U4を抽出する。
Subsequently, the front-
図9の場合において、後段処理層は、正規化層M12であり、前段処理層は、正規化層以外の処理層(例えば、畳み込み層又はプーリング層等)である。図9においては、前段処理層がプーリング層M11であるとして説明する。また、図9において、前段処理層は、チャンネルが1つであるとして説明する。第1画像において、正規化層M12は、ユニットU5が活性化している。第2画像において、正規化層M12は、ユニットU3が活性化している。 In the case of FIG. 9, the post-stage treatment layer is the normalization layer M12, and the front-stage treatment layer is a treatment layer other than the normalization layer (for example, a convolution layer or a pooling layer). In FIG. 9, the pretreatment layer will be described as the pooling layer M11. Further, in FIG. 9, the pre-stage processing layer will be described as having one channel. In the first image, the normalized layer M12 has the unit U5 activated. In the second image, the normalized layer M12 has the unit U3 activated.
ここで、抽出部133は、画像に対して前処理を行う正規化層においては、後段処理層において活性化しているユニットに結合している前段処理層に含まれる複数のユニットのうち、中心のユニットを抽出する。この場合において、後段抽出部134は、後段処理層として選択した正規化層M12から出力された後段第1画像出力のユニットU5、及び正規化層M12から出力された後段第2画像出力のユニットU3を抽出する。
Here, in the normalization layer that preprocesses the image, the
そして、前段抽出部135は、正規化層M12から出力された後段第1画像出力のユニットU5に結合しているプーリング層M11のユニットのうち、中心のユニットU5を抽出する。同様に、前段抽出部135は、正規化層M12から出力された後段第2画像出力のユニットU3に結合しているプーリング層M11のユニットのうち、中心のユニットU3を抽出する。
Then, the front-
抽出部133は、上述の抽出処理を入力層まで繰り返し行うことが好ましい。しかし、抽出部133は、抽出処理を最初の処理層まで行わずに、途中の処理層(例えば、プーリング層又は正規化層等)で終了してもよい。このように、抽出部133は、伝搬制御部132が伝搬させた順序とは逆の順序で抽出処理を行うことにより、抽象度が高い出力を抽出することができる。
It is preferable that the
[モーフィング画像生成装置1の処理]
続いて、モーフィング画像生成装置1が行う処理の流れを説明する。図10は、モーフィング画像生成装置1が行う処理の流れを示すフローチャートである。本フローチャートは、モーフィング画像生成装置1が、記憶部12に第1画像及び第2画像が格納され、モーフィング画像を生成する処理を実行する操作を受け付けたことを契機として開始する。
[Processing of morphing image generator 1]
Subsequently, the flow of processing performed by the morphing
画像取得部131は、記憶部12に記憶されている第1画像と第2画像とを取得する(S1)。画像取得部131は、取得した第1画像と第2画像とを、伝搬制御部132に入力する。伝搬制御部132は、画像取得部131から入力された第1画像及び第2画像のそれぞれに、機械学習モデルMに含まれる入力層M1から出力層M10までの複数の処理層を、入力層M1から順に伝搬させる(S2)。
The
抽出部133は、後段処理層及び前段処理層の両方の処理層において共通に活性化している一以上の第1画像出力及び一以上の第2画像出力を抽出する処理を行う(S3)。図11は、抽出部133が行う処理の流れを示すフローチャートである。抽出部133は、指示受付部136が、操作部11を介して、複数の処理層のうち、後段処理層として用いる処理層を選択する指示を受け付けたか否かを判定する(S31)。
The
抽出部133は、指示受付部136が指示を受け付けたと判定した場合、指示受付部136が受け付けた指示が示す処理層を、後段処理層として選択する(S32)。抽出部133は、例えば、指示受付部136が第1の全結合層M8を示す指示を受け付けたと判定した場合、指示受付部136が受け付けた指示が示す第1の全結合層M8を、後段処理層として使用する。一方、抽出部133は、指示受付部136が指示を受け付けていないと判定した場合、最後尾層(例えば、出力層M10)で共通に活性化している一以上の第1画像出力及び一以上の第2画像出力があるか否かを判定する(S33)。
When the
抽出部133は、出力層M10で共通に活性化している一以上の第1画像出力及び一以上の第2画像出力があると判定した場合、最後尾層である出力層M10を、後段処理層として使用する(S34)。一方、抽出部133は、出力層M10で共通に活性化している一以上の第1画像出力及び一以上の第2画像出力がないと判定した場合、出力層M10より前の各処理層に対して、共通に活性化している一以上の第1画像出力及び一以上の第2画像出力を繰り返し探索する。そして、抽出部133は、共通に活性化している一以上の第1画像出力及び一以上の第2画像出力がある処理層(例えば、第2の全結合層M9)を、後段処理層として使用する(S35)。抽出部133は、選択した後段処理層、及び前段処理層の両方の処理層において共通に活性化している、第1画像に基づいて後段処理層及び前段処理層から出力された一以上の第1画像出力と第2画像に基づいて後段処理層及び前段処理層から出力された一以上の第2画像出力とを抽出する。
When the
具体的には、まず、後段抽出部134は、選択した後段処理層から出力された複数の後段第1画像出力、及び選択した後段処理層から出力された複数の後段第2画像出力から、共通に活性化している一以上の後段第1画像出力及び一以上の後段第2画像出力を抽出する(S36)。そして、前段抽出部135は、後段抽出部134が抽出した一以上の後段第1画像出力及び一以上の後段第2画像出力を活性化させる要因となった前段処理層から出力された複数の前段第1画像出力、及び前段処理層から出力された複数の前段第2画像出力のうち、共通に活性化している一以上の前段第1画像出力及び一以上の前段第2画像出力を抽出する(S37)。
Specifically, first, the
続いて、抽出部133は、前段処理層より前に別の処理層があるか否かを判定する(S38)。抽出部133は、前段処理層(例えば、第2のプーリング層M7)より前に別の処理層(例えば、第3の畳み込み層M6)があると判定した場合、第2のプーリング層M7を後段処理層として選択し(S39)、処理をS36に戻す。一方、抽出部133は、前段処理層(例えば、入力層M1)より前に別の処理層がないと判定した場合、抽出した一以上の第1画像出力及び一以上の第2画像出力を特徴点検出部137に入力し、抽出処理を終了する。
Subsequently, the
図10に戻り、特徴点検出部137は、一以上の第1画像出力及び一以上の第2画像出力に基づいて、対応する特徴点を探索し、対応関係にある一以上の第1画像出力に基づく一以上の第1画像特徴点と、一以上の第2画像出力に基づく一以上の第2画像特徴点とを検出する(S4)。続いて、選択部138は、特徴点検出部137が検出した第1画像特徴点及び第2画像特徴点に不適切な特徴点があるか否かを判定する(S5)。選択部138は、例えば、RANSAC法に基づいて絞り込みを行う。
Returning to FIG. 10, the feature
選択部138は、第1画像特徴点及び第2画像特徴点に不適切な特徴点があると判定した場合、不適切な特徴点、すなわち、誤検出した対応関係にある第1画像特徴点及び第2画像特徴点を除去し(S6)、除去した後の対応関係に基づく一部の第1画像特徴点及び一部の第2画像特徴点を選択する。中間画像生成部139は、選択部138が、第1画像特徴点及び第2画像特徴点に不適切な特徴点がないと判定した場合、又は誤検出した対応関係を除去した後に、一以上の第1画像特徴点と一以上の第2画像特徴点とに基づいて、一以上の中間画像を生成する(S7)。
When the
中間画像生成部139は、例えば、第1画像特徴点が示す第1画像の画素における座標と、第1画像特徴点に対応する第2画像特徴点が示す第2画像の画素における座標とに基づいて、変化ステップを計算する。そして、中間画像生成部139は、計算した変化ステップに基づいて、一以上の中間画像を生成する。中間画像生成部139は、生成した中間画像を記憶部12に記憶させる。
The intermediate
[実施形態における効果]
以上説明したとおり、モーフィング画像生成装置1は、取得した第1画像及び第2画像のそれぞれに、機械学習モデルMに含まれる複数の処理層を伝搬させる。モーフィング画像生成装置1は、伝搬させた順とは逆の順序で後段処理層及び前段処理層の両方の処理層において共通に活性化している一以上の第1画像出力及び一以上の第2画像出力を、処理層ごとに抽出し、対応関係にある第1画像特徴点及び第2画像特徴点をそれぞれ検出する。そして、モーフィング画像生成装置1は、誤検出した対応関係を除去した一以上の第1画像特徴点と一以上の第2画像特徴点とに基づいて、一以上の中間画像を生成する。
[Effect in Embodiment]
As described above, the morphing
このようにすることで、モーフィング画像生成装置1は、畳み込みニューラルネットワークを含む機械学習モデルMを使用し、深層学習による抽象度が高い特徴量を求めることにより、第1画像及び第2画像に基づく中間画像を生成することができる。すなわち、モーフィング画像生成装置1は、ユーザが第1画像における特定の領域及び第2画像における特定の領域を対応付けすることなく、対応関係にある第1画像特徴点及び第2画像特徴点をそれぞれ検出することにより、第1画像及び第2画像に基づく中間画像を生成することができる。その結果、モーフィング画像生成装置1は、モーフィング画像の質を向上させることができる。
By doing so, the morphing
モーフィング画像生成装置1は、例えば、時短ビデオ等によってカットされた部分において、映像に連続性がなく不自然に見えているような場合に、連続性がない前後の映像に基づいて中間画像を生成することにより、自然で連続性のある映像にすることができる。また、モーフィング画像生成装置1は、例えば、2つの原画に基づいて一以上の中間画像を生成することにより、アニメーション制作における「中割り」の工程を自動化することができる。
The morphing
以上、本発明を実施の形態を用いて説明したが、本発明の技術的範囲は上記実施の形態に記載の範囲には限定されず、その要旨の範囲内で種々の変形及び変更が可能である。例えば、装置の分散・統合の具体的な実施の形態は、以上の実施の形態に限られず、その全部又は一部について、任意の単位で機能的又は物理的に分散・統合して構成することができる。また、複数の実施の形態の任意の組み合わせによって生じる新たな実施の形態も、本発明の実施の形態に含まれる。組み合わせによって生じる新たな実施の形態の効果は、もとの実施の形態の効果を合わせ持つ。 Although the present invention has been described above using the embodiments, the technical scope of the present invention is not limited to the scope described in the above embodiments, and various modifications and changes can be made within the scope of the gist thereof. be. For example, the specific embodiment of the distribution / integration of the device is not limited to the above embodiment, and all or a part thereof may be functionally or physically distributed / integrated in any unit. Can be done. Also included in the embodiments of the present invention are new embodiments resulting from any combination of the plurality of embodiments. The effect of the new embodiment produced by the combination has the effect of the original embodiment together.
1 モーフィング画像生成装置
11 操作部
12 記憶部
13 制御部
131 画像取得部
132 伝搬制御部
133 抽出部
134 後段抽出部
135 前段抽出部
136 指示受付部
137 特徴点検出部
138 選択部
139 中間画像生成部
1
Claims (15)
前記第1画像及び前記第2画像のそれぞれに、入力された画像に基づいて当該画像に含まれる被写体の種別を出力可能な機械学習モデルに含まれる複数の処理層を伝搬させる伝搬制御部と、
前記複数の処理層から選択した後段処理層、及び前記後段処理層の直前の処理層である前段処理層の両方の処理層において共通に活性化している、前記第1画像に基づいて前記後段処理層及び前記前段処理層から出力された一以上の第1画像出力と前記第2画像に基づいて前記後段処理層及び前記前段処理層から出力された一以上の第2画像出力とを抽出する抽出部と、
前記一以上の第1画像出力に基づいて一以上の第1画像特徴点を検出し、かつ前記一以上の第2画像出力に基づいて一以上の第2画像特徴点を検出する特徴点検出部と、
前記一以上の第1画像特徴点と前記一以上の第2画像特徴点とに基づいて、前記被写体が変化する過程を段階的に表した一以上の中間画像を生成する中間画像生成部と、
を有するモーフィング画像生成装置。 An image acquisition unit that acquires a first image that is an image before at least a part of the subject is changed and a second image that is an image after at least a part of the subject is changed.
A propagation control unit that propagates a plurality of processing layers included in a machine learning model capable of outputting the type of subject included in the image based on the input image to each of the first image and the second image.
The post-stage treatment based on the first image, which is commonly activated in both the post-stage treatment layer selected from the plurality of treatment layers and the pre-stage treatment layer which is the treatment layer immediately before the post-stage treatment layer. Extraction of one or more first image outputs output from the layer and the pre-processed layer and one or more second image outputs output from the post-processed layer and the pre-processed layer based on the second image. Department and
A feature point detection unit that detects one or more first image feature points based on the one or more first image outputs and detects one or more second image feature points based on the one or more second image outputs. When,
An intermediate image generation unit that generates one or more intermediate images that stepwise represent the process of changing the subject based on the one or more first image feature points and the one or more second image feature points.
Morphing image generator with.
前記第1画像が前記複数の処理層の一部である前段処理層及び後段処理層の順に伝搬したことにより前記後段処理層から出力された複数の後段第1画像出力、及び前記第2画像が前段処理層及び後段処理層の順に伝搬したことにより前記後段処理層から出力された複数の後段第2画像出力から、共通に活性化している一以上の後段第1画像出力及び一以上の後段第2画像出力を抽出する後段抽出部と、
前記一以上の後段第1画像出力及び前記一以上の後段第2画像出力を活性化させる要因となった前記前段処理層から出力された複数の前段第1画像出力、及び前記前段処理層から出力された複数の前段第2画像出力のうち、共通に活性化している一以上の前段第1画像出力及び一以上の前段第2画像出力を抽出する前段抽出部と、
を有する、
請求項1に記載のモーフィング画像生成装置。 The extraction unit
The plurality of post-stage first image outputs and the second image output from the post-stage processing layer are produced by propagating the first image in the order of the pre-stage processing layer and the post-stage processing layer which are a part of the plurality of processing layers. One or more post-stage first image outputs and one or more post-stage first images that are commonly activated from the plurality of post-stage second image outputs output from the post-stage processing layers by propagating in the order of the pre-stage processing layer and the post-stage processing layer. 2 Post-stage extraction unit that extracts image output and
A plurality of pre-stage first image outputs output from the pre-stage processing layer, which are factors that activate the one or more post-stage first image output and the one or more post-stage second image output, and output from the pre-stage processing layer. Among the plurality of pre-stage second image outputs, one or more pre-stage first image outputs and one or more pre-stage second image outputs that are commonly activated, and a pre-stage extraction unit that extracts one or more pre-stage second image outputs.
Have,
The morphing image generator according to claim 1.
請求項2に記載のモーフィング画像生成装置。 The pre-stage extraction unit has one or more pre-stage first image outputs and one or more pre-stage first image outputs based on the activated size of the plurality of pre-stage first image outputs and the plurality of pre-stage second image outputs. Extract the second image output in the previous stage,
The morphing image generator according to claim 2.
前記後段処理層は、出力層、全結合層、正規化層、プーリング層、及び畳み込み層のうちのいずれかの層である、
請求項2又は3に記載のモーフィング画像生成装置。 The machine learning model includes a convolutional neural network.
The post-treatment layer is any one of an output layer, a fully connected layer, a normalized layer, a pooling layer, and a convolution layer.
The morphing image generator according to claim 2 or 3.
請求項4に記載のモーフィング画像生成装置。 The pretreatment layer is any one of a fully bonded layer, a normalized layer, a pooling layer, a convolution layer, and an input layer.
The morphing image generator according to claim 4.
請求項1又は5に記載のモーフィング画像生成装置。 When the last layer, which is the last treatment layer, is selected as the subsequent treatment layer among the plurality of treatment layers, the extraction unit is one or more of the first ones that are commonly activated in the last treatment layer. When there is no image output and the one or more second image outputs, the one or more first image outputs and the one or more second image outputs that are commonly activated in the processing layer before the last layer are extracted. do,
The morphing image generator according to claim 1 or 5.
前記中間画像生成部は、前記一部の第1画像特徴点と前記一部の第2画像特徴点とに基づいて、前記被写体が変化する過程を段階的に表した一以上の中間画像を生成する、
請求項1から6のいずれか一項に記載のモーフィング画像生成装置。 From the one or more first image feature points and the one or more second image feature points specified by the feature point detection unit, some first image feature points and some second image feature points based on mutual correspondence. It also has a selection section for selecting image feature points,
The intermediate image generation unit generates one or more intermediate images that stepwise represent the process of changing the subject based on the part of the first image feature points and the part of the second image feature points. do,
The morphing image generator according to any one of claims 1 to 6.
前記中間画像生成部は、前記一以上の第1画像特徴点と前記複数の第2画像それぞれに基づく前記一以上の第2画像特徴点とに基づいて、前記複数の第2画像から1つの第2画像を選択する、
請求項1から7のいずれか一項に記載のモーフィング画像生成装置。 The image acquisition unit acquires a plurality of second images in which subjects of the same type and different shapes as the changed subject are captured.
The intermediate image generation unit is one first from the plurality of second images based on the one or more first image feature points and the one or more second image feature points based on each of the plurality of second images. 2 Select an image,
The morphing image generator according to any one of claims 1 to 7.
請求項8に記載のモーフィング画像生成装置。 The intermediate image generation unit selects one second image from the plurality of second images in which the number of second image feature points corresponding to the first image feature points is equal to or greater than a predetermined reference value.
The morphing image generator according to claim 8.
前記抽出部は、前記指示受付部が受け付けた前記指示が示す前記処理層を、前記後段処理層として使用する、
請求項1から9のいずれか一項に記載のモーフィング画像生成装置。 Further, it has an instruction receiving unit that receives an instruction to select a processing layer to be used as the subsequent processing layer among the plurality of processing layers.
The extraction unit uses the processing layer indicated by the instruction received by the instruction receiving unit as the subsequent processing layer.
The morphing image generator according to any one of claims 1 to 9.
請求項1から10のいずれか一項に記載のモーフィング画像生成装置。 The extraction unit selects one of the plurality of processing layers as the post-stage processing layer, extracts the one or more first image outputs and the one or more second image outputs, and then extracts the pre-stage processing layer. The processing layer selected as is selected as the subsequent processing layer, and another one or more first image outputs and one or more second image outputs are extracted.
The morphing image generator according to any one of claims 1 to 10.
前記第1画像及び前記第2画像のそれぞれに、入力された画像に基づいて当該画像に含まれる被写体の種別を出力可能な機械学習モデルに含まれる複数の処理層を伝搬させるステップと、
前記複数の処理層から選択した後段処理層、及び前記後段処理層の直前の処理層である前段処理層の両方の処理層において共通に活性化している、前記第1画像に基づいて前記後段処理層及び前記前段処理層から出力された一以上の第1画像出力と前記第2画像に基づいて前記後段処理層及び前記前段処理層から出力された一以上の第2画像出力とを抽出するステップと、
前記一以上の第1画像出力に基づいて一以上の第1画像特徴点を検出し、かつ前記一以上の第2画像出力に基づいて一以上の第2画像特徴点を検出するステップと、
前記一以上の第1画像特徴点と前記一以上の第2画像特徴点とに基づいて、前記被写体が変化する過程を段階的に表した一以上の中間画像を生成するステップと、
を有するモーフィング画像生成方法。 A step of acquiring a first image which is an image before at least a part of the subject is changed and a second image which is an image after at least a part of the subject is changed.
A step of propagating a plurality of processing layers included in a machine learning model capable of outputting the type of the subject included in the image based on the input image to each of the first image and the second image.
The post-stage treatment based on the first image, which is commonly activated in both the post-stage treatment layer selected from the plurality of treatment layers and the pre-stage treatment layer which is the treatment layer immediately before the post-stage treatment layer. A step of extracting one or more first image outputs output from the layer and the pre-processed layer and one or more second image outputs output from the post-processed layer and the pre-processed layer based on the second image. When,
A step of detecting one or more first image feature points based on the one or more first image outputs and detecting one or more second image feature points based on the one or more second image outputs.
A step of generating one or more intermediate images that stepwise represent the process of changing the subject based on the one or more first image feature points and the one or more second image feature points.
Morphing image generation method having.
前記第1画像が前記複数の処理層の一部である前段処理層及び後段処理層の順に伝搬したことにより前記後段処理層から出力された複数の後段第1画像出力、及び前記第2画像が前段処理層及び後段処理層の順に伝搬したことにより前記後段処理層から出力された複数の後段第2画像出力から、共通に活性化している一以上の後段第1画像出力及び一以上の後段第2画像出力を抽出する後段抽出ステップと、
前記一以上の後段第1画像出力及び前記一以上の後段第2画像出力を活性化させる要因となった前記前段処理層から出力された複数の前段第1画像出力、及び前記前段処理層から出力された複数の前段第2画像出力のうち、共通に活性化している一以上の前段第1画像出力及び一以上の前段第2画像出力を抽出する前段抽出ステップと、
を有する、請求項12に記載のモーフィング画像生成方法。 The extraction step
The plurality of post-stage first image outputs and the second image output from the post-stage processing layer are produced by propagating the first image in the order of the pre-stage processing layer and the post-stage processing layer which are a part of the plurality of processing layers. One or more post-stage first image outputs and one or more post-stage first images that are commonly activated from the plurality of post-stage second image outputs output from the post-stage processing layers by propagating in the order of the pre-stage processing layer and the post-stage processing layer. 2 Post-stage extraction step to extract image output and
A plurality of pre-stage first image outputs output from the pre-stage processing layer, which are factors that activate the one or more post-stage first image output and the one or more post-stage second image output, and output from the pre-stage processing layer. A pre-stage extraction step for extracting one or more pre-stage first image outputs and one or more pre-stage second image outputs that are commonly activated among the plurality of pre-stage second image outputs.
The morphing image generation method according to claim 12.
請求項13に記載のモーフィング画像生成方法。 After executing the pre-stage extraction step, the one or more pre-stage first image outputs and the one or more pre-stage second image outputs are used as the plurality of post-stage first image outputs and the plurality of post-stage second image outputs. Execute the latter extraction step,
The morphing image generation method according to claim 13.
請求項13又は14に記載のモーフィング画像生成方法。 The latter-stage extraction step and the first-stage extraction step are executed for each of the plurality of processing layers.
The morphing image generation method according to claim 13 or 14.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2017225932A JP6924128B2 (en) | 2017-11-24 | 2017-11-24 | Morphing image generator and morphing image generation method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2017225932A JP6924128B2 (en) | 2017-11-24 | 2017-11-24 | Morphing image generator and morphing image generation method |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2019096130A JP2019096130A (en) | 2019-06-20 |
JP6924128B2 true JP6924128B2 (en) | 2021-08-25 |
Family
ID=66971712
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2017225932A Active JP6924128B2 (en) | 2017-11-24 | 2017-11-24 | Morphing image generator and morphing image generation method |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP6924128B2 (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2022162760A1 (en) * | 2021-01-27 | 2022-08-04 | 富士通株式会社 | Determination method, determination program, and information processing device |
DE202022100786U1 (en) | 2022-02-11 | 2022-03-03 | Gaurav Kumar Arora | Intelligent processed image recognition system with artificial intelligence and machine learning |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP5071900B2 (en) * | 2008-02-28 | 2012-11-14 | 学校法人金沢工業大学 | Image generating apparatus and method |
WO2017006872A1 (en) * | 2015-07-03 | 2017-01-12 | 学校法人慶應義塾 | Facial expression identification system, facial expression identification method, and facial expression identification program |
JP2017059193A (en) * | 2015-09-18 | 2017-03-23 | 貴博 安野 | Time series image compensation device, time series image generation method, and program for time series image compensation device |
-
2017
- 2017-11-24 JP JP2017225932A patent/JP6924128B2/en active Active
Also Published As
Publication number | Publication date |
---|---|
JP2019096130A (en) | 2019-06-20 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Cao et al. | 3D aided duet GANs for multi-view face image synthesis | |
Sun et al. | A hybrid model for identity obfuscation by face replacement | |
CN110390704B (en) | Image processing method, image processing device, terminal equipment and storage medium | |
Perfetti et al. | Cellular neural networks with virtual template expansion for retinal vessel segmentation | |
JP6924128B2 (en) | Morphing image generator and morphing image generation method | |
JP7129529B2 (en) | UV mapping to 3D objects using artificial intelligence | |
CN107871099A (en) | Face detection method and apparatus | |
KR20140108726A (en) | System and method for identifying scale invariant features of object outlines on images | |
JP6946231B2 (en) | Object tracking device and object tracking method | |
CN113269720A (en) | Defect detection method and system for straight welded pipe and readable medium | |
CN112651389A (en) | Method and device for training, correcting and identifying correction model of non-orthoptic iris image | |
JP5468773B2 (en) | Image processing apparatus and image processing method | |
JP7010780B2 (en) | Object area extraction device and object area extraction method | |
WO2011007769A1 (en) | Rendering device and rendering program | |
JPWO2020111109A5 (en) | ||
JP6830052B2 (en) | Spatial information generator and spatial information generation method | |
He et al. | Sketch2cloth: Sketch-based 3d garment generation with unsigned distance fields | |
KR20230134832A (en) | A Method For Creating realistic shape Model | |
CN114708651A (en) | Three-dimensional gesture recognition algorithm for virtual reality learning classroom | |
JP6889653B2 (en) | Video compression device and video compression method | |
CN113763233A (en) | Image processing method, server and photographing device | |
JP7316771B2 (en) | Learning device, parameter creation method, neural network, and information processing device using the same | |
JP2019097065A (en) | Parameter identification apparatus ana parameter identification method | |
JP7488218B2 (en) | Information processing device, information processing method, and program | |
Torrente et al. | Feature Identification in Archaeological Fragments Using Families of Algebraic Curves. |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20191206 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20210114 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20210202 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20210226 |
|
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: 20210720 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20210730 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 6924128 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |