JP2019096130A - Morphing image generation device, and morphing image generation method - Google Patents
Morphing image generation device, and morphing image generation method Download PDFInfo
- Publication number
- JP2019096130A JP2019096130A JP2017225932A JP2017225932A JP2019096130A JP 2019096130 A JP2019096130 A JP 2019096130A JP 2017225932 A JP2017225932 A JP 2017225932A JP 2017225932 A JP2017225932 A JP 2017225932A JP 2019096130 A JP2019096130 A JP 2019096130A
- Authority
- JP
- Japan
- Prior art keywords
- image
- stage
- layer
- outputs
- post
- 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.)
- Granted
Links
Images
Landscapes
- Processing Or Creating Images (AREA)
Abstract
Description
本発明は、機械学習モデルを用いてモーフィング画像を生成するモーフィング画像生成装置及びモーフィング画像生成方法に関する。 The present invention relates to a morphing image generation apparatus and a morphing image generation method for generating a morphing image using a machine learning model.
変化する前後の被写体が写っている画像に基づいて、被写体が変化する過程を段階的に表したモーフィング画像を生成する装置が知られている。特許文献1には、変化する前後の被写体の画像の中間的な画像を生成することによりモーフィング画像を生成する技術が開示されている。
There is known an apparatus for generating a morphing image representing a process of changing an object stepwise based on an image in which an object before and after the change is captured.
モーフィング画像を生成する方法においては、被写体が変化する前の画像における頂点と被写体が変化した後の画像の頂点とを特徴点として抽出し、抽出した特徴点間の中間値を算出することにより中間画像を生成する。しかしながら、変化する前後の画像間に共通する明確な特徴点が存在しない場合、被写体が変化する前後の画像において対応付けられる特徴点を抽出することが困難であった。その結果、滑らかに変化する質の高いモーフィング画像を生成することができないという問題があった。 In the method of generating a morphing image, a vertex in the image before the subject changes and a vertex of the image after the subject changes are extracted as feature points, and an intermediate value between the extracted feature points is calculated. Generate an image. However, when there is no common clear feature point between the images before and after the change, it is difficult to extract feature points associated in the images before and after the subject changes. As a result, there has been a problem that it is not possible to generate a smoothly changing high-quality morphing image.
そこで、本発明はこれらの点に鑑みてなされたものであり、モーフィング画像の質を向上させることができるモーフィング画像生成装置及びモーフィング画像生成方法を提供することを目的とする。 Therefore, the present invention has been made in view of these points, and it is an object of the present invention to provide a morphing image generation apparatus and a morphing image generation method that can improve the quality of morphing images.
本発明の第1の態様に係るモーフィング画像生成装置は、被写体の少なくとも一部が変化する前の画像である第1画像と、被写体の少なくとも一部が変化した後の画像である第2画像と、を取得する画像取得部と、前記第1画像及び前記第2画像のそれぞれに、入力された画像に基づいて当該画像に含まれる被写体の種別を出力可能な機械学習モデルに含まれる複数の処理層を伝搬させる伝搬制御部と、前記複数の処理層から選択した後段処理層、及び前記後段処理層の直前の処理層である前段処理層の両方の処理層において共通に活性化している、前記第1画像に基づいて前記後段処理層及び前記前段処理層から出力された一以上の第1画像出力と前記第2画像に基づいて前記後段処理層及び前記前段処理層から出力された一以上の第2画像出力とを抽出する抽出部と、前記一以上の第1画像出力に基づいて一以上の第1画像特徴点を検出し、かつ前記一以上の第2画像出力に基づいて一以上の第2画像特徴点を検出する特徴点検出部と、前記一以上の第1画像特徴点と前記一以上の第2画像特徴点とに基づいて、前記被写体が変化する過程を段階的に表した一以上の中間画像を生成する中間画像生成部と、を有する。 A morphing image generation device according to a first aspect of the present invention includes a first image which is an image before at least a part of a subject changes and a second image which is an image after at least a part of the subject changes. And a plurality of processes 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 activation control is common to both the propagation control unit for propagating the layer, the post-processing layer selected from the plurality of processing layers, and the pre-processing layer that is the processing layer immediately before the post-processing layer One or more output from the post-processing layer and the pre-processing layer based on the second image and the one or more first image outputs output from the post-processing layer and the pre-processing layer based on the first image Second picture An extraction unit for extracting an output; detecting one or more first image feature points based on the one or more first image outputs; and one or more second images based on the one or more second image outputs One or more step-by-step processes of changing the subject based on a feature point detection unit for detecting feature points, the one or more first image feature points and the one or more second image feature points And an intermediate image generation unit that generates an intermediate image.
前記抽出部は、前記第1画像が前記複数の処理層の一部である前段処理層及び後段処理層の順に伝搬したことにより前記後段処理層から出力された複数の後段第1画像出力、及び前記第2画像が前段処理層及び後段処理層の順に伝搬したことにより前記後段処理層から出力された複数の後段第2画像出力から、共通に活性化している一以上の後段第1画像出力及び一以上の後段第2画像出力を抽出する後段抽出部と、前記一以上の後段第1画像出力及び前記一以上の後段第2画像出力を活性化させる要因となった前記前段処理層から出力された複数の前段第1画像出力、及び前記前段処理層から出力された複数の前段第2画像出力のうち、共通に活性化している一以上の前段第1画像出力及び一以上の前段第2画像出力を抽出する前段抽出部と、を有してもよい。 A plurality of second-stage first image outputs output from the second-stage processing layer by causing the first image to propagate in order of the first-stage processing layer and the second-stage processing layer which are a part of the plurality of processing layers; One or more post-stage first image outputs activated in common from the plurality of post-stage second image outputs outputted from the post-stage processing layer by the second image being propagated in order of the pre-stage processing layer and the post-stage processing layer Output from the pre-processing layer that has caused the activation of the one or more subsequent-stage first image outputs and the one or more subsequent-stage second image outputs; Among the plurality of first-stage first image outputs and the plurality of second-stage second image outputs output from the first-stage processing layer, one or more first-stage first image outputs and one or more second-stage second images activated in common Pre-stage extraction unit that extracts the output , It may have.
前記前段抽出部は、前記複数の前段第1画像出力及び前記複数の前段第2画像出力のうち、活性化している大きさに基づいて、前記一以上の前段第1画像出力及び前記一以上の前段第2画像出力を抽出してもよい。 The pre-stage extraction unit is configured to output the one or more pre-stage first image outputs and the one or more pre-stage first image outputs based on an activated size of the plurality of pre-stage first image outputs and the plurality of pre-stage second image outputs. The pre-stage second image output may be extracted.
前記機械学習モデルは、畳み込みニューラルネットワークを含み、前記後段処理層は、出力層、全結合層、正規化層、プーリング層、及び畳み込み層のうちのいずれかの層であってもよい。
前記前段処理層は、全結合層、正規化層、プーリング層、畳み込み層及び入力層のうちのいずれかの層であってもよい。
The machine learning model may include a convolutional neural network, and the post-processing layer may be any of an output layer, a total connection layer, a normalization layer, a pooling layer, and a convolution layer.
The pre-processing layer may be any of a total bonding layer, a normalization layer, a pooling layer, a convolution layer, and an input layer.
前記抽出部は、前記複数の処理層のうち、最後尾の処理層である最後尾層を後段処理層として選択した場合において、前記最後尾層において共通に活性化している前記一以上の第1画像出力及び前記一以上の第2画像出力がない場合、前記最後尾層より前の処理層において共通に活性化している前記一以上の第1画像出力及び前記一以上の第2画像出力を抽出してもよい。 In the case where the last tail layer which is the last treatment layer among the plurality of treatment layers is selected as the second treatment layer, the extraction unit is configured to activate the one or more first common layers in the last tail 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 tail layer are extracted You may
前記モーフィング画像生成装置は、前記特徴点検出部が特定した前記一以上の第1画像特徴点及び前記一以上の第2画像特徴点から、相互の対応関係に基づいて一部の第1画像特徴点及び一部の第2画像特徴点を選択する選択部をさらに有し、前記中間画像生成部は、前記一部の第1画像特徴点と前記一部の第2画像特徴点とに基づいて、前記被写体が変化する過程を段階的に表した一以上の中間画像を生成してもよい。 The morphing image generation device is configured to generate a part of the first image features based on the mutual correspondence relation from the one or more first image feature points specified by the feature point detection unit and the one or more second image feature points. The intermediate image generation unit further includes a selection unit that selects a point and a part of second image feature points, and the intermediate image generation unit is configured to select the part of the first image feature points and the part of the second image feature points. The image processing method may generate one or more intermediate images stepwise representing 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 a subject of the same type as the changed subject and having a different shape is captured, and the intermediate image generation unit is configured to receive 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 more than a predetermined reference value.
The morphing image generation device further includes an instruction receiving unit receiving an instruction to select a processing layer to be used as the post-processing layer among the plurality of processing layers, and the extraction unit receives the instruction received by the instruction receiving unit. The processing layer indicated by the instruction may be used as the subsequent processing layer.
前記抽出部は、前記複数の処理層のうち一つの層を前記後段処理層として選択して前記一以上の第1画像出力及び前記一以上の第2画像出力を抽出した後に、前記前段処理層として選択した処理層を前記後段処理層として選択して、別の前記一以上の第1画像出力及び前記一以上の第2画像出力を抽出してもよい。 The extraction unit selects one of the plurality of processing layers as the post-processing layer and extracts the one or more first image outputs and the one or more second image outputs, and then the pre-processing layer. The selected processing layer may be selected as the post-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画像特徴点とに基づいて、前記被写体が変化する過程を段階的に表した一以上の中間画像を生成するステップと、を有する。 A morphing image generation method according to a second aspect of the present invention includes a first image which is an image before at least a part of a subject changes and a second image which is an image after at least a part of the subject changes. And a plurality of processing layers included in a machine learning model capable of outputting, for each of the first image and the second image, the type of the subject included in the image based on the input image. The first image, which is commonly activated in both the processing step of propagating, the post-processing layer selected from the plurality of processing layers, and the pre-processing layer that is the processing layer immediately before the post-processing layer And one or more second image outputs from the subsequent processing layer and the preceding processing layer based on the one or more first image outputs outputted from the subsequent processing layer and the preceding processing layer and the second image. Extracting one or more first image feature points based on the one or more first image outputs, and one or more second image feature points based on the one or more second image outputs. Based on the one or more first image feature points and the one or more second image feature points, to generate one or more intermediate images representing the process of changing the object in stages And step.
前記抽出するステップは、前記第1画像が前記複数の処理層の一部である前段処理層及び後段処理層の順に伝搬したことにより前記後段処理層から出力された複数の後段第1画像出力、及び前記第2画像が前段処理層及び後段処理層の順に伝搬したことにより前記後段処理層から出力された複数の後段第2画像出力から、共通に活性化している一以上の後段第1画像出力及び一以上の後段第2画像出力を抽出する前段抽出ステップと、前記一以上の後段第1画像出力及び前記一以上の後段第2画像出力を活性化させる要因となった前記前段処理層から出力された複数の前段第1画像出力、及び前記前段処理層から出力された複数の前段第2画像出力のうち、共通に活性化している一以上の前段第1画像出力及び一以上の前段第2画像出力を抽出する後段抽出ステップと、を有してもよい。 The step of extracting includes a plurality of subsequent first image outputs output from the subsequent processing layer by propagating the first image in order of the preceding processing layer and the subsequent processing layer that are a part of the plurality of processing layers; And one or more post-stage first image outputs activated in common from a plurality of post-stage second image outputs outputted from the post-stage processing layer by propagating the second image in order of the pre-stage processing layer and the post-stage processing layer And a pre-stage extraction step of extracting one or more second-stage second image outputs, and an output from the first-stage processing layer that has caused the activation of the one or more second-stage first image outputs and the one or more second-stage second image outputs. Among 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 activated in common. Extract image output And subsequent extraction step of, may have.
前記モーフィング画像生成方法は、前記前段抽出ステップを実行した後に、前記一以上の前段第1画像出力及び前記一以上の前段第2画像出力を、前記複数の後段第1画像出力及び前記複数の後段第2画像出力として、前記後段抽出ステップを実行してもよい。 In the morphing image generation method, after performing the pre-stage extraction step, the one or more pre-stage first image outputs and the one or more pre-stage second image outputs, the plurality of post-stage first image outputs and the plurality of post-stages The second stage extraction step may be executed as a second image output.
前記モーフィング画像生成方法は、前記複数の処理層のそれぞれに対して、前記後段抽出ステップ及び前記前段抽出ステップを実行してもよい。 The morphing image generation method may execute the post-stage extraction step and the pre-stage extraction step on each of the plurality of processing layers.
本発明によれば、モーフィング画像の質を向上させることができるという効果を奏する。 According to the present invention, it is possible to improve the quality of the morphing image.
[モーフィング画像生成装置1の概要]
図1は、モーフィング画像を生成する処理の概要を説明するための図である。モーフィング画像生成装置1は、例えばPC(Personal Computer)である。モーフィング画像生成装置1は、変化前後の被写体が写っている複数の画像に基づいて、機械学習モデルMを用いてモーフィング画像を生成する装置である。図1に示すモーフィング画像Aは、第1画像A1に写っている人の顔から第2画像A3に写っている車に変化する過程を段階的に表した画像である。図1に示す例において、人の目は、車のヘッドライトに対応し、人の口は、車の左右のヘッドライトの間に位置するラジエターグリルに対応するものとして説明する。
[Overview of Morphing Image Generation Device 1]
FIG. 1 is a diagram for describing an outline of processing 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. As shown in FIG. The machine learning model M includes a convolutional neural network (CNN). In this case, the machine learning model M includes the input layer M1, the first convolutional layer M2, the second convolutional layer M3, the first pooling layer M4, the normalization layer M5, the third convolutional layer M6, the second It has a pooling layer M7, a first total bonding layer M8, a second total bonding layer M9, and an output layer M10. In the present specification, of the two adjacent processing layers, the processing layer on the upstream side when the first image A1 and the second image A3 propagate is referred to as the pre-processing layer, and the processing layer on the downstream side is the post-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 processing layer that can be the post-processing layer is a first convolutional layer M2, a second convolutional layer M3, a first pooling layer M4, a normalization layer M5, a third convolutional layer M6, a second pooling layer M7, a second One of the total bonding layer M8, the second total bonding layer M9, and the output layer M10. Further, the processing layer which can be the pre-processing layer is an input layer M1, a first convolutional layer M2, a second convolutional layer M3, a first pooling layer M4, a normalization layer M5, a third convolutional layer M6, a second Pooling layer M7, the first total bonding layer M8, and the second total bonding 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画像に含まれる画素とが一致又は近似した関係である。
The morphing
そして、モーフィング画像生成装置1は、検出した対応関係にある第1画像A1及び第2画像A3それぞれの特徴点に基づいて、被写体が変化する過程を段階的に表した中間画像A2を生成する(図1の(4))。このようにすることで、モーフィング画像生成装置1は、モーフィング画像の質を向上させることができる。
以下、モーフィング画像生成装置1の詳細について説明する。
Then, based on the feature points of the first image A1 and the second image A3 in the detected correspondence relationship, the morphing
Hereinafter, details of the morphing
[モーフィング画像生成装置1の構成]
図3は、モーフィング画像生成装置1の構成を示す図である。モーフィング画像生成装置1は、操作部11、記憶部12、及び制御部13を有する。
[Configuration of Morphing Image Generating Device 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画像特徴点を選択する。
Also, 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 of 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は、計算した変化ステップに基づいて、一以上の中間画像を生成する。変化ステップの計算方法は、公知の技術を使用できる。
For example, 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, there is a possibility that the corresponding feature points can 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は、モーフィング画像の質を向上させることができる。
For example, 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, for example, the intermediate
[抽出処理]
続いて、抽出部133が行う抽出処理について説明する。上述のとおり、抽出部133は、後段抽出部134及び前段抽出部135を有する。後段抽出部134は、第1画像が複数の処理層の一部である前段処理層及び後段処理層の順に伝搬したことにより後段処理層から出力された複数の後段第1画像出力、及び第2画像が前段処理層及び後段処理層の順に伝搬したことにより後段処理層から出力された複数の後段第2画像出力から、共通に活性化している一以上の後段第1画像出力及び一以上の後段第2画像出力を抽出する。
[Extraction processing]
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 the last layer (eg, output layer or total bonding layer) or the treatment layer (full bonding layer or pooling layer) prior to the last layer selected by the
図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 shows a state before extraction, and FIG. 4B shows a state after extraction. In the first image, in the output layer M20, the units U5 and U8 are activated, and in the total bonding layer M19, the units U2, U5, U6, U7 and U8 are activated. In the second image, in the output layer M20, the units U3 and U5 are activated, and in the total bonding layer M19, the units U2, U4, U5, and U8 are 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 pre-processing layer propagates to the post-processing layer based on the first image. FIG. 6 shows a state in which the pre-processing layer propagates to the post-processing layer based on the second image. In the case of FIG. 5 and FIG. 6, the post-processing layer is the total bonding layer M18, and the pre-processing layer is a processing layer (for example, a pooling layer or a convolution layer) other than the total bonding layer. In FIGS. 5 and 6, the pre-processing layer is described as the pooling layer M17. In FIGS. 5 and 6, the pre-processing layer has three channels. The upper first channel includes units U11, U12, U13, U14, and U15. The middle second channel 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 unit 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 entire bonding layer M18, units U22, U24, U25 included in the second channel and 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
そして、前段抽出部135は、前段第1画像出力と前段第2画像出力との両方において活性化しているユニットが存在しているチャンネルが第2チャンネルであることから、前段第1画像出力の第2チャンネルに含まれるユニットU21、U24及び前段第2画像出力の第2チャンネルに含まれるユニットU22、U24、U25を抽出する。
Since 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-processing layer is a pooling layer M16, and the pre-processing layer is a processing layer other than the pooling layer (for example, a convolution layer or a normalization layer). In FIG. 7, the pre-processing layer is described as the convolution layer M15. Further, in FIG. 7, the pre-stage processing layer is 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-processing layer is a convolution layer M14, and the pre-processing layer is another processing layer (for example, a normalization layer or a pooling layer) including the convolution layer. In FIG. 8, the pre-processing layer is described as the normalization layer M13. Further, in FIG. 8, the pre-processing layer is described as having one channel. In the first image, the convolution layer M14 has the unit U5 activated, and the normalization 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 normalization 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
図9の場合において、後段処理層は、正規化層M12であり、前段処理層は、正規化層以外の処理層(例えば、畳み込み層又はプーリング層等)である。図9においては、前段処理層がプーリング層M11であるとして説明する。また、図9において、前段処理層は、チャンネルが1つであるとして説明する。第1画像において、正規化層M12は、ユニットU5が活性化している。第2画像において、正規化層M12は、ユニットU3が活性化している。 In the case of FIG. 9, the post-processing layer is a normalization layer M12, and the pre-processing layer is a processing layer other than the normalization layer (for example, a convolution layer or a pooling layer). In FIG. 9, the pre-processing layer is described as the pooling layer M11. Further, in FIG. 9, the pre-processing layer is described as having one channel. In the first image, the normalization layer M12 has the unit U5 activated. In the second image, the normalization layer M12 has the unit U3 activated.
ここで、抽出部133は、画像に対して前処理を行う正規化層においては、後段処理層において活性化しているユニットに結合している前段処理層に含まれる複数のユニットのうち、中心のユニットを抽出する。この場合において、後段抽出部134は、後段処理層として選択した正規化層M12から出力された後段第1画像出力のユニットU5、及び正規化層M12から出力された後段第2画像出力のユニットU3を抽出する。
Here, in the normalized layer that performs preprocessing on the image, the
そして、前段抽出部135は、正規化層M12から出力された後段第1画像出力のユニットU5に結合しているプーリング層M11のユニットのうち、中心のユニットU5を抽出する。同様に、前段抽出部135は、正規化層M12から出力された後段第2画像出力のユニットU3に結合しているプーリング層M11のユニットのうち、中心のユニットU3を抽出する。
Then, the
抽出部133は、上述の抽出処理を入力層まで繰り返し行うことが好ましい。しかし、抽出部133は、抽出処理を最初の処理層まで行わずに、途中の処理層(例えば、プーリング層又は正規化層等)で終了してもよい。このように、抽出部133は、伝搬制御部132が伝搬させた順序とは逆の順序で抽出処理を行うことにより、抽象度が高い出力を抽出することができる。
It is preferable that the
[モーフィング画像生成装置1の処理]
続いて、モーフィング画像生成装置1が行う処理の流れを説明する。図10は、モーフィング画像生成装置1が行う処理の流れを示すフローチャートである。本フローチャートは、モーフィング画像生成装置1が、記憶部12に第1画像及び第2画像が格納され、モーフィング画像を生成する処理を実行する操作を受け付けたことを契機として開始する。
[Process of morphing image generation device 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画像出力とを抽出する。
If 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法に基づいて絞り込みを行う。
Referring back to FIG. 10, the feature
選択部138は、第1画像特徴点及び第2画像特徴点に不適切な特徴点があると判定した場合、不適切な特徴点、すなわち、誤検出した対応関係にある第1画像特徴点及び第2画像特徴点を除去し(S6)、除去した後の対応関係に基づく一部の第1画像特徴点及び一部の第2画像特徴点を選択する。中間画像生成部139は、選択部138が、第1画像特徴点及び第2画像特徴点に不適切な特徴点がないと判定した場合、又は誤検出した対応関係を除去した後に、一以上の第1画像特徴点と一以上の第2画像特徴点とに基づいて、一以上の中間画像を生成する(S7)。
If the
中間画像生成部139は、例えば、第1画像特徴点が示す第1画像の画素における座標と、第1画像特徴点に対応する第2画像特徴点が示す第2画像の画素における座標とに基づいて、変化ステップを計算する。そして、中間画像生成部139は、計算した変化ステップに基づいて、一以上の中間画像を生成する。中間画像生成部139は、生成した中間画像を記憶部12に記憶させる。
For example, the intermediate
[実施形態における効果]
以上説明したとおり、モーフィング画像生成装置1は、取得した第1画像及び第2画像のそれぞれに、機械学習モデルMに含まれる複数の処理層を伝搬させる。モーフィング画像生成装置1は、伝搬させた順とは逆の順序で後段処理層及び前段処理層の両方の処理層において共通に活性化している一以上の第1画像出力及び一以上の第2画像出力を、処理層ごとに抽出し、対応関係にある第1画像特徴点及び第2画像特徴点をそれぞれ検出する。そして、モーフィング画像生成装置1は、誤検出した対応関係を除去した一以上の第1画像特徴点と一以上の第2画像特徴点とに基づいて、一以上の中間画像を生成する。
[Effect in the embodiment]
As described above, the morphing
このようにすることで、モーフィング画像生成装置1は、畳み込みニューラルネットワークを含む機械学習モデルMを使用し、深層学習による抽象度が高い特徴量を求めることにより、第1画像及び第2画像に基づく中間画像を生成することができる。すなわち、モーフィング画像生成装置1は、ユーザが第1画像における特定の領域及び第2画像における特定の領域を対応付けすることなく、対応関係にある第1画像特徴点及び第2画像特徴点をそれぞれ検出することにより、第1画像及び第2画像に基づく中間画像を生成することができる。その結果、モーフィング画像生成装置1は、モーフィング画像の質を向上させることができる。
By doing this, the morphing
モーフィング画像生成装置1は、例えば、時短ビデオ等によってカットされた部分において、映像に連続性がなく不自然に見えているような場合に、連続性がない前後の映像に基づいて中間画像を生成することにより、自然で連続性のある映像にすることができる。また、モーフィング画像生成装置1は、例えば、2つの原画に基づいて一以上の中間画像を生成することにより、アニメーション制作における「中割り」の工程を自動化することができる。
The morphing
以上、本発明を実施の形態を用いて説明したが、本発明の技術的範囲は上記実施の形態に記載の範囲には限定されず、その要旨の範囲内で種々の変形及び変更が可能である。例えば、装置の分散・統合の具体的な実施の形態は、以上の実施の形態に限られず、その全部又は一部について、任意の単位で機能的又は物理的に分散・統合して構成することができる。また、複数の実施の形態の任意の組み合わせによって生じる新たな実施の形態も、本発明の実施の形態に含まれる。組み合わせによって生じる新たな実施の形態の効果は、もとの実施の形態の効果を合わせ持つ。 As mentioned above, although the present invention was explained using an embodiment, the technical scope of the present invention is not limited to the range given in the above-mentioned embodiment, and various modification and change are possible within the range of the gist. is there. For example, a specific embodiment of device distribution and integration is not limited to the above embodiment, and all or a part thereof may be functionally or physically distributed and integrated in any unit. Can. In addition, new embodiments produced by any combination of a plurality of embodiments are also included in the embodiments of the present invention. The effects of the new embodiment generated by the combination combine the effects of the original embodiment.
1 モーフィング画像生成装置
11 操作部
12 記憶部
13 制御部
131 画像取得部
132 伝搬制御部
133 抽出部
134 後段抽出部
135 前段抽出部
136 指示受付部
137 特徴点検出部
138 選択部
139 中間画像生成部
1 morphing
Claims (15)
前記第1画像及び前記第2画像のそれぞれに、入力された画像に基づいて当該画像に含まれる被写体の種別を出力可能な機械学習モデルに含まれる複数の処理層を伝搬させる伝搬制御部と、
前記複数の処理層から選択した後段処理層、及び前記後段処理層の直前の処理層である前段処理層の両方の処理層において共通に活性化している、前記第1画像に基づいて前記後段処理層及び前記前段処理層から出力された一以上の第1画像出力と前記第2画像に基づいて前記後段処理層及び前記前段処理層から出力された一以上の第2画像出力とを抽出する抽出部と、
前記一以上の第1画像出力に基づいて一以上の第1画像特徴点を検出し、かつ前記一以上の第2画像出力に基づいて一以上の第2画像特徴点を検出する特徴点検出部と、
前記一以上の第1画像特徴点と前記一以上の第2画像特徴点とに基づいて、前記被写体が変化する過程を段階的に表した一以上の中間画像を生成する中間画像生成部と、
を有するモーフィング画像生成装置。 An image acquisition unit that acquires a first image which is an image before at least a part of the subject changes and a second image which is an image after at least a part of the subject changes;
A propagation control unit configured to propagate, to each of the first image and the second image, 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;
The post-process according to the first image, which is activated in common in both the post-treatment layer selected from the plurality of treatment layers and the pre-treatment layer that is the treatment layer immediately before the post-treatment layer Extracting one or more first image outputs output from the layer and the pre-processing layer and one or more second image outputs output from the post-processing layer and the pre-processing layer based on the second image Department,
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 representing a process of changing the subject stepwise based on the one or more first image feature points and the one or more second image feature points;
Morphing image generating apparatus having:
前記第1画像が前記複数の処理層の一部である前段処理層及び後段処理層の順に伝搬したことにより前記後段処理層から出力された複数の後段第1画像出力、及び前記第2画像が前段処理層及び後段処理層の順に伝搬したことにより前記後段処理層から出力された複数の後段第2画像出力から、共通に活性化している一以上の後段第1画像出力及び一以上の後段第2画像出力を抽出する後段抽出部と、
前記一以上の後段第1画像出力及び前記一以上の後段第2画像出力を活性化させる要因となった前記前段処理層から出力された複数の前段第1画像出力、及び前記前段処理層から出力された複数の前段第2画像出力のうち、共通に活性化している一以上の前段第1画像出力及び一以上の前段第2画像出力を抽出する前段抽出部と、
を有する、
請求項1に記載のモーフィング画像生成装置。 The extraction unit
As the first image is propagated in the order of the pre-processing layer and the post-processing layer that are a part of the plurality of processing layers, the plurality of post-processing first image outputs and the second image output from the post-processing layer From the plurality of second-stage second image outputs outputted from the second-stage processing layer by propagating in order of the first-stage processing layer and the second-stage processing layer, one or more second-stage first image outputs and one or more second-stage latter output commonly activated. 2) A post-stage extraction unit that extracts an image output;
A plurality of pre-stage first image outputs output from the pre-stage processing layer that has caused the activation of the one or more post-stage first image outputs and the one or more post-stage second image outputs, and an output from the pre-stage processing layer A pre-stage extraction unit 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 that have been activated;
Have
The morphing image generation device according to claim 1.
請求項2に記載のモーフィング画像生成装置。 The pre-stage extraction unit is configured to output the one or more pre-stage first image outputs and the one or more pre-stage first image outputs based on an activated size of the plurality of pre-stage first image outputs and the plurality of pre-stage second image outputs. Extract the pre-stage second image output,
The morphing image generation apparatus according to claim 2.
前記後段処理層は、出力層、全結合層、正規化層、プーリング層、及び畳み込み層のうちのいずれかの層である、
請求項2又は3に記載のモーフィング画像生成装置。 The machine learning model includes a convolutional neural network
The post-processing layer is any one of an output layer, a total coupling layer, a normalization layer, a pooling layer, and a convolution layer,
A morphing image generation apparatus according to claim 2 or 3.
請求項4に記載のモーフィング画像生成装置。 The pre-processing layer is any of the total connection layer, the normalization layer, the pooling layer, the convolution layer, and the input layer,
The morphing image generation device according to claim 4.
請求項1又は5に記載のモーフィング画像生成装置。 In the case where the last tail layer which is the last treatment layer among the plurality of treatment layers is selected as the second treatment layer, the extraction unit is configured to activate the one or more first common layers in the last tail 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 tail layer are extracted Do,
The morphing image generation device according to claim 1.
前記中間画像生成部は、前記一部の第1画像特徴点と前記一部の第2画像特徴点とに基づいて、前記被写体が変化する過程を段階的に表した一以上の中間画像を生成する、
請求項1から6のいずれか一項に記載のモーフィング画像生成装置。 From the one or more first image feature points specified by the feature point detection unit and the one or more second image feature points, a part of the first image feature points and a part of the second image feature points based on the mutual correspondence relationship The image processing apparatus further comprises a selection unit for selecting an image feature point,
The intermediate image generation unit generates one or more intermediate images stepwise representing 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 generation device 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 as the subject after change and of different shapes are captured,
The intermediate image generation unit may select one of 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. 2Select an image,
The morphing image generation device 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 point is a predetermined reference value or more.
The morphing image generation device according to claim 8.
前記抽出部は、前記指示受付部が受け付けた前記指示が示す前記処理層を、前記後段処理層として使用する、
請求項1から9のいずれか一項に記載のモーフィング画像生成装置。 The apparatus further includes an instruction accepting unit that accepts an instruction to select a processing layer to be used as the post-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 post-processing layer.
The morphing image generation device 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-processing layer and extracts the one or more first image outputs and the one or more second image outputs, and then the pre-processing layer. Selecting the processing layer selected as the post-processing layer to extract another one or more first image outputs and the one or more second image outputs,
The morphing image generation device according to any one of claims 1 to 10.
前記第1画像及び前記第2画像のそれぞれに、入力された画像に基づいて当該画像に含まれる被写体の種別を出力可能な機械学習モデルに含まれる複数の処理層を伝搬させるステップと、
前記複数の処理層から選択した後段処理層、及び前記後段処理層の直前の処理層である前段処理層の両方の処理層において共通に活性化している、前記第1画像に基づいて前記後段処理層及び前記前段処理層から出力された一以上の第1画像出力と前記第2画像に基づいて前記後段処理層及び前記前段処理層から出力された一以上の第2画像出力とを抽出するステップと、
前記一以上の第1画像出力に基づいて一以上の第1画像特徴点を検出し、かつ前記一以上の第2画像出力に基づいて一以上の第2画像特徴点を検出するステップと、
前記一以上の第1画像特徴点と前記一以上の第2画像特徴点とに基づいて、前記被写体が変化する過程を段階的に表した一以上の中間画像を生成するステップと、
を有するモーフィング画像生成方法。 Acquiring a first image, which is an image before at least a part of the subject changes, and a second image, which is an image after at least a part of the subject changes.
Propagating, to each of the first image and the second image, 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;
The post-process according to the first image, which is activated in common in both the post-treatment layer selected from the plurality of treatment layers and the pre-treatment layer that is the treatment layer immediately before the post-treatment layer Extracting one or more first image outputs output from the layer and the pre-processing layer and one or more second image outputs output from the post-processing layer and the pre-processing layer based on the second image When,
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;
Generating, based on the one or more first image feature points and the one or more second image feature points, one or more intermediate images representing a process of changing the subject in stages;
A morphing image generation method comprising:
前記第1画像が前記複数の処理層の一部である前段処理層及び後段処理層の順に伝搬したことにより前記後段処理層から出力された複数の後段第1画像出力、及び前記第2画像が前段処理層及び後段処理層の順に伝搬したことにより前記後段処理層から出力された複数の後段第2画像出力から、共通に活性化している一以上の後段第1画像出力及び一以上の後段第2画像出力を抽出する前段抽出ステップと、
前記一以上の後段第1画像出力及び前記一以上の後段第2画像出力を活性化させる要因となった前記前段処理層から出力された複数の前段第1画像出力、及び前記前段処理層から出力された複数の前段第2画像出力のうち、共通に活性化している一以上の前段第1画像出力及び一以上の前段第2画像出力を抽出する後段抽出ステップと、
を有する、請求項12に記載のモーフィング画像生成方法。 The extracting step is
As the first image is propagated in the order of the pre-processing layer and the post-processing layer that are a part of the plurality of processing layers, the plurality of post-processing first image outputs and the second image output from the post-processing layer From the plurality of second-stage second image outputs outputted from the second-stage processing layer by propagating in order of the first-stage processing layer and the second-stage processing layer, one or more second-stage first image outputs and one or more second-stage latter output commonly activated. A pre-extraction step of extracting two image outputs;
A plurality of pre-stage first image outputs output from the pre-stage processing layer that has caused the activation of the one or more post-stage first image outputs and the one or more post-stage second image outputs, and an output from the pre-stage processing layer A subsequent extraction step of extracting one or more preceding first image outputs and one or more preceding second image outputs that are activated in common among the plurality of preceding second image outputs;
The morphing image generation method according to claim 12, comprising:
請求項13に記載のモーフィング画像生成方法。 After performing 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 second-stage first image outputs and the plurality of second-stage second image outputs. Execute the post extraction step,
A method of generating a morphing image according to claim 13.
請求項13又は14に記載のモーフィング画像生成方法。
Performing the post-stage extraction step and the pre-stage extraction step on each of the plurality of processing layers;
A 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 true JP2019096130A (en) | 2019-06-20 |
JP6924128B2 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) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
DE202022100786U1 (en) | 2022-02-11 | 2022-03-03 | Gaurav Kumar Arora | Intelligent processed image recognition system with artificial intelligence and machine learning |
WO2022162760A1 (en) * | 2021-01-27 | 2022-08-04 | 富士通株式会社 | Determination method, determination program, and information processing device |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2009205553A (en) * | 2008-02-28 | 2009-09-10 | Kanazawa Inst Of Technology | Image creating device and method therefor |
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
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2009205553A (en) * | 2008-02-28 | 2009-09-10 | Kanazawa Inst Of Technology | Image creating device and method therefor |
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 |
Cited By (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 |
Also Published As
Publication number | Publication date |
---|---|
JP6924128B2 (en) | 2021-08-25 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110390704B (en) | Image processing method, image processing device, terminal equipment and storage medium | |
Cao et al. | 3D aided duet GANs for multi-view face image synthesis | |
Hassner et al. | Effective face frontalization in unconstrained images | |
WO2020000814A1 (en) | Computer-implemented method for generating composite image, apparatus for generating composite image, and computer-program product | |
WO2022095721A1 (en) | Parameter estimation model training method and apparatus, and device and storage medium | |
CN108491786B (en) | Face detection method based on hierarchical network and cluster merging | |
CN112232134B (en) | Human body posture estimation method based on hourglass network and attention mechanism | |
CN109544450B (en) | Method and device for constructing confrontation generation network and method and device for reconstructing image | |
CN112381071A (en) | Behavior analysis method of target in video stream, terminal device and medium | |
JP2019096130A (en) | Morphing image generation device, and morphing image generation method | |
Hsieh et al. | Automatic trimap generation for digital image matting | |
US11948278B2 (en) | Image quality improvement method and image processing apparatus using the same | |
JP6946231B2 (en) | Object tracking device and object tracking method | |
US20210049350A1 (en) | Method and device for generating face image, electronic device and computer readable storage medium | |
JP7010780B2 (en) | Object area extraction device and object area extraction method | |
Yixin et al. | IFS fractal morphing based on coarse convex-hull | |
CN113158782B (en) | Multi-person concurrent interaction behavior understanding method based on single-frame image | |
JP6783742B2 (en) | Parameter identification device and parameter identification method | |
Li et al. | Face mask removal based on generative adversarial network and texture network | |
Yu et al. | Foreground and background separated image style transfer with a single text condition | |
US20050238234A1 (en) | Method for edge detection and contour stroke generation | |
JP2019097066A (en) | Moving image compressing apparatus and moving image compressing method | |
Talu et al. | A novel object recognition method based on improved edge tracing for binary images | |
JP6830052B2 (en) | Spatial information generator and spatial information generation method | |
Byun et al. | Transfer Learning based Parameterized 3D Mesh Deformation with 2D Stylized Cartoon Character. |
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 | Request for written amendment filed |
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 |