JP2021089476A - Information processing device, imaging device, control method, and program - Google Patents
Information processing device, imaging device, control method, and program Download PDFInfo
- Publication number
- JP2021089476A JP2021089476A JP2019218083A JP2019218083A JP2021089476A JP 2021089476 A JP2021089476 A JP 2021089476A JP 2019218083 A JP2019218083 A JP 2019218083A JP 2019218083 A JP2019218083 A JP 2019218083A JP 2021089476 A JP2021089476 A JP 2021089476A
- Authority
- JP
- Japan
- Prior art keywords
- image data
- brightness
- information processing
- weighting coefficient
- learning model
- 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.)
- Pending
Links
Images
Landscapes
- Image Analysis (AREA)
Abstract
Description
本発明は、推論処理を実行する学習モデルを有する情報処理装置、撮像装置、制御方法、およびプログラムに関する。 The present invention relates to an information processing device, an imaging device, a control method, and a program having a learning model for executing inference processing.
画像データに含まれる被写体を認識する処理(物体認識処理)が利用されている。暗い画像データに対して被写体の認識処理を実行する場合、特徴量を適切に取得できないので認識精度が低い。一方で、暗い画像データを含む様々な明るさの画像データに対する認識処理のニーズが存在する。 A process of recognizing a subject included in image data (object recognition process) is used. When the subject recognition process is executed for dark image data, the recognition accuracy is low because the feature amount cannot be acquired appropriately. On the other hand, there is a need for recognition processing for image data having various brightness including dark image data.
近年、物体認識処理の分野において、機械学習による手法が広く活用されている。一般的に、機械学習の学習段階において使用される入力画像に対して、オフセット処理や画像のビット幅に応じたゲイン処理等の前処理が施される。しかしながら、全体的に暗くコントラストが低い画像をスケーリングしても情報量は増加しないので、認識精度を向上させることが困難である。 In recent years, machine learning methods have been widely used in the field of object recognition processing. Generally, the input image used in the learning stage of machine learning is subjected to preprocessing such as offset processing and gain processing according to the bit width of the image. However, it is difficult to improve the recognition accuracy because the amount of information does not increase even if the image that is dark as a whole and has low contrast is scaled.
情報処理リソースが潤沢な環境では、広い演算ビット幅を有する学習モデルを用いて桁落ちを抑制したり、画像の明るさに応じた複数の学習モデルを用いて種々の明るさに対応したりすることができる。他方、組込みシステム等では、リソースが潤沢ではないので、限られたリソースを用いて精度良く推論処理を実行すべきである。 In an environment with abundant information processing resources, a learning model with a wide calculation bit width is used to suppress digit loss, and multiple learning models according to the brightness of the image are used to support various brightnesses. be able to. On the other hand, in embedded systems and the like, resources are not abundant, so inference processing should be executed with high accuracy using limited resources.
特許文献1は、ディープニューラルネットの活性化関数が引き起こす勾配消失を低減して、推論精度を向上させる技術を提案している。
重みパラメータの乗算によって勾配消失を低減させる特許文献1の技術では、各ニューロンに複数の重みパラメータが設けられることによって、回路規模等の情報処理リソースが増大してしまう。入力データに応じたパラメータの設定については特に触れられていない。
In the technique of
また、情報処理リソースが限られた環境において、複数の学習モデルを切り替えて様々な明るさに対応するようなリソースの使い方を採用することは困難である。 Further, in an environment where information processing resources are limited, it is difficult to switch a plurality of learning models and adopt a resource usage that corresponds to various brightnesses.
以上の事情に鑑み、本発明は、様々な明るさの画像データに対して高精度な推論を実行できる情報処理装置、撮像装置、制御方法、およびプログラムを提供することを目的とする。 In view of the above circumstances, it is an object of the present invention to provide an information processing device, an imaging device, a control method, and a program capable of performing highly accurate inference on image data having various brightnesses.
上記目的を達成するために、本発明の情報処理装置は、画像データに対する重み値を用いた演算によって推論処理を実行するニューラルネットワークである学習モデルと、前記画像データの明るさを特定する露出特定手段と、特定された前記明るさに基づいて前記重み値に乗算すべき重み係数を決定する重み係数決定手段と、を有することを特徴とする。 In order to achieve the above object, the information processing apparatus of the present invention is a learning model which is a neural network that executes inference processing by calculation using weight values for image data, and exposure specification for specifying the brightness of the image data. It is characterized by having a means and a weight coefficient determining means for determining a weighting coefficient to be multiplied by the weight value based on the specified brightness.
本発明によれば、様々な明るさの画像データに対して高精度な推論を実行できる。 According to the present invention, highly accurate inference can be performed on image data having various brightnesses.
以下、本発明の実施形態について添付図面を参照しながら詳細に説明する。以下に説明される各実施形態は、本発明を実現可能な構成の一例に過ぎない。以下の各実施形態は、本発明が適用される装置の構成や各種の条件に応じて適宜に修正または変更することが可能である。したがって、本発明の範囲は、以下の各実施形態に記載される構成によって限定されるものではない。例えば、相互に矛盾のない限りにおいて実施形態内に記載された複数の構成を組み合わせた構成も採用可能である。 Hereinafter, embodiments of the present invention will be described in detail with reference to the accompanying drawings. Each embodiment described below is merely an example of a configuration in which the present invention can be realized. Each of the following embodiments can be appropriately modified or modified according to the configuration of the apparatus to which the present invention is applied and various conditions. Therefore, the scope of the present invention is not limited by the configurations described in each of the following embodiments. For example, a configuration in which a plurality of configurations described in the embodiment are combined can be adopted as long as there is no mutual contradiction.
<第1実施形態>
図1は、本発明の第1実施形態に係る情報処理装置100の構成を示すブロック図である。概略的には、第1実施形態では、入力される画像の明るさに応じてニューラルネットワークの重み係数を調整することによって、情報処理装置100に設けられた推論器による推定の精度を向上させる。
<First Embodiment>
FIG. 1 is a block diagram showing a configuration of an
情報処理装置100は、CPU101、ROM102、RAM103、HDD104、入力部105、表示部106、およびシステムバス107を有する。なお、情報処理装置100は、撮像光学系と撮像素子とを有し画像データを生成する撮像装置であってもよいし、ネットワーク等を介して外部から画像データを取得する端末(パーソナルコンピュータ等)であってもよい。
The
CPU101は、種々の演算処理を実行可能なプロセッサであって、情報処理装置100に設けられた要素を統合的に制御する制御部として機能する。
The
ROM102は、不揮発性の記憶媒体であって、例えば、フラッシュメモリやEEPROM等の素子によって構成され、情報処理装置100の制御に用いられるプログラムを格納している。
The
RAM103は、揮発性の記憶媒体であって、CPU101が演算に使用するワーキングメモリとして機能する。
The
HDD104は、情報処理装置100の内部ストレージであって、種々のデータおよび制御情報を格納する。HDD104が、情報処理装置100の制御に用いられるプログラムを格納していてもよい。
The
入力部105は、ユーザからの指示や他装置からのデータ(例えば、画像データ)が入力されるインタフェースである。
The
表示部106は、情報処理装置100の動作によって取得および生成される種々の情報を表示する表示部であって、例えば、液晶ディスプレイによって構成される。
The
システムバス107は、情報処理装置100が有する上記の要素を相互に接続する伝送路である。
The
以下に説明される本実施形態に係る学習モデル20、機能ブロック、および種々の処理は、CPU101が、ROM102またはHDD104に格納されたプログラムをRAM103に展開して実行することによって実現される。また、本実施形態に係る種々の処理は、例えば、ユーザが入力部105を操作してCPU101に指示することによって開始され、種々の処理の結果は表示部106に出力される。
The learning model 20, the functional block, and various processes according to the present embodiment described below are realized by the
図2は、本発明の第1実施形態に係る学習モデル20(推論器)の説明図である。学習モデル20は、入力層210と中間層220と出力層230とを有するニューラルネットワーク(以下、NNと省略することがある)であって、教師あり学習によって学習された学習済みモデルである。本実施形態の学習済みモデルは、入力データを画像データ、教師データをその画像に写る被写体の種類(人、動物、木など)を示す情報として、例えば畳み込みニューラルネットワークのアルゴリズムに従って学習されたものとする。学習モデル20は、以下に説明されるアルゴリズムを示すプログラムおよび推論処理中に使用されるパラメータによって規定される。 FIG. 2 is an explanatory diagram of the learning model 20 (inference device) according to the first embodiment of the present invention. The learning model 20 is a neural network having an input layer 210, an intermediate layer 220, and an output layer 230 (hereinafter, may be abbreviated as NN), and is a trained model learned by supervised learning. In the trained model of the present embodiment, the input data is image data, and the teacher data is information indicating the type of subject (human, animal, tree, etc.) reflected in the image, for example, the trained model is trained according to an algorithm of a convolutional neural network. To do. The learning model 20 is defined by a program indicating the algorithm described below and parameters used during the inference process.
入力層210は、画像データが入力される複数のノードu1,u2を含む層であって、中間層220に対して画像データを出力する。より具体的には、入力層210には、画像データ内の画素値を行列に変換したデータが入力される。入力層210のノードu1,u2は、入力されたデータを中間層220にそれぞれ出力する。 The input layer 210 is a layer including a plurality of nodes u1 and u2 into which image data is input, and outputs image data to the intermediate layer 220. More specifically, the input layer 210 is input with data obtained by converting the pixel values in the image data into a matrix. The nodes u1 and u2 of the input layer 210 output the input data to the intermediate layer 220, respectively.
中間層220は、複数のニューロンv1,v2(ノード)を含む層であって、入力層210から供給される入力データに対する演算処理(積和演算、活性化関数による非線形演算等)を実行して、出力層230に出力する。すなわち、中間層220は、入力層210と中間層220との経路であるエッジごとに設定された重み値240(uv11,uv12,uv21,uv22)を入力データに乗算し、得られた重み付き和を活性化関数によって変換して、出力層230に出力する。中間層220における活性化関数として、例えば、シグモイド関数またはReLU関数が用いられる。なお、学習モデル20が、複数の中間層を含んでよい。すなわち、学習モデル20は、ディープニューラルネットワークによって構成されてよい。 The intermediate layer 220 is a layer including a plurality of neurons v1 and v2 (nodes), and executes arithmetic processing (product-sum operation, non-linear operation by activation function, etc.) on the input data supplied from the input layer 210. , Output to the output layer 230. That is, the intermediate layer 220 multiplies the input data by the weight values 240 (uv11, uv12, uv21, uv22) set for each edge, which is the path between the input layer 210 and the intermediate layer 220, and the obtained weighted sum. Is converted by the activation function and output to the output layer 230. As the activation function in the intermediate layer 220, for example, a sigmoid function or a ReLU function is used. The learning model 20 may include a plurality of intermediate layers. That is, the learning model 20 may be configured by a deep neural network.
出力層230は、中間層220から供給される入力データに対する演算処理(積和演算、活性化関数による非線形演算等)を実行して出力する複数のノードy1,y2を含む層である。より具体的には、出力層230は、中間層220と出力層230との経路であるエッジごとに設定された重み値240(vy11,vy12,vy21,vy22)を入力データに乗算し、重み付き和を活性化関数によって変換して、出力層230に出力する。なお、出力層230は、出力値を確率値に変換して出力してよい。ノードy1が人を表す出力であり、ノードy2が木を表す出力である場合、入力された画像データに含まれる主被写体が人である確率がノードy1から出力され、主被写体が木である確率がノードy2から出力される。出力層230における活性化関数として、例えば、ソフトマックス関数が用いられる。 The output layer 230 is a layer including a plurality of nodes y1 and y2 that execute arithmetic processing (product-sum operation, non-linear operation by activation function, etc.) on the input data supplied from the intermediate layer 220 and output the data. More specifically, the output layer 230 is weighted by multiplying the input data by the weight values 240 (by11, by12, by21, by22) set for each edge, which is the path between the intermediate layer 220 and the output layer 230. The sum is converted by the activation function and output to the output layer 230. The output layer 230 may convert the output value into a probability value and output it. When node y1 is an output representing a person and node y2 is an output representing a tree, the probability that the main subject included in the input image data is a person is output from node y1, and the probability that the main subject is a tree. Is output from the node y2. As the activation function in the output layer 230, for example, a softmax function is used.
上記した重み値240(uv11,uv12,uv21,uv22,vy11,vy12,vy21,vy22)は、露出特定部250および重み係数決定部260によって調整される。
The above-mentioned weight values 240 (uv11, uv12, uv21, uv22, by11, by12, by21, by22) are adjusted by the
露出特定部250は、学習モデル20の入力層210に入力される画像データの明るさLを検出して、重み係数決定部260に出力する。なお、「明るさ」は、一般的に、光束(ルーメン)、光度(カンデラ)、照度(ルクス)等、種々の単位に基づいて示され得る値である。本実施形態の露出特定部250は、画像データの「明るさ」を示す1つの指標値Lを1つの画像データごとに特定する。
The
重み係数決定部260は、露出特定部250が検出した画像データの明るさLに基づいて、重み値240に乗算すべき重み係数を決定する(すなわち、重み値240を調整する)。図2に示すように、全ての重み値240に対して同じ重み係数αが乗算されてもよいし、図3に示すように、複数の重み係数α,β,γ,…が選択的に複数の重み値240に対して乗算されてもよい。例えば、図3(a)に示すように、層ごとに異なる重み係数α,βが重み値240に乗算されてもよい。図3(b)に示すように、層内に含まれる複数のエッジに対して異なる重み係数α,βが乗算されてもよい。図3(c)に示すように、重み係数が乗算されない層(エッジ)があってもよい。
The weighting
図4および図5を参照して、本発明の第1実施形態における画像認識について説明する。図4は従来技術による画像認識を示し、図5は本実施形態の構成による画像認識を示している。いずれの図においても、明るい画像401,501(明るさの指標値Lが相対的に大きい画像)と暗い画像402,502(明るさの指標値Lが相対的に小さい画像)とにおける認識処理が対比されている。図4および図5に示すように、本例における主被写体は「人」である。
Image recognition according to the first embodiment of the present invention will be described with reference to FIGS. 4 and 5. FIG. 4 shows image recognition according to the prior art, and FIG. 5 shows image recognition according to the configuration of the present embodiment. In each of the figures, the recognition processing is performed on the
本例における学習モデル20は、入力される画像データに示される主被写体が何であるかを推論する推論値を出力する。出力層230に含まれる複数のノード(ニューロン)が、推論される物体にそれぞれ対応する。学習モデル20の出力層230は、例えば、主被写体が人である確率を出力するノードy1と、主被写体が木である確率を出力するノードy2とを含む。なお、本例の学習モデル20は、説明の簡単のために一般的な3層のNNとして図示されているが、画像認識を含む画像処理に好適である畳み込みニューラルネットワーク(CNN)によって学習モデル20が構成されてもよい。 The learning model 20 in this example outputs an inferred value for inferring what the main subject shown in the input image data is. A plurality of nodes (neurons) included in the output layer 230 correspond to the inferred object. The output layer 230 of the learning model 20 includes, for example, a node y1 that outputs the probability that the main subject is a person and a node y2 that outputs the probability that the main subject is a tree. The learning model 20 of this example is shown as a general three-layer NN for simplicity of explanation, but the learning model 20 is based on a convolutional neural network (CNN) suitable for image processing including image recognition. May be configured.
図4に示すような従来技術による学習モデル20’では、明るい画像データが入力された場合には精度良く被写体を認識できるが、暗い画像データが入力された場合には精度良く被写体を認識できない場合がある。 In the learning model 20'by the conventional technique as shown in FIG. 4, the subject can be recognized accurately when bright image data is input, but the subject cannot be recognized accurately when dark image data is input. There is.
例えば、学習モデル20’に明るい画像データ401が入力された図4(a)では、学習モデル20’が、主被写体が人である確率が99%であり、主被写体が木である確率が1%であると出力している。すなわち、画像データに示される主被写体が人であることが精度良く認識されている。他方、学習モデル20’に暗い画像データ402が入力された図4(b)では、学習モデル20’が、主被写体が人である確率が33%であり、主被写体が木である確率が67%であると出力している。すなわち、画像データに示される主被写体が人であることが精度良く認識されていない。理由は以下の通りである。
For example, in FIG. 4A in which
暗い画像データにおいては、画像データ内の画素値が小さい値を取る傾向にある。したがって、暗い画像データが学習モデル20’に入力されると、NNでの推論演算の過程において桁落ちが発生するので、演算途中で値が喪失する(0になる)ことが多い。結果として、学習モデル20’による推論の精度が低下する。以上の値(データ)の喪失は、学習モデル20’の演算ビット幅が、入力される画像データのビット幅以下である場合により顕著に発生する。 In dark image data, the pixel value in the image data tends to be small. Therefore, when dark image data is input to the learning model 20', digit loss occurs in the process of inference calculation in NN, so that the value is often lost (becomes 0) in the middle of the calculation. As a result, the accuracy of inference by the learning model 20'decreases. The loss of the above value (data) occurs more remarkably when the calculation bit width of the learning model 20'is less than or equal to the bit width of the input image data.
そこで、本実施形態では、前述したように、露出特定部250が特定した入力画像データの明るさLに基づいて重み係数決定部260が重み係数αを決定し、学習モデル20に含まれる重み値240に重み係数αを乗算する。重み係数αの決定においては、後述のように、学習モデル20のNNの演算ビット幅の最大値が考慮される。以上の重み係数αの調整によって、入力画像データに対する推論処理におけるデジタルデータ(演算値)の桁落ち(データ喪失)が抑制され、ひいては、被写体の認識精度が向上する。
Therefore, in the present embodiment, as described above, the weighting
例えば、学習モデル20に明るい画像データ501が入力された図5(a)では、重み係数αが推論に影響しない値(例えば、1)に設定され、図4(a)と同様の結果が出力される。また、学習モデル20に暗い画像データ502が入力された図5(b)では、学習モデル20が、主被写体が人である確率が83%であり、主被写体が木である確率が17%であると出力している。すなわち、図4に示す従来技術と比較して、図5に示す本実施形態の技術によれば、暗い画像データが学習モデル20に入力されたときの認識精度を顕著に改善できる。
For example, in FIG. 5A in which
図6を参照して、本発明の第1実施形態における重み係数αの決定について説明する。図6は、露出特定部250が明るさLを特定する処理および重み係数決定部260が重み係数αを決定する処理のフローチャートである。概略的には、入力された画像データの明るさLと、学習モデル20の演算ビット幅とに基づいて重み係数αが決定される。本フローは、例えば、推論対象としての画像データが入力された後、学習モデル20による画像認識に先立って実行される。
The determination of the weighting coefficient α in the first embodiment of the present invention will be described with reference to FIG. FIG. 6 is a flowchart of a process in which the
ステップS601において、露出特定部250が、学習モデル20に入力される画像データの明るさLを特定する。以上の画像データの明るさLは、入力画像データの解析によって取得されてもよいし、撮像時のセンサ(露出計、照度センサ等)からの情報に基づいて取得されてもよい。また、以上の両者の組合せによって明るさLが特定されてもよい。
In step S601, the
本例における明るさLは、例えば、露出値(EV値)である。以上の露出値は、ISO感度がISO100、絞りがF1.0、シャッター速度が1秒の状態を基準(EV0)とした相対値である。露出値が1段増加すると(例えば、EV1からEV2に増加すると)、2倍明るくなる。なお、露出値と照度は以下の式(1)の関係にある。例えば、露出値が0(EV0)である場合、照度は2.5ルクスである。
(照度(ルクス))=2.5×2(露出値) ……(1)
The brightness L in this example is, for example, an exposure value (EV value). The above exposure values are relative values based on the state where the ISO sensitivity is
(Illuminance (lux)) = 2.5 x 2 (exposure value) …… (1)
ステップS602において、露出特定部250に特定された明るさLに基づいて、重み係数決定部260が係数Cを計算する。より具体的には以下の通りである。
In step S602, the weighting
まず、重み係数決定部260は、入力された画像データの明るさLと、学習モデル20の学習段階において予め算出された基準値Rとの比である明るさ比A(=L/R)を算出する。基準値Rは、学習段階において学習モデル20に入力された複数の画像データにおける明るさLの統計的な代表値(平均値、中央値、最頻値等)である。明るさLは画像データごとに取得される値であるから、画像データが変化すると明るさ比Aも変化する。
First, the weighting
次いで、重み係数決定部260は、算出した明るさ比Aを用いて以下の式(2)に従って係数Cを算出する。
C=(1/sqrt(A)×(b/(1/sqrt(Aev)))−(b/(1/sqrt(Aev))−d))×c−e ……(2)
Next, the weighting
C = (1 / square (A) x (b / (1 / square (Aev)))-(b / (1 / square (Aev))-d)) x c-e ... (2)
以上の式(2)において、値Aevは、画像データを取得した撮像素子における撮像限界に相当する明るさ(限界明るさ)であって、画像データにおける明るさの最小単位となる値である。値Aevは、撮像素子の仕様に応じて定まる値であるから、同じ撮像装置によって取得された画像データに関して共通する所定値である。値bは、学習モデル20のNNにて使用される演算ビット幅の最大値(例えば、256=8ビット)である。補正係数c,d,eは、明るさ比Aに対する係数Cの変化の程度(グラフの傾き)等を調整するためのパラメータであって、情報処理装置100の製造者やユーザが推論結果に応じて調整可能な値である。
In the above equation (2), the value Av is the brightness (limit brightness) corresponding to the imaging limit of the image sensor that has acquired the image data, and is a value that is the minimum unit of the brightness in the image data. Since the value Aev is a value determined according to the specifications of the image pickup device, it is a predetermined value common to the image data acquired by the same image pickup device. The value b is the maximum value (for example, 256 = 8 bits) of the calculation bit width used in the NN of the learning model 20. The correction coefficients c, d, and e are parameters for adjusting the degree of change (slope of the graph) of the coefficient C with respect to the brightness ratio A, and the manufacturer or user of the
図7は、本発明の第1実施形態における明るさ比Aと係数C(重み係数α)との関係を示す説明図である。図7の例では、上記した値Aev(限界明るさ)が0.0078125(=1/27)であり、上記した値b(NNの演算ビット幅の最大値)が256(=8ビット)であると想定する。明るさ比Aが、限界輝度に相当する値Aevに等しい場合、以上の式(2)に従って演算すると、係数C(重み係数α)として、NNの演算ビット幅の最大値bに等しい値である256が得られる。明るさ比Aが変化すると、図7(a)の表および図7(b)のグラフに示すように係数C(重み係数α)が変化する。概略的には、明るさ比Aが小さいほど、係数C(重み係数α)が大きくなる。 FIG. 7 is an explanatory diagram showing the relationship between the brightness ratio A and the coefficient C (weighting coefficient α) in the first embodiment of the present invention. In the example of FIG. 7, a said value Aev (limit brightness) is 0.0078125 (= 1/27), the value b (the maximum value of the operation bit width of the NN) 256 (= 8 bits) Is assumed to be. When the brightness ratio A is equal to the value Aev corresponding to the limit luminance, when the calculation is performed according to the above equation (2), the coefficient C (weight coefficient α) is a value equal to the maximum value b of the calculation bit width of NN. 256 is obtained. When the brightness ratio A changes, the coefficient C (weighting coefficient α) changes as shown in the table of FIG. 7 (a) and the graph of FIG. 7 (b). Generally, the smaller the brightness ratio A, the larger the coefficient C (weighting coefficient α).
なお、以上に説明した式(2)は、撮像素子の検出限界(撮像限界)に相当する値Aev(限界明るさ)に基づいて、学習モデル20において使用可能な演算ビット幅がより広くNN演算に用いられるように係数Cを算出する式である。したがって、以上のように係数C(重み係数α)を算出できる任意の数式をステップS602にて使用し得る。例えば、上記した式(2)では、明るさ比Aが値Aevに等しいときに係数Cが最大値を取るが、補正係数c,d,eを調整して明るさ比Aが他の値を取るときに係数Cが最大値を取る式が採用されてもよい。また、図3を参照して前述したように、NNの層ごとまたはエッジごとに異なる補正係数c,d,eを適用してそれぞれ係数C(重み係数α,β,γ,…)が算出されてもよい。 In the equation (2) described above, the calculation bit width that can be used in the learning model 20 is wider based on the value Aev (limit brightness) corresponding to the detection limit (imaging limit) of the image sensor, and the NN calculation is performed. It is an expression which calculates a coefficient C as used in. Therefore, any mathematical formula capable of calculating the coefficient C (weighting coefficient α) as described above can be used in step S602. For example, in the above equation (2), the coefficient C takes the maximum value when the brightness ratio A is equal to the value Aev, but the correction coefficients c, d, and e are adjusted so that the brightness ratio A sets another value. An equation in which the coefficient C takes the maximum value at the time of taking may be adopted. Further, as described above with reference to FIG. 3, the coefficients C (weighting coefficients α, β, γ, ...) Are calculated by applying different correction coefficients c, d, and e for each layer or edge of the NN. You may.
ステップS603において、重み係数決定部260は、ステップS602にて算出された係数Cを、NNの重み係数αとして学習モデル20に設定する。
In step S603, the weighting
上記した本実施形態の構成によれば、推論段階において学習モデル20に入力される画像データの明るさに応じて決定される重み係数が学習モデル20の重みに乗算されるので、様々な明るさの画像データに対して高精度な推論を実行できる。 According to the configuration of the present embodiment described above, since the weighting coefficient determined according to the brightness of the image data input to the learning model 20 in the inference stage is multiplied by the weight of the learning model 20, various brightnesses are obtained. Highly accurate inference can be performed on the image data of.
特に、学習モデル20の演算ビット幅の最大値を踏まえて重み係数が決定されるので、暗い画像データ、すなわち、小さな画素値を有する画像データが学習モデル20に入力されても、演算時の桁落ちが抑制されるので推論の精度を維持できる。 In particular, since the weighting coefficient is determined based on the maximum value of the calculation bit width of the learning model 20, even if dark image data, that is, image data having a small pixel value is input to the learning model 20, the digit at the time of calculation Since the drop is suppressed, the accuracy of inference can be maintained.
<第2実施形態>
以下、本発明の第2実施形態について説明する。なお、以下に例示する各実施形態において、作用、機能が前提例または第1実施形態と同等である要素については、以上の説明で参照した符号を流用して各々の説明を適宜に省略する。
<Second Embodiment>
Hereinafter, the second embodiment of the present invention will be described. In each of the embodiments illustrated below, for elements whose actions and functions are equivalent to those of the premise example or the first embodiment, the reference numerals referred to in the above description will be used and the respective description will be omitted as appropriate.
第1実施形態では、画像データの各々について1つの明るさLが特定され、学習モデル20の重み係数の調整に用いられる。第2実施形態では、画像データの各々に含まれる複数の領域について、それぞれ明るさLが特定され、学習モデル80の重み係数の調整に用いられる。 In the first embodiment, one brightness L is specified for each of the image data and used for adjusting the weighting coefficient of the learning model 20. In the second embodiment, the brightness L is specified for each of the plurality of regions included in the image data, and is used for adjusting the weighting coefficient of the learning model 80.
以下に説明される本実施形態に係る学習モデル80、機能ブロック、および種々の処理は、情報処理装置100のCPU101が、ROM102またはHDD104に格納されたプログラムをRAM103に展開して実行することによって実現される。また、本実施形態に係る種々の処理は、例えば、ユーザが入力部105を操作してCPU101に指示することによって開始され、種々の処理の結果は表示部106に出力される。
The learning model 80, the functional blocks, and various processes according to the present embodiment described below are realized by the
図8を参照して、本発明の第2実施形態における推論処理(物体認識処理)を例示する説明図である。本実施形態の学習モデル80は、第1実施形態の学習モデル20と同様、入力される画像データに示される主被写体が何であるかを推論する推論値を出力する。図8の画像データ801は、主被写体である人の影によって生じた暗い部分(暗部)を含んでいる。画像データ801は、複数の領域に分割されて、それぞれ、学習モデル80の入力層の複数のノードおよび露出特定部850に入力される。
It is explanatory drawing which illustrates the inference processing (object recognition processing) in the 2nd Embodiment of this invention with reference to FIG. Similar to the learning model 20 of the first embodiment, the learning model 80 of the present embodiment outputs an inferred value for inferring what the main subject is shown in the input image data. The
露出特定部850は、学習モデル80に入力される画像データの明るさLを領域ごとに検出して、重み係数決定部860に出力する。重み係数決定部860は、露出特定部850が検出した画像データの各領域の明るさLに基づいて、各領域に対応する重み値に乗算すべき重み係数α,β,γ,…を決定する(すなわち、重み値を調整する)。
The
例えば、図3(c)に示すように、ノードu1が出力するデータに対する重み値uv11,uv12に乗算すべき重み係数αと、ノードu2が出力するデータに対する重み値uv21,uv22に乗算すべき重み係数βとが別個に設定される。すなわち、ノードu1に入力される画像データ801の領域の明るさL1に応じて重み係数αが決定され、ノードu2に入力される画像データ801の領域の明るさL2に応じて重み係数βが決定される。
For example, as shown in FIG. 3C, the weight coefficients α to be multiplied by the weight values uv11 and uv12 for the data output by the node u1 and the weights uv21 and uv22 to be multiplied by the weight values uv21 and uv22 for the data output by the node u2. The coefficient β is set separately. That is, the weighting coefficient α is determined according to the brightness L1 of the region of the
上記した本実施形態の構成によれば、第1実施形態と同様の技術的効果が奏される。加えて、画像データの領域ごとに明るさLを特定して重み係数α,β,γ,…を決定するので、明るい領域と暗い領域とを併有する画像データに対しても、高精度な推論を実行できる。 According to the configuration of the present embodiment described above, the same technical effect as that of the first embodiment is achieved. In addition, since the brightness L is specified for each image data area and the weighting coefficients α, β, γ, ... Are determined, highly accurate inference can be made even for image data having both a bright area and a dark area. Can be executed.
<変形例>
以上、本発明の好ましい実施の形態について説明したが、本発明は上述した実施の形態に限定されず、その要旨の範囲内で種々の変形および変更が可能である。
<Modification example>
Although the preferred embodiment of the present invention has been described above, the present invention is not limited to the above-described embodiment, and various modifications and modifications can be made within the scope of the gist thereof.
上記した実施形態では、学習モデル20,80が画像データの主被写体を認識しているが、学習モデル20,80が他の推論に用いられてもよい。例えば、学習モデル20,80が、画像データに対応するシーン(風景、ポートレート等)を推定してもよい。 In the above embodiment, the learning models 20 and 80 recognize the main subject of the image data, but the learning models 20 and 80 may be used for other inferences. For example, the learning models 20 and 80 may estimate the scene (landscape, portrait, etc.) corresponding to the image data.
上記した実施形態では、露出特定部250,850および重み係数決定部260,860が、ソフトウェア的な機能ブロックとして構成されているが、上述した処理を実行可能な電気的構成(回路等)によってハードウェア的に構成されてもよい。
In the above-described embodiment, the
推論の対象である画像データは、撮影済みの画像データであってもよいし、撮像装置の撮像素子が出力したリアルアイムな画像データであってもよい。 The image data to be inferred may be image data that has already been captured, or may be real-eye image data output by the image sensor of the image pickup device.
本発明は、上述の実施の形態の1以上の機能を実現するプログラムを、ネットワークや記憶媒体を介してシステムや装置に供給し、そのシステム又は装置のコンピュータの1つ以上のプロセッサがプログラムを読み出して実行する処理でも実現可能である。また、本発明は、1以上の機能を実現する回路(例えば、ASIC)によっても実現可能である。 The present invention supplies a program that realizes one or more functions of the above-described embodiment to a system or device via a network or storage medium, and one or more processors of the computer of the system or device reads the program. It can also be realized by the processing to be executed. The present invention can also be realized by a circuit (for example, ASIC) that realizes one or more functions.
以上のコンピュータは、1以上のプロセッサまたは回路を有してよい。分離した複数のコンピュータ、または分離した複数のプロセッサもしくは回路のネットワークが、コンピュータによって実行可能な命令を読み出して実行してもよい。 The above computers may have one or more processors or circuits. Multiple separate computers, or a network of separate processors or circuits, may read and execute instructions that can be executed by a computer.
上記した実施形態におけるCPU101に代えて、情報処理装置100は、任意のプロセッサまたは回路を採用し得る。例えば、以下の素子がプロセッサまたは回路として用いてよい。
Instead of the
−マイクロプロセッシングユニット(MPU)
−グラフィクスプロセッシングユニット(GPU)
−特定用途向け集積回路(ASIC)
−フィールドプログラマブルゲートウェイ(FPGA)
−デジタルシグナルプロセッサ(DSP)
−データフロープロセッサ(DFP)
−ニューラルプロセッシングユニット(NPU)
-Micro processing unit (MPU)
-Graphics processing unit (GPU)
-Application-specific integrated circuit (ASIC)
-Field Programmable Gateway (FPGA)
-Digital Signal Processor (DSP)
-Data Flow Processor (DFP)
-Neural processing unit (NPU)
20 学習モデル
80 学習モデル
100 情報処理装置
250 露出特定部(露出特定手段)
260 重み係数決定部(重み係数決定手段)
850 露出特定部(露出特定手段)
860 重み係数決定部(重み係数決定手段)
20 Learning model 80
260 Weight coefficient determination unit (weight coefficient determination means)
850 Exposure identification part (exposure identification means)
860 Weight coefficient determination unit (weight coefficient determination means)
Claims (10)
前記画像データの明るさを特定する露出特定手段と、
特定された前記明るさに基づいて前記重み値に乗算すべき重み係数を決定する重み係数決定手段と、を備えることを特徴とする情報処理装置。 A learning model, which is a neural network that executes inference processing by operations using weight values for image data,
An exposure specifying means for specifying the brightness of the image data and
An information processing apparatus comprising: a weighting coefficient determining means for determining a weighting coefficient to be multiplied by the weighting value based on the specified brightness.
前記重み係数決定手段は、前記明るさに基づいて少なくとも1つの前記層に対応する前記重み値を変更する、ことを特徴とする請求項1から請求項3のいずれか1項に記載の情報処理装置。 The learning model has a plurality of layers including a plurality of nodes, respectively.
The information processing according to any one of claims 1 to 3, wherein the weighting coefficient determining means changes the weight value corresponding to at least one of the layers based on the brightness. apparatus.
前記重み係数決定手段は、複数の前記領域ごとに特定された複数の前記明るさに基づいて複数の前記重み係数をそれぞれ決定する、ことを特徴とする請求項1から請求項6のいずれか1項に記載の情報処理装置。 The exposure specifying means identifies the brightness for each of a plurality of regions included in the image data.
Any one of claims 1 to 6, wherein the weighting coefficient determining means determines, respectively, a plurality of the weighting coefficients based on the plurality of brightnesses specified for each of the plurality of the regions. The information processing device described in the section.
前記画像データを取得する撮像素子を備える撮像手段と、を有することを特徴とする撮像装置。 The information processing apparatus according to any one of claims 1 to 7.
An image pickup apparatus comprising: an image pickup means including an image pickup element for acquiring the image data.
前記画像データの明るさを特定することと、
特定された前記明るさに基づいて前記重み値に乗算すべき重み係数を決定することと、を備えることを特徴とする制御方法。 A control method for an information processing device equipped with a learning model, which is a neural network that executes inference processing by calculation using weight values for image data.
Identifying the brightness of the image data and
A control method comprising: determining a weighting coefficient to be multiplied by the weight value based on the specified brightness.
A program that causes a computer to function as a learning model and means for the information processing apparatus according to any one of claims 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2019218083A JP2021089476A (en) | 2019-12-02 | 2019-12-02 | Information processing device, imaging device, control method, and program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2019218083A JP2021089476A (en) | 2019-12-02 | 2019-12-02 | Information processing device, imaging device, control method, and program |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2021089476A true JP2021089476A (en) | 2021-06-10 |
Family
ID=76220679
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2019218083A Pending JP2021089476A (en) | 2019-12-02 | 2019-12-02 | Information processing device, imaging device, control method, and program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2021089476A (en) |
-
2019
- 2019-12-02 JP JP2019218083A patent/JP2021089476A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111741211B (en) | Image display method and apparatus | |
US9330446B2 (en) | Method and apparatus for processing image | |
JP6548743B2 (en) | Color calibration apparatus and method | |
US9070044B2 (en) | Image adjustment | |
KR20130031574A (en) | Image processing method and image processing apparatus | |
US20220076385A1 (en) | Methods and systems for denoising media using contextual information of the media | |
US11508038B2 (en) | Image processing method, storage medium, image processing apparatus, learned model manufacturing method, and image processing system | |
CN111127476A (en) | Image processing method, device, equipment and storage medium | |
US10810464B2 (en) | Information processing apparatus, information processing method, and storage medium | |
CN114445282A (en) | Image restoration method and apparatus, and electronic device | |
CN109478316B (en) | Real-time adaptive shadow and highlight enhancement | |
JP7403995B2 (en) | Information processing device, control method and program | |
WO2019188573A1 (en) | Computing device, computing method, and program | |
JP5617841B2 (en) | Image processing apparatus, image processing method, and image processing program | |
JP6677222B2 (en) | Detection device, image processing device, detection method, and image processing method | |
JP2008283573A (en) | Image processor | |
JP2021089476A (en) | Information processing device, imaging device, control method, and program | |
JP6514504B2 (en) | IMAGE PROCESSING APPARATUS, CONTROL METHOD THEREOF, AND PROGRAM | |
JP2009258770A (en) | Image processing method, image processor, image processing program, and imaging device | |
Zhang et al. | Learning a single convolutional layer model for low light image enhancement | |
KR102617391B1 (en) | Method for controlling image signal processor and control device for performing the same | |
JP7458857B2 (en) | Image processing device, image processing method and program | |
Hou et al. | HDR-like image generation to mitigate adverse wound illumination using deep bi-directional retinex and exposure fusion | |
WO2024018906A1 (en) | Information processing device, information processing method, and program | |
CN117893455B (en) | Image brightness and contrast adjusting method |