JP6877374B2 - How to train a model that outputs a vector that represents the tag set that corresponds to the image - Google Patents
How to train a model that outputs a vector that represents the tag set that corresponds to the image Download PDFInfo
- Publication number
- JP6877374B2 JP6877374B2 JP2018025847A JP2018025847A JP6877374B2 JP 6877374 B2 JP6877374 B2 JP 6877374B2 JP 2018025847 A JP2018025847 A JP 2018025847A JP 2018025847 A JP2018025847 A JP 2018025847A JP 6877374 B2 JP6877374 B2 JP 6877374B2
- Authority
- JP
- Japan
- Prior art keywords
- image
- vector
- encoder
- model
- tag
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Description
本発明は、画像に対応するタグセットを表すベクトルを出力するモデルを訓練する方法に関する。 The present invention relates to a method of training a model that outputs a vector representing a tag set corresponding to an image.
画像の解析や検索のために、画像に対して画像を表すタグを付与する技術が知られている。例えば、特許文献1又は特許文献2は、画像に関連するタグを推定するシステムを開示している。
A technique for adding a tag representing an image to an image is known for image analysis and retrieval. For example,
特許文献1において、「最初に、訓練中に、特徴データをトレーニングするために畳み込みニューラルネットワーク(CNN)に入力されるデータのクラスタ不均衡を低減するためにクラスタリング技術が利用される。実施形態では、クラスタリング技術を利用して、(タグ付けされていない画像をタグ付けするための)タグ伝搬に利用できるデータポイント類似性を計算することもできる。テスト中に、多様性ベースの投票フレームワークがユーザのタグ付けバイアスを克服するために利用される。いくつかの実施形態では、バイグラム再重み付けは、予測タグセットに基づいてバイグラムの一部である可能性が高いキーワードの重みを小さくすることができる。」(要約)と開示されている。
In
特許文献2において、「システム、方法、および非一時的なコンピュータ可読媒体は、訓練段階において、第1のコンテンツアイテム変換に基づいて第1のコンテンツアイテムの第1のコンテンツアイテム表現を生成することができる。第1のコンテンツアイテムは、1または複数の画像及びビデオを含むことができる。第1のユーザメタデータの第1のユーザメタデータ表現は、第1のユーザメタデータ変換に基づいて作成することができる。第1のコンテンツアイテム表現及び第1のユーザメタデータ表現を組み合わせて、第1の結合表現を生成することができる。第1の組み合わせ表現及び第1のタグの第1のタグ表現は、互いに第1の閾値距離内の埋め込み空間に埋め込むことができる。」(要約)と開示されている。
In
機械学習の技術により、入力された画像に対して、関連する1又は複数タグ(タグセット)を出力するモデルを形成することができる。機械学習によりモデルを適切に訓練するためには、大量の訓練用データが必要とされ、一般に、画像データに関連付けられるタグの出現頻度分布は、ロングテイル属性を有する。つまり、多くのタグの出現頻度(関連づけられる画像の数)は低く、一部のタグのみその出現頻度が高い。 By the technique of machine learning, it is possible to form a model that outputs one or a plurality of related tags (tag sets) for an input image. In order to properly train a model by machine learning, a large amount of training data is required, and in general, the frequency distribution of tags associated with image data has a long tail attribute. That is, the frequency of appearance of many tags (the number of images associated with them) is low, and the frequency of appearance of only some tags is high.
出現頻度が低いタグセットの多くの訓練用データを収集することは困難である。一方、画像に関連付けるべきタグセットを推定するシステムに対して、出現頻度が低いタグセットであっても高精度に推定することができる能力が要求される。 It is difficult to collect many training data for infrequently occurring tag sets. On the other hand, a system that estimates a tag set to be associated with an image is required to have the ability to estimate with high accuracy even a tag set that appears infrequently.
本開示の一態様は、入力画像から前記入力画像と関連付けるべきタグセットを表すベクトルを出力する第1モデルを訓練する、ことを含む、計算機に実行される方法であって、前記計算機は、記憶装置と、前記記憶装置に格納されているプログラムに従って動作するプロセッサと、を含み、前記第1モデルは、入力画像から前記入力画像に関連付けるべきタグセットを表すベクトルを出力するエンコーダと、前記エンコーダからの出力を入力されるデコーダとを含み、前記方法は、前記プロセッサが、前記エンコーダに第1訓練画像を入力し、前記デコーダからの第1出力画像を取得し、前記エンコーダからの第1出力ベクトルを取得し、前記第1訓練画像と前記第1出力画像との間の誤差と、前記第1訓練画像に予め関連付けられている第1タグセットに基づき予め設定された、前記エンコーダからの前記第1出力ベクトルに対する制約と、に基づいて、前記第1モデルのパラメータを更新する。 One aspect of the disclosure is a method performed on a computer, comprising training a first model that outputs a vector representing a set of tags to be associated with the input image from the input image, wherein the computer stores. The first model comprises from the input image an encoder that outputs a vector representing a tag set to be associated with the input image, and from the encoder, including a device and a processor that operates according to a program stored in the storage device. In the method, the processor inputs a first training image to the encoder, acquires a first output image from the decoder, and includes a first output vector from the encoder. The first from the encoder, which is preset based on the error between the first training image and the first output image and the first tag set preliminarily associated with the first training image. The parameters of the first model are updated based on the constraints on one output vector.
本開示の一態様によれば、画像と関連付けるべきタグセットを高精度に推定できるモデルを得ることができる。 According to one aspect of the present disclosure, it is possible to obtain a model capable of estimating the tag set to be associated with the image with high accuracy.
以下、添付図面を参照して本発明の実施形態を説明する。本実施形態は本発明を実現するための一例に過ぎず、本発明の技術的範囲を限定するものではないことに注意すべきである。各図において共通の構成については同一の参照符号が付されている。 Hereinafter, embodiments of the present invention will be described with reference to the accompanying drawings. It should be noted that the present embodiment is merely an example for realizing the present invention and does not limit the technical scope of the present invention. The same reference numerals are given to common configurations in each figure.
図1は、タグ推定装置100を含む計算機システムの構成例を示す。タグ推定装置 100は、プロセッサ110、メモリ120、補助記憶装置130、入出力インタフェース140、及びネットワーク(NW)インタフェース145を含む。上記構成要素は、バスによって互いに接続されている。メモリ120、補助記憶装置130又はこれらの組み合わせは記憶装置の例である。
FIG. 1 shows a configuration example of a computer system including a
メモリ120は、例えば半導体メモリから構成され、主にプログラムやデータを一時的に保持するために利用される。メモリ120が格納しているプログラムは、マッチングモデル121、意味表現モデル122、訓練プログラム123、運用プログラム124、データクローラ125、及び、画像−タグ関連データ生成プログラム126を含む。
The
メモリ120は、さらに、画像−タグ関連データ生成プログラム126に作成されるタグ分布テーブル547を格納している。タグ分布テーブル547は、補助記憶装置130にも格納されてもよい。
The
プロセッサ110は、メモリ120に格納されているプログラムに従って、様々な処理を実行する。プロセッサ110がプログラムに従って動作することで、様々な機能部が実現される。例えば、プロセッサ110は、上記プログラムそれぞれに従って、マッチングモデル部、意味表現モデル部、学習部、運用部、データクローラ部、及び、訓練データ生成部として動作する。
The
補助記憶装置130は、画像−テキスト関連データベース(DB)132、及び、画像−タグ関連データベース134を格納している。補助記憶装置130は、例えばハードディスクドライブやソリッドステートドライブなどの大容量の記憶装置から構成され、プログラムやデータを長期間保持するために利用される。
The
補助記憶装置130に格納されたプログラムが起動時又は必要時にメモリ120にロードされ、このプログラムをプロセッサ110が実行することにより、タグ推定装置 100の各種処理が実行される。したがって、以下においてプログラムにより実行される処理は、プロセッサ110又はタグ推定装置100による処理である。
The program stored in the
ネットワークインタフェース145は、ネットワークとの接続のためのインタフェースである。図1の例において、タグ推定装置100は、ネットワークインタフェース145を介して、インターネットに接続する。
The
クライアント装置144は、ユーザが使用する装置であって、ネットワーク、図1の例においてインターネットを介して、タグ推定装置100にアクセスする。クライアント装置144は、例えば、一般的な計算機構成を有し、入力装置及び表示装置を含む。入力装置は、ユーザがタグ推定装置100に指示や情報などを入力するためのハードウェアデバイスである。表示装置は、入出力用の各種画像を表示するハードウェアデバイスである。入力デバイス及び表示デバイスは、ネットワークを介することなく、タグ推定装置100に接続されていてもよい。
The
マッチングモデル121及び意味表現モデル122は、機械学習により訓練される(更新される)モデルである。タグ推定装置100は、マッチングモデル121のための、訓練モード(学習モード)とオペレーションモードを有する。また、意味表現モデル122のための、訓練モードとオペレーションモードを有する。
The
マッチングモデル121及び意味表現モデル122は、それぞれ、訓練モードにおいて、訓練プログラム123により訓練される。マッチングモデル121及び意味表現モデル122の訓練のため、画像−タグ関連データベース134が使用される。
The
マッチングモデル121は、オペレーションモードにおいて、画像−タグ関連データ生成プログラム126によって使用される。マッチングモデル121は、オペレーションモードにおいて、画像−テキスト関連データベース132に格納されているデータから画像−タグ関連データベース134に格納するデータを生成するために使用される。
The
意味表現モデル122は、オペレーションモードにおいて、運用プログラム124によって使用される。意味表現モデル122は、オペレーションモードにおいて、ユーザに入力された画像に対応する1又は複数タグからなるタグセットを推定するために使用される。タグセットの推定のため、画像−タグ関連データベース134のデータが使用される。
The
また、意味表現モデル122は、ユーザに入力されたタグセットに対応する1又は複数画像を推定するために使用される。画像推定のため、画像−テキスト関連データベース132のデータが使用される。画像推定は、意味表現モデル122及び画像−テキスト関連データベース132を使用することなく、画像−タグ関連データベース134のデータを使用してもよい。
In addition, the
データクローラ125は、インターネット上のWebページを定期的に巡回し、互いに関連付けられている画像とテキストからなる組を収集する。データクローラ125は、画像−テキスト関連データベース132に、収集した画像とテキストの組を格納する。
The data crawler 125 periodically crawls Web pages on the Internet and collects pairs of images and text associated with each other. The data crawler 125 stores the collected image and text pairs in the image-text
図2は、画像−テキスト関連データベース132の構成例を示す。画像−テキスト関連データベース132は、画像と、対応するテキストと関連付ける。画像カラム321及びテキストカラム322を有する。画像カラム321は、収集された画像を格納している。テキストカラム322は、画像それぞれに関連付けられているテキストを格納している。各テキストは複数の単語で構成されている。
FIG. 2 shows a configuration example of the image-text
上述のように、画像−テキスト関連データベース132は、画像−タグ関連データベース133の生成、及び、ユーザ入力タグセットに対応する画像の推定において、使用される。
As mentioned above, the image-text
図3は、画像−タグ関連データベース133の構成例を示す。画像−タグ関連データベース133は、画像と、対応するタグセットとを関連付ける。画像−タグ関連データベース133は、画像カラム331及びタグカラム332を有する。画像カラム321は、画像を格納している。タグカラム332は、画像それぞれに関連付けられているタグセットを格納している。各タグセットは1又は複数のタグ(単語)で構成されている。
FIG. 3 shows a configuration example of the image-tag relational database 133. The image-tag relational database 133 associates an image with a corresponding tag set. The image-tag relational database 133 has an image column 331 and a tag column 332. The
上述のように、画像−タグ関連データベース133は、マッチングモデル121及び意味表現モデル122のために使用され、また、ユーザ入力された画像を表す適切なタグセットを推定するために使用される。
As mentioned above, the image-tag relational database 133 is used for the
以下において、ユーザに入力されたタグセット対応する1又は複数の画像の推定、及び、ユーザに入力された画像に対応するタグセットの推定、を説明する。運用プログラム124は、意味表現モデル122を使用して、入力タグセットに対応する1又は複数の画像を推定し、また、入力画像に対応するタグセットを推定する。
In the following, the estimation of one or a plurality of images corresponding to the tag set input to the user and the estimation of the tag set corresponding to the image input to the user will be described. The
図4Aは、ユーザが、入力画像に対応するタグセットを取得するための、GUI画像の例を示す。運用プログラム124は、クライアント装置144に、図4Aに示す画像データを送信する。ユーザは、クライアント装置144において、フィールド401に対象画像のパスを入力し、UPLOADボタン402を押す。
FIG. 4A shows an example of a GUI image for the user to acquire a tag set corresponding to the input image. The
クライアント装置144は、フィールド401が示すパスから入力画像(データ)を取得し、タグ推定装置100に送信する。運用プログラム124は、クライアント装置144から対象画像を受信する。
The
クライアント装置144は、ユーザによる入力装置を介した「推定」ボタン403の選択応じて、送信した画像を表すタグセットの要求をタグ推定装置100に送信する。運用プログラム124は、受信した要求に応じて、対象画像に関連するタグセットを推定し、クライアント装置144に送信する。クライアント装置144は、受信したタグセットを、「推奨タグ」セクション404に表示する。
The
図4Bは、ユーザが、入力タグセットに対応する画像を取得するための、GUI画像の例を示す。運用プログラム124は、クライアント装置144に、図4Bに示す画像データを送信する。ユーザは、クライアント装置144において、フィールド451に対象タグセットを入力する。クライアント装置144は、ユーザによる入力装置を介した「検索」ボタン452の選択応じて、対象タグセットと共に、対象タグセットに関連する画像の検索の要求をタグ推定装置100に送信する。
FIG. 4B shows an example of a GUI image for the user to acquire an image corresponding to the input tag set. The
運用プログラム124は、受信した要求に応じて、対象タグセットに関連すると推定される1又は複数の画像を選択し、クライアント装置144に送信する。クライアント装置144は、受信した1又は複数の画像を、「関連画像」セクション454に表示する。
The
図5は、運用プログラム124による、入力画像に対する推奨タグセットの決定の処理のフローチャートを示す。運用プログラム124は、ユーザに入力された画像を取得する(S101)。運用プログラム124は、取得した画像から、意味表現モデル122によって、意味表現ベクトルを生成する(S102)。意味表現モデル122は、入力された画像から、当該画像の意味表現ベクトルを生成する。意味表現モデル122の構成及び動作の詳細は後述する。
FIG. 5 shows a flowchart of the process of determining the recommended tag set for the input image by the
後述するように、意味表現ベクトルは、入力画像と関連づけるべきタグセットを表すベクトル、つまり、画像を表すタグセットを表すベクトルと見做すことができる。後述する例において、意味表現ベクトルは、word embedding技術を利用して生成されるベクトルに対応する。 As will be described later, the semantic expression vector can be regarded as a vector representing a tag set to be associated with the input image, that is, a vector representing a tag set representing an image. In the examples described below, the semantic representation vector corresponds to the vector generated using the word embedding technique.
運用プログラム124は、画像−タグ関連データベース134から、タグを順次選択し、それらのベクトル(タグベクトル)を生成する(S103)。本例において、運用プログラム124は、word embedding技術により、各タグをタグベクトルに変換する。運用プログラム124は、事前に訓練されているword embeddingのモデルを含む。他の実装において、word embedding技術と異なる技術により、タグを含む語をベクトルに変換してもよい。
The
運用プログラム124は、生成したタグベクトルそれぞれと、意味表現ベクトルとを比較して、意味表現ベクトルとの類似度を計算する(S104)。類似度の計算は、例えば、ドット積又はコサイン類似度を使用することができる。
The
運用プログラム124は、類似度に基づいて、対象画像に対応する推奨タグセットに含めるタグを決定する(S105)。運用プログラム124は、例えば、類似度が閾値より高いタグにより、推奨タグセットを構成する。推奨タグセットを構成するタグの最大数が、予め設定されていてもよい。類似度が閾値を超えるタグの数が規定数を超える場合、運用プログラム124は、類似度の順において、最も類似度が高いタグから規定数のタグを選択してもよい。運用プログラム124は、類似度閾値を参照することなく、類似度の順において、最も類似度が高いタグから規定数のタグを選択してもよい。
The
上述のように、意味表現モデル122を使用して高精度に入力画像に対応するタグセットを推定することができる。タグそれぞれのベクトルと意味表現ベクトルと比較することで、画像に関連付けるべきタグをより正確に推定することができる。
As described above, the
運用プログラム124は、複数タグからなるタグセットのベクトル、例えば、画像−タグ関連データベース134の各レコードのタグセットと、意味表現ベクトルとを比較してもよい。単一のタグは、単一タグからなるタグセットでもある。画像−タグ関連データベース134に代えて、タグのみを格納するデータベースが用意され、運用プログラム124は、そのデータベース内のタグのベクトルと意味表現ベクトルとを比較してもよい。
The
図6は、運用プログラム124による、入力タグセットに関連する画像をする処理のフローチャートを示す。運用プログラム124は、ユーザに入力されたタグセットを取得する(S151)。
FIG. 6 shows a flowchart of a process of creating an image related to an input tag set by the
運用プログラム124は、取得したタグセットから、word embeddingモデルを使用して、ベクトル(タグセットベクトル)を生成する(S152)。運用プログラム124は、タグセットを構成するタグそれぞれのタグベクトルをword embeddingモデルにより生成し、それらを組み合わせることで、当該タグセットのタグセットベクトルを生成する。
The
例えば、運用プログラム124は、タグベクトルの単純平均値をタグセットベクトルと決定してもよく、タグベクトルの重みづけ平均をタグセットベクトルと決定してもよい。タグの重みは、例えば、画像−タグ関連データベース134におけるタグの出現頻度に応じて決定される。画像−タグ関連データベース134において関連付けられている画像の数が多いタグほど、大きい重みが与えられる。
For example, the
次に、運用プログラム124は、画像−テキスト関連データベース132から画像を順次読み出し、意味表現モデル122によって、それらの意味表現ベクトルを生成する(S153)。運用プログラム124は、生成した意味表現ベクトルそれぞれと、ステップS152で生成したタグセットベクトルとの間の類似度を計算する(S154)。類似度の計算は、例えば、ドット積又はコサイン類似度を使用することができる。
Next, the
運用プログラム124は、類似度に基づいて、対象タグセットに関連すると推定される画像を決定する(S155)。運用プログラム124は、例えば、類似度が閾値より高い画像を、タグセットに関連する画像として提示する画像と決定する。提示する画像の最大数が、予め設定されていてもよい。類似度が閾値を超える画像の数が規定数を超える場合、運用プログラム124は、類似度の順において、最も類似度が高い画像から規定数の画像を選択してもよい。運用プログラム124は、類似度閾値を参照することなく、類似度の順において、最も類似度が高い画像から規定数の画像を選択してもよい。
The
上述のように、意味表現モデル122を使用して、入力されたタグセットに関連する画像を高精度に推定することができる。ステップS153において、運用プログラム124は、画像−テキスト関連データベース132に代えて、画像−タグ関連データベース134を参照してもよい。運用プログラム124は、画像−タグ関連データベース134におけるレコードそれぞれのタグセットのタグセットベクトル生成し、ステップS152で生成したタグセットベクトルとの間の類似度を計算する。
As described above, the
次に、画像−タグ関連データ生成プログラム126により、画像−テキスト関連データベース132のデータから、画像−タグ関連データベース134に格納するデータを生成する処理を説明する。図7は、画像−タグ関連データ生成プログラム126による処理のフローチャートを示す。画像−タグ関連データ生成プログラム126は、図7に示す処理を定期的に、例えば、1週間に1回実行する。
Next, a process of generating data to be stored in the image-tag-related
画像−タグ関連データ生成プログラム126は、画像−タグ関連データベース134におけるタグの出現頻度分布を分析し、タグ分布テーブル547を生成する(S201)。タグの出現頻度は、画像−タグ関連データベース134において、当該タグに関連付けられている画像の数に等しい。
The image-tag-related
図8は、タグ分布テーブル547の構成例を示す。タグ分布テーブル547は、タグカラム471と画像の数カラム472とを含む。タグカラム471は、画像−タグ関連データベース134に格納されているタグを示す。画像の数カラム472は、タグそれぞれが画像−タグ関連データベース134において関連付けられている画像の数を示す。
FIG. 8 shows a configuration example of the tag distribution table 547. The tag distribution table 547 includes a
図7に戻って、画像−タグ関連データ生成プログラム126は、タグ分布テーブル547を参照し、出現頻度が低いタグを選択する(S202)。例えば、画像−タグ関連データ生成プログラム126は、出現頻度の順において、出現頻度が最も低いタグから規定数のタグを選択する。画像−タグ関連データ生成プログラム126は、出現頻度が規定値より小さい全てのタグを選択してもよい。
Returning to FIG. 7, the image-tag-related
画像−タグ関連データ生成プログラム126は、選択したいずれかのタグをテキスト内に含む、画像とテキストとの組(レコード)を、画像−テキスト関連データベース132から選択する(S203)。
The image-tag relational
画像−タグ関連データ生成プログラム126は、画像とテキストとの選択した各組において、画像と関連づけられているテキスト内の各単語との間の類似度を、マッチングモデル121を使用して、計算する(S204)。
The image-tag association
具体的には、画像−タグ関連データ生成プログラム126は、画像の特徴ベクトルと各単語のベクトルを生成する。画像の特徴ベクトルは、例えば、予め訓練されている深層学習モデル(深層ニューラルネットワーク)によって、生成することができる。単語ベクトルは、上述のように、予め訓練されているword embeddingモデルにより生成される。
Specifically, the image-tag-related
画像−タグ関連データ生成プログラム126は、生成した画像特徴ベクトルと一つの単語ベクトルをマッチングモデル121に入力する。マッチングモデル121は、入力された画像特徴ベクトルと単語ベクトルとの間の類似度を出力する。マッチングモデル121の処理の詳細は後述する。
The image-tag-related
画像−タグ関連データ生成プログラム126は、画像とテキストの各組において、画像との類似度に基づいて、テキストの単語のうちタグとして登録する単語を選択する(S205)。画像−タグ関連データ生成プログラム126は、例えば、類似度が閾値より高い単語を、画像のタグとして選択する。このように、単語は、画像との類似度によりランク付けされる。
The image-tag-related
選択できるタグの最大数は予め設定されていてもよい。画像−タグ関連データ生成プログラム126は、類似度が閾値より高い単語から、類似度の順で、最も類似度が高い単語から1又は複数単語を、規定最大数を限度に選択する。選択できるタグの数は予め設定されていてもよい。画像−タグ関連データ生成プログラム126は、類似度の順において、類似度が最も高い単語から規定数の単語を選択する。
The maximum number of tags that can be selected may be preset. The image-tag-related
タグとして選択した1又は複数の単語が、画像を表す(画像に関連付けられる)タグセットを構成する。画像−タグ関連データ生成プログラム126は、画像と選択したタグセットとの組を、画像−タグ関連データベース134に追加する(S206)。
One or more words selected as tags constitute a set of tags that represent the image (associate with the image). The image-tag-related
上述のように、画像に実際に関連付けられているテキストからタグを選択することで、画像に関連するタグをより高精度に決定することができる。後述するように、画像−タグ関連データベース134は、意味表現モデル122の訓練に使用され、意味表現モデル122を適切に訓練することができる。また、訓練により改善されるマッチングモデル121を使用することで、画像−タグ関連データベース134に追加するより適切なデータを生成できる。
As described above, by selecting a tag from the text actually associated with the image, the tag associated with the image can be determined with higher accuracy. As will be described later, the image-tag
タグ分布テーブル547に基づき画像−タグ関連データベース134に追加する画像を決定することで、画像−タグ関連データベース134内のタグの出現頻度分布がより均一に近づけることができる。関連付けられているテキストに低頻度のタグを含む画像を選択することで、低頻度タグが関連づけられる画像を選択する可能性を高めることができる。
By determining the image to be added to the image-tag
これにより、関連タグセットが一般にレアな画像(レア画像)のデータを、画像−タグ関連データベース134に含め、レア画像についても正確にタグセットの推定をできるように意味表現モデル122を訓練できる。レア画像は、関連付けられるタグセットが出現頻度の低いタグを含む、又は、そのタグセットを構成するタグの組み合わせの出現頻度が低い、画像である。
Thereby, the data of the image (rare image) whose related tag set is generally rare can be included in the image-tag
図9は、訓練プログラム123による、マッチングモデル121の訓練(学習)の方法を示すフローチャートである。図10は、訓練におけるマッチングモデル121の処理のフローチャートである。訓練プログラム123は、図9を参照して説明する処理を、画像−タグ関連データベース134内の異なる画像について繰り返す。
FIG. 9 is a flowchart showing a training (learning) method of the
図9を参照して、訓練プログラム123は、画像−タグ関連データベース134から、画像を選択し、その画像の特徴ベクトルを生成する(S221)。上述のように、画像の特徴ベクトルは、例えば、予め訓練されている深層学習モデル(深層ニューラルネットワーク)によって、生成することができる。
With reference to FIG. 9, the
次に、訓練プログラム123は、選択した画像に関連づけられているタグセットを画像−タグ関連データベース134から取得し、当該タグセットのベクトル(関連タグセットベクトル)を生成する(S222)。関連タグセットベクトルの生成は、図6を参照して説明したタグセットベクトルの生成(S152)と同様である。
Next, the
次に、訓練プログラム123は、画像−タグ関連データベース134から、選択した画像に関連付けられていない複数のタグをサンプリングする(S223)。訓練プログラム123は、さらに、サンプリングしたタグそれぞれのベクトル(無関連タグベクトル)を生成する(S224)。無関連タグベクトルは、例えば、上述のように、word embeddingモデルを使用して生成される。
Next, the
各タグのベクトルに代えて又は加えて、複数のタグからなるタグセットのベクトルを生成してもよい。例えば、画像−タグ関連データベース134の各レコードのタグセットのであって、選択した画像と関連付けられていない1以上のタグを含む、又は、選択した画像と関連付けられていないタグからなる、タグセットのベクトルを生成してもよい。無関連タグのベクトルは、一つのタグからなるタグセットのベクトルでもある。
Instead of or in addition to the vector of each tag, a vector of a tag set consisting of a plurality of tags may be generated. For example, a tag set of tags for each record in the image-tag
訓練プログラム123は、マッチングモデル121に、上記生成した画像特徴ベクトル、関連タグセットベクトル、及び無関連タグベクトルを入力する(S225)。具体的には、訓練プログラム123は、画像特徴ベクトル及び関連タグセットベクトルのペア、並びに、画像特徴ベクトル及び無関連タグベクトルそれぞれのペアを、マッチングモデル121に順次入力する。
The
マッチングモデル121は、入力された二つのベクトルの間の類似度を出力する。したがって、訓練プログラム123は、画像特徴ベクトルと関連タグセットベクトルの間の類似度、及び、画像特徴ベクトルと無関連タグベクトルそれぞれとの間の類似度、を取得する(S226)。
The
マッチングモデル121は、取得した類似度に基づいて、マッチングモデル121を更新する(S227)。マッチングモデル121は、マッチングモデル121の出力の損失が小さくなるように、マッチングモデル121を更新(訓練)する。例えば、ヒンジ損失関数が使用される。
The
例えば、マッチングモデル121は、max(0、m+sim(x、y´)−sim(x、y))を最小化するように、マッチングモデル121を訓練する。ここで、simは、類似度を示し、mは、予め設定されているマージンである。xは、画像特徴ベクトル、yは関連タグセットベクトル、y´は、無関連タグベクトルである。
For example, the
図10は、訓練におけるマッチングモデル121の処理のフローチャートである。マッチングモデル121は、入力データとして、画像特徴ベクトルを取得する(S251)。マッチングモデル121は、入力データとして、無関連タグベクトル又は関連タグセットベクトルを取得する(S252)。
FIG. 10 is a flowchart of processing of the
マッチングモデル121は、入力された画像特徴ベクトルを共通空間に写像する(S253)。マッチングモデル121は、さらに、入力された無関連タグベクトル又は関連タグセットベクトルを、その共通空間に写像する(S254)。画像特徴ベクトルとタグ又はタグセットベクトルの次元は異なりえる。共通空間への写像において、これらが一致される。入力されたベクトルの共通空間への写像は、深層学習モデル(深層ニューラルネットワーク)により実行され得る。深層学習モデルのパラメータは、訓練プログラム123による訓練により更新される。
The
マッチングモデル121は、共通空間内において、画像特徴ベクトルと無関連タグベクトル又は関連タグセットベクトルとの間の類似度を計算する(S255)。類似度は、例えば、ドット積又はコサイン類似度で定義される。なお、正準相関分析(CCA:Canonical Correlation Analysis)を、マッチングモデル121に適用することができる。
The
図11は、意味表現モデル122に構成例を模式的に示す。意味表現モデル122は、オートエンコーダの構成を有する。意味表現モデル122は、深層学習モデル(深層ニューラルネットワーク)で構成できる。意味表現モデル122は、エンコーダ221及びデコーダ222を含む。
FIG. 11 schematically shows a configuration example in the
エンコーダ221とデコーダ222とは、例えば、それらの出力及び入力(意味表現ベクトル225)を中心として、対称の構造を有する。これにより、意味表現モデル122を効率的に訓練することができる。エンコーダ221とデコーダ222とは、例えば、複数層のCNN(Convolutional Neural Network)及び1又は複数層の全結合層を含む。
The
エンコーダ221は、入力された画像227を、意味表現ベクトル225にエンコードして、出力する。デコーダ222は、入力された意味表現ベクトル225を再構築画像228にデコードして、出力する。図5及び6を参照して説明したように、エンコーダ221から出力された意味表現ベクトル225は、運用プログラム124に利用される。後述するように、再構築画像228と入力画像227との差異が小さくなるように、意味表現モデル122は訓練される。
The
図12A及び12Bを参照して、意味表現モデル122の訓練を説明する。図12Aは、意味表現モデル122の訓練における入力データ及び出力データを示す。画像−タグ関連データベース134から選択された画像227がエンコーダ221に入力される。デコーダ222は、エンコーダ221から出力された意味表現ベクトル225を入力として受け付けて、再構築画像228を出力する。
The training of the
意味表現モデル122の訓練は、エンコーダ221の出力である、意味表現ベクトル225に対して、制約を与える。制約の例は後述する。意味表現ベクトル225に対して制約を与えるために、画像−タグ関連データベース134において入力画像227に関連付けられているタグセットが参照される。
The training of the
エンコーダ221から出力された意味表現ベクトル225と、入力画像227に関連付けられている関連タグセットベクトルとの間の誤差が、意味表現モデル122の訓練において使用される。さらに、再構築画像228と入力画像227との間の誤差が、意味表現モデル122の訓練において使用される。
The error between the
意味表現ベクトル225の訓練において、自己復元性(再構築画像228と入力画像227との間の誤差)を考慮することで、入力画像227を再現するのに十分な情報量を確保しようとする方向に力が働く。これにより、意味表現モデル122の訓練における過度の縮退(汎化)が抑制され、出現頻度が小さいレアなタグ又はタグセットであっても、画像の特徴として重要なタグ又はタグセットが、ノイズとして切り捨てられることを防ぐことができる。
In the training of the
図12Bは、訓練プログラム123による、意味表現モデル122の訓練のフローチャートである。訓練プログラム123は、図12を参照して説明する処理を、画像−タグ関連データベース134内の異なる画像について繰り返す。
FIG. 12B is a flowchart of training of the
訓練プログラム123は、画像−タグ関連データベース134から、画像を選択する(S301)。訓練プログラム123は、画像−タグ関連データベース134から、選択した画像に関連づけられているタグセットを取得し、そのベクトル(関連タグセットベクトル)を生成する(S302)。関連タグセットベクトルの生成は、図6を参照して説明したタグセットベクトルの生成(S152)と同様である。
The
訓練プログラム123は、選択した画像(入力画像227)を意味表現モデル122のエンコーダ221に入力する(S303)。訓練プログラム123は、意味表現モデル122から、出力画像(再構築画像)228及び意味表現ベクトル225を取得する(S304)。
The
訓練プログラム123は、入力画像と出力画像の誤差、及び、意味表現ベクトルと関連タグベクトルとの誤差に基づいて、意味表現モデル122を更新する。訓練プログラム123は、例えば、||x−x´||+¥lambda||s−w||が小さくなるように、意味表現モデル122のパラメータを更新する。意味表現ベクトル255に対する制約は、意味表現ベクトルと関連タグベクトルとの誤差を小さくすることである。
The
x及びx´は、それぞれ、入力画像及び出力画像(再構築画像)である。¥lambdaはバランシングパラメータであり、sは意味表現ベクトル、wは関連タグセットベクトルである。エンコーダ221をf、デコーダをf´と表わす。s=f(x)、x´=f´(f(x))である。
x and x'are an input image and an output image (reconstructed image), respectively. \ Lambda is a balancing parameter, s is a semantic expression vector, and w is a related tag set vector. The
意味表現モデル122の訓練における、意味表現ベクトル225に対する制約の他の例を説明する。訓練プログラム123は、画像−タグ関連データベース134から、選択画像と関連付けられているタグセット、及び、選択画像と関連付けられていないタグを含む又は関連付けられていないタグからなるタグセットを選択し、そのタグセットを表すベクトル(関連タグセットベクトル)を生成する。
Another example of the constraint on the
入力画像の意味表現ベクトルをz、入力画像の関連タグセットベクトルをy、入力画像に関連しない無関連タグセットベクトルをy´と表わす。関連タグセットベクトルyと無関連タグセットベクトルをy´との類似度は、関連タグセットベクトルyと関連タグセットベクトルy(同一ベクトル)との類似度より小さい。 The semantic expression vector of the input image is represented by z, the related tag set vector of the input image is represented by y, and the unrelated tag set vector not related to the input image is represented by y'. The similarity between the related tag set vector y and the unrelated tag set vector y'is smaller than the similarity between the related tag set vector y and the related tag set vector y (same vector).
意味表現モデル122の訓練における意味表現ベクトル225に対する制約の例は、L2(y、z)<L2(y´、z)である。L2は、ベクトル空間におけるユークリッド距離である。なお、複数の無関連タグセットベクトルを形成して、複数の不等号式を制約に含めてもよい。
An example of the constraint on the
意味表現モデル122の訓練における、意味表現ベクトル225に対する制約の他の例を説明する。訓練プログラム123は、画像−タグ関連データベース134から、入力画像のタグセットとの類似度が異なるタグセットの画像を選択する。例えば、訓練プログラム123は、入力画像とタグセットが近似する画像(近似画像)として、例えば、一つのタグ以外のタグが入力画像に共通である画像を選択する。
Another example of the constraint on the
訓練プログラム123は、さらに、画像−タグ関連データベース134から、入力画像と、タグが完全に異なる画像(非類似画像)を選択する。入力画像に関連付けられているいずれのタグも、非類似画像に関連付けられていない。
The
入力画像の意味表現ベクトルをz1、近似画像の意味表現ベクトルをz2、非類似画像の意味表現ベクトルをz3とする。意味表現モデル122の訓練における意味表現ベクトル225に対する制約の例は、L2(z1、z2)<L2(z1、z3)である。なお、複数の近似画像及び/又は複数の非類似画像を選択して、複数の不等号式を制約に含めてもよい。
Let z1 be the semantic expression vector of the input image, z2 be the semantic expression vector of the approximate image, and z3 be the semantic expression vector of the dissimilar image. An example of the constraint on the
上述のような意味表現ベクトル225に対する制約により、意味表現モデル122が入力画像に関連すべきタグセットを表す意味表現ベクトルを生成するように適切に訓練することができる。
The constraints on the
なお、本発明は上記した実施例に限定されるものではなく、様々な変形例が含まれる。例えば、上記した実施例は本発明を分かりやすく説明するために詳細に説明したものであり、必ずしも説明したすべての構成を備えるものに限定されるものではない。また、ある実施例の構成の一部を他の実施例の構成に置き換えることが可能であり、また、ある実施例の構成に他の実施例の構成を加えることも可能である。また、各実施例の構成の一部について、他の構成の追加・削除・置換をすることが可能である。 The present invention is not limited to the above-described examples, and includes various modifications. For example, the above-described embodiment has been described in detail in order to explain the present invention in an easy-to-understand manner, and is not necessarily limited to the one including all the configurations described. Further, it is possible to replace a part of the configuration of one embodiment with the configuration of another embodiment, and it is also possible to add the configuration of another embodiment to the configuration of one embodiment. Further, it is possible to add / delete / replace a part of the configuration of each embodiment with another configuration.
また、上記の各構成・機能・処理部等は、それらの一部又は全部を、例えば集積回路で設計する等によりハードウェアで実現してもよい。また、上記の各構成、機能等は、プロセッサがそれぞれの機能を実現するプログラムを解釈し、実行することによりソフトウェアで実現してもよい。各機能を実現するプログラム、テーブル、ファイル等の情報は、メモリや、ハードディスク、SSD(Solid State Drive)等の記録装置、または、ICカード、SDカード等の記録媒体に置くことができる。 Further, each of the above-mentioned configurations, functions, processing units and the like may be realized by hardware by designing a part or all of them by, for example, an integrated circuit. Further, each of the above configurations, functions, and the like may be realized by software by the processor interpreting and executing a program that realizes each function. Information such as programs, tables, and files that realize each function can be placed in a memory, a hard disk, a recording device such as an SSD (Solid State Drive), or a recording medium such as an IC card or an SD card.
また、制御線や情報線は説明上必要と考えられるものを示しており、製品上必ずしもすべての制御線や情報線を示しているとは限らない。実際には殆どすべての構成が相互に接続されていると考えてもよい。 In addition, control lines and information lines are shown as necessary for explanation, and not all control lines and information lines are shown in the product. In practice, it can be considered that almost all configurations are interconnected.
100 タグ推定装置 、110 プロセッサ、120 メモリ、121 マッチングモデル、122 意味表現モデル、123 訓練プログラム、124 運用プログラム、125 データクローラプログラム、126 、130 補助記憶装置、132 画像−テキスト関連データベース、134 画像−タグ関連データベース、144 クライアント装置、145 ネットワークインタフェース、221 エンコーダ、222 デコーダ、225 意味表現ベクトル、226 制約、227 入力画像、228 再構築画像、547 タグ分布テーブル 100 tag estimator, 110 processor, 120 memory, 121 matching model, 122 semantic representation model, 123 training program, 124 operation program, 125 data crawler program, 126, 130 auxiliary storage, 132 image-text related database, 134 image- Tag-related database, 144 client device, 145 network interface, 221 encoder, 222 decoder, 225 semantic representation vector, 226 constraint, 227 input image, 228 reconstructed image, 547 tag distribution table
Claims (12)
前記計算機は、
記憶装置と、
前記記憶装置に格納されているプログラムに従って動作するプロセッサと、を含み、
前記第1モデルは、入力画像から前記入力画像に関連付けるべきタグセットを表すベクトルを出力するエンコーダと、前記エンコーダからの出力を入力されるデコーダとを含み、
前記方法は、前記プロセッサが、
前記エンコーダに第1訓練画像を入力し、
前記デコーダからの第1出力画像を取得し、
前記エンコーダからの第1出力ベクトルを取得し、
前記第1訓練画像と前記第1出力画像との間の誤差と、前記第1訓練画像に予め関連付けられている第1タグセットに基づき予め設定された、前記エンコーダからの前記第1出力ベクトルに対する制約と、に基づいて、前記第1モデルのパラメータを更新する、ことを含み、
前記制約は、前記エンコーダからの前記第1出力ベクトルと前記第1タグセットのベクトルとの誤差を小さくすることである、方法。 A method performed on a computer that includes training a first model that outputs a vector representing a set of tags to be associated with the input image from the input image.
The calculator
Storage device and
Including a processor that operates according to a program stored in the storage device.
The first model includes an encoder that outputs a vector representing a tag set to be associated with the input image from the input image, and a decoder that inputs the output from the encoder.
In the method, the processor
The first training image is input to the encoder,
The first output image from the decoder is acquired and
Obtain the first output vector from the encoder
With respect to the first output vector from the encoder preset based on the error between the first training image and the first output image and the first tag set preliminarily associated with the first training image. constraints and, based on, update the parameters of the first model, look including that,
The constraint is to reduce the error between the first output vector from the encoder and the vector of the first tag set .
前記計算機は、 The calculator
記憶装置と、 Storage device and
前記記憶装置に格納されているプログラムに従って動作するプロセッサと、を含み、 Including a processor that operates according to a program stored in the storage device.
前記第1モデルは、入力画像から前記入力画像に関連付けるべきタグセットを表すベクトルを出力するエンコーダと、前記エンコーダからの出力を入力されるデコーダとを含み、 The first model includes an encoder that outputs a vector representing a tag set to be associated with the input image from the input image, and a decoder that inputs the output from the encoder.
前記方法は、前記プロセッサが、 In the method, the processor
前記エンコーダに第1訓練画像を入力し、 The first training image is input to the encoder,
前記デコーダからの第1出力画像を取得し、 The first output image from the decoder is acquired and
前記エンコーダからの第1出力ベクトルを取得し、 Obtain the first output vector from the encoder
前記第1訓練画像と前記第1出力画像との間の誤差と、前記第1訓練画像に予め関連付けられている第1タグセットに基づき予め設定された、前記エンコーダからの前記第1出力ベクトルに対する制約と、に基づいて、前記第1モデルのパラメータを更新し、 With respect to the first output vector from the encoder preset based on the error between the first training image and the first output image and the first tag set previously associated with the first training image. Based on the constraints, the parameters of the first model are updated.
前記第1モデルの訓練に使用する画像と前記画像それぞれに関連付けられているタグセットとを格納するデータベースにおける、タグの出現頻度分布を分析し、 The frequency distribution of tags in the database storing the images used for training the first model and the tag sets associated with each of the images was analyzed.
前記出現頻度分布が均一な状態に近づくように、前記データベースに、互いに関連付けられている新規画像と新規タグセットとを追加する、ことを含む方法。 A method comprising adding new images and new tag sets associated with each other to the database so that the frequency distribution approaches a uniform state.
前記プロセッサが、 The processor
互いに関連付けられている前記新規画像及びテキストを取得し、 Get the new images and texts that are associated with each other
前記テキスト内の単語それぞれのベクトルと前記新規画像の特徴ベクトルとの類似度を決定し、 The similarity between the vector of each word in the text and the feature vector of the new image is determined.
前記類似度に基づいて前記テキストから前記新規画像に関連付ける前記新規タグセットを選択する、ことをさらに含む方法。 A method further comprising selecting the new tag set associated with the new image from the text based on the similarity.
前記プロセッサが、 The processor
前記テキスト内の単語それぞれのベクトルと前記画像の特徴ベクトルとの前記類似度を、第2モデルによって決定し、 The similarity between the vector of each word in the text and the feature vector of the image is determined by the second model.
前記第2モデルの訓練において、 In the training of the second model,
前記第2モデルによって、第2訓練画像の特徴ベクトルと、前記第2訓練画像に予め関連付けられている関連タグセットのベクトルと、の第1類似度を決定し、 The first similarity between the feature vector of the second training image and the vector of the related tag set previously associated with the second training image is determined by the second model.
前記第2モデルによって、前記第2訓練画像の前記特徴ベクトルと、前記関連タグセットに含まれない単語を含む無関連タグセットのベクトルと、の第2類似度を決定し、 The second model determines the second similarity between the feature vector of the second training image and the vector of an unrelated tag set containing words not included in the related tag set.
前記第1類似度及び前記第2類似度に基づいて、前記第2モデルを更新する、ことをさらに含む方法。 A method further comprising updating the second model based on the first similarity and the second similarity.
前記プロセッサが、前記出現頻度分布に基づき、前記データベースにおいて出現頻度を増加させるべき第1タグを選択する、ことをさらに含み、 The processor further comprises selecting a first tag in the database whose frequency of occurrence should be increased based on the frequency of occurrence.
前記テキストは前記第1タグを含む、方法。 The method, wherein the text comprises the first tag.
前記計算機は、 The calculator
記憶装置と、 Storage device and
前記記憶装置に格納されているプログラムに従って動作するプロセッサと、を含み、 Including a processor that operates according to a program stored in the storage device.
前記第1モデルは、入力画像から前記入力画像に関連付けるべきタグセットを表すベクトルを出力するエンコーダと、前記エンコーダからの出力を入力されるデコーダとを含み、 The first model includes an encoder that outputs a vector representing a tag set to be associated with the input image from the input image, and a decoder that inputs the output from the encoder.
前記方法は、前記プロセッサが、 In the method, the processor
前記エンコーダに第1訓練画像を入力し、 The first training image is input to the encoder,
前記デコーダからの第1出力画像を取得し、 The first output image from the decoder is acquired and
前記エンコーダからの第1出力ベクトルを取得し、 Obtain the first output vector from the encoder
前記第1訓練画像と前記第1出力画像との間の誤差と、前記第1訓練画像に予め関連付けられている第1タグセットに基づき予め設定された、前記エンコーダからの前記第1出力ベクトルに対する制約と、に基づいて、前記第1モデルのパラメータを更新し、 With respect to the first output vector from the encoder preset based on the error between the first training image and the first output image and the first tag set previously associated with the first training image. Based on the constraints, the parameters of the first model are updated.
前記第1モデルに対して第1ユーザ画像を入力し Input the first user image for the first model
前記エンコーダからの前記第1ユーザ画像に対する第1ユーザ出力ベクトルを取得し、 The first user output vector for the first user image from the encoder is acquired and
前記第1ユーザ出力ベクトルと予め用意されているタグセットそれぞれのベクトルとの類似度を決定し、 The degree of similarity between the first user output vector and each vector of the tag set prepared in advance is determined.
前記類似度に基づいて、前記第1ユーザ画像に関連づけるタグセットを決定する、ことを含む、方法。 A method comprising determining a tag set associated with the first user image based on the similarity.
前記予め用意されているタグセットは、それぞれ、一つのタグで構成されている、方法。 A method in which each of the tag sets prepared in advance is composed of one tag.
前記計算機は、 The calculator
記憶装置と、 Storage device and
前記記憶装置に格納されているプログラムに従って動作するプロセッサと、を含み、 Including a processor that operates according to a program stored in the storage device.
前記第1モデルは、入力画像から前記入力画像に関連付けるべきタグセットを表すベクトルを出力するエンコーダと、前記エンコーダからの出力を入力されるデコーダとを含み、 The first model includes an encoder that outputs a vector representing a tag set to be associated with the input image from the input image, and a decoder that inputs the output from the encoder.
前記方法は、前記プロセッサが、 In the method, the processor
前記エンコーダに第1訓練画像を入力し、 The first training image is input to the encoder,
前記デコーダからの第1出力画像を取得し、 The first output image from the decoder is acquired and
前記エンコーダからの第1出力ベクトルを取得し、 Obtain the first output vector from the encoder
前記第1訓練画像と前記第1出力画像との間の誤差と、前記第1訓練画像に予め関連付けられている第1タグセットに基づき予め設定された、前記エンコーダからの前記第1出力ベクトルに対する制約と、に基づいて、前記第1モデルのパラメータを更新し、 With respect to the first output vector from the encoder preset based on the error between the first training image and the first output image and the first tag set previously associated with the first training image. Based on the constraints, the parameters of the first model are updated.
第1ユーザタグセットを取得し、 Get the first user tag set,
予め用意されている画像を順次前記第1モデルに入力して、前記エンコーダから候補出力ベクトルを取得し、 Images prepared in advance are sequentially input to the first model, a candidate output vector is acquired from the encoder, and the candidate output vector is acquired.
前記候補出力ベクトルそれぞれと前記第1ユーザタグセットのベクトルとの類似度を決定し、 The degree of similarity between each of the candidate output vectors and the vector of the first user tag set is determined.
前記類似度に基づいて、前記第1ユーザタグセットに関連する画像を決定する、ことを含む、方法。 A method comprising determining an image associated with the first user tag set based on the similarity.
記憶装置と、 Storage device and
前記記憶装置に格納されているプログラムに従って動作するプロセッサと、を含み、 Including a processor that operates according to a program stored in the storage device.
前記プロセッサは、 The processor
入力画像から前記入力画像に関連付けるべきタグセットを表すベクトルを出力するエンコーダと、前記エンコーダからの出力を入力されるデコーダとを含む、第1モデルを訓練し、 A first model is trained that includes an encoder that outputs a vector representing a set of tags to be associated with the input image from the input image and a decoder that inputs the output from the encoder.
前記第1モデルの訓練において、 In the training of the first model,
前記エンコーダに第1訓練画像を入力し、 The first training image is input to the encoder,
前記デコーダからの第1出力画像を取得し、 The first output image from the decoder is acquired and
前記エンコーダからの第1出力ベクトルを取得し、 Obtain the first output vector from the encoder
前記第1訓練画像と前記第1出力画像との間の誤差と、前記第1訓練画像に予め関連付けられている第1タグセットに基づき予め設定された、前記エンコーダからの前記第1出力ベクトルに対する制約と、に基づいて、前記第1モデルのパラメータを更新し、 With respect to the first output vector from the encoder preset based on the error between the first training image and the first output image and the first tag set previously associated with the first training image. Based on the constraints, the parameters of the first model are updated.
前記制約は、前記エンコーダからの前記第1出力ベクトルと前記第1タグセットのベクトルとの誤差を小さくすることである、計算機システム。 A computer system in which the constraint is to reduce the error between the first output vector from the encoder and the vector of the first tag set.
記憶装置と、
前記記憶装置に格納されているプログラムに従って動作するプロセッサと、を含み、
前記プロセッサは、
入力画像から前記入力画像に関連付けるべきタグセットを表すベクトルを出力するエンコーダと、前記エンコーダからの出力を入力されるデコーダとを含む、第1モデルを訓練し、
前記第1モデルの訓練において、
前記エンコーダに第1訓練画像を入力し、
前記デコーダからの第1出力画像を取得し、
前記エンコーダからの第1出力ベクトルを取得し、
前記第1訓練画像と前記第1出力画像との間の誤差と、前記第1訓練画像に予め関連付けられている第1タグセットに基づき予め設定された、前記エンコーダからの前記第1出力ベクトルに対する制約と、に基づいて、前記第1モデルのパラメータを更新し、
前記第1モデルの訓練に使用する画像と前記画像それぞれに関連付けられているタグセットとを格納するデータベースにおける、タグの出現頻度分布を分析し、
前記出現頻度分布が均一な状態に近づくように、前記データベースに、互いに関連付けられている新規画像と新規タグセットとを追加する、計算機システム。 It ’s a computer system,
Storage device and
Including a processor that operates according to a program stored in the storage device.
The processor
A first model is trained that includes an encoder that outputs a vector representing a set of tags to be associated with the input image from the input image and a decoder that inputs the output from the encoder.
In the training of the first model,
The first training image is input to the encoder,
The first output image from the decoder is acquired and
Obtain the first output vector from the encoder
With respect to the first output vector from the encoder preset based on the error between the first training image and the first output image and the first tag set preliminarily associated with the first training image. Based on the constraints, the parameters of the first model are updated .
The frequency distribution of tags in the database storing the images used for training the first model and the tag sets associated with each of the images was analyzed.
A computer system that adds new images and new tag sets associated with each other to the database so that the frequency distribution approaches a uniform state.
記憶装置と、 Storage device and
前記記憶装置に格納されているプログラムに従って動作するプロセッサと、を含み、 Including a processor that operates according to a program stored in the storage device.
前記プロセッサは、 The processor
入力画像から前記入力画像に関連付けるべきタグセットを表すベクトルを出力するエンコーダと、前記エンコーダからの出力を入力されるデコーダとを含む、第1モデルを訓練し、 A first model is trained that includes an encoder that outputs a vector representing a set of tags to be associated with the input image from the input image and a decoder that inputs the output from the encoder.
前記第1モデルの訓練において、 In the training of the first model,
前記エンコーダに第1訓練画像を入力し、 The first training image is input to the encoder,
前記デコーダからの第1出力画像を取得し、 The first output image from the decoder is acquired and
前記エンコーダからの第1出力ベクトルを取得し、 Obtain the first output vector from the encoder
前記第1訓練画像と前記第1出力画像との間の誤差と、前記第1訓練画像に予め関連付けられている第1タグセットに基づき予め設定された、前記エンコーダからの前記第1出力ベクトルに対する制約と、に基づいて、前記第1モデルのパラメータを更新し、 With respect to the first output vector from the encoder preset based on the error between the first training image and the first output image and the first tag set previously associated with the first training image. Based on the constraints, the parameters of the first model are updated.
前記第1モデルに対して第1ユーザ画像を入力し Input the first user image for the first model
前記エンコーダからの前記第1ユーザ画像に対する第1ユーザ出力ベクトルを取得し、 The first user output vector for the first user image from the encoder is acquired and
前記第1ユーザ出力ベクトルと予め用意されているタグセットそれぞれのベクトルとの類似度を決定し、 The degree of similarity between the first user output vector and each vector of the tag set prepared in advance is determined.
前記類似度に基づいて、前記第1ユーザ画像に関連づけるタグセットを決定する、計算機システム。 A computer system that determines a set of tags associated with the first user image based on the similarity.
記憶装置と、 Storage device and
前記記憶装置に格納されているプログラムに従って動作するプロセッサと、を含み、 Including a processor that operates according to a program stored in the storage device.
前記プロセッサは、 The processor
入力画像から前記入力画像に関連付けるべきタグセットを表すベクトルを出力するエンコーダと、前記エンコーダからの出力を入力されるデコーダとを含む、第1モデルを訓練し、 A first model is trained that includes an encoder that outputs a vector representing a set of tags to be associated with the input image from the input image and a decoder that inputs the output from the encoder.
前記第1モデルの訓練において、 In the training of the first model,
前記エンコーダに第1訓練画像を入力し、 The first training image is input to the encoder,
前記デコーダからの第1出力画像を取得し、 The first output image from the decoder is acquired and
前記エンコーダからの第1出力ベクトルを取得し、 Obtain the first output vector from the encoder
前記第1訓練画像と前記第1出力画像との間の誤差と、前記第1訓練画像に予め関連付けられている第1タグセットに基づき予め設定された、前記エンコーダからの前記第1出力ベクトルに対する制約と、に基づいて、前記第1モデルのパラメータを更新し、 With respect to the first output vector from the encoder preset based on the error between the first training image and the first output image and the first tag set previously associated with the first training image. Based on the constraints, the parameters of the first model are updated.
第1ユーザタグセットを取得し、 Get the first user tag set,
予め用意されている画像を順次前記第1モデルに入力して、前記エンコーダから候補出力ベクトルを取得し、 Images prepared in advance are sequentially input to the first model, a candidate output vector is acquired from the encoder, and the candidate output vector is acquired.
前記候補出力ベクトルそれぞれと前記第1ユーザタグセットのベクトルとの類似度を決定し、 The degree of similarity between each of the candidate output vectors and the vector of the first user tag set is determined.
前記類似度に基づいて、前記第1ユーザタグセットに関連する画像を決定する、計算機システム。 A computer system that determines an image associated with the first user tag set based on the similarity.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2018025847A JP6877374B2 (en) | 2018-02-16 | 2018-02-16 | How to train a model that outputs a vector that represents the tag set that corresponds to the image |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2018025847A JP6877374B2 (en) | 2018-02-16 | 2018-02-16 | How to train a model that outputs a vector that represents the tag set that corresponds to the image |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2019144639A JP2019144639A (en) | 2019-08-29 |
JP6877374B2 true JP6877374B2 (en) | 2021-05-26 |
Family
ID=67771220
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2018025847A Active JP6877374B2 (en) | 2018-02-16 | 2018-02-16 | How to train a model that outputs a vector that represents the tag set that corresponds to the image |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP6877374B2 (en) |
Families Citing this family (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110766072A (en) * | 2019-10-22 | 2020-02-07 | 探智立方(北京)科技有限公司 | Automatic generation method of computational graph evolution AI model based on structural similarity |
CN111582366B (en) * | 2020-05-07 | 2023-10-31 | 清华大学 | Image processing method, device and equipment |
CN112132628A (en) * | 2020-09-28 | 2020-12-25 | 科大讯飞股份有限公司 | User intention prediction method, information recommendation method and related equipment |
CN112836088B (en) * | 2021-02-24 | 2023-07-18 | 腾讯科技(深圳)有限公司 | Method, apparatus, and medium for generating tags corresponding to video |
CN114691665B (en) * | 2022-04-13 | 2023-11-14 | 众坤(北京)航空设备有限公司 | Big data analysis-based acquisition noise point mining method and big data acquisition system |
Family Cites Families (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2009064148A (en) * | 2007-09-05 | 2009-03-26 | Seiko Epson Corp | Information processor, and method and program for controlling information processor |
JP5208001B2 (en) * | 2008-06-09 | 2013-06-12 | ヤフー株式会社 | Vector data retrieval device |
US9043316B1 (en) * | 2011-03-28 | 2015-05-26 | Google Inc. | Visual content retrieval |
US9754188B2 (en) * | 2014-10-23 | 2017-09-05 | Microsoft Technology Licensing, Llc | Tagging personal photos with deep networks |
JP6522050B2 (en) * | 2017-06-07 | 2019-05-29 | ヤフー株式会社 | Determination device, learning device, determination method and determination program |
-
2018
- 2018-02-16 JP JP2018025847A patent/JP6877374B2/en active Active
Also Published As
Publication number | Publication date |
---|---|
JP2019144639A (en) | 2019-08-29 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP6877374B2 (en) | How to train a model that outputs a vector that represents the tag set that corresponds to the image | |
US11604822B2 (en) | Multi-modal differential search with real-time focus adaptation | |
JP6657124B2 (en) | Session context modeling for conversation understanding system | |
US9997157B2 (en) | Knowledge source personalization to improve language models | |
US20180218080A1 (en) | Conversational agent for search | |
JP5440394B2 (en) | Evaluation prediction apparatus, evaluation prediction method, and program | |
JP5147162B2 (en) | Method and system for determining object similarity based on heterogeneous relationships | |
JP2012058972A (en) | Evaluation prediction device, evaluation prediction method, and program | |
US20140129500A1 (en) | Efficient Modeling System | |
KR20180011221A (en) | Select representative video frames for videos | |
JP2021500692A (en) | Genealogy entity resolution system and method | |
CN109241243B (en) | Candidate document sorting method and device | |
WO2020232898A1 (en) | Text classification method and apparatus, electronic device and computer non-volatile readable storage medium | |
US9754015B2 (en) | Feature rich view of an entity subgraph | |
JP7171471B2 (en) | LEARNING MODEL GENERATION SUPPORT DEVICE AND LEARNING MODEL GENERATION SUPPORT METHOD | |
JP6079270B2 (en) | Information provision device | |
JP2007323315A (en) | Cooperative filtering method, cooperative filtering device, cooperative filtering program and recording medium with the same program recorded thereon | |
US11308146B2 (en) | Content fragments aligned to content criteria | |
CN113761124B (en) | Training method of text coding model, information retrieval method and equipment | |
US11321362B2 (en) | Analysis apparatus, analysis method and program | |
CN112970011A (en) | Recording pedigrees in query optimization | |
KR101784106B1 (en) | A method for evaluating multi contents based on knowledge structure, an appratus using it and a method for recommending contents using knowledge structure | |
JP5408658B2 (en) | Information consistency determination device, method and program thereof | |
US8027957B2 (en) | Grammar compression | |
US20200356874A1 (en) | System to predict surprising links in knowledge graphs |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20200226 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20201216 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20210105 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20210219 |
|
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: 20210406 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20210427 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 6877374 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |