JP7675367B2 - Image coloring method and device, colored image generation model generating device, and program - Google Patents
Image coloring method and device, colored image generation model generating device, and program Download PDFInfo
- Publication number
- JP7675367B2 JP7675367B2 JP2021115211A JP2021115211A JP7675367B2 JP 7675367 B2 JP7675367 B2 JP 7675367B2 JP 2021115211 A JP2021115211 A JP 2021115211A JP 2021115211 A JP2021115211 A JP 2021115211A JP 7675367 B2 JP7675367 B2 JP 7675367B2
- Authority
- JP
- Japan
- Prior art keywords
- image
- colored
- monochrome
- solid
- monochrome image
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Landscapes
- Processing Or Creating Images (AREA)
- Image Analysis (AREA)
Description
本発明は、漫画などの無彩色のモノクローム画像に着色する技術に関する。 The present invention relates to a technology for coloring achromatic monochrome images such as manga.
漫画は、伝統的に無彩色のモノクローム画像として作成されることが多い。一方、近年では、モノクロームの漫画だけではなく着色された漫画の供給が要望されている。このため、モノクローム画像からなる既に完成された漫画に対して、後から着色処理を行う要求が増加している。そして、このような着色処理を人手で行うと多大なコストと時間がかかることから、モノクローム画像に対する着色処理を自動的に又は半自動で行うシステムが開発されている。このような着色処理としては、例えば非特許文献1に記載されたものが知られている。 Traditionally, manga are often created as achromatic monochrome images. However, in recent years, there has been a demand for colored manga in addition to monochrome manga. For this reason, there is an increasing demand for post-coloring of already completed manga consisting of monochrome images. Since performing such coloring processing manually is very costly and time-consuming, systems have been developed that perform automatic or semi-automatic coloring of monochrome images. One such type of coloring processing is described in Non-Patent Document 1, for example.
非特許文献1に記載のものは、Pix2Pixと呼ばれる画像生成アルゴリズムをベースにした機械学習による着色を行うものであり、特に入力情報として線画画像に加えて利用者による色のヒント情報を加えたものである。 The technique described in Non-Patent Document 1 performs coloring using machine learning based on an image generation algorithm called Pix2Pix, and in particular adds color hint information provided by the user in addition to a line drawing image as input information.
しかし、非特許文献1に記載のものでは、漫画の着色には精度の点で十分ではないという問題があった。以下、この問題点について説明する。 However, the method described in Non-Patent Document 1 had the problem that it was not accurate enough for coloring manga. This problem is explained below.
非特許文献1に記載のものでは、事前に大量の学習データを用いた学習が必要であるため、いきおい学習データとして複数の作者の作品が用いられることになる。しかし、漫画のスタイルは作者によって大きく異なるだけでなく、同じ作者であっても作品や制作時期によってスタイルが異なることがある。このため、特定の漫画に適した学習を行うことが困難であり、したがって着色精度の向上が困難であるという問題があった。 The technique described in Non-Patent Document 1 requires prior learning using a large amount of training data, which inevitably means that works from multiple authors are used as training data. However, not only do manga styles vary greatly depending on the author, but even the same author's style can differ depending on the work and the time of production. This makes it difficult to carry out learning appropriate for a specific manga, and therefore poses the problem of difficulty in improving coloring accuracy.
また、漫画は線画だけで構成されているものではなく、無彩色のパターン又は濃淡により陰影又は色彩或いはテクスチャを表現した陰影等表現部が含まれることが一般的である。この陰影等表現部は、紙媒体では「スクリーントーン」と呼ばれるテンプレートを線画に貼り付けて形成される。しかし、非特許文献1に記載のものは、陰影等表現部が含まれる漫画では、学習段階や着色処理の段階において陰影等表現部の位置を指定することができない。このため、出力結果として、陰影等表現部を、当該陰影等表現部に適した陰影・色彩・テクスチャで表現することが困難であり、したがって着色精度の向上が困難であるという問題があった。 Manga is not composed of line drawings alone, but generally includes shading and other representations that express shading, color, or texture using achromatic patterns or shades. In paper media, these shading and other representations are formed by attaching a template called a "screen tone" to the line drawing. However, in the case of manga that includes shading and other representations described in Non-Patent Document 1, the position of the shading and other representations cannot be specified during the learning stage or coloring process stage. For this reason, it is difficult to represent the shading and other representations in the output results with shading, color, and texture that are appropriate for the shading and other representations, and therefore there is a problem in that it is difficult to improve coloring accuracy.
本発明は上記事情に鑑みてなされたものであり、その目的とするところは、無彩色のモノクローム画像に対して適切な着色が可能な画像着色方法及び装置、着色画像生成モデルの生成装置、並びにプログラムを提供することにある。 The present invention has been made in consideration of the above circumstances, and its purpose is to provide an image coloring method and device capable of appropriately coloring achromatic monochrome images, a device for generating a colored image generation model, and a program.
上記目的を達成するために、本願発明に係る画像着色方法は、コンピュータが、無彩色のモノクローム画像と、前記モノクローム画像に対応する所定の着色領域に単一の色彩が着色されたべた塗り画像と、前記モノクローム画像に対応した着色画像とを学習データとして用いた機械学習により、前記モノクローム画像及び前記べた塗り画像から前記着色画像を生成する着色画像生成モデルを生成するモデル生成ステップと、生成された着色画像生成モデルと、着色対象の前記モノクローム画像である対象モノクローム画像と、前記ベタ画像であり前記対象モノクローム画像に対応する対応べた塗り画像とに基づき、前記着色画像であり前記対象モノクローム画像に対応する対応着色画像を生成する着色画像生成ステップとを備えたことを特徴とする。 In order to achieve the above object, the image coloring method according to the present invention is characterized by comprising: a model generation step in which a computer generates a colored image generation model that generates the colored image from the monochrome image and the solid image by machine learning using as learning data an achromatic monochrome image, a solid image in which a predetermined coloring area corresponding to the monochrome image is colored with a single color, and a colored image corresponding to the monochrome image; and a colored image generation step in which a colored image that is the corresponding colored image that is the target monochrome image is generated based on the generated colored image generation model, a target monochrome image that is the monochrome image to be colored, and a corresponding solid image that is the solid image and corresponds to the target monochrome image.
また、本願発明に係る画像着色装置は、無彩色のモノクローム画像と、前記モノクローム画像に対応する所定の着色領域に単一の色彩が着色されたべた塗り画像と、前記モノクローム画像に対応した着色画像とを学習データとして用いた機械学習により、前記モノクローム画像及び前記べた塗り画像から前記着色画像を生成する着色画像生成モデルを生成するモデル生成部と、前記モデル生成部により生成された着色画像生成モデルと、着色対象の前記モノクローム画像である対象モノクローム画像と、前記べた塗り画像であり前記対象モノクローム画像に対応する対応べた塗り画像とに基づき、前記着色画像であり前記対象モノクローム画像に対応する対応着色画像を生成する着色処理部とを備えたことを特徴とする。 The image coloring device according to the present invention is characterized by comprising: a model generation unit that generates a colored image generation model that generates the colored image from the monochrome image and the solid image by machine learning using as learning data an achromatic monochrome image, a solid image in which a single color is applied to a predetermined colored area corresponding to the monochrome image, and a colored image corresponding to the monochrome image; and a coloring processing unit that generates the colored image, which is the corresponding colored image corresponding to the target monochrome image, based on the colored image generation model generated by the model generation unit, a target monochrome image that is the monochrome image to be colored, and a corresponding solid image that is the solid image and corresponds to the target monochrome image.
また、本願発明に係る画像着色装置は、無彩色のモノクローム画像と、前記モノクローム画像に対応する所定の着色領域に単一の色彩が着色されたべた塗り画像と、前記モノクローム画像に対応した着色画像とを学習データとして用いた機械学習により生成され、前記モノクローム画像及び前記べた塗り画像から前記着色画像を生成する着色画像生成モデルと、前記着色画像生成モデルと、着色対象の前記モノクローム画像である対象モノクローム画像と、前記べた塗り画像であり前記対象モノクローム画像に対応する対応べた塗り画像とに基づき、前記着色画像であり前記対象モノクローム画像に対応する対応着色画像を生成する着色処理部とを備えたことを特徴とする。 The image coloring device according to the present invention is characterized in that it includes a colored image generation model that is generated by machine learning using as learning data an achromatic monochrome image, a solid image in which a predetermined coloring area corresponding to the monochrome image is colored with a single color, and a colored image corresponding to the monochrome image, and that generates the colored image from the monochrome image and the solid image, and a coloring processing unit that generates the colored image, which is the corresponding colored image corresponding to the target monochrome image, based on the colored image generation model, a target monochrome image that is the monochrome image to be colored, and a corresponding solid image that is the solid image and corresponds to the target monochrome image.
また、本願発明に係る着色画像生成モデルの生成装置は、無彩色のモノクローム画像と、前記モノクローム画像に対応する所定の着色領域に単一の色彩が着色されたべた塗り画像と、前記モノクローム画像に対応した着色画像とを学習データとして用いた機械学習により、前記モノクローム画像及び前記べた塗り画像から前記着色画像を生成する着色画像生成モデルを生成するモデル生成部を備えたことを特徴とする。 The colored image generation model generating device according to the present invention is characterized by comprising a model generating unit that generates a colored image generation model that generates a colored image from a monochrome image and a solid image by machine learning using, as training data, an achromatic monochrome image, a solid image in which a single color is applied to a predetermined colored area corresponding to the monochrome image, and a colored image corresponding to the monochrome image.
本発明によれば、着色画像生成モデルは、無彩色のモノクローム画像と、前記モノクローム画像に対応する所定の着色領域に単一の色彩が着色され且つ前記モノクローム画像を含まないべた塗り画像と、前記モノクローム画像に対応した着色画像とを学習データとして用いて機械学習により生成される。すなわち、着色対象の位置及びその色彩の情報を含むべた塗り画像が機械学習に用いられるので、対象モノクローム画像に対して着色する位置及びその色彩の精度が向上する。すなわち、本発明によれば適切な着色が可能となる。さらに、少ない学習データ(モノクローム画像、べた塗り画像、着色画像の組み)を用意するだけで着色画像生成モデルを作成できるため、学習データ作成の手間が削減できるだけでなく、作品や作者のスタイルにあわせた着色が可能になる。 According to the present invention, a colored image generation model is generated by machine learning using as training data an achromatic monochrome image, a solid image in which a predetermined colored area corresponding to the monochrome image is colored with a single color and does not include the monochrome image, and a colored image corresponding to the monochrome image. That is, since a solid image containing information on the position and color of the coloring target is used for machine learning, the accuracy of the position and color of the coloring for the target monochrome image is improved. That is, the present invention enables appropriate coloring. Furthermore, since a colored image generation model can be created by simply preparing a small amount of training data (a combination of a monochrome image, a solid image, and a colored image), not only is the effort required for creating training data reduced, but coloring that matches the work and the style of the artist becomes possible.
なお、上述のように、本発明ではべた塗り画像が必要である。しかし、当該べた塗り画像は、高度な専門的技能や知識がなくても、人手により又は画像処理装置によりモノクローム画像から容易に導出することができる。したがって、本発明によれば、高度な専門的技能や知識がなくても、容易且つ適切な着色が可能となる。 As mentioned above, the present invention requires a solid image. However, the solid image can be easily derived from a monochrome image by hand or with an image processing device without the need for highly specialized skills or knowledge. Therefore, the present invention enables easy and appropriate coloring without the need for highly specialized skills or knowledge.
(第1の実施の形態)
本発明の第1の実施の形態に係る画像着色装置について図面を参照して説明する。図1は第1の実施の形態に係る画像着色装置の機能ブロック図、図2はモノクローム画像の一例を示す図、図3はべた塗り画像の一例を示す図、図4は着色画像の一例を示す図である。なお、本願では、画像サンプルとして、Manga109-sデータセットに含まれている、著作者「えびふらい」の作品「ねこだま」を利用している。
(First embodiment)
An image coloring device according to a first embodiment of the present invention will be described with reference to the drawings. Fig. 1 is a functional block diagram of the image coloring device according to the first embodiment, Fig. 2 is a diagram showing an example of a monochrome image, Fig. 3 is a diagram showing an example of a solid-colored image, and Fig. 4 is a diagram showing an example of a colored image. In this application, "Nekodama", a work by author "Ebi Fry" included in the Manga109-s data set, is used as an image sample.
本実施の形態に係る画像着色装置100は、無彩色のモノクローム画像10と、前記モノクローム画像10に対応する所定の着色領域に単一の色彩が着色され且つ前記モノクローム画像10を含まないべた塗り画像20と、前記モノクローム画像10に対応した着色画像30とを学習データとして用いた機械学習により、前記モノクローム画像10及び前記べた塗り画像20から前記着色画像30を生成する着色画像生成モデルを生成する。
The
また、画像着色装置100は、着色対象のモノクローム画像10である対象モノクローム画像10aと、べた塗り画像20であり前記対象モノクローム画像10に対応する対応べた塗り画像20aとに基づき、着色画像30であり前記対象モノクローム画像10に対応する対応着色画像30aを生成する装置である。各画像10,10a,20,20a,30,30aは、任意のファイル形式・解像度・深度のデジタルデータからなる。
The
モノクローム画像10には対象モノクローム画像10aが含まれる。すなわち、対象モノクローム画像10aは、モノクローム画像10の1つであり、着色処理の対象として画像着色装置100に入力されるものである。
The
モノクローム画像10は無彩色の画像を意味する。ここで、モノクローム画像10は、白黒二値のデジタルデータであってもよいし、グレースケールのデジタルデータであってもよい。本実施の形態では、モノクローム画像10は、漫画を所定の解像度でスキャンしたデジタルデータ、又は、漫画をスキャンしたモノクローム画像10と同等のスタイルとなるようにコンピュータにより作成されたデジタルデータからなる。
The
図2に示すように、漫画に係るモノクローム画像10は、無彩色の線画部11と、無彩色のパターン又は濃淡により陰影又は色彩或いはテクスチャを表現した陰影等表現部12とを含む。
As shown in FIG. 2, a
線画部11は、紙媒体ではペンや筆などにより描画された領域であり、強いコントラストをもつモノクローム画像を主とする。すなわち、線画部11は、実質的に白黒二値画像を主とする。なお、線画部11は、中間階調のグレーにより描画されていてもよい。また、線画部11は、デジタルデータとしてのモノクローム画像10においては、白黒二値による線画がスムーズとなるように中間階調のグレーのピクセルが含まれていてもよい。図2の例では、顔・手・体・服・アクセサリー等の各パーツの輪郭線や稜線を表現している箇所が線画部11である。
The line drawing portion 11 is an area drawn with a pen or brush on paper media, and is mainly a monochrome image with strong contrast. That is, the line drawing portion 11 is essentially mainly a black and white binary image. The line drawing portion 11 may be drawn in mid-tone gray. Furthermore, in the
陰影等表現部12は、紙媒体では「スクリーントーン」と呼ばれるテンプレートを貼り付けることにより形成することができる。スクリーントーンは、白黒二値の細かいドット・模様・ラインなどの連続的なパターンにより擬似的に中間階調を表現可能とするものである。陰影等表現部12は、中間階調のグレーを含んでいてもよい。なお、陰影等表現部12は、スクリーントーンと同等の効果が得られるように手書きにより形成することもできる。図2の例では、顎下や脇下の肌の陰影、髪の毛の色彩及びテクスチャ、服の色彩及びテクスチャを表現している箇所が陰影等表現部12である。陰影等表現部12は、デジタルデータとしてのモノクローム画像10においては、白黒二値によるパターンがスムーズとなるように中間階調のグレーのピクセルが含まれていてもよい。なお、画像データの解像度によっては、陰影等表現部12は、デジタルデータとしてのモノクローム画像10においては実質的に中間階調のグレーのピクセルの集合となっていてもよい。
The shading and other expression section 12 can be formed by pasting a template called "screen tone" on paper media. Screen tone is a technique that allows the expression of intermediate gradations to be expressed in a pseudo manner using continuous patterns such as fine black and white binary dots, patterns, and lines. The shading and other expression section 12 may include intermediate gradation gray. The shading and other expression section 12 can also be formed by hand so as to obtain an effect equivalent to that of a screen tone. In the example of FIG. 2, the shading and other expression section 12 is the area that expresses the shading of the skin under the chin and under the armpits, the color and texture of the hair, and the color and texture of the clothes. In the
べた塗り画像20には対応べた塗り画像20aが含まれる。すなわち、対応べた塗り画像20aは、べた塗り画像20の1つであり、着色処理において対象モノクローム画像10aと組になるものとして画像着色装置100に入力されるものである。
The solid-
べた塗り画像20は、モノクローム画像10に対応する画像である。べた塗り画像20は、対応するモノクローム画像10への着色についての色彩及び位置(領域)を指示する画像である。べた塗り画像20は、対応するモノクローム画像10に基づき、人手により又はコンピュータにより生成される。本実施の形態では、べた塗り画像20は人手により生成されたものを用いた。
The
図3は、図2に例示するモノクローム画像10に対応するべた塗り画像の一例である。べた塗り画像20は、図3に示すように、所定の着色領域21に単一の任意の色彩が着色されている。べた塗り画像20には複数の着色領域21が含まれていてもよい。この場合、複数の着色領域21は隣接していてもよいし互いに離隔していてもよい。本実施の形態では、べた塗り画像20は、モノクローム画像10に対応するが、前記モノクローム画像10は含まない。着色領域21は、対応するモノクローム画像10における陰影等表現部12に対応する領域を含む。図3の例では、顔から首にかけての着色領域21が、図2において顎下に形成された陰影等表現部12に対応する領域を含む。
Figure 3 is an example of a solid-color image corresponding to the
着色画像30には対応着色画像30aが含まれる。すなわち、対応着色画像30aは、着色画像30の1つであり、対象モノクローム画像10a及び対応べた塗り画像20aを入力とする着色処理により画像着色装置100から出力されるものである。画像着色装置100の学習処理において入力画像の1つとして用いられる着色画像30は、対応するモノクローム画像10及びべた塗り画像20に基づき人手により生成されたものである。この学習処理において用いられる着色画像30は、当該学習処理における「正解(Ground Truth)」に相当する。
The
図4は、図2に例示するモノクローム画像10及び図3に例示するべた塗り画像20に対応する着色画像の一例である。着色画像30は、図4に示すように、モノクローム画像10における陰影等表現部12に対応する領域が、べた塗り画像20における当該陰影等表現部12が含まれる着色領域21に付された色彩とは異なる色彩で着色されていてもよい。すなわち、モノクローム画像10は無彩色であることから陰影又は色彩或いはテクスチャを表現するために無彩色のパターンや濃淡からなる陰影等表現部12を形成していたが、着色画像30では当該表現を色彩による表現に置換したものである。
Figure 4 is an example of a colored image corresponding to the
次に、画像着色装置100について詳述する。図1に示すように、画像着色装置100は、学習処理部110と、着色画像生成処理部120と、着色画像生成モデル130とを備えている。
Next, the
画像着色装置100は、主演算装置・主記憶装置・補助記憶装置・入力装置・表示装置・ネットワーク装置等を備えた従来周知のコンピュータからなる。画像着色装置100の各部は、コンピュータにプログラムをインストールすることにより構成することができる。画像着色装置100の実装形態は不問である。例えば、画像着色装置100は複数の装置に分散して実装することができる。
The
学習処理部110は、モノクローム画像10と、モノクローム画像10に対応するべた塗り画像20と、モノクローム画像10及びべた塗り画像20に対応した着色画像30とを学習データとして用いた機械学習により、モノクローム画像10及びべた塗り画像20から着色画像30を生成する着色画像生成モデル130を生成する。各画像10,20,30は、自身の所定の記憶装置に予め保存していてもよいし、所定の外部記憶媒体から取得してもよいし、ネットワークを介して他の装置から取得してもよい。
The
着色画像生成処理部120は、生成された着色画像生成モデル130と、着色対象のモノクローム画像10である対象モノクローム画像10aと、べた塗り画像20であり前記対象モノクローム画像10aに対応する対応べた塗り画像20aとに基づき、着色画像30であり前記対象モノクローム画像10aに対応する対応着色画像30aを生成する。対象モノクローム画像10a及び対応べた塗り画像20aは、自身の所定の記憶装置に予め保存していてもよいし、所定の外部記憶媒体から取得してもよいし、ネットワークを介して他の装置から取得してもよい。着色画像生成処理部120は、生成した対応着色画像30aを自身の表示装置に出力したり、自身の所定の記憶装置に出力したり、所定の外部記憶媒体に出力したり、ネットワークを介して他の装置に出力することができる。
The colored image
着色画像生成モデル130は、敵対的生成ネットワークからなる。着色画像生成モデル130の実体は、画像着色装置100の所定の記憶装置に記憶されたプログラム及び当該プログラムにより用いられ学習処理により変化する各種パラメータからなる。以下、着色画像生成モデル130の構成及び学習処理部110の処理について図5及び図6を参照して詳述する。図5は学習の第1ステージについて説明する図、図6は学習の第2ステージについて説明する図である。
The colored
着色画像生成モデル130は、2つの生成器(生成ネットワーク)を備える。第1の生成器は、図5に示すように、着色画像30をモノクローム画像10に変換する。一方、第2の生成器は、図6に示すように、モノクローム画像10及びべた塗り画像20の組から着色画像30を生成する。これらの2つの生成器は別々に学習される。ここでは、着色画像30をモノクローム画像10に変換する段階を第1ステージと呼ぶ。また、モノクローム画像10及びべた塗り画像20の組から着色画像30を生成する段階を第2ステージと呼ぶ。
The colored
学習データは、着色画像30、モノクローム画像20、べた塗り画像20の組(x,y,z)からなる。まず、第1ステージでは、生成器GAが、いかに着色画像30からモノクローム画像10を生成するかを学習する。この処理は、着色画像30から色彩情報を取り除き、対応するモノクローム画像10の位置とパターンを予測(predict)する。図4に示すように、着色画像30は、モノクローム画像10を予測するために十分な情報を含んでいる。この学習処理は、Pix2Pixにおける処理に準ずる。なお、Pix2Pixにおける処理については、非特許文献2を参照されたい。
The training data consists of a set (x, y, z) of a
[第1ステージ]
本実施の形態では、UNetアーキテクチャを生成器GAに適用する。着色画像30をx、モノクローム画像10をyとすると、生成器GAの損失関数(discriminative loss)は次式(1)により表される。
[First Stage]
In this embodiment, the UNet architecture is applied to the generator G A. If the
ここで、生成器GAは、いかに判別器(識別ネットワーク)DAを騙すかを学習する。一方、判別器DAは、偽物と本物とを判別するよう学習する。前記式(1)の損失関数に加えて、本実施の形態では、下記式(2)に示すように、正解モノクローム画像yと生成された画像GA(x)との間のL1距離に基づく損失を用いる。 Here, the generator G A learns how to fool the discriminator (identification network) D A. Meanwhile, the discriminator D A learns to distinguish between fakes and real objects. In addition to the loss function of the above formula (1), this embodiment uses a loss based on the L1 distance between the correct monochrome image y and the generated image G A (x), as shown in the following formula (2).
生成器GAの最終目標は下記式(3)のようになる。 The final goal of the generator G A is expressed by the following equation (3).
[第2ステージ]
第1ステージによる学習の後に第2ステージに移る。第2ステージでは、べた塗り画像20とモノクローム画像10の組を入力とする。生成器GBは、べた塗り画像20とモノクローム画像10から着色画像30をいかに生成するかを学習する。生成モデルはUNetの拡張である。2つの入力から1つの出力を取得するために、モデルは2つのストリーム構造を有する。
[Second Stage]
After the first stage, we move to the second stage. In the second stage, a pair of a
着色画像30をx、モノクローム画像10をy、べた塗り画像20をzとする。生成器GBの損失関数は次式(4)により表される。
Let x be the
ここで、生成器GBは、いかに判別器(識別ネットワーク)DBを騙すかを学習する。一方、判別器DAは、偽物と本物とを分類するよう学習する。また、本実施の形態では、下記式(5)に示すように、出力の品質(精度)を向上させるためにL1距離に基づく損失を用いる。 Here, the generator G B learns how to fool the discriminator (classification network) D B. Meanwhile, the discriminator D A learns to classify fakes and real objects. In this embodiment, a loss based on the L1 distance is used to improve the quality (accuracy) of the output, as shown in the following formula (5).
さらに、サイクル・コンシステンシー(cycle consistency)を維持するために、生成器GBによって生成された着色画像30を、学習済みの生成器GAに入力する。学習済み生成器GAからの偽モノクローム画像と正解モノクローム画像との間のL1距離を算出する(次式(6)の第2項)。生成器GBの最終目標は下記式(6)のようになる。
Furthermore, to maintain cycle consistency, the
このように、本実施の形態に係る着色画像生成モデル130では、第2ステージにおいては、生成器GBで生成された着色画像30を入力として学習済みの生成器GAにより生成されたモノクローム画像も用いて学習処理を行っている。
As described above, in the colored
前記着色画像生成処理部120は、学習済みの生成器GBを用いて対象モノクローム画像10a及び対応べた塗り画像20aから対応着色画像30aを生成する。
The colored image
次に本実施の形態に係る画像着色装置100の動作について図7のフローチャートを参照して説明する。
Next, the operation of the
まず、画像着色装置100は、モノクローム画像10、べた塗り画像20、着色画像30からなる学習データを用いて学習処理を行って着色画像生成モデル130を生成する(ステップS1)。次に、画像着色装置100は、処理対象となるモノクローム画像10aと、当該モノクローム画像10aに対応する対応べた塗り画像20aとをそれぞれ取得し(ステップS2,S3)、着色画像生成モデル130を用いて対応着色画像30aを生成する(ステップS4)。
First, the
図8に本実施の形態に係る画像着色装置100による着色処理例を示す。本例では、上述した作品「ねこだま」からランダムに10ページを選び、5ページを学習処理に用い、その他の5ページを着色対象とした。なお、図8の例では、比較対象画像として、本実施の形態の着色画像生成モデル130から第1ステージの処理と第2ステージにおける生成器GAについての処理を省略した着色画像生成モデルを用いたものを示している。
Fig. 8 shows an example of coloring processing by the
図8に示すように、本実施の形態に係る画像着色装置100によれば、出力画像である対応着色画像30aは正解画像である着色画像30と極めて近似しており着色精度が高いことが確認できた。特に、本実施の形態に係る画像着色装置100では、少ない学習データでの学習処理でも高い着色精度を得られること、また陰影等表現部12の着色が適切であることが確認できた。
As shown in FIG. 8, with the
このような画像着色装置100によれば、着色画像生成モデルは、無彩色のモノクローム画像10と、モノクローム画像10に対応する所定の着色領域に単一の色彩が着色され且つモノクローム画像10を含まないべた塗り画像20と、モノクローム画像10に対応した着色画像30とを学習データとして用いて機械学習により生成される。すなわち、着色対象の位置及びその色彩の情報を含むべた塗り画像20が機械学習に用いられるので、対象モノクローム画像10aに対する着色位置及びその色彩の精度が向上する。すなわち、本発明によれば適切な着色が可能となる。
According to such an
なお、上述のように、本発明ではべた塗り画像20が必要である。しかし、当該べた塗り画像20は、高度な専門的技能や知識がなくても、人手により又は画像処理装置によりモノクローム画像10から容易に導出することができる。したがって、本発明によれば、高度な専門的技能や知識がなくても、容易且つ適切な着色が可能となる。
As described above, the present invention requires a solid-
(第2の実施の形態)
本発明の第2の実施の形態に係る画像着色装置について図面を参照して説明する。図9は第2の実施の形態に係る画像着色装置の機能ブロック図、図10はカラーヒント作成画面の一例である。
Second Embodiment
An image coloring device according to a second embodiment of the present invention will be described with reference to the drawings. Fig. 9 is a functional block diagram of the image coloring device according to the second embodiment, and Fig. 10 shows an example of a color hint creation screen.
本実施の形態に係る画像着色装置が第1の実施の形態と異なる点は、べた塗り画像20の作成方法にある。すなわち、第1の実施の形態ではべた塗り画像20は対応するモノクローム画像10から人手により作成していたが、本実施の形態では画像着色装置100’においてモノクローム画像10から作成する。他の点については第1の実施の形態と同様なので、ここでは相違点のみを説明する。
The image coloring device of this embodiment differs from the first embodiment in the method of creating the
本実施の形態に係る画像着色装置100’は、図9に示すように、べた塗り画像生成部140を備えている。べた塗り画像生成部140は、モノクローム画像10から当該モノクローム画像10に対応するべた塗り画像20を生成する。より詳しくは、べた塗り画像生成部140は、図10に示すように、モノクローム画像10を所定の表示装置(図示省略)に出力し、利用者から1つ以上のカラーヒント141の入力を受け付ける。カラーヒント141は、色彩情報及び画像内の位置情報を示す。べた塗り画像生成部140は、入力されたカラーヒント141をモノクローム画像10に所定の表示形態で重畳表示する。図10の例では、カラーヒント141は色彩を有する円形のマークとして表示している。べた塗り画像生成部140は、入力されたカラーヒント141の位置情報に基づき、モノクローム画像10において線画部11を境界とする閉領域を探索し、当該閉領域を着色領域としてカラーヒントの色彩で着色することによりべた塗り画像20を生成する。閉領域の探索アルゴリズムは従来周知の種々のものを用いることができる。なお、べた塗り画像生成部140は、生成したべた塗り画像20を所定の記憶装置や外部の記憶装置に保存したり、外部の装置に送信したりすることができる。
The image coloring device 100' according to the present embodiment includes a solid
このような画像着色装置100’によれば、べた塗り画像20を半自動で生成することができるので着色処理の効率が向上する。他の作用・効果については第1の実施の形態と同様である。
With this image coloring device 100', the
以上、本発明の一実施の形態について詳述したが、本発明は上記実施の形態に限定されるものではなく、本発明の主旨を逸脱しない範囲において、種々の改良や変更をしてもよい。 Although one embodiment of the present invention has been described in detail above, the present invention is not limited to the above embodiment, and various improvements and modifications may be made without departing from the spirit and scope of the present invention.
例えば、上記実施の形態では、スクリーン等による陰影等表現部12が形成されたモノクローム画像10を着色対象としたが、陰影等表現部12が形成されていないモノクローム画像10であっても本発明を適用できる。
For example, in the above embodiment, the
また、上記実施の形態では、ベタ画像20として、モノクローム画像10に対応するが、当該モノクローム画像10自体は含まれないものを用いたが、対応するモノクローム画像10の一部又は全部を含んでいてもよい。
In addition, in the above embodiment, the
また、上記実施の形態では、着色画像生成モデル130として敵対的生成ネットワークを用いたが他のモデルを用いても本発明を適用できる。例えば、べた塗り画像とモノクローム画像とを入力として着色画像を出力する畳み込みニューラルネットワークであっても本発明を適用できる。
In addition, in the above embodiment, a generative adversarial network is used as the colored
また、上記実施の形態では、着色画像生成モデル130を生成する学習処理部110と、着色画像生成モデル130を用いて対応着色画像30aを生成する着色画像生成部120とを同一の装置に実装していたが、異なる装置に分散して実装してもよい。この場合、学習処理部110により生成された着色画像生成モデル130は、学習処理部110が実装された装置から着色画像生成部120が実装された装置に転送・実装すればよい。これにより、着色画像生成モデル130の生成処理と、着色画像生成モデル130による着色処理とを、それぞれ異なる者・場所・時間で独立して実施することができるので、利便性が向上したものとなる。
In addition, in the above embodiment, the
10…モノクローム画像
10a…対象モノクローム画像
20…べた塗り画像
20a…対応べた塗り画像
30…着色画像
30a…対応着色画像
100,100’…画像着色装置
110…学習処理部
120…着色画像生成処理部
130…着色画像生成モデル
140…べた塗り画像生成部
REFERENCE SIGNS
Claims (10)
無彩色のモノクローム画像と、前記モノクローム画像に対応する所定の着色領域に単一の色彩が着色されたべた塗り画像と、前記モノクローム画像に対応した着色画像とを学習データとして用いた機械学習により、前記モノクローム画像及び前記べた塗り画像から前記着色画像を生成する着色画像生成モデルを生成するモデル生成ステップと、
生成された着色画像生成モデルと、着色対象の前記モノクローム画像である対象モノクローム画像と、前記べた塗り画像であり前記対象モノクローム画像に対応する対応べた塗り画像とに基づき、前記着色画像であり前記対象モノクローム画像に対応する対応着色画像を生成する着色画像生成ステップとを備えた
ことを特徴とする画像着色方法。 The computer
a model generation step of generating a colored image generation model that generates the colored image from the monochrome image and the solid image by machine learning using, as learning data, an achromatic monochrome image, a solid image in which a predetermined colored region corresponding to the monochrome image is colored with a single color, and a colored image corresponding to the monochrome image;
and a colored image generation step of generating a corresponding colored image which is a colored image and corresponds to the target monochrome image based on the generated colored image generation model, a target monochrome image which is the monochrome image to be colored, and a corresponding solid image which is the solid image and corresponds to the target monochrome image.
前記べた塗り画像の着色領域は前記陰影等表現部に対応する領域を含む
ことを特徴とする請求項1記載の画像着色方法。 the monochrome image includes an achromatic line drawing portion and a shading or other representation portion that represents shading, color, or texture by an achromatic pattern or shading,
2. The image coloring method according to claim 1, wherein the colored area of the solid-color image includes an area corresponding to the portion expressing shading or the like.
ことを特徴とする請求項2記載の画像着色方法。 The image coloring method according to claim 2, characterized in that the colored image is colored in a color different from a color applied to a colored area including the shading or other representation in the solid image in an area corresponding to the shading or other representation in the monochrome image.
ことを特徴とする請求項1乃至3何れか1項記載の画像着色方法。 The image coloring method according to any one of claims 1 to 3, wherein the colored image generation model is a generative adversarial network.
前記着色画像に基づき前記モノクローム画像を生成する第1の生成ネットワークと、前記第1の生成ネットワークに入力された前記着色画像及び前記第1の生成ネットワークで生成された前記モノクローム画像に基づき真偽判定を行う第1の識別ネットワークとを備えた第1の敵対的生成ネットワークと、
前記べた塗り画像及び前記モノクローム画像に基づき前記着色画像を生成する第2の生成ネットワークと、前記第2の生成ネットワークに生成された前記着色画像並びに前記第2の生成ネットワークで入力された前記べた塗り画像及び前記モノクローム画像に基づき真偽判定を行う第2の識別ネットワークとを備えた第2の敵対的生成ネットワークとを備え、
前記モデル生成ステップは、前記第1の敵対的生成ネットワークの学習ステップと、前記第2の敵対的生成ネットワークの学習ステップとを備え、
前記第2の敵対的生成ネットワークの学習ステップにおいては、前記第2の生成ネットワークで生成された前記着色画像並びに前記第2の生成ネットワークに入力された前記べた塗り画像及び前記モノクローム画像に加えて、前記第2の生成ネットワークで生成された前記着色画像を入力として学習済みの前記第1の生成ネットワークにより生成された前記モノクローム画像を用いて学習処理を行い、
前記着色画像生成ステップにおいては、学習済みの前記第2の敵対的生成ネットワークの第2の生成ネットワークを用いて前記対象モノクローム画像及び前記対応べた塗り画像から前記対応着色画像を生成する
ことを特徴とする請求項4記載の画像着色方法。 The colored image generation model is
A first generative adversarial network including a first generative network that generates the monochrome image based on the colored image, and a first discrimination network that performs authenticity determination based on the colored image input to the first generative network and the monochrome image generated by the first generative network;
a second generative adversarial network including a second generative network that generates the colored image based on the solid image and the monochrome image, and a second discrimination network that performs authenticity determination based on the colored image generated by the second generative network and the solid image and the monochrome image input to the second generative network;
The model generation step includes a training step of the first generative adversarial network and a training step of the second generative adversarial network,
In the learning step of the second generative adversarial network, in addition to the colored image generated by the second generative network and the solid image and monochrome image input to the second generative network, a learning process is performed using the monochrome image generated by the first generative network that has been trained using the colored image generated by the second generative network as an input,
5. The image coloring method according to claim 4, wherein in the colored image generating step, the corresponding colored image is generated from the target monochrome image and the corresponding solid image using a second generative network of the second generative adversarial network that has been trained.
前記モデル生成部により生成された着色画像生成モデルと、着色対象の前記モノクローム画像である対象モノクローム画像と、前記べた塗り画像であり前記対象モノクローム画像に対応する対応べた塗り画像とに基づき、前記着色画像であり前記対象モノクローム画像に対応する対応着色画像を生成する着色処理部とを備えた
ことを特徴とする画像着色装置。 a model generation unit that generates a colored image generation model that generates the colored image from the monochrome image and the solid image by machine learning using, as learning data, an achromatic monochrome image, a solid image in which a predetermined colored region corresponding to the monochrome image is colored with a single color, and a colored image corresponding to the monochrome image;
an image coloring device comprising: a coloring processing unit that generates a corresponding colored image, which is the colored image and corresponds to the target monochrome image, based on a colored image generation model generated by the model generation unit, a target monochrome image, which is the monochrome image to be colored, and a corresponding solid image, which is the solid image and corresponds to the target monochrome image.
前記着色画像生成モデルと、着色対象の前記モノクローム画像である対象モノクローム画像と、前記べた塗り画像であり前記対象モノクローム画像に対応する対応べた塗り画像とに基づき、前記着色画像であり前記対象モノクローム画像に対応する対応着色画像を生成する着色処理部とを備えた
ことを特徴とする画像着色装置。 a colored image generation model that is generated by machine learning using, as learning data, an achromatic monochrome image, a solid-color image in which a predetermined colored region corresponding to the monochrome image is colored with a single color, and a colored image corresponding to the monochrome image, and that generates the colored image from the monochrome image and the solid-color image;
an image coloring device comprising: a coloring processing unit that generates the corresponding colored image, which is the colored image and corresponds to the target monochrome image, based on the colored image generation model, a target monochrome image, which is the monochrome image to be colored, and a corresponding solid image, which is the solid image and corresponds to the target monochrome image.
ことを特徴とする着色画像生成モデルの生成装置。 A colored image generation model generating device comprising: a model generation unit that generates a colored image generation model that generates a colored image from a monochrome image and the solid image by machine learning using, as learning data, an achromatic monochrome image, a solid image in which a predetermined colored region corresponding to the monochrome image is colored with a single color, and a colored image corresponding to the monochrome image.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2021115211A JP7675367B2 (en) | 2021-07-12 | 2021-07-12 | Image coloring method and device, colored image generation model generating device, and program |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2021115211A JP7675367B2 (en) | 2021-07-12 | 2021-07-12 | Image coloring method and device, colored image generation model generating device, and program |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JP2023011381A JP2023011381A (en) | 2023-01-24 |
| JP7675367B2 true JP7675367B2 (en) | 2025-05-13 |
Family
ID=85120109
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2021115211A Active JP7675367B2 (en) | 2021-07-12 | 2021-07-12 | Image coloring method and device, colored image generation model generating device, and program |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP7675367B2 (en) |
Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2018197948A (en) | 2017-05-23 | 2018-12-13 | 株式会社Preferred Networks | Line drawing automatic coloring program, line drawing automatic coloring apparatus and graphical user interface program |
| JP2019133303A (en) | 2018-01-30 | 2019-08-08 | 株式会社Preferred Networks | Information processor and information processing program and information processing method |
| JP2020107239A (en) | 2018-12-28 | 2020-07-09 | 株式会社Cygames | Image processing method, image processing system and program |
| JP2020144778A (en) | 2019-03-08 | 2020-09-10 | 日本放送協会 | Video colorizer, color information estimation model generator and their programs |
-
2021
- 2021-07-12 JP JP2021115211A patent/JP7675367B2/en active Active
Patent Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2018197948A (en) | 2017-05-23 | 2018-12-13 | 株式会社Preferred Networks | Line drawing automatic coloring program, line drawing automatic coloring apparatus and graphical user interface program |
| JP2019133303A (en) | 2018-01-30 | 2019-08-08 | 株式会社Preferred Networks | Information processor and information processing program and information processing method |
| JP2020107239A (en) | 2018-12-28 | 2020-07-09 | 株式会社Cygames | Image processing method, image processing system and program |
| JP2020144778A (en) | 2019-03-08 | 2020-09-10 | 日本放送協会 | Video colorizer, color information estimation model generator and their programs |
Also Published As
| Publication number | Publication date |
|---|---|
| JP2023011381A (en) | 2023-01-24 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JP7011146B2 (en) | Image processing device, image processing method, image processing program, and teacher data generation method | |
| CN111696028B (en) | Real scene image cartoonization processing method, device, computer equipment and storage medium | |
| JP7303844B2 (en) | DATA EXTENSION SYSTEM, DATA EXTENSION METHOD, AND PROGRAM | |
| US11024060B1 (en) | Generating neutral-pose transformations of self-portrait images | |
| US9501724B1 (en) | Font recognition and font similarity learning using a deep neural network | |
| US8406566B1 (en) | Methods and apparatus for soft edge masking | |
| Yi et al. | Line drawings for face portraits from photos using global and local structure based GANs | |
| KR20200052438A (en) | Deep learning-based webtoons auto-painting programs and applications | |
| CN110853119B (en) | Reference picture-based makeup transfer method with robustness | |
| CN110609979A (en) | Synthesizing new font glyphs from partial observations | |
| JP7242165B2 (en) | Program, Information Processing Apparatus, and Method | |
| CN111161137A (en) | Multi-style Chinese painting flower generation method based on neural network | |
| CN107730568B (en) | Coloring method and device based on weight learning | |
| KR20200064591A (en) | Webtoons color customizing programs and applications of deep learning | |
| CN116634242A (en) | Speech-driven speaking video generation method, system, equipment and storage medium | |
| JP2013074538A (en) | Image processing apparatus, image processing method, and program | |
| CN118196859A (en) | Image hairstyle redrawing method, device and equipment based on diffusion model | |
| KR20210040702A (en) | Mosaic generation apparatus and method thereof | |
| Jalan et al. | Suspect face generation | |
| JP6711020B2 (en) | Image processing apparatus, image processing method, image processing system and program | |
| JP7675367B2 (en) | Image coloring method and device, colored image generation model generating device, and program | |
| Thakur et al. | White-box cartoonization using an extended gan framework | |
| Park et al. | StyleBoost: a study of personalizing text-to-image generation in any style using DreamBooth | |
| Lee et al. | AutoCaCoNet: Automatic Cartoon Colorization Network using self-attention GAN, segmentation, and color correction | |
| Jolly et al. | Bringing monochrome to life: A GAN-based approach to colorizing black and white images |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| RD01 | Notification of change of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7426 Effective date: 20210728 |
|
| A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A821 Effective date: 20210728 |
|
| A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20240605 |
|
| A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20250321 |
|
| 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: 20250326 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20250415 |
|
| R150 | Certificate of patent or registration of utility model |
Ref document number: 7675367 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |