JP6886887B2 - Error calculator and its program - Google Patents
Error calculator and its program Download PDFInfo
- Publication number
- JP6886887B2 JP6886887B2 JP2017150154A JP2017150154A JP6886887B2 JP 6886887 B2 JP6886887 B2 JP 6886887B2 JP 2017150154 A JP2017150154 A JP 2017150154A JP 2017150154 A JP2017150154 A JP 2017150154A JP 6886887 B2 JP6886887 B2 JP 6886887B2
- Authority
- JP
- Japan
- Prior art keywords
- error
- feature amount
- color information
- image
- resolution
- 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
- 238000004364 calculation method Methods 0.000 claims description 33
- 230000015572 biosynthetic process Effects 0.000 claims description 17
- 238000003786 synthesis reaction Methods 0.000 claims description 17
- 230000002194 synthesizing effect Effects 0.000 claims description 15
- 238000012549 training Methods 0.000 claims description 6
- 238000001914 filtration Methods 0.000 claims description 3
- 238000000605 extraction Methods 0.000 description 35
- 238000000034 method Methods 0.000 description 31
- 238000013528 artificial neural network Methods 0.000 description 20
- 239000013598 vector Substances 0.000 description 15
- 238000004040 coloring Methods 0.000 description 13
- 238000002474 experimental method Methods 0.000 description 11
- 239000000284 extract Substances 0.000 description 9
- 238000012545 processing Methods 0.000 description 9
- 239000003638 chemical reducing agent Substances 0.000 description 7
- 239000002131 composite material Substances 0.000 description 7
- 238000007796 conventional method Methods 0.000 description 7
- 230000002093 peripheral effect Effects 0.000 description 7
- 238000010586 diagram Methods 0.000 description 6
- 230000006870 function Effects 0.000 description 5
- 238000010801 machine learning Methods 0.000 description 5
- 238000013527 convolutional neural network Methods 0.000 description 4
- 238000005457 optimization Methods 0.000 description 4
- 230000000052 comparative effect Effects 0.000 description 3
- 238000009826 distribution Methods 0.000 description 3
- 239000003086 colorant Substances 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 239000006185 dispersion Substances 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 238000009499 grossing Methods 0.000 description 1
- 230000012447 hatching Effects 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 239000011159 matrix material Substances 0.000 description 1
Images
Description
本発明は、誤差計算器およびそのプログラムに関し、特に、ニューラルネットワークの学習における誤差を計算する誤差計算器およびそのプログラムに関する。 The present invention relates to an error computer and its program, and more particularly to an error computer and its program for calculating errors in learning a neural network.
従来、デジタルデータ化されたモノクロ画像への自動色付け技術が複数開発されている。デジタルデータ化されたモノクロ画像には、画像特徴量であるカラー情報の手がかりがほとんどない。このため、フィルムなどの物理媒体に記録されたアナログ画像のカラー化と比べて、難易度が高いといわれている。例えば、モノクロデータをカラーデータに変換する方法が知られている(特許文献1参照)。この方法は、モノクロデータに記録された特定の物体を仮定し、この特定の物体から色分布モデルを計算する。そして、計算した色分布モデルからカラー情報を推定する。この方法では、カラー化する対象を特定の物体と仮定しているため、この仮定した物体とモノクロ画像の中の物体とが異なる場合には、モノクロ画像を自然なカラー画像に変換することは難しい。 Conventionally, a plurality of automatic coloring techniques for monochrome images converted into digital data have been developed. Monochrome images converted to digital data have few clues for color information, which is an image feature amount. Therefore, it is said that the difficulty level is higher than that of colorizing an analog image recorded on a physical medium such as a film. For example, a method of converting monochrome data into color data is known (see Patent Document 1). This method assumes a specific object recorded in monochrome data and calculates a color distribution model from this specific object. Then, the color information is estimated from the calculated color distribution model. In this method, it is assumed that the object to be colorized is a specific object, so if the assumed object and the object in the monochrome image are different, it is difficult to convert the monochrome image into a natural color image. ..
このような問題を解決するため、近年、いわゆる機械学習技術を用いて、カラー化する対象をより汎用的にしたカラー情報の推定方法が複数提案されている(非特許文献1、非特許文献2参照)。これらの機械学習技術を用いたカラー情報の推定方法では、さまざまな物体が写った膨大な量のカラー画像を用意することを前提としている。そして、このような膨大な量のカラー画像に基づいて機械学習し、カラー情報推定器を生成する。この
際、例えば、いわゆるニューラルネットワーク等で構成された機械学習器に、予め用意した膨大なカラー画像を入力し、モノクロ画像とカラー情報との対応関係を学習させる。このように生成したカラー情報推定器により、多様なモノクロ画像から精度よくカラー情報を推定することができる。これにより、デジタルデータ化されたモノクロ画像を自然なカラー画像に変換することが可能である。
In order to solve such a problem, in recent years, a plurality of methods for estimating color information that make the object to be colorized more general by using so-called machine learning technology have been proposed (Non-Patent
しかしながら、従来技術では、推定されたカラー情報(例えば、画像特徴量)と真のカラー情報(例えば、画像特徴量)に関して、画素ごとに独立して比較して求めた値をもとにした誤差を計算する。そのため、例えばカラー情報に関して、画素ごとの誤差が小さくなる方向に学習が進むだけであり、ある画素とその隣接画素との間における色の均一性などが全く考慮されない。したがって、推定されたカラー情報において、本来は同じ色であると推定されるべき領域が斑になり易い。例えば、雲のない空の風景は、一般に一様に青くなるべきであるが、従来技術では、人間の目から見て正しくない、不自然な色むらが発生してしまうという問題がある。 However, in the prior art, an error based on a value obtained by independently comparing the estimated color information (for example, image feature amount) and the true color information (for example, image feature amount) for each pixel. To calculate. Therefore, for example, with respect to color information, learning proceeds only in a direction in which the error for each pixel becomes smaller, and color uniformity between a certain pixel and its adjacent pixels is not considered at all. Therefore, in the estimated color information, the region that should be estimated to be the same color is likely to be spotted. For example, a landscape in the sky without clouds should generally be uniformly blue, but the prior art has the problem of causing unnatural color unevenness that is incorrect to the human eye.
本発明は、以上のような問題点に鑑みてなされたものであり、ニューラルネットワークのパラメータを学習する際に計算される推定値と真の値との誤差に関して、人間の目から見てより正しい画像が出力できるような誤差を計算することができる誤差計算器およびそのプログラムを提供することを目的とする。 The present invention has been made in view of the above problems, and is more correct from the human eye with respect to the error between the estimated value and the true value calculated when learning the parameters of the neural network. It is an object of the present invention to provide an error calculator capable of calculating an error that can output an image and a program thereof.
前記課題を解決するため、本発明に係る誤差計算器は、推定カラー情報である第1の画像特徴量と真のカラー情報である第2の画像特徴量との誤差を計算する誤差計算器であって、特徴量マップ作成手段と、第1誤差算出手段と、誤差合成手段と、を備えることとした。 In order to solve the above problems, the error calculator according to the present invention is an error calculator that calculates the error between the first image feature amount which is the estimated color information and the second image feature amount which is the true color information. Therefore, it was decided to provide a feature amount map creating means, a first error calculating means, and an error synthesizing means.
かかる構成によれば、誤差計算器は、特徴量マップ作成手段によって、前記第1の画像特徴量および前記第2の画像特徴量から、所定演算により画像内における複数の画素の関係性を特徴付ける特徴量を抽出して第1の特徴量マップおよび第2の特徴量マップをそれぞれ作成する。
そして、誤差計算器は、第1誤差算出手段によって、前記第1の特徴量マップと前記第2の特徴量マップとに対応する画素間の画素値の誤差に基づく特徴量マップ間の誤差を算出する。
そして、誤差計算器は、誤差合成手段によって、前記第1の画像特徴量と前記第2の画像特徴量とに対応する画素間の画素値の誤差に基づいて算出された画像特徴量間の誤差を入力し、前記画像特徴量間の誤差と、前記特徴量マップ間の誤差と、を加算し、合成誤差を生成する。
According to such a configuration, the error calculator uses the feature amount map creating means to characterize the relationship of a plurality of pixels in the image from the first image feature amount and the second image feature amount by a predetermined calculation. The quantity is extracted to create a first feature map and a second feature map, respectively.
Then, the error calculator calculates the error between the feature amount maps based on the error of the pixel value between the pixels corresponding to the first feature amount map and the second feature amount map by the first error calculation means. To do.
Then, the error calculator is an error between the image feature amounts calculated based on the error of the pixel value between the pixels corresponding to the first image feature amount and the second image feature amount by the error synthesizing means. Is input, and the error between the image feature quantities and the error between the feature quantity maps are added to generate a composite error.
また、本発明は、コンピュータを、前記誤差計算器として機能させるための誤差計算プログラムで実現することもできる。 The present invention can also be realized by an error calculation program for causing the computer to function as the error calculator.
本発明は、以下に示す優れた効果を奏するものである。
本発明に係る誤差計算器によれば、複数の画素の関係性をそれぞれ反映した2つの特徴量マップ間の誤差を算出し、画素ごとに独立して比較して求めた値をもとにした誤差に対して、特徴量マップ間の誤差を加算することで合成誤差を求めることができる。
したがって、学習器が、この合成誤差を最小化するようにニューラルネットワークのパラメータを学習すれば、ある画素とその隣接画素との間における関係性についても学習することができる。そのため、この合成誤差を用いた学習を行った学習器によって推定された画像特徴量に基づく画像は、人間の目から見てより正しい画像となる。
したがって、本発明に係る誤差計算器を、カラー情報を出力するニューラルネットワークにおける学習に用いることで、不自然な色むらの発生が低減されたカラー画像を生成することができる。
The present invention has the following excellent effects.
According to the error computer according to the present invention, an error between two feature maps reflecting the relationship between a plurality of pixels is calculated, and each pixel is independently compared and obtained based on the calculated value. The combined error can be obtained by adding the error between the feature maps to the error.
Therefore, if the learner learns the parameters of the neural network so as to minimize this synthesis error, it is possible to learn the relationship between a certain pixel and its adjacent pixel. Therefore, the image based on the image feature amount estimated by the learner that has performed the learning using this synthesis error becomes a more correct image when viewed from the human eye.
Therefore, by using the error computer according to the present invention for learning in a neural network that outputs color information, it is possible to generate a color image in which the occurrence of unnatural color unevenness is reduced.
以下、本発明の実施形態に係る誤差計算器について、図面を参照しながら説明する。
図1に示す学習装置Sは、学習器60と、誤差計算器40とを備えている。
学習装置Sは、第1の画像特徴量401である推定カラー情報と第2の画像特徴量402である真のカラー情報との誤差を誤差計算器40により算出し、誤差計算器40が算出した誤差を最小化するように学習器60により、ニューラルネットワークを構成するためのパラメータを学習する。
ここで、学習器60は、以下に詳述する画像特徴量を出力するニューラルネットワークで構成される。以下の説明では、この画像特徴量とは、例えば、輝度、色度、彩度等の色空間を表す量をいい、例えば、色空間を表す量から抽出された平均値、分散、畳み込み積分値等を含む。また、この画像特徴量の画素ごとの集合とは、例えばモノクロ画像(モノクロ情報)やカラー情報をいう。さらに、画像特徴量は、高さ方向および幅方向(縦横)に要素が並べられた行列で取り扱ってもよいし、1次元の多変数ベクトルで取り扱ってもよい。
Hereinafter, the error computer according to the embodiment of the present invention will be described with reference to the drawings.
The learning device S shown in FIG. 1 includes a
The learning device S calculated the error between the estimated color information of the first
Here, the
また、ここで、モノクロ画像とは、具体的には色空間における輝度チャンネル(HSV色空間におけるVチャンネルや、Lab色空間におけるLチャンネルなど)のみから成る画像をいう。なお、画素の情報が輝度である場合、画素値(輝度値)は、8ビットの情報で表すとき、0〜255の値を有する。このモノクロ画像の画像特徴量であるモノクロ情報は、例えば輝度分布で表される。本明細書では、このモノクロ情報をモノクロ画像と同じ意味で用いている。また、カラー情報とは、例えば、輝度チャンネル以外の2チャンネルについての画像特徴量とすることができる。 Further, here, the monochrome image specifically refers to an image composed of only the luminance channels in the color space (V channel in the HSV color space, L channel in the Lab color space, etc.). When the pixel information is luminance, the pixel value (luminance value) has a value of 0 to 255 when represented by 8-bit information. The monochrome information, which is the image feature amount of this monochrome image, is represented by, for example, a luminance distribution. In this specification, this monochrome information is used in the same meaning as a monochrome image. Further, the color information can be, for example, an image feature amount for two channels other than the luminance channel.
学習器60は、以下の実施例では、一例として、この画像特徴量としてカラー情報を出力するニューラルネットワークで構成されているものとして説明する。この学習器60は、例えばモノクロ画像からカラー情報を推定するカラー情報推定器や、低解像度のカラー情報から高解像度のカラー情報を推定するカラー情報拡大器を作成するために用いるものである。学習器60は、内部にニューラルネットワークを構成するためのパラメータ(パラメータ群)を持ち、その学習データとして入力に対して内部パラメータに応じた推定値を出力する。学習器60は、この内部のパラメータを変更することにより、出力値を調整する。
In the following examples, the
誤差計算器40は、例えば、カラー情報(画像特徴量)から学習器60がニューラルネットワークによりカラー情報を推定する学習のための推定カラー情報と真のカラー情報との誤差を計算する。誤差計算器40は、図1に示すように、特徴量マップ作成手段41と、第1誤差算出手段42と、誤差合成手段43と、を備えている。
誤差計算器40は、第1の画像特徴量401および第2の画像特徴量402から所定演算により画像内における複数の画素の関係性を特徴付ける特徴量を抽出して第1の特徴量マップ403および第2の特徴量マップ404を作成し、第1の特徴量マップ403と第2の特徴量マップ404とに対応する画素間の画素値の誤差に基づく特徴量マップ間の誤差を算出し、第1の画像特徴量401と第2の画像特徴量402とに対応する画素間の画素値の誤差に基づいて算出された画像特徴量間の誤差を入力し、前記画像特徴量間の誤差と、前記特徴量マップ間の誤差と、を加算し、合成誤差を生成する。
なお、誤差計算器40は、従来の誤差計算器と同様の構成として、第2誤差算出手段51と、最小化手段52と、を備えている。この誤差計算器40は、例えば一般的なコンピュータで構成され、CPU(Central Processing Unit)等の演算装置と、ROM(Read Only Memory)、RAM(Random Access Memory)やHDD(Hard Disk Drive)と、入出力インタフェースと、を備えている。
The
The
The
(第2誤差算出手段51)
第2誤差算出手段51は、第1の画像特徴量401と、第2の画像特徴量402と、を用いて、これら2つの画像特徴量間の誤差を算出するものである。ここで、第1の画像特徴量401は、学習器60がその訓練データとして入力される入力値に対して内部のパラメータに応じて出力する推定カラー情報である。この第1の画像特徴量401は、例えば、学習器60に対して学習用の訓練データとして入力される低解像度のカラー情報(画像特徴量)から、当該学習器60によって推定された高解像度のカラー情報(推定カラー情報)である。
(Second error calculation means 51)
The second
また、第2の画像特徴量402は、例えば、学習器60の訓練データとして準備された正解の高解像度のカラー情報(真のカラー情報)である。
第2誤差算出手段51は、第1の画像特徴量401と第2の画像特徴量402とに対応する画素間の画素値の誤差に基づくカラー情報(画像特徴量)間の誤差を算出して誤差合成手段43に出力する。
Further, the second
The second
カラー情報間の誤差としては、例えば、従来手法と同様の平均二乗誤差や、交差エントロピーを用いる。具体例として、次の式(1)で定義された損失関数(Loss)は、従来手法と同様の平均二乗誤差を表している。 As the error between the color information, for example, the mean square error similar to the conventional method or the cross entropy is used. As a specific example, the loss function (Loss) defined by the following equation (1) represents the mean square error similar to the conventional method.
ここで、Hは、カラー情報として入力する画像の縦方向の画素数であり、Wは、カラー情報として入力する画像の横方向の画素数である。Cは、推定するカラー情報のチャンネル数であり、通常C=2である。
yh,w,cは、画像上で座標(w,h)に位置する画素のチャンネルcにおける推定カラー情報である。
ygt h,w,cは、画像上で座標(w,h)に位置する画素のチャンネルcにおける真のカラー情報の値である。なお、一般には、前記した式(1)におけるH×W×CをNに置き換えて、h,w,cをまとめてiに置き換えて、次の式(2)のように表すことが多い。
Here, H is the number of pixels in the vertical direction of the image to be input as color information, and W is the number of pixels in the horizontal direction of the image to be input as color information. C is the number of estimated color information channels, and usually C = 2.
y h, w, c are estimated color information in the channel c of the pixels located at the coordinates (w, h) on the image.
y gt h, w, c are the true color information values in the channel c of the pixels located at the coordinates (w, h) on the image. In general, H × W × C in the above equation (1) is replaced with N, and h, w, and c are collectively replaced with i, which is often expressed as the following equation (2).
(特徴量マップ作成手段41)
特徴量マップ作成手段41は、カラー情報である第1の画像特徴量401および第2の画像特徴量402から、所定演算により画像内における複数の画素の関係性を特徴付ける特徴量を抽出して第1の特徴量マップ403および第2の特徴量マップ404をそれぞれ作成するものである。ここで、複数の画素の関係性を特徴付ける特徴量とは、カラー情報(画像特徴量)において複数の画素の関係性を特徴付けるものであり、カラー情報において単独の画素から独立に得られる特徴ではない。また、画素の関係性は、例えば、関係性の対象とする2つの画素値の差分で表される。注目画素とその周辺画素とは、離間していてもよいし、隣接していてもよい。
(Feature quantity map creation means 41)
The feature amount map creating means 41 extracts a feature amount that characterizes the relationship between a plurality of pixels in the image from the first
隣接する複数の画素の関係性を特徴付ける特徴量を抽出するためには、空間フィルタリングをしてもよい。本実施形態では、特徴量マップ作成手段41は、予め定められたフィルタを用いてカラー情報である第1の画像特徴量401または第2の画像特徴量402に対しフィルタ処理を施す演算を行うことで、隣接する複数の画素の関係性を特徴付ける特徴量を抽出して第1の特徴量マップ403または第2の特徴量マップ404を作成する。
Spatial filtering may be used to extract features that characterize the relationship between a plurality of adjacent pixels. In the present embodiment, the feature amount map creating means 41 performs an operation of performing a filter process on the first
ここで、フィルタは、空間フィルタリングに用いることができれば、目的や機能は特に限定されず、例えば、輪郭抽出フィルタ、ノイズ除去フィルタ、平滑化フィルタ、移動平均フィルタ、あるいは、メディアンフィルタ等の非線形フィルタ等を用いても構わない。 Here, the filter is not particularly limited in purpose and function as long as it can be used for spatial filtering, and for example, a contour extraction filter, a noise removal filter, a smoothing filter, a moving average filter, a non-linear filter such as a median filter, or the like. May be used.
本実施形態では、一例として、特徴量マップ作成手段41は、カラー情報である第1の画像特徴量401または第2の画像特徴量402に基づく画像に含まれるエッジを検出するエッジフィルタを用いることでエッジマップを第1の特徴量マップ403または第2の特徴量マップ404として作成するものとして説明する。エッジマップは、周辺画素との関係性を画素値の勾配で表したマップ(勾配マップ)である。
In the present embodiment, as an example, the feature amount map creating means 41 uses an edge filter that detects an edge included in an image based on the first
エッジフィルタは、例えば、SobelフィルタやPrewittフィルタ等の一次微分フィルタを用いることができる。また、一次微分フィルタに限らず、Laplacianフィルタ等の二次微分フィルタを用いてもよい。
また、例えば、周辺8画素を考慮した3×3のサイズのフィルタであってもよいし、周辺24画素を考慮した5×5のサイズのフィルタ等であってもよい。
さらに、フィルタの形状は、正方形に限らず、例えば、上下左右に隣接する周辺4画素を考慮するような形状であってもよい。
以下では、一例として、Sobelフィルタを用いて勾配マップ(エッジマップ)を作成するものとして説明する。
As the edge filter, for example, a first-order differential filter such as a Sobel filter or a Prewitt filter can be used. Further, the present invention is not limited to the first-order differential filter, and a second-order differential filter such as a Laplacian filter may be used.
Further, for example, a filter having a size of 3 × 3 in consideration of 8 peripheral pixels may be used, or a filter having a size of 5 × 5 in consideration of 24 peripheral pixels may be used.
Further, the shape of the filter is not limited to a square shape, and may be, for example, a shape that considers four peripheral pixels adjacent to each other in the vertical and horizontal directions.
In the following, as an example, a gradient map (edge map) will be created using a Sobel filter.
特徴量マップ作成手段41は、第1の画像特徴量401(推定カラー情報)から第1の特徴量マップ403(勾配マップ)を作成し、第1誤差算出手段42に出力する。
特徴量マップ作成手段41は、第2の画像特徴量402(真のカラー情報)から第2の特徴量マップ404(勾配マップ)を作成し、第1誤差算出手段42に出力する。
第1の特徴量マップ403は、例えば、推定された高解像度のカラー情報についての勾配マップ(以下、推定カラー情報についての勾配マップという)である。
第2の特徴量マップ404は、例えば、準備された正解の高解像度のカラー情報についての勾配マップ(以下、真のカラー情報についての勾配マップという)である。
なお、特徴量マップ作成手段41による勾配マップの作成についての詳細は後記する。
The feature amount map creating means 41 creates a first feature amount map 403 (gradient map) from the first image feature amount 401 (estimated color information), and outputs the first feature amount map 403 (gradient map) to the first
The feature amount map creating means 41 creates a second feature amount map 404 (gradient map) from the second image feature amount 402 (true color information), and outputs the second feature amount map 404 (gradient map) to the first
The first
The
The details of creating the gradient map by the feature map creating means 41 will be described later.
(第1誤差算出手段42)
第1誤差算出手段42は、第1の特徴量マップ403と第2の特徴量マップ404とに対応する画素間の画素値の誤差に基づく勾配マップ間(特徴量マップ間)の誤差を算出するものである。第1誤差算出手段42は、推定カラー情報についての勾配マップと、真のカラー情報についての勾配マップとを用いて、勾配マップ間の誤差を算出して誤差合成手段43に出力する。この第1誤差算出手段42は、第2誤差算出手段51と比べると入力情報が異なるものの、誤差の計算手法については、第2誤差算出手段51と同様の手法を適用することができる。
(First error calculation means 42)
The first error calculating means 42 calculates the error between the gradient maps (between the feature maps) based on the error of the pixel value between the pixels corresponding to the
(誤差合成手段43)
誤差合成手段43は、第1の画像特徴量401と第2の画像特徴量402とのカラー情報間(画像特徴量間)の誤差と、第1の特徴量マップ403と第2の特徴量マップ404との勾配マップ間(特徴量マップ間)の誤差と、を加算し、合成誤差405を生成するものである。
誤差合成手段43は、第2誤差算出手段51から、推定カラー情報と真のカラー情報とのカラー情報間の誤差を受け付ける。
誤差合成手段43は、第1誤差算出手段42から、推定カラー情報についての勾配マップと真のカラー情報についての勾配マップとの勾配マップ間の誤差を受け付ける。
誤差合成手段43は、第2誤差算出手段51から取得したカラー情報間の誤差と、第1誤差算出手段42から取得した勾配マップ間の誤差との和を合成誤差405として算出する。誤差合成手段43は、算出した合成誤差405を、最小化手段52に出力する。
(Error synthesis means 43)
The error synthesizing means 43 includes an error between the color information (between the image feature amounts) between the first
The error synthesizing means 43 receives an error between the estimated color information and the true color information from the second
The error synthesizing means 43 receives an error between the gradient map for the estimated color information and the gradient map for the true color information from the first
The error synthesizing means 43 calculates the sum of the error between the color information acquired from the second
(最小化手段52)
最小化手段52は、第1の画像特徴量401と第2の画像特徴量402との組を順次入力し、入力した画像特徴量の組に応じて、所定演算により合成誤差405が小さくなるように学習器60のパラメータを調整し、調整したパラメータを更新パラメータ406(更新用のパラメータ)として学習器60に供給するものである。
(Minimizing means 52)
The minimizing means 52 sequentially inputs a set of the first
最小化手段52は、SGDなどの誤差勾配に基づく最適化手法を用いて、合成誤差405が小さくなるように、学習器60のパラメータを調整する。なお、SGDについては、次の参考文献に記載されているので説明を省略する。
(参考文献)L. Bottou., ”Stochastic Gradient Descent Tricks.,”Neural Networks: Tricks of the Trade: Springer, 2012.
The minimizing means 52 adjusts the parameters of the
(Reference) L. Bottou., "Stochastic Gradient Descent Tricks.," Neural Networks: Tricks of the Trade: Springer, 2012.
ここで、従来技術では、不自然な色むらが発生してしまうという問題について説明する。
例えば、雲のない空の風景画像(カラー推定された画像)において、10個の画素からなる一列の画素領域を想定する。そして、正しい画素値を例えば「B」とし、この一列の1番目から5番目までの画素についてそれぞれ推定された画素値が「B+10」、6番目から10番目までの画素についてそれぞれ推定された画素値が「B−10」であるとする。
このとき、従来の誤差計算器は、画素ごとに独立に比較する誤差計算を行う。この例では、この一列の画素値は、正しい画素値との差分(絶対値)がすべて「10」であることから、従来の誤差計算器は、誤差が最小化されたものと判定する場合がある。よって、このような学習をして作成された推定器を用いると、この一列の1番目から5番目までの画素に対して推定される色と、この一列の6番目から10番目までの画素に対して推定される色と、が異なってしまうことなる。
これに対して、本実施形態の誤差計算器40は、複数の画素の関係性として、隣接する画素との差分も計算しているので、この一列の5番目の画素値と6番目の画素値との間に、20もの大きなギャップがあることを検知し、この一列のすべての画素値が「B+10」となるときよりも誤差が大きい、と判定することが期待できる。
つまり、従来技術では、一様に青くなるべき雲のない空の風景が斑になるなど、不自然な色むらが発生するところを、誤差計算器40は、注目画素とその周辺画素との色の均一性が保存された画像、すなわち、人間の目から見てより正しい画像が出力できるような誤差を計算することができる。
Here, the problem that unnatural color unevenness occurs in the prior art will be described.
For example, in a cloudless sky landscape image (color-estimated image), a row of pixel regions consisting of 10 pixels is assumed. Then, the correct pixel value is set to, for example, "B", the estimated pixel value for each of the first to fifth pixels in this row is "B + 10", and the estimated pixel value for each of the sixth to tenth pixels is "B". Is "B-10".
At this time, the conventional error calculator performs an error calculation for comparing each pixel independently. In this example, since the difference (absolute value) from the correct pixel value is all "10" for the pixel values in this row, the conventional error computer may determine that the error is minimized. is there. Therefore, using the estimator created by such learning, the colors estimated for the 1st to 5th pixels in this row and the 6th to 10th pixels in this row can be obtained. On the other hand, the estimated color will be different.
On the other hand, the
That is, in the prior art, the
以下、数式を用いて、誤差計算器40の説明を続ける。
本実施形態では、最小化手段52は、例えば、次の式(3)で定義された損失関数(Loss)を用いて、学習器60のパラメータの更新を行う。
Hereinafter, the description of the
In the present embodiment, the minimization means 52 updates the parameters of the
誤差計算器40は、学習に用いる誤差(合成誤差405)としては、従来手法と同様の平均二乗誤差や交差エントロピーに加えて、複数画素から計算する誤差を用いる。式(3)は、従来手法と同様の平均二乗誤差と、複数画素から計算する誤差としての、勾配マップにおける平均二乗誤差と、を用いる場合の例を示している。
As the error used for learning (composite error 405), the
具体的には、式(3)の第1項は、従来手法と同様の平均二乗誤差を表している。この式(3)の第1項は、前記した第2誤差算出手段51の処理に相当する。なお、従来手法は、式(3)の第1項を最小化するように学習器のパラメータの更新を行う。 Specifically, the first term of the equation (3) represents the mean square error similar to that of the conventional method. The first term of this equation (3) corresponds to the processing of the second error calculating means 51 described above. In the conventional method, the parameters of the learner are updated so as to minimize the first term of the equation (3).
一方、式(3)の第2項は、複数画素から計算する誤差として、特徴量マップ作成手段41で作成した勾配マップにおける平均二乗誤差を表している。この式(3)の第2項は、前記した第1誤差算出手段42の処理に相当する。また、式(3)の第1項と第2項との和は、前記した誤差合成手段43の処理に相当する。 On the other hand, the second term of the equation (3) represents the mean square error in the gradient map created by the feature map creating means 41 as an error calculated from a plurality of pixels. The second term of this equation (3) corresponds to the processing of the first error calculating means 42 described above. Further, the sum of the first term and the second term of the equation (3) corresponds to the processing of the error synthesis means 43 described above.
式(3)の第2項において、αは複数画素から計算する誤差の重み係数である。どのような学習器を作るかにもよるが、αは0.1程度の小さめの値が望ましい。
Hgradは、勾配マップの縦方向のサイズ(画素数)であり、Wgradは、勾配マップの横方向のサイズ(画素数)である。
Kは勾配マップを計算するのに用いるフィルタの個数を表している。
In the second term of the equation (3), α is a weighting coefficient of the error calculated from a plurality of pixels. Although it depends on what kind of learning device is made, it is desirable that α is a small value of about 0.1.
H grad is the vertical size (number of pixels) of the gradient map, and W grad is the horizontal size (number of pixels) of the gradient map.
K represents the number of filters used to calculate the gradient map.
また、式(3)の第2項において、gh,w,c,kは、推定カラー情報から作成された勾配マップ上で座標(w,h)に位置する画素のチャンネルcにおける値(以下、推定カラー情報についての勾配マップの値という)である。
ggt h,w,c,kは、真のカラー情報から作成された勾配マップ上で座標(w,h)に位置する画素のチャンネルcにおける値(以下、真のカラー情報についての勾配マップの値という)である。
このうち、推定カラー情報についての勾配マップの値は、特徴量マップ作成手段41によって、例えば、次の式(4)に基づいて算出される。
Further, in the second term of the equation (3), g h, w, c, k are values in the channel c of the pixels located at the coordinates (w, h) on the gradient map created from the estimated color information (hereinafter, , The value of the gradient map for the estimated color information).
g gt h, w, c, k are the values in the channel c of the pixels located at the coordinates (w, h) on the gradient map created from the true color information (hereinafter, the gradient map for the true color information). It is called a value).
Of these, the value of the gradient map for the estimated color information is calculated by the feature map creating means 41, for example, based on the following equation (4).
式(4)において、Mkは、k番目のフィルタの縦方向のサイズであり、Nkは、k番目のフィルタの横方向のサイズである。
s(1≦s≦Mk)は、k番目のフィルタの縦方向に配列された各係数の識別子であり、列の上端が1で表される。
t(1≦t≦Nk)は、k番目のフィルタの横方向に配列された各係数の識別子であり、行の左端が1で表される。
ωs,t,kはフィルタ係数であり、k番目のフィルタのs行t列に配置された係数である。
In equation (4), M k is the vertical size of the k-th filter, and N k is the horizontal size of the k-th filter.
s (1 ≦ s ≦ M k ) is an identifier of each coefficient arranged in the vertical direction of the k-th filter, and the upper end of the column is represented by 1.
t (1 ≦ t ≦ N k ) is an identifier of each coefficient arranged in the horizontal direction of the kth filter, and the left end of the row is represented by 1.
ω s, t, k are filter coefficients, which are the coefficients arranged in the s row and t column of the kth filter.
同様に、真のカラー情報についての勾配マップの値は、特徴量マップ作成手段41によって、例えば、次の式(5)に基づいて算出される。 Similarly, the value of the gradient map for the true color information is calculated by the feature map creating means 41, for example, based on the following equation (5).
これら式(4)および式(5)は、特徴量マップ作成手段41の処理に相当する。
特徴量マップ作成手段41が勾配マップを作成するために、垂直方向のエッジおよび水平方向のエッジをそれぞれ検出するSobelフィルタを用いる場合、次の条件が設定される。
(条件)
フィルタ数K=2
k=1番目のフィルタに関して縦方向のサイズMk=1=3
k=1番目のフィルタに関して横方向のサイズNk=1=3
k=2番目のフィルタに関して縦方向のサイズMk=2=3
k=2番目のフィルタに関して横方向のサイズNk=2=3
k=1番目のフィルタが、垂直方向のエッジを検出するフィルタの場合、つまり、水平方向の差分(勾配)を検出する場合、そのフィルタ係数ωk=1は、図2(b)で表される。
k=2番目のフィルタが、水平方向のエッジを検出するフィルタの場合、つまり、垂直方向の差分(勾配)を検出する場合、そのフィルタ係数ωk=2は、図2(c)で表される。
These equations (4) and (5) correspond to the processing of the feature amount
When the feature map creating means 41 uses a Sobel filter that detects vertical edges and horizontal edges to create a gradient map, the following conditions are set.
(conditions)
Number of filters K = 2
k = Vertical size for the first filter M k = 1 = 3
k = Horizontal size for the first filter N k = 1 = 3
k = Vertical size for the second filter M k = 2 = 3
k = Horizontal size for the second filter N k = 2 = 3
When k = the first filter is a filter that detects vertical edges, that is, when it detects a horizontal difference (gradient), the filter coefficient ω k = 1 is represented by FIG. 2 (b). To.
If the k = second filter is a filter that detects horizontal edges, that is, if it detects a vertical difference (gradient), the filter coefficient ω k = 2 is represented by FIG. 2 (c). To.
特徴量マップ作成手段41は、例えば入力する推定カラー情報である第1の画像特徴量401として、図2(a)に例示するような画素値があったとき、図2(b)に例示する垂直方向のエッジを検出するフィルタを用いて、3×3の領域をスキャンする。例えば、図2(a)において2行2列目の画素を注目画素とした場合、その注目画素を中心とする3×3の領域の画素値と、フィルタ係数ωk=1をコンボリューション(畳み込み)した結果は、20となる。
同様に、2行3列目の画素を注目画素としたときの計算結果は、20となる。このフィルタ(エッジフィルタ)は、エッジがあるところほど、値が高くなる。
一方、3×3の領域の画素値がすべて等しい領域に、このフィルタを適用すると、値が0となる。つまり、3行2列目の画素や3行3列目の画素を注目画素としたときの計算結果は、共に0となる。
The feature amount map creating means 41 illustrates, for example, when there is a pixel value as illustrated in FIG. 2A as the first
Similarly, the calculation result when the pixels in the second row and the third column are the pixels of interest is 20. The value of this filter (edge filter) increases as there are edges.
On the other hand, when this filter is applied to an area where all the pixel values of the 3 × 3 area are the same, the value becomes 0. That is, the calculation results when the pixels in the third row and the second column and the pixels in the third row and the third column are the pixels of interest are both 0.
同様に、特徴量マップ作成手段41は、例えば入力する推定カラー情報である第1の画像特徴量401として、図2(a)に例示するような画素値があったとき、図2(c)に例示する水平方向のエッジを検出するフィルタ(フィルタ係数ωk=2)を用いて、3×3の領域をスキャンする。特徴量マップ作成手段41は、このときに得られた計算結果と、垂直方向のエッジを検出するフィルタ(フィルタ係数ωk=1)を用いたときの計算結果とを足し合わせることで、エッジマップ(勾配マップ)を作成する。
Similarly, when the feature amount map creating means 41 has a pixel value as illustrated in FIG. 2A as the first
こうして作成された勾配マップに対して、第1誤差算出手段42が、第2誤差算出手段51と同様の誤差計算を適用することで、勾配マップ間の誤差を算出することができる。なお、第1誤差算出手段42および第2誤差算出手段51は、誤差計算式に関して、平均二乗誤差ではなく交差エントロピーなど他の誤差関数を用いてもよい。また、第2誤差算出手段51が行う式(3)の第2項の演算において、厳密に式(3)の第2項と同じ数式である必要はなく、複数の画素に関連する値の間で所定の演算を行うものであれば構わない。
By applying the same error calculation as the second error calculating means 51 to the gradient map created in this way, the first error calculating means 42 can calculate the error between the gradient maps. The first error calculation means 42 and the second error calculation means 51 may use other error functions such as cross entropy instead of the mean square error in the error calculation formula. Further, in the calculation of the second term of the formula (3) performed by the second
また、前記した具体例で作成されるエッジマップのサイズ(Hgrad×Wgrad)は、入力画像のサイズ(H×W)よりも縦横2画素ずつ小さくなる。フィルタサイズを一般化して説明すると、エッジマップのサイズは、Hgrad=H−(Mk−1)、Wgrad=W−(Nk−1)となる。ただし、エッジマップのサイズを、入力画像のサイズよりも必ずしも小さくする必要はなく、入力画像と同じサイズのエッジマップを次のように作成してもよい。 Further, the size of the edge map (H grad × W grad ) created in the specific example described above is smaller than the size of the input image (H × W) by two pixels in the vertical and horizontal directions. To explain the filter size in general, the size of the edge map is H grad = H − (M k -1) and W grad = W − (N k -1). However, the size of the edge map does not necessarily have to be smaller than the size of the input image, and an edge map having the same size as the input image may be created as follows.
例えば、入力画像のサイズを、一時的に、(H+(Mk−1))×(W+(Nk−1))のサイズへ拡張することで、入力画像と同サイズのエッジマップが得られる。上記サイズへ拡張するには、補間する画素を、元画像の外周に沿うように並べながら生成すればよい。ここで、サイズ拡張のために一時的に生成された画素の値を決定する方法としては、例えば、生成されるすべての画素に対して元画像の平均画素値を付与する方法や、生成される各画素に対して最も近い元画像の画素の値を付与する方法などを採用することができる。 For example, by temporarily expanding the size of the input image to the size of (H + (M k -1)) × (W + (N k -1)), an edge map having the same size as the input image can be obtained. .. In order to expand to the above size, the pixels to be interpolated may be generated while being arranged along the outer circumference of the original image. Here, as a method of determining the value of the pixel temporarily generated for size expansion, for example, a method of giving an average pixel value of the original image to all the generated pixels or a method of generating is generated. A method of assigning the value of the pixel of the original image closest to each pixel can be adopted.
このうち、平均画素値を付与する方法を用いる場合、図3(a)に示すような3×3の画像に対しては、元画像の周囲を埋めるように生成されるすべての画素に対して、画素値「45」を付与すればよい。
また、最も近い画素の値を付与する方法を用いる場合、例えば、図3(a)に示すような3×3の画像に対しては、元画像の周囲を埋めるように生成される各画素には、図3(b)にハッチングで示す画素の値をそれぞれ付与すればよい。
Of these, when the method of assigning the average pixel value is used, for a 3 × 3 image as shown in FIG. 3A, for all the pixels generated so as to fill the periphery of the original image. , The pixel value "45" may be given.
Further, when the method of assigning the value of the closest pixel is used, for example, for a 3 × 3 image as shown in FIG. 3A, each pixel generated so as to fill the periphery of the original image is used. 3 (b) may be given the values of the pixels shown by hatching.
本実施形態に係る誤差計算器40は、最適化に用いる誤差として、従来使われてきた画素ごとに独立して比較して求める誤差に加えて、複数の画素から求める誤差を用いて行う学習に用いられる。これにより、学習装置Sは、画素間の関係性についても考慮した学習が行える。
したがって、誤差計算器40を、例えばカラー情報を出力するニューラルネットワークにおける学習に用いることで、学習装置Sは、訓練データのカラー情報と、推定されるカラー情報との間で画素値の勾配のような、周辺画素との関係性が同じになるよう学習することができる。これにより、学習装置Sの学習器60から、例えば、高精度なカラー推定器やカラー情報拡大器を作成できる。その結果として、カラー推定器やカラー情報拡大器が、不自然な色むらの発生が低減されたカラー画像を生成することができる。
上記の技術により、4K/8K画像のような高解像度のモノクロ画像に対しても色むらが少ない自然な色付けが可能になる。
The
Therefore, by using the
With the above technique, even a high-resolution monochrome image such as a 4K / 8K image can be naturally colored with less color unevenness.
以上、本発明の実施形態について説明したが、本発明はこれに限定されず、その趣旨を変えない範囲で実施することができる。例えば、誤差計算器40として説明したが、この装置の構成の処理を可能にするように、汎用または特殊なコンピュータ言語で記述した誤差計算プログラムとみなすことも可能である。
Although the embodiments of the present invention have been described above, the present invention is not limited to this, and can be carried out without changing the gist thereof. For example, although described as the
また、前記実施形態では、誤差計算器40は、従来の誤差計算器と同様の構成として、第2誤差算出手段51と、最小化手段52と、を備えていることとしたが、第2誤差算出手段51や最小化手段52は、誤差計算器とは別体であってもよい。この場合には、例えば、誤差計算器の前段に第2誤差算出手段51を設けたり、誤差計算器の後段に最小化手段52を設けたりすることができる。
Further, in the above-described embodiment, the
また、学習装置Sは、誤差計算器40と、例えば、カラー情報を推定する推定器を作成するために準備する学習器60とによって、カラー情報推定学習装置を構成してもよい。
また、学習装置Sは、誤差計算器40と、例えば、カラー情報を拡大する推定器を作成するために準備する学習器60とによって、カラー情報拡大推定学習装置を構成してもよい。
さらに、学習装置Sは、誤差計算器40と、例えば、低解像度画像から超解像画像等の高解像度画像を推定する推定器を作成するために準備する学習器60とによって、超解像画像推定学習装置を構成してもよい。
Further, the learning device S may configure the color information estimation learning device by the
Further, the learning device S may configure the color information expansion estimation learning device by the
Further, the learning device S is provided with a super-resolution image by an
以下、本発明の実施形態に係る誤差計算器40を学習に用いるカラー情報拡大器について詳細に説明する。
図4に示す自動色付け装置1は、モノクロ画像からカラー情報を推定することにより、モノクロ画像へ自動的に色付けするものであり、カラー情報拡大器10を含んでいる。自動色付け装置1は、図4に示すように、主として、カラー情報推定器3と、情報合成器9と、を備えている。
この自動色付け装置1は、例えば一般的なコンピュータで構成され、GPU(Graphics Processing Units)等の演算装置と、ROM、RAM、HDDや一般的な画像メモリと、入出力インタフェースと、を備えている。
Hereinafter, the color information magnifier that uses the
The
The
カラー情報推定器3は、入力される高解像度モノクロ画像101から、低解像度モノクロ画像103および低解像度カラー情報105を生成して、これらの情報を用いて高解像度カラー情報107を推定するものである。
高解像度モノクロ画像101は、第1解像度のモノクロ画像である。この高解像度モノクロ画像101は、例えば、過去の白黒フィルムや写真からスキャンによりデジタル化したモノクロ画像である。
低解像度モノクロ画像103は、前記第1解像度よりも低い第2解像度のモノクロ画像である。
低解像度カラー情報105は、前記第2解像度のカラー情報である。
高解像度カラー情報107は、前記第1解像度のカラー情報である。
The color information estimator 3 generates a low-
The high-
The low-
The low
The high-
第1解像度の値(高解像度の値)は、第2解像度の値(低解像度の値)に比較して大きければ特に限定されない。例えば、第2解像度の画像の大きさを256×256ピクセル、第1解像度の画像の大きさを512×512ピクセルとしてもよい。また、例えば、第2解像度の画像の大きさを480×270ピクセル、第1解像度の画像の大きさを4K(3840×2160)としてもよい。さらには、第1解像度の画像の大きさを8K(7680×4320)としても構わない。 The value of the first resolution (value of high resolution) is not particularly limited as long as it is larger than the value of the second resolution (value of low resolution). For example, the size of the image of the second resolution may be 256 × 256 pixels, and the size of the image of the first resolution may be 512 × 512 pixels. Further, for example, the size of the image of the second resolution may be 480 × 270 pixels, and the size of the image of the first resolution may be 4K (3840 × 2160). Further, the size of the first resolution image may be 8K (7680 × 4320).
カラー情報推定器3は、図4に示すように、縮小器5と、低解像度カラー情報推定器7と、カラー情報拡大器10と、を備えている。
As shown in FIG. 4, the color information estimator 3 includes a
縮小器5は、入力される高解像度モノクロ画像101を縮小する処理を行って低解像度モノクロ画像103を生成するものである。ここで、縮小とは解像度を低減、つまり画素数を減少させることをいう。縮小における縮小率が例えば0.5である場合、縮小画像の水平方向、垂直方向の画素数は、原画像の水平方向、垂直方向の画素数のそれぞれ1/2となる。縮小器5は、生成した低解像度モノクロ画像103を低解像度カラー情報推定器7に出力する。
The
低解像度カラー情報推定器7は、推定を行うための学習により予め決定されたパラメータ群を用いて、縮小器5により生成された低解像度モノクロ画像103から、低解像度のカラー情報(画像特徴量)を抽出する。これにより、低解像度カラー情報推定器7は、低解像度カラー情報105を推定する。なお、低解像度カラー情報推定器7を作成するための学習の流れは、従来技術と同様であるが、簡単な説明を後記する。
The low-resolution
カラー情報拡大器10は、低解像度カラー情報推定器7により推定された低解像度カラー情報105と、縮小器5をバイパスして入力される高解像度モノクロ画像101と、を入力として、画像サイズが拡大されたカラー情報(高解像度カラー情報107)を推定する処理を行うものである。カラー情報拡大器10は、低解像度カラー情報105を拡大する際に、高解像度モノクロ画像101(モノクロ情報)を用いて拡大する。そして、カラー情報拡大器10は、推定した高解像度カラー情報107を情報合成器9に出力する。
The
情報合成器9は、カラー情報推定器3で推定された高解像度カラー情報107と、高解像度モノクロ画像101とを合成し、高解像度カラー画像109を作成する。情報合成器9は、1チャンネル(以下、1chと表記する場合もある)のモノクロ情報と、2チャンネル(2ch)のカラー情報とを単純に合成してカラー画像を生成する。
The
次に、カラー情報拡大器10の学習の流れについて、低解像度カラー情報推定器7の学習の流れと対比しながら説明する。
Next, the learning flow of the
はじめに、低解像度カラー情報推定器7の学習の流れについて図5を参照して説明する。
低解像度カラー情報推定器7は、以下の手順により、予め用意した学習器から生成する。この学習器は、モノクロ画像を入力し、所定の計算処理を行うことによりカラー情報を推定して出力する。図5では、学習器を、学習が終わった状態の低解像度カラー情報推定器7として表記している。そして、大量の学習用のカラー画像を用意し、以下のステップS1〜ステップS4を十分な回数繰り返す。この学習器がこのパラメータを学習し、適切にパラメータを設定することにより精度の良いカラー情報推定器を作成できる。
First, the learning flow of the low-resolution
The low-resolution
(ステップS1)
学習用のカラー画像として低解像度カラー画像202を用意し、それを低解像度モノクロ画像203と真のカラー情報204とに分離する。
ここで、低解像度モノクロ画像203は、低解像度の学習用モノクロ画像である。
また、真のカラー情報204は、低解像度の学習用モノクロ画像と同じサイズの正解カラー情報であって、推定されるカラー情報との誤差計算に用いる。
(Step S1)
A low-
Here, the low-
Further, the
(ステップS2)
次に、学習器(低解像度カラー情報推定器7)は、低解像度モノクロ画像203を入力し、現在のパラメータを用いた推定結果のカラー情報として、低解像度カラー情報205を出力する。
(Step S2)
Next, the learner (low-resolution color information estimator 7) inputs the low-
(ステップS3)
次に、従来の誤差計算器8は、低解像度カラー情報205(推定カラー情報)と真のカラー情報204との誤差を計算する。この誤差としては、各画素値の平均二乗誤差などが用いられる。
(Step S3)
Next, the
(ステップS4)
また、従来の誤差計算器8は、計算して得られた誤差から、SGDなどの誤差勾配に基づく最適化手法を用いて、誤差が小さくなるように、学習器(低解像度カラー情報推定器7)のパラメータを調整し、調整されたパラメータを学習器に出力する。
なお、従来の誤差計算器8は、例えば、図1に示した第2誤差算出手段51と最小化手段52とで構成される。
(Step S4)
Further, the
The
次に、カラー情報拡大器10の学習の流れについて図6を参照して説明する。
カラー情報拡大器10は、以下の手順により、予め用意した学習器から生成する。この学習器は、高解像度モノクロ画像301および低解像度カラー情報305を入力し、所定の計算処理を行うことにより高解像度カラー情報307を推定して出力する。図6では、学習器を、学習が終わった状態のカラー情報拡大器10として表記している。そして、大量の学習用のカラー画像を用意し、以下のステップS10〜ステップS14を十分な回数繰り返す。この学習器がこのパラメータを学習し、適切にパラメータを設定することにより精度の良いカラー情報拡大器を作成できる。
Next, the learning flow of the
The
(ステップS10)
学習用のカラー画像として高解像度カラー画像309を用意し、それを縮小器5によって単純に縮小して低解像度カラー情報305とする。
ここで、高解像度カラー画像309としては、古い白黒フィルムをカラー化したものも使用する。この場合、例えば、過去の白黒フィルムや写真からスキャンによりデジタル化したモノクロ画像に対して、人手で色付けしたデジタルデータとする。また、学習用の高解像度カラー画像309を大量に準備するために、古い白黒フィルム以外に、カラー撮影された新しい4K等のカラー画像を用いてもよい。
(Step S10)
A high-
Here, as the high-
(ステップS11)
次に、高解像度カラー画像309を、高解像度モノクロ画像301と高解像度カラー情報(真のカラー情報)304とに分離する。
ここで、高解像度モノクロ画像301は、高解像度の学習用モノクロ画像である。
また、高解像度カラー情報304は、高解像度の学習用モノクロ画像と同じサイズの正解カラー情報であって、推定される高解像度カラー情報との誤差計算に用いる。
(Step S11)
Next, the high-
Here, the high-
Further, the high-
(ステップS12)
次に、学習器(カラー情報拡大器10)は、高解像度モノクロ画像301を入力し、現在のパラメータを用いた推定結果のカラー情報として、高解像度カラー情報307を出力する。
(Step S12)
Next, the learning device (color information magnifier 10) inputs the high-
(ステップS13)
次に、本発明の実施形態に係る誤差計算器40は、高解像度カラー情報307(推定カラー情報)と高解像度カラー情報(真のカラー情報)304との誤差(合成誤差)を計算する。この誤差としては、前記したカラー情報間の誤差と、勾配マップ間の誤差とを、を合成した合成誤差405(図1参照)を用いる。
(Step S13)
Next, the
(ステップS14)
また、誤差計算器40は、計算して得られた誤差(合成誤差405)から、SGDなどの誤差勾配に基づく最適化手法を用いて、誤差が小さくなるように、学習器(カラー情報拡大器10)のパラメータを調整し、調整されたパラメータを学習器に出力する。なお、誤差計算器40は、学習のときに付加されるが、学習後には接続を解除する。
(Step S14)
Further, the
次に、カラー情報拡大器10の詳細な構成について図7を参照して説明する。
カラー情報拡大器10は、図7に示すように、サイズ拡大手段21と、合成手段22aと、高解像度カラー情報推定手段23と、を備えている。なお、図7のカラー情報拡大器10は、特徴抽出手段31,32,33を備える形態で図示したが、例えば、すべての特徴抽出手段を省略した構成とすることもできる。なお、以下では、特徴抽出手段について、便宜的に第1の特徴抽出手段31、第2の特徴抽出手段32、および第3の特徴抽出手段33のように呼称する場合もある。
Next, the detailed configuration of the
As shown in FIG. 7, the
カラー情報拡大器10は、例えばニューラルネットワークにより構成できる。また、ニューラルネットワークは、例えばCNN(Convolutional Neural Network)であってもよい。CNNでは、隠れ層(hidden layer)に、Convolution層(畳み込み層)や、Deconvolution層(逆畳み込み層、または、Transposed Convolution 層)を用いる。よて、CNNを採用した場合、カラー情報拡大器10は、各構成要素を、Convolution層またはDeconvolution層を用いて実装可能であり、GPUを用いて高速に計算できる。
The
サイズ拡大手段21は、入力される低解像度の画像特徴量を拡大する処理を行って高解像度の画像特徴量を生成するものである。ここで、低解像度の画像特徴量とは、例えば、低解像度カラー情報105のことをいう。なお、図7に示すように、カラー情報拡大器10が第2の特徴抽出手段32を備える場合には、第2の特徴抽出手段32が低解像度カラー情報105から抽出した画像特徴量が低解像度の画像特徴量となる。このサイズ拡大手段21は、生成した高解像度の画像特徴量を合成手段22aに出力する。
The size enlargement means 21 generates a high-resolution image feature amount by performing a process of enlarging the input low-resolution image feature amount. Here, the low-resolution image feature amount means, for example, low-
サイズ拡大手段21には、例えば、Deconvolution層(ニューラルネットワークを用いた画像拡大層)を用いてもよい。また、一般的な画像拡大アルゴリズムで用いられるパラメータを固定的に用いてもよい。なお、一般的な画像拡大アルゴリズムとしては、例えば、最近傍補間法やBilinear補間法などを用いてもよい。 As the size enlargement means 21, for example, a Deconvolution layer (an image enlargement layer using a neural network) may be used. Further, the parameters used in a general image enlargement algorithm may be fixedly used. As a general image enlargement algorithm, for example, the nearest neighbor interpolation method or the Bilinear interpolation method may be used.
合成手段22aは、例えば、入力される高解像度モノクロ画像101と、サイズ拡大手段21によって生成された高解像度の画像特徴量とを合成するものである。なお、図7に示すように、カラー情報拡大器10が第1の特徴抽出手段31を備える場合には、合成手段22aは、高解像度モノクロ画像101から抽出された画像特徴量と、サイズ拡大手段21によって生成された高解像度の画像特徴量とを合成する。この合成手段22aは、合成した高解像度の画像特徴量を高解像度カラー情報推定手段23に出力する。
合成手段22aは、1chのモノクロ情報と、このモノクロ情報と同じ大きさの2chのカラー情報とを単純に合成し、高解像度の画像特徴量を生成する。合成手段22aには、例えば、ニューラルネットワークのConvolution層を用いてもよい。
The synthesizing means 22a synthesizes, for example, the input high-
The synthesizing means 22a simply synthesizes 1ch monochrome information and 2ch color information having the same size as the monochrome information to generate a high-resolution image feature amount. For the synthesis means 22a, for example, the Convolution layer of the neural network may be used.
高解像度カラー情報推定手段23は、合成手段22aにより合成された高解像度の画像特徴量から、高解像度カラー情報を推定するための学習により、予め決定されたパラメータ群を用いて画像特徴量を抽出し、高解像度カラー情報107を推定するものである。ここで、学習とは、カラー情報拡大器10を作成するための学習をいう。
The high-resolution color information estimation means 23 extracts an image feature amount from a high-resolution image feature amount synthesized by the synthesis means 22a using a predetermined parameter group by learning for estimating high-resolution color information. However, the high-
高解像度カラー情報107は、低解像度カラー情報105が拡大されたカラー情報に相当し、高解像度モノクロ画像101に対応した解像度を有する。この高解像度カラー情報107とは、色空間のチャンネルごとのカラー情報であって、例えば、輝度チャンネル以外の2チャンネルについての画像特徴量をいう。
The high-
高解像度カラー情報推定手段23は、その前段からの複数(3以上)の出力(Output)に対応した複数(3以上)のアウトプットチャンネルについての画像特徴量を、色空間における2チャンネルについての画像特徴量に変換し、カラー情報を推定する。
高解像度カラー情報推定手段23には、例えば、ニューラルネットワークのConvolution層を用いてもよい。また、Convolution層(隠れ層)が複数あってもよい。つまり、Convolutionを連続的に繰り返し行ってもよい。
高解像度カラー情報推定手段23の前段からのアウトプットチャンネル数は所望の値に設定できる。例えば合成手段22aからのアウトプットチャンネル数は3chやそれ以上であってもよい。
The high-resolution color information estimation means 23 uses image features for a plurality of (3 or more) output channels corresponding to a plurality of (3 or more) outputs from the previous stage, and an image for two channels in the color space. Convert to feature quantity and estimate color information.
For the high-resolution color information estimation means 23, for example, the Convolution layer of the neural network may be used. In addition, there may be a plurality of Convolution layers (hidden layers). That is, the Convolution may be repeated continuously.
The number of output channels from the previous stage of the high-resolution color information estimation means 23 can be set to a desired value. For example, the number of output channels from the synthesis means 22a may be 3 channels or more.
カラー情報拡大器10は、図7に示すように、第1の特徴抽出手段31、第2の特徴抽出手段32、および第3の特徴抽出手段33のうちの少なくとも1つの特徴抽出手段を備えてもよい。
As shown in FIG. 7, the
第1の特徴抽出手段31は、高解像度モノクロ画像101から、学習により予め決定されたパラメータ群を用いて高解像度の画像特徴量を抽出し、抽出した高解像度の画像特徴量を合成手段22aに出力するものである。なお、学習とは、カラー情報拡大器10を作成するための学習をいう。第1の特徴抽出手段31は、第1の特徴抽出手段31に入力される1chのモノクロ情報を、第1の特徴抽出手段31のアウトプットチャンネルごとに高解像度の画像特徴量にそれぞれ変換する。
The first feature extraction means 31 extracts a high-resolution image feature amount from the high-
第2の特徴抽出手段32は、低解像度カラー情報105から、学習により予め決定されたパラメータ群を用いて低解像度の画像特徴量を抽出し、抽出した低解像度の画像特徴量をサイズ拡大手段21に出力するものである。第2の特徴抽出手段32は、第2の特徴抽出手段32に入力される2chのカラー情報を、第2の特徴抽出手段32のアウトプットチャンネルごとに低解像度の画像特徴量にそれぞれ変換する。
The second feature extraction means 32 extracts a low-resolution image feature amount from the low-
第3の特徴抽出手段33は、合成手段22aで生成された高解像度の画像特徴量から、学習により予め決定されたパラメータ群を用いて高解像度の画像特徴量を抽出し、抽出した高解像度の画像特徴量を高解像度カラー情報推定手段23に出力するものである。第3の特徴抽出手段33は、合成手段22aからの複数の出力に対応した複数のアウトプットチャンネル(例えば3ch)についての画像特徴量を、第3の特徴抽出手段33のアウトプットチャンネルごとに高解像度の画像特徴量にそれぞれ変換する。なお、第3の特徴抽出手段33のアウトプットチャンネル数は、例えば64ch、128ch、256ch等に設定される。 The third feature extraction means 33 extracts a high-resolution image feature amount from the high-resolution image feature amount generated by the synthesis means 22a using a parameter group predetermined by learning, and extracts the high-resolution image feature amount. The image feature amount is output to the high-resolution color information estimation means 23. The third feature extraction means 33 increases the amount of image features for a plurality of output channels (for example, 3 channels) corresponding to the plurality of outputs from the synthesis means 22a for each output channel of the third feature extraction means 33. Convert each to the image feature amount of the resolution. The number of output channels of the third feature extraction means 33 is set to, for example, 64ch, 128ch, 256ch, or the like.
各特徴抽出手段31〜33には、例えば、ニューラルネットワークのConvolution層を用いてもよい。また、Convolution層(隠れ層)が複数あってもよい。各特徴抽出手段からのアウトプットチャンネル数は所望の値に設定できる。なお、本明細書では、特徴抽出手段等に入力した画像特徴量をアウトプットチャンネルごとにコンボリューションにかけて得られた画像特徴量のことを、入力から得た特徴という。また、本明細書では、特徴抽出手段等への複数チャンネルからなる入力情報をコンボリューションにかけて、入力した画像特徴量を変換することを、特徴を抽出するという。 For each feature extraction means 31 to 33, for example, a Convolution layer of a neural network may be used. In addition, there may be a plurality of Convolution layers (hidden layers). The number of output channels from each feature extraction means can be set to a desired value. In this specification, the image feature amount obtained by convolving the image feature amount input to the feature extraction means or the like for each output channel is referred to as a feature obtained from the input. Further, in the present specification, the feature extraction is defined as converting the input image feature amount by applying convolution to the input information consisting of a plurality of channels to the feature extraction means or the like.
図7では、高解像度カラー情報推定手段23とは別に第3の特徴抽出手段33を図示したが、高解像度カラー情報推定手段23が内部に第3の特徴抽出手段33を備えることとしてもよい。第3の特徴抽出手段33は、高解像度カラー情報推定手段23が色空間のチャンネルごとの画像特徴量を抽出する前に、色空間の2チャンネルについての画像特徴量を出力するためのパラメータ群とは異なるパラメータ群を用いて、サイズ拡大手段21および合成手段22aの処理により生成された高解像度の画像特徴量から、複数チャンネル(例えば64ch)について高解像度の画像特徴量をそれぞれ生成する。 In FIG. 7, the third feature extraction means 33 is shown separately from the high-resolution color information estimation means 23, but the high-resolution color information estimation means 23 may include the third feature extraction means 33 inside. The third feature extraction means 33 is a parameter group for outputting the image feature amounts for the two channels of the color space before the high-resolution color information estimation means 23 extracts the image feature amount for each channel in the color space. Uses different parameter groups to generate high-resolution image features for a plurality of channels (for example, 64 channels) from the high-resolution image features generated by the processing of the size enlargement means 21 and the compositing means 22a.
カラー情報拡大器10によれば、高解像度モノクロ画像101(モノクロ情報)を明示的に用いているので、推定されるカラー情報のぼけを低減し、低解像度カラー情報105を精度よく拡大できる。このカラー情報拡大器10は、例えば4Kまたは8K等の高解像度モノクロ画像101への自動色付けをする際に用いるカラー情報を推定するカラー情報推定器3に組み込むことができる。また、カラー情報推定器3は、高解像度モノクロ画像101への自動色付けをする際に用いるカラー情報を推定する精度を向上させることができる。
According to the
また、高解像度のモノクロ画像のデジタルデータは、例えば物理的フィルムからスキャンすることにより得られるが、従来の色付け技術では、このような高解像度のモノクロ画像に直接色づけすることはできなかった。これに対して、カラー情報推定器3を備える自動色付け装置1は、4K等の高解像度のモノクロ画像に対する自然な色付けを可能とすることができる。
Further, digital data of a high-resolution monochrome image can be obtained by scanning, for example, from a physical film, but conventional coloring techniques cannot directly color such a high-resolution monochrome image. On the other hand, the
また、例えば、写真や物理的フィルムからスキャンしたモノクロ画像のデータは存在するが、写真や物理的フィルムが消失してデータしか残っていない状況においても、カラー情報推定器3を備える自動色付け装置1は、当時の色情報を推定して、モノクロ画像に色付けすることができる。
Further, for example, even in a situation where there is data of a monochrome image scanned from a photograph or a physical film, but the photograph or the physical film disappears and only the data remains, the
さらに、例えば、低解像度カラー情報105が由来するところのカラー撮影された画像では、モノクロ情報チャンネル(色空間における輝度チャンネル)上で境界がはっきりしている領域は、カラー情報チャンネル(例えば、輝度チャンネル以外の2チャンネル)上でも境界がはっきりしているケースが多い。ここで、境界とは、例えばオブジェクトの輪郭線(オブジェクトとその背景との境目)等の線で表される部分である。
そのため、カラー情報拡大器10のように、高解像度モノクロ画像101を用いて、低解像度カラー情報105を拡大すると、特に、高解像度モノクロ情報チャンネル(高解像度モノクロ画像101)上で境界がはっきりしている領域におけるカラー情報のぼけが低減される効果を奏する。
Further, for example, in a color-photographed image from which the low-
Therefore, when the low-
なお、前記したカラー情報は、色空間における輝度チャンネル以外の2チャンネルとして説明したが、それ以外であっても取り扱うことが可能である。一例としては、RGB色空間における3チャンネルすべてをカラー情報として用いてもよい。 Although the above-mentioned color information has been described as two channels other than the luminance channel in the color space, it is possible to handle other channels. As an example, all three channels in the RGB color space may be used as color information.
また、カラー情報拡大器やカラー情報推定器に対して入力されるカラー情報の形式と、出力するカラー情報の形式とは一致していなくても構わない。一例としては、カラー情報拡大器10に、高解像度モノクロ画像101としてLab色空間におけるLチャンネルを入力すると共に、低解像度カラー情報105としてLab色空間におけるabチャンネルを入力した場合、高解像度カラー情報107としてRGB色空間におけるRGBチャンネルを出力することもできる。
Further, the format of the color information input to the color information magnifier and the color information estimator and the format of the output color information do not have to match. As an example, when the L channel in the Lab color space is input to the
また、カラー情報拡大器10は、ニューラルネットワークによる学習に限らず、他の機械学習技術を用いて構成することもできる。誤差計算器40は、カラー情報拡大器10の学習に用いるだけではなく、低解像度カラー情報推定器7の学習に用いてもよい。
Further, the
実施形態に係る誤差計算器の性能を確かめるために、誤差計算器40を学習に用いたカラー情報拡大器によってカラー情報を拡大する実験を行った。図8は、実験に用いたカラー情報拡大器を模式的に示す説明図である。図8に示すように、実験に用いたカラー情報拡大器は、サイズ拡大手段21と、合成手段22aと、第3の特徴抽出手段33と、高解像度カラー情報推定手段23と、を備えている。なお、このカラー情報拡大器において、図7に示すカラー情報拡大器10と同じ構成には同じ符号を付して説明を省略する。
In order to confirm the performance of the error computer according to the embodiment, an experiment was conducted in which the color information was expanded by the color information expander using the
合成手段22aは、高解像度モノクロ画像101と、サイズ拡大手段21によって生成された高解像度の画像情報とを合成して高解像度の合成画像情報を生成する。
The compositing means 22a synthesizes the high-
高解像度モノクロ画像101は、Lab色空間におけるLチャンネルに相当する1chのモノクロ情報(画像特徴量)である。図8では、1枚の画像として模式的に示した。
また、実験では、高解像度モノクロ画像101が960×540ピクセルの画像であるものとした。なお、高解像度モノクロ画像101における画素値をベクトルで表現すると、一般には次の式(6)で示される。式(6)で示すベクトルx1は、高解像度モノクロ画像101の画素数と同様に518400個の成分を持つ。
The high-
Further, in the experiment, it was assumed that the high-
低解像度カラー情報105は、Lab色空間におけるabチャンネルに相当する2chのカラー情報(画像特徴量)である。図8では、2枚の小さな画像として模式的に示した。
また、実験では、低解像度カラー情報105の解像度が480×270ピクセルであるものとした。そして、実験では、サイズ拡大手段21による拡大率を2(垂直方向2倍×水平方向2倍)とした。図8では、2枚の拡大された画像として模式的に示した。
The low-
Further, in the experiment, it was assumed that the resolution of the low
これら拡大された2chのカラー情報における画素値をそれぞれベクトルで表現すると、一般には次の式(7)および式(8)で示される。それぞれのベクトルx2,x3は、前記した式(6)で示されるベクトルx1と同数個の成分を持っている。 When the pixel values in the enlarged 2ch color information are expressed by vectors, they are generally expressed by the following equations (7) and (8). Each of the vectors x 2 and x 3 has the same number of components as the vector x 1 represented by the above equation (6).
合成手段22aは、各ベクトルx1、x2、x3を入力として、それらのベクトル成分を各画素に対応させて並べて、3chの情報とする。図8では、3枚の画像として模式的に示した。なお、この時点では、例えば3×960×540個の画素ごとの特徴量に対応したメモリが必要である。 The synthesizing means 22a takes each vector x 1 , x 2 , and x 3 as inputs, and arranges the vector components corresponding to each pixel to obtain 3ch information. In FIG. 8, it is schematically shown as three images. At this point, for example, a memory corresponding to the feature amount for each of 3 × 960 × 540 pixels is required.
第3の特徴抽出手段33は、コンボリューションを行うニューラルネットワークで構成されている。本実験では、20層のConvolution層を構築した。
また、各Convolution層では、出力としてN個の特徴を抽出するものとした。つまり、アウトプットチャンネル数はNである。この実験ではNch=64chとした。
なお、図8では、3層のConvolution層だけを示し、他は省略した。また、64chのうち12のチャンネルだけをNchとして図示し、他は省略した。
The third feature extraction means 33 is composed of a neural network that performs convolution. In this experiment, 20 Convolution layers were constructed.
Further, in each Convolution layer, N features are extracted as outputs. That is, the number of output channels is N. In this experiment, Nch = 64ch.
In FIG. 8, only three Convolution layers are shown, and the others are omitted. Further, only 12 channels out of 64 channels are shown as Nch, and the others are omitted.
Convolution層の1層目(1回目)は、入力チャンネルが3ch(色空間における3チャンネル)であり、この1層目についての64のアウトプットチャンネルごとに、次の式(9)で表されるコンボリューションを行った。 The first layer (first time) of the Convolution layer has 3 channels (3 channels in the color space), and each of the 64 output channels for the first layer is represented by the following equation (9). Convolution was done.
式(9)において、ωiは重みベクトルである。重みベクトルωiは、このカラー情報拡大器における学習の際に誤差を使ってωiを更新する、という誤差計算で決定する学習パラメータである。重みベクトルωiは、1次元の多数変数のベクトルであって、入力される高解像度モノクロ画像101の画素数と同数の成分を持つ。bはバイアスである。なお、i=1,2,3に対応したx1、x2、x3は式(6)〜式(8)で定義されている。
なお、この時点では、例えば64×960×540個の画素ごとの特徴量に対応したメモリが必要である。
In equation (9), ω i is a weight vector. The weight vector ω i is a learning parameter determined by error calculation in which ω i is updated by using an error during learning in this color information expander. The weight vector ω i is a one-dimensional multivariable vector and has the same number of components as the number of pixels of the input high-
At this point, for example, a memory corresponding to the feature amount for each of 64 × 960 × 540 pixels is required.
Convolution層の2層目(2回目)は、入力チャンネルが64ch(前段の1層目についてのアウトプットにおける64チャンネル)であり、2層目についての64のアウトプットチャンネルごとに、次の式(10)で表されるコンボリューションを行った。 The second layer (second time) of the Convolution layer has 64 channels of input channels (64 channels in the output for the first layer in the previous stage), and for each of the 64 output channels for the second layer, the following equation ( The convolution represented by 10) was performed.
式(10)は式(9)と同様の形式で表されている。なお、i=1〜64に対応したx1〜x64は、前段の1層目についてのアウトプットにおける64チャンネルのそれぞれの情報を示しており、式(6)〜式(8)と同様に定義できるので、その詳細は省略する。 Equation (10) is expressed in the same format as Equation (9). Incidentally, x 1 ~x 64 corresponding to the i = 1 to 64 indicates the respective information 64 channels at the output of the first layer of the preceding stage, as in equation (6) to (8) Since it can be defined, the details are omitted.
Convolution層の3〜19層目(3〜19回目)は、同様に、入力チャンネルが64ch(前の層についてのアウトプットにおける64チャンネル)であり、それぞれ、64のアウトプットチャンネルごとに、前記した式(10)で表されるコンボリューションを行った。なお、3〜19層目においても、i=1〜64に対応したx1〜x64は、同様に、それらの前の層についてのアウトプットにおける64チャンネルについての画像特徴量を示している。 Similarly, in the 3rd to 19th layers (3rd to 19th times) of the Convolution layer, the input channels are 64 channels (64 channels in the output for the previous layer), and each of the 64 output channels is described above. The convolution represented by the equation (10) was performed. Also in 3 to 19-layer, x 1 ~x 64 corresponding to the i = 1 to 64 are likewise shows an image feature amount for 64 channels at the output of their previous layer.
高解像度カラー情報推定手段23もConvolution層で構成されている。この高解像度カラー情報推定手段23は、出力として、色空間における2つのチャンネルに対応させた特徴をそれぞれ抽出した。つまり、アウトプットチャンネルは2chである。
このConvolution層(高解像度カラー情報推定手段23)は、入力チャンネルが64ch(前の層についてのアウトプットにおける64チャンネル)であり、色空間における2つのチャンネルごとに、前記した式(10)で表されるコンボリューションを行った。
The high-resolution color information estimation means 23 is also composed of a Convolution layer. The high-resolution color information estimation means 23 extracts features corresponding to two channels in the color space as outputs. That is, the output channel is 2ch.
This Convolution layer (high-resolution color information estimation means 23) has 64 channels of input channels (64 channels in the output of the previous layer), and each of the two channels in the color space is represented by the above equation (10). The convolution to be done was done.
前記した式(9)におけるωiと式(10)におけるωiとはそれぞれ異なっている。また、アウトプットチャンネルごとにωiはそれぞれ異なっている。さらに、前記した20層のConvolution層には、それぞれ異なる重みベクトルωiを用いた。 They are different from each from the omega i in equation (10) and omega i in the equation (9). Also, ω i is different for each output channel. Further, different weight vectors ω i were used for the 20 Convolution layers described above.
また、実験では、1282回(=64+64×19+2)のコンボリューションのすべてを、一例として、以下の同じ条件で、重みベクトルωiを変えながら行った。
カーネル(kernel):3
パディング(padding):1
ストライド(stride):1
In the experiment, all 1282 convolutions (= 64 + 64 × 19 + 2) were performed as an example under the same conditions as below, while changing the weight vector ω i.
Kernel: 3
Padding: 1
Stride: 1
よって、実験で用いた重みベクトルの各成分の個数を総計した個数は、次の式(11)を演算した結果の個数となる。
3×3×(3×64+64×64×19+64×2) … 式(11)
また、バイアス項の個数の総計はコンボリューションの個数と同じく、1282個である。これらの合計が全パラメータ数である。
つまり、実験に用いたカラー情報拡大器において、学習によって予め決定されたパラメータ群の個数は、703296+1282=704578個となる。
Therefore, the total number of each component of the weight vector used in the experiment is the number of results obtained by calculating the following equation (11).
3 × 3 × (3 × 64 + 64 × 64 × 19 + 64 × 2)… Equation (11)
The total number of bias terms is 1282, which is the same as the number of convolutions. The sum of these is the total number of parameters.
That is, in the color information magnifier used in the experiment, the number of parameter groups determined in advance by learning is 703296 + 1282 = 704578.
以上の処理により得られた高解像度カラー情報107を、図4に示すように、元画像である高解像度モノクロ画像101と合成して、高解像度カラー画像109を作成した(以下、実施例1)。
また、従来技術の方法で拡大したカラー情報を、元画像である高解像度モノクロ画像101と合成して、高解像度カラー画像を作成した(以下、比較例1)。
実施例1は、比較例1と比べて色のぼけが低減されたことを目視で確認できた。
また、式(1)で計算できる誤差が、平均値で7.66(比較例1)から6.53(実施例1)と約17%減少したことを確認できた。
As shown in FIG. 4, the high-
Further, the color information enlarged by the method of the prior art was combined with the high-
In Example 1, it was confirmed visually that the color blur was reduced as compared with Comparative Example 1.
Further, it was confirmed that the error that can be calculated by the equation (1) was reduced by about 17% from 7.66 (Comparative Example 1) to 6.53 (Example 1) on average.
本実施形態に係る誤差計算器は、カラー情報拡大器やカラー情報推定器を作成する際の学習に利用することができる。 The error calculator according to the present embodiment can be used for learning when creating a color information magnifier and a color information estimator.
1 自動色付け装置
3 カラー情報推定器
5 縮小器
7 低解像度カラー情報推定器
9 情報合成器
10 カラー情報拡大器
21 サイズ拡大手段
22a 合成手段
23 高解像度カラー情報推定手段
31〜33 特徴抽出手段
40 誤差計算器
41 特徴量マップ作成手段
42 第1誤差算出手段
43 誤差合成手段
51 第2誤差算出手段
52 最小化手段
60 推定器
S 学習装置
1 Automatic coloring device 3
Claims (7)
前記第1の画像特徴量および前記第2の画像特徴量から、所定演算により画像内における複数の画素の関係性を特徴付ける特徴量を抽出して第1の特徴量マップおよび第2の特徴量マップをそれぞれ作成する特徴量マップ作成手段と、
前記第1の特徴量マップと前記第2の特徴量マップとに対応する画素間の画素値の誤差に基づく特徴量マップ間の誤差を算出する第1誤差算出手段と、
前記第1の画像特徴量と前記第2の画像特徴量とに対応する画素間の画素値の誤差に基づいて算出された画像特徴量間の誤差を入力し、前記画像特徴量間の誤差と、前記特徴量マップ間の誤差と、を加算し、合成誤差を生成する誤差合成手段と、を備える誤差計算器。 An error calculator that calculates the error between the first image feature amount, which is the estimated color information, and the second image feature amount, which is the true color information.
From the first image feature amount and the second image feature amount, the feature amount that characterizes the relationship of a plurality of pixels in the image is extracted by a predetermined calculation, and the first feature amount map and the second feature amount map Feature map creation means to create each
A first error calculating means for calculating an error between feature amount maps based on an error of pixel values between pixels corresponding to the first feature amount map and the second feature amount map, and a first error calculating means.
An error between the image feature amounts calculated based on the error of the pixel value between the pixels corresponding to the first image feature amount and the second image feature amount is input, and the error between the image feature amounts and the error between the image feature amounts are input. An error calculator comprising an error compositing means for generating a compositing error by adding the error between the feature quantity maps.
前記第2の画像特徴量は、学習器の訓練データとして準備された真のカラー情報である請求項4に記載の誤差計算器。 The first image feature amount is estimated color information that the learner outputs according to internal parameters with respect to the input value input as the training data.
The error calculator according to claim 4, wherein the second image feature amount is true color information prepared as training data of the learning device.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2017150154A JP6886887B2 (en) | 2017-08-02 | 2017-08-02 | Error calculator and its program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2017150154A JP6886887B2 (en) | 2017-08-02 | 2017-08-02 | Error calculator and its program |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2019029938A JP2019029938A (en) | 2019-02-21 |
JP6886887B2 true JP6886887B2 (en) | 2021-06-16 |
Family
ID=65476702
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2017150154A Active JP6886887B2 (en) | 2017-08-02 | 2017-08-02 | Error calculator and its program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP6886887B2 (en) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110490878A (en) * | 2019-07-29 | 2019-11-22 | 上海商汤智能科技有限公司 | Image processing method and device, electronic equipment and storage medium |
WO2023281802A1 (en) * | 2021-07-06 | 2023-01-12 | ソニーグループ株式会社 | Signal processing device and signal processing method |
KR102427657B1 (en) * | 2021-12-27 | 2022-08-02 | 주식회사 딥노이드 | Apparatus for generating color of image using artificial neural network and method therefor |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH0737093A (en) * | 1993-07-16 | 1995-02-07 | Toshiba Corp | Pattern identifying device |
JP5057183B2 (en) * | 2010-03-31 | 2012-10-24 | アイシン・エィ・ダブリュ株式会社 | Reference data generation system and position positioning system for landscape matching |
JP5816069B2 (en) * | 2011-12-07 | 2015-11-17 | ダンロップスポーツ株式会社 | Silhouette correction method and silhouette correction system |
-
2017
- 2017-08-02 JP JP2017150154A patent/JP6886887B2/en active Active
Also Published As
Publication number | Publication date |
---|---|
JP2019029938A (en) | 2019-02-21 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11610082B2 (en) | Method and apparatus for training neural network model used for image processing, and storage medium | |
JP5157768B2 (en) | Image processing apparatus and method, and program | |
JP2007000205A (en) | Image processing apparatus, image processing method, and image processing program | |
US8379972B1 (en) | Color decontamination for image compositing | |
JP6886887B2 (en) | Error calculator and its program | |
US7612784B2 (en) | Image processor and method, computer program, and recording medium | |
US8233748B2 (en) | Image-resolution-improvement apparatus and method | |
JP2003518671A (en) | Optical flow and image formation | |
CN113039576A (en) | Image enhancement system and method | |
CN113284061A (en) | Underwater image enhancement method based on gradient network | |
CN111062895B (en) | Microscopic image restoration method based on multi-view-field segmentation | |
JP4839448B2 (en) | Image quality improvement processing method and image quality improvement processing program for multiple areas | |
CN106846250B (en) | Super-resolution reconstruction method based on multi-scale filtering | |
KR101028699B1 (en) | Apparatus and method for painterly rendering | |
WO2015198368A1 (en) | Image processing device and image processing method | |
CN110580696A (en) | Multi-exposure image fast fusion method for detail preservation | |
JP2000152250A (en) | Image processing unit, method and computer readable storage medium | |
KR100602739B1 (en) | Semi-automatic field based image metamorphosis using recursive control-line matching | |
JP6902425B2 (en) | Color information magnifiers and color information estimators, and their programs | |
US7734118B2 (en) | Automatic image feature embedding | |
EP0584941B1 (en) | Methods and apparatus for generating graphic patterns | |
KR20170000869A (en) | Method of image processing, image processor performing the method and display device having the image processor | |
KR20070119482A (en) | Image resampling method | |
JPWO2015198368A1 (en) | Image processing apparatus and image processing method | |
JP4265362B2 (en) | Image processing device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20200702 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20210415 |
|
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: 20210420 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20210517 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 6886887 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |