JP2010086466A - Data classification device and program - Google Patents
Data classification device and program Download PDFInfo
- Publication number
- JP2010086466A JP2010086466A JP2008257508A JP2008257508A JP2010086466A JP 2010086466 A JP2010086466 A JP 2010086466A JP 2008257508 A JP2008257508 A JP 2008257508A JP 2008257508 A JP2008257508 A JP 2008257508A JP 2010086466 A JP2010086466 A JP 2010086466A
- Authority
- JP
- Japan
- Prior art keywords
- function
- feature
- vector
- vectors
- data
- 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)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
Description
本発明は、データ分類装置及びプログラムに係り、特に、SVM分類式を用いてテストデータを分類するデータ分類装置及びプログラムに関する。 The present invention relates to a data classification apparatus and program, and more particularly, to a data classification apparatus and program for classifying test data using an SVM classification formula.
従来より、SVM分類器を使用して、テスト画像が顔画像であるか分類する方法が知られている(特許文献1)。
しかしながら、上記特許文献1の技術では、扱う問題が複雑な場合、SVM分類器で使用されるサポートベクトルの数が非常に多くなるため、必要なメモリ量が膨大になると共に、計算時間が多くかかってしまう、という問題がある。
However, in the technique of the above-mentioned
本発明は、上記の問題点を解決するためになされたもので、少ないメモリ量で、かつ、短い計算時間でデータを分類することができるデータ分類装置及びプログラムを提供することを目的とする。 The present invention has been made to solve the above problems, and an object of the present invention is to provide a data classification apparatus and program capable of classifying data with a small amount of memory and a short calculation time.
上記の目的を達成するために第1の発明に係るデータ分類装置は、指数関数で表わされるカーネル関数を近似した以下の式で表される二次関数k(x、z)と、訓練データとして予め用意された複数の特徴ベクトルとに基づいて学習することにより得られた、以下の式で表されるSVM分類式f(x)を用いて、テストデータとして入力された特徴ベクトルを分類するものである。 In order to achieve the above object, a data classification apparatus according to the first invention includes a quadratic function k (x, z) represented by the following equation that approximates a kernel function represented by an exponential function, and training data: Classifying feature vectors input as test data using an SVM classification formula f (x) expressed by the following formula obtained by learning based on a plurality of feature vectors prepared in advance It is.
また、x、zは特徴ベクトルであり、γはカーネル関数におけるパラメータであり、a,c,qは、前記カーネル関数の近似により決定される係数である。xjは特徴ベクトルxのj次元の特徴量であり、xkは特徴ベクトルxのk次元の特徴量である。viはサポートベクトルであり、vijはサポートベクトルviのj次元の特徴量であり、vikはサポートベクトルviのk次元の特徴量である。yiはサポートベクトルviのラベルであり、nはサポートベクトルの個数であり、dは前記特徴ベクトルの次元数である。αi,bは前記学習により決定される係数である。 Further, x and z are feature vectors, γ is a parameter in a kernel function, and a, c, and q are coefficients determined by approximation of the kernel function. x j is a j-dimensional feature quantity of the feature vector x, and x k is a k-dimensional feature quantity of the feature vector x. v i is the support vector, v ij is the feature quantity of j dimension of support vectors v i, v ik is the characteristic of k-dimensional support vector v i. y i is the label of the support vector v i , n is the number of support vectors, and d is the number of dimensions of the feature vector. α i and b are coefficients determined by the learning.
第2の発明に係るプログラムは、コンピュータを、指数関数で表わされるカーネル関数を近似した以下の式で表される二次関数k(x、z)と、訓練データとして予め用意された複数の特徴ベクトルとに基づいて学習することにより得られた、以下の式で表されるSVM分類式f(x)を用いて、テストデータとして入力された特徴ベクトルを分類する手段として機能させるためのプログラムである。 The program according to the second aspect of the present invention provides a computer having a quadratic function k (x, z) represented by the following formula approximating a kernel function represented by an exponential function and a plurality of features prepared in advance as training data: A program for functioning as a means for classifying feature vectors input as test data using the SVM classification formula f (x) represented by the following formula, obtained by learning based on vectors: is there.
第1の発明及び第2の発明によれば、指数関数で表わされるカーネル関数を近似した上記の式で表される二次関数k(x、z)と、訓練データとして予め用意された複数の特徴ベクトルとに基づいて学習することにより得られた、上記の式で表されるSVM分類式f(x)を用いて、テストデータとして入力された特徴ベクトルを分類する。 According to the first invention and the second invention, a quadratic function k (x, z) represented by the above equation approximating a kernel function represented by an exponential function, and a plurality of prepared beforehand as training data The feature vectors input as test data are classified using the SVM classification formula f (x) expressed by the above formula obtained by learning based on the feature vectors.
このように、パラメータの少ないSVM分類式を用いてテストデータを分類することにより、少ないメモリ量で、かつ、短い計算時間でデータを分類することができる。 As described above, by classifying test data using the SVM classification formula having a small number of parameters, the data can be classified with a small amount of memory and a short calculation time.
第3の発明に係るデータ分類装置は、指数関数で表わされるカーネル関数を近似した以下の式で表される三次関数k(x、z)と、訓練データとして予め用意された複数の特徴ベクトルとに基づいて学習することにより得られた、以下の式で表されるSVM分類式f(x)を用いて、テストデータとして入力された特徴ベクトルを分類するものである。 According to a third aspect of the present invention, there is provided a data classification device including a cubic function k (x, z) represented by the following expression approximating a kernel function represented by an exponential function, and a plurality of feature vectors prepared in advance as training data: The feature vectors input as test data are classified using the SVM classification formula f (x) expressed by the following formula obtained by learning based on the above.
また、x、zは特徴ベクトルであり、γはカーネル関数におけるパラメータであり、a,c,q,hは、前記カーネル関数の近似により決定される係数である。xjは特徴ベクトルxのj次元の特徴量であり、xkは特徴ベクトルxのk次元の特徴量であり、xsは特徴ベクトルxのs次元の特徴量である。viはサポートベクトルであり、vijはサポートベクトルviのj次元の特徴量であり、vikはサポートベクトルviのk次元の特徴量であり、visはサポートベクトルviのs次元の特徴量である。yiはサポートベクトルviのラベルであり、nはサポートベクトルの個数であり、dは前記特徴ベクトルの次元数である。αi,bは前記学習により決定される係数である。 Further, x and z are feature vectors, γ is a parameter in the kernel function, and a, c, q, and h are coefficients determined by approximation of the kernel function. x j is a j-dimensional feature quantity of the feature vector x, x k is a k-dimensional feature quantity of the feature vector x, and x s is an s-dimensional feature quantity of the feature vector x. v i is the support vector, v ij is the feature quantity of j dimension of support vectors v i, v ik is the characteristic of k-dimensional support vector v i, v IS the s-dimensional support vector v i It is a feature amount. y i is the label of the support vector v i , n is the number of support vectors, and d is the number of dimensions of the feature vector. α i and b are coefficients determined by the learning.
第4の発明に係るプログラムは、コンピュータを、指数関数で表わされるカーネル関数を近似した以下の式で表される三次関数k(x、z)と、訓練データとして予め用意された複数の特徴ベクトルとに基づいて学習することにより得られた、以下の式で表されるSVM分類式f(x)を用いて、テストデータとして入力された特徴ベクトルを分類する手段として機能させるためのプログラムである。 According to a fourth aspect of the present invention, there is provided a program comprising a computer, a cubic function k (x, z) represented by the following formula approximating a kernel function represented by an exponential function, and a plurality of feature vectors prepared in advance as training data: Is a program for functioning as a means for classifying feature vectors input as test data using the SVM classification formula f (x) represented by the following formula obtained by learning based on .
第3の発明及び第4の発明によれば、指数関数で表わされるカーネル関数を近似した上記の式で表される三次関数と、訓練データとして予め用意された複数の特徴ベクトルとに基づいて学習することにより得られた、上記の式で表されるSVM分類式を用いて、テストデータとして入力された特徴ベクトルを分類する。 According to the third and fourth aspects of the invention, learning is performed based on a cubic function represented by the above equation approximating a kernel function represented by an exponential function, and a plurality of feature vectors prepared in advance as training data. The feature vectors input as test data are classified using the SVM classification formula represented by the above formula obtained by the above.
このように、パラメータの少ないSVM分類式を用いてテストデータを分類することにより、少ないメモリ量で、かつ、短い計算時間でデータを分類することができる。 As described above, by classifying test data using the SVM classification formula having a small number of parameters, the data can be classified with a small amount of memory and a short calculation time.
上記の二次関数を、カーネル関数をティラー展開により近似した二次関数とすることができる。これによって、カーネル関数を二次関数に精度良く近似することができる。 The above quadratic function can be a quadratic function obtained by approximating a kernel function by Tiller expansion. As a result, the kernel function can be approximated to a quadratic function with high accuracy.
上記の三次関数を、カーネル関数をティラー展開により近似した三次関数とすることができる。これによって、カーネル関数を三次関数に精度良く近似することができる。 The above cubic function can be a cubic function obtained by approximating a kernel function by Tiller expansion. As a result, the kernel function can be approximated to the cubic function with high accuracy.
上記の二次関数を、指数関数から生成される複数のサンプリングデータに対して、近似することにより得られた二次関数とすることができる。これによって、カーネル関数を二次関数に精度良く近似することができる。 The above quadratic function can be a quadratic function obtained by approximating a plurality of sampling data generated from an exponential function. As a result, the kernel function can be approximated to a quadratic function with high accuracy.
また、上記の二次関数を、指数関数から生成される複数のサンプリングデータのうち、カーネル関数におけるパラメータγに複数の離散値の各々を適用した場合に取りうるサンプリングデータに対して、各々近似することにより得られた複数の二次関数とすることができる。 Further, the quadratic function is approximated to sampling data that can be obtained when each of a plurality of discrete values is applied to the parameter γ in the kernel function among the plurality of sampling data generated from the exponential function. Thus, a plurality of quadratic functions obtained can be obtained.
上記の三次関数を、指数関数から生成される複数のサンプリングデータに対して、近似することにより得られた三次関数とすることができる。これによって、カーネル関数を三次関数に精度良く近似することができる。 The above cubic function can be a cubic function obtained by approximating a plurality of sampling data generated from an exponential function. As a result, the kernel function can be approximated to the cubic function with high accuracy.
また、上記の三次関数を、指数関数から生成される複数のサンプリングデータのうち、カーネル関数におけるパラメータγに複数の離散値の各々を適用した場合に取りうるサンプリングデータに対して、各々近似することにより得られた複数の三次関数とすることができる。 Further, the above cubic function is approximated to sampling data that can be obtained when each of a plurality of discrete values is applied to a parameter γ in a kernel function among a plurality of sampling data generated from an exponential function. A plurality of cubic functions obtained by the above can be obtained.
上記の複数のサンプリングデータを、訓練データとして用意された複数の特徴ベクトルの内積値から得られる指数関数の指数部分の値の経験分布に応じて生成することができる。 The plurality of sampling data described above can be generated according to the empirical distribution of the value of the exponent part of the exponential function obtained from the inner product value of a plurality of feature vectors prepared as training data.
上記の特徴ベクトルとして、正規化された特徴ベクトルを用いることができる。 As the feature vector, a normalized feature vector can be used.
以上説明したように、本発明のデータ分類装置及びプログラムによれば、パラメータの少ないSVM分類式を用いてテストデータを分類することにより、少ないメモリ量で、かつ、短い計算時間でデータを分類することができる、という効果が得られる。 As described above, according to the data classification apparatus and program of the present invention, data is classified with a small memory amount and a short calculation time by classifying test data using an SVM classification formula with few parameters. The effect that it can be obtained.
以下、図面を参照して本発明の実施の形態を詳細に説明する。なお、本実施の形態では、撮像装置によって撮像された画像が、顔を表わす顔画像であるか分類する画像分類装置に本発明を適用した場合を例に説明する。 Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings. In the present embodiment, a case where the present invention is applied to an image classification apparatus that classifies whether an image captured by an imaging apparatus is a face image representing a face will be described as an example.
図1に示すように、第1の実施の形態に係る画像分類装置10は、所定領域を撮像するように設けられた撮像装置12と、撮像装置12により撮像した画像が、顔を表わす顔画像であるか分類して、分類結果を表示装置16に表示させるコンピュータ14とを備えている。
As shown in FIG. 1, an
コンピュータ14は、CPU、後述するSVMモデル学習処理ルーチン及び顔画像分類処理ルーチンのプログラムを記憶したROM、データ等を記憶するRAM、及びこれらを接続するバスを含んで構成されている。このコンピュータ14をハードウエアとソフトウエアとに基づいて定まる機能実現手段毎に分割した機能ブロックで説明すると、図1に示すように、サポートベクターマシン(Support Vector Machine、SVM)のカーネル関数を二次関数に近似するカーネル関数近似部20と、訓練データとして、顔画像の特徴ベクトル及び非顔画像の特徴ベクトルを多数記憶した訓練データ記憶部22と、カーネル関数を近似した二次関数と訓練データとを用いて、SVM分類式を学習するSVM学習部24と、学習により得られたSVM分類式を式展開することにより式を変換するSVMモデル変換部26と、変換されたSVM分類式を記憶したSVMモデル記憶部28とを備えている。
The
ここで、SVMモデルを用いた分類手法について説明する。 Here, a classification method using the SVM model will be described.
SVMモデルを用いた分類手法では、訓練データの集合が与えられると、訓練データをより高次元の特徴空間に非線形写像し、この特徴空間において最大マージンを有する分離超平面を構築する。 In the classification method using the SVM model, when a set of training data is given, the training data is nonlinearly mapped to a higher-dimensional feature space, and a separation hyperplane having a maximum margin is constructed in the feature space.
SVMモデルでは、学習及び分類において必要な計算は、非線形写像空間での特徴φ(x1)やφ(x2)の内積算のみに関わるので、特徴φ(x1)を陽に計算する代わりに、カーネル関数K(x1,x2)=φ(x1)Tφ(x2)のように暗に計算する。 In the SVM model, the calculation required for learning and classification involves only the internal integration of the features φ (x 1 ) and φ (x 2 ) in the nonlinear mapping space, so that instead of calculating the features φ (x 1 ) explicitly Then, the kernel function K (x 1 , x 2 ) = φ (x 1 ) T φ (x 2 ) is implicitly calculated.
カーネル関数としては多項式カーネル、RBF(Radial Basis Function)カーネル、シグモイドカーネルなどがよく使用される。SVMモデルにおいて、カーネル関数を計算するとき考慮しなければならないのは、分離超平面の近傍にあるベクトルのみであり、これらのベクトルをサポートベクトルと呼ぶ。一般のSVM分類式は以下の(1)式で表される。 As the kernel function, a polynomial kernel, an RBF (Radial Basis Function) kernel, a sigmoid kernel, or the like is often used. In the SVM model, only the vectors in the vicinity of the separation hyperplane need to be considered when calculating the kernel function, and these vectors are called support vectors. A general SVM classification formula is represented by the following formula (1).
ここで、viはサポートベクトル、αiはラグランジュ係数、yiは各サポートベクトルviのラベル(1,−1)を各々表す。 Here, v i represents a support vector, α i represents a Lagrange coefficient, and y i represents a label (1, −1) of each support vector v i .
本実施の形態では、カーネル関数としてRBFカーネルを用いる。RBFカーネルを用いたSVMによる分類性能は、一般に性能が高く安定的である。 In this embodiment, an RBF kernel is used as a kernel function. The classification performance by SVM using the RBF kernel is generally high performance and stable.
カーネル関数近似部20は、RBFカーネルを、以下に説明するように二次多項式関数で近似する。以下では、普遍性を損失なく、特徴ベクトルがL2ノルムで正規化されている場合を仮定して説明する。
The kernel
まず、RBFカーネルを、以下の(2)式のように展開できる。 First, the RBF kernel can be expanded as shown in the following equation (2).
ここで、γ(>0)は、カーネルの幅と呼ばれるパラメータである。上記(2)式では、第一項の指数関数が常に固定値なので、無視してもカーネルに影響がない。つまり、RBFカーネルは、上記(2)式の第二項の指数関数で表される。 Here, γ (> 0) is a parameter called kernel width. In the above equation (2), since the exponential function of the first term is always a fixed value, even if ignored, the kernel is not affected. That is, the RBF kernel is represented by the exponential function of the second term of the above equation (2).
また、上記(2)式の第二項の指数関数で表されるRBFカーネルを、以下の(3)式で表される二次多項式関数で近似する。 Further, the RBF kernel represented by the exponential function of the second term of the above equation (2) is approximated by a quadratic polynomial function represented by the following equation (3).
上記(3)式の係数a,c,qについては、以下のように決定される。 The coefficients a, c, and q in the above equation (3) are determined as follows.
まず、特徴ベクトルxとzがL2ノルムで正規化されているため、内積値xTzは常に[0,1]の範囲である。従って、RBFカーネルの指数部分2γxTzの値域が[0,2γ]となる。 First, since the feature vectors x and z are normalized by the L2 norm, the inner product value x T z is always in the range [0, 1]. Therefore, the range of the exponent part 2γx T z of the RBF kernel is [0, 2γ].
また、指数関数で表されるRBFカーネルはティラー展開で近似することができる。パラメータγが小さい値をとる場合、RBFカーネルの指数部分2γxTzの値域は小さい区間となるため、二次ティラー展開でRBFカーネルを近似することができ、上記(3)式の係数について、a=1,c=1,q=1/2と決定される。 In addition, the RBF kernel represented by an exponential function can be approximated by a tiller expansion. When the parameter γ takes a small value, since the range of the exponent part 2γx T z of the RBF kernel is a small interval, the RBF kernel can be approximated by the second-order Tiller expansion. = 1, c = 1, q = 1/2.
SVM学習部24は、以下に説明するように、γ、αi、bを学習して、SVM分類式を決定する。
As will be described below, the
まず、上記(1)式のSVM分類式f(x)のカーネル関数として、近似された上記(3)式の二次多項式関数を用いると共に、カーネル関数のパラメータγに複数の離散値の各々を適用して、γの各離散値に対して、訓練データの特徴ベクトルに基づいて、以下の(4)式を最大にするような、αiを学習すると共に、学習したαiを適用したときに任意のiに対して以下の(5)式を満たすbを選択することにより、SVM分類式を各々決定する。 First, as the kernel function of the SVM classification formula f (x) of the above formula (1), an approximated second order polynomial function of the above formula (3) is used, and each of a plurality of discrete values is set as the kernel function parameter γ. applying, for each discrete value of gamma, based on the feature vector of the training data, the following equation (4) that maximizes and with learning the alpha i, when applying learned alpha i Each SVM classification formula is determined by selecting b satisfying the following formula (5) for any i.
ここで、Nは、訓練データの数であり、xiは、訓練データの特徴ベクトルであり、yiは特徴ベクトルxiの教師ラベル(1、−1)である。また、Cは定数である。 Here, N is the number of training data, x i is a feature vector of training data, and y i is a teacher label (1, −1) of the feature vector x i . C is a constant.
次に、各γの離散値に対して決定されたαi、bを用いたSVM分類式の各々について、訓練データの特徴ベクトルを適用した場合の計算結果と、訓練データの教師ラベルとを比較する。 Next, for each of the SVM classification formulas using α i and b determined for the discrete values of γ, the calculation result when the feature vector of the training data is applied is compared with the teacher label of the training data. To do.
各γの離散値に対して得られた比較結果の各々から、最適なSVM分類式となるときのγを決定し、このγに対して決定されたαi、bと、決定されたγとを用いたSVM分類式を、学習結果として採用する。 From each of the comparison results obtained for the discrete values of each γ, γ to be an optimal SVM classification formula is determined, and α i and b determined for this γ, The SVM classification formula using is used as a learning result.
SVMモデル変換部26は、学習により得られたSVM分類式f2(x)を、以下の(6)式に示すように数式展開することにより、パラメータの少ない式に変換して、SVMモデル記憶部28に記憶しておく。
The SVM
また、xjは特徴ベクトルxのj次元の特徴量であり、xkは特徴ベクトルxのk次元の特徴量である。viはサポートベクトルであり、vijはサポートベクトルviのj次元の特徴量であり、vikはサポートベクトルviのk次元の特徴量である。yiはサポートベクトルviのラベルであり、nはサポートベクトルの個数であり、dは特徴ベクトルの次元数である。αi,bは学習により決定される係数である。 X j is a j-dimensional feature quantity of the feature vector x, and x k is a k-dimensional feature quantity of the feature vector x. v i is the support vector, v ij is the feature quantity of j dimension of support vectors v i, v ik is the characteristic of k-dimensional support vector v i. y i is the label of the support vector v i , n is the number of support vectors, and d is the number of dimensions of the feature vector. α i and b are coefficients determined by learning.
上記(6)式のSVM分類式に使われるパラメータβj、ωjkは、サポートベクトル間の重み付き加算結果から予め計算され、メモリ(図示省略)に予め記憶される。 The parameters β j and ω jk used in the above SVM classification formula (6) are calculated in advance from the weighted addition result between the support vectors and stored in advance in a memory (not shown).
また、コンピュータ14は、撮像装置12から出力される撮像画像を入力する画像入力部30と、撮像画像から、テストデータとして、複数種類の特徴量から構成される特徴ベクトルを抽出する特徴ベクトル抽出部32と、SVMモデル記憶部28に記憶されたSVM分類式を用いて、テストデータに対して、顔画像であるか否かの分類を行って、分類結果を表示装置16に表示させるSVM分類部34とを備えている。
The
画像入力部30は、例えば、A/Dコンバータや1画面の画像データを記憶する画像メモリ等で構成される。
The
特徴ベクトル抽出部32は、撮像画像から複数種類の特徴量を抽出して、テストデータとして、複数種類の特徴量からなる特徴ベクトルを生成する。なお、上記の訓練データの特徴ベクトルとテストデータの特徴ベクトルとは、同じ種類の特徴量から構成されるベクトルである。
The feature
SVM分類部34は、テストデータの特徴ベクトルについて、上記(6)式で表されるSVM分類式を計算し、計算結果が正の値(0を含む)であれば、撮像画像が顔画像であると分類し、計算結果が負の値であれば、撮像画像が顔画像であると分類する。
The
次に、第1の実施の形態に係る画像分類装置10の作用について説明する。
Next, the operation of the
まず、訓練データとして、顔画像の特徴ベクトル及び非顔画像の特徴ベクトルが多数用意され、コンピュータ14の訓練データ記憶部22に教師ラベルと共に記憶される。また、コンピュータ14において、図2に示すSVMモデル学習処理ルーチンが実行される。
First, a large number of feature vectors of face images and feature vectors of non-face images are prepared as training data, and are stored in the training
まず、ステップ100において、カーネル関数であるRBFカーネルを二次ティラー展開により二次多項式関数で近似する。そして、ステップ102において、訓練データを読み込み、ステップ104において、訓練データを上記ステップ100で近似した二次多項式関数に適用して学習することにより、SVM分類式の係数を決定し、SVM分類式を得る。
First, in
次のステップ106では、上記ステップ104で得られたSVM分類式を数式展開することにより、上記(6)式で表される数式に変換して、ステップ108において、SVMモデル記憶部28に、変換したSVM分類式を記憶して、SVMモデル学習処理ルーチンを終了する。
In the
また、撮像装置12によって所定領域の画像が撮像されると、コンピュータ14において、図3に示す顔画像分類処理ルーチンが実行される。
Further, when an image of a predetermined area is picked up by the
まず、ステップ120において、撮像装置12から撮像画像を取得し、ステップ122において、上記ステップ120で取得された撮像画像から複数種類の特徴量を抽出して、テストデータとしての特徴ベクトルを生成する。
First, in
そして、ステップ124において、SVMモデル記憶部28に記憶されたSVM分類式に、上記ステップ122で生成された特徴ベクトルを適用して計算する。次のステップ126において、上記ステップ124で得られた計算値が正の値であるか否かを判定し、正の値であると、ステップ128において、撮像画像が顔画像であるとの分類結果を表示装置16に表示させて、顔画像分類処理ルーチンを終了する。一方、上記ステップ126において、上記ステップ124で得られた計算値が負の値であると判定されると、ステップ130において、撮像画像が顔画像でないとの分類結果を表示装置16に表示させて、顔画像分類処理ルーチンを終了する。
上記(6)式においてωkj=ωjkとなるので、上記顔画像分類処理ルーチンの計算において、SVM分類式で使用する{βj},{ωjk}に関わる総メモリ量はd2/2に比例する(dは特徴量の次元数を表す)。一方、近似しない元のSVMモデルに関わる総メモリ量はnd(サポートベクトルの数n×特徴量の次元数d)であり、本実施の形態の手法によるメモリ量の効率化率は2n/dになる。ここで、一般的に、特徴量の次元数dはサポートベクトルの数nより少ないので、総メモリ量が削減される。例えば、特徴量の次元数dが100であり、サポートベクトルの数nが4000である場合には、上記(6)式を用いて計算することにより、変換する前のSVMモデルを用いて計算に比べて、総メモリ量が約80倍効率化される。また、計算時間についても、本実施の形態の手法によりメモリ量の効率化と同様に効率化することができる。
In
Since the ω kj = ω jk in the equation (6), in the calculation of the face image classification processing routine, used in the SVM classifier formula {beta j}, the total amount of memory related to {omega jk} is d 2/2 (D represents the number of dimensions of the feature quantity). On the other hand, the total memory amount related to the original SVM model that is not approximated is nd (number of support vectors n × dimension number d of feature amount), and the efficiency of memory amount by the method of this embodiment is 2n / d. Become. Here, in general, the number of dimensions d of the feature amount is smaller than the number n of support vectors, so that the total memory amount is reduced. For example, when the feature quantity dimension d is 100 and the support vector number n is 4000, calculation is performed using the SVM model before conversion by calculating using the above equation (6). In comparison, the total memory capacity is about 80 times more efficient. Also, the calculation time can be improved by the method of the present embodiment in the same manner as the memory amount.
以上説明したように、第1の実施の形態に係る画像分類装置によれば、二次関数に近似したRBFカーネルに基づくパラメータの少ないSVM分類式を用いて、テストデータを分類することにより、少ないメモリ量で、かつ、短い計算時間でデータを分類することができる。 As described above, according to the image classification device according to the first embodiment, the test data is classified by using the SVM classification formula having a small number of parameters based on the RBF kernel approximated to the quadratic function, thereby reducing the number of test data. Data can be classified by the amount of memory and in a short calculation time.
メモリ量や計算時間を削減するために、サポートベクトル数を減らす必要がないため、従来手法のRBFカーネルを用いたSVMモデルによる分類に比べ、分類性能を落とすことなく、高速で処理可能でありかつメモリ量を削減でき、低コスト化を実現できる。 Since it is not necessary to reduce the number of support vectors in order to reduce the amount of memory and calculation time, it can be processed at high speed without degrading the classification performance as compared with the classification based on the SVM model using the RBF kernel of the conventional method, and The amount of memory can be reduced and the cost can be reduced.
また、二次ティラー展開により、RBFカーネルを、二次関数で精度良く近似することができる。 Further, the RBF kernel can be approximated with a quadratic function with high accuracy by the quadratic tiller expansion.
次に、第2の実施の形態について説明する。なお、第2の実施の形態に係る画像分類装置の構成は、第1の実施の形態と同様の構成となるため、同一符号を付して説明を省略する。 Next, a second embodiment will be described. Note that the configuration of the image classification apparatus according to the second embodiment is the same as that of the first embodiment, and thus the same reference numerals are given and description thereof is omitted.
第2の実施の形態では、RBFカーネルを3次多項式関数に近似している点が第1の実施の形態と主に異なっている。 The second embodiment is mainly different from the first embodiment in that the RBF kernel is approximated to a cubic polynomial function.
第2の実施の形態に係る画像分類装置では、カーネル関数近似部20によって、上記(2)式の第二項の指数関数で表されるRBFカーネルを、以下の(7)式で表される三次次多項式関数で近似する。
In the image classification device according to the second embodiment, the kernel
上記(7)式の係数a,c,q,hについては、以下のように決定される。 The coefficients a, c, q, and h in the equation (7) are determined as follows.
パラメータγが小さい値をとる場合、RBFカーネルの指数部分2γxTzの値域は小さい区間となるため、三次ティラー展開でRBFカーネルを近似することができ、上記(7)式の係数について、a=1,c=1,q=1/2、h=1/6と決定される。 When the parameter γ takes a small value, the range of the exponent part 2γx T z of the RBF kernel is a small interval, so that the RBF kernel can be approximated by the third-order Tiller expansion, and a = 1, c = 1, q = 1/2, and h = 1/6.
また、SVM学習部24は、上記(1)式のSVM分類式f(x)のカーネル関数として、近似された上記(7)式の三次多項式関数を用いると共に、カーネル関数のパラメータγに複数の離散値の各々を適用して、γの各離散値に対して、訓練データの特徴ベクトルに基づいて、上記の(4)式を最大化にするようなαi、を学習すると共に、上記の(5)式を満たすbを選択して、SVM分類式を各々決定する。
The
また、各γの離散値に対して決定されたαi、bを用いたSVM分類式の各々について、訓練データの特徴ベクトルを適用した場合の計算結果と、訓練データの教師ラベルとを比較し、各γの離散値に対して得られた比較結果の各々から、最適なSVM分類式となるときのγを決定し、このγに対して決定されたαi、bと、決定されたγとを用いたSVM分類式を、学習結果として採用する。 Further, for each SVM classification formula using α i and b determined for each discrete value of γ, the calculation result when the feature vector of the training data is applied is compared with the teacher label of the training data. , Γ for determining the optimum SVM classification formula is determined from each of the comparison results obtained for the discrete values of γ, α i and b determined for the γ, and determined γ The SVM classification formula using is used as a learning result.
SVMモデル変換部26は、学習により得られたSVM分類式f3(x)を、以下の(8)式に示すように数式展開することにより、パラメータの少ない式に変換して、SVMモデル記憶部28に記憶しておく。
The SVM
また、xjは特徴ベクトルxのj次元の特徴量であり、xkは特徴ベクトルxのk次元の特徴量であり、xsは特徴ベクトルxのs次元の特徴量である。viはサポートベクトルであり、vijはサポートベクトルviのj次元の特徴量であり、vikはサポートベクトルviのk次元の特徴量であり、visはサポートベクトルviのs次元の特徴量である。yiはサポートベクトルviのラベルであり、nはサポートベクトルの個数であり、dは特徴ベクトルの次元数である。αi,bは前記学習により決定される係数である。 Further, x j is a j-dimensional feature quantity of the feature vector x, x k is a k-dimensional feature quantity of the feature vector x, and x s is an s-dimensional feature quantity of the feature vector x. v i is the support vector, v ij is the feature quantity of j dimension of support vectors v i, v ik is the characteristic of k-dimensional support vector v i, v IS the s-dimensional support vector v i It is a feature amount. y i is the label of the support vector v i , n is the number of support vectors, and d is the number of dimensions of the feature vector. α i and b are coefficients determined by the learning.
上記(8)式のSVM分類式に使われるパラメータβj、ωjk、θjksは、サポートベクトル間の重み付き加算結果から予め計算され、メモリ(図示省略)に予め記憶される。 The parameters β j , ω jk , θ jks used in the SVM classification formula of the above formula (8) are calculated in advance from the weighted addition result between the support vectors and stored in advance in a memory (not shown).
なお、第2の実施の形態に係る画像分類装置の他の構成及び作用については、第1の実施の形態と同様であるため、説明を省略する。 Note that other configurations and operations of the image classification device according to the second embodiment are the same as those of the first embodiment, and thus the description thereof is omitted.
ここで、上記(8)式を用いた計算において、使用されるパラメータ{βj},{ωjk},{θjks}に関わる総メモリ量はd(d2+6d)/2に比例するため、近似しない元のSVMモデルと比較して、本実施の形態の手法によるメモリ量の効率化率は2n/(d2+6d)になる。従って、特徴量の次元数が少ない場合(例えば、100未満である場合)には、総メモリ量の効率化を実現することができる。また、計算時間についても、メモリ量の効率化と同様に効率化することができる。 Here, in the calculation using the above equation (8), the total memory amount related to the parameters {β j }, {ω jk }, {θ jks } used is proportional to d (d 2 + 6d) / 2. Compared with the original SVM model that is not approximated, the memory efficiency is 2n / (d 2 + 6d) according to the method of the present embodiment. Therefore, when the number of dimensions of the feature quantity is small (for example, less than 100), the efficiency of the total memory quantity can be realized. Also, the calculation time can be improved in the same manner as the memory amount.
このように、三次関数に近似したRBFカーネルに基づくパラメータの少ないSVM分類式を用いて、テストデータを分類することにより、少ないメモリ量で、かつ、短い計算時間でデータを分類することができる。また、三次ティラー展開により、RBFカーネルを、三次関数で精度良く近似することができる。 In this way, by classifying test data using the SVM classification formula having a small number of parameters based on the RBF kernel approximated to a cubic function, the data can be classified with a small memory amount and a short calculation time. In addition, by the cubic Tiller expansion, the RBF kernel can be approximated with a cubic function with high accuracy.
次に、第3の実施の形態について説明する。なお、第3の実施の形態に係る画像分類装置の構成は、第1の実施の形態と同様の構成となるため、同一符号を付して説明を省略する。 Next, a third embodiment will be described. Note that the configuration of the image classification apparatus according to the third embodiment is the same as that of the first embodiment, and thus the same reference numerals are given and description thereof is omitted.
第3の実施の形態では、RBFカーネルの指数関数から生成されるサンプリングデータに対して、フィッティングすることにより、RBFカーネルを近似した二次多項式関数を求めている点が、第1の実施の形態と主に異なっている。 In the third embodiment, a second-order polynomial function that approximates the RBF kernel is obtained by fitting the sampling data generated from the exponential function of the RBF kernel. And mainly different.
第3の実施の形態に係る画像分類装置では、カーネル関数近似部20によって、RBFカーネルを、以下に説明するように、上記(3)式で表される二次多項式関数で近似する。ここでは、普遍性を損失なく、特徴ベクトルがL2ノルムで正規化されている場合を仮定して説明する。
In the image classification device according to the third embodiment, the kernel
まず、RBFカーネルの指数部分2γxTzの値域において、上記(2)式の第二項の指数関数から、図4(A)に示すように、等間隔でサンプリングデータを生成し、均一的に分布したサンプリングデータの集合を生成する。 First, in the range of the exponent part 2γx T z of the RBF kernel, sampling data is generated at equal intervals from the exponential function of the second term of the above equation (2) as shown in FIG. Generate a set of distributed sampling data.
また、RBFカーネルのパラメータγにどの値が適用されるか未知なので、それぞれの離散値を適用した場合に取りうる範囲で、二次多項式関数に各々近似する。例えば、γに適用される離散値を0.5おきで、[0.5,1,1.5…]とすると、取りうる2γxTzの値域は{[0,1],[0,2],[0,3]…}となる。各値域(区間)に含まれるサンプリングデータの集合に対して、図4(B)に示すように、最小二乗法によってフィッティングを行って、残差の二乗和を最小とするような二次多項式関数に近似するように上記(6)式の係数a,c,qを決定して、パラメータγの各離散値に対する二次多項式関数を得る。なお、上記図4(B)では、γ=1とした場合に取りうる区間でのフィッティングの様子を示している。 Further, since it is unknown which value is applied to the parameter γ of the RBF kernel, each value is approximated to a quadratic polynomial function within a range that can be taken when each discrete value is applied. For example, if the discrete values applied to γ are every 0.5 and [0.5, 1, 1.5...], The possible range of 2γx T z is {[0, 1], [0, 2 ], [0, 3] ...}. As shown in FIG. 4B, a quadratic polynomial function that performs fitting by a least square method on a set of sampling data included in each range (section) to minimize the sum of squares of the residuals. The coefficients a, c, and q of the above equation (6) are determined so as to approximate to ## EQU3 ## to obtain a second order polynomial function for each discrete value of the parameter γ. Note that FIG. 4B shows a fitting state in a section that can be taken when γ = 1.
SVM学習部24は、以下に説明するように、γ、αi、bを学習して、SVM分類式を決定する。
As described below, the
まず、上記(1)式のSVM分類式f(x)のカーネル関数として、γの離散値毎に近似された二次多項式関数を用いて、γの各離散値に対して、上記の(4)式を最大にするようなαiを学習すると共に、上記の(5)式を満たすbを選択して、SVM分類式を各々決定する。 First, using the quadratic polynomial function approximated for each discrete value of γ as the kernel function of the SVM classification formula f (x) of the above equation (1), for each discrete value of γ, the above (4 ) Learning α i that maximizes the expression, and selecting b satisfying the above expression (5) to determine the SVM classification expressions.
次に、各γの離散値に対して決定されたαi、bを用いたSVM分類式の各々について、訓練データの特徴ベクトルを適用した場合の計算結果と、訓練データの教師ラベルとを比較する。 Next, for each of the SVM classification formulas using α i and b determined for the discrete values of γ, the calculation result when the feature vector of the training data is applied is compared with the teacher label of the training data. To do.
各γの離散値に対して得られた比較結果の各々から、最適なSVM分類式となるときのγを決定し、このγに対して決定されたαi、bと、このγに対して近似された二次多項式関数と、決定されたγとを用いたSVM分類式を、学習結果として採用する。 From each of the comparison results obtained for the discrete values of each γ, γ when an optimum SVM classification formula is obtained is determined, and α i and b determined for this γ, and for this γ An SVM classification formula using the approximated second-order polynomial function and the determined γ is adopted as a learning result.
SVMモデル変換部26は、上記第1の実施の形態と同様に、学習により得られたSVM分類式を数式展開して、上記(6)式に示すような数式に変換する。
Similar to the first embodiment, the SVM
次に、第3の実施の形態に係るSVMモデル学習処理ルーチンについて、図5を用いて説明する。なお、第1の実施の形態と同様の処理については、同一符号を付して詳細な説明を省略する。 Next, the SVM model learning process routine according to the third embodiment will be described with reference to FIG. In addition, about the process similar to 1st Embodiment, the same code | symbol is attached | subjected and detailed description is abbreviate | omitted.
まず、ステップ300において、RBFカーネルの指数関数を用いて、等間隔にサンプリングデータを生成し、ステップ302において、パラメータγの各離散値に対して、対応する範囲のサンプリングデータに基づいて、RBFカーネルの指数関数を二次多項式関数で近似する。
First, in
そして、ステップ102で、訓練データを読み込み、ステップ304において、訓練データを、上記ステップ302でγの離散値毎に近似した二次多項式関数に適用して学習することにより、RBFカーネルのパラメータγ及びSVM分類式の係数を決定し、SVM分類式を得る。
Then, in
次のステップ106では、上記ステップ304で得られたSVM分類式を数式展開することにより、上記(6)式で表される数式に変換して、ステップ108において、SVMモデル記憶部28に、変換したSVM分類式を記憶させて、SVMモデル学習処理ルーチンを終了する。
In the
また、撮像装置12によって所定領域の画像が撮像されると、コンピュータ14において、第1の実施の形態と同様に、顔画像分類処理ルーチンが実行される。
Further, when an image of a predetermined area is picked up by the
このように、二次関数に近似したRBFカーネルに基づくパラメータの少ないSVM分類式を用いて、テストデータを分類することにより、少ないメモリ量で、かつ、短い計算時間でデータを分類することができる。 In this way, by classifying test data using the SVM classification formula having a small number of parameters based on the RBF kernel approximated to a quadratic function, the data can be classified with a small amount of memory and a short calculation time. .
また、サンプリングデータに対するフィッティングにより、RBFカーネルを、二次関数で精度良く近似することができる。 In addition, by fitting the sampling data, the RBF kernel can be approximated with a quadratic function with high accuracy.
次に、第4の実施の形態について説明する。なお、第4の実施の形態に係る画像分類装置の構成は、第1の実施の形態と同様の構成となるため、同一符号を付して説明を省略する。 Next, a fourth embodiment will be described. Note that the configuration of the image classification apparatus according to the fourth embodiment is the same as that of the first embodiment, and thus the same reference numerals are given and description thereof is omitted.
第4の実施の形態では、RBFカーネルを3次多項式関数に近似している点が第3の実施の形態と主に異なっている。 The fourth embodiment is mainly different from the third embodiment in that the RBF kernel is approximated to a cubic polynomial function.
第4の実施の形態に係る画像分類装置では、カーネル関数近似部20によって、RBFカーネルを、以下に説明するように、上記(7)式で表される三次多項式関数で近似する。
In the image classification device according to the fourth embodiment, the kernel
まず、RBFカーネルの指数部分2γxTzの値域において、上記(2)式の第二項の指数関数から、等間隔でサンプリングデータを生成し、均一的に分布したサンプリングデータの集合を生成する。 First, in the range of the exponent part 2γx T z of the RBF kernel, sampling data is generated at equal intervals from the exponent function of the second term of the above equation (2), and a set of uniformly distributed sampling data is generated.
また、RBFカーネルのパラメータγにそれぞれの離散値を適用した場合に取りうる範囲で、三次多項式関数に各々近似する。γの各離散値を適用した場合に取りうる2γxTzの値域(区間)に含まれるサンプリングデータの集合に対して、最小二乗法によってフィッティングを行って、残差の二乗和を最小とするような三次多項式関数に近似するように上記(7)式の係数a,c,q,hを各々決定して、パラメータγの各離散値に対する三次多項式関数を各々得る。 In addition, each is approximated to a cubic polynomial function in a range that can be taken when each discrete value is applied to the parameter γ of the RBF kernel. By fitting the set of sampling data included in the range (section) of 2γx T z that can be obtained when each discrete value of γ is applied, fitting is performed by the method of least squares so as to minimize the sum of squares of the residuals. The coefficients a, c, q, and h in the above equation (7) are determined so as to approximate a cubic polynomial function to obtain a cubic polynomial function for each discrete value of the parameter γ.
SVM学習部24は、第3の実施の形態と同様に、γ、αi、bを学習して、SVM分類式を決定する。
As in the third embodiment, the
なお、第4の実施の形態に係る画像分類装置の他の構成及び作用については、第3の実施の形態と同様であるため、説明を省略する。 Note that the other configuration and operation of the image classification device according to the fourth embodiment are the same as those of the third embodiment, and thus the description thereof is omitted.
このように、三次関数に近似したRBFカーネルに基づくパラメータの少ないSVM分類式を用いて、テストデータを分類することにより、少ないメモリ量で、かつ、短い計算時間でデータを分類することができる。 In this way, by classifying test data using the SVM classification formula having a small number of parameters based on the RBF kernel approximated to a cubic function, the data can be classified with a small memory amount and a short calculation time.
また、サンプリングデータに対するフィッティングにより、RBFカーネルを、三次関数で精度良く近似することができる。 In addition, by fitting the sampling data, the RBF kernel can be approximated with a cubic function with high accuracy.
次に、第5の実施の形態について説明する。なお、第5の実施の形態に係る画像分類装置の構成は、第1の実施の形態と同様の構成となるため、同一符号を付して説明を省略する。 Next, a fifth embodiment will be described. Note that the configuration of the image classification apparatus according to the fifth embodiment is the same as that of the first embodiment, and thus the same reference numerals are given and description thereof is omitted.
第5の実施の形態では、訓練データから算出される指数部分のヒストグラムに応じて、サンプリングデータを作成し、RBFカーネルの近似を行っている点が、第3の実施の形態と異なっている。 The fifth embodiment is different from the third embodiment in that sampling data is created in accordance with the histogram of the exponent part calculated from the training data and the RBF kernel is approximated.
第5の実施の形態に係る画像分類装置では、カーネル関数近似部20によって、RBFカーネルを、以下に説明するように、上記(3)式で表される二次多項式関数で近似する。
In the image classification device according to the fifth embodiment, the kernel
まず、図6に示すように、訓練データから、特徴ベクトル間の内積値xTzの経験分布(ヒストグラム)を算出し、算出されたヒストグラムから、指数部分2γxTzの値の経験分布(ヒストグラム)を求める。そして、RBFカーネルの指数部分2γxTzの値域において、上記(2)式の第二項の指数関数から、図7(A)に示すように、指数部分2γxTzの値のヒストグラムに応じて、サンプリングデータを生成し、サンプリングデータの集合を生成する。 First, as shown in FIG. 6, an empirical distribution (histogram) of inner product values x T z between feature vectors is calculated from the training data, and an empirical distribution (histogram) of the value of the exponent part 2γx T z is calculated from the calculated histogram. ) Then, in the range of the exponent part 2γx T z of the RBF kernel, from the exponent function of the second term of the above equation (2), as shown in FIG. 7A, according to the histogram of the value of the exponent part 2γx T z , Generate sampling data, and generate a set of sampling data.
また、RBFカーネルのパラメータγにそれぞれの離散値を適用した場合に取りうる範囲で、二次多項式関数に各々近似する。γの各離散値を適用した場合に取りうる2γxTzの値域(区間)に含まれるサンプリングデータの集合に対して、図7(B)に示すように、最小二乗法によってフィッティングを行って、残差の二乗和を最小とするような二次多項式関数に近似するように上記(6)式の係数a,c,qを決定して、パラメータγの各離散値に対する二次多項式関数を得る。なお、上記図7(B)では、γ=1とした場合に取りうる指数部分の値の区間でのフィッティングの様子を示している。 In addition, each is approximated to a quadratic polynomial function within a range that can be taken when each discrete value is applied to the parameter γ of the RBF kernel. As shown in FIG. 7B, fitting is performed by a least square method to a set of sampling data included in the range (section) of 2γx T z that can be obtained when each discrete value of γ is applied, The coefficients a, c, q in the above equation (6) are determined so as to approximate a quadratic polynomial function that minimizes the sum of squares of the residuals, and a quadratic polynomial function for each discrete value of the parameter γ is obtained. . Note that FIG. 7B shows a state of fitting in the section of the exponent value that can be taken when γ = 1.
SVM学習部24は、第3の実施の形態と同様に、γ、αi、bを学習して、SVM分類式を決定する。
As in the third embodiment, the
次に、第5の実施の形態に係るSVMモデル学習処理ルーチンについて図8を用いて説明する。なお、第1の実施の形態及び第3の実施の形態と同様の処理については、同一符号を付して詳細な説明を省略する。 Next, an SVM model learning process routine according to the fifth embodiment will be described with reference to FIG. In addition, about the process similar to 1st Embodiment and 3rd Embodiment, the same code | symbol is attached | subjected and detailed description is abbreviate | omitted.
まず、ステップ102において、訓練データを読み込み、ステップ500において、上記ステップ102で読み込んだ訓練データの特徴ベクトル間の内積値を各々演算して、内積値のヒストグラムを算出し、算出した内積値のヒストグラムから指数部分のヒストグラムを生成する。
First, in
そして、ステップ502において、RBFカーネルの指数関数を用いて、上記ステップ500で生成された指数部分のヒストグラムに応じて、複数のサンプリングデータを生成し、ステップ302において、パラメータγの各離散値に対して、対応する範囲のサンプリングデータに基づいて、指数関数で表わされるRBFカーネルを二次多項式関数で各々近似する。
In
そして、ステップ304において、訓練データを、上記ステップ302でγの離散値毎にRBFカーネルを近似した二次多項式関数に適用して学習することにより、RBFカーネルのパラメータγ及びSVM分類式の係数を決定し、SVM分類式を得る。
In
次のステップ106では、上記ステップ304で得られたSVM分類式を数式展開することにより、上記(6)式で表される数式に変換して、ステップ108において、SVMモデル記憶部28に、変換したSVM分類式を記憶して、SVMモデル学習処理ルーチンを終了する。
In the
また、撮像装置12によって所定領域の画像が撮像されると、コンピュータ14において、第1の実施の形態と同様に、顔画像分類処理ルーチンが実行される。
Further, when an image of a predetermined area is picked up by the
このように、二次関数に近似したRBFカーネルに基づくパラメータの少ないSVM分類式を用いて、テストデータを分類することにより、少ないメモリ量で、かつ、短い計算時間でデータを分類することができる。 In this way, by classifying test data using the SVM classification formula having a small number of parameters based on the RBF kernel approximated to a quadratic function, the data can be classified with a small amount of memory and a short calculation time. .
また、経験分布に応じたサンプリングデータに対するフィッティングにより、RBFカーネルを、二次関数で精度良く近似することができる。 In addition, the RBF kernel can be approximated with a quadratic function with high accuracy by fitting the sampling data according to the experience distribution.
次に、第6の実施の形態について説明する。なお、第6の実施の形態に係る画像分類装置の構成は、第1の実施の形態と同様の構成となるため、同一符号を付して説明を省略する。 Next, a sixth embodiment will be described. Note that the configuration of the image classification apparatus according to the sixth embodiment is the same as that of the first embodiment, and thus the same reference numerals are given and description thereof is omitted.
第6の実施の形態では、RBFカーネルを3次多項式関数に近似している点が第5の実施の形態と主に異なっている。 The sixth embodiment is mainly different from the fifth embodiment in that the RBF kernel is approximated to a cubic polynomial function.
第6の実施の形態に係る画像分類装置では、カーネル関数近似部20によって、RBFカーネルを、以下に説明するように、上記(7)式で表される三次多項式関数で近似する。
In the image classification device according to the sixth embodiment, the kernel
まず、訓練データから内積値xTzの経験分布(ヒストグラム)を算出し、算出されたヒストグラムから、指数部分2γxTzの値の経験分布(ヒストグラム)を求める。そして、RBFカーネルの指数部分2γxTzの値域において、上記(2)式の第二項の指数関数から、指数部分2γxTzの値の経験分布に応じて、複数のサンプリングデータを生成し、サンプリングデータの集合を生成する。 First, the empirical distribution (histogram) of the inner product value x T z is calculated from the training data, and the empirical distribution (histogram) of the value of the exponent part 2γx T z is obtained from the calculated histogram. Then, in the range of the exponent part 2γx T z of the RBF kernel, a plurality of sampling data is generated according to the empirical distribution of the value of the exponent part 2γx T z from the exponent function of the second term of the above equation (2). Generate a collection of sampling data.
また、RBFカーネルのパラメータγにそれぞれの離散値を適用した場合に取りうる範囲で、三次多項式関数に各々近似する。γの各離散値を適用した場合に取りうる2γxTzの値域(区間)に含まれるサンプリングデータの集合に対して、最小二乗法によってフィッティングを行って、残差の二乗和を最小とするような三次多項式関数に近似するように上記(7)式の係数a,c,q,hを決定して、パラメータγの各離散値に対する三次多項式関数を得る。 In addition, each is approximated to a cubic polynomial function in a range that can be taken when each discrete value is applied to the parameter γ of the RBF kernel. By fitting the set of sampling data included in the range (section) of 2γx T z that can be obtained when each discrete value of γ is applied, fitting is performed by the method of least squares so as to minimize the sum of squares of the residuals. The coefficients a, c, q, and h in the above equation (7) are determined so as to approximate a cubic polynomial function, and a cubic polynomial function for each discrete value of the parameter γ is obtained.
SVM学習部24は、第3の実施の形態と同様に、γ、αi、bを学習して、SVM分類式を決定する。
As in the third embodiment, the
なお、第6の実施の形態に係る画像分類装置の他の構成及び作用については、第5の実施の形態と同様であるため、説明を省略する。 Note that other configurations and operations of the image classification device according to the sixth embodiment are the same as those of the fifth embodiment, and thus description thereof is omitted.
このように、三次関数に近似したRBFカーネルに基づくパラメータの少ないSVM分類式を用いて、テストデータを分類することにより、少ないメモリ量で、かつ、短い計算時間でデータを分類することができる。 In this way, by classifying test data using the SVM classification formula having a small number of parameters based on the RBF kernel approximated to a cubic function, the data can be classified with a small memory amount and a short calculation time.
また、経験分布に応じたサンプリングデータに対するフィッティングにより、RBFカーネルを、三次関数で精度良く近似することができる。 In addition, the RBF kernel can be approximated with a cubic function with high accuracy by fitting the sampling data according to the experience distribution.
次に、特徴量の次元数とサポートベクトルの数とを変化させた場合の、上記の実施の形態に係る近似したRBFカーネルを用いたSVMによる分類と、従来の厳密なRBFカーネルを用いたSVMによる分類とにおけるメモリ量及び計算時間を比較した結果について説明する。 Next, when the dimension number of the feature quantity and the number of support vectors are changed, classification by SVM using the approximate RBF kernel according to the above embodiment, and SVM using the conventional strict RBF kernel The result of comparing the amount of memory and the calculation time in the classification according to will be described.
図9に示すように、厳密なRBFカーネルを用いたSVMによる分類におけるメモリ量及び計算時間に比べて、上記の実施の形態で説明した、二次多項式関数又は三次多項式関数で近似したRBFカーネルを用いたSVMによる分類では、計算時間とメモリ量とが低減されることがわかる。 As shown in FIG. 9, the RBF kernel approximated by the second-order polynomial function or the third-order polynomial function described in the above embodiment is compared with the memory amount and the calculation time in the classification by the SVM using the strict RBF kernel. It can be seen that the calculation time and the amount of memory are reduced by the classification by the used SVM.
また、歩行者識別実験の結果について説明する。撮像画像から抽出された336次元の画像特徴量からなる特徴ベクトルをテストデータとし、SVM分類器を利用して画像が歩行者を表わしているかどうかを分類する。上記の実施の形態で説明したように、RBFカーネルを二次多項式関数で近似したSVMによる分類を行った。また、比較例として、元の厳密なRBFカーネル(サポートベクトルの数=6685)を用いたSVMによる分類を行った。 Moreover, the result of a pedestrian identification experiment is demonstrated. A feature vector made up of 336-dimensional image features extracted from the captured image is used as test data, and an SVM classifier is used to classify whether the image represents a pedestrian. As described in the above embodiment, the classification by SVM in which the RBF kernel is approximated by a quadratic polynomial function is performed. As a comparative example, classification by SVM using the original strict RBF kernel (number of support vectors = 6685) was performed.
図10に示すように、RBFカーネルを二次多項式関数で近似した場合には、元の厳密なRBFカーネルを用いた場合に比べて、計算時間を30倍以上削減でき、メモリ量を約40倍削減することができた。また、RBFカーネルを二次多項式関数で近似した場合には、厳密なRBFカーネルを用いた場合に近い分類精度が得られた。 As shown in FIG. 10, when the RBF kernel is approximated by a quadratic polynomial function, the calculation time can be reduced by 30 times or more and the amount of memory is about 40 times compared to the case where the original exact RBF kernel is used. We were able to reduce it. Further, when the RBF kernel was approximated by a quadratic polynomial function, a classification accuracy close to that obtained when the strict RBF kernel was used was obtained.
上記の実施の形態では、撮像画像が顔画像であるか否かを分類する場合を例に説明したが、これに限定されるものではなく、他のテストデータを他の分類に分けるデータ分類装置に本発明を適用してもよい。 In the above embodiment, the case where the captured image is classified as a face image has been described as an example. However, the present invention is not limited to this, and the data classification apparatus divides other test data into other classifications. The present invention may be applied to.
また、本発明のプログラムを記憶媒体に格納して提供するようにしてもよい。 Further, the program of the present invention may be provided by being stored in a storage medium.
10 画像分類装置
14 コンピュータ
20 カーネル関数近似部
22 訓練データ記憶部
24 SVM学習部
26 SVMモデル変換部
28 SVMモデル記憶部
32 特徴ベクトル抽出部
34 SVM分類部
DESCRIPTION OF
Claims (12)
指数関数で表わされるカーネル関数を近似した以下の式で表される二次関数k(x、z)と、訓練データとして予め用意された複数の特徴ベクトルとに基づいて学習することにより得られた、以下の式で表されるSVM分類式f(x)を用いて、テストデータとして入力された特徴ベクトルを分類する手段
として機能させるためのプログラム。
Obtained by learning based on a quadratic function k (x, z) represented by the following equation that approximates a kernel function represented by an exponential function and a plurality of feature vectors prepared in advance as training data A program for functioning as a means for classifying feature vectors input as test data using the SVM classification formula f (x) represented by the following formula.
指数関数で表わされるカーネル関数を近似した以下の式で表される三次関数k(x、z)と、訓練データとして予め用意された複数の特徴ベクトルとに基づいて学習することにより得られた、以下の式で表されるSVM分類式f(x)を用いて、テストデータとして入力された特徴ベクトルを分類する手段
として機能させるためのプログラム。
Obtained by learning based on a cubic function k (x, z) represented by the following expression that approximates a kernel function represented by an exponential function, and a plurality of feature vectors prepared in advance as training data, A program for functioning as a means for classifying feature vectors input as test data using the SVM classification formula f (x) represented by the following formula.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2008257508A JP2010086466A (en) | 2008-10-02 | 2008-10-02 | Data classification device and program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2008257508A JP2010086466A (en) | 2008-10-02 | 2008-10-02 | Data classification device and program |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2010086466A true JP2010086466A (en) | 2010-04-15 |
Family
ID=42250319
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2008257508A Pending JP2010086466A (en) | 2008-10-02 | 2008-10-02 | Data classification device and program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2010086466A (en) |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2014203136A (en) * | 2013-04-01 | 2014-10-27 | キヤノン株式会社 | Information processing apparatus, information processing method, and program |
WO2017060894A1 (en) * | 2015-10-06 | 2017-04-13 | Agent Video Intelligence Ltd. | Method and system for classifying objects from a stream of images |
WO2018150445A1 (en) * | 2017-02-14 | 2018-08-23 | 日本電気株式会社 | Model generation system, model generation method, and model generation program |
CN108536730A (en) * | 2018-02-27 | 2018-09-14 | 南京邮电大学 | A kind of mixing Fourier kernel function support vector machines file classification method |
CN110297933A (en) * | 2019-07-01 | 2019-10-01 | 山东浪潮人工智能研究院有限公司 | A kind of theme label recommended method and tool based on deep learning |
-
2008
- 2008-10-02 JP JP2008257508A patent/JP2010086466A/en active Pending
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2014203136A (en) * | 2013-04-01 | 2014-10-27 | キヤノン株式会社 | Information processing apparatus, information processing method, and program |
WO2017060894A1 (en) * | 2015-10-06 | 2017-04-13 | Agent Video Intelligence Ltd. | Method and system for classifying objects from a stream of images |
WO2018150445A1 (en) * | 2017-02-14 | 2018-08-23 | 日本電気株式会社 | Model generation system, model generation method, and model generation program |
US11656650B2 (en) | 2017-02-14 | 2023-05-23 | Nec Corporation | Model generation system, model generation method, and model generation program |
CN108536730A (en) * | 2018-02-27 | 2018-09-14 | 南京邮电大学 | A kind of mixing Fourier kernel function support vector machines file classification method |
CN108536730B (en) * | 2018-02-27 | 2020-04-07 | 南京邮电大学 | Text classification method for hybrid Fourier kernel function support vector machine |
CN110297933A (en) * | 2019-07-01 | 2019-10-01 | 山东浪潮人工智能研究院有限公司 | A kind of theme label recommended method and tool based on deep learning |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
EP3475881B1 (en) | System and method for active learning | |
JP5373536B2 (en) | Modeling an image as a mixture of multiple image models | |
US8532399B2 (en) | Large scale image classification | |
JP4877374B2 (en) | Image processing apparatus and program | |
JP2009514110A5 (en) | ||
JP6943291B2 (en) | Learning device, learning method, and program | |
JP2008538041A (en) | Partially learned learning machine for data classification based on local neighborhood Laplace eigenmap | |
CN101937513A (en) | Messaging device, information processing method and program | |
CN107516102B (en) | Method, device and system for classifying image data and establishing classification model | |
CN110533046B (en) | Image instance segmentation method and device, computer readable storage medium and electronic equipment | |
JP6937508B2 (en) | Image processing system, evaluation model construction method, image processing method and program | |
WO2021059388A1 (en) | Learning device, image processing device, learning method, and learning program | |
US20170091613A1 (en) | Computational device, computational method, and computer program product | |
TW200529093A (en) | Face image detection method, face image detection system, and face image detection program | |
JP2010086466A (en) | Data classification device and program | |
US20120052473A1 (en) | Learning apparatus, learning method, and computer program product | |
CN116670687A (en) | Method and system for adapting trained object detection models to domain offsets | |
CN112541394A (en) | Black eye and rhinitis identification method, system and computer medium | |
JP6927410B2 (en) | Image classification system, image classification method and image classification program | |
WO2020179378A1 (en) | Information processing system, information processing method, and recording medium | |
JP4383990B2 (en) | Parameter estimation apparatus, parameter estimation method, parameter estimation program, and parameter estimation program recording medium | |
CN116957051A (en) | Remote sensing image weak supervision target detection method for optimizing feature extraction | |
CN112613373A (en) | Image recognition method and device, electronic equipment and computer readable storage medium | |
JP5445062B2 (en) | Information processing apparatus and information processing program | |
EP3166021A1 (en) | Method and apparatus for image search using sparsifying analysis and synthesis operators |