JP7700951B2 - Image conversion device, method and program - Google Patents
Image conversion device, method and program Download PDFInfo
- Publication number
- JP7700951B2 JP7700951B2 JP2024502365A JP2024502365A JP7700951B2 JP 7700951 B2 JP7700951 B2 JP 7700951B2 JP 2024502365 A JP2024502365 A JP 2024502365A JP 2024502365 A JP2024502365 A JP 2024502365A JP 7700951 B2 JP7700951 B2 JP 7700951B2
- Authority
- JP
- Japan
- Prior art keywords
- face
- image
- facial
- converted
- facial expression
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T1/00—General purpose image data processing
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Image Processing (AREA)
Description
本発明の実施形態は、画像変換装置、方法およびプログラムに関する。 Embodiments of the present invention relate to image conversion devices, methods and programs.
非特許文献1は、リアルタイムな表情変形(表情変換)フィードバックによる感情体験の操作の可能性について開示している。非特許文献1では、被験者の顔をリアルタイムにトラッキング(tracking)して自然な表情変形処理を施している。非特許文献1では、画像変換法としてRigid MLS(Moving Least Squares)法を使用して、顔画像における表情を変形している。Rigid MLS法は、画像から認識した画像中の特徴点を認識して、これを移動させることで、画像を歪めるという手法である。このような手法は非特許文献2にも開示される。なお、顔画像とは、被験者の顔を撮影した画像、コンピュータが生成したアバターの顔を抽出した画像、などである。Non-Patent
しかしながら、被験者の顔の角度が変わったり、顔の一部が隠れたりすることで、上記の特徴点の認識ができなかった場合、不自然なタイミング(timing)にて表情変換が止まってしまうため、不自然な変換による顔画像しか得ることができない。すなわち、顔の画像に表れる表情をシームレス(seamless)に変換することができない。However, if the angle of the subject's face changes or part of the face is hidden and the above feature points cannot be recognized, the facial expression conversion stops at an unnatural timing, and only facial images with unnatural conversion can be obtained. In other words, the facial expressions shown in the facial image cannot be converted seamlessly.
この発明は、上記事情に着目してなされたもので、その目的とするところは、顔の画像に表れる表情をシームレスに変換することができるようにした画像変換装置、方法およびプログラムを提供することにある。This invention has been made in light of the above-mentioned circumstances, and its purpose is to provide an image conversion device, method and program that can seamlessly convert facial expressions shown in facial images.
上記課題を解決するために、この発明の一態様に係る画像変換装置は、人の顔が含まれる画像から認識された顔パーツの特徴点を認識する特徴点認識部と、前記画像における顔が正面から認識できなくなる限界の角度に対する、正面からの前記顔の角度の比率と、前記顔の全体の領域に対する前記顔が物体で隠れている領域が除かれた領域の割合に基づいて、前記認識された顔の表情を変換するべき変換表情に変換するときの、前記変換表情に応じた前記顔パーツの特徴点のそれぞれについての変形量を表す変化量を補正する変化量補正部と、前記補正した変化量により前記特徴点を変形することで前記人の顔の表情を変換した変換画像を得る表情変換部と、を備える。 In order to solve the above problem, an image conversion device according to one embodiment of the present invention comprises a feature point recognition unit that recognizes feature points of facial parts recognized from an image including a human face, a change amount correction unit that corrects a change amount representing the amount of deformation for each of the feature points of the facial parts corresponding to the converted expression when converting the recognized facial expression into a converted expression to be converted, based on the ratio of the angle of the face from the front to the limit angle at which the face in the image cannot be recognized from the front and the proportion of the area excluding areas of the face that are obscured by objects to the entire area of the face, and an expression conversion unit that obtains a converted image in which the human facial expression is converted by deforming the feature points by the corrected change amount.
上記課題を解決するために、この一態様に係る画像変換方法は、人の顔の画像における表情を変換する画像変換装置により行われる方法であって、前記画像変換装置の特徴点認識部により、人の顔が含まれる画像から認識された顔パーツの特徴点を認識することと、前記画像変換装置の変化量補正部により、前記画像における顔が正面から認識できなくなる限界の角度に対する、正面からの前記顔の角度の比率と、前記顔の全体の領域に対する前記顔が物体で隠れている領域が除かれた領域の割合に基づいて、前記認識された顔の表情を変換するべき変換表情に変換するときの、前記変換表情に応じた前記顔パーツの特徴点のそれぞれについての変形量を表す変化量を補正することと、前記画像変換装置の表情変換部により、前記補正した変化量により前記特徴点を変形することで前記人の顔の表情を変換した変換画像を得ることと、を具備する。 In order to solve the above problem, an image conversion method according to one embodiment is a method performed by an image conversion device that converts facial expressions in an image of a human face, and includes: recognizing, by a feature point recognition unit of the image conversion device, feature points of facial parts recognized from an image including a human face; correcting, by a change amount correction unit of the image conversion device, a change amount representing the amount of deformation for each of the feature points of the facial parts corresponding to the converted expression when converting the recognized facial expression into a converted expression to be converted, based on a ratio of the angle of the face from the front to the limit angle at which the face in the image cannot be recognized from the front and a ratio of an area excluding areas where the face is hidden by objects to the entire area of the face; and obtaining a converted image in which the facial expression of the person is converted by transforming the feature points by the corrected change amount, by a facial expression conversion unit of the image conversion device.
本発明によれば、顔の画像に表れる表情をシームレスに変換することができる。 The present invention makes it possible to seamlessly transform facial expressions appearing in facial images.
[一実施形態]
以下、図面を参照して、この発明に係わる一実施形態を説明する。
(構成例)
図1は、この発明の一実施形態に係る画像変換装置の構成の一例を示すブロック図である。
図1に示される例では、この発明の一実施形態に係る画像変換装置100は、画像取得部11、特徴点認識部12、顔角度算出部13、表示割合算出部14、変換表情入力部15、変化量格納部16、変化量補正部17、表情変換部18、及び画像出力部19を有する。
[One embodiment]
An embodiment of the present invention will now be described with reference to the drawings.
(Configuration example)
FIG. 1 is a block diagram showing an example of the configuration of an image conversion device according to an embodiment of the present invention.
In the example shown in Figure 1, an
画像取得部11は、例えばwebカメラ(camera)により撮影された画像またはアバター(avatar)などからユーザ(user)の顔画像を取得する。画像取得部11は、取得した顔画像を、特徴点認識部12、表示割合算出部14、及び表情変換部18に出力する。The
特徴点認識部12は、画像取得部11が取得した顔画像を入力とし、その顔画像から認識される顔パーツ(parts)の特徴点を認識する。この特徴点認識部12における特徴点の認識手法については後述する。特徴点認識部12は、認識した特徴点を顔角度算出部13及び変化量補正部17に出力する。The feature
顔角度算出部13は、特徴点認識部12が認識した特徴点を入力とし、顔画像における顔の角度、例えば顔が正面を向いたときの位置を基準とした、顔の中心の現在の位置との間の角度(正面からの顔の角度と称することがある)を算出して、この算出した角度のデータ(data)を変化量補正部17に出力する。The face
表示割合算出部14は、画像取得部11が取得した顔画像を入力とし、その顔画像に対して顔の全体のうち隠れている部分の割合を算出し、この算出した割合のデータを変化量補正部17に出力する。The display
変換表情入力部15は、キーボード(keyboard)などのユーザインタフェース(user interface)からユーザが指定入力した、笑顔などの変換したい先の表情である変換表情(変換するべき変換表情と称することがある)を取得する。変換表情入力部15は、取得した変換表情を変化量補正部17に出力する。The conversion facial
変化量格納部16には、変換したい先の表情ごとに、各特徴点についての変形量(座標値の移動量)を表す変化量が予め格納(記憶)される。変化量は、変換したい先の表情に応じて各特徴点の座標値を、どの程度移動すべきかを示す情報である。変化量は、例えば、ユーザが特定の顔画像について無表情顔に表情変形処理を適用しながら、自然な表情となるように調整して、予め求めることができる。The change
変化量補正部17は、特徴点認識部12が認識した特徴点、顔角度算出部13により算出した顔角度、及び表示割合算出部14により算出した表示割合を入力する。
また、変化量補正部17は、変換表情入力部15から入力された変換表情で示される変換したい先の表情に応じた変化量を変化量格納部16から読み出す。
変化量補正部17は、これら入力した特徴点、顔角度、及び表示割合に基づいて、変換したい先の表情における変化量を後述する式によって補正した変化量を算出し、この算出した変化量のデータを表情変換部18に出力する。
The change
Furthermore, the change
The change
表情変換部18は、変化量補正部17が補正した変化量を入力とする。表情変換部18は、上記補正した変化量、すなわち変換するべき変換表情に応じた変形量を表す変化量に基づいて、入力された顔画像における各特徴点を、入力した、その特徴点の補正した変化量である移動量に基づいて移動することで、顔画像の表情を変換した顔画像を得る。表情変換部18は、変換後の顔画像を画像出力部19に出力する。The facial
画像出力部19は、表情変換部18からの変換後の顔画像を入力とし、入力された顔画像を出力する。ここで、出力とは、例えば、記憶媒体に記憶すること、ディスプレイ(display)で表示すること、通信ネットワークを介して他の機器へ送信すること、などを含む。The
図2は、画像変換装置100のハードウェア構成の一例を示す図である。
画像変換装置100は、例えば、パーソナルコンピュータ(Personal computer)、スマートホン(smart phone)、サーバコンピュータ(server computer)、などのコンピュータにより構成される。画像変換装置100は、図2に示すように、CPU(Central Processing Unit)等のハードウェアプロセッサ(hardware processor)(単にプロセッサと称することがある)111Aを有する。なお、CPUは、マルチコア(multi-core)及びマルチスレッド(multithread)のものを用いることで、同時に複数の情報処理を実行することができる。また、プロセッサ111Aは、複数のCPUを備えていても良い。そして、画像変換装置100では、このプロセッサ111Aに対し、プログラムメモリ(program memory)111Bと、データメモリ(data memory)112と、通信インタフェース114と、入出力インタフェース113とが、バス(bus)115を介して接続される。
FIG. 2 is a diagram showing an example of the hardware configuration of the
The
通信インタフェース114は、例えば一つ以上の有線または無線の通信モジュールを含むことができる。通信インタフェース114は、ケーブル(cable)もしくはLAN(Local Area Network)またはインターネット(internet)等のネットワーク(NW)を介して接続される他のコンピュータおよびwebカメラ、などとの間で通信を行うことができる。The
入出力インタフェース113には、入力デバイス(device)200及び出力デバイス300が接続されている。入力デバイス200は、キーボード、マウス(mouse)などのポインティングデバイス(pointing device)、などの入力デバイス、カメラなどのセンサデバイス(sensor device)、などを含む。また、出力デバイス300は、液晶ディスプレイ、CRT(Cathode Ray Tube)ディスプレイ、などの表示デバイスである。入力デバイス200及び出力デバイス300は、いわゆるタブレット(tablet)型の入力・表示デバイスを用いたものが用いられることもできる。この種の入力・表示デバイスは、例えば液晶または有機EL(Electro Luminescence)を使用した表示デバイスの表示画面上に、静電方式または圧力方式を採用した入力検知シート(sheet)を配置して構成される。入出力インタフェース113は、上記入力デバイス200において入力された操作情報をプロセッサ111Aに入力すると共に、プロセッサ111Aで生成された表示情報を出力デバイス300に表示させる。An
なお、入力デバイス200及び出力デバイス300は、入出力インタフェース113に接続されていなくても良い。入力デバイス200及び出力デバイス300は、通信インタフェース114と直接またはネットワークを介して接続するための通信ユニットを備えることで、プロセッサ111Aとの間で情報の授受を行い得る。
The
また、入出力インタフェース113は、フラッシュメモリ(Flash memory)等の半導体メモリといった記録媒体のリード/ライト(read / write)機能を有しても良いし、あるいは、そのような記録媒体のリード/ライト機能を持ったリーダライタ(reader writer)との接続機能を有しても良い。さらに、入出力インタフェース113は、他の機器との接続機能を有して良い。In addition, the input/
プログラムメモリ111Bは、非一時的な有形のコンピュータ可読記憶媒体として、随時書込み及び読出しが可能な不揮発性メモリ(non-volatile memory)と、随時読出しのみが可能な不揮発性メモリとが組み合わせて使用されたものである。随時書込み及び読出しが可能な不揮発性メモリは、例えば、HDD(Hard Disk Drive)、SSD(Solid State Drive)、などである。随時読出しのみが可能な不揮発性メモリは、例えば、ROM(Read Only Memory)などである。このプログラムメモリ111Bには、プロセッサ111Aが一実施形態に係る各種制御処理を実行するために必要なプログラム、例えば画像変換プログラムが格納されている。すなわち、上記の画像取得部11、特徴点認識部12、顔角度算出部13、表示割合算出部14、変換表情入力部15、変化量補正部17、表情変換部18、及び画像出力部19の各部における処理機能部は、何れも、プログラムメモリ111Bに格納された画像変換プログラムを上記プロセッサ111Aにより読み出させて実行させることにより実現され得る。なお、これらの処理機能部の一部または全部は、特定用途向け集積回路(ASIC:Application Specific Integrated Circuit)またはFPGA(field-programmable gate array)等の集積回路を含む、他の多様な形式によって実現されても良い。The
データメモリ112は、有形のコンピュータ可読記憶媒体として、例えば、上記の不揮発性メモリと、RAM(Random Access Memory)等の揮発性メモリ(volatile memory)とが組み合わせて使用されたものである。このデータメモリ112は、各種処理が行われる過程で取得及び作成された各種データが記憶されるために用いられる。すなわち、データメモリ112には、各種処理が行われる過程で、適宜、各種データを記憶するための領域が確保される。
図3は、顔の特徴点の一例を示す図である。図3中の星印が、プロセッサ111Aが認識した特徴点であり、各特徴点の横に付された数字は各特徴点を識別するための一意な特徴点ID(IDentifier)である。特徴点IDの数及び各特徴点IDに対する顔の部分は、採用する特徴点認識手法により決まっている。例えば、特徴点ID「18」の特徴点は向かって左の眉の左端、のように予め決まっている。
Figure 3 is a diagram showing an example of facial feature points. The stars in Figure 3 are feature points recognized by
図4は、特徴点の記憶形態の一例を示す図である。図4に示すように、データメモリ112には、テーブル(table)形式で、特徴点IDに対応付けて顔画像中の特徴点のx座標及びy座標が記憶される。座標の値はピクセル(pixel)である。従って、データメモリ112には、図3の例であれば、特徴点ID「1」~「68」に係る特徴点について、そのxy座標が記憶される。
Figure 4 is a diagram showing an example of the storage format of feature points. As shown in Figure 4, the
データメモリ112には、プロセッサ111Aが上記の変換表情入力部15として動作したときに取得した、ユーザによって指定された変換表情が記憶される。
データメモリ112には、上記の変化量格納部16に格納される変換量が格納され得る。
The
The
図5は、変化量の記憶形態の一例を示す図である。図5に示すように、データメモリ112には、変換表情ごとに、特徴点IDに対応付けて、特徴点のx座標の変化量とy座標の変化量とが、被写体である人物によらない変化量として、テーブル形式で記憶される。変化量の値はピクセルである。変化量は、特徴点の移動方向と移動量によって表される。例えば、移動量「+1」は、正方向に1ピクセル移動することを表す。
Figure 5 is a diagram showing an example of the storage format of the amount of change. As shown in Figure 5, in the
データメモリ112には、プロセッサ111Aが上記の表情変換部18として動作したときに変換した顔画像が記憶され得る。
また、データメモリ112には、プロセッサ111Aが動作途中で発生する種々の中間データが記憶され得る。
The
Furthermore, the
(動作)
次に、画像変換装置100の動作を説明する。
図6は、画像変換装置100による画像変換処理動作の一例を示すフローチャートである。画像変換装置100のプロセッサ111Aは、プログラムメモリ111Bに記憶された画像変換プログラムを読み出して実行することで、このフローチャートに示す画像変換装置100としての動作を開始する。プロセッサ111Aでの画像変換プログラムの実行は、入力デバイス200から、入出力インタフェース113を介して、あるいは、通信インタフェース114を介して、画像変換の実施を指示されることで開始される。
(operation)
Next, the operation of the
6 is a flowchart showing an example of the image conversion processing operation by the
プロセッサ111Aは、変換表情入力部15として動作して、ユーザによる、笑顔などの変換したい先の表情である変換表情の指定入力を待つ(ステップS1)。例えば、プロセッサ111Aは、入出力インタフェース113または通信インタフェース114を介した入力デバイス200からの入力信号が変換表情の指定入力を含むか否かを判断する。変換表情の指定入力が有ったならば、プロセッサ111Aは、ステップS2の処理へ移行する。The
プロセッサ111Aは、指定された変換表情を、データメモリ112に記憶させる(ステップS2)。The
プロセッサ111Aは、画像取得部11として動作して、顔画像を取得する(ステップS3)。例えば、プロセッサ111Aは、入力デバイス200のカメラによる被験者の顔の撮影画像を入出力インタフェース113を介して取得する。あるいは、プロセッサ111Aは、ネットワークに接続されたwebカメラにより撮影された顔画像または他のコンピュータが生成したアバターの顔を通信インタフェース114を介して取得する。プロセッサ111Aは、取得した顔画像を、データメモリ112に記憶させる。The
プロセッサ111Aは、特徴点認識部12として動作して、データメモリ112に記憶されている顔画像から特徴点を認識する(ステップS4)。プロセッサ111Aは、例えば、dlibのface_landmark_detection関数(例えばhttp://dlib.net/face_landmark_detection.py.htmlを参照)などを利用して、顔画像に対して特徴点を認識する。具体的には、プロセッサ111Aは、入力の顔画像に対して、HOG(Histogram of Oriented Gradients)特徴と呼ばれる輝度の勾配方向の分布を抽出する。HOG特徴と顔の特徴点の位置を紐付けたデータをもとに学習されたモデル(model)は一般的に提供されている。よって、プロセッサ111Aは、抽出されたHOG特徴を、この学習モデルに入力し、顔の特徴点の位置を取得する。プロセッサ111Aは、取得した特徴点の位置をデータメモリ112に記憶させる。The
プロセッサ111Aは、顔角度算出部13として動作して、例えばopencvなどを利用して、顔画像における顔の角度を算出する(ステップS5)。
具体的には、プロセッサ111Aは、顔が正面に向いているときの顔パーツの特徴点の3次元位置(P_3d)を予め計測して、これをデータメモリ112に保持する。
プロセッサ111Aは、顔画像の顔パーツの現在の特徴点の2次元位置(P’_2d)を取得する。
プロセッサ111Aは、上記3次元位置(P_3d)を回転または移動したときの顔パーツの特徴点の2次元位置(P_2d)を算出する。
プロセッサ111Aは、例えばopencvのProjectPoints2関数(例えばhttp://opencv.jp/opencv-2svn/py/camera_calibration_and_3d_reconstruction.html#projectpoints2を参照)などを利用して、上記各2次元位置を算出する。
The
Specifically, the
The
The
The
プロセッサ111Aは、2次元位置(P_2d)と、2次元位置(P’_2d)の距離の二乗和(sum of squares)(D)を算出する。
プロセッサ111Aは、この二乗和Dを最小化するような角度(および移動量)を大域的最適化(global optimization)により求める。
The
The
プロセッサ111Aは、例えばopencvのsolvPnP関数(例えばhttp://opencv.jp/opencv-2svn/cpp/camera_calibration_and_3d_reconstruction.html#cv-solvepnpを参照)などを利用して、上記最小化するような角度(および移動量)を正面からの顔の角度(a)として算出部する。The
プロセッサ111Aは、顔認識ツールを起動しつつ顔を動かしながら、認識ができなくなった際の特徴点の位置を取得することにより、認識ができる限界の顔の角度(A)を被写体の人物によらない角度として予め算出し、これをデータメモリ112に保持する。The
次に、プロセッサ111Aは、表示割合算出部14として動作して、顔画像に対して顔の全体の領域のうち顔以外の物体で隠れている領域の割合である、顔の表示割合を算出する(ステップS6)。例えば顔の全体の10%が顔以外の物体で隠れていれば、上記顔の表示割合は10%となる。Next, the
ここで、表示割合算出部14による算出の例を図7および図8を参照して説明する。 Here, an example of calculation by the display
図7は、表示割合算出部により用いられるニューラルネットワークの一例を示す図である。図8は、表示割合算出部により処理されるグリッドセルの一例を示す図である。ここでは、動物および各種物体が含まれる入力画像に係る例を説明するが、これらが人の顔および顔を隠している物体、例えば手またはその他の物体であるときにも同様に適用が可能である。 Figure 7 shows an example of a neural network used by the display ratio calculation unit. Figure 8 shows an example of a grid cell processed by the display ratio calculation unit. Here, an example is described for an input image containing animals and various objects, but it can be similarly applied when these are human faces and objects obscuring the faces, such as hands or other objects.
図7および図8に示された例では、既知のYOLO (You Only Look Once)(ディープラーニング(deep learning)による一般物体検出手法)が用いられ得る。この手法は、例えば下記の資料に開示される。
「Joseph Redmon, et al., “YOLOv3: An Incremental Improvement”, arXiv preprint, arXiv:1804.02767, 2018.」
7 and 8, the well-known YOLO (You Only Look Once) (a general object detection method using deep learning) may be used. This method is disclosed in, for example, the following document:
“Joseph Redmon, et al., “YOLOv3: An Incremental Improvement”, arXiv preprint, arXiv:1804.02767, 2018.”
この手法では、プロセッサ111Aは、顔画像を正方形にリサイズ(resize)し、これを図7に示されるような、画像処理の分野で数多く用いられるニューラルネットワークであるCNN(Convolutional Neural Network(畳み込みニューラルネットワーク))に入力する。プロセッサ111Aは、図7に示されたCNNにおける24層の畳み込み層(Conv. Layer)および4層のpooling層(図7の符号a参照)を経て顔画像から特徴を抽出し、2層の全結合層(Conn. Layer)で(図7の符号b参照)、画像における物体のBounding Box、および物体の種類の確率を推定することができる。畳み込み層の最終出力サイズ7×7はgrid cellの分割数と一致する。In this technique,
上記入力された画像は、図8に示されるような、S×Sのgrid cellに分割される(図8の(a)参照)。
プロセッサ111Aは、上記分割した各grid cellに対して、B個の物体のBounding Boxを推定する。プロセッサ111Aは、1つのBounding Boxにつき、Bounding Boxの座標値、幅、高さ(x, y, w, h)と、そのBounding Boxが物体である信頼度(confidence)スコアでなる、計5つの値を出力する(図8の(b)参照)。
The input image is divided into S×S grid cells as shown in FIG. 8 (see FIG. 8(a)).
The
座標値のx, yは、grid cellの境界を基準にしたBounding Boxの中心座標であり、幅wと高さhは画像全体のサイズに対する相対値であり、信頼度スコア(score)は、そのBounding Boxが物体か背景かの確率を表す。この確率は、物体なら「1」で背景であれば「0」である。 The coordinates x and y are the center coordinates of the bounding box based on the boundary of the grid cell, the width w and height h are relative values to the size of the entire image, and the confidence score (score) represents the probability that the bounding box is an object or background. This probability is "1" if it is an object and "0" if it is background.
物体領域の推定精度を測る指標として、正解Bounding Boxと推定Bounding Boxの一致具合を表すIoU (Intersection over Union)がある。上記YOLOではBounding Boxの信頼度スコアがIoUを表す。 One index for measuring the accuracy of object region estimation is IoU (Intersection over Union), which indicates the degree of agreement between the correct bounding box and the estimated bounding box. In the above YOLO, the reliability score of the bounding box represents IoU.
プロセッサ111Aは、各grid cell単位で物体の種類の確率を推定する。例えば、プロセッサ111Aは、C種類の分類クラス(classification class)で、grid cellが物体である場合に、どのクラスに属するかの確率、すなわち条件付き確率(conditional probability)を推定する(図8の(c)参照)。The
プロセッサ111Aは、ここで推定したクラス確率を上記のBounding Boxと統合することで、何の物体であるかを示す複数のBounding Boxを得る(図8の(d)参照)。The
プロセッサ111Aは、重複領域も含んだ、これらのBounding Boxを、信頼度スコアの高いBounding Boxを基準にNMS((Non-Maximum Suppression)という手法で選別する(図8の(e)参照)。NMSは、IoU値が大きい(重なり度合いの高い)領域をしきい値で抑制(suppression)する。これにより物体領域の検出結果が得られる。The
プロセッサ111Aは、顔領域と、この領域に重畳する物体領域があったときは、重畳している領域の面積を顔領域の面積で除することによって、上記の顔の表示割合を算出することができる。When there is a face area and an object area overlapping this area, the
次に、プロセッサ111Aは、変化量補正部17として動作して、変換したい先の表情に応じた変化量を変化量格納部16から読み出し、S4で認識した特徴点、S5で算出した顔角度、及びS6で算出した表示割合に基づいて、変換したい先の表情に応じた、上記読み出した変化量を補正した変化量を算出する(ステップS7)。Next, the
具体的には、プロセッサ111Aは、顔の角度、すなわち正面からの顔の角度aおよび認識ができる限界の顔の角度Aと、顔全体の領域に対する顔が隠れている領域の割合Hを取得し、これらに応じて、下記の式(1)により、表情変換の変化量を減衰させる、すなわち変化量を補正し、この補正した結果をデータメモリ112に保持する。
ΔPnew=ΔP・(1-H)・a/А …式(1)
式(1)の左辺ΔPnewは、表情変換の減衰させた、すなわち補正後の変化量であり、右辺のΔPは表情変換の補正前の変化量である。
Specifically,
ΔP new = ΔP・(1-H)・a/A…Formula (1)
The left side of equation (1), ΔP new , is the amount of change after attenuation, that is, correction, of facial expression transformation, and ΔP on the right side is the amount of change before correction of facial expression transformation.
すなわち、上記の例では、(1)正面からの顔の角度aおよび認識ができる限界の顔の角度Aとの比率a/Аと、(2)顔全体の領域に対する顔が隠れている領域の割合Hと、に基づいて、補正後の変化量が算出される。
なお、この例に限らず、例えば、許容される精度の範囲内で、(1)正面からの顔の角度aおよび認識ができる限界の顔の角度Aとの比率a/Аと、(2)顔全体の領域に対する顔が隠れている領域の割合Hと、の一方に基づいて補正後の変化量が算出されてもよい。
That is, in the above example, the amount of change after correction is calculated based on (1) the ratio a/A between the face angle a from the front and the limit face angle A at which the face can be recognized, and (2) the proportion H of the area where the face is hidden to the entire face area.
In addition, without being limited to this example, for example, within the range of allowable accuracy, the amount of change after correction may be calculated based on either (1) the ratio a/A between the face angle a from the front and the limit face angle A at which the face can be recognized, or (2) the proportion H of the area where the face is hidden to the entire face area.
このようにして変化量を補正すれば、顔の角度が変わったり、顔の一部が隠れたりすることにより、特徴点の認識ができなかったとしても、自然でないタイミングで表情変換が止まることが無くなり、顔画像の表情を自然に変換することができる。 By correcting the amount of change in this way, even if feature points cannot be recognized due to a change in the angle of the face or part of the face being hidden, facial expression conversion will not stop at an unnatural time, and the facial expression in the facial image can be converted naturally.
プロセッサ111Aは、表情変換部18として動作して、データメモリ112に記憶されている顔画像の表情を変換する(ステップS8)。すなわち、プロセッサ111Aは、データメモリ112に記憶された、変換表情に応じた変化量が補正された結果に基づいて、顔画像を変換する。例えば、プロセッサ111Aは、MLSの実装(例えばhttps://github.com/Jarvis73/Moving-Least-Squaresを参照)などを利用する。The
具体的には、プロセッサ111Aは、各特徴点について、データメモリ112に記憶された変換表情に応じた変化量の補正後の変化量分だけ移動させる。例えば、表情を笑顔に変換する場合には、特徴点ID「1」の制御点については、変換前のxy座標が(23,45)であるので(図4参照)、プロセッサ111Aは、x座標を「+1」、y座標を「+2」する(図5参照)ことで、当該特徴点の画素を(24,47)に移動するような変換を行う。Specifically,
そして、特徴点については、プロセッサ111Aは、下記の式(2)に示されるアフィン(Affine)変換(ヘルマート(Helmert)変換=相似変換及びrigid deformation=剛体変形を含む)を適用する。Then, for the feature points, the
ただし、上記式(2)のx,yは近傍の特徴点の座標であり、x’,y’は、その特徴点の座標に変化量を足した座標であり、a,b,c,dはパラメータ(parameter)であり、tx,tyは平行移動パラメータである。プロセッサ111Aは、特徴点の座標x,yと変化量を足した座標x’,y’の最小二乗平均(least square means)を算出し、これを最小化するようなパラメータa,b,c,d,tx,tyを大域的最適化により求める。そして、プロセッサ111A変換するべき対象点の座標をx,yとして、これら求めたパラメータを用いて変換後の座標を求める。プロセッサ111Aは、こうして求めたパラメータa,b,c,d,tx,tyを用いて、特徴点から上記アフィン変換により変換した後の座標を求める。
In the above formula (2), x and y are the coordinates of the nearby feature point, x' and y' are the coordinates obtained by adding the amount of change to the coordinates of the feature point, a, b, c, and d are parameters, and t x and t y are translation parameters. The
プロセッサ111Aは、こうして変換した後の顔画像を変換画像としてデータメモリ112に記憶させる。The
プロセッサ111Aは、画像出力部19として動作して、データメモリ112に記憶された変換画像を出力する(ステップS9)。例えば、プロセッサ111Aは、入出力インタフェース113を介して出力デバイス300に顔画像を表示させる。あるいは、プロセッサ111Aは、通信インタフェース114によりネットワーク上に送信し、ネットワークに接続された表示デバイスに表示させたり、ネットワークに接続された他のコンピュータの表示部に表示させたりする。The
プロセッサ111Aは、図6のフローチャートに示す画像変換装置100としての動作を終了するか否か判断する(ステップS10)。例えば、プロセッサ111Aは、入力デバイス200から、入出力インタフェース113を介して、あるいは、通信インタフェース114を介して、ユーザから画像変換の終了を指示されたか否か確認する。ここで、上記動作を終了する場合には(ステップS10のYES)、プロセッサ111Aは、図6のフローチャートに示す動作を終了する。The
これに対して、未だ上記動作を終了しない場合には(ステップS10のNO)、プロセッサ111Aは、変換表情入力部15として動作して、ユーザによる変換表情の変更指定入力が有ったか否か判断する(ステップS11)。変換表情の変更指定入力が無ければ(ステップS11のNO)、プロセッサ111Aは、ステップS3の処理へ移行する。また、変換表情の変更指定入力が有った場合には(ステップS10のYES)、プロセッサ111Aは、ステップS2の処理へ移行する。On the other hand, if the above operation has not yet ended (NO in step S10),
以上に説明した一実施形態に係る画像変換装置100は、顔角度算出部13と、表示割合算出部14と、変化量補正部17と、表情変換部18とを備える。表情変換部18は、変換するべき変換表情に応じた変形量により特徴点を変換することで人の顔の表情を変換した変換画像を得る。
従って、一実施形態に係る画像変換装置100は、顔の角度が変わったり、顔の一部が隠れたりすることにより、特徴点の認識ができなかったとしても、自然でないタイミングで表情変換が止まることが無くなり、顔画像の表情を自然に変換することができる。
The
Therefore, the
[他の実施形態]
なお、この発明は上記一実施形態に限定されるものではない。
例えば、以上で説明した各処理の流れは、説明した手順に限定されるものではなく、いくつかのステップの順序が入れ替えられても良いし、いくつかのステップが同時並行で実施されても良い。
[Other embodiments]
It should be noted that the present invention is not limited to the above embodiment.
For example, the flow of each process described above is not limited to the procedures described, and the order of some steps may be changed, or some steps may be performed simultaneously in parallel.
また、以上で説明した各処理の流れは、リアルタイムに取得する顔画像の表情をリアルタイムに変換していく場合であったが、リアルタイム処理ではなく、保存された顔画像の表情を変換する用途にも同様に適用できる。 In addition, the process flow described above is for converting facial expressions in facial images acquired in real time in real time, but it can also be applied to applications where the facial expressions of stored facial images are converted rather than real-time processing.
また、各実施形態に記載された手法は、計算機(コンピュータ)に実行させることができるプログラム(ソフトウエア手段)として、例えば磁気ディスク(フロッピー(登録商標)ディスク(Floppy disk)、ハードディスク(hard disk)等)、光ディスク(optical disc)(CD-ROM、DVD、MO等)、半導体メモリ(ROM、RAM、フラッシュメモリ等)等の記録媒体に格納し、また通信媒体により伝送して頒布され得る。なお、媒体側に格納されるプログラムには、計算機に実行させるソフトウエア手段(実行プログラムのみならずテーブル、データ構造も含む)を計算機内に構成させる設定プログラムをも含む。本装置を実現する計算機は、記録媒体に記録されたプログラムを読み込み、また場合により設定プログラムによりソフトウエア手段を構築し、このソフトウエア手段によって動作が制御されることにより上述した処理を実行する。なお、本明細書でいう記録媒体は、頒布用に限らず、計算機内部あるいはネットワークを介して接続される機器に設けられた磁気ディスク、半導体メモリ等の記憶媒体を含むものである。 The methods described in each embodiment may be stored as a program (software means) that can be executed by a computer on a recording medium such as a magnetic disk (floppy disk, hard disk, etc.), optical disk (CD-ROM, DVD, MO, etc.), semiconductor memory (ROM, RAM, flash memory, etc.), or may be distributed by transmission via a communication medium. The programs stored on the medium include a setting program that configures the software means (including not only execution programs but also tables and data structures) that the computer executes. The computer that realizes this device reads the program recorded on the recording medium, and in some cases, constructs the software means using the setting program, and executes the above-mentioned processing by controlling the operation of the software means. The recording medium referred to in this specification is not limited to a recording medium for distribution, but also includes a storage medium such as a magnetic disk or semiconductor memory provided inside the computer or in a device connected via a network.
なお、本発明は、上記実施形態に限定されるものではなく、実施段階ではその要旨を逸脱しない範囲で種々に変形することが可能である。また、各実施形態は適宜組み合わせて実施してもよく、その場合組み合わせた効果が得られる。更に、上記実施形態には種々の発明が含まれており、開示される複数の構成要件から選択された組み合わせにより種々の発明が抽出され得る。例えば、実施形態に示される全構成要件からいくつかの構成要件が削除されても、課題が解決でき、効果が得られる場合には、この構成要件が削除された構成が発明として抽出され得る。 Note that the present invention is not limited to the above-described embodiments, and can be modified in various ways in the implementation stage without departing from the gist of the invention. The embodiments may also be implemented in appropriate combination, in which case the combined effects can be obtained. Furthermore, the above-described embodiments include various inventions, and various inventions can be extracted by combinations selected from the multiple constituent elements disclosed. For example, if the problem can be solved and an effect can be obtained even if some constituent elements are deleted from all the constituent elements shown in the embodiments, the configuration from which these constituent elements are deleted can be extracted as an invention.
100…画像変換装置
11…画像取得部
12…特徴点認識部
13…顔角度算出部
14…表示割合算出部
15…変換表情入力部
16…変化量格納部
17…変化量補正部
18…表情変換部
19…画像出力部
111A…プロセッサ
111B…プログラムメモリ
112…データメモリ
113…入出力インタフェース
114…通信インタフェース
115…バス
200…入力デバイス
300…出力デバイス
100: Image conversion device 11: Image acquisition section 12: Feature point recognition section 13: Face angle calculation section 14: Display ratio calculation section 15: Converted facial expression input section 16: Change amount storage section 17: Change amount correction section 18: Facial expression conversion section 19:
Claims (6)
前記画像における顔が正面から認識できなくなる限界の角度に対する、正面からの前記顔の角度の比率と、前記顔の全体の領域に対する前記顔が物体で隠れている領域が除かれた領域の割合に基づいて、前記認識された顔の表情を変換するべき変換表情に変換するときの、前記変換表情に応じた前記顔パーツの特徴点のそれぞれについての変形量を表す変化量を補正する変化量補正部と、
前記補正した変化量により前記特徴点を変形することで前記人の顔の表情を変換した変換画像を得る表情変換部と、
を具備する、画像変換装置。 a feature point recognition unit that recognizes feature points of facial parts from an image including a human face;
a change amount correction unit which corrects a change amount representing an amount of deformation for each of the feature points of the facial features according to the converted facial expression when converting the recognized facial expression into a converted facial expression to be converted, based on a ratio of an angle of the face from the front to a limit angle at which the face in the image cannot be recognized from the front, and a ratio of an area excluding areas of the face hidden by objects to an entire area of the face;
an expression conversion unit that obtains a converted image in which the facial expression of the person is converted by transforming the feature points according to the corrected change amount;
An image conversion device comprising:
前記画像における顔が正面から認識できなくなる限界の角度に対する、正面からの前記顔の角度の比率と、前記顔の全体の面積に対する前記顔が物体で隠れている面積を除いた面積の割合を、前記顔パーツの特徴点のそれぞれについての所定の変化量に乗じることで、前記変化量を補正する、
請求項1に記載の画像変換装置。 The change amount correction unit
correcting the amount of change by multiplying a predetermined amount of change for each of the feature points of the facial features by a ratio of an angle of the face from the front to a limit angle at which the face in the image cannot be recognized from the front, and a ratio of an area of the face excluding an area of the face hidden by an object to a total area of the face;
2. The image conversion device according to claim 1.
請求項1に記載の画像変換装置。 calculating a two-dimensional position of a feature point of the facial part when the three-dimensional position of the feature point of the facial part when the face is facing forward is rotated or moved, and calculating an angle at which a sum of squares of a distance between the calculated two-dimensional position and a current two-dimensional position of the feature point of the facial part is a minimum as an angle of the face from the front;
2. The image conversion device according to claim 1.
前記変換するべき変換表情を入力する変換表情入力部と、
を更に具備し、
前記変化量補正部は、
前記入力された変換表情に応じた前記変化量を前記記憶装置から読み出し、この読み出した変化量を補正する、
請求項1乃至3の何れか1項に記載の画像変換装置。 a storage device in which a change amount representing a deformation amount for each of the feature points is stored in advance for each of the facial expressions to be converted;
a conversion expression input unit for inputting the conversion expression to be converted;
Further comprising:
The change amount correction unit
reading out the amount of change corresponding to the input converted facial expression from the storage device, and correcting the amount of change that has been read out;
4. An image conversion device according to claim 1.
前記画像変換装置の特徴点認識部により、人の顔が含まれる画像から認識された顔パーツの特徴点を認識することと、
前記画像変換装置の変化量補正部により、前記画像における顔が正面から認識できなくなる限界の角度に対する、正面からの前記顔の角度の比率と、前記顔の全体の領域に対する前記顔が物体で隠れている領域が除かれた領域の割合に基づいて、前記認識された顔の表情を変換するべき変換表情に変換するときの、前記変換表情に応じた前記顔パーツの特徴点のそれぞれについての変形量を表す変化量を補正することと、
前記画像変換装置の表情変換部により、前記補正した変化量により前記特徴点を変形することで前記人の顔の表情を変換した変換画像を得ることと、
を具備する画像変換方法。 1. A method performed by an image transformation device for transforming facial expressions in an image of a human face, comprising:
Recognizing feature points of facial features from an image including a human face by a feature point recognition unit of the image conversion device;
a change amount correction unit of the image conversion device corrects a change amount representing a deformation amount for each of the feature points of the facial features according to the converted facial expression when converting the recognized facial expression into a converted facial expression to be converted, based on a ratio of an angle of the face from the front to a limit angle at which the face in the image cannot be recognized from the front, and a ratio of an area excluding areas of the face hidden by objects to an entire area of the face;
obtaining a converted image in which the facial expression of the person is converted by transforming the feature points by the corrected change amount using a facial expression conversion unit of the image conversion device;
13. An image conversion method comprising:
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| PCT/JP2022/007870 WO2023162132A1 (en) | 2022-02-25 | 2022-02-25 | Image transformation device, method, and program |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JPWO2023162132A1 JPWO2023162132A1 (en) | 2023-08-31 |
| JP7700951B2 true JP7700951B2 (en) | 2025-07-01 |
Family
ID=87765082
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2024502365A Active JP7700951B2 (en) | 2022-02-25 | 2022-02-25 | Image conversion device, method and program |
Country Status (2)
| Country | Link |
|---|---|
| JP (1) | JP7700951B2 (en) |
| WO (1) | WO2023162132A1 (en) |
Families Citing this family (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO2025203464A1 (en) * | 2024-03-28 | 2025-10-02 | Ntt株式会社 | Image processing device and program |
Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2005215763A (en) | 2004-01-27 | 2005-08-11 | Konica Minolta Photo Imaging Inc | Method, device and program for image processing |
| JP2011060038A (en) | 2009-09-10 | 2011-03-24 | Seiko Epson Corp | Image processing apparatus |
| CN112766063A (en) | 2020-12-31 | 2021-05-07 | 沈阳康泰电子科技股份有限公司 | Micro-expression fitting method and system based on displacement compensation |
| JP2021077376A (en) | 2019-11-07 | 2021-05-20 | ハイパーコネクト インコーポレイテッド | Image conversion device and method, and computer-readable recording medium |
-
2022
- 2022-02-25 JP JP2024502365A patent/JP7700951B2/en active Active
- 2022-02-25 WO PCT/JP2022/007870 patent/WO2023162132A1/en not_active Ceased
Patent Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2005215763A (en) | 2004-01-27 | 2005-08-11 | Konica Minolta Photo Imaging Inc | Method, device and program for image processing |
| JP2011060038A (en) | 2009-09-10 | 2011-03-24 | Seiko Epson Corp | Image processing apparatus |
| JP2021077376A (en) | 2019-11-07 | 2021-05-20 | ハイパーコネクト インコーポレイテッド | Image conversion device and method, and computer-readable recording medium |
| CN112766063A (en) | 2020-12-31 | 2021-05-07 | 沈阳康泰电子科技股份有限公司 | Micro-expression fitting method and system based on displacement compensation |
Also Published As
| Publication number | Publication date |
|---|---|
| JPWO2023162132A1 (en) | 2023-08-31 |
| WO2023162132A1 (en) | 2023-08-31 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US11915514B2 (en) | Method and apparatus for detecting facial key points, computer device, and storage medium | |
| JP6798183B2 (en) | Image analyzer, image analysis method and program | |
| WO2020103647A1 (en) | Object key point positioning method and apparatus, image processing method and apparatus, and storage medium | |
| US9443325B2 (en) | Image processing apparatus, image processing method, and computer program | |
| KR102344373B1 (en) | Apparatus and method for generating feature maps | |
| CN109241810B (en) | Virtual character image construction method and device and storage medium | |
| JP7149124B2 (en) | Image object extraction device and program | |
| WO2021098545A1 (en) | Pose determination method, apparatus, and device, storage medium, chip and product | |
| CN114830177A (en) | Electronic device and method for controlling the same | |
| CN112464860A (en) | Gesture recognition method and device, computer equipment and storage medium | |
| KR20240159462A (en) | Method for determining pose of target object in query image and electronic device performing same method | |
| US20250218222A1 (en) | Systems and methods for automatic hand gesture recognition | |
| JP7700951B2 (en) | Image conversion device, method and program | |
| CN110287764A (en) | Posture prediction method, apparatus, computer equipment and storage medium | |
| KR20230078502A (en) | Apparatus and method for image processing | |
| KR102593247B1 (en) | Geometric calibration method and apparatus of computer tomography | |
| US20250118102A1 (en) | Query deformation for landmark annotation correction | |
| JP2017122993A (en) | Image processor, image processing method and program | |
| CN113643348B (en) | Face attribute analysis method and device | |
| JP2023079211A (en) | Image processing apparatus and method | |
| JP7704288B2 (en) | Image conversion device, image conversion method, and image conversion program | |
| CN116934591A (en) | Image stitching method, device and equipment for multi-scale feature extraction and storage medium | |
| US20250118025A1 (en) | Flexible 3d landmark detection | |
| CN116403269B (en) | Method, system, equipment and computer storage medium for analyzing occlusion human face | |
| US20250095190A1 (en) | Method, computing device, and recording medium for detecting object in real time based on lidar point cloud |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20240604 |
|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20250212 |
|
| A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20250409 |
|
| 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: 20250520 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20250602 |
|
| R150 | Certificate of patent or registration of utility model |
Ref document number: 7700951 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
| S533 | Written request for registration of change of name |
Free format text: JAPANESE INTERMEDIATE CODE: R313533 |
|
| R350 | Written notification of registration of transfer |
Free format text: JAPANESE INTERMEDIATE CODE: R350 |