JP7448879B2 - Image generation method, system, and computer program - Google Patents
Image generation method, system, and computer program Download PDFInfo
- Publication number
- JP7448879B2 JP7448879B2 JP2020032353A JP2020032353A JP7448879B2 JP 7448879 B2 JP7448879 B2 JP 7448879B2 JP 2020032353 A JP2020032353 A JP 2020032353A JP 2020032353 A JP2020032353 A JP 2020032353A JP 7448879 B2 JP7448879 B2 JP 7448879B2
- Authority
- JP
- Japan
- Prior art keywords
- image
- partial image
- input
- converted
- conversion process
- 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
- 238000000034 method Methods 0.000 title claims description 349
- 238000004590 computer program Methods 0.000 title claims description 26
- 238000006243 chemical reaction Methods 0.000 claims description 335
- 230000008569 process Effects 0.000 claims description 294
- 238000012545 processing Methods 0.000 claims description 67
- 238000010801 machine learning Methods 0.000 claims description 56
- 230000006870 function Effects 0.000 claims description 37
- 230000008921 facial expression Effects 0.000 claims description 34
- 238000012805 post-processing Methods 0.000 claims description 24
- 230000001815 facial effect Effects 0.000 claims description 7
- 230000009466 transformation Effects 0.000 claims description 6
- 241001469893 Oxyzygonectes dovii Species 0.000 description 14
- 238000009958 sewing Methods 0.000 description 14
- 230000008859 change Effects 0.000 description 13
- 238000007781 pre-processing Methods 0.000 description 13
- 238000012937 correction Methods 0.000 description 11
- 210000004513 dentition Anatomy 0.000 description 9
- 238000010586 diagram Methods 0.000 description 9
- 230000036346 tooth eruption Effects 0.000 description 9
- 230000014509 gene expression Effects 0.000 description 8
- ATJFFYVFTNAWJD-UHFFFAOYSA-N Tin Chemical compound [Sn] ATJFFYVFTNAWJD-UHFFFAOYSA-N 0.000 description 7
- 238000004422 calculation algorithm Methods 0.000 description 7
- 238000004364 calculation method Methods 0.000 description 7
- 239000003086 colorant Substances 0.000 description 7
- 229910052718 tin Inorganic materials 0.000 description 7
- 238000012549 training Methods 0.000 description 6
- NCGICGYLBXGBGN-UHFFFAOYSA-N 3-morpholin-4-yl-1-oxa-3-azonia-2-azanidacyclopent-3-en-5-imine;hydrochloride Chemical compound Cl.[N-]1OC(=N)C=[N+]1N1CCOCC1 NCGICGYLBXGBGN-UHFFFAOYSA-N 0.000 description 5
- 238000013528 artificial neural network Methods 0.000 description 5
- 238000004891 communication Methods 0.000 description 5
- 238000013527 convolutional neural network Methods 0.000 description 4
- 239000004744 fabric Substances 0.000 description 4
- 210000000887 face Anatomy 0.000 description 3
- 229910000498 pewter Inorganic materials 0.000 description 3
- 239000010957 pewter Substances 0.000 description 3
- 230000009467 reduction Effects 0.000 description 3
- 238000005516 engineering process Methods 0.000 description 2
- 238000011946 reduction process Methods 0.000 description 2
- 230000004044 response Effects 0.000 description 2
- 238000012546 transfer Methods 0.000 description 2
- ORILYTVJVMAKLC-UHFFFAOYSA-N Adamantane Natural products C1C(C2)CC3CC1CC2C3 ORILYTVJVMAKLC-UHFFFAOYSA-N 0.000 description 1
- 241001465754 Metazoa Species 0.000 description 1
- 230000003044 adaptive effect Effects 0.000 description 1
- 238000013459 approach Methods 0.000 description 1
- 238000001514 detection method Methods 0.000 description 1
- 210000005069 ears Anatomy 0.000 description 1
- 239000000284 extract Substances 0.000 description 1
- 238000009499 grossing Methods 0.000 description 1
- 210000003128 head Anatomy 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000007935 neutral effect Effects 0.000 description 1
- 238000010606 normalization Methods 0.000 description 1
- 238000003825 pressing Methods 0.000 description 1
- 238000007639 printing Methods 0.000 description 1
- 238000013519 translation Methods 0.000 description 1
Images
Landscapes
- Image Processing (AREA)
- Image Analysis (AREA)
Description
本明細書は、機械学習モデルを用いたスタイル変換処理を含む画像データの生成技術に関する。 The present specification relates to an image data generation technique including style conversion processing using a machine learning model.
ニューラルネットワークなどを用い画像生成モデルを用いて画像のスタイルを変換する技術が知られている。例えば、特許文献1に記載された画像形成装置は、変換元の画像を示す画像データと、スタイル参照用の画像を示す画像データと、が入力されると、変換後の画像を示す画像データを出力する。変換後の画像は、変換元の画像のコンテンツに、スタイル参照用の画像のスタイルが適用された画像である。 2. Description of the Related Art There is a known technique for converting the style of an image using an image generation model using a neural network or the like. For example, the image forming apparatus described in Patent Document 1 inputs image data indicating a conversion source image and image data indicating a style reference image, and then outputs image data indicating the converted image. Output. The converted image is an image in which the style of the style reference image is applied to the content of the conversion source image.
しかしながら、上記技術では、1個の変換元の画像には、スタイル参照用の画像の1個のスタイルが適用されるに過ぎないために、柔軟なスタイル変換ができない可能性があった。 However, with the above technique, only one style of the style reference image is applied to one conversion source image, so there is a possibility that flexible style conversion cannot be performed.
本明細書は、柔軟なスタイル変換を実現可能な技術を開示する。 This specification discloses a technique that can realize flexible style conversion.
本明細書に開示された技術は、以下の適用例として実現することが可能である。 The technology disclosed in this specification can be implemented as the following application examples.
[適用例1]入力画像を示す入力画像データを取得する画像取得工程と、前記入力画像データを用いて、前記入力画像の一部である第1入力部分画像と、前記入力画像の一部であって前記第1入力部分画像とは異なる位置にある第2入力部分画像と、を特定する部分画像特定工程と、前記第1入力部分画像を示す第1部分画像データに対して、機械学習モデルを用いた第1スタイル変換処理を実行して、第1変換済部分画像を示す第1変換済データを生成する第1変換工程と、前記第2入力部分画像を示す第2部分画像データに対して、機械学習モデルを用いた第2スタイル変換処理であって前記第1スタイル変換処理とは異なる前記第2スタイル変換処理を実行して、第2変換済部分画像を示す第2変換済データを生成する第2変換工程と、第1変換済データと前記第2変換済データとを用いて、前記入力画像に基づく出力画像を示す出力画像データを生成する出力画像生成工程であって、前記出力画像は前記第1入力部分画像に対応する第1出力部分画像と前記第2入力部分画像に対応する第2出力部分画像とを含み、前記第1出力部分画像は前記第1変換済部分画像に基づく画像であり、前記第2出力部分画像は前記第2変換済部分画像に基づく画像である、前記出力画像生成工程と、を備える画像生成方法。 [Application example 1] An image acquisition step of acquiring input image data indicating an input image, and using the input image data, a first input partial image that is a part of the input image, and a first input partial image that is a part of the input image. a second input partial image located at a different position from the first input partial image; and a machine learning model for the first partial image data indicating the first input partial image. a first conversion step of executing a first style conversion process using a method to generate first converted data representing a first converted partial image; Then, the second style conversion process, which is a second style conversion process using a machine learning model and which is different from the first style conversion process, is executed to generate second converted data indicating the second converted partial image. a second conversion step of generating, and an output image generation step of generating output image data representing an output image based on the input image using the first converted data and the second converted data, the output The image includes a first output partial image corresponding to the first input partial image and a second output partial image corresponding to the second input partial image, the first output partial image being the first converted partial image. and the second output partial image is an image based on the second converted partial image.
上記構成によれば、第1入力部分画像を示す第1部分画像データに対して第1スタイル変換処理を実行して生成される第1変換済データと、第2入力部分画像を示す第2部分画像データに対して第2スタイル変換処理を実行して生成される第2変換済データと、を用いて、入力画像に基づく出力画像を示す出力画像データが生成される。出力画像は、第1変換済データによって示される第1変換済部分画像に基づく第1出力部分画像と、第2変換済データによって示される第2変換済部分画像に基づく第2出力部分画像と、を含む。このように、1個の入力画像データに対して第1スタイル変換処理と第2スタイル変換処理とを適用することで出力画像データを生成するので、柔軟なスタイル変換を実現することができる。
[適用例2]
適用例1に記載の画像生成方法であって、
前記第1スタイル変換処理は、第1スタイル画像を示す第1スタイル画像データを用いて実行され、
前記第2スタイル変換処理は、第2スタイル画像を示す第2スタイル画像データを用いて実行され、
前記第1変換済部分画像は、前記第1スタイル画像のスタイルが前記第1入力部分画像に適用された画像であり、
前記第2変換済部分画像は、前記第2スタイル画像のスタイルが前記第2入力部分画像に適用された画像である、画像生成方法。
[適用例3]
適用例1または2に記載の画像生成方法であって、
前記出力画像生成工程は、
第1変換済データと前記第2変換済データとを用いて、前記第1変換済部分画像と前記第2変換済部分画像とを含む中間画像を示す中間画像データを生成する第1工程と、
前記中間画像データに対して特定の後処理を実行して、前記出力画像データを生成する第2工程と、
を含む、画像生成方法。
[適用例4]
適用例3に記載の画像生成方法であって、
前記特定の後処理は、前記中間画像において、前記第1変換済部分画像と前記第1変換済部分画像に隣接する部分との間における画素値の差と、前記第2変換済部分画像と前記第2変換済部分画像に隣接する部分との間における画素値の差と、をそれぞれ低減する処理を含む、画像生成方法。
[適用例5]
適用例3または4に記載の画像生成方法であって、
前記特定の後処理は、機械学習モデルを用いた第3スタイル変換処理であって前記第1スタイル変換処理および前記第2スタイル変換処理とは異なる前記第3スタイル変換処理を含む、画像生成方法。
[適用例6]
適用例5に記載の画像生成方法であって、
前記第3スタイル変換処理は、前記入力画像データをスタイル画像データとして用いて実行される、画像生成方法。
[適用例7]
適用例6に記載の画像生成方法であって、
前記入力画像は、人物の顔を示す画像を含み、
前記特定の後処理は、前記入力画像データに対して、前記人物の顔の肌色を補正する処理を実行して、補正済みの前記入力画像データを生成する処理を含み、
前記第3スタイル変換処理は、補正済みの前記入力画像データをスタイル画像データとして用いて実行される、画像生成方法。
[適用例8]
適用例3~7のいずれかに記載の画像生成方法であって、
前記特定の後処理は、機械学習モデルを用いた第4スタイル変換処理であって前記第1スタイル変換処理および前記第2スタイル変換処理とは異なる前記第4スタイル変換処理を含み、
前記入力画像は、人物の顔を示す画像を含み、
前記第4スタイル変換処理は、前記人物の顔の表情を変更する処理である、画像生成方法。
[適用例9]
適用例1~8のいずれかに記載の画像生成方法であって、
前記入力画像は、人物の顔を示す画像を含み、
前記第1入力部分画像は、前記人物の顔を構成する第1の部位を示す画像であり、
前記第2入力部分画像は、前記人物の顔を構成する第2の部位であって前記第1の部位とは異なる位置にある前記第2の部位を示す画像である、画像生成方法。
[適用例10]
適用例1~9のいずれかに記載の画像生成方法であって、さらに、
前記入力画像の種類を特定する種類特定工程を備え、
前記入力画像が第1種の入力画像である場合に、
前記第1変換工程では、前記第1部分画像データに対して第1種の前記第1スタイル変換処理が実行され、
前記第2変換工程では、前記第2部分画像データに対して第1種の前記第2スタイル変換処理が実行され、
前記入力画像が第2種の入力画像である場合に、
前記第1変換工程では、前記第1部分画像データに対して第2種の前記第1スタイル変換処理が実行され、
前記第2変換工程では、前記第2部分画像データに対して第2種の前記第2スタイル変換処理が実行される、画像生成方法。
[適用例11]
適用例10に記載の画像生成方法であって、
前記入力画像は、人物の顔を示す画像を含み、
前記入力画像の種類は、前記人物の性別、人種、表情、顔の角度のうちの少なくとも一部に関する種類である、画像生成方法。
[適用例12]
適用例1~11のいずれかに記載の画像生成方法であって、
前記第1スタイル変換処理は、前記第1入力部分画像と、生成すべき前記第1変換済部分画像と、の間の差異の程度を指定する第1パラメータを用いて実行され、
前記第2スタイル変換処理は、前記第2入力部分画像と、生成すべき前記第2変換済部分画像と、の間の差異の程度を指定する第2パラメータを用いて実行され、
前記第1パラメータと前記第2パラメータとは、独立して調整される、画像生成方法。
[適用例13]
適用例1~12のいずれかに記載の画像生成方法であって、さらに、
前記第1入力部分画像を示す前記第1部分画像データに対して実行すべき処理を選択する処理選択工程と、
前記第1部分画像データに対して、機械学習モデルを用いずに前記第1入力部分画像の少なくとも一部の色を変換する色変換処理を実行する色変換工程と、
を備え、
前記処理選択工程にて前記第1スタイル変換処理が選択される場合に、前記色変換工程を実行せずに、前記第1変換工程が実行され、
前記処理選択工程にて前記色変換処理が選択される場合に、前記第1変換工程を実行せずに、前記色変換工程が実行される、画像生成方法。
[適用例14]
適用例13に記載の画像生成方法であって、
前記入力画像は、人物の顔を示す画像を含み、
前記第1入力部分画像は、前記人物の目を示す画像であり、
前記色変換処理は、前記目を示す画像の白目の部分に対応する画素の値を、白を示す特定の値に変換する処理である、画像生成方法。
[適用例15]
適用例1~14のいずれかに記載の画像生成方法であって、さらに、
ユーザによる第1の入力に基づいて、前記第1スタイル変換処理のための第1入力情報を取得し、ユーザによる第2の入力に基づいて、前記第2スタイル変換処理のための第2入力情報を取得する情報取得工程を備え、
前記第1変換工程では、前記第1入力情報を用いて前記第1スタイル変換処理が実行され、
前記第2変換工程では、前記第2入力情報を用いて前記第2スタイル変換処理が実行される、画像生成方法。
[適用例16]
適用例15に記載の画像生成方法であって、
前記第1入力情報は、前記第1入力部分画像に対応する画像であって前記第1入力部分画像とは異なるスタイルを有する画像を示すデータを含み、
前記第2入力情報は、前記第2入力部分画像に対応する画像であって前記第2入力部分画像とは異なるスタイルを有する画像を示すデータを含む、画像生成方法。
[適用例17]
適用例1~16のいずれかに記載の画像生成方法であって、
前記入力画像は、人物の顔を示す画像を含み、
前記第2入力部分画像は、前記人物の口を示す画像であり、
前記第2スタイル変換処理は、前記口を示す画像において歯列を矯正する処理である、画像生成方法。
According to the above configuration, the first converted data generated by performing the first style conversion process on the first partial image data representing the first input partial image, and the second portion representing the second input partial image. Output image data representing an output image based on the input image is generated using the second converted data generated by performing the second style conversion process on the image data. The output image includes a first output partial image based on the first converted partial image indicated by the first converted data, and a second output partial image based on the second converted partial image indicated by the second converted data. including. In this way, since output image data is generated by applying the first style conversion process and the second style conversion process to one piece of input image data, flexible style conversion can be realized.
[Application example 2]
The image generation method described in Application Example 1, comprising:
The first style conversion process is performed using first style image data indicating a first style image,
The second style conversion process is performed using second style image data indicating a second style image,
The first converted partial image is an image in which the style of the first style image is applied to the first input partial image,
The second converted partial image is an image in which the style of the second style image is applied to the second input partial image.
[Application example 3]
The image generation method according to Application Example 1 or 2,
The output image generation step includes:
a first step of generating intermediate image data representing an intermediate image including the first converted partial image and the second converted partial image using the first converted data and the second converted data;
a second step of performing specific post-processing on the intermediate image data to generate the output image data;
An image generation method, including:
[Application example 4]
The image generation method described in Application Example 3,
The specific post-processing includes, in the intermediate image, a difference in pixel values between the first converted partial image and a portion adjacent to the first converted partial image, and a difference between the second converted partial image and the pixel value. An image generation method comprising: reducing a difference in pixel values between a second converted partial image and an adjacent portion.
[Application example 5]
The image generation method according to Application Example 3 or 4,
The image generation method, wherein the specific post-processing includes the third style conversion process that is a third style conversion process using a machine learning model and is different from the first style conversion process and the second style conversion process.
[Application example 6]
The image generation method described in Application Example 5,
The third style conversion process is performed using the input image data as style image data.
[Application example 7]
The image generation method described in Application Example 6,
The input image includes an image showing a person's face,
The specific post-processing includes processing for correcting the skin color of the person's face on the input image data to generate the corrected input image data,
The third style conversion process is performed using the corrected input image data as style image data.
[Application example 8]
The image generation method according to any one of Application Examples 3 to 7,
The specific post-processing includes the fourth style conversion process that is a fourth style conversion process using a machine learning model and is different from the first style conversion process and the second style conversion process,
The input image includes an image showing a person's face,
In the image generation method, the fourth style conversion process is a process of changing the facial expression of the person.
[Application example 9]
The image generation method according to any one of Application Examples 1 to 8,
The input image includes an image showing a person's face,
The first input partial image is an image showing a first part of the person's face,
In the image generation method, the second input partial image is an image showing the second part of the person's face and located at a different position from the first part.
[Application example 10]
The image generation method according to any one of Application Examples 1 to 9, further comprising:
comprising a type identifying step of identifying the type of the input image;
When the input image is a first type input image,
In the first conversion step, a first type of first style conversion process is performed on the first partial image data,
In the second conversion step, a first type of second style conversion process is performed on the second partial image data,
When the input image is a second type input image,
In the first conversion step, a second type of first style conversion process is performed on the first partial image data,
In the second conversion step, a second type of second style conversion process is performed on the second partial image data.
[Application example 11]
The image generation method according to Application Example 10,
The input image includes an image showing a person's face,
The type of the input image is a type related to at least part of the person's gender, race, facial expression, and facial angle.
[Application example 12]
The image generation method according to any one of Application Examples 1 to 11,
The first style conversion process is performed using a first parameter that specifies the degree of difference between the first input partial image and the first converted partial image to be generated,
The second style conversion process is performed using a second parameter that specifies the degree of difference between the second input partial image and the second converted partial image to be generated,
The first parameter and the second parameter are adjusted independently.
[Application example 13]
The image generation method according to any one of Application Examples 1 to 12, further comprising:
a process selection step of selecting a process to be performed on the first partial image data indicating the first input partial image;
a color conversion step of performing a color conversion process on the first partial image data to convert at least part of the color of the first input partial image without using a machine learning model;
Equipped with
When the first style conversion process is selected in the process selection step, the first conversion process is executed without executing the color conversion process,
An image generation method, wherein when the color conversion process is selected in the process selection step, the color conversion process is executed without executing the first conversion process.
[Application example 14]
The image generation method according to Application Example 13,
The input image includes an image showing a person's face,
The first input partial image is an image showing the eyes of the person,
The image generation method is characterized in that the color conversion process is a process of converting a value of a pixel corresponding to the white part of the eye in the image showing the eye into a specific value showing white.
[Application example 15]
The image generation method according to any one of Application Examples 1 to 14, further comprising:
Obtain first input information for the first style conversion process based on a first input by the user, and obtain second input information for the second style conversion process based on a second input by the user. Equipped with an information acquisition process to acquire
In the first conversion step, the first style conversion process is performed using the first input information,
In the image generation method, in the second conversion step, the second style conversion process is performed using the second input information.
[Application example 16]
The image generation method according to Application Example 15,
The first input information includes data indicating an image corresponding to the first input partial image and having a style different from that of the first input partial image,
The second input information includes data indicating an image corresponding to the second input partial image and having a style different from the second input partial image.
[Application example 17]
The image generation method according to any one of Application Examples 1 to 16,
The input image includes an image showing a person's face,
The second input partial image is an image showing the mouth of the person,
The second style conversion process is a process of correcting tooth alignment in the image showing the mouth.
なお、本明細書に開示された技術は、種々の形態で実現可能であり、例えば、システム、画像生成装置、これらの方法、装置、システムの機能を実現するためのコンピュータプログラム、そのコンピュータプログラムを記録した記録媒体、等の形態で実現することができる。 Note that the technology disclosed in this specification can be realized in various forms, such as a system, an image generation device, a computer program for realizing the functions of these methods, devices, and the system, and a computer program for implementing the computer program. This can be realized in the form of a recorded recording medium, etc.
A.第1実施例
A-1.システム1000の構成
次に、実施の形態を実施例に基づき説明する。図1は、本実施例のシステム1000の構成を示すブロック図である。システム1000は、サーバ100と、端末装置200と、を備えている。第1実施例のシステム1000は、入力画像データを用いて、出力画像を示す出力画像データを生成するための画像生成システムである。図1で破線で示すミシン300は、第2実施例のシステムが備える構成要素であり、第1実施例のシステムが備える構成要素ではないので、第2実施例において説明する。
A. First Example A-1. Configuration of
サーバ100は、インターネットITに接続された計算機である。サーバ100は、サーバ100のコントローラとしてのCPU110と、RAMなどの揮発性記憶装置120と、ハードディスクドライブやフラッシュメモリなどの不揮発性記憶装置130と、通信インタフェース(IF)160と、を備えている。通信インタフェース160は、インターネットITと接続するための有線または無線のインタフェースである。
揮発性記憶装置120は、CPU110が処理を行う際に生成される種々の中間データを一時的に格納するバッファ領域を提供する。不揮発性記憶装置130には、コンピュータプログラムPGsと、スタイル画像データ群SDG(後述)と、肌色データ群SKG(後述)と、が格納されている。
The
コンピュータプログラムPGsとスタイル画像データ群SDGと肌色データ群SKGとは、例えば、サーバ100の運用者によって提供され、サーバ100にアップロードされる。CPU110は、コンピュータプログラムPGsを実行することにより、端末装置200と協働して、後述する出力画像を生成する処理を実行する。
The computer program PGs, the style image data group SDG, and the skin color data group SKG are provided by, for example, an operator of the
コンピュータプログラムPGsは、後述する複数個の生成ネットワークGNを含む生成ネットワーク群GNGをCPU110に実現させるコンピュータプログラムをモジュールとして含んでいる。
The computer program PGs includes, as a module, a computer program that causes the
端末装置200は、例えば、スマートフォンなどの携帯型の端末装置である。端末装置200は、端末装置200のコントローラとしてのプロセッサであるCPU210と、ハードディスクドライブやフラッシュメモリなどの不揮発性記憶装置220と、RAMなどの揮発性記憶装置230と、ユーザの操作を受け取るタッチパネルなどの操作部240と、タッチパネルと重畳された液晶ディスプレイなどの表示装置250と、外部機器と通信を行うための無線の通信インタフェース260と、を備えている。端末装置200は、無線ネットワークNWとインターネットITとを介して、サーバ100と通信可能に接続されている。
The
端末装置200の不揮発性記憶装置220には、コンピュータプログラムPGtが格納されている。コンピュータプログラムPGtは、上述したサーバ100の運用者によって提供され、例えば、インターネットITを介して端末装置200に接続された所定のサーバからダウンロードされる形態で提供される。CPU210は、コンピュータプログラムPGtを実行することにより、サーバ100と協働して、後述する出力画像を生成する処理を実行する。
A computer program PGt is stored in the
A-2.生成ネットワーク群の構成
図2は、生成ネットワーク群GNGの構成の説明図である。生成ネットワーク群GNGは、図2(A)のブロック図に示すように、4個の生成ネットワークGN1~GN4を含んでいる。なお、破線で示す2個の生成ネットワークGN4、GN5は、第2実施例において備えられるので、第2実施例にて説明する。
A-2. Configuration of Generation Network Group FIG. 2 is an explanatory diagram of the configuration of the generation network group GNG. The generation network group GNG includes four generation networks GN1 to GN4, as shown in the block diagram of FIG. 2(A). Note that the two generation networks GN4 and GN5 indicated by broken lines are provided in the second embodiment, so they will be explained in the second embodiment.
4個の生成ネットワークGN1~GN4は、それぞれ、図2(B)に生成ネットワークGNとして示す構成を有している。生成ネットワークGNは、スタイル変換を行う機械学習モデルである。本実施例では、生成ネットワークGNは、論文「Xun Huang and Serge Belongie. Arbitrary style transfer in real-time with adaptive instance normalization. In ICCV, 2017.」に開示されている機械学習モデルである。 Each of the four generation networks GN1 to GN4 has a configuration shown as generation network GN in FIG. 2(B). The generative network GN is a machine learning model that performs style conversion. In this embodiment, the generative network GN is a machine learning model disclosed in the paper "Xun Huang and Serge Belongie. Arbitrary style transfer in real-time with adaptive instance normalization. In ICCV, 2017."
生成ネットワークGNには、コンテンツ画像データCDとスタイル画像データSDとから成るデータペアが入力される。コンテンツ画像データCDは、コンテンツ画像を示す画像データである。例えば、目用の生成ネットワークGN1では、コンテンツ画像は、人物の目を示す画像(後述)である。スタイル画像データSDは、スタイル画像を示す画像データである。例えば、目用の生成ネットワークGN1では、スタイル画像は、人物の目を示す画像であり、コンテンツ画像とは異なるスタイル(例えば、目の色調やメイクの特徴)を有する画像である。 A data pair consisting of content image data CD and style image data SD is input to the generation network GN. Content image data CD is image data indicating a content image. For example, in the generation network GN1 for eyes, the content image is an image showing a person's eyes (described later). Style image data SD is image data indicating a style image. For example, in the eye generation network GN1, the style image is an image showing a person's eyes, and is an image having a different style (for example, eye color tone and makeup characteristics) from the content image.
生成ネットワークGNは、データペアが入力されると、データペアに対して複数個のパラメータを用いた演算を実行して、変換済画像データTDを生成し、出力する。変換済画像データTDは、コンテンツ画像に対してスタイル画像のスタイルを適用して得られる変換済画像を示すデータである。例えば、変換済画像は、コンテンツ画像の形状(例えば、目の形状)を維持しつつ、スタイル画像のスタイルを有する画像である。 When a data pair is input, the generation network GN executes an operation using a plurality of parameters on the data pair, generates converted image data TD, and outputs the converted image data TD. The converted image data TD is data indicating a converted image obtained by applying the style of the style image to the content image. For example, the converted image is an image that has the style of the style image while maintaining the shape of the content image (eg, the shape of an eye).
本実施例では、コンテンツ画像データCD、スタイル画像データSD、および、変換済画像データTDは、複数個の画素を含む画像を示すビットマップデータであり、具体的には、RGB値によって画素ごとの色を表すRGB画像データである。RGB値は、3個の色成分の階調値(以下、成分値とも呼ぶ)、すなわち、R値、G値、B値を含むRGB表色系の色値である。これらの画像データCD、SD、TDによって示される画像のサイズは、互いに等しく、例えば、縦256画素×横256画素のサイズである。 In this embodiment, the content image data CD, style image data SD, and converted image data TD are bitmap data indicating an image including a plurality of pixels, and specifically, each pixel is divided by RGB values. This is RGB image data representing colors. The RGB value is a color value of the RGB color system including gradation values of three color components (hereinafter also referred to as component values), that is, an R value, a G value, and a B value. The sizes of the images indicated by these image data CD, SD, and TD are equal to each other, and are, for example, 256 pixels vertically by 256 pixels horizontally.
図2(B)に示すように、生成ネットワークGNは、エンコーダECと、特徴結合部CCと、強度調整部SAと、デコーダDCと、を含んでいる。 As shown in FIG. 2(B), the generation network GN includes an encoder EC, a feature combination section CC, a strength adjustment section SA, and a decoder DC.
エンコーダECには、コンテンツ画像データCDやスタイル画像データSDが入力される。エンコーダECは、入力された画像データに対して、次元削減処理を実行して、入力された画像データの特徴を示す特徴データを生成する。エンコーダECは、例えば、畳込処理(convolution)を行う畳込層を含む複数の層を有するニューラルネットワーク(Convolutional Neural Network)である。本実施例では、エンコーダECには、VGG19と呼ばれるニューラルネットワークのうちの入力層からRElu4_1層までの部分が用いられる。VGG19は、ImageNetと呼ばれる画像データベースに登録された画像データを用いてトレーニングされた学習済みのニューラルネットワークであり、その学習済みの演算パラメータは一般公開されている。本実施例では、エンコーダECの演算パラメータには、公開された学習済みの演算パラメータが用いられる。 Content image data CD and style image data SD are input to the encoder EC. The encoder EC performs dimension reduction processing on the input image data to generate feature data indicating the characteristics of the input image data. The encoder EC is, for example, a neural network (Convolutional Neural Network) having a plurality of layers including a convolution layer that performs convolution processing. In this embodiment, the portion from the input layer to the RElu4_1 layer of the neural network called VGG19 is used for the encoder EC. VGG19 is a learned neural network trained using image data registered in an image database called ImageNet, and its learned calculation parameters are publicly available. In this embodiment, published learned calculation parameters are used as the calculation parameters of the encoder EC.
特徴結合部CCは、上記論文に開示された「AdaIN layer」である。特徴結合部CCは、コンテンツ画像データCDをエンコーダECに入力して得られる特徴データf(c)と、スタイル画像データSDをエンコーダECに入力して得られる特徴データf(s)と、を用いて、変換特徴データtを生成する。 The feature combination unit CC is the "AdaIN layer" disclosed in the above paper. The feature combination unit CC uses feature data f(c) obtained by inputting the content image data CD to the encoder EC and feature data f(s) obtained by inputting the style image data SD to the encoder EC. Then, converted feature data t is generated.
強度調整部SAは、スタイル変換の強度を示すパラメータαを用いて、スタイル変換の強度を調整する。具体的には、強度調整部SAは、パラメータαと、コンテンツ画像データCDの特徴データf(c)と、変換特徴データtと、を用いて、強度調整済みの変換特徴データt_adを生成する。変換特徴データt_adは、以下の式(1)で示される。
t_ad=(1-α)f(c)+αt …(1)
The strength adjustment unit SA adjusts the strength of style transformation using a parameter α indicating the strength of style transformation. Specifically, the intensity adjustment unit SA generates the intensity-adjusted converted feature data t_ad using the parameter α, the feature data f(c) of the content image data CD, and the converted feature data t. The conversion feature data t_ad is expressed by the following equation (1).
t_ad=(1-α)f(c)+αt…(1)
パラメータαは、0<α≦1の範囲の値を取る。パラメータαが1に近いほど、スタイル変換の強度が強くなる。換言すれば、パラメータαが1に近いほど、変換済画像データTDによって示される変換済画像は、スタイル画像に近づき、コンテンツ画像との差異が大きくなる。このために、パラメータαは、コンテンツ画像と変換済画像との間の差異の程度を指定するパラメータである、と言うことができる。パラメータαは、後述するように、ユーザによって指定される。パラメータαは、デコーダDCのトレーニング時には、1に設定される。 The parameter α takes a value in the range of 0<α≦1. The closer the parameter α is to 1, the stronger the style transformation becomes. In other words, the closer the parameter α is to 1, the closer the converted image indicated by the converted image data TD is to the style image, and the greater the difference from the content image. For this reason, it can be said that the parameter α is a parameter that specifies the degree of difference between the content image and the transformed image. The parameter α is specified by the user, as will be described later. The parameter α is set to 1 when training the decoder DC.
デコーダDCには、強度調整済みの変換特徴データt_adが入力される。デコーダDCは、デコーダDCは、変換特徴データt_adに対して、複数個の演算パラメータを用いて、エンコーダECとは逆の次元復元処理を実行して、上述した変換済画像データTDを生成する。デコーダDCは、転置畳込処理(transposed convolution)を行う転置畳込層を含む複数の層を有するニューラルネットワークである。 The intensity-adjusted conversion feature data t_ad is input to the decoder DC. The decoder DC performs a dimension restoration process on the transformed feature data t_ad using a plurality of calculation parameters, which is opposite to that of the encoder EC, and generates the above-mentioned transformed image data TD. The decoder DC is a neural network having multiple layers including a transposed convolution layer that performs transposed convolution.
デコーダDCの複数個の演算パラメータは、以下のトレーニングによって調整される。学習用のコンテンツ画像データCDとスタイル画像データSDからなるデータペアが、所定数(例えば、数万個)分だけ準備される。これらのデータペアから選択される所定のバッチサイズ分のデータペアを用いて1回の調整処理が実行される。 A plurality of calculation parameters of the decoder DC are adjusted by the following training. A predetermined number (for example, tens of thousands) of data pairs consisting of learning content image data CD and style image data SD are prepared. One adjustment process is performed using a predetermined batch size of data pairs selected from these data pairs.
1回の調整処理では、バッチサイズ分のデータペアを用いて算出される損失関数Lが小さくなるように、所定のアルゴリズムに従って複数個の演算パラメータが調整される。所定のアルゴリズムには、例えば、誤差逆伝播法と勾配降下法とを用いたアルゴリズム(本実施例では、adam)が用いられる。 In one adjustment process, a plurality of calculation parameters are adjusted according to a predetermined algorithm so that the loss function L calculated using data pairs corresponding to the batch size becomes small. As the predetermined algorithm, for example, an algorithm (adam in this embodiment) using error backpropagation and gradient descent is used.
損失関数Lは、コンテンツ損失Lcと、スタイル損失Lsと、重みλを用いて、以下の式(2)で示される。
L=Lc+λLs …(2)
The loss function L is expressed by the following equation (2) using content loss Lc, style loss Ls, and weight λ.
L=Lc+λLs…(2)
コンテンツ損失Lcは、本実施例では、変換済画像データTDの特徴データf(g(t))と、変換特徴データtと、の間の損失(誤差とも呼ぶ)である。変換済画像データTDの特徴データf(g(t))は、用いるべきデータペアを生成ネットワークGNに入力して得られる変換済画像データTDを、さらに、エンコーダECに入力することによって算出される。変換特徴データtは、上述したように、用いるべきデータペアをエンコーダECに入力して得られる特徴データf(c)、f(s)を特徴結合部CCに入力することによって算出される。 In this embodiment, the content loss Lc is a loss (also called an error) between the feature data f(g(t)) of the converted image data TD and the converted feature data t. The feature data f(g(t)) of the converted image data TD is calculated by further inputting the converted image data TD obtained by inputting the data pair to be used into the generation network GN to the encoder EC. . As described above, the converted feature data t is calculated by inputting the feature data f(c) and f(s) obtained by inputting the data pair to be used into the encoder EC to the feature combination unit CC.
スタイル損失Lcは、変換済画像データTDをエンコーダECに入力した場合にエンコーダECの複数個の層からそれぞれ出力されるデータ群と、スタイル画像データSDをエンコーダECに入力した場合にエンコーダECの複数個の層からそれぞれ出力されるデータ群と、の間の損失である。 Style loss Lc is a data group output from multiple layers of encoder EC when converted image data TD is input to encoder EC, and a data group output from multiple layers of encoder EC when style image data SD is input to encoder EC. This is the loss between the data groups output from each layer.
以上のような調整処理を複数回に亘って繰り返される。これによって、コンテンツ画像データCDとスタイル画像データSDとが入力される場合に、コンテンツ画像に対してスタイル画像のスタイルを適用して得られる変換済画像を示す変換済画像データTDが出力できるように、生成ネットワークGNがトレーニングされる。 The above adjustment process is repeated multiple times. With this, when content image data CD and style image data SD are input, converted image data TD indicating a converted image obtained by applying the style of the style image to the content image can be output. , the generative network GN is trained.
生成ネットワークGN1~GN4の基本的な構成は、図2(B)のネットワークGNに示す構成であるが、生成ネットワークGN1~GN4のトレーニングに用いられるデータペアが互いに異なる。例えば、目用の生成ネットワークGN1は、人物の目を示すデータペアを用いてトレーニングされている。鼻用の生成ネットワークGN2は、人物の鼻を示すデータペアを用いてトレーニングされている。口用の生成ネットワークGN3は、人物の口を示すデータペアを用いてトレーニングされている。顔用の生成ネットワークGN4は、人物の顔の全体を示すデータペアを用いてトレーニングされている。このために、トレーニング済みの生成ネットワークGN1~GN4では、複数個の演算パラメータの値が互いに異なっている。 The basic configuration of the generation networks GN1 to GN4 is the configuration shown in network GN in FIG. 2(B), but the data pairs used for training the generation networks GN1 to GN4 are different from each other. For example, the generation network GN1 for eyes is trained using data pairs representing human eyes. The generative network GN2 for the nose is trained using data pairs representing a person's nose. The mouth generation network GN3 is trained using data pairs representing a person's mouth. The face generation network GN4 is trained using data pairs representing the entire face of a person. For this reason, the values of a plurality of calculation parameters are different from each other in the trained generation networks GN1 to GN4.
A-3.システムの動作
図3は、第1実施例の端末装置200が実行する処理のフローチャートである。この処理は、サーバ100が提供するスタイル変換サービスを利用して、入力画像データに対してスタイル変換を行って得られる出力画像データを取得する処理である。この処理は、例えば、端末装置200のコンピュータプログラムPGtが実行された状態で、ユーザの開始指示に基づいて開始される。
A-3. System Operation FIG. 3 is a flowchart of processing executed by the
図3のS105では、端末装置200のCPU210は、入力画像Iinを示す入力画像データを取得する。CPU210は、例えば、不揮発性記憶装置130に格納された複数個の画像データの中から、ユーザによって指定された画像データを入力画像データとして取得する。あるいは、CPU210は、ユーザの撮影指示に応じて端末装置200が備えるデジタルカメラ(図示省略)に撮影を実行させ、該撮影によって生成される画像データを入力画像データとして取得する。入力画像データは、例えば、RGB画像データである。
In S105 of FIG. 3, the
図4は、入力画像Iinと出力画像Ioutとの一例を示す図である。図4(A)に示すように、本実施例の入力画像Iinは、人物の顔FCの全体を含む写真を示す画像である。 FIG. 4 is a diagram showing an example of an input image Iin and an output image Iout. As shown in FIG. 4A, the input image Iin of this embodiment is an image showing a photograph including the entire face FC of a person.
図3のS110では、CPU210は、入力画像データを用いて、入力画像Iinを含む選択画面UDaを表示装置250に表示する。図5は、選択画面の一例を示す図である。図5(A)の選択画面UDaは、入力画像Iinと、入力画像Iinの種類に関する選択指示(具体的には、性別および人種の選択指示)を入力するためのプルダウンメニューPM1、PM2と、選択画面の切替指示を入力するためのボタンBT1、BT2と、を含んでいる。
In S110 of FIG. 3, the
図3のS115では、CPU210は、入力画像データをサーバ100に送信する。なお、本実施例では、端末装置200からサーバ100へのデータの送信は、HTTP(Hypertext Transfer Protocol)に従うHTTPリクエストの送信として行われる。
In S115 of FIG. 3, the
サーバ100が端末装置200から送信される入力画像データを受信すると、サーバ100のCPU110は、スタイル変換サービスを提供する処理を開始する。図6は、第1実施例のサーバ100が実行する処理のフローチャートである。端末装置200の図3の処理とサーバ100の図6の処理とは、データの遣り取りを行いながら並行して実行される。
When the
図6のS205では、サーバ100のCPU110は、サーバ100が端末装置200から送信される入力画像データを受信する。図6のS210では、CPU110は、入力画像データに対して所定の領域特定処理を実行して、入力画像Iinの顔FCに含まれる複数個の部位の領域を特定する。具体的には、図4(A)に示すように、右目、左目、鼻、口の領域Per、Pel、Pn、Pmが特定される。領域特定処理には、公知の画像認識方法が用いられる。
In S205 of FIG. 6, the
例えば、yolo(You only look once)と呼ばれる画像認識アルゴリズムは、畳込ニューラルネットワークを用いて、画像内のオブジェクトの位置と種類との認識を同時に行うことができる。本実施例では、右目、左目、鼻、口の4種類のオブジェクトの位置と種類を認識できるようにトレーニングされたyoloの畳込ニューラルネットワークを用いて、右目、左目、鼻、口の領域Per、Pel、Pn、Pmが特定される。yoloは、例えば、論文「J. Redmon, S. Divvala, R. Girshick, and A. Farhadi, “You only look once:Unified, real-time object detection,” in Proc. IEEE Conf. Comput. Vis. Pattern Recognit. (CVPR), Jun. 2016, pp. 779-788.」に開示されている。 For example, an image recognition algorithm called yolo (You only look once) uses a convolutional neural network to simultaneously recognize the location and type of an object in an image. In this example, we use a YOLO convolutional neural network trained to recognize the positions and types of four types of objects: right eye, left eye, nose, and mouth. Pel, Pn, and Pm are specified. yolo can be used, for example, in the paper “J. Redmon, S. Divvala, R. Girshick, and A. Farhadi, “You only look once:Unified, real-time object detection,” in Proc. IEEE Conf. Comput. Vis. Pattern Recognit. (CVPR), Jun. 2016, pp. 779-788.
図6のS212では、CPU110は、特定された複数個の部位の領域Per、Pel、Pn、Pmを示す領域情報、例えば、これらの領域の入力画像Iin内の位置とサイズとを示す領域情報を、端末装置200に送信する。
In S212 of FIG. 6, the
図3のS120では、端末装置200のCPU210は、サーバ100から送信される領域情報を受信し、該領域情報を用いて、複数個の部位の領域Per、Pel、Pn、Pmの特定結果を表示装置250に表示する。例えば、図5(A)に示すように、選択画面UDaの入力画像Iin上に、複数個の部位の領域Per、Pel、Pn、Pmを示す複数個の矩形の枠Ser、Sel、Sn、Smを表示する。なお、フローチャートでは省略するが、CPU210は、矩形の枠Ser、Sel、Sn、Smの位置やサイズの修正指示がユーザから入力される場合には、該入力に応じて、対応する部位の領域Per、Pel、Pn、Pmの領域情報を修正する。修正後の領域情報は、サーバ100に送信される。
In S120 of FIG. 3, the
図3のS125では、CPU210は、ユーザによって選択された性別と人種の情報をサーバ100に送信する。例えば、図5(A)のプルダウンメニューPM1は、男性を示す選択肢と、女性を示す選択肢と、を含む。プルダウンメニューPM2は、予め登録された人種を示す複数個の選択肢を含む。ユーザは、プルダウンメニューPM1、PM2を操作して、複数個の選択肢のうちの1個の選択肢を選択して、ボタンBT2を押下する。CPU210は、ボタンBT2が押下された時点で、プルダウンメニューPM1、PM2にて選択されている選択肢に対応する性別および人種の情報を、サーバ100に送信する。
In S125 of FIG. 3, the
図6のS215では、サーバ100のCPU110は、端末装置200から送信される性別および人種の情報を受信する。S220では、CPU110は、受信された情報によって示される性別および人種に応じたスタイル画像データSDと肌色データとを、端末装置200に送信する。例えば、サーバ100の不揮発性記憶装置130に格納されたスタイル画像データ群SDG(図1)は、性別および人種の組み合わせごとに、複数個のスタイル画像データSDを含んでいる。性別および人種の1つの組み合わせに対応する複数個のスタイル画像データSDは、顔の部位(本実施例では目、口、鼻)ごとに、顔の部位をそれぞれ示す複数個のスタイル画像データSDを含んでいる。例えば、受信された情報によって示される性別および人種に対応する複数個のスタイル画像データSDが、端末装置200に送信される。サーバ100の不揮発性記憶装置130に格納された肌色データ群SKG(図1)は、性別および人種の組み合わせごとに、複数個の肌色データ(例えば、肌色を示すRGB値)を含んでいる。例えば、受信された情報によって示される性別および人種に対応する複数個の肌色データが端末装置200に送信される。
In S215 of FIG. 6, the
図3のS127では、端末装置200のCPU210は、サーバ100から送信されるスタイル画像データSDと肌色データとを受信する。
In S127 of FIG. 3, the
図3のS130では、CPU210は、入力画像Iinにて特定される顔の部位(目、鼻、口)の領域から注目領域を選択する。
In S130 of FIG. 3, the
図3のS135では、CPU210は、注目領域用の選択画面を表示装置250に表示する。図5(B)の選択画面UDbは、目の領域用の選択画面である。選択画面UDbは、入力画像Iinと、目のスタイル画像の選択指示を入力するための選択ウインドウSWbと、目のスタイル変換の強度を入力するためのスライドバーSBbと、ボタンBT1、BT2と、を含んでいる。選択ウインドウSWbは、選択肢として、S127にて受信された目の複数個のスタイル画像データSDによって示される複数個のスタイル画像SIe1、SIe2を含んでいる。図5(C)の選択画面UDcは、鼻の領域用の選択画面である。選択画面UDcは、後述する中間画像Imaと、鼻のスタイル画像の選択指示を入力するための選択ウインドウSWcと、鼻のスタイル変換の強度を入力するためのスライドバーSBcと、ボタンBT1、BT2と、を含んでいる。選択ウインドウSWcは、選択肢として、S127にて受信された鼻の複数個のスタイル画像データSDによって示される複数個のスタイル画像SIn1、SIn2を含んでいる。口の領域用の選択画面については図示を省略する。
In S135 of FIG. 3, the
図3のS140では、CPU210は、ユーザによって選択されたスタイル画像と強度とを示す情報をサーバ100に送信する。例えば、注目領域が目の領域である場合には、ユーザは、図5(B)の選択ウインドウSWbに表示された複数個のスタイル画像SIe1、SIe2の中から、用いるべき1個のスタイル画像を選択する。ユーザは、スライドバーSBcのノブを操作して、用いるべき強度に対応する位置に移動させる。その後、ユーザは、ボタンBT2を押下する。CPU210は、ボタンBT2が押下された時点で、選択ウインドウSWbにて選択されているスタイル画像を示す情報(例えば、画像ID)と、スライドバーSBbのノブの位置に対応する強度を示す情報(例えば、上述したパラメータα)と、をサーバ100に送信する。
In S140 of FIG. 3, the
図6のS225では、サーバ100のCPU110は、注目領域について選択されたスタイル画像と強度とを示す情報を端末装置200から受信する。
In S225 of FIG. 6, the
図6のS227では、CPU110は、用いるべきスタイル画像データSDを取得する。
例えば、注目領域が目の領域Per、Pelである場合には、CPU110は、S225にて受信された情報に基づいて、不揮発性記憶装置130に格納されたスタイル画像データ群SDG(図1)から、用いるべき目のスタイル画像データSDを取得する。
In S227 of FIG. 6, the
For example, when the attention area is the eye area Per or Pel, the
図6のS230では、CPU110は、注目領域のスタイル変換処理を実行する。CPU110は、目の領域Per、Pelに対応する2個の部分画像PIer、PIel(図4(A))を示す2個の部分画像データを、入力画像データからそれぞれ抽出する。CPU110は、2個の部分画像データに対して、それぞれ、縮小処理または拡大処理を実行して、所定サイズ(本実施例では、縦256画素×横256画素)の2個の目のコンテンツ画像データCDを生成する。CPU110は、右目のコンテンツ画像データCDとS227にて取得されたスタイル画像データSDとのデータペアを、目用の生成ネットワークGN1に入力して、右目の変換済画像データTDを生成する。同様に、CPU110は、左目のコンテンツ画像データCDとスタイル画像データSDとのデータペアを、目用の生成ネットワークGN1に入力して、左目の変換済画像データTDを生成する。CPU110は、生成された2個の変換済画像データTDに対して拡大処理または縮小処理を実行して、変換済画像データTDによって示される画像のサイズを元の部分画像と同じサイズに調整する。以下では、サイズが調整された後の変換済画像データTDを、変換済データと呼ぶ。注目領域が鼻の領域Pnや口の領域Pmである場合には、鼻用の生成ネットワークGN2や口用の生成ネットワークGN3を用いたスタイル変換処理によって、鼻や口の変換済データが生成される。
In S230 of FIG. 6, the
図6のS232では、CPU110は、入力画像データのうちの注目領域に対応する部分画像データを変換済データに置換することによって、中間画像を示す中間画像データを生成する。図4(B)には、目の領域Per、Pelに対応する部分画像データが置換された後の中間画像Imaが示されている。中間画像Imaの顔FCaでは、図4(A)の入力画像Iinの目の部分画像PIer、PIelが、変換済データによって示される変換済部分画像TIer、TIelに置換されている。中間画像Imaには、変換済部分画像TIer、TIelと他の部分との境界に位置するスジBLが現れている。変換済部分画像TIer、TIelと他の部分との境界では、画素の値が滑らかに変化しておらず、画素の値の差が大きくなっているためである。
In S232 of FIG. 6, the
図6のS235では、CPU110は、中間画像データを端末装置200に送信する。
In S235 of FIG. 6,
図6のS240では、CPU110は、顔の全ての部位の領域について処理されたか否かを判断する。未処理の領域がある場合には(S240:NO)、S225に処理が戻される。全ての部位の領域について処理された場合には(S240:YES)、S245に処理が進められる。
In S240 of FIG. 6, the
図3のS145では、端末装置200のCPU210は、サーバ100から送信される中間画像データを受信する。S147では、CPU210は、中間画像データを用いて、表示装置250に表示されている選択画面を更新する。例えば、図5(C)の選択画面UDcでは、入力画像Iinに代えて、中間画像データによって示される中間画像Ima(図4(B))が表示されている。ユーザは、表示装置250に表示される中間画像Imaを見て、注目領域のスタイル変換の結果を確認することができる。フローチャートでは、省略するが、ユーザは、注目領域のスタイル変換の結果に満足できない場合には、ボタンBT1を押下することで、処理済みの注目領域について、再度、図3のS135~S147、および、図6のS225~S235を繰り返させることができる。
In S145 of FIG. 3, the
図3のS150では、CPU210は、顔の全ての部位の領域について処理されたか否かを判断する。未処理の領域がある場合には(S150:NO)、S130に処理が戻される。全ての部位の領域について処理された場合には(S150:YES)、S155に処理が進められる。
In S150 of FIG. 3, the
S155に処理が進められた時点で、サーバ100において、図4(C)の中間画像Imbを示す中間画像データが生成され、端末装置200に送信されている。中間画像Imbの顔FCbでは、図4(A)の入力画像Iinの各部位の部分画像PIer、PIel、PIn、PImが、変換済データによって示される変換済部分画像TIer、TIel、TIn、TImに置換されている。中間画像Imbには、変換済部分画像TIer、TIel、TIn、TImと他の部分との境界に上述したスジBLが現れている。
When the process proceeds to S155, intermediate image data representing the intermediate image Imb of FIG. 4(C) is generated in the
図3のS155では、端末装置200のCPU210は、図5(D)の肌色の選択画面UDdを表示装置250に表示する。図5(D)の選択画面UDdは、中間画像Imb(図)と、肌色の選択指示を入力するための選択ウインドウSWdと、ボタンBT1、BT2と、を含んでいる。選択ウインドウSWdは、選択肢として、S127にて受信された複数個の肌色データによって示される肌色を有する矩形画像CP1、CP2を含んでいる。
In S155 of FIG. 3, the
図3のS160では、CPU210は、ユーザによって選択された肌色を示す情報をサーバ100に送信する。例えば、ユーザは、図5(D)の選択ウインドウSWdに表示された複数個の矩形画像CP1、CP2の中から、1個の画像を選択して、ボタンBT2を押下する。CPU210は、ボタンBT2が押下された時点で、選択ウインドウSWdにて選択されている矩形画像が有する肌色を示す情報(例えば、色番号などのID)をサーバ100に送信する。
In S160 of FIG. 3,
図6の245では、サーバ100のCPU110は、選択された肌色を示す情報を端末装置200から受信する。図6のS250では、CPU110は、S205にて取得済みの入力画像データに対して肌色補正を実行して、補正済みの入力画像データを生成する。肌色補正処理は、公知の補正処理が用いられる。例えば、CPU110は、入力画像データに対して公知の顔認識アルゴリズムを用いた認識処理を実行し、入力画像Iin内の人物の顔FCの領域を特定する。顔認識アルゴリズムには、例えば、人物の顔の領域を認識できるようにトレーニングされた上述したyoloの畳込ニューラルネットワークが用いられる。CPU110は、人物の顔FCの領域の複数個の画素のうち、肌色を示す所定の範囲内のRGB値を有する肌色画素を特定し、特定された複数個の肌色画素の平均のRGB値を算出する。CPU110は、肌色画素の平均のRGB値と、ユーザによって選択された肌色を示すRGB値と、の差分に基づいて、RGBの各成分の補正量を決定する。CPU110は、該補正量に応じてRGBの各成分のトーンカーブを決定し、該トーンカーブを用いて、特定済みの複数個の肌色画素のRGB値を補正する。図4(D)には、補正済みの入力画像データによって示される補正済画像Icが示されている。補正済画像Icの人物の顔FCcは、ユーザによって選択された肌色を有している。
At 245 in FIG. 6, the
S255では、中間画像データに対して、顔の全体のスタイル変換処理を実行して、出力画像データを生成する。例えば、CPU110は、図4(C)の中間画像Imbを示す中間画像データと、図4(D)の補正済画像Icを示す補正済みの入力画像データと、に対して、それぞれ、縮小処理または拡大処理を実行する。これによって、中間画像Imbと補正済画像Icとのサイズは、所定のサイズ(本実施例では、縦256画素×横256画素)に調整される。CPU110は、サイズが調整された後の中間画像データをコンテンツ画像データCDとし、サイズが調整された後の補正済みの入力画像データをスタイル画像データSDとして、顔用の生成ネットワークGN4に入力することによって、顔全体の変換済画像データTDを生成する。CPU110は、生成された顔全体の変換済画像データTDに対して拡大処理または縮小処理を実行して、変換済画像データTDによって示される画像のサイズを元の入力画像Iinと同じサイズに調整する。サイズが調整された後の変換済画像データTDが、最終的な出力画像Ioutを示す出力画像データである。顔用の生成ネットワークGN4において、強度を示すパラメータαは、上述した顔の各部位に対するスタイル変換処理(図6のS230)におけるパラメータαよりも小さな値に設定される。これは、各部位に対するスタイル変換処理によって中間画像Imbに現れている顔の各部位の特徴が、顔の全体のスタイル変換処理によって失われることを抑制するためである。パラメータαの値が比較的小さい場合であっても、顔の肌色のような全体的な特徴は、出力画像Ioutに反映される。
In S255, the entire face style conversion process is performed on the intermediate image data to generate output image data. For example, the
図4(E)には、出力画像Ioutの一例が示されている。出力画像Ioutの人物の顔FCoは、中間画像Imbの顔の部位の特徴を備えており、顔FCoの肌色は、補正済画像Icの顔FCcの肌色に近い色である。また、出力画像Ioutの人物の顔FCoでは、中間画像Imbと比較して、スジBLは目立たない。すなわち、出力画像Ioutでは、スジBLを形成する境界における画素の値の差が小さくされている。スタイル画像として用いられる補正済画像Icの顔FCcはスジBLを含まないために、スタイル変換処理によって、補正済画像Icのスタイルが中間画像Imbに適用されると、スジBLが軽減されるためである。 FIG. 4(E) shows an example of the output image Iout. The human face FCo in the output image Iout has the characteristics of the facial region in the intermediate image Imb, and the skin color of the face FCo is close to the skin color of the face FCc in the corrected image Ic. Furthermore, in the human face FCo of the output image Iout, the streaks BL are less noticeable than in the intermediate image Imb. That is, in the output image Iout, the difference in pixel values at the boundaries forming the streaks BL is reduced. This is because the face FCc of the corrected image Ic used as a style image does not include streaks BL, so when the style of the corrected image Ic is applied to the intermediate image Imb through style conversion processing, the streaks BL are reduced. be.
S260では、CPU110は、生成された出力画像データを端末装置200に送信して処理を終了する。
In S260, the
図3のS165では、端末装置200のCPU210は、端末装置200から送信される出力画像データを受信する。S170では、CPU210は、出力画像データを出力する。出力画像データの出力の態様は、例えば、表示、保存、印刷を含む。例えば、CPU210は、出力画像データによって示される出力画像Ioutを表示装置250に表示する。例えば、CPU210は、ユーザの指示に基づいて、出力画像データを含むファイルを揮発性記憶装置120、不揮発性記憶装置130に保存する。例えば、CPU210は、出力画像データを用いて、出力画像Ioutを示す印刷データを生成して、図示しないプリンタに送信する。
In S165 of FIG. 3, the
以上説明した第1実施例では、サーバ100のCPU110は、入力画像データを取得し(図6のS205)、入力画像データを用いて、入力画像Iinの一部である第1入力部分画像(例えば、目の領域Per、Pelに対応する部分画像PIer、PIel)と、入力画像の一部であって第1入力部分画像とは異なる位置にある第2入力部分画像(例えば、鼻の領域Pnに対応する部分画像PIn)と、を特定する(図6のS210)。CPU110は、第1入力部分画像を示す第1部分画像データ(例えば、目の部分画像PIer、PIelを示す部分画像データ)に対して、機械学習モデル(例えば、目の生成ネットワークGN1)を用いた第1スタイル変換処理を実行して、第1変換済部分画像(例えば、目の変換済部分画像TIer、TIel)を示す第1変換済データ(例えば、目の変換済部分画像TIer、TIelを示す変換済データ)を生成する(図6のS230)。CPU110は、第2入力部分画像を示す第2部分画像データ(例えば、鼻の部分画像PInを示す部分画像データ)に対して、機械学習モデル(例えば、鼻の生成ネットワークGN2)を用いた第2スタイル変換処理を実行して、第2変換済部分画像(例えば、鼻の変換済部分画像TIn)を示す第2変換済データ(例えば、鼻の変換済部分画像TInを示す変換済データ)を生成する(図6のS230)。CPU110は、第1変換済データと第2変換済データとを用いて、入力画像Iinに基づく出力画像Ioutを示す出力画像データを生成する(図6のS232、S250、S255)。図4(D)の出力画像Ioutは、第1入力部分画像に対応する第1出力部分画像(例えば、目の部分画像OIer、OIel)と、第2入力部分画像に対応する第2出力部分画像(鼻の部分画像OIn)とを含む。第1出力部分画像(例えば、目の部分画像OIer、OIel)は、第1変換済部分画像(例えば、目の変換済部分画像TIer、TIel)に基づく画像である。第2出力部分画像(例えば、目の部分画像OIn)は第2変換済部分画像(例えば、鼻の変換済部分画像TIn)に基づく画像である。第1実施例によれば、このように、1個の入力画像データに対して第1スタイル変換処理と第2スタイル変換処理とを適用することで出力画像データが生成されるので、柔軟なスタイル変換を実現することができる。
In the first embodiment described above, the
さらに、上記実施例では、第1スタイル変換処理(例えば、目の領域Per、Pelのスタイル変換処理)は、第1スタイル画像(例えば、目のスタイル画像SIe1)を示すスタイル画像データSDを用いて実行され、第2スタイル変換処理(例えば、鼻の領域Pnのスタイル変換処理)は、第2スタイル画像(例えば、鼻のスタイル画像SIn1)を示すスタイル画像データSDを用いて実行される(図2(B)等)。第1変換済部分画像(例えば、目の変換済部分画像TIer、TIel)は、第1スタイル画像(例えば、目のスタイル画像SIe1)のスタイルが、第1入力部分画像(例えば、目の部分画像PIer、PIel)に適用された画像であり、第2変換済部分画像(例えば、鼻の変換済部分画像TIn)は、第2スタイル画像(例えば、鼻のスタイル画像SIn1)のスタイルが、第2入力部分画像(例えば、鼻の部分画像PIn)に適用された画像である。この結果、第1スタイル画像のスタイルと第2スタイル画像のスタイルとが適用された出力画像を示す出力画像データが生成できるので、より柔軟なスタイル変換を実現することができる。 Furthermore, in the above embodiment, the first style conversion process (for example, the style conversion process for the eye areas Per and Pel) uses the style image data SD indicating the first style image (for example, the eye style image SIe1). The second style conversion process (for example, the style conversion process for the nose region Pn) is executed using the style image data SD indicating the second style image (for example, the nose style image SIn1) (FIG. 2 (B) etc.). The first converted partial images (for example, the converted eye partial images TIer, TIel) are such that the style of the first style image (for example, the eye style image SIe1) is the same as that of the first input partial image (for example, the eye partial image TIer, TIel). PIer, PIel), and the second converted partial image (for example, the converted nose partial image TIn) is an image in which the style of the second style image (for example, the nose style image SIn1) is the second converted partial image (for example, the nose style image SIn1). This is an image applied to an input partial image (for example, nose partial image PIn). As a result, output image data indicating an output image to which the style of the first style image and the style of the second style image are applied can be generated, so that more flexible style conversion can be realized.
さらに、CPU110は、第1変換済データと第2変換済データとを用いて、第1変換済部分画像(例えば、目の変換済部分画像TIer、TIel)と第2変換済部分画像(例えば、鼻の変換済部分画像TIn)とを含む中間画像(例えば、中間画像Imb)を示す中間画像データを生成する(図6のS232、図4(C))。CPU110は、中間画像データに対して特定の後処理(図6のS255)を実行して、出力画像データを生成する。この結果、特定の後処理を実行することで、適切な出力画像データを生成することができる。
Further, the
具体的には、本実施例の特定の後処理として、顔の全体のスタイル変換処理(図6のS255)が行われる。この処理によって、上述したように、中間画像Imaにおいて、変換済部分画像(例えば、目や鼻の変換済部分画像TIer、TIel、TIn)と、該1変換済部分画像に隣接する部分との間における画素値の差が低減される。この結果、例えば、出力画像Ioutでは、中間画像Imaに現れているスジBLが目立たない。このように、出力画像Ioutが自然な見栄えを有するように、出力画像データを生成することができる。 Specifically, as specific post-processing in this embodiment, style conversion processing for the entire face (S255 in FIG. 6) is performed. Through this processing, as described above, in the intermediate image Ima, there is a gap between the converted partial images (for example, the converted partial images TIer, TIel, TIn of eyes and nose) and the portion adjacent to the one converted partial image. The difference in pixel values at is reduced. As a result, for example, in the output image Iout, the streaks BL appearing in the intermediate image Ima are not noticeable. In this way, output image data can be generated so that the output image Iout has a natural appearance.
さらに、本実施例の顔の全体のスタイル変換処理(図6のS255)は、機械学習モデル(例えば、顔用の生成ネットワークGN4)を用いた第3スタイル変換処理である。この結果、部分画像に対するスタイル変換処理と、画像の全体に対するスタイル変換さらに、第3スタイル変換処理を実行することで、さらに、柔軟なスタイル変換を実現することができる。 Furthermore, the overall style conversion process for the face (S255 in FIG. 6) of this embodiment is a third style conversion process using a machine learning model (for example, the face generation network GN4). As a result, more flexible style conversion can be achieved by performing style conversion processing on a partial image, style conversion on the entire image, and third style conversion processing.
さらに、本実施例の第3スタイル変換処理(図6のS255の顔の全体のスタイル変換処理)は、入力画像データをスタイル画像データSDとして用いて実行される。この結果、例えば、上述したスジBLが目立たない自然な見栄えを有する出力画像を示す出力画像データを容易に生成することができる。 Further, the third style conversion process (the style conversion process for the whole face in S255 in FIG. 6) of this embodiment is executed using the input image data as the style image data SD. As a result, for example, it is possible to easily generate output image data showing an output image having a natural appearance in which the above-described streaks BL are not noticeable.
さらに、本実施例の特定の後処理は、入力画像データに対して、人物の顔FCの肌色を補正する処理を実行して、補正済みの入力画像データを生成する処理(図6のS250)を含む。そして、第3スタイル変換処理(図6のS255の顔の全体のスタイル変換処理)は、補正済みの入力画像データをスタイル画像データSDとして用いて実行される。この結果、補正済みの入力画像(図4(D)の補正済画像Ic)の人物の顔の肌色が、スタイルとして出力画像Ioutに適用される。したがって、任意の肌色を有する出力画像Ioutを示す出力画像データを容易に生成することができる。 Furthermore, the specific post-processing of this embodiment is a process of executing a process of correcting the skin color of a person's face FC on input image data to generate corrected input image data (S250 in FIG. 6). including. Then, the third style conversion process (the overall style conversion process of the face in S255 in FIG. 6) is executed using the corrected input image data as the style image data SD. As a result, the skin color of the person's face in the corrected input image (corrected image Ic in FIG. 4(D)) is applied to the output image Iout as a style. Therefore, output image data representing an output image Iout having an arbitrary skin color can be easily generated.
さらに、本実施例では、上述のように、入力画像Iinは、人物の顔FCを示す画像を含む(図4(A))、第1入力部分画像(例えば、部分画像PIer、PIel)は、人物の顔FCを構成する第1の部位(例えば、目)を示す画像であり、第2入力部分画像(例えば、部分画像PIn)は、人物の顔FCを構成する第2の部位(例えば、鼻)を示す画像である。この結果、人物の顔を構成する第1の部位と第2の部位とについて、柔軟なスタイル変換を実現することができる。例えば、目のスタイル画像として人物Aの目の画像を選択し、鼻のスタイル画像として人物Bの鼻の画像を選択すれば、入力画像Iinの人物の顔FCの目を人物Aの目に近づけ、顔FCの鼻を人物Bの鼻に近づけるように、スタイル変換することができる。 Furthermore, in this embodiment, as described above, the input image Iin includes an image showing the person's face FC (FIG. 4(A)), and the first input partial images (for example, partial images PIer, PIel) are The image is an image showing a first part (e.g., eyes) constituting the person's face FC, and the second input partial image (e.g., partial image PIn) is an image showing the second part (e.g., This is an image showing the nose. As a result, flexible style conversion can be realized for the first part and the second part that make up a person's face. For example, if you select the eye image of person A as the eye style image and the nose image of person B as the nose style image, the eyes of the person's face FC in the input image Iin will be brought closer to the eyes of person A. , the style can be converted so that the nose of the face FC approaches the nose of the person B.
さらに、本実施例では、端末装置200から情報を受信することで入力画像Iinの種類(例えば、人物の性別や人種)が特定される(図6のS215)。そして、入力画像Iinの種類に応じて、S230のスタイル変換処理に用いるべきスタイル画像データSDの候補が変更される(図6のS220)。すなわち、S230では、入力画像Iinの種類に応じて異なるスタイル変換処理が実行される。換言すれば、入力画像Iinが第1種の入力画像(例えば、女性の顔の入力画像)である場合に、顔の各部位の部分画像データに対して第1種のスタイル変換処理が実行され、入力画像Iinが第2種の入力画像(例えば、男性の顔の入力画像)である場合に、顔の各部位の部分画像データに対して第2種のスタイル変換処理が実行される。この結果、入力画像Iinの種類に応じた柔軟なスタイル変換を実現できる。例えば、入力画像Iinの人物の性別や人種などによって、ユーザに好まれるスタイル変換は異なり得ると考えられるので、本実施例によれば、ユーザのニーズに合致したスタイル変換を実現できる。 Further, in this embodiment, the type of input image Iin (for example, the gender and race of the person) is specified by receiving information from the terminal device 200 (S215 in FIG. 6). Then, candidates for style image data SD to be used in the style conversion process of S230 are changed depending on the type of input image Iin (S220 in FIG. 6). That is, in S230, different style conversion processes are performed depending on the type of input image Iin. In other words, when the input image Iin is a first type input image (for example, an input image of a woman's face), the first type style conversion process is performed on partial image data of each part of the face. , when the input image Iin is a second type input image (for example, an input image of a man's face), the second type style conversion process is performed on partial image data of each part of the face. As a result, flexible style conversion can be realized depending on the type of input image Iin. For example, it is considered that the style conversion preferred by the user may differ depending on the gender, race, etc. of the person in the input image Iin, so according to this embodiment, style conversion that meets the user's needs can be realized.
さらに、本実施例によれば、ユーザは、選択画面UDb、SDcのスライドバーSBb、SBcを操作して、顔の部位ごとに、スタイル変換の強度を示すパラメータαを設定できる(図5(B)、(C)、図3のS140、図6のS225)。換言すれば、第1スタイル変換処理(例えば、目のスタイル変換処理)は、第1パラメータα1を用いて実行され、第2スタイル変換処理(例えば、鼻のスタイル変換)は、第1パラメータα1とは独立して調整される第2パラメータα2を用いて実行される。この結果、さらに柔軟なスタイル変換を実現できる。例えば、目については入力画像Iinとの差異が大きく、鼻については入力画像Iinとの差異が小さな出力画像Ioutを示す出力画像データを容易に生成することができる。この結果、例えば、用意されるスタイル画像データSDの個数が比較的少なくても柔軟で多様なスタイル変換が実現できる。 Furthermore, according to this embodiment, the user can set the parameter α indicating the strength of style conversion for each part of the face by operating the slide bars SBb and SBc on the selection screens UDb and SDc (Fig. 5(B) ), (C), S140 in FIG. 3, S225 in FIG. 6). In other words, the first style conversion process (e.g., eye style conversion process) is performed using the first parameter α1, and the second style conversion process (e.g., nose style conversion) is performed using the first parameter α1. is performed using an independently adjusted second parameter α2. As a result, more flexible style conversion can be achieved. For example, it is possible to easily generate output image data that shows an output image Iout in which the eyes have a large difference from the input image Iin, and the nose has a small difference from the input image Iin. As a result, for example, even if the number of prepared style image data SD is relatively small, flexible and various style conversions can be realized.
さらに、本実施例によれば、CPU110は、ユーザによる目のスタイル画像の選択指示(図5(B))に基づいて、目のスタイル画像データSDを取得し、ユーザによる鼻のスタイル画像の選択指示(図5(C))に基づいて、鼻のスタイル画像を取得する(図6のS227)。目や鼻のスタイル変換処理は、取得された目や鼻のスタイル画像データSDを用いて実行される(図6のS230)。この結果、ユーザによるスタイル画像の選択指示に応じた柔軟なスタイル変換を実現できる。例えば、ユーザは選択指示を入力することで、例えば、目と鼻に類似したスタイルが適用された出力画像Ioutを示す出力画像データをサーバ100に生成させることもでき、目と鼻に大きく異なるスタイルが適用された出力画像Ioutを示す出力画像データをサーバ100に生成させることもできる。
Further, according to the present embodiment, the
以上の説明から解るように、目のスタイル画像の選択指示は、第1の入力の例であり、鼻のスタイル画像の選択指示は、第2の入力の例である。また、目のスタイル画像の選択指示に基づいて取得される目のスタイル画像データSDは、第1入力情報の例であり、鼻のスタイル画像の選択指示に基づいて取得される鼻のスタイル画像データSDは、第2入力情報の例である。 As can be seen from the above description, the instruction to select the eye style image is an example of the first input, and the instruction to select the nose style image is an example of the second input. Further, the eye style image data SD obtained based on the selection instruction of the eye style image is an example of the first input information, and the nose style image data obtained based on the selection instruction of the nose style image. SD is an example of second input information.
B.第2実施例
B-1.システム1000の構成
第2実施例のシステム1000の基本的な構成は、第1実施例と同様に図1に示す構成であるので、以下では、図1を参照して第1実施例と異なる点について説明する。
B. Second Example B-1. Configuration of
第2実施例のシステム1000は、第1実施例の構成に加えて、端末装置200と通信可能に接続されるミシン300を備える。ミシン300は、刺繍データに基づいて、複数色の糸を布に縫い付けることによって布に刺繍模様を縫製する。
In addition to the configuration of the first embodiment, a
第2実施例の端末装置200は、パーソナルコンピュータなどの据え置き型の端末装置である。第2実施例の端末装置200の揮発性記憶装置230に格納されるコンピュータプログラムPGtは、ミシン300を制御するドライバプログラムである。コンピュータプログラムPGtは、ミシン300の製造者によって提供され、インターネットITを介して端末装置200に接続されたサーバからダウンロードされる形態で提供される。これに代えて、コンピュータプログラムPGtは、CD-ROMやDVD-ROMなどに格納された形態で提供されても良い。CPU210は、コンピュータプログラムPGtを実行することによって、サーバ100と協働して、後述する刺繍データを生成してミシン300に供給する処理を実行する。
The
第2実施例のサーバ100の不揮発性記憶装置130に格納されるコンピュータプログラムPGsは、ミシン300の製造者によって提供され、サーバ100にアップロードされる。CPU110は、コンピュータプログラムPGsを実行することによって、端末装置200と協働して、後述する刺繍データを生成してミシン300に供給する処理を実行する。
The computer program PGs stored in the nonvolatile storage device 130 of the
B-2.生成ネットワーク群の構成
第2実施例では、入力画像Iinは、第1実施例と同様に、人物の顔FCの全体を含む写真を示す画像である。写真などの画像データから刺繍データを生成する場合には、画像データに対して前処理を行い、前処理済みの画像データを用いて刺繍データを生成することが通常である。刺繍模様の縫製に用いられる糸の色数(例えば、数十色)は、写真に表現されている色数(例えば、約1千万色)よりも少ないことや、輪郭線がはっきりしていることが好ましいためである。このような前処理は、経験豊かな作業者が、画像加工プログラム(フォトレタッチソフトとも呼ばれる)を用いて行うことが一般的である。第2実施例では、入力画像データを用いて、前処理済みの出力画像Ioutを示す出力画像データを生成するために、スタイル変換処理が利用される。
B-2. Configuration of Generation Network Group In the second embodiment, the input image Iin is an image showing a photograph including the entire face FC of a person, as in the first embodiment. When generating embroidery data from image data such as a photograph, it is common to perform preprocessing on the image data and generate the embroidery data using the preprocessed image data. The number of colors of thread used to sew the embroidery pattern (e.g., several dozen colors) is smaller than the number of colors represented in the photograph (e.g., about 10 million colors), and the outlines are clear. This is because it is preferable. Such preprocessing is generally performed by an experienced operator using an image processing program (also called photo retouching software). In the second embodiment, style conversion processing is used to generate output image data representing the preprocessed output image Iout using input image data.
第2実施例の生成ネットワーク群GNGは、第1実施例と同様に、生成ネットワークGN1~GN4を含んでいる。第2実施例では、顔の各部位のスタイル変換は、出力画像Ioutが刺繍データの生成に適した画像になるように実行される。このために、生成ネットワークGN1~GN4のトレーニングおよび後述する刺繍データの生成の際に用いられるスタイル画像データSDによって示されるスタイル画像は、刺繍データの生成に適した前処理済みの画像である。前処理の手法、例えば、輪郭線を明確にする手法、陰影の付け方、色の調整の手法には、多数の手法があり、例えば、作業者によって異なる。このために、様々な手法で前処理が行われた複数個の画像がスタイル画像として用いられる。 The generation network group GNG of the second embodiment includes generation networks GN1 to GN4, as in the first embodiment. In the second embodiment, style conversion of each part of the face is performed so that the output image Iout becomes an image suitable for generating embroidery data. For this reason, the style image represented by the style image data SD used in training the generation networks GN1 to GN4 and in generating embroidery data, which will be described later, is a preprocessed image suitable for generating embroidery data. There are many preprocessing methods, such as methods for clarifying outlines, adding shading, and adjusting colors, and these methods vary depending on the operator. For this purpose, a plurality of images that have been preprocessed using various methods are used as style images.
例えば、目用の生成ネットワークGN1は、様々な目の写真に対して様々な手法で前処理が行われた多数の画像がトレーニングのためのスタイル画像データSDとして用いられる。また、刺繍データの生成の際に、図5(B)の選択画面UDbを介して選択可能なスタイル画像データSDには、代表的な目の写真に対して複数個の手法で前処理が行われた複数個のスタイル画像を示す複数個のスタイル画像データSDが用いられる。 For example, the generation network GN1 for eyes uses a large number of images obtained by preprocessing photos of various eyes using various methods as style image data SD for training. In addition, when generating embroidery data, the style image data SD that can be selected via the selection screen UDb in FIG. A plurality of style image data SD representing a plurality of style images are used.
第2実施例の生成ネットワーク群GNGは、さらに、表情用の生成ネットワークGN5と、歯列用の生成ネットワークGN6と、を含んでいる。 The generation network group GNG of the second embodiment further includes a generation network GN5 for facial expressions and a generation network GN6 for dentition.
表情用の生成ネットワークGN5は、機械学習モデルであり、StarGANと呼ばれる敵対的生成ネットワーク(GANs(Generative adversarial networks))を構成する生成ネットワークである。表情用の生成ネットワークGN5は、表情を変更するスタイル変換処理を実行する。具体的には、人物の顔を示す画像データと表情の種類を示すラベルデータとが、表情用の生成ネットワークGN5に入力されると、表情用の生成ネットワークGN5は、変換済画像データを出力する。該変換済画像データによって示される変換済画像は、入力された画像データによって示される人物の顔であって、ラベルデータによって示される表情を有する顔を示す。本実施例では、表情用の生成ネットワークGN5は、無表情、歯を見せない笑顔(smile)、歯を見せた笑顔(grin)、真顔(serious)などの表情に変換することができるように、トレーニングされている。StarGANは、論文「Yunjey Choi et al., "StarGAN: Unified Generative Adversarial Networks for Multi-Domain Image-to-Image Translation", arXiv preprint arXiv:1711.09020, 2017.」に開示されている。 The generative network GN5 for facial expressions is a machine learning model, and is a generative network that constitutes generative adversarial networks (GANs) called StarGAN. The facial expression generation network GN5 executes style conversion processing to change facial expressions. Specifically, when image data indicating a person's face and label data indicating the type of facial expression are input to the facial expression generation network GN5, the facial expression generation network GN5 outputs converted image data. . The converted image shown by the converted image data is the face of the person shown by the input image data, and shows the face having the expression shown by the label data. In this embodiment, the facial expression generation network GN5 is configured to be able to convert facial expressions such as a neutral expression, a smile that does not show teeth, a grin that shows teeth, and a serious face. Has been trained. StarGAN is disclosed in the paper "Yunjey Choi et al., "StarGAN: Unified Generative Adversarial Networks for Multi-Domain Image-to-Image Translation", arXiv preprint arXiv:1711.09020, 2017."
歯列用の生成ネットワークGN6は、上述した生成ネットワークGN1~GN4と同様の機械学習モデルである。歯列用の生成ネットワークGN6は、歯が露出した表情を有する人物の顔を示す画像データがコンテンツ画像データCDとして入力され、歯が露出した表情を有し、歯列が矯正されている人物の顔を示す画像データがスタイル画像データSDとして入力される。生成ネットワークGN6が出力する変換済画像データTDによって示される画像は、コンテンツ画像データCDによって示される人物の顔であって、歯列が矯正されている人物の顔である。 The generation network GN6 for the dentition is a machine learning model similar to the generation networks GN1 to GN4 described above. The generation network GN6 for dentition receives image data showing the face of a person with an expression with exposed teeth as content image data CD, and generates a generation network GN6 of a person with an expression with exposed teeth and whose dentition has been corrected. Image data showing a face is input as style image data SD. The image represented by the converted image data TD output by the generation network GN6 is the face of the person represented by the content image data CD, and is the face of a person whose teeth have been corrected.
B-3.システムの動作
図7は、端末装置200が実行する処理のフローチャートである。この処理は、サーバ100が提供するスタイル変換を用いた前処理サービスを利用して、入力画像データに対して前処理を行って得られる出力画像データを取得し、該出力画像データを用いて刺繍データを生成する処理である。この処理は、例えば、端末装置200のコンピュータプログラムPGtが実行された状態で、ユーザの開始指示に基づいて開始される。
B-3. System Operation FIG. 7 is a flowchart of processing executed by the
図7のS305では、端末装置200のCPU210は、図4(A)の人物の顔FCを含む入力画像Iinを示す入力画像データを取得する。なお、第1実施例と第2実施例とでは、用いられることが想定される画像(例えば、入力画像、スタイル画像、出力画像)は同じではないが、同様の人物の顔、部位を示す画像であるので、説明の便宜上、同じ図、同じ符号を用いて説明する。CPU210は、例えば、不揮発性記憶装置130に格納された複数個の画像データの中から、ユーザによって指定された画像データを入力画像データとして取得する。
In S305 of FIG. 7, the
S310では、CPU210は、入力画像Iinを含む選択画面UDを表示装置250に表示する。図8は、第2実施例の選択画面UDを示す図である。図8の選択画面UDは、入力画像Iinと、プルダウンメニューPM1~PM3と、選択ウインドウSWa~SWdと、スライドバーSBa~SBcと、チェックボックスCBa、CBbと、ボタンBT3、BT4と、を含んでいる。
In S310,
プルダウンメニューPM1、PM2は、入力画像Iinの種類に関する選択指示(具体的には、性別および人種の選択指示)を入力するためのメニューであり、第1実施例の図5(A)のプルダウンメニューPM1、PM2と同様のメニューである。プルダウンメニューPM3は、上述した表情用の生成ネットワークGN5を用いた表情の変更を行うか否かと、表情の変更を行う場合における変更後の表情の種類と、の選択指示を入力するためのメニューである。 The pull-down menus PM1 and PM2 are menus for inputting selection instructions regarding the type of input image Iin (specifically, selection instructions for gender and race), and are similar to the pull-down menus in FIG. 5(A) of the first embodiment. This menu is similar to menus PM1 and PM2. The pull-down menu PM3 is a menu for inputting selection instructions for whether or not to change the facial expression using the above-mentioned facial expression generation network GN5, and the type of facial expression after the change when changing the facial expression. be.
選択ウインドウSWb、SWcは、目、鼻のスタイル画像の選択指示を入力するための選択ウインドウであり、第1実施例の図5(B)、(C)の選択ウインドウSWb、SWcと同様のメニューである。選択ウインドウSWaは、選択肢として、口の複数個のスタイル画像データSDによって示される複数個のスタイル画像Sm1、Sm2が表示される。なお、各選択ウインドウ内のスタイル画像は、この時点では、表示されておらず、後述するS335にて表示される。 The selection windows SWb and SWc are selection windows for inputting selection instructions for eye and nose style images, and have the same menus as the selection windows SWb and SWc in FIGS. 5(B) and 5(C) of the first embodiment. It is. In the selection window SWa, a plurality of style images Sm1 and Sm2 indicated by a plurality of style image data SD of the mouth are displayed as options. Note that the style images in each selection window are not displayed at this point, but will be displayed in S335, which will be described later.
スライドバーSBa~SBcは、図5(B)、(C)のスライドバーSBb、SBcと同様に、口、目、鼻のスタイル変換の強度を入力するためのスライドバーである。 Slide bars SBa to SBc are slide bars for inputting the strength of style conversion of the mouth, eyes, and nose, similar to slide bars SBb and SBc in FIGS. 5(B) and 5(C).
チェックボックスCBaは、後述する白目処理を実行するか否かを指定するためのチェックボックスである。チェックボックスCBbは、歯列用の生成ネットワークGN6を用いた歯列の矯正を行うか否かを指定するためのチェックボックスである。 The check box CBa is a check box for specifying whether or not to perform white eye processing, which will be described later. The check box CBb is a check box for specifying whether or not to correct the dentition using the generation network GN6 for the dentition.
図7のS315では、図3のS115と同様に、CPU210は、入力画像データをサーバ100に送信する。
In S315 of FIG. 7, the
サーバ100が端末装置200から送信される入力画像データを受信すると、サーバ100のCPU210は、スタイル変換処理を用いた前処理サービスを提供する処理を開始する。図9は、第2実施例のサーバ100が実行する処理のフローチャートである。図9のS405に示すように、サーバ100のCPU110は、第1実施例と同様に、端末装置200とデータの遣り取りを行いながら図6のS205~S220の処理を実行する。
When the
図6のS205では、サーバ100のCPU110は、サーバ100が端末装置200から送信される入力画像データを受信する。S210では、CPU110は、入力画像データに対して所定の領域特定処理を実行して、入力画像Iinの顔FCに含まれる複数個の部位、すなわち、右目、左目、鼻、口の領域Per、Pel、Pn、Pmを特定する。S212では、CPU110は、複数個の部位の領域Per、Pel、Pn、Pmを示す領域情報を端末装置200に送信する。
In S205 of FIG. 6, the
図7のS320では、図3の120と同様に、端末装置200のCPU210は、サーバ100から送信される領域情報を受信し、該領域情報を用いて、複数個の部位の領域Per、Pel、Pn、Pmの特定結果を表示装置250に表示する。図7のS325では、図3のS125と同様に、CPU210は、ユーザによって選択された性別と人種の情報をサーバ100に送信する。
In S320 of FIG. 7, similarly to 120 of FIG. The identification results of Pn and Pm are displayed on the
図6のS215では、サーバ100のCPU110は、端末装置200から送信される性別および人種の情報を受信する。S220では、CPU110は、受信された情報によって示される性別および人種に応じたスタイル画像データSDと肌色データとを、端末装置200に送信する。
In S215 of FIG. 6, the
図7のS330では、端末装置200のCPU210は、サーバ100から送信されるスタイル画像データSDと肌色データとを受信する。図7のS335では、受信されたスタイル画像データSDによって示される口、目、鼻のスタイル画像SIm1、SIm2、SIe1、SIe2、SIn1、SIn2を、対応する選択ウインドウSWa、SWb、SWcに表示する(図8)。
In S330 of FIG. 7, the
図7のS340では、CPU210は、選択画面UDにて選択された変換処理のための情報をサーバ100に送信する。ユーザは、図8の選択ウインドウSWa~SWd、スライドバーSBa~SBcを介して、顔の各部位について用いるべきスタイル画像、各部位のスタイル変換の強度、出力画像の顔が有すべき肌色の選択指示を入力する。ユーザは、チェックボックスCBa、CBbを介して、白目処理を実行するか否かと、歯列の矯正を実行するか否かと、の選択指示を入力する。ユーザは、プルダウンメニューPM3を介して、表情の変更を行うか否かと、表情の変更を行う場合における変更後の表情の種類と、の選択指示を入力する。ただし、白目処理を実行することの選択指示が入力された場合には、目のスタイル画像の選択ウインドウSWbは無効とされる。すなわち、白目処理を実行することの選択指示と目のスタイル画像の選択指示とのうち、一方の指示のみが有効となる。後述するように、サーバ100において、白目処理と目のスタイル変換処理とのうちの一方のみが実行可能であるためである。その後、ユーザは、選択指示が入力された状態で、前処理の実行を指示するためのボタンBT3を押下する。CPU210は、ボタンBT2が押下された時点で入力されている選択指示に対応する情報をサーバ100に送信する。
In S340 of FIG. 7, the
図9のS410では、サーバ100のCPU110は、変換処理のための情報を端末装置200から受信する。
In S410 of FIG. 9, the
図9のS415では、CPU110は、S410にて受信された情報に基づいて、白目処理を実行することが選択されたか否かを判断する。白目処理を実行することが選択された場合には(S415:YES)、S420にて、CPU110は、入力画像データに対して、白目処理を実行する。白目処理は、目の領域Per、Pelにおいて、目を示す画像の白目の部分を、見栄えの良い特定の白色で塗りつぶす処理である。例えば、CPU110は、白目の部分に対応する画素の値を、白を示す特定の値(例えば、(255、255、255)のRGB値)に変換する。例えば、白および白に近似する色を示す所定範囲の値有する画素が、白目の部分に対応する画素として特定される。これによって、例えば、入力画像Iinにおける白目の濁りが低減されて、刺繍模様にて表現される人物の顔の目の見栄えが向上する。白目処理は、機械学習モデルを用いずに目の部分画像PIer、PIelの少なくとも一部の色を変換する処理である、と言うことができる。
In S415 of FIG. 9, the
図9のS425では、CPU110は、目の領域Per、Pelをスタイル変換の対象領域から除外する。白目処理が実行された後にスタイル変換処理が行われると、スタイル変換処理後の画像に白目の濁りが現れる場合があり、白目処理の効果が低下するためである。
In S425 of FIG. 9, the
白目処理を実行することが選択されない場合には(S415:NO)、CPU110は、S420、S425をスキップして、S430に処理を進める。
If executing the white eye processing is not selected (S415: NO), the
図9のS430では、CPU110は、入力画像Iinにて特定される顔の部位(目、鼻、口)の領域のうち、スタイル変換処理の対象とすべき対象領域から、注目領域を選択する。目の領域が対象領域から除外されている場合には、対象領域は、口と鼻の領域Pn、Pmであり、目の領域が対象領域から除外されていない場合には、対象領域は、目と口と鼻の領域Per、Pel、Pn、Pmである。
In S430 of FIG. 9, the
図9のS435では、CPU110は、S410にて受信された情報に基づいて、不揮発性記憶装置130に格納されたスタイル画像データ群SDG(図1)から、注目領域のスタイル変換処理において、用いるべきスタイル画像データSDを取得する。
In S435 of FIG. 9, the
図9のS440では、CPU110は、図6のS230と同様に、注目領域のスタイル変換処理を実行する。S442では、図6のS232と同様に、CPU110は、入力画像データのうちの注目領域に対応する部分画像データを変換済データに置換することによって、中間画像を示す中間画像データを生成する。
In S440 of FIG. 9, the
図9のS445では、CPU110は、全ての対象領域について処理されたか否かを判断する。未処理の領域がある場合には(S445:NO)、S430に処理が戻される。全ての対象領域について処理された場合には(S445:YES)、S450に処理が進められる。
In S445 of FIG. 9, the
図9のS450では、CPU110は、図6のS250と同様に、入力画像データに対して肌色補正を実行して、補正済みの入力画像データを生成する。図9のS455では、CPU110は、図6のS255と同様に、中間画像データに対して、顔の全体のスタイル変換処理を実行して、出力画像データを生成する。
In S450 of FIG. 9,
図9のS460では、CPU110は、S410にて受信された情報に基づいて、表情の変更を実行することが選択されたか否かを判断する。表情の変更を実行することが選択された場合には(S460:YES)、S420にて、CPU110は、出力画像データに対して、さらに、表情を変更するためのスタイル変換処理を実行する。例えば、CPU110は、S410にて受信された情報に基づいて、変更後の表情の種類(例えば、歯を見せない笑顔、真顔)を決定して、変更後の表情の種類を示すラベルデータを生成する。CPU110は、出力画像データとラベルデータとを、表情用の生成ネットワークGN5に入力することによって、表情が変更された人物の顔を含む出力画像(図示省略)を示す出力画像データを生成する。
In S460 of FIG. 9,
表情の変更を実行することが選択されない場合には(S460:NO)、CPU110は、S465をスキップして、S470に処理を進める。
If it is not selected to change the facial expression (S460: NO), the
図9のS470では、CPU110は、S410にて受信された情報に基づいて、歯列の矯正を実行することが選択されたか否かを判断する。表情の変更を実行することが選択された場合には(S470:YES)、図9のS475にて、CPU110は、歯列を矯正するためのスタイル変換処理を実行する。例えば、CPU110は、出力画像データをコンテンツ画像データCDとし、予め用意された歯列が矯正された人物の顔を示す画像データをスタイル画像データSDとして、歯列用の生成ネットワークGN6に入力することによって、歯列が矯正された人物の顔を含む出力画像(図示省略)を示す出力画像データを生成する。
In S470 of FIG. 9,
歯列の矯正を実行することが選択されない場合には(S470:NO)、CPU110は、S475をスキップして、S480に処理を進める。
If it is not selected to perform tooth alignment correction (S470: NO), the
表情の変更も歯列の矯正も実行されない場合には、S455にて生成された出力画像データが、最終的な出力画像データである。表情の変更が実行され、歯列の矯正が実行されない場合には、S465にて生成された出力画像データが、最終的な出力画像データである。歯列の矯正が実行される場合には、S475にて生成された出力画像データが、最終的な出力画像データである。 If neither facial expression change nor tooth alignment correction is performed, the output image data generated in S455 is the final output image data. If the facial expression is changed and the tooth alignment is not corrected, the output image data generated in S465 is the final output image data. When correction of tooth alignment is performed, the output image data generated in S475 is the final output image data.
図9のS480では、CPU110は、最終的な出力画像データを端末装置200に送信して、処理を終了する。
In S480 of FIG. 9, the
図7のS345では、端末装置200のCPU210は、端末装置200から送信される出力画像データを受信する。S350では、CPU210は、出力画像データを用いて、出力画像を表示装置250に表示する。具体的には、図8の選択画面UDの入力画像Iinに代えて、出力画像を表示する。ユーザは、選択画面UDにて、出力画像を確認して、出力画像に満足した場合には出力ボタンBT4を押下する。ユーザは、出力画像の生成を再度やり直す場合には、選択画面UDにおいて、選択指示の入力内容を適宜に変更して、前処理ボタンBT3を押下する。
In S345 of FIG. 7, the
図9のS355では、CPU210は、出力ボタンBT4が押下されたか、前処理ボタンBT3が押下されたか、を判断する。出力ボタンBT4が押下された場合には(S355:YES)、CPU210は、S360に処理を進める。前処理ボタンBT3が押下された場合には(S355:NO)、CPU210は、S340に戻る。
In S355 of FIG. 9, the
S360では、CPU210は、出力画像データを用いて刺繍データに変換する。刺繍データは、刺繍模様を表すデータであり、例えば、刺繍模様の縫目を形成するための針落点の座標と、縫い順と、使用すべき糸の色と、を縫目ごとに示すデータである。出力画像データを刺繍データに変換する処理には、公知の処理、例えば、特開2019-41834号に開示された処理が用いられる。
In S360, the
S365では、CPU210は、刺繍データをミシン300に送信する。ミシン300は、刺繍データを受信すると、刺繍データを用いて、布に刺繍模様を縫製する。
In S365,
以上説明した第2実施例によれば、出力画像データを生成する際に、第1実施例と同様に柔軟なスタイル変換処理を実現できる。この結果、例えば、ユーザの好みに応じた柔軟な前処理が行われた出力画像データを生成できる。したがって、例えば、ユーザが一般的な画像加工プログラムを用いて前処理を行う技術を有していなくても、ユーザの好みに応じた多様な刺繍模様を布に印刷することができる。 According to the second embodiment described above, when generating output image data, flexible style conversion processing can be realized as in the first embodiment. As a result, it is possible to generate output image data that has undergone flexible preprocessing according to the user's preferences, for example. Therefore, for example, even if the user does not have the skills to perform preprocessing using a general image processing program, various embroidery patterns according to the user's preferences can be printed on cloth.
例えば、第2実施例によれば、特定の後処理として、人物の顔の表情を変更するスタイル変換処理(図9のS465)が実行される。この結果、人物の顔の表情の変更を含む柔軟なスタイル変換を実現することができる。例えば、ユーザは1個の入力画像データを用意するだけで、様々な表情を有する顔を示す出力画像データをシステム1000に生成させることができ、ひいては、様々な表情を有する顔の刺繍模様をミシン300に縫製させることができる。
For example, according to the second embodiment, a style conversion process (S465 in FIG. 9) for changing the expression of a person's face is executed as a specific post-process. As a result, flexible style conversion including changing the expression of a person's face can be realized. For example, by simply preparing one piece of input image data, the user can have the
さらに、第2実施例によれば、CPU110は、目の部分画像PIer、PIelを示す部分画像データに対して実行すべき処理を、白目処理とスタイル変換処理とから選択する(図9のS415)。CPU210は、スタイル変換処理が選択される場合に、白目処理を実行せずに、スタイル変換処理を実行し、白目処理が選択される場合に、スタイル変換処理を実行せずに、白目処理を実行する。この結果、目の部分画像データに対する処理として、機械学習モデルを用いたスタイル変換処理と、機械学習モデルを用いない白目処理と、が使い分けられるので、処理の柔軟性を向上できる。例えば、ユーザは、目に対する処理として、スタイル変換処理よりも単純な白目処理を好む場合もあるが、本実施例では、このようなユーザのニーズにも応えることができる。
Further, according to the second embodiment, the
さらに、第2実施例によれば、口を示す画像において歯列を矯正するスタイル変換処理が実行される(図9のS475)。この結果、歯列が矯正された画像を示す出力画像データを容易に生成することができる。 Furthermore, according to the second embodiment, style conversion processing for correcting the tooth alignment in the image showing the mouth is executed (S475 in FIG. 9). As a result, output image data showing an image with corrected tooth alignment can be easily generated.
B.変形例:
(1)上記各実施例では、入力画像Iinに含まれる人物の人種と性別に応じて異なるスタイル画像データSDが用いられる。これに限らず、例えば、入力画像Iinに含まれる人物の表情(例えば、怒り、笑い、真顔)や、顔の角度(例えば、正面、側面、斜め)に応じて異なるスタイル画像データSDが用いられても良い。また、上記実施例では、これらの入力画像Iinの種類は、ユーザの選択指示に基づいて特定されているが、例えば、画像認識処理、例えば、上述したyoloと呼ばれる画像認識アルゴリズムを用いて特定されても良い。
B. Variant:
(1) In each of the above embodiments, different style image data SD are used depending on the race and gender of the person included in the input image Iin. For example, different style image data SD may be used depending on the facial expression (e.g., angry, laughing, straight face) or the angle of the face (e.g., front, side, diagonal) included in the input image Iin. It's okay. Further, in the above embodiment, the type of these input images Iin is specified based on the user's selection instruction, but it may also be specified using an image recognition process, for example, the above-mentioned image recognition algorithm called yolo. It's okay.
(2)上記各実施例では、部位ごとのスタイル変換処理(図6のS230、図9のS440)の対象の部位は、目、鼻、口である。これに限らず、対象の部位は、頭(頭髪)、耳、ほほ、顎などの他の部位であっても良い。 (2) In each of the above embodiments, the target parts of the style conversion process for each part (S230 in FIG. 6, S440 in FIG. 9) are the eyes, nose, and mouth. The target site is not limited to this, and may be other sites such as the head (hair), ears, cheeks, and chin.
(3)上記各実施例では、入力画像Iinは、人物の顔FCを含む画像に限らず、他の画像であっても良い。例えば、入力画像Iinは、風景、動物、建物を含み、人物を含まない画像であっても良い。いずれの画像が入力画像として用いられる場合であっても、その画像の一部である第1部分画像と、第1部分画像とは異なる位置にある第2部分画像と、で互いに異なるスタイル変換処理が実行されることが好ましい。 (3) In each of the above embodiments, the input image Iin is not limited to an image including a person's face FC, but may be another image. For example, the input image Iin may be an image that includes landscapes, animals, and buildings, but does not include people. Regardless of which image is used as the input image, the first partial image that is part of the image and the second partial image located at a different position from the first partial image undergo different style conversion processing. is preferably performed.
(4)上記各実施例で用いられる生成ネットワーク(機械学習モデル)は一例であり、これに限られない。例えば、目、鼻、口で共通の生成ネットワークが用いられても良い。また、例えば、トレーニング時に用いられたスタイル画像が有する1種類のスタイルのみに変換可能である生成ネットワークが用いられても良い。この場合には、例えば、1つの部位(例えば、鼻)のスタイル変換のために、選択可能なスタイル画像の個数分の生成ネットワークが用意され、選択されたスタイル画像に応じて使い分けられても良い。 (4) The generative network (machine learning model) used in each of the above embodiments is an example, and is not limited to this. For example, a common generation network may be used for eyes, nose, and mouth. Furthermore, for example, a generation network may be used that is capable of converting style images used during training into only one type of style. In this case, for example, generation networks for the number of selectable style images may be prepared for style conversion of one part (e.g., nose), and used depending on the selected style image. .
(5)上記各実施例では、スタイル画像データSDは、サーバ100に格納されたスタイル画像データ群SDGから選択される。これに代えて、スタイル画像データSDは、ユーザによって用意された画像データであっても良い。この場合には、ユーザは、用意したスタイル画像データSDを端末装置200に入力する。入力されたスタイル画像データSDは、端末装置200からサーバ100に送信され、サーバ100においてスタイル変換処理に用いられる。
(5) In each of the above embodiments, the style image data SD is selected from the style image data group SDG stored in the
(6)上記各実施例では、CPU110は、ユーザによって選択されたスタイル画像データSDを取得し(例えば、図6のS227)、該スタイル画像データSDを生成ネットワークに入力してスタイル変換処理を実行している(例えば、図6のS230)。これに代えて、予め複数個のスタイル画像データSDを、それぞれ、生成ネットワークGNのエンコーダECに入力して、複数個の特徴データを生成しておいても良い。この場合には、ユーザによって選択されたスタイル画像データSDに対応する特徴データを取得し、該特徴データを用いてスタイル変換処理を実行しても良い。
(6) In each of the above embodiments, the
(7)上記各実施例では、特定の後処理として、顔の全体のスタイル変換処理(例えば、図6のS255)を実行することによって、図4(C)の中間画像Imbに現れるスジBLを軽減している。これに代えて、他の処理、例えば、フィルタを用いた平滑化処理をスジBLの部分の画素に対して実行しても良い。一般的には、スジBLを構成する部分、例えば、図4(C)の変換済部分画像TIerと、変換済部分画像TIerに隣接する部分との間における画素値の差と、を軽減する処理が実行されることが好ましい。 (7) In each of the above embodiments, the streaks BL appearing in the intermediate image Imb of FIG. 4(C) are removed by executing style conversion processing for the entire face (for example, S255 in FIG. 6) as specific post-processing. It is being reduced. Instead of this, other processing, for example, smoothing processing using a filter, may be performed on the pixels of the streak BL portion. Generally, processing is performed to reduce the difference in pixel values between a portion constituting the streak BL, for example, a converted partial image TIer in FIG. 4(C) and a portion adjacent to the converted partial image TIer. is preferably performed.
(8)上記各実施例の処理は、一例であり、適宜に省略や追加などの変更が行われ得る。例えば、図9のS420の白目処理、S460のスタイル変換処理、S475のスタイル変換処理の全部または一部は省略されても良い。また、これらの処理は、第1実施例の図6の処理の中で適宜に実行されても良い。図6または図9において、顔の全体のスタイル変換処理(図6のS255、図9のS455)は、省略されても良い。また、スタイル変換の強度のパラメータαは、固定値とされても良いし、各領域のスタイル変換において共通の値が用いられても良い。 (8) The processing in each of the above embodiments is merely an example, and may be omitted, added, or otherwise modified as appropriate. For example, all or part of the white eye processing in S420, the style conversion process in S460, and the style conversion process in S475 in FIG. 9 may be omitted. Further, these processes may be executed as appropriate during the process shown in FIG. 6 of the first embodiment. In FIG. 6 or 9, the entire face style conversion process (S255 in FIG. 6, S455 in FIG. 9) may be omitted. Further, the style conversion strength parameter α may be a fixed value, or a common value may be used in the style conversion of each region.
(9)上記各実施例のサーバ100が実行する処理の全部または一部は、端末装置200によって実行されても良い。例えば、図6のS210の顔の部位の領域の特定は、端末装置200のCPU210によって実行されても良い。また、図6のS230にて生成された各部位の領域に対応する変換済データは、端末装置200に送信され、端末装置200において入力画像データと変換済データとを用いて、中間画像データ、あるいは、最終的な出力画像データが生成されても良い。
(9) All or part of the processing executed by the
(10)図1のサーバ100や端末装置200のハードウェア構成は、一例であり、これに限られない。例えば、各実施例の処理を行うサーバ100や端末装置200のプロセッサは、CPUに限らず、GPU(Graphics Processing Unit)やASIC(application specific integrated circuit)、あるいは、これらとCPUとの組み合わせであっても良い。また、サーバ100は、ネットワークを介して互いに通信可能な複数個の計算機(例えば、いわゆるクラウドサーバ)であっても良い。
(10) The hardware configurations of the
(11)上記各実施例において、ハードウェアによって実現されていた構成の一部をソフトウェアに置き換えるようにしてもよく、逆に、ソフトウェアによって実現されていた構成の一部あるいは全部をハードウェアに置き換えるようにしてもよい。例えば、生成ネットワークGN1~GN6は、プログラムモジュールに代えて、ASIC(Application Specific Integrated Circuit)等のハードウェア回路によって実現されてよい。 (11) In each of the above embodiments, part of the configuration realized by hardware may be replaced with software, or conversely, part or all of the configuration realized by software may be replaced by hardware. You can do it like this. For example, the generation networks GN1 to GN6 may be realized by a hardware circuit such as an ASIC (Application Specific Integrated Circuit) instead of a program module.
以上、実施例、変形例に基づき本発明について説明してきたが、上記した発明の実施の形態は、本発明の理解を容易にするためのものであり、本発明を限定するものではない。本発明は、その趣旨並びに特許請求の範囲を逸脱することなく、変更、改良され得ると共に、本発明にはその等価物が含まれる。 Although the present invention has been described above based on examples and modifications, the embodiments of the invention described above are for facilitating understanding of the present invention, and are not intended to limit the present invention. The present invention may be modified and improved without departing from the spirit and scope of the claims, and the present invention includes equivalents thereof.
100…サーバ,1000…システム,110…CPU,120…揮発性記憶装置,130…不揮発性記憶装置,160…通信インタフェース,200…端末装置,210…CPU,220…不揮発性記憶装置,230…揮発性記憶装置,240…操作部,250…表示装置,260…通信インタフェース,300…ミシン,CC…特徴結合部,CD…コンテンツ画像データ,DC…デコーダ,EC…エンコーダ,GN1~GN6…生成ネットワーク,GNG…生成ネットワーク群,IT…インターネット,Ic…補正済画像,Iin…入力画像,Ima,Imb…中間画像,Iout…出力画像,NW…無線ネットワーク,PGs,PGt…コンピュータプログラム,SD…スタイル画像データ,SDG…スタイル画像データ群,TD…変換済画像データ 100...Server, 1000...System, 110...CPU, 120...Volatile storage device, 130...Nonvolatile storage device, 160...Communication interface, 200...Terminal device, 210...CPU, 220...Nonvolatile storage device, 230...Volatile 240...operation unit, 250...display device, 260...communication interface, 300...sewing machine, CC...characteristic combination unit, CD...content image data, DC...decoder, EC...encoder, GN1 to GN6...generation network, GNG...Generation network group, IT...Internet, Ic...Corrected image, Iin...Input image, Ima, Imb...Intermediate image, Iout...Output image, NW...Wireless network, PGs, PGt...Computer program, SD...Style image data ,SDG...style image data group,TD...converted image data
Claims (24)
前記入力画像データを用いて、前記入力画像の一部である第1入力部分画像と、前記入力画像の一部であって前記第1入力部分画像とは異なる位置にある第2入力部分画像と、を特定する部分画像特定工程と、
前記第1入力部分画像を示す第1部分画像データに対して、機械学習モデルを用いた第1スタイル変換処理を実行して、第1変換済部分画像を示す第1変換済データを生成する第1変換工程と、
前記第2入力部分画像を示す第2部分画像データに対して、機械学習モデルを用いた第2スタイル変換処理であって前記第1スタイル変換処理とは異なる前記第2スタイル変換処理を実行して、第2変換済部分画像を示す第2変換済データを生成する第2変換工程と、
前記第1変換済データと前記第2変換済データとを用いて、前記第1変換済部分画像と前記第2変換済部分画像とを含む中間画像を示す中間画像データを生成する第1工程と、前記中間画像データに対して特定の後処理を実行して、前記入力画像に基づく出力画像を示す出力画像データを生成する第2工程と、を含む出力画像生成工程であって、前記出力画像は前記第1入力部分画像に対応する第1出力部分画像と前記第2入力部分画像に対応する第2出力部分画像とを含み、前記第1出力部分画像は前記第1変換済部分画像に基づく画像であり、前記第2出力部分画像は前記第2変換済部分画像に基づく画像である、前記出力画像生成工程と、
を備え、
前記特定の後処理は、機械学習モデルを用いた第3スタイル変換処理であって前記第1スタイル変換処理および前記第2スタイル変換処理とは異なる前記第3スタイル変換処理を含み、
前記第3スタイル変換処理は、前記入力画像データをスタイル画像データとして用いて実行される、画像生成方法。 an image acquisition step of acquiring input image data indicating the input image;
Using the input image data, a first input partial image that is a part of the input image, and a second input partial image that is a part of the input image and located at a different position from the first input partial image. a partial image identification step for identifying ,
A first style conversion process using a machine learning model is performed on the first partial image data representing the first input partial image to generate first converted data representing the first converted partial image. 1 conversion step;
performing the second style conversion process, which is a second style conversion process using a machine learning model and which is different from the first style conversion process, on second partial image data indicating the second input partial image; , a second conversion step of generating second converted data indicating the second converted partial image;
a first step of generating intermediate image data representing an intermediate image including the first converted partial image and the second converted partial image using the first converted data and the second converted data; , a second step of performing specific post-processing on the intermediate image data to generate output image data representing an output image based on the input image, the output image generating step comprising: includes a first output partial image corresponding to the first input partial image and a second output partial image corresponding to the second input partial image, the first output partial image being based on the first transformed partial image. the output image generating step, wherein the second output partial image is an image based on the second converted partial image;
Equipped with
The specific post-processing includes the third style conversion process that is a third style conversion process using a machine learning model and is different from the first style conversion process and the second style conversion process,
The third style conversion process is performed using the input image data as style image data .
前記入力画像は、人物の顔を示す画像を含み、
前記特定の後処理は、前記入力画像データに対して、前記人物の顔の肌色を補正する処理を実行して、補正済みの前記入力画像データを生成する処理を含み、
前記第3スタイル変換処理は、補正済みの前記入力画像データをスタイル画像データとして用いて実行される、画像生成方法。 The image generation method according to claim 1 ,
The input image includes an image showing a person's face,
The specific post-processing includes processing for correcting the skin color of the person's face on the input image data to generate the corrected input image data,
The third style conversion process is performed using the corrected input image data as style image data.
前記入力画像データを用いて、前記入力画像の一部である第1入力部分画像と、前記入力画像の一部であって前記第1入力部分画像とは異なる位置にある第2入力部分画像と、を特定する部分画像特定工程と、
前記第1入力部分画像を示す第1部分画像データに対して、機械学習モデルを用いた第1スタイル変換処理を実行して、第1変換済部分画像を示す第1変換済データを生成する第1変換工程と、
前記第2入力部分画像を示す第2部分画像データに対して、機械学習モデルを用いた第2スタイル変換処理であって前記第1スタイル変換処理とは異なる前記第2スタイル変換処理を実行して、第2変換済部分画像を示す第2変換済データを生成する第2変換工程と、
前記第1変換済データと前記第2変換済データとを用いて、前記第1変換済部分画像と前記第2変換済部分画像とを含む中間画像を示す中間画像データを生成する第1工程と、前記中間画像データに対して特定の後処理を実行して、前記入力画像に基づく出力画像を示す出力画像データを生成する第2工程と、を含む出力画像生成工程であって、前記出力画像は前記第1入力部分画像に対応する第1出力部分画像と前記第2入力部分画像に対応する第2出力部分画像とを含み、前記第1出力部分画像は前記第1変換済部分画像に基づく画像であり、前記第2出力部分画像は前記第2変換済部分画像に基づく画像である、前記出力画像生成工程と、
を備え、
前記特定の後処理は、機械学習モデルを用いた第4スタイル変換処理であって前記第1スタイル変換処理および前記第2スタイル変換処理とは異なる前記第4スタイル変換処理を含み、
前記入力画像は、人物の顔を示す画像を含み、
前記第4スタイル変換処理は、前記人物の顔の表情を変更する処理である、画像生成方法。 an image acquisition step of acquiring input image data indicating the input image;
Using the input image data, a first input partial image that is a part of the input image, and a second input partial image that is a part of the input image and located at a different position from the first input partial image. a partial image identification step for identifying ,
A first style conversion process using a machine learning model is performed on the first partial image data representing the first input partial image to generate first converted data representing the first converted partial image. 1 conversion step;
performing the second style conversion process, which is a second style conversion process using a machine learning model and which is different from the first style conversion process, on second partial image data indicating the second input partial image; , a second conversion step of generating second converted data indicating the second converted partial image;
a first step of generating intermediate image data representing an intermediate image including the first converted partial image and the second converted partial image using the first converted data and the second converted data; , a second step of performing specific post-processing on the intermediate image data to generate output image data representing an output image based on the input image, the output image generating step comprising: includes a first output partial image corresponding to the first input partial image and a second output partial image corresponding to the second input partial image, the first output partial image being based on the first transformed partial image. the output image generating step, wherein the second output partial image is an image based on the second converted partial image;
Equipped with
The specific post-processing includes the fourth style conversion process that is a fourth style conversion process using a machine learning model and is different from the first style conversion process and the second style conversion process,
The input image includes an image showing a person's face,
In the image generation method, the fourth style conversion process is a process of changing the facial expression of the person .
前記特定の後処理は、前記中間画像において、前記第1変換済部分画像と前記第1変換済部分画像に隣接する部分との間における画素値の差と、前記第2変換済部分画像と前記第2変換済部分画像に隣接する部分との間における画素値の差と、をそれぞれ低減する処理を含む、画像生成方法。 The image generation method according to any one of claims 1 to 3,
The specific post-processing includes determining, in the intermediate image, the difference in pixel values between the first converted partial image and a portion adjacent to the first converted partial image, and the difference between the second converted partial image and the portion adjacent to the first converted partial image. An image generation method comprising: reducing a difference in pixel values between a second converted partial image and an adjacent portion.
前記入力画像データを用いて、前記入力画像の一部である第1入力部分画像と、前記入力画像の一部であって前記第1入力部分画像とは異なる位置にある第2入力部分画像と、を特定する部分画像特定工程と、
前記第1入力部分画像を示す第1部分画像データに対して、機械学習モデルを用いた第1スタイル変換処理を実行して、第1変換済部分画像を示す第1変換済データを生成する第1変換工程であって、前記第1スタイル変換処理は、前記第1入力部分画像と、生成すべき前記第1変換済部分画像と、の間の差異の程度を指定する第1パラメータを用いて実行される、前記第1変換工程と、
前記第2入力部分画像を示す第2部分画像データに対して、機械学習モデルを用いた第2スタイル変換処理であって前記第1スタイル変換処理とは異なる前記第2スタイル変換処理を実行して、第2変換済部分画像を示す第2変換済データを生成する第2変換工程であって、前記第2スタイル変換処理は、前記第2入力部分画像と、生成すべき前記第2変換済部分画像と、の間の差異の程度を指定する第2パラメータを用いて実行され、前記第2パラメータは、前記第1パラメータとは独立して調整される、前記第2変換工程と、
第1変換済データと前記第2変換済データとを用いて、前記入力画像に基づく出力画像を示す出力画像データを生成する出力画像生成工程であって、前記出力画像は前記第1入力部分画像に対応する第1出力部分画像と前記第2入力部分画像に対応する第2出力部分画像とを含み、前記第1出力部分画像は前記第1変換済部分画像に基づく画像であり、前記第2出力部分画像は前記第2変換済部分画像に基づく画像である、前記出力画像生成工程と、
を備える画像生成方法。 an image acquisition step of acquiring input image data indicating the input image;
Using the input image data, a first input partial image that is a part of the input image, and a second input partial image that is a part of the input image and located at a different position from the first input partial image. a partial image identification step for identifying ,
A first style conversion process using a machine learning model is performed on the first partial image data representing the first input partial image to generate first converted data representing the first converted partial image . 1 conversion step, the first style conversion process uses a first parameter that specifies the degree of difference between the first input partial image and the first converted partial image to be generated. the first conversion step being performed ;
performing the second style conversion process, which is a second style conversion process using a machine learning model and which is different from the first style conversion process, on second partial image data indicating the second input partial image; , a second conversion step of generating second converted data indicating a second converted partial image, wherein the second style conversion process includes the second input partial image and the second converted portion to be generated. the second transformation step is performed using a second parameter specifying the degree of difference between the images, the second parameter being adjusted independently of the first parameter;
an output image generation step of generating output image data representing an output image based on the input image using the first converted data and the second converted data, the output image being the first input partial image; a first output partial image corresponding to the first output partial image and a second output partial image corresponding to the second input partial image, the first output partial image being an image based on the first converted partial image; the output image generation step, wherein the output partial image is an image based on the second converted partial image;
An image generation method comprising:
前記入力画像データを用いて、前記入力画像の一部である第1入力部分画像と、前記入力画像の一部であって前記第1入力部分画像とは異なる位置にある第2入力部分画像と、を特定する部分画像特定工程と、
前記第1入力部分画像を示す第1部分画像データに対して実行すべき処理を選択する処理選択工程と、
前記第1部分画像データに対して、機械学習モデルを用いた第1スタイル変換処理を実行して、第1変換済部分画像を示す第1変換済データを生成する第1変換工程と、
前記第1部分画像データに対して、機械学習モデルを用いずに前記第1入力部分画像の少なくとも一部の色を変換する色変換処理を実行する色変換工程と、
前記第2入力部分画像を示す第2部分画像データに対して、機械学習モデルを用いた第2スタイル変換処理であって前記第1スタイル変換処理とは異なる前記第2スタイル変換処理を実行して、第2変換済部分画像を示す第2変換済データを生成する第2変換工程と、
第1変換済データと前記第2変換済データとを用いて、前記入力画像に基づく出力画像を示す出力画像データを生成する出力画像生成工程であって、前記出力画像は前記第1入力部分画像に対応する第1出力部分画像と前記第2入力部分画像に対応する第2出力部分画像とを含み、前記第1出力部分画像は前記第1変換済部分画像に基づく画像であり、前記第2出力部分画像は前記第2変換済部分画像に基づく画像である、前記出力画像生成工程と、
を備え、
前記処理選択工程にて前記第1スタイル変換処理が選択される場合に、前記色変換工程を実行せずに、前記第1変換工程が実行され、
前記処理選択工程にて前記色変換処理が選択される場合に、前記第1変換工程を実行せずに、前記色変換工程が実行される、画像生成方法。 an image acquisition step of acquiring input image data indicating the input image;
Using the input image data, a first input partial image that is a part of the input image, and a second input partial image that is a part of the input image and located at a different position from the first input partial image. a partial image identification step for identifying ,
a process selection step of selecting a process to be performed on first partial image data indicating the first input partial image;
a first conversion step of performing a first style conversion process using a machine learning model on the first partial image data to generate first converted data indicating the first converted partial image;
a color conversion step of performing a color conversion process on the first partial image data to convert at least a part of the color of the first input partial image without using a machine learning model;
performing the second style conversion process, which is a second style conversion process using a machine learning model and which is different from the first style conversion process, on second partial image data indicating the second input partial image; , a second conversion step of generating second converted data indicating the second converted partial image;
an output image generation step of generating output image data representing an output image based on the input image using the first converted data and the second converted data, the output image being the first input partial image; a first output partial image corresponding to the first output partial image and a second output partial image corresponding to the second input partial image, the first output partial image being an image based on the first converted partial image; the output image generation step, wherein the output partial image is an image based on the second converted partial image;
Equipped with
When the first style conversion process is selected in the process selection step, the first conversion process is executed without executing the color conversion process,
An image generation method , wherein when the color conversion process is selected in the process selection step, the color conversion process is executed without executing the first conversion process .
前記入力画像は、人物の顔を示す画像を含み、
前記第1入力部分画像は、前記人物の目を示す画像であり、
前記色変換処理は、前記目を示す画像の白目の部分に対応する画素の値を、白を示す特定の値に変換する処理である、画像生成方法。 The image generation method according to claim 6 ,
The input image includes an image showing a person's face,
The first input partial image is an image showing the eyes of the person,
In the image generation method, the color conversion process is a process of converting a value of a pixel corresponding to the white part of the eye in the image showing the eye to a specific value indicating white.
前記入力画像データを用いて、前記入力画像の一部である第1入力部分画像と、前記入力画像の一部であって前記第1入力部分画像とは異なる位置にある第2入力部分画像と、を特定する部分画像特定工程と、
ユーザによる第1の入力に基づいて、機械学習モデルを用いた第1スタイル変換処理のための第1入力情報を取得し、ユーザによる第2の入力に基づいて、機械学習モデルを用いた第2スタイル変換処理であって前記第1スタイル変換処理とは異なる前記第2スタイル変換処理のための第2入力情報を取得する情報取得工程と、
前記第1入力部分画像を示す第1部分画像データに対して、前記第1入力情報を用いて前記第1スタイル変換処理を実行して、第1変換済部分画像を示す第1変換済データを生成する第1変換工程と、
前記第2入力部分画像を示す第2部分画像データに対して、前記第2入力情報を用いて前記第2スタイル変換処理を実行して、第2変換済部分画像を示す第2変換済データを生成する第2変換工程と、
第1変換済データと前記第2変換済データとを用いて、前記入力画像に基づく出力画像を示す出力画像データを生成する出力画像生成工程であって、前記出力画像は前記第1入力部分画像に対応する第1出力部分画像と前記第2入力部分画像に対応する第2出力部分画像とを含み、前記第1出力部分画像は前記第1変換済部分画像に基づく画像であり、前記第2出力部分画像は前記第2変換済部分画像に基づく画像である、前記出力画像生成工程と、
を備える画像生成方法。 an image acquisition step of acquiring input image data indicating the input image;
Using the input image data, a first input partial image that is a part of the input image, and a second input partial image that is a part of the input image and located at a different position from the first input partial image. a partial image identification step for identifying ,
Based on the first input by the user, first input information for the first style conversion process using the machine learning model is acquired, and based on the second input by the user, the second style conversion process using the machine learning model is acquired. an information acquisition step of acquiring second input information for the second style conversion process that is a style conversion process and is different from the first style conversion process;
Execute the first style conversion process on the first partial image data indicating the first input partial image using the first input information to generate first converted data indicating the first converted partial image. a first conversion step of generating;
Execute the second style conversion process on the second partial image data indicating the second input partial image using the second input information to generate second converted data indicating the second converted partial image. a second conversion step to generate;
an output image generation step of generating output image data representing an output image based on the input image using the first converted data and the second converted data, the output image being the first input partial image; a first output partial image corresponding to the first output partial image and a second output partial image corresponding to the second input partial image, the first output partial image being an image based on the first converted partial image; the output image generation step, wherein the output partial image is an image based on the second converted partial image;
An image generation method comprising:
前記第1入力情報は、前記第1入力部分画像に対応する画像であって前記第1入力部分画像とは異なるスタイルを有する画像を示すデータを含み、
前記第2入力情報は、前記第2入力部分画像に対応する画像であって前記第2入力部分画像とは異なるスタイルを有する画像を示すデータを含む、画像生成方法。 The image generation method according to claim 8 ,
The first input information includes data indicating an image corresponding to the first input partial image and having a style different from the first input partial image,
The second input information includes data indicating an image corresponding to the second input partial image and having a style different from the second input partial image.
前記第1スタイル変換処理は、第1スタイル画像を示す第1スタイル画像データを用いて実行され、
前記第2スタイル変換処理は、第2スタイル画像を示す第2スタイル画像データを用いて実行され、
前記第1変換済部分画像は、前記第1スタイル画像のスタイルが前記第1入力部分画像に適用された画像であり、
前記第2変換済部分画像は、前記第2スタイル画像のスタイルが前記第2入力部分画像に適用された画像である、画像生成方法。 The image generation method according to any one of claims 1 to 9 ,
The first style conversion process is performed using first style image data indicating a first style image,
The second style conversion process is performed using second style image data indicating a second style image,
The first converted partial image is an image in which the style of the first style image is applied to the first input partial image,
The second converted partial image is an image in which the style of the second style image is applied to the second input partial image.
前記入力画像は、人物の顔を示す画像を含み、
前記第1入力部分画像は、前記人物の顔を構成する第1の部位を示す画像であり、
前記第2入力部分画像は、前記人物の顔を構成する第2の部位であって前記第1の部位とは異なる位置にある前記第2の部位を示す画像である、画像生成方法。 The image generation method according to any one of claims 1 to 10 ,
The input image includes an image showing a person's face,
The first input partial image is an image showing a first part of the person's face,
In the image generation method, the second input partial image is an image showing the second part of the person's face and located at a different position from the first part.
前記入力画像の種類を特定する種類特定工程を備え、
前記入力画像が第1種の入力画像である場合に、
前記第1変換工程では、前記第1部分画像データに対して第1種の前記第1スタイル変換処理が実行され、
前記第2変換工程では、前記第2部分画像データに対して第1種の前記第2スタイル変換処理が実行され、
前記入力画像が第2種の入力画像である場合に、
前記第1変換工程では、前記第1部分画像データに対して第2種の前記第1スタイル変換処理が実行され、
前記第2変換工程では、前記第2部分画像データに対して第2種の前記第2スタイル変換処理が実行される、画像生成方法。 The image generation method according to any one of claims 1 to 11 , further comprising:
comprising a type identifying step of identifying the type of the input image;
When the input image is a first type input image,
In the first conversion step, a first type of first style conversion process is performed on the first partial image data,
In the second conversion step, a first type of second style conversion process is performed on the second partial image data,
When the input image is a second type input image,
In the first conversion step, a second type of first style conversion process is performed on the first partial image data,
In the image generation method, in the second conversion step, a second type of second style conversion process is performed on the second partial image data.
前記入力画像は、人物の顔を示す画像を含み、
前記入力画像の種類は、前記人物の性別、人種、表情、顔の角度のうちの少なくとも一部に関する種類である、画像生成方法。 The image generation method according to claim 12 ,
The input image includes an image showing a person's face,
The type of the input image is a type related to at least part of the person's gender, race, facial expression, and facial angle.
前記入力画像は、人物の顔を示す画像を含み、
前記第2入力部分画像は、前記人物の口を示す画像であり、
前記第2スタイル変換処理は、前記口を示す画像において歯列を矯正する処理である、画像生成方法。 The image generation method according to any one of claims 1 to 13 ,
The input image includes an image showing a person's face,
The second input partial image is an image showing the mouth of the person,
The second style conversion process is a process of correcting the alignment of teeth in the image showing the mouth.
前記入力画像データを用いて、前記入力画像の一部である第1入力部分画像と、前記入力画像の一部であって前記第1入力部分画像とは異なる位置にある第2入力部分画像と、を特定する部分画像特定部と、
前記第1入力部分画像を示す第1部分画像データに対して、機械学習モデルを用いた第1スタイル変換処理を実行して、第1変換済部分画像を示す第1変換済データを生成する第1変換部と、
前記第2入力部分画像を示す第2部分画像データに対して、機械学習モデルを用いた第2スタイル変換処理であって前記第1スタイル変換処理とは異なる前記第2スタイル変換処理を実行して、第2変換済部分画像を示す第2変換済データを生成する第2変換部と、
前記第1変換済データと前記第2変換済データとを用いて、前記第1変換済部分画像と前記第2変換済部分画像とを含む中間画像を示す中間画像データを生成する第1部と、前記中間画像データに対して特定の後処理を実行して、前記入力画像に基づく出力画像を示す出力画像データを生成する第2部と、を含む出力画像生成部であって、前記出力画像は前記第1入力部分画像に対応する第1出力部分画像と前記第2入力部分画像に対応する第2出力部分画像とを含み、前記第1出力部分画像は前記第1変換済部分画像に基づく画像であり、前記第2出力部分画像は前記第2変換済部分画像に基づく画像である、前記出力画像生成部と、
を備え、
前記特定の後処理は、機械学習モデルを用いた第3スタイル変換処理であって前記第1スタイル変換処理および前記第2スタイル変換処理とは異なる前記第3スタイル変換処理を含み、
前記第3スタイル変換処理は、前記入力画像データをスタイル画像データとして用いて実行される、システム。 an image acquisition unit that acquires input image data indicating the input image;
Using the input image data, a first input partial image that is a part of the input image, and a second input partial image that is a part of the input image and located at a different position from the first input partial image. a partial image identification unit that identifies ,
A first style conversion process using a machine learning model is performed on the first partial image data representing the first input partial image to generate first converted data representing the first converted partial image. 1 conversion section;
performing the second style conversion process, which is a second style conversion process using a machine learning model and which is different from the first style conversion process, on second partial image data indicating the second input partial image; , a second conversion unit that generates second converted data indicating the second converted partial image;
a first part that uses the first converted data and the second converted data to generate intermediate image data representing an intermediate image including the first converted partial image and the second converted partial image; , a second part that performs specific post-processing on the intermediate image data to generate output image data representing an output image based on the input image, the output image generation unit comprising: includes a first output partial image corresponding to the first input partial image and a second output partial image corresponding to the second input partial image, the first output partial image being based on the first transformed partial image. an image, and the second output partial image is an image based on the second converted partial image;
Equipped with
The specific post-processing includes the third style conversion process that is a third style conversion process using a machine learning model and is different from the first style conversion process and the second style conversion process,
The system wherein the third style conversion process is executed using the input image data as style image data .
前記入力画像データを用いて、前記入力画像の一部である第1入力部分画像と、前記入力画像の一部であって前記第1入力部分画像とは異なる位置にある第2入力部分画像と、を特定する部分画像特定部と、
前記第1入力部分画像を示す第1部分画像データに対して、機械学習モデルを用いた第1スタイル変換処理を実行して、第1変換済部分画像を示す第1変換済データを生成する第1変換部と、
前記第2入力部分画像を示す第2部分画像データに対して、機械学習モデルを用いた第2スタイル変換処理であって前記第1スタイル変換処理とは異なる前記第2スタイル変換処理を実行して、第2変換済部分画像を示す第2変換済データを生成する第2変換部と、
前記第1変換済データと前記第2変換済データとを用いて、前記第1変換済部分画像と前記第2変換済部分画像とを含む中間画像を示す中間画像データを生成する第1部と、前記中間画像データに対して特定の後処理を実行して、前記入力画像に基づく出力画像を示す出力画像データを生成する第2部と、を含む出力画像生成部であって、前記出力画像は前記第1入力部分画像に対応する第1出力部分画像と前記第2入力部分画像に対応する第2出力部分画像とを含み、前記第1出力部分画像は前記第1変換済部分画像に基づく画像であり、前記第2出力部分画像は前記第2変換済部分画像に基づく画像である、前記出力画像生成部と、
を備え、
前記特定の後処理は、機械学習モデルを用いた第4スタイル変換処理であって前記第1スタイル変換処理および前記第2スタイル変換処理とは異なる前記第4スタイル変換処理を含み、
前記入力画像は、人物の顔を示す画像を含み、
前記第4スタイル変換処理は、前記人物の顔の表情を変更する処理である、システム。 an image acquisition unit that acquires input image data indicating the input image;
Using the input image data, a first input partial image that is a part of the input image, and a second input partial image that is a part of the input image and located at a different position from the first input partial image. a partial image identification unit that identifies ,
A first style conversion process using a machine learning model is performed on the first partial image data representing the first input partial image to generate first converted data representing the first converted partial image. 1 conversion section;
performing the second style conversion process, which is a second style conversion process using a machine learning model and which is different from the first style conversion process, on second partial image data indicating the second input partial image; , a second conversion unit that generates second converted data indicating the second converted partial image;
a first part that uses the first converted data and the second converted data to generate intermediate image data representing an intermediate image including the first converted partial image and the second converted partial image; , a second part that performs specific post-processing on the intermediate image data to generate output image data representing an output image based on the input image, the output image generation unit comprising: includes a first output partial image corresponding to the first input partial image and a second output partial image corresponding to the second input partial image, the first output partial image being based on the first transformed partial image. an image, and the second output partial image is an image based on the second converted partial image;
Equipped with
The specific post-processing includes the fourth style conversion process that is a fourth style conversion process using a machine learning model and is different from the first style conversion process and the second style conversion process,
The input image includes an image showing a person's face,
The system wherein the fourth style conversion process is a process of changing the facial expression of the person .
前記入力画像データを用いて、前記入力画像の一部である第1入力部分画像と、前記入力画像の一部であって前記第1入力部分画像とは異なる位置にある第2入力部分画像と、を特定する部分画像特定部と、
前記第1入力部分画像を示す第1部分画像データに対して、機械学習モデルを用いた第1スタイル変換処理を実行して、第1変換済部分画像を示す第1変換済データを生成する第1変換部であって、前記第1スタイル変換処理は、前記第1入力部分画像と、生成すべき前記第1変換済部分画像と、の間の差異の程度を指定する第1パラメータを用いて実行される、前記第1変換部と、
前記第2入力部分画像を示す第2部分画像データに対して、機械学習モデルを用いた第2スタイル変換処理であって前記第1スタイル変換処理とは異なる前記第2スタイル変換処理を実行して、第2変換済部分画像を示す第2変換済データを生成する第2変換部であって、前記第2スタイル変換処理は、前記第2入力部分画像と、生成すべき前記第2変換済部分画像と、の間の差異の程度を指定する第2パラメータを用いて実行され、前記第2パラメータは、前記第1パラメータとは独立して調整される、前記第2変換部と、
第1変換済データと前記第2変換済データとを用いて、前記入力画像に基づく出力画像を示す出力画像データを生成する出力画像生成部であって、前記出力画像は前記第1入力部分画像に対応する第1出力部分画像と前記第2入力部分画像に対応する第2出力部分画像とを含み、前記第1出力部分画像は前記第1変換済部分画像に基づく画像であり、前記第2出力部分画像は前記第2変換済部分画像に基づく画像である、前記出力画像生成部と、
を備えるシステム。 an image acquisition unit that acquires input image data indicating the input image;
Using the input image data, a first input partial image that is a part of the input image, and a second input partial image that is a part of the input image and located at a different position from the first input partial image. a partial image identification unit that identifies ,
A first style conversion process using a machine learning model is performed on the first partial image data representing the first input partial image to generate first converted data representing the first converted partial image . 1 conversion unit, wherein the first style conversion process uses a first parameter that specifies the degree of difference between the first input partial image and the first converted partial image to be generated. The first conversion unit is executed ;
performing the second style conversion process, which is a second style conversion process using a machine learning model and which is different from the first style conversion process, on second partial image data indicating the second input partial image; , a second conversion unit that generates second converted data indicating a second converted partial image, wherein the second style conversion process is performed on the second input partial image and the second converted portion to be generated. and the second transformation unit is performed using a second parameter that specifies the degree of difference between the images, and the second parameter is adjusted independently of the first parameter ;
an output image generation unit that uses the first converted data and the second converted data to generate output image data representing an output image based on the input image, the output image being the first input partial image; a first output partial image corresponding to the first output partial image and a second output partial image corresponding to the second input partial image, the first output partial image being an image based on the first converted partial image; the output image generation unit, wherein the output partial image is an image based on the second converted partial image;
A system equipped with
前記入力画像データを用いて、前記入力画像の一部である第1入力部分画像と、前記入力画像の一部であって前記第1入力部分画像とは異なる位置にある第2入力部分画像と、を特定する部分画像特定部と、
前記第1入力部分画像を示す第1部分画像データに対して実行すべき処理を選択する処理選択部と、
前記第1部分画像データに対して、機械学習モデルを用いた第1スタイル変換処理を実行して、第1変換済部分画像を示す第1変換済データを生成する第1変換部と、
前記第1部分画像データに対して、機械学習モデルを用いずに前記第1入力部分画像の少なくとも一部の色を変換する色変換処理を実行する色変換部と、
前記第2入力部分画像を示す第2部分画像データに対して、機械学習モデルを用いた第2スタイル変換処理であって前記第1スタイル変換処理とは異なる前記第2スタイル変換処理を実行して、第2変換済部分画像を示す第2変換済データを生成する第2変換部と、
第1変換済データと前記第2変換済データとを用いて、前記入力画像に基づく出力画像を示す出力画像データを生成する出力画像生成部であって、前記出力画像は前記第1入力部分画像に対応する第1出力部分画像と前記第2入力部分画像に対応する第2出力部分画像とを含み、前記第1出力部分画像は前記第1変換済部分画像に基づく画像であり、前記第2出力部分画像は前記第2変換済部分画像に基づく画像である、前記出力画像生成部と、
を備え、
前記処理選択部によって前記第1スタイル変換処理が選択される場合に、前記色変換部は前記色変換処理を実行せずに、前記第1変換部は前記第1スタイル変換処理を実行し、
前記処理選択部によって前記色変換処理が選択される場合に、前記色変換部は前記色変換処理を実行し、前記第1変換部は前記第1スタイル変換処理を実行しない、システム。 an image acquisition unit that acquires input image data indicating the input image;
Using the input image data, a first input partial image that is a part of the input image, and a second input partial image that is a part of the input image and located at a different position from the first input partial image. a partial image identification unit that identifies ,
a process selection unit that selects a process to be performed on first partial image data indicating the first input partial image;
a first conversion unit that executes a first style conversion process using a machine learning model on the first partial image data to generate first converted data indicating the first converted partial image;
a color conversion unit that performs a color conversion process on the first partial image data to convert at least part of the color of the first input partial image without using a machine learning model;
performing the second style conversion process, which is a second style conversion process using a machine learning model and which is different from the first style conversion process, on second partial image data indicating the second input partial image; , a second conversion unit that generates second converted data indicating the second converted partial image;
an output image generation unit that uses the first converted data and the second converted data to generate output image data representing an output image based on the input image, the output image being the first input partial image; a first output partial image corresponding to the first output partial image and a second output partial image corresponding to the second input partial image, the first output partial image being an image based on the first converted partial image; the output image generation unit, wherein the output partial image is an image based on the second converted partial image;
Equipped with
When the first style conversion process is selected by the process selection unit, the color conversion unit does not execute the color conversion process, and the first conversion unit executes the first style conversion process,
When the color conversion process is selected by the process selection unit, the color conversion unit executes the color conversion process, and the first conversion unit does not execute the first style conversion process.
前記入力画像データを用いて、前記入力画像の一部である第1入力部分画像と、前記入力画像の一部であって前記第1入力部分画像とは異なる位置にある第2入力部分画像と、を特定する部分画像特定部と、
ユーザによる第1の入力に基づいて、機械学習モデルを用いた第1スタイル変換処理のための第1入力情報を取得し、ユーザによる第2の入力に基づいて、機械学習モデルを用いた第2スタイル変換処理であって前記第1スタイル変換処理とは異なる前記第2スタイル変換処理のための第2入力情報を取得する情報取得部と、
前記第1入力部分画像を示す第1部分画像データに対して、前記第1入力情報を用いて前記第1スタイル変換処理を実行して、第1変換済部分画像を示す第1変換済データを生成する第1変換部と、
前記第2入力部分画像を示す第2部分画像データに対して、前記第2入力情報を用いて前記第2スタイル変換処理を実行して、第2変換済部分画像を示す第2変換済データを生成する第2変換部と、
第1変換済データと前記第2変換済データとを用いて、前記入力画像に基づく出力画像を示す出力画像データを生成する出力画像生成部であって、前記出力画像は前記第1入力部分画像に対応する第1出力部分画像と前記第2入力部分画像に対応する第2出力部分画像とを含み、前記第1出力部分画像は前記第1変換済部分画像に基づく画像であり、前記第2出力部分画像は前記第2変換済部分画像に基づく画像である、前記出力画像生成部と、
を備えるシステム。 an image acquisition unit that acquires input image data indicating the input image;
Using the input image data, a first input partial image that is a part of the input image, and a second input partial image that is a part of the input image and located at a different position from the first input partial image. a partial image identification unit that identifies ,
Based on the first input by the user, first input information for the first style conversion process using the machine learning model is acquired, and based on the second input by the user, the second style conversion process using the machine learning model is acquired. an information acquisition unit that acquires second input information for the second style conversion process that is a style conversion process and is different from the first style conversion process;
Execute the first style conversion process on the first partial image data indicating the first input partial image using the first input information to generate first converted data indicating the first converted partial image. a first conversion unit that generates;
Execute the second style conversion process on the second partial image data indicating the second input partial image using the second input information to generate second converted data indicating the second converted partial image. a second conversion unit that generates;
an output image generation unit that uses the first converted data and the second converted data to generate output image data representing an output image based on the input image, the output image being the first input partial image; a first output partial image corresponding to the first output partial image and a second output partial image corresponding to the second input partial image, the first output partial image being an image based on the first converted partial image; the output image generation unit, wherein the output partial image is an image based on the second converted partial image;
A system equipped with
前記第1部分画像データに対して、機械学習モデルを用いた第1スタイル変換処理を実行して、第1変換済部分画像を示す第1変換済データを生成する第1変換機能と、
前記第2部分画像データに対して、機械学習モデルを用いた第2スタイル変換処理であって前記第1スタイル変換処理とは異なる前記第2スタイル変換処理を実行して、第2変換済部分画像を示す第2変換済データを生成する第2変換機能と、
前記第1変換済データと前記第2変換済データとを用いて、前記第1変換済部分画像と前記第2変換済部分画像とを含む中間画像を示す中間画像データを生成する第1機能と、前記中間画像データに対して特定の後処理を実行して、前記入力画像に基づく出力画像を示す出力画像データを生成する第2機能と、を含む出力画像生成機能であって、前記出力画像は前記第1入力部分画像に対応する第1出力部分画像と前記第2入力部分画像に対応する第2出力部分画像とを含み、前記第1出力部分画像は前記第1変換済部分画像に基づく画像であり、前記第2出力部分画像は前記第2変換済部分画像に基づく画像である、前記出力画像生成機能と、
をコンピュータに実現させ、
前記特定の後処理は、機械学習モデルを用いた第3スタイル変換処理であって前記第1スタイル変換処理および前記第2スタイル変換処理とは異なる前記第3スタイル変換処理を含み、
前記第3スタイル変換処理は、前記入力画像を示す入力画像データをスタイル画像データとして用いて実行される、コンピュータプログラム。 first partial image data indicating a first input partial image that is a part of the input image; and second partial image data indicating a second input partial image that is a part of the input image and is located at a different position from the first input partial image. a partial image acquisition function that acquires two partial image data;
a first conversion function that executes a first style conversion process using a machine learning model on the first partial image data to generate first converted data indicating the first converted partial image;
The second style conversion process, which is a second style conversion process using a machine learning model and which is different from the first style conversion process, is performed on the second partial image data to obtain a second converted part. a second conversion function that generates second converted data representing the image;
a first function of generating intermediate image data representing an intermediate image including the first converted partial image and the second converted partial image using the first converted data and the second converted data; , a second function for performing specific post-processing on the intermediate image data to generate output image data representing an output image based on the input image, the output image generation function comprising: includes a first output partial image corresponding to the first input partial image and a second output partial image corresponding to the second input partial image, the first output partial image being based on the first transformed partial image. the output image generation function, wherein the second output partial image is an image based on the second converted partial image;
to be realized by a computer,
The specific post-processing includes the third style conversion process that is a third style conversion process using a machine learning model and is different from the first style conversion process and the second style conversion process,
The third style conversion process is a computer program that is executed using input image data indicating the input image as style image data .
前記第1部分画像データに対して、機械学習モデルを用いた第1スタイル変換処理を実行して、第1変換済部分画像を示す第1変換済データを生成する第1変換機能と、
前記第2部分画像データに対して、機械学習モデルを用いた第2スタイル変換処理であって前記第1スタイル変換処理とは異なる前記第2スタイル変換処理を実行して、第2変換済部分画像を示す第2変換済データを生成する第2変換機能と、
前記第1変換済データと前記第2変換済データとを用いて、前記第1変換済部分画像と前記第2変換済部分画像とを含む中間画像を示す中間画像データを生成する第1機能と、前記中間画像データに対して特定の後処理を実行して、前記入力画像に基づく出力画像を示す出力画像データを生成する第2機能と、を含む出力画像生成機能であって、前記出力画像は前記第1入力部分画像に対応する第1出力部分画像と前記第2入力部分画像に対応する第2出力部分画像とを含み、前記第1出力部分画像は前記第1変換済部分画像に基づく画像であり、前記第2出力部分画像は前記第2変換済部分画像に基づく画像である、前記出力画像生成機能と、
コンピュータに実現させ、
前記特定の後処理は、機械学習モデルを用いた第4スタイル変換処理であって前記第1スタイル変換処理および前記第2スタイル変換処理とは異なる前記第4スタイル変換処理を含み、
前記入力画像は、人物の顔を示す画像を含み、
前記第4スタイル変換処理は、前記人物の顔の表情を変更する処理である、コンピュータプログラム。 first partial image data indicating a first input partial image that is a part of the input image; and second partial image data indicating a second input partial image that is a part of the input image and is located at a different position from the first input partial image. a partial image acquisition function that acquires two partial image data;
a first conversion function that executes a first style conversion process using a machine learning model on the first partial image data to generate first converted data indicating the first converted partial image;
The second style conversion process, which is a second style conversion process using a machine learning model and which is different from the first style conversion process, is performed on the second partial image data to obtain a second converted part. a second conversion function that generates second converted data representing the image;
a first function of generating intermediate image data representing an intermediate image including the first converted partial image and the second converted partial image using the first converted data and the second converted data; , a second function for performing specific post-processing on the intermediate image data to generate output image data representing an output image based on the input image, the output image generation function comprising: includes a first output partial image corresponding to the first input partial image and a second output partial image corresponding to the second input partial image, the first output partial image being based on the first transformed partial image. the output image generation function, wherein the second output partial image is an image based on the second converted partial image;
Let the computer realize it,
The specific post-processing includes the fourth style conversion process that is a fourth style conversion process using a machine learning model and is different from the first style conversion process and the second style conversion process,
The input image includes an image showing a person's face,
The computer program is a computer program , wherein the fourth style conversion process is a process of changing the facial expression of the person .
前記第1部分画像データに対して、機械学習モデルを用いた第1スタイル変換処理を実行して、第1変換済部分画像を示す第1変換済データを生成する第1変換機能であって、前記第1スタイル変換処理は、前記第1入力部分画像と、生成すべき前記第1変換済部分画像と、の間の差異の程度を指定する第1パラメータを用いて実行される、前記第1変換機能と、
前記第2入力部分画像を示す第2部分画像データに対して、機械学習モデルを用いた第2スタイル変換処理であって前記第1スタイル変換処理とは異なる前記第2スタイル変換処理を実行して、第2変換済部分画像を示す第2変換済データを生成する第2変換機能であって、前記第2スタイル変換処理は、前記第2入力部分画像と、生成すべき前記第2変換済部分画像と、の間の差異の程度を指定する第2パラメータを用いて実行され、前記第2パラメータは、前記第1パラメータとは独立して調整される、前記第2変換機能と、
コンピュータに実現させ、
前記第1変換済データと前記第2変換済データは、前記入力画像に基づく出力画像を示す出力画像を生成するために用いられ、前記出力画像は前記第1入力部分画像に対応する第1出力部分画像と前記第2入力部分画像に対応する第2出力部分画像とを含み、前記第1出力部分画像は前記第1変換済部分画像に基づく画像であり、前記第2出力部分画像は前記第2変換済部分画像に基づく画像である、コンピュータプログラム。 first partial image data indicating a first input partial image that is a part of the input image; and second partial image data indicating a second input partial image that is a part of the input image and is located at a different position from the first input partial image. a partial image acquisition function that acquires two partial image data;
A first conversion function that executes a first style conversion process using a machine learning model on the first partial image data to generate first converted data indicating a first converted partial image, The first style conversion process is performed using a first parameter that specifies the degree of difference between the first input partial image and the first converted partial image to be generated. conversion function and
performing the second style conversion process, which is a second style conversion process using a machine learning model and which is different from the first style conversion process, on second partial image data indicating the second input partial image; , a second conversion function that generates second converted data indicating a second converted partial image, wherein the second style conversion process includes the second input partial image and the second converted portion to be generated. the second transformation function is performed using a second parameter specifying the degree of difference between the images, the second parameter being adjusted independently of the first parameter;
Let the computer realize it,
The first transformed data and the second transformed data are used to generate an output image representing an output image based on the input image, the output image corresponding to the first input partial image. a first output partial image corresponding to the second input partial image, the first output partial image is an image based on the first converted partial image, and the second output partial image is an image based on the first converted partial image; The computer program product, wherein the image is an image based on the second converted partial image.
前記第1部分画像データに対して実行すべき処理を選択する処理選択機能と、
前記第1部分画像データに対して、機械学習モデルを用いた第1スタイル変換処理を実行して、第1変換済部分画像を示す第1変換済データを生成する第1変換機能と、
前記第1部分画像データに対して、機械学習モデルを用いずに前記第1入力部分画像の少なくとも一部の色を変換する色変換処理を実行する色変換機能と、
前記第2部分画像データに対して、機械学習モデルを用いた第2スタイル変換処理であって前記第1スタイル変換処理とは異なる前記第2スタイル変換処理を実行して、第2変換済部分画像を示す第2変換済データを生成する第2変換機能と、
コンピュータに実現させ、
前記第1変換済データと前記第2変換済データは、前記入力画像に基づく出力画像を示す出力画像を生成するために用いられ、前記出力画像は前記第1入力部分画像に対応する第1出力部分画像と前記第2入力部分画像に対応する第2出力部分画像とを含み、前記第1出力部分画像は前記第1変換済部分画像に基づく画像であり、前記第2出力部分画像は前記第2変換済部分画像に基づく画像であり、
前記処理選択機能によって前記第1スタイル変換処理が選択される場合に、前記色変換機能は前記色変換処理を実行せずに、前記第1変換機能は前記第1スタイル変換処理を実行し、
前記処理選択機能によって前記色変換処理が選択される場合に、前記色変換機能は前記色変換処理を実行し、前記第1変換機能は前記第1スタイル変換処理を実行しない、コンピュータプログラム。 first partial image data indicating a first input partial image that is a part of the input image; and second partial image data indicating a second input partial image that is a part of the input image and is located at a different position from the first input partial image. a partial image acquisition function that acquires two partial image data;
a process selection function that selects a process to be performed on the first partial image data;
a first conversion function that executes a first style conversion process using a machine learning model on the first partial image data to generate first converted data indicating the first converted partial image;
a color conversion function that performs a color conversion process on the first partial image data to convert at least part of the color of the first input partial image without using a machine learning model;
The second style conversion process, which is a second style conversion process using a machine learning model and which is different from the first style conversion process, is performed on the second partial image data to obtain a second converted part. a second conversion function that generates second converted data representing the image;
Let the computer realize it,
The first transformed data and the second transformed data are used to generate an output image representing an output image based on the input image, the output image corresponding to the first input partial image. a first output partial image corresponding to the second input partial image, the first output partial image is an image based on the first converted partial image, and the second output partial image is an image based on the first converted partial image; The image is an image based on the second converted partial image,
When the first style conversion process is selected by the process selection function, the color conversion function does not execute the color conversion process, and the first conversion function executes the first style conversion process,
When the color conversion process is selected by the process selection function, the color conversion function executes the color conversion process, and the first conversion function does not execute the first style conversion process.
ユーザによる第1の入力に基づいて、機械学習モデルを用いた第1スタイル変換処理のための第1入力情報を取得し、ユーザによる第2の入力に基づいて、機械学習モデルを用いた第2スタイル変換処理であって前記第1スタイル変換処理とは異なる前記第2スタイル変換処理のための第2入力情報を取得する情報取得機能と、
前記第1部分画像データに対して、前記第1入力情報を用いて前記第1スタイル変換処理を実行して、第1変換済部分画像を示す第1変換済データを生成する第1変換機能と、
前記第2部分画像データに対して、前記第2入力情報を用いて前記第2スタイル変換処理を実行して、第2変換済部分画像を示す第2変換済データを生成する第2変換機能と、
コンピュータに実現させ、
前記第1変換済データと前記第2変換済データは、前記入力画像に基づく出力画像を示す出力画像を生成するために用いられ、前記出力画像は前記第1入力部分画像に対応する第1出力部分画像と前記第2入力部分画像に対応する第2出力部分画像とを含み、前記第1出力部分画像は前記第1変換済部分画像に基づく画像であり、前記第2出力部分画像は前記第2変換済部分画像に基づく画像である、コンピュータプログラム。 first partial image data representing a first input partial image that is part of the input image; and second partial image data representing a second input partial image that is part of the input image and located at a different position from the first input partial image. a partial image acquisition function that acquires two partial image data;
Based on the first input by the user, first input information for the first style conversion process using the machine learning model is acquired, and based on the second input by the user, the second style conversion process using the machine learning model is acquired. an information acquisition function that acquires second input information for the second style conversion process that is a style conversion process and is different from the first style conversion process;
a first conversion function that executes the first style conversion process on the first partial image data using the first input information to generate first converted data indicating the first converted partial image; ,
a second conversion function that executes the second style conversion process on the second partial image data using the second input information to generate second converted data indicating the second converted partial image; and,
Let the computer realize it,
The first transformed data and the second transformed data are used to generate an output image representing an output image based on the input image, the output image corresponding to the first input partial image. a first output partial image corresponding to the second input partial image, the first output partial image is an image based on the first converted partial image, and the second output partial image is an image based on the first converted partial image; The computer program product, wherein the image is an image based on the second converted partial image.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2020032353A JP7448879B2 (en) | 2020-02-27 | 2020-02-27 | Image generation method, system, and computer program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2020032353A JP7448879B2 (en) | 2020-02-27 | 2020-02-27 | Image generation method, system, and computer program |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2021135822A JP2021135822A (en) | 2021-09-13 |
JP7448879B2 true JP7448879B2 (en) | 2024-03-13 |
Family
ID=77661332
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2020032353A Active JP7448879B2 (en) | 2020-02-27 | 2020-02-27 | Image generation method, system, and computer program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP7448879B2 (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPWO2022269963A1 (en) * | 2021-06-23 | 2022-12-29 |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2011139329A (en) | 2009-12-28 | 2011-07-14 | Casio Computer Co Ltd | Image processing apparatus, and image modification program |
-
2020
- 2020-02-27 JP JP2020032353A patent/JP7448879B2/en active Active
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2011139329A (en) | 2009-12-28 | 2011-07-14 | Casio Computer Co Ltd | Image processing apparatus, and image modification program |
Non-Patent Citations (2)
Title |
---|
Mask-Guided Portrait Editing With Conditional GANs,2019 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR),2019年06月15日,https://ieeexplore.ieee.org/document/8953908 |
矢部 國俊,Photoshopによる「人」の修整&加工テクニック,MdN vol.66 ,日本,株式会社エムディエヌコーポレーション MdN Corporation,1999年10月01日,第66巻,p.47-73 |
Also Published As
Publication number | Publication date |
---|---|
JP2021135822A (en) | 2021-09-13 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
KR102362544B1 (en) | Method and apparatus for image processing, and computer readable storage medium | |
US11907839B2 (en) | Detail-preserving image editing techniques | |
JP4799101B2 (en) | Image processing method, apparatus, and program | |
US8384793B2 (en) | Automatic face and skin beautification using face detection | |
JP2006350498A (en) | Image processor and image processing method and program | |
JP5949331B2 (en) | Image generating apparatus, image generating method, and program | |
JP2006318103A (en) | Image processor, image processing method, and program | |
JP4752941B2 (en) | Image composition apparatus and program | |
JP2011060038A (en) | Image processing apparatus | |
JP7448879B2 (en) | Image generation method, system, and computer program | |
JP2013200735A (en) | Image generation device, image generation method, and program | |
CN111028318A (en) | Virtual face synthesis method, system, device and storage medium | |
US9092889B2 (en) | Image processing apparatus, image processing method, and program storage medium | |
JP2001209802A (en) | Method and device for extracting face, and recording medium | |
JP5896204B2 (en) | Image processing apparatus and program | |
JP2006350769A (en) | Image processing device, method and program | |
US20130343656A1 (en) | Image creating device, image creating method and recording medium | |
US11625886B2 (en) | Storage medium storing program, training method of machine learning model, and image generating apparatus | |
JP2000155836A (en) | Portrait picture formation system and its method | |
US20210374916A1 (en) | Storage medium storing program, image processing apparatus, and training method of machine learning model | |
JP7482607B2 (en) | Hair color treatment method | |
JP3473832B2 (en) | Digital image automatic correction method and system | |
US20240185518A1 (en) | Augmented video generation with dental modifications | |
JP2024060324A (en) | Image processing device, image processing method, and program | |
CN116887035A (en) | Photographing method and device based on intelligent template |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20230131 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20231012 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20231018 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20231206 |
|
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: 20240131 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20240213 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 7448879 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |