TW201828156A - Image identification method, measurement learning method, and image source identification method and device capable of effectively dealing with the problem of asymmetric object image identification so as to possess better robustness and higher accuracy - Google Patents

Image identification method, measurement learning method, and image source identification method and device capable of effectively dealing with the problem of asymmetric object image identification so as to possess better robustness and higher accuracy Download PDF

Info

Publication number
TW201828156A
TW201828156A TW106101919A TW106101919A TW201828156A TW 201828156 A TW201828156 A TW 201828156A TW 106101919 A TW106101919 A TW 106101919A TW 106101919 A TW106101919 A TW 106101919A TW 201828156 A TW201828156 A TW 201828156A
Authority
TW
Taiwan
Prior art keywords
image
model
source
feature
similarity
Prior art date
Application number
TW106101919A
Other languages
Chinese (zh)
Other versions
TWI731919B (en
Inventor
易東
劉榮
張帆
張倫
楚汝峰
Original Assignee
阿里巴巴集團服務有限公司
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by 阿里巴巴集團服務有限公司 filed Critical 阿里巴巴集團服務有限公司
Priority to TW106101919A priority Critical patent/TWI731919B/en
Publication of TW201828156A publication Critical patent/TW201828156A/en
Application granted granted Critical
Publication of TWI731919B publication Critical patent/TWI731919B/en

Links

Landscapes

  • Image Analysis (AREA)

Abstract

The present invention discloses an image identification method and device, a measurement learning method and device, and an image source identification method and device. The image identification method includes: acquiring an object image to be identified; extracting an object feature of the object image to be identified; and selecting a similarity measurement model corresponding to a source category of the object image to be identified from a set of pre-trained measurement models, and calculating the similarity between the object feature and a registered image object feature for use as a basis to output an object identification result, wherein the set of measurement models includes at least one similarity measurement model, and different similarity measurement models correspond to different source categories of the object image, respectively. By using the method of the present invention to proceed with image identification, the problem of asymmetric object image identification can be effectively dealt with, so as to have better robustness and higher accuracy for the identification of the object images to be identified from various sources.

Description

圖像識別方法、度量學習方法、圖像來源識別方法及裝置    Image recognition method, metric learning method, image source recognition method and device   

本發明涉及模式識別技術,具體涉及一種圖像識別方法及裝置。本發明同時提供一種度量學習方法及裝置,以及圖像來源識別方法及裝置。 The present invention relates to pattern recognition technology, and in particular, to an image recognition method and device. The invention also provides a metric learning method and device, and an image source recognition method and device.

人臉識別是近年來模式識別、影像處理、機器視覺、神經網路以及認知科學等領域研究的熱點課題之一。人臉識別通常是指,從人臉圖像中提取有鑒別能力的視覺特徵,並用其確定人臉身份的電腦技術,具體可以分為兩類:人臉鑒別和人臉驗證。人臉鑒別是指鑒別某張人臉圖像的身份,即確定某一張人臉圖像是哪個人的圖像;人臉驗證是指判斷一張人臉圖像的身份是否為聲稱的某個人。 Face recognition is one of the hot topics in the fields of pattern recognition, image processing, machine vision, neural network, and cognitive science in recent years. Face recognition usually refers to the extraction of visual features from a face image and the use of computer technology to determine the identity of the face, which can be specifically divided into two categories: face recognition and face verification. Face identification refers to identifying the identity of a face image, that is, determining which person's face image is; face verification refers to determining whether the identity of a face image is the claimed one. personal.

現有的人臉識別技術通常包含兩個主要研究方向:特徵學習和度量學習。特徵學習的目的是將人臉圖像轉化更可分的、更具鑒別能力的形式;而度量學習則用於從訓練樣本中學習評估樣本間距離或相似度的度量模型或度量函數,其中,聯合貝葉斯臉是目前應用比較普及的度量學習 方法,是一種基於高斯假設的概率判別分析推導出的度量學習方法。 The existing face recognition technology usually includes two main research directions: feature learning and metric learning. The purpose of feature learning is to transform the face image into a more separable and discriminative form; while metric learning is used to learn from a training sample a metric model or metric function that evaluates the distance or similarity between samples, where, Joint Bayesian face is a popular metric learning method currently applied. It is a metric learning method derived from probability discriminant analysis based on Gaussian hypothesis.

人臉識別的主要過程包括:訓練過程和識別過程。訓練過程是指利用人臉圖像訓練集求解相似度度量模型的參數,該過程也稱為度量學習過程,所述人臉圖像訓練集由人臉圖像和身份標籤(標識哪些圖像來自同一人,哪些圖像來自不同人)組成;識別過程則是指,首先採集供查詢的人臉圖像註冊集,註冊集通常由人臉圖像、身份標籤和身份資訊組成,其來源一般較為單一,品質較好,然後將待識別人臉圖像的特徵與所述註冊集中樣本特徵進行比對,利用訓練好的相似度度量模型計算待識別人臉圖像特徵與註冊圖像特徵的相似度,從而確定待識別人臉圖像對應的身份。 The main process of face recognition includes: training process and recognition process. The training process refers to using the face image training set to solve the parameters of the similarity measurement model. This process is also called the metric learning process. The face image training set consists of a face image and an identity tag (identifying which images come from The same person, which images come from different people); the recognition process refers to the first collection of face image registration sets for query, the registration set usually consists of face images, identity tags and identity information, and its source is generally relatively Single, good quality, then compare the features of the face image to be identified with the sample features in the registration set, and use the trained similarity measurement model to calculate the similarity between the features of the face image to be identified and the features of the registered image Degree to determine the identity corresponding to the face image to be identified.

由於聯合貝葉斯臉的基本假設為:參與比對的人臉樣本x和y服從同一高斯分佈,而在具體應用中,註冊集中的圖像來源通常是可控的,待識別人臉圖像的來源則較為複雜,品質參差不齊,如:視頻截圖、掃描圖片、大頭貼等,即:註冊集中的圖像和待識別圖像的來源可能不同,導致參與比對的人臉樣本可能並不滿足服從同一高斯分佈的要求(也稱為非對稱人臉),在這種情況下,現有的人臉識別技術通常不能很好地處理,導致識別準確率較低,無法滿足應用的需求。在針對其他客體圖像的識別應用中,也同樣存在因為圖像來源不同(即非對稱客體圖像)而導致的上述問題。 The basic assumption of the joint Bayesian face is that the face samples x and y participating in the comparison follow the same Gaussian distribution, and in specific applications, the image source in the registration set is usually controllable, and the face image to be identified The source of the image is more complicated and the quality is uneven, such as: video screenshots, scanned images, posters, etc., that is, the source of the images in the registration set and the images to be identified may be different, which may cause the face samples participating in the comparison to be different. Does not meet the requirements of obeying the same Gaussian distribution (also known as asymmetrical faces). In this case, the existing face recognition technology usually cannot handle well, resulting in a low recognition accuracy and unable to meet the needs of the application. In the recognition application for other object images, the above problems caused by different image sources (ie, asymmetric object images) also exist.

本發明實施例提供一種圖像識別方法和裝置,以解決現有的圖像識別技術針對來源多變的客體圖像識別準確率低的問題。本發明實施例還提供一種度量學習方法和裝置,以及一種圖像來源識別方法和裝置。 Embodiments of the present invention provide an image recognition method and device, so as to solve the problem that the existing image recognition technology has a low accuracy rate for object image recognition with variable sources. Embodiments of the present invention also provide a metric learning method and device, and an image source recognition method and device.

本發明提供一種圖像識別方法,包括:獲取待識別客體圖像;提取所述待識別客體圖像的客體特徵;從預先訓練好的度量模型集合中選擇與所述待識別客體圖像的來源類別相對應的相似度度量模型,並計算所述客體特徵與註冊圖像客體特徵的相似度,作為輸出客體識別結果的依據;其中,所述度量模型集合包含至少一個相似度度量模型,不同的相似度度量模型分別與客體圖像的不同來源類別相對應。 The invention provides an image recognition method, which includes: obtaining an object image to be identified; extracting the object characteristics of the object image to be identified; and selecting a source of the object image to be identified from a pre-trained metric model set. A similarity measurement model corresponding to the category, and calculating the similarity between the object feature and the registered image object feature as a basis for outputting the object recognition result; wherein the set of measurement models includes at least one similarity measurement model, and different The similarity measurement models correspond to different source categories of object images.

可選的,所述度量模型集合中對應不同來源類別的各相似度度量模型,是利用屬於預設來源類別的基準客體圖像訓練集、以及對應不同來源類別的比對客體圖像訓練集分別訓練得到的。 Optionally, the similarity measurement models corresponding to different source categories in the metric model set are a reference object image training set belonging to a preset source category and a comparison object image training set corresponding to a different source category, respectively. Get it.

可選的,所述基準客體圖像訓練集中的客體圖像與所述註冊圖像屬於相同的來源類別。 Optionally, the object image in the reference object image training set and the registered image belong to the same source category.

可選的,在所述從預先訓練好的度量模型集合中選擇與所述待識別客體圖像的來源類別相對應的相似度度量模 型的步驟之前,執行下述操作:以所述客體特徵為輸入,利用預先訓練好的客體圖像來源分類模型,確定所述待識別客體圖像的來源類別。 Optionally, before the step of selecting a similarity metric model corresponding to the source category of the object image to be identified from the pre-trained metric model set, the following operation is performed: taking the object characteristics as The input uses a pre-trained object image source classification model to determine the source category of the object image to be identified.

可選的,所述客體圖像來源分類模型是採用如下演算法訓練得到的多類分類模型:Softmax演算法、多類SVM演算法、或者隨機森林演算法。 Optionally, the object image source classification model is a multi-class classification model trained by using the following algorithm: Softmax algorithm, multi-class SVM algorithm, or random forest algorithm.

可選的,所述相似度度量模型包括:在參與比對的客體特徵服從各自高斯分佈的假設下、建立的非對稱度量模型。 Optionally, the similarity metric model includes an asymmetric metric model established under the assumption that the object features participating in the comparison obey the respective Gaussian distributions.

可選的,所述非對稱度量模型包括:基於聯合貝葉斯臉的非對稱度量模型;對應於特定來源類別的上述非對稱度量模型是採用如下步驟訓練得到的:提取屬於預設來源類別的基準客體圖像訓練集中各圖像的客體特徵,作為基準特徵樣本集;提取屬於所述特定來源類別的比對客體圖像訓練集中各圖像的客體特徵,作為比對特徵樣本集;在參與比對的客體特徵服從各自高斯分佈的假設下,建立包含參數的非對稱度量模型;根據上述兩類特徵樣本集中的樣本以及標識樣本是否屬於同一客體的身份標籤,求解所述非對稱度量模型中的參數,完成所述模型的訓練。 Optionally, the asymmetric metric model includes: an asymmetric metric model based on a joint Bayesian face; the asymmetric metric model corresponding to a specific source category is trained by using the following steps: The object features of each image in the reference object image training set are used as the reference feature sample set; the object features of each image in the comparison object image training set belonging to the specific source category are extracted as the comparison feature sample set; Under the assumption that the object characteristics of the comparison obey their respective Gaussian distributions, an asymmetric metric model containing parameters is established; based on the samples in the two types of feature sample sets and the identity tags identifying whether the samples belong to the same object, the asymmetric metric model is solved Parameters to complete the training of the model.

可選的,所述對應於特定來源類別的非對稱度量模型 如下所示: A=(S xx +T xx )-1-E B=(S yy +T yy )-1-F G=-(S xx +T xx -S xy (S yy +T yy )-1 S yx )-1 S xy (S yy +T yy )-1 E=(S xx +T xx -S xy (S yy +T yy )-1 S yx )-1 F=(S yy +T yy -S yx (S xx +T xx )-1 S xy )-1 Optionally, the asymmetric measurement model corresponding to a specific source category is as follows: A = ( S xx + T xx ) -1 - EB = ( S yy + T yy ) -1 - FG =-( S xx + T xx - S xy ( S yy + T yy ) -1 S yx ) -1 S xy ( S yy + T yy ) -1 E = ( S xx + T xx - S xy ( S yy + T yy ) -1 S yx ) -1 F = ( S yy + T yy - S yx ( S xx + T xx ) -1 S xy ) -1

其中,假設基準特徵樣本集X中的樣本x=μ x +ε x μ x ε x 服從均值為0,協方差矩陣為Sxx和Txx的高斯分佈,比對特徵樣本集Y中的樣本y=μ y +ε y μ y ε y 服從均值為0,協方差矩陣為Syy和Tyy的高斯分佈,Sxy和Syx是X和Y之間的互協方差矩陣;r(x,y)為基於類內/類間對數似然比計算的相似度;所述求解所述非對稱度量模型中的參數包括:求解Sxx、Txx、Syy、Tyy、Sxy、和SyxWherein, assuming that the reference feature sample set X in a sample x = μ x + ε x, μ x , and ε x with mean 0 and covariance matrix S xx and T xx of the Gaussian distribution, alignment feature sample set Y is Sample y = μ y + ε y , μ y and ε y obey the mean value 0, the covariance matrix is a Gaussian distribution of S yy and T yy , and S xy and S yx are cross-covariance matrices between X and Y; r (x, y) is the similarity calculated based on the intra-class / inter-class log-likelihood ratio; the parameters in the solving the asymmetric metric model include: solving S xx , T xx , S yy , T yy , S xy , And S yx .

可選的,所述求解所述非對稱度量模型中的參數包括:利用散度矩陣估算所述模型中的參數;或者,採用期望最大化演算法反覆運算求解所述模型中的參數。 Optionally, the solving the parameters in the asymmetric metric model includes: using a divergence matrix to estimate the parameters in the model; or using an expectation maximization algorithm to repeatedly calculate the parameters in the model.

可選的,所述計算所述客體特徵與註冊圖像客體特徵的相似度,包括: 計算所述客體特徵與對應特定身份的註冊圖像客體特徵的相似度;在上述計算相似度的步驟後,執行下述操作:判斷所述相似度是否大於預先設定的閾值;若是,判定所述待識別客體圖像與所述對應特定身份的註冊圖像屬於同一客體,並將所述判定作為客體識別結果輸出。 Optionally, calculating the similarity between the object feature and the registered image object feature includes: calculating the similarity between the object feature and the registered image object feature corresponding to a specific identity; after the step of calculating the similarity, , Perform the following operation: determine whether the similarity is greater than a preset threshold; if so, determine that the object image to be identified belongs to the same object as the registered image corresponding to the specific identity, and use the determination as object recognition The result is output.

可選的,所述計算所述客體特徵與註冊圖像客體特徵的相似度,包括:計算所述客體特徵與指定範圍內的註冊圖像客體特徵的相似度;在上述計算相似度的步驟後,執行下述操作:判斷計算所得相似度中的最大值是否大於預先設定的閾值;若是,判定所述待識別客體圖像在所述指定範圍內的註冊圖像中匹配成功,並將所述最大值對應的註冊圖像的相關身份資訊作為客體識別結果輸出。 Optionally, calculating the similarity between the object feature and the registered image object feature includes: calculating the similarity between the object feature and the registered image object feature within a specified range; after the step of calculating the similarity, , Perform the following operation: determine whether the maximum value of the calculated similarity is greater than a preset threshold; if yes, determine that the object image to be identified is successfully matched in the registered image within the specified range, and The related identity information of the registered image corresponding to the maximum value is output as the object recognition result.

可選的,所述提取所述待識別客體圖像的客體特徵,包括:採用局部二值模式演算法提取所述客體特徵;或者,採用Gabor小波變換演算法提取所述客體特徵;或者,採用深度卷積網路提取所述客體特徵。 Optionally, extracting the object features of the object image to be identified includes: using a local binary mode algorithm to extract the object features; or using a Gabor wavelet transform algorithm to extract the object features; or A deep convolutional network extracts the object features.

可選的,所述待識別客體圖像包括:待識別人臉圖 像;所述客體特徵包括:人臉特徵。 Optionally, the object image to be identified includes: a face image to be identified; and the object characteristics include: face characteristics.

可選的,所述來源類別包括:證件照、生活照、視頻截圖、掃描圖像、翻拍圖像、或者監控畫面。 Optionally, the source categories include: ID photos, life photos, video screenshots, scanned images, remake images, or monitoring pictures.

相應的,本發明還提供一種圖像識別裝置,包括:圖像獲取單元,用於獲取待識別客體圖像;特徵提取單元,用於提取所述待識別客體圖像的客體特徵;相似度計算單元,用於從預先訓練好的度量模型集合中選擇與所述待識別客體圖像的來源類別相對應的相似度度量模型,並計算所述客體特徵與註冊圖像客體特徵的相似度,作為輸出客體識別結果的依據;其中,所述相似度計算單元包括:度量模型選擇子單元,用於從預先訓練好的度量模型集合中選擇與所述待識別客體圖像的來源類別相對應的相似度度量模型;計算執行子單元,用於利用所述度量模型選擇子單元所選的相似度度量模型計算所述客體特徵與註冊圖像客體特徵的相似度,作為輸出客體識別結果的依據。 Correspondingly, the present invention also provides an image recognition device, including: an image acquisition unit for acquiring an object image to be identified; a feature extraction unit for extracting object characteristics of the object image to be identified; similarity calculation A unit configured to select a similarity measurement model corresponding to the source category of the object image to be identified from a pre-trained measurement model set, and calculate the similarity between the object feature and the registered image object feature, as The basis for outputting the object recognition result; wherein the similarity calculation unit includes: a metric model selection sub-unit for selecting a similarity corresponding to the source category of the object image to be identified from a pre-trained metric model set Degree measurement model; a calculation execution subunit, configured to use the similarity measurement model selected by the measurement model selection subunit to calculate the similarity between the object feature and the registered image object feature as a basis for outputting the object recognition result.

可選的,所述裝置包括:度量模型訓練單元,用於利用屬於預設來源類別的基準客體圖像訓練集、以及對應不同來源類別的比對客體圖像訓練集,分別訓練得到所述度量模型集合中對應不同來源類別的各相似度度量模型。 Optionally, the device includes: a metric model training unit configured to use the reference object image training set belonging to a preset source category and a comparison object image training set corresponding to a different source category to separately train to obtain the metric The similarity measurement models of different source categories in the model set.

可選的,所述裝置包括:來源類別確定單元,用於在觸發所述相似度計算單元工作之前,以所述客體特徵為輸入,利用預先訓練好的客體圖像來源分類模型,確定所述待識別客體圖像的來源類別。 Optionally, the device includes: a source category determination unit, configured to determine, before triggering the work of the similarity calculation unit, using the object feature as an input and using a pre-trained object image source classification model to determine the The source category of the object image to be identified.

可選的,所述裝置包括:來源分類模型訓練單元,用於在觸發所述來源類別確定單元工作之前,採用如下演算法訓練訓練所述客體圖像來源分類模型:Softmax演算法、多類SVM演算法、或者隨機森林演算法。 Optionally, the device includes: a source classification model training unit for training the object image source classification model by using the following algorithm training before triggering the source category determination unit to work: Softmax algorithm, multi-class SVM Algorithm, or random forest algorithm.

可選的,所述裝置包括:度量模型訓練單元,用於訓練所述度量模型集合中的各相似度度量模型,所述相似度度量模型包括:在參與比對的客體特徵服從各自高斯分佈的假設下、基於聯合貝葉斯臉建立的非對稱度量模型;所述度量模型訓練單元藉由如下子單元訓練對應於特定來源類別的上述非對稱度量模型:基準樣本提取子單元,用於提取屬於預設來源類別的基準客體圖像訓練集中各圖像的客體特徵,作為基準特徵樣本集;比對樣本提取子單元,用於提取屬於所述特定來源類別的比對客體圖像訓練集中各圖像的客體特徵,作為比對特徵樣本集;度量模型建立子單元,用於在參與比對的客體特徵服 從各自高斯分佈的假設下,建立包含參數的非對稱度量模型;模型參數求解子單元,用於根據上述兩類特徵樣本集中的樣本以及標識樣本是否屬於同一客體的身份標籤,求解所述非對稱度量模型中的參數,完成所述模型的訓練。 Optionally, the device includes: a metric model training unit, configured to train each similarity metric model in the metric model set, the similarity metric model includes: Under the assumption, an asymmetric metric model established based on the joint Bayesian face; the metric model training unit trains the above-mentioned asymmetric metric model corresponding to a specific source category by the following subunits: a reference sample extraction subunit for extracting belonging to The object features of each image in the reference object image training set of the preset source category are used as the reference feature sample set; the comparison sample extraction subunit is used to extract each image in the comparison object image training set belonging to the specific source category. The object features of the image are used as the comparison feature sample set; the metric model establishment subunit is used to establish an asymmetric metric model containing parameters under the assumption that the object features participating in the comparison obey their respective Gaussian distributions; the model parameter solution subunit, Used to identify the samples in the two types of feature sample sets and identify whether the samples belong to the same object To solve the parameters in the asymmetric metric model and complete the training of the model.

可選的,所述模型參數求解子單元具體用於,利用散度矩陣估算所述模型中的參數,或者,採用期望最大化演算法反覆運算求解所述模型中的參數。 Optionally, the model parameter solving subunit is specifically configured to estimate a parameter in the model by using a divergence matrix, or to repeatedly calculate the parameter in the model by using an expectation maximization algorithm.

可選的,所述計算執行子單元具體用於,計算所述客體特徵與對應特定身份的註冊圖像客體特徵的相似度;所述裝置還包括:第一閾值比對單元,用於判斷所述相似度是否大於預先設定的閾值;第一識別結果輸出單元,用於當所述第一閾值比對單元的輸出為是時,判定所述待識別客體圖像與所述對應特定身份的註冊圖像屬於同一客體,並將所述判定作為客體識別結果輸出。 Optionally, the calculation execution subunit is specifically configured to calculate a similarity between the object feature and a registered image object feature corresponding to a specific identity; the device further includes: a first threshold comparison unit for determining the Whether the similarity is greater than a preset threshold; a first recognition result output unit, configured to determine, when the output of the first threshold comparison unit is Yes, the registration of the object image to be identified and the corresponding specific identity The images belong to the same object, and the judgment is output as an object recognition result.

可選的,所述計算執行子單元具體用於,計算所述客體特徵與指定範圍內的註冊圖像客體特徵的相似度;所述裝置還包括:第二閾值比對單元,用於判斷計算所得相似度中的最大值是否大於預先設定的閾值;第二識別結果輸出單元,用於當所述第二閾值比對單元的輸出為是時,判定所述待識別客體圖像在所述指定範 圍內的註冊圖像中匹配成功,並將所述最大值對應的註冊圖像的相關身份資訊作為客體識別結果輸出。 Optionally, the calculation execution subunit is specifically configured to calculate a similarity between the object feature and a registered image object feature within a specified range; the device further includes: a second threshold comparison unit for determining a calculation Whether the maximum value of the obtained similarity is greater than a preset threshold; a second recognition result output unit, configured to determine, when the output of the second threshold comparison unit is YES, that the object image to be identified is in the specified The registered images in the range match successfully, and the relevant identity information of the registered image corresponding to the maximum value is output as the object recognition result.

可選的,所述特徵提取單元具體用於,採用局部二值模式演算法提取所述客體特徵、採用Gabor小波變換演算法提取所述客體特徵、或者採用深度卷積網路提取所述客體特徵。 Optionally, the feature extraction unit is specifically configured to use a local binary mode algorithm to extract the object features, a Gabor wavelet transform algorithm to extract the object features, or a deep convolutional network to extract the object features. .

此外,本發明還提供一種度量學習方法,包括:提取屬於同一來源類別的基準客體圖像訓練集中各圖像的客體特徵,作為基準特徵樣本集;提取屬於同一來源類別、但與所述基準客體圖像分屬不同來源類別的比對客體圖像訓練集中各圖像的客體特徵,作為比對特徵樣本集;在參與比對的客體特徵服從各自高斯分佈的假設下,建立包含參數的非對稱度量模型;利用上述兩類特徵樣本集中的樣本,求解所述非對稱度量模型中的參數。 In addition, the present invention also provides a metric learning method, which includes: extracting the object features of each image belonging to the reference object image training set belonging to the same source category as a reference feature sample set; and extracting the same source category but similar to the reference object. The object features of each image in the comparison object image training set of different source categories are used as the comparison feature sample set; under the assumption that the object features participating in the comparison obey their respective Gaussian distributions, an asymmetry containing parameters is established Metric model; using samples in the two types of feature sample sets to solve parameters in the asymmetric metric model.

可選的,所述非對稱度量模型包括:基於聯合貝葉斯臉的非對稱度量模型;所述非對稱度量模型如下所示: A=(S xx +T xx )-1-E B=(S yy +T yy )-1-F G=-(S xx +T xx -S xy (S yy +T yy )-1 S yx )-1 S xy (S yy +T yy )-1 E=(S xx +T xx -S xy (S yy +T yy )-1 S yx )-1 F=(S yy +T yy -S yx (S xx +T xx )-1 S xy )-1 Optionally, the asymmetric metric model includes: an asymmetric metric model based on a joint Bayesian face; the asymmetric metric model is as follows: A = ( S xx + T xx ) -1 - EB = ( S yy + T yy ) -1 - F G =-( S xx + T xx - S xy ( S yy + T yy ) -1 S yx ) - 1 S xy ( S yy + T yy ) -1 E = ( S xx + T xx - S xy ( S yy + T yy ) -1 S yx ) -1 F = ( S yy + T yy - S yx ( S xx + T xx ) -1 S xy ) -1

其中,假設基準特徵樣本集空間X中的樣本x=μ x +ε x μ x ε x 服從均值為0,協方差矩陣為Sxx和Txx的高斯分佈,比對特徵樣本集空間Y中的樣本y=μ y +ε y μ y ε y 服從均值為0,協方差矩陣為Syy和Tyy的高斯分佈,Sxy和Syx是X和Y之間的互協方差矩陣;r(x,y)為基於類內/類間對數似然比計算的相似度;所述求解所述非對稱度量模型中的參數包括:求解Sxx、Txx、Syy、Tyy、Sxy、和SyxAmong them, it is assumed that the samples x in the reference feature sample set space X = μ x + ε x , μ x and ε x obey the mean value 0, the covariance matrix is a Gaussian distribution of S xx and T xx , and the feature sample set space Y is compared. The samples in y = μ y + ε y , μ y and ε y obey the mean value 0, the covariance matrix is a Gaussian distribution of S yy and T yy , and S xy and S yx are cross-covariance matrices between X and Y R (x, y) is the similarity calculated based on the intra-class / inter-class log-likelihood ratio; the parameters in the solution of the asymmetric metric model include: solving S xx , T xx , S yy , T yy , S xy , and S yx .

可選的,所述求解所述非對稱度量模型中的參數包括:利用散度矩陣估算所述模型中的參數;或者,採用期望最大化演算法反覆運算求解所述模型中的參數。 Optionally, the solving the parameters in the asymmetric metric model includes: using a divergence matrix to estimate the parameters in the model; or using an expectation maximization algorithm to repeatedly calculate the parameters in the model.

可選的,所述基準客體圖像以及所述比對客體圖像包括:人臉圖像;所述客體特徵包括:人臉特徵。 Optionally, the reference object image and the comparison object image include: a face image; and the object features include: face features.

相應的,本發明還提供一種度量學習裝置,包括:基準樣本提取單元,用於提取屬於同一來源類別的基準客體圖像訓練集中各圖像的客體特徵,作為基準特徵樣本集;比對樣本提取單元,用於提取屬於同一來源類別、但 與所述基準客體圖像分屬不同來源類別的比對客體圖像訓練集中各圖像的客體特徵,作為比對特徵樣本集;非對稱度量模型建立單元,用於在參與比對的客體特徵服從各自高斯分佈的假設下,建立包含參數的非對稱度量模型;度量模型參數求解單元,用於利用上述兩類特徵樣本集中的樣本,求解所述非對稱度量模型中的參數。 Correspondingly, the present invention also provides a metric learning device, including: a reference sample extraction unit for extracting object features of each image in a reference object image training set belonging to the same source category as a reference feature sample set; comparison sample extraction A unit for extracting object features of each image in a comparison object image training set belonging to the same source category but belonging to a different source category than the reference object image, as a comparison feature sample set; establishment of an asymmetric metric model A unit for establishing an asymmetric metric model containing parameters under the assumption that the object features participating in the comparison obey their respective Gaussian distributions; a metric model parameter solving unit is used to use the samples in the two types of feature sample sets to solve the non-metrics Parameters in a symmetric measurement model.

可選的,所述非對稱度量模型建立單元建立的度量模型包括:基於聯合貝葉斯臉的非對稱度量模型。 Optionally, the measurement model established by the asymmetric measurement model establishing unit includes: an asymmetric measurement model based on a joint Bayesian face.

可選的,所述度量模型參數求解單元具體用於,利用散度矩陣估算所述模型中的參數,或者,採用期望最大化演算法反覆運算求解所述模型中的參數。 Optionally, the metric model parameter solving unit is specifically configured to estimate a parameter in the model using a divergence matrix, or to repeatedly calculate the parameter in the model using an expectation maximization algorithm.

此外,本發明還提供一種圖像來源識別方法,包括:採集屬於不同來源類別的客體圖像集,並從中提取客體特徵組成訓練樣本集合;利用所述訓練樣本集合中的客體特徵樣本及其來源類別,訓練客體圖像來源分類模型;從待分類客體圖像中提取客體特徵;以上述提取的客體特徵為輸入,採用所述客體圖像來源分類模型識別所述待分類客體圖像的來源類別。 In addition, the present invention also provides an image source recognition method, including: collecting object image sets belonging to different source categories, and extracting object features from them to form a training sample set; using the object feature samples in the training sample set and their sources Class to train an object image source classification model; extract object features from the object image to be classified; take the extracted object features as input, and use the object image source classification model to identify the source category of the object image to be classified .

可選的,所述客體圖像來源分類模型是採用如下演算法訓練得到的多類分類模型:Softmax演算法、多類SVM演算法、或者隨機森林演算法。 Optionally, the object image source classification model is a multi-class classification model trained by using the following algorithm: Softmax algorithm, multi-class SVM algorithm, or random forest algorithm.

可選的,所述客體圖像包括:人臉圖像;所述客體特徵包括:人臉特徵。 Optionally, the object image includes: a face image; and the object feature includes: a face feature.

相應的,本發明還提供一種圖像來源識別裝置,包括:訓練樣本採集單元,用於採集屬於不同來源類別的客體圖像集,並從中提取客體特徵組成訓練樣本集合;分類模型訓練單元,用於利用所述訓練樣本集合中的客體特徵樣本及其來源類別,訓練圖像來源分類模型;待分類特徵提取單元,用於從待分類客體圖像中提取客體特徵;來源類別識別單元,用於以所述待分類特徵提取單元提取的客體特徵為輸入,採用所述客體圖像來源分類模型識別所述待分類客體圖像的來源類別。 Correspondingly, the present invention also provides an image source recognition device, including: a training sample acquisition unit for collecting object image sets belonging to different source categories, and extracting object features from them to form a training sample set; a classification model training unit for For training the image source classification model by using the object feature samples in the training sample set and their source categories; a feature classification unit to be classified for extracting object features from the object images to be classified; and a source category identification unit for The object feature extracted by the feature to-be-classified extraction unit is used as an input, and the source image classification model of the object is used to identify the source category of the to-be-classified object image.

可選的,所述客體圖像來源分類模型包括:多類分類模型;所述分類模型訓練單元具體用於,利用Softmax演算法、多類SVM演算法、或者隨機森林演算法訓練所述客體圖像來源分類模型。 Optionally, the object image source classification model includes: a multi-class classification model; the classification model training unit is specifically configured to use Softmax algorithm, multi-class SVM algorithm, or random forest algorithm to train the object map Like source classification model.

與現有技術相比,本發明具有以下優點: Compared with the prior art, the present invention has the following advantages:

本發明提供的圖像識別方法,首先獲取待識別客體圖像,提取所述待識別客體圖像的客體特徵,然後從預先訓練好的度量模型集合中選擇與所述待識別客體圖像的來源類別相對應的相似度度量模型,並計算所述客體特徵與註冊圖像客體特徵的相似度,作為輸出客體識別結果的依 據。採用本方法進行圖像識別,由於沒有採用單一的相似度度量模型,而是選用預先訓練好的與待識別客體圖像的來源類別相對應的相似度度量模型,從而能夠有效處理非對稱客體圖像識別問題,對來源多變的待識別客體圖像的識別具有更好的堅固性和更高的準確率。 The image recognition method provided by the present invention first obtains the object image to be identified, extracts the object features of the object image to be identified, and then selects the source of the object image to be identified from a pre-trained metric model set. A similarity measurement model corresponding to the category, and calculating the similarity between the object feature and the registered image object feature as a basis for outputting the object recognition result. This method is used for image recognition. Since a single similarity measurement model is not used, a pre-trained similarity measurement model corresponding to the source category of the object image to be identified is selected, so that it can effectively handle asymmetric object map Like the recognition problem, the identification of the object image to be identified with variable sources has better robustness and higher accuracy.

本發明提供的度量學習方法,在參與比對的人臉特徵服從各自高斯分佈的假設下,建立包含參數的非對稱度量模型,利用不同來源的客體圖像特徵樣本集合,求解所述非對稱度量模型中的參數,從而完成非對稱度量模型的構建。本方法對傳統圖像識別技術中的假設進行了修改,即:參與比對的兩個客體樣本x和y可以分別服從各自高斯分佈、而不必共用參數,並在此基礎上從分屬不同來源類別的樣本集合中學習用於識別非對稱客體的相似度度量模型,從而為適應各種圖像來源的高性能客體識別提供了基礎。 The metric learning method provided by the present invention establishes an asymmetric metric model containing parameters under the assumption that the face features participating in the comparison obey their respective Gaussian distributions, and uses a collection of object image feature samples from different sources to solve the asymmetric metric Parameters in the model to complete the construction of the asymmetric metric model. This method modifies the assumptions in the traditional image recognition technology, that is, the two object samples x and y participating in the comparison can obey their respective Gaussian distributions, without having to share parameters, and on this basis belong to different sources The similarity measurement model used to identify asymmetric objects is learned from the sample set of categories, which provides a basis for high-performance object recognition adapted to various image sources.

本發明提供的圖像來源識別方法,首先從分別屬於不同來源類別的客體圖像集中提取客體特徵組成訓練樣本集合,利用所述訓練樣本集合中的客體特徵樣本及其來源類別,訓練客體圖像來源分類模型,然後以從待分類客體圖像中提取的客體特徵為輸入,採用所述客體圖像來源分類模型識別所述待分類客體圖像的來源類別。本方法能夠有效識別客體圖像的來源類別,從而為在客體識別過程中選擇正確的相似度度量模型提供依據,保障了識別結果的正確性。 The image source recognition method provided by the present invention firstly extracts object features from object image sets respectively belonging to different source categories to form a training sample set, and uses the object feature samples in the training sample set and their source categories to train the object images. The source classification model then uses the object feature extracted from the object image to be classified as an input, and uses the object image source classification model to identify the source category of the object image to be classified. The method can effectively identify the source category of the object image, thereby providing a basis for selecting the correct similarity measurement model in the object recognition process and ensuring the accuracy of the recognition result.

501‧‧‧度量模型訓練單元 501‧‧‧metric model training unit

502‧‧‧圖像獲取單元 502‧‧‧Image acquisition unit

503‧‧‧特徵提取單元 503‧‧‧Feature extraction unit

504‧‧‧來源類別確定單元 504‧‧‧Source category determination unit

505‧‧‧相似度計算單元 505‧‧‧Similarity calculation unit

701‧‧‧基準樣本提取單元 701‧‧‧ benchmark sample extraction unit

702‧‧‧比對樣本提取單元 702‧‧‧Comparison sample extraction unit

703‧‧‧非對稱度量模型建立單元 703‧‧‧Asymmetric measurement model building unit

704‧‧‧度量模型參數求解單元 704‧‧‧Metric model parameter solving unit

901‧‧‧訓練樣本採集單元 901‧‧‧ training sample collection unit

902‧‧‧分類模型訓練單元 902‧‧‧Classification model training unit

903‧‧‧待分類特徵提取單元 903‧‧‧Feature extraction unit to be classified

904‧‧‧來源類別識別單元 904‧‧‧Source category identification unit

圖1是本發明提供的一種圖像識別方法的實施例的流程圖;圖2是本發明實施例提供的度量模型集合訓練過程的示意圖;圖3是本發明實施例提供的訓練非對稱度量模型的處理流程圖;圖4是本發明實施例提供的利用度量模型集合進行人臉識別的示意圖;圖5是本發明提供的一種圖像識別裝置的實施例的示意圖;圖6是本發明提供的一種度量學習方法的實施例的流程圖;圖7是本發明提供的一種度量學習裝置的實施例的示意圖;圖8是本發明提供的一種圖像來源識別方法的實施例的流程圖;圖9是本發明提供的一種圖像來源識別裝置的實施例的示意圖。 FIG. 1 is a flowchart of an embodiment of an image recognition method provided by the present invention; FIG. 2 is a schematic diagram of a training process of a metric model set provided by an embodiment of the present invention; FIG. 3 is a training asymmetric metric model provided by an embodiment of the present invention FIG. 4 is a schematic diagram of face recognition using a metric model set according to an embodiment of the present invention; FIG. 5 is a schematic diagram of an embodiment of an image recognition device provided by the present invention; FIG. 6 is provided by the present invention A flowchart of an embodiment of a metric learning method; FIG. 7 is a schematic diagram of an embodiment of a metric learning device provided by the present invention; FIG. 8 is a flowchart of an embodiment of an image source recognition method provided by the present invention; FIG. 9 It is a schematic diagram of an embodiment of an image source recognition device provided by the present invention.

在下面的描述中闡述了很多具體細節以便於充分理解本發明。但是,本發明能夠以很多不同於在此描述的其它 方式來實施,本領域技術人員可以在不違背本發明內涵的情況下做類似推廣,因此,本發明不受下面公開的具體實施的限制。 Numerous specific details are set forth in the following description in order to fully understand the present invention. However, the present invention can be implemented in many other ways than those described herein, and those skilled in the art can make similar promotion without violating the meaning of the present invention. Therefore, the present invention is not limited by the specific implementations disclosed below.

在本發明中,分別提供了一種圖像識別方法及裝置,一種度量學習方法及裝置,以及一種圖像來源識別方法及裝置,在下面的實施例中逐一進行詳細說明。 In the present invention, an image recognition method and device, a metric learning method and device, and an image source recognition method and device are provided, which are described in detail in the following embodiments one by one.

雖然本發明的技術方案是以人臉識別為背景提出的,但是本發明技術方案的應用領域並非僅局限於人臉識別,在針對其他客體圖像的識別應用中同樣可以採用本發明提供的技術方案。 Although the technical solution of the present invention is proposed with the face recognition as the background, the application field of the technical solution of the present invention is not limited to face recognition, and the technology provided by the present invention can also be used in the recognition application of other object images. Program.

現有的圖像識別技術通常不考慮客體圖像的來源,採用單一的相似度度量模型進行識別,而本發明的技術方案,針對待識別客體圖像來源複雜、品質參差不齊的現象,提出了一種圖像識別的新思路:預先訓練對應不同來源類別的相似度度量模型,而在具體應用時選用與待識別客體圖像的來源類別相對應的相似度度量模型進行識別,從而能夠處理非對稱客體圖像的識別問題,對屬於不同來源類別的客體圖像的識別具有更好的堅固性和更高的準確率。 Existing image recognition technologies generally do not consider the source of the object image, and use a single similarity measure model for identification. The technical solution of the present invention addresses the complex source and uneven quality of the object image to be identified. A new idea for image recognition: pre-train the similarity measurement models corresponding to different source categories, and select the similarity measurement model corresponding to the source category of the object image to be identified for specific applications, so that it can handle asymmetry The problem of object image recognition has better robustness and higher accuracy for object images belonging to different source categories.

所述客體圖像通常是指,其主要展示內容(例如:作為圖像主體的前景圖像)為人臉或者各種物品等客體的圖像。不同來源的客體圖像通常是指,由於採集方式或者採集設備不同等因素、導致客體特徵遵循不同資料分佈的圖像,不同來源可以包括:視頻截圖、掃描圖像、翻拍圖像 等。 The object image generally refers to an image whose main display content (for example, a foreground image as an image subject) is an object such as a human face or various items. Object images from different sources usually refer to images that cause object characteristics to follow different data distributions due to factors such as acquisition methods or different acquisition equipment. Different sources can include: video screenshots, scanned images, remake images, and so on.

考慮到目前人臉圖像的識別應用比較普及,在本發明的實施例中以人臉圖像識別為重點進行描述。 Considering that the current recognition application of face images is relatively popular, the embodiments of the present invention will be described focusing on face image recognition.

請參考圖1,其為本發明的一種圖像識別方法的實施例的流程圖。所述方法包括如下步驟: Please refer to FIG. 1, which is a flowchart of an embodiment of an image recognition method according to the present invention. The method includes the following steps:

步驟101、訓練對應不同來源類別的相似度度量模型,組成度量模型集合。 Step 101: Train similarity measurement models corresponding to different source categories to form a measurement model set.

對於本實施例中的人臉圖像,各種不同來源類別包括但不局限於:證件照、生活照、視頻截圖、掃描圖像、翻拍圖像、或者監控畫面等。 For the face image in this embodiment, various different source categories include, but are not limited to: ID photos, life photos, video screenshots, scanned images, remake images, or monitoring pictures.

在採用本技術方案進行人臉識別之前,可以先訓練對應於不同來源類別的相似度度量模型,所有訓練好的相似度度量模型共同組成度量模型集合,該集合中的每個成員,即每個相似度度量模型分別與人臉圖像的不同來源類別相對應。 Before using this technical solution for face recognition, the similarity measurement models corresponding to different source categories can be trained first. All the trained similarity measurement models together form a measurement model set. Each member in the set, that is, each The similarity measurement models correspond to different source categories of face images, respectively.

給定兩個屬於不同來源類別的人臉特徵樣本(簡稱人臉樣本)x和y,相似度度量模型用於評估兩者之間的相似度,在具體實施時,所述相似度度量模型通常可以用度量函數f(x,y,P)來表示,其中P為該模型的參數,訓練的目的是基於給定的訓練集求解度量模型的參數P,參數P一旦確定則模型訓練完畢。 Given two face feature samples (referred to as face samples) x and y belonging to different source categories, the similarity measurement model is used to evaluate the similarity between the two. In specific implementation, the similarity measurement model is usually It can be expressed by the metric function f (x, y, P), where P is the parameter of the model, and the training purpose is to solve the parameter P of the metric model based on the given training set. Once the parameter P is determined, the model training is completed.

針對人臉圖像的多種來源類別,訓練過程可以重複多次,從而得到多個度量函數,每個度量函數適用於不同來源類別的人臉圖像。訓練針對某一特定來源類別的度量模 型時,訓練集由三部分組成:作為訓練基準的、屬於預設來源類別的基準人臉圖像訓練集X、對應所述特定來源類別的比對人臉圖像訓練集Y、以及用於標識哪些圖像來自同一人、哪些圖像來自不同人的身份標籤Z。給定一組訓練集(X,Y,Z),即可訓練得到一個針對(X,Y)空間的度量函數f(x,y,P)。固定訓練集X,藉由更換屬於不同來源類別的訓練集Yk,則可以訓練得到多個度量函數fk(x,y,P),k=1...K,其中K為訓練集Y的個數,表示圖像來源的類別數。請參見圖2,其為度量模型集合訓練過程的示意圖。 For multiple source categories of face images, the training process can be repeated multiple times to obtain multiple metric functions, each of which is applicable to face images of different source categories. When training a metric model for a specific source category, the training set consists of three parts: a training set of benchmark face images X that belong to a preset source category as a training benchmark, and a matching face corresponding to the specific source category Image training set Y, and an identification tag Z for identifying which images are from the same person and which images are from different people. Given a set of training sets (X, Y, Z), a metric function f (x, y, P) for (X, Y) space can be trained. Fixed training set X, by replacing the training set Y k belonging to different source categories, multiple metric functions f k (x, y, P) can be trained, k = 1 ... K, where K is the training set Y The number of represents the number of categories of the image source. Please refer to FIG. 2, which is a schematic diagram of a training process of a metric model set.

上面對整個訓練過程作了概要性描述,下面具體描述訓練對應於某一特定來源類別的相似度度量模型的具體步驟,包括:提取特徵、建立模型、求解模型參數等。在具體實施時,可以採用不同的演算法建立相似度度量模型,為了便於理解,在本實施例中以目前應用比較普及的聯合貝葉斯臉為基礎建立相似度度量模型,並將建立的模型稱為非對稱度量模型。下面結合圖3對訓練所述非對稱度量模型的過程作進一步說明,所述訓練過程包括: The overall description of the entire training process is described above, and the specific steps of training a similarity measurement model corresponding to a particular source category are described below, including: extracting features, establishing a model, and solving model parameters. In specific implementation, different algorithms can be used to establish the similarity measurement model. In order to facilitate understanding, in this embodiment, a similarity measurement model is established based on the joint Bayesian face that is currently widely used. It is called an asymmetric metric model. The following further describes the process of training the asymmetric metric model with reference to FIG. 3. The training process includes:

步驟101-1、提取屬於預設來源類別的基準人臉圖像訓練集中各圖像的人臉特徵,作為基準特徵樣本集。 Step 101-1: Extract the facial features of each image in the reference face image training set belonging to the preset source category as a reference feature sample set.

在具體實施時,作為訓練基準的基準人臉圖像訓練集X中的人臉圖像通常是在可控環境下採集的,所述預設來源類別可以為:證件照,或者其它圖像品質通常比較好的來源類別。採集基準人臉圖像訓練集後,可以提取其中各 圖像的人臉特徵作為樣本,即通常所說的人臉樣本,所有樣本共同組成基準特徵樣本集。關於如何提取人臉特徵,請參見後續步驟103中的文字說明。 In specific implementation, the face images in the reference face image training set X as a training reference are usually collected in a controlled environment, and the preset source category may be: a photo of a certificate, or other image quality Usually a better source category. After collecting the benchmark face image training set, the facial features of each image can be extracted as samples, which are commonly referred to as face samples, and all the samples collectively constitute the benchmark feature sample set. For how to extract facial features, please refer to the text description in the subsequent step 103.

步驟101-2、提取屬於所述特定來源類別的比對人臉圖像訓練集中各圖像的人臉特徵,作為比對特徵樣本集。 Step 101-2: Extract the facial features of each image in the comparison face image training set belonging to the specific source category as a comparison feature sample set.

所述特定來源類別可以與基準人臉圖像訓練集X的來源類別不同,例如:X是在可控環境下採集的證件照,比對人臉圖像訓練集Y中的人臉圖像可以是在不可控環境下採集的生活照。採集所述比對人臉圖像訓練集後,可以提取其中各圖像的人臉特徵作為樣本,所有樣本共同組成比對特徵樣本集。關於如何提取人臉特徵,請參見後續步驟103中的文字說明。 The specific source category may be different from the source category of the reference face image training set X, for example: X is a credential photo collected in a controlled environment, and comparing the face image in the face image training set Y may be It is a life photo collected in an uncontrollable environment. After collecting the comparison face image training set, the facial features of each image can be extracted as samples, and all the samples collectively constitute the comparison feature sample set. For how to extract facial features, please refer to the text description in the subsequent step 103.

步驟101-3、在參與比對的人臉特徵服從各自高斯分佈的假設下,建立包含參數的非對稱度量模型。 Step 101-3: Under the assumption that the facial features participating in the comparison obey their respective Gaussian distributions, establish an asymmetric metric model containing parameters.

本實施例在傳統聯合貝葉斯臉的基礎上進行了改進,並建立了非對稱度量模型。為了便於理解,先對貝葉斯臉和聯合貝葉斯臉作簡要說明。 This embodiment improves on the basis of the traditional joint Bayesian face, and establishes an asymmetric metric model. In order to facilitate the understanding, the Bayesian face and the joint Bayesian face are briefly explained.

貝葉斯臉通常是對經典貝葉斯人臉識別方法的簡稱,該方法用兩幅人臉圖像特徵的差別作為模式向量,若兩個圖像屬於同一人則稱為類內模式,否則稱為類間模式,從而將人臉識別的多分類問題轉化為二分類問題。對於任意兩個人臉樣本x和y,如果基於類內/類間模式得到的對數似然比大於預先設定的閾值,則可以判定為同一個人。 Bayesian face is usually the abbreviation of classic Bayesian face recognition method. This method uses the difference between the features of two face images as the pattern vector. If the two images belong to the same person, it is called an in-class mode, otherwise It is called an inter-class pattern, which transforms the multi-classification problem of face recognition into a two-classification problem. For any two face samples x and y, if the log-likelihood ratio obtained based on the intra-class / inter-class pattern is greater than a preset threshold, they can be determined to be the same person.

聯合貝葉斯臉則是在貝葉斯臉的基礎上,針對x和y 的聯合概率分佈建立二維模型,並將每個人臉樣本表示為兩個獨立的潛在變數之和:不同人臉的變化+相同人臉的變化,然後利用大量樣本訓練得到基於對數似然比的相似度度量模型。需要說明的是,雖然上述兩種貝葉斯臉技術是針對人臉圖像識別提出的,但是也可以應用於其他客體圖像的識別。 The joint Bayesian face is based on the Bayesian face, establishes a two-dimensional model for the joint probability distribution of x and y, and represents each face sample as the sum of two independent latent variables: Change + change of the same face, and then train a large number of samples to obtain a similarity metric model based on the log-likelihood ratio. It should be noted that although the above two Bayesian face technologies are proposed for face image recognition, they can also be applied to the recognition of other object images.

聯合貝葉斯臉的識別準確率比經典貝葉斯臉有所提高,但是由於聯合貝葉斯臉的基本假設為:參與比對的人臉樣本x和y服從同一高斯分佈,而在具體應用中,註冊集中的圖像來源通常是可控的,待識別人臉圖像的來源則較為複雜,品質參差不齊,也即:參與比對的人臉樣本可能並不滿足服從同一高斯分佈的要求,導致聯合貝葉斯臉技術通常不能很好地處理這種情況,識別準確率較低。 The recognition accuracy of the joint Bayesian face is higher than that of the classic Bayesian face, but the basic assumption of the joint Bayesian face is that the face samples x and y participating in the comparison follow the same Gaussian distribution, and in specific applications In the registration set, the image source is usually controllable, and the source of the face image to be identified is more complex and the quality is uneven, that is, the face samples participating in the comparison may not meet the same Gaussian distribution. As a result, the joint Bayesian face technology usually cannot handle this situation well, and the recognition accuracy is low.

針對上述問題,本發明的發明人在對聯合貝葉斯臉的假設進行修改的基礎上,提出了非對稱度量模型、以及採用不同來源類別的人臉圖像訓練集進行訓練的度量學習方法。之所以稱為“非對稱”度量模型,是因為利用該模型進行比對的兩個人臉樣本所對應的人臉圖像可以屬於不同的來源類別,由於建模時考慮到了不同來源類別導致的資料分佈差異,依據該模型估算的相似度可以得到更為準確的人臉識別結果。 In view of the above problems, the inventor of the present invention proposes an asymmetric metric model and a metric learning method for training using face image training sets of different source categories on the basis of modifying the assumption of joint Bayesian face. The reason why it is called an "asymmetric" metric model is that the face images corresponding to the two face samples that are compared by using this model can belong to different source categories. The data distribution is different, and the similarity estimated based on this model can get more accurate face recognition results.

非對稱度量模型基於如下假設:參與比對的兩個人臉樣本x和y可以分別服從各自高斯分佈、而不必共用參數。假設基準特徵樣本集X中的樣本x可以用兩個獨立隨 機變數之和表示:x=μ x +ε x ,其中μ x 表示由樣本的身份標籤帶來的隨機性,ε x 表示由其他因素帶來的隨機性,如:姿態、表情、光照等,假設μ x ε x 服從均值為0,協方差矩陣為Sxx和Txx的高斯分佈。 The asymmetric metric model is based on the assumption that two face samples x and y participating in the comparison can obey their respective Gaussian distributions without having to share parameters. Assume that the sample x in the benchmark feature sample set X can be represented by the sum of two independent random variables: x = μ x + ε x , where μ x represents the randomness brought by the sample's identity tag, and ε x represents other factors. The randomness brought about, such as pose, expression, lighting, etc., assumes that μ x and ε x obey the mean of 0, and the covariance matrix is Gaussian distribution of S xx and T xx .

同理,比對人臉圖像訓練集Y中的樣本y也可用兩個獨立隨機變數之和表示:y=μ y +ε y ,其中μ y 表示由樣本的身份標籤帶來的隨機性,ε y 表示由其他因素帶來的隨機性。假設μ y ε y 服從均值為0,協方差矩陣為Syy和Tyy的高斯分佈。 Similarly, the sample y in the face image training set Y can also be expressed by the sum of two independent random variables: y = μ y + ε y , where μ y represents the randomness brought by the sample's identity tag, ε y represents randomness due to other factors. Suppose μ y and ε y with mean 0 and covariance matrix S yy and T yy Gaussian distribution.

由於x和y都服從高斯分佈,其聯合分佈也服從高斯分佈。將X和Y空間連接起來,其中的樣本表示為{x,y},該隨機變數的均值仍為0,其方差分兩種情況進行分析。 Since both x and y obey the Gaussian distribution, their joint distribution also obeys the Gaussian distribution. The X and Y spaces are connected, and the samples are represented as {x, y}. The mean value of the random variable is still 0, and its variance is analyzed in two cases.

1)對於同一人的(類內)樣本。 1) For (in-class) samples of the same person.

其協方差矩陣為: Its covariance matrix is:

其中,Sxy和Syx是X和Y之間的互協方差矩陣。 Among them, S xy and S yx are cross-covariance matrices between X and Y.

其逆矩陣的形式為: The form of its inverse matrix is:

由此可以得到:E=(S xx +T xx -S xy (S yy +T yy )-1 S yx )-1 G=-(S xx +T xx -S xy (S yy +T yy )-1 S yx )-1 S xy (S yy +T yy )-1 F=(S yy +T yy -S yx (S xx +T xx )-1 S xy )-1 From this we can get: E = ( S xx + T xx - S xy ( S yy + T yy ) -1 S yx ) -1 G =-( S xx + T xx - S xy ( S yy + T yy ) - 1 S yx ) -1 S xy ( S yy + T yy ) -1 F = ( S yy + T yy - S yx ( S xx + T xx ) -1 S xy ) -1

2)對於不同人的(類間)樣本。 2) (Inter-class) samples for different people.

其協方差矩陣為: Its covariance matrix is:

其逆矩陣的形式為: The form of its inverse matrix is:

在上述推導過程的基礎上,對於任意兩個樣本x和y,使用類內/類間對數似然比評估他們的相似度,值越大說明x和y是同一人的可能性越大,因此,建立如下所示的非對稱度量模型: Based on the above derivation process, for any two samples x and y, the intra-class / inter-class log-likelihood ratio is used to evaluate their similarity. A larger value indicates that x and y are more likely to be the same person, so To build an asymmetric metric model as shown below:

A=(S xx +T xx )-1-E B=(S yy +T yy )-1-F Let A = ( S xx + T xx ) -1 - EB = ( S yy + T yy ) -1 - F

則,非對稱度量模型可以簡化為如下表示方式: Then, the asymmetric metric model can be simplified as follows:

步驟101-4、根據上述兩類特徵樣本集中的樣本以及標識樣本是否屬於同一人的身份標籤,求解所述非對稱度量模型中的參數,完成所述模型的訓練。 In step 101-4, the parameters in the asymmetric metric model are solved according to the samples in the two types of feature sample sets and the identity tags identifying whether the samples belong to the same person, and the training of the models is completed.

訓練非對稱度量模型的主要任務在於求解公式1所示模型運算式中的A、B和G參數,而經由步驟101-3的推導過程可以看出,這三個參數可以藉由Sxx、Txx、Syy、Tyy、Sxy、和Syx經過特定的運算得到,因此訓練非對稱度量模型的核心,在於求解上述各個協方差矩陣以及互協方差矩陣。本實施例利用基準特徵樣本集X和比對特徵樣本集Y中的大量人臉樣本,採用估算散度矩陣的方式求解 所述各個參數,下面進行詳細說明。 The main task of training an asymmetric metric model is to solve the A, B, and G parameters in the model calculation formula shown in Equation 1. Through the derivation process of step 101-3, it can be seen that these three parameters can be obtained by S xx , T xx , S yy , Ty y , S xy , and S yx are obtained through specific operations. Therefore, the core of training an asymmetric metric model is to solve the above-mentioned various covariance matrices and cross-covariance matrices. In this embodiment, a large number of face samples in the reference feature sample set X and the comparison feature sample set Y are used to solve the various parameters in a manner of estimating a divergence matrix, which is described in detail below.

根據基準特徵樣本集X和身份標籤資訊(標識不同的人臉樣本是否屬於同一人),使用類間散度矩陣對Sxx作近似估計,使用類內散度矩陣對Txx作近似估計,計算公式如下: According to the benchmark feature sample set X and identity label information (identifying whether different face samples belong to the same person), use the inter-class divergence matrix to approximate S xx , and use the intra-class divergence matrix to approximate T xx to calculate The formula is as follows:

其中C為類別數(屬於同一人的人臉樣本為同一 類),為第i類樣本的集合,表示第i類的樣本數, m x 為全體樣本的均值,為第i類樣本的均值。 Where C is the number of categories (face samples belonging to the same person are of the same category), Is the set of samples of type i, Represents the number of samples in the i-th category, m x is the average of all samples, Is the mean of the i-th sample.

同理,根據比對特徵樣本集Y和身份標籤資訊,使用類間散度矩陣對Syy作近似估計,使用類內散度矩陣對Tyy作近似估計,計算公式如下: Similarly, according to the comparison feature sample set Y and identity tag information, the inter-class divergence matrix is used to approximate S yy , and the intra-class divergence matrix is used to approximate T yy . The calculation formula is as follows:

其中C為類別數,為第i類樣本的集合,表示第i類的樣本數,m y 為全體樣本的均值,為第i類樣本的均值。 Where C is the number of categories, Is the set of samples of type i, Represents the number of samples in the i-th category, m y is the average of all samples, Is the mean of the i-th sample.

同理,使用下述計算公式估計X和Y之間的互協方差矩陣: Similarly, use the following calculation formula to estimate the cross-covariance matrix between X and Y:

藉由上述估算散度矩陣的方式求解得到Sxx、Txx、Syy、Tyy、Sxy、和Syx後,根據步驟101-3的推導過程,可以進一步計算得到參數A、B以及G的值,將這些參數值代入公式1中,得到訓練完畢的非對稱度量模型。 After solving the above method of estimating the divergence matrix to obtain S xx , T xx , S yy , Ty y , S xy , and S yx , according to the derivation process of step 101-3, parameters A, B, and G can be further calculated. The values of these parameters are substituted into Equation 1 to obtain a trained asymmetric metric model.

至此,經由上述步驟101-1至步驟101-4,描述了訓練對應於特定來源類別的非對稱度量模型的具體步驟。在具體實施時,對於人臉圖像的K個來源類別,可以分別採用上述步驟進行訓練,從而獲取K個分別對應於不同來源類別的相似度度量模型。 So far, through the above steps 101-1 to 101-4, the specific steps of training an asymmetric metric model corresponding to a specific source category have been described. In specific implementation, for the K source categories of the face image, the above steps can be separately used for training, so as to obtain K similarity measurement models corresponding to different source categories.

需要說明的是,本實施例在利用大量人臉樣本的基礎上、採用估算散度矩陣的方式求解所述非對稱度量模型中的各個參數,在其他實施方式中,也可以採用傳統聯合貝葉斯臉所採取的期望最大化演算法、藉由多輪反覆運算的方式求解所述模型中的參數,同樣可以實現本發明的技術方案。 It should be noted that this embodiment solves each parameter in the asymmetric metric model by using a method of estimating a divergence matrix on the basis of using a large number of face samples. In other embodiments, a traditional joint bayonet can also be used. The expectation maximization algorithm adopted by Spiegel and solving the parameters in the model through multiple rounds of iterative calculations can also implement the technical solution of the present invention.

此外,本實施例在聯合貝葉斯臉的基礎上、藉由修改其假設建立對應於不同來源類別的相似度度量模型,在其他實施方式中,也可以採用其他方法或者技術建立所述相 似度度量模型,例如:利用典型相關分析技術(Canonical Correlation Analysis,簡稱CCA)、非對稱深度度量學習方法(Asymmetric Deep Metric Learning,簡稱ADML)、或者基於多模態受限玻爾茲曼機(Multimodal Restricted Boltzmann Machines)的方法建立所述相似度度量模型。不管採用何種演算法或者技術,只要能夠針對來源不同的人臉圖像分別建立並訓練得到相對應的相似度度量模型,就不偏離本發明的核心,都在本發明的保護範圍之內。 In addition, in this embodiment, based on the joint Bayesian face and by modifying its assumptions, a similarity measurement model corresponding to different source categories is established. In other implementations, other methods or techniques can also be used to establish the similarity. Metric models, such as: Canonical Correlation Analysis (CCA), Asymmetric Deep Metric Learning (ADML), or Multimodal Restricted based on Multimodal Restricted Boltzmann Machines) to establish the similarity metric model. No matter what kind of algorithm or technology is adopted, as long as the corresponding similarity measurement model can be established and trained separately for face images from different sources, it does not deviate from the core of the present invention and is within the scope of the present invention.

步驟102、獲取待識別人臉圖像。 Step 102: Obtain a face image to be identified.

所述待識別人臉圖像通常是指待確定身份的人臉圖像,一般在不可控環境下採集,其來源類別較多,可以包括:生活照、翻拍海報、翻拍電視、監控畫面、掃描圖像等。 The face image to be identified generally refers to a face image whose identity is to be determined, and is generally collected in an uncontrollable environment. There are many types of sources, which can include: life photos, remake posters, remake TV, surveillance pictures, scans Images, etc.

在具體實施時,可以藉由多種方式獲取待識別人臉圖像,例如,用具有攝像頭的照相機或者移動終端設備拍攝、從互聯網的資來源資料庫中下載、用掃描器掃描、或者接收由用戶端(例如:移動終端設備或者桌面電腦等)經由有線或者無線方式上傳的待識別人臉圖像等。 In the specific implementation, the face image to be identified can be obtained in various ways, for example, shooting with a camera with a camera or a mobile terminal device, downloading from a source database of the Internet, scanning with a scanner, or receiving data from a user. (For example, a mobile terminal device or a desktop computer) uploads a face image to be identified via a wired or wireless manner.

步驟103、提取所述待識別人臉圖像的人臉特徵。 Step 103: Extract facial features of the face image to be identified.

由於人臉部分通常佔據所述待識別人臉圖像的主要空間,因此可以直接從所述待識別人臉圖像中提取人臉特徵,為了提高識別的準確率,也可以先從人臉圖像背景中檢測人臉所在的具體位置,例如:採用基於膚色的檢測方 法、基於形狀的檢測方法、或者基於統計理論的檢測方法等確定人臉在所述圖像中的具體位置,然後再從所述具體位置對應的人臉圖像中提取人臉特徵。 Since the face part usually occupies the main space of the face image to be identified, the face features can be directly extracted from the face image to be identified. In order to improve the accuracy of the recognition, the face can also be extracted from the face first. The specific position of the face in the image background is detected, for example, a skin-based detection method, a shape-based detection method, or a statistical theory-based detection method is used to determine the specific position of the face in the image, and then Face features are extracted from a face image corresponding to the specific position.

提取特徵的過程是將人臉圖像轉換為向量的過程,該向量稱為人臉特徵,人臉特徵對來自不同人的人臉圖像具有較強的鑒別力,同時對外部干擾因素具有堅固性。在具體實施時,可以採用多種特徵提取方法,如:局部二值模式演算法(Local Binary Patterns,簡稱LBP)、Gabor小波變換演算法、以及深度卷積網路等,其中,從識別準確率以及執行性能的角度考慮,採用深度卷積網路提取人臉特徵是本實施例提供的優選實施方式。 The process of extracting features is a process of converting a face image into a vector. This vector is called a face feature. The face feature has a strong discriminative power for face images from different people, and it is also robust to external interference factors. Sex. In specific implementation, multiple feature extraction methods can be used, such as: Local Binary Patterns (LBP), Gabor wavelet transform algorithms, and deep convolutional networks. Among them, the recognition accuracy and From the perspective of execution performance, using a deep convolution network to extract facial features is a preferred implementation provided by this embodiment.

步驟104、利用預先訓練好的人臉圖像來源分類模型,確定所述待識別人臉圖像的來源類別。 Step 104: Use a pre-trained face image source classification model to determine the source category of the face image to be identified.

具體實施時,可以根據步驟103獲取待識別圖像的方式確定所述待識別人臉圖像的來源類別,例如:利用照相機拍照獲取的普通生活中的人臉圖像,則其來源類別為生活照;如果採用掃描器掃描獲取的人臉圖像,則其來源類別為掃描圖像。此外,對於從用戶端或者網路獲取的待識別人臉圖像,如果所述圖像帶有預先標注好的來源資訊,那麼可以依據該資訊確定所述人臉圖像的來源類別。 In specific implementation, the source category of the face image to be identified may be determined according to the manner in which the to-be-recognized image is obtained in step 103. For example, if a face image in ordinary life is obtained by taking a photo with a camera, the source category is life If the face image obtained by the scanner is used for scanning, the source category is the scanned image. In addition, for a face image to be identified obtained from a client or the Internet, if the image carries pre-labeled source information, the source category of the face image may be determined based on the information.

對於無法藉由上述方式或者類似方式獲取來源類別的待識別人臉圖像,則可以採用本步驟所述方法:利用人臉圖像來源分類模型,確定所述待識別人臉圖像的來源類別。 For the face image to be identified whose source category cannot be obtained in the above manner or a similar manner, the method described in this step may be adopted: using the face image source classification model to determine the source category of the face image to be identified .

所述人臉圖像來源分類模型為多類分類模型(也稱為多類分類器),在具體實施時,可以在執行本步驟之前預先訓練好所述人臉圖像來源分類模型,例如,本實施例採用Softmax回歸演算法訓練所述分類模型,下面對訓練過程作進一步說明。 The face image source classification model is a multi-class classification model (also referred to as a multi-class classifier). In specific implementation, the face image source classification model can be trained before performing this step. For example, This embodiment uses the Softmax regression algorithm to train the classification model, and the training process is further described below.

首先採集屬於K個不同來源類別的人臉圖像集,並從其中每個人臉圖像中提取人臉特徵組成訓練樣本集合,所述訓練樣本集合中的每個樣本由兩部分組成:人臉特徵和其對應的來源類別標籤,具體可以採用如下表示方式:{yi,si}(i=1...N)表示,其中yi為人臉特徵,si為來源類別標籤,N為樣本數。 First, collect face image sets belonging to K different source categories, and extract facial features from each of the face images to form a training sample set. Each sample in the training sample set is composed of two parts: a face The features and their corresponding source category labels can be specifically expressed as follows: {y i , s i } (i = 1 ... N), where y i is a face feature, s i is a source category label, and N Is the number of samples.

採用Softmax回歸方法,對於給定人臉特徵,其屬於第k類的概率為如下形式: Using the Softmax regression method, for a given face feature, the probability that it belongs to the kth class is as follows:

其中,θ為模型的參數,可以藉由最小化下面的目標函數進行求解: Among them, θ is a parameter of the model, which can be solved by minimizing the following objective function:

其中,1{}為指標函數,當括弧中的運算式成立時值為1,否則值為0。在具體實施時,對於給定的訓練集{yi, si}(i=1...N),可以採用反覆運算的優化演算法(例如:梯度下降法)最小化目標函數J(θ),並求解得到參數θ,所述人臉圖像來源分類模型訓練完畢。 Among them, 1 {} is the index function, and the value is 1 when the expression in the brackets is true, otherwise it is 0. In specific implementation, for a given training set {y i , s i } (i = 1 ... N), an iterative algorithm (eg, gradient descent method) can be used to minimize the objective function J (θ ), And solve to obtain the parameter θ, the face image source classification model training is completed.

本步驟可以以所述待識別人臉圖像的人臉特徵作為輸入,採用已訓練完畢的人臉圖像來源分類模型計算該人臉特徵屬於每個來源類別的概率P(s=k|y),其中最大值對應的來源類別即為所述待識別人臉圖像所屬的來源類別。 In this step, the facial features of the face image to be identified can be used as input, and the trained facial image source classification model is used to calculate the probability that the facial features belong to each source category P (s = k | y ), Where the source category corresponding to the maximum value is the source category to which the face image to be identified belongs.

在本實施例中採用Softmax演算法實現所述人臉圖像來源分類模型,在其他實施方式中,也可以採用不同於上述演算法的其他方式,例如可以採用多類SVM演算法、或者隨機森林演算法等,也是可以的。 In this embodiment, the Softmax algorithm is used to implement the face image source classification model. In other embodiments, other methods different from the above algorithms can also be used. For example, a multi-class SVM algorithm or a random forest can be used. Algorithms, etc. are also possible.

步驟105、從預先訓練好的度量模型集合中選擇與所述待識別人臉圖像的來源類別相對應的相似度度量模型,並計算所述人臉特徵與註冊圖像人臉特徵的相似度,作為輸出人臉識別結果的依據。 Step 105: Select a similarity measurement model corresponding to the source category of the face image to be identified from a pre-trained measurement model set, and calculate the similarity between the face feature and the registered image face feature , As the basis for outputting face recognition results.

所述註冊圖像通常是指,在具體應用中供查詢的人臉圖像註冊集中的人臉圖像。所述人臉圖像註冊集中的圖像通常在可控環境下採集,其來源通常較為單一,品質通常較好,例如:二代證照片、登記照等,且其規模比較大,可以達到數萬至數千萬。為了進一步提高本技術方案的識別準確率,所述人臉圖像註冊集、與在步驟101中訓練相似度度量模型時所採用的基準人臉圖像訓練集,可以採用相同來源類別的圖像,例如:都採用證件照。 The registered image generally refers to a face image in a face image registration set for query in a specific application. The images in the face image registration set are usually collected in a controlled environment, and the source is usually single and the quality is usually good, such as second-generation ID photos, registration photos, etc., and their scale is relatively large and can reach several Ten to tens of millions. In order to further improve the recognition accuracy of this technical solution, the facial image registration set and the reference facial image training set used when training the similarity measurement model in step 101 may use images of the same source category , For example: all use ID photos.

在具體實施時,採集用於組成人臉圖像註冊集的圖像後,可以提取每個人臉圖像的人臉特徵,並將人臉圖像、人臉特徵、以及對應的身份標籤和身份資訊儲存在供查詢的註冊圖像資料庫中,同時建立上述各類資訊之間的對應關係。其中,所述身份資訊通常是指能夠標識人臉圖像所對應的個人身份的資訊,例如:姓名、身份ID等。 In specific implementation, after collecting the images used to form the facial image registration set, the facial features of each facial image can be extracted, and the facial images, facial features, and corresponding identity tags and identities can be extracted. The information is stored in the registered image database for query, and the correspondence between the various types of information is established at the same time. The identity information generally refers to information capable of identifying a personal identity corresponding to a face image, such as a name, an identity ID, and the like.

由於在步驟101中已經預先訓練好了用於人臉識別的度量模型集合,在本實施例的一個具體例子中,預先訓練好的度量模型集合中包含K個相似度度量模型,每個相似度度量模型分別與不同來源類別相對應,其形式為fk(x,y,P),k=1...K,其中參數P已經在步驟101中求解得到。 Since the metric model set for face recognition has been pre-trained in step 101, in a specific example of this embodiment, the pre-trained metric model set includes K similarity metric models, each of which The metric models correspond to different source categories, respectively, in the form f k (x, y, P), k = 1 ... K, where the parameter P has been solved in step 101.

本步驟根據所述待識別人臉圖像的來源類別,從所述度量模型集合中選擇相對應的相似度度量模型,例如待識別人臉圖像的來源類別為掃描圖像,那麼本步驟則選擇針對掃描圖像這一來源類別預先訓練的相似度度量模型,並利用所選模型計算待識別人臉圖像的人臉特徵與註冊圖像人臉特徵的相似度,最終依據相似度輸出人臉識別結果。請參考圖4,其為所述具體例子中的處理過程的示意圖。 In this step, a corresponding similarity measurement model is selected from the measurement model set according to the source category of the face image to be identified. For example, the source category of the face image to be identified is a scanned image. Select a similarity measurement model pre-trained for the source category of the scanned image, and use the selected model to calculate the similarity between the facial features of the face image to be identified and the facial features of the registered image, and finally output people based on the similarity Face recognition results. Please refer to FIG. 4, which is a schematic diagram of a processing procedure in the specific example.

在具體實施時,針對人臉識別的不同應用需求,本步驟在計算所述人臉特徵與註冊圖像人臉特徵的相似度時,存在兩種不同的情況,下面分別進行說明。 In specific implementation, according to different application requirements of face recognition, in this step, when calculating the similarity between the facial features and the facial features of the registered image, there are two different situations, which will be described separately below.

(一)人臉驗證。 (1) Face verification.

所述人臉驗證通常是指,判斷一張人臉圖像的身份是 否為某個特定人。在這種應用場景下,通常可以預先知道所述特定人的身份資訊,例如代表其身份的數位識別碼(身份ID),根據所述身份資訊查詢註冊圖像資料庫,即可獲取對應該身份的註冊圖像人臉特徵,然後計算所述待識別人臉圖像的人臉特徵與從資料庫中獲取的註冊圖像人臉特徵的相似度,若所述相似度大於預先設定的閾值,則可以判定所述待識別人臉圖像與所述註冊圖像屬於同一個人,即:所述待識別人臉圖像的身份確實為所述特定人,並將所述判定作為人臉識別結果輸出。 The face verification usually refers to judging whether the identity of a face image is a specific person. In this application scenario, the identity information of the specific person, such as a digital identification code (identity ID) representing his identity, can usually be known in advance, and the corresponding identity can be obtained by querying the registered image database according to the identity information. The facial features of the registered image, and then calculate the similarity between the facial features of the face image to be identified and the facial features of the registered image obtained from the database, if the similarity is greater than a preset threshold, Then it can be determined that the face image to be identified belongs to the same person as the registered image, that is, the identity of the face image to be identified is indeed the specific person, and the determination is used as a face recognition result Output.

(二)人臉鑒別。 (2) Face identification.

所述人臉鑒別通常是指,鑒別待識別人臉圖像的身份,即確定待識別人臉圖像是具體哪個人的圖像。在這種應用場景下,本步驟可以計算所述待識別人臉圖像的人臉特徵與指定範圍內的註冊圖像人臉特徵的相似度,例如,可以與預先建立好的註冊圖像資料庫中的全部註冊圖像人臉特徵逐一進行比對,也可以按照預設策略選取註冊圖像資料庫中的部分註冊圖像人臉特徵進行比對,並計算對應的相似度。若計算所得相似度中的最大值大於預先設定的閾值,則可以判定所述待識別人臉圖像在所述指定範圍內的註冊圖像中匹配成功,即可以確定待識別人臉圖像在所述指定範圍的註冊圖像集合中,並將所述最大值對應的註冊圖像的相關身份資訊作為人臉識別結果輸出,例如,可以輸出所述最大值所對應的註冊圖像的身份ID、或者姓名等身份資訊。 The face identification generally refers to identifying an identity of a face image to be identified, that is, determining an image of a specific person of the face image to be identified. In this application scenario, this step can calculate the similarity between the facial features of the face image to be identified and the facial features of the registered image within a specified range, for example, it can be compared with the pre-established registered image data All registered image face features in the database are compared one by one, or some registered image face features in the registered image database can be selected for comparison according to a preset strategy, and the corresponding similarity is calculated. If the maximum value of the calculated similarity is greater than a preset threshold, it can be determined that the face image to be identified matches successfully in a registered image within the specified range, and the face image to be identified can be determined In the specified range of registered image sets, the related identity information of the registered image corresponding to the maximum value is output as a face recognition result. For example, the identity ID of the registered image corresponding to the maximum value may be output. , Or identity information.

至此,藉由上述步驟101至步驟105,對本實施例提供的人臉識別方法的具體實施方式進行了描述。需要說明的是,在具體實施本方法的過程中,上述步驟並非都是必需的。其中步驟101是度量模型集合的訓練過程,通常情況下,所述度量模型集合中的各個相似度度量模型一旦訓練完畢,就可以反復使用,而不必每次針對獲取的待識別人臉圖像重新進行訓練;同理,步驟104也不是必需的,如果可以藉由待識別圖像的獲取方式獲知其來源類別、或者待識別圖像本身攜帶了來源類別標注,則可以不執行步驟104。 So far, specific implementations of the face recognition method provided by this embodiment are described through the above steps 101 to 105. It should be noted that in the process of implementing the method, the above steps are not all necessary. Step 101 is a training process of a metric model set. Generally, once each similarity metric model in the metric model set is trained, it can be used repeatedly without having to re-run the acquired face image to be recognized each time. Perform training; for the same reason, step 104 is not necessary. If the source category can be obtained by acquiring the image to be identified, or the image to be identified carries the source category label, step 104 may not be performed.

上述實施例以人臉識別為例,詳細描述了本發明提供的圖像識別方法的具體實施過程。在實際應用中,本發明提供的圖像識別方法也可應用於對其他客體圖像(例如包含各種物品的圖像)的識別中,下面以識別箱包圖像為例進行簡要說明。 The foregoing embodiment takes face recognition as an example, and describes in detail the specific implementation process of the image recognition method provided by the present invention. In practical applications, the image recognition method provided by the present invention can also be applied to the recognition of other object images (for example, images containing various items). The following briefly describes the case image recognition as an example.

可以預先根據基準箱包圖像訓練集以及對應不同來源類別的比對箱包圖像訓練集,分別訓練對應不同圖像來源類別的相似度度量模型,在獲取待識別箱包圖像後,先提取所述待識別箱包圖像中的箱包特徵,然後選用與待識別箱包圖像的來源類別相對應的相似度度量模型、計算所述箱包特徵與註冊圖像箱包特徵的相似度,並依據所述相似度輸出所述待識別箱包圖像的識別結果,例如:所述待識別箱包圖像與對應特定身份的註冊圖像是否屬於同一箱包,或者,所述待識別箱包圖像的相關身份資訊。針對箱 包等物品的身份資訊通常可以包括以下資訊之一或者組合:生產廠家、品牌資訊、型號資訊等。 The similarity measurement models corresponding to different image source categories can be separately trained according to the reference luggage image training set and the comparison luggage image training set corresponding to different source categories. After obtaining the images of the luggage to be identified, first extract the The characteristics of the luggage in the luggage image to be identified, and then a similarity measurement model corresponding to the source category of the luggage image to be identified is used to calculate the similarity between the luggage characteristics and the luggage characteristics of the registered image, and based on the similarity The recognition result of the luggage image to be identified is output, for example, whether the luggage image to be identified and a registered image corresponding to a specific identity belong to the same luggage, or related identity information of the luggage image to be identified. The identification information for luggage and other items can usually include one or a combination of the following information: manufacturer, brand information, model information, etc.

綜上所述,本發明提供的圖像識別方法,在進行客體圖像識別時,沒有採用單一的相似度度量模型,而是選用預先訓練好的與待識別客體圖像的來源類別相對應的相似度度量模型,從而能夠有效處理非對稱客體圖像的識別問題,對來源多變的待識別客體圖像的識別具有更好的堅固性和更高的準確率。 In summary, the image recognition method provided by the present invention does not use a single similarity measurement model in object image recognition. Instead, it selects a pre-trained corresponding to the source category of the object image to be identified. The similarity measurement model can effectively deal with the recognition of asymmetric object images, and has better robustness and higher accuracy for the recognition of object images with variable sources.

在上述的實施例中,提供了一種圖像識別方法,與之相對應的,本發明還提供一種圖像識別裝置。請參看圖5,其為本發明的一種圖像識別裝置的實施例示意圖。由於裝置實施例基本相似於方法實施例,所以描述得比較簡單,相關之處參見方法實施例的部分說明即可。下述描述的裝置實施例僅僅是示意性的。 In the above embodiments, an image recognition method is provided. Correspondingly, the present invention also provides an image recognition device. Please refer to FIG. 5, which is a schematic diagram of an embodiment of an image recognition device according to the present invention. Since the device embodiment is basically similar to the method embodiment, it is described relatively simply. For the relevant part, refer to the description of the method embodiment. The device embodiments described below are only schematic.

本實施例的一種圖像識別裝置,包括:度量模型訓練單元501,用於利用屬於預設來源類別的基準客體圖像訓練集、以及對應不同來源類別的比對客體圖像訓練集,分別訓練得到所述度量模型集合中對應不同來源類別的各相似度度量模型;圖像獲取單元502,用於獲取待識別客體圖像;特徵提取單元503,用於提取所述待識別客體圖像的客體特徵;來源類別確定單元504,用於以所述客體特徵為輸入,利用預先訓練好的客體圖像來源分類模型,確定所述待識別客體圖像的來源類別;相似度計算單元505,用於從預先訓練好的度量模型集合中選擇與所述待 識別客體圖像的來源類別相對應的相似度度量模型,並計算所述客體特徵與註冊圖像客體特徵的相似度,作為輸出客體識別結果的依據;其中,所述相似度計算單元包括:度量模型選擇子單元,用於從預先訓練好的度量模型集合中選擇與所述待識別客體圖像的來源類別相對應的相似度度量模型;計算執行子單元,用於利用所述度量模型選擇子單元所選的相似度度量模型計算所述客體特徵與註冊圖像客體特徵的相似度,作為輸出客體識別結果的依據。 An image recognition device of this embodiment includes a metric model training unit 501 for training a reference object image training set belonging to a preset source category and a comparison object image training set corresponding to a different source category to separately train Obtaining the similarity measurement models corresponding to different source categories in the measurement model set; an image acquisition unit 502 for acquiring an image of an object to be identified; and a feature extraction unit 503 for extracting an object of the image of the object to be identified Feature; a source category determination unit 504, configured to take the object feature as an input, and use a pre-trained object image source classification model to determine the source category of the object image to be identified; a similarity calculation unit 505, configured to: Select a similarity measurement model corresponding to the source category of the object image to be identified from the pre-trained measurement model set, and calculate the similarity between the object feature and the registered image object feature as the output object recognition result Basis; wherein the similarity calculation unit includes: a metric model selection subunit for A goodness measurement model set selects a similarity measurement model corresponding to the source category of the object image to be identified; a calculation execution subunit is configured to use the measurement model selection subunit to calculate a similarity measurement model The similarity between object features and registered image object features is used as the basis for outputting object recognition results.

可選的,所述裝置包括:來源分類模型訓練單元,用於在觸發所述來源類別確定單元工作之前,採用如下演算法訓練訓練所述客體圖像來源分類模型:Softmax演算法、多類SVM演算法、或者隨機森林演算法。 Optionally, the device includes: a source classification model training unit for training the object image source classification model by using the following algorithm training before triggering the source category determination unit to work: Softmax algorithm, multi-class SVM Algorithm, or random forest algorithm.

可選的,所述度量模型訓練單元具體用於,訓練對應不同來源類別的非對稱度量模型,所述非對稱度量模型是在參與比對的客體特徵服從各自高斯分佈的假設下、基於聯合貝葉斯臉建立的度量模型;所述度量模型訓練單元藉由如下子單元訓練對應於特定來源類別的非對稱度量模型:基準樣本提取子單元,用於提取屬於預設來源類別的基準客體圖像訓練集中各圖像的客體特徵,作為基準特徵樣本集; 比對樣本提取子單元,用於提取屬於所述特定來源類別的比對客體圖像訓練集中各圖像的客體特徵,作為比對特徵樣本集;度量模型建立子單元,用於在參與比對的客體特徵服從各自高斯分佈的假設下,建立包含參數的非對稱度量模型;模型參數求解子單元,用於根據上述兩類特徵樣本集中的樣本以及標識樣本是否屬於同一客體的身份標籤,求解所述非對稱度量模型中的參數,完成所述模型的訓練。 Optionally, the metric model training unit is specifically configured to train an asymmetric metric model corresponding to a different source category. The asymmetric metric model is based on the assumption that the object features participating in the comparison follow their respective Gaussian distributions, The metric model established by Ye's face; the metric model training unit trains an asymmetric metric model corresponding to a specific source category by the following subunits: a reference sample extraction subunit for extracting a reference object image belonging to a preset source category The object feature of each image in the training set is used as the reference feature sample set; the comparison sample extraction subunit is used to extract the object feature of each image in the comparison object image training set belonging to the specific source category as the comparison feature Sample set; metric model building sub-units, used to establish asymmetric metric models containing parameters under the assumption that the object features participating in the comparison obey their respective Gaussian distributions; model parameter solution sub-units, which are used to set sample sets based on the two types of features And the identity tags identifying whether the samples belong to the same object, Weigh the parameters in the model and complete the training of the model.

可選的,所述模型參數求解子單元具體用於,利用散度矩陣估算所述模型中的參數,或者,採用期望最大化演算法反覆運算求解所述模型中的參數。 Optionally, the model parameter solving subunit is specifically configured to estimate a parameter in the model by using a divergence matrix, or to repeatedly calculate the parameter in the model by using an expectation maximization algorithm.

可選的,所述計算執行子單元具體用於,計算所述客體特徵與對應特定身份的註冊圖像客體特徵的相似度;所述裝置還包括:第一閾值比對單元,用於判斷所述相似度是否大於預先設定的閾值;第一識別結果輸出單元,用於當所述第一閾值比對單元的輸出為是時,判定所述待識別客體圖像與所述對應特定身份的註冊圖像屬於同一客體,並將所述判定作為客體識別結果輸出。 Optionally, the calculation execution subunit is specifically configured to calculate a similarity between the object feature and a registered image object feature corresponding to a specific identity; the device further includes: a first threshold comparison unit for determining the Whether the similarity is greater than a preset threshold; a first recognition result output unit, configured to determine, when the output of the first threshold comparison unit is Yes, the registration of the object image to be identified and the corresponding specific identity The images belong to the same object, and the judgment is output as an object recognition result.

可選的,所述計算執行子單元具體用於,計算所述客體特徵與指定範圍內的註冊圖像客體特徵的相似度;所述裝置還包括: 第二閾值比對單元,用於判斷計算所得相似度中的最大值是否大於預先設定的閾值;第二識別結果輸出單元,用於當所述第二閾值比對單元的輸出為是時,判定所述待識別客體圖像在所述指定範圍內的註冊圖像中匹配成功,並將所述最大值對應的註冊圖像的相關身份資訊作為客體識別結果輸出。 Optionally, the calculation execution subunit is specifically configured to calculate a similarity between the object feature and a registered image object feature within a specified range; the device further includes: a second threshold value comparison unit for determining a calculation Whether the maximum value of the obtained similarity is greater than a preset threshold; a second recognition result output unit, configured to determine, when the output of the second threshold comparison unit is YES, that the object image to be identified is in the specified The registered images in the range match successfully, and the relevant identity information of the registered image corresponding to the maximum value is output as the object recognition result.

可選的,所述特徵提取單元具體用於,採用局部二值模式演算法提取所述客體特徵、採用Gabor小波變換演算法提取所述客體特徵、或者採用深度卷積網路提取所述客體特徵。 Optionally, the feature extraction unit is specifically configured to use a local binary mode algorithm to extract the object features, a Gabor wavelet transform algorithm to extract the object features, or a deep convolutional network to extract the object features. .

此外,本發明還提供一種度量學習方法。請參考圖6,其為本發明提供的一種度量學習方法的實施例的流程圖,本實施例與上述圖像識別方法實施例步驟相同的部分不再贅述,下面重點描述不同之處。本發明提供的一種度量學習方法包括: In addition, the present invention also provides a metric learning method. Please refer to FIG. 6, which is a flowchart of an embodiment of a metric learning method provided by the present invention. The steps in this embodiment that are the same as those in the foregoing embodiment of the image recognition method will not be repeated, and the differences will be mainly described below. A metric learning method provided by the present invention includes:

步驟601、提取屬於同一來源類別的基準客體圖像訓練集中各圖像的客體特徵,作為基準特徵樣本集。 Step 601: Extract the object features of each image in the reference object image training set belonging to the same source category as a reference feature sample set.

步驟602、提取屬於同一來源、但與所述基準客體圖像分屬不同來源類別的比對客體圖像訓練集中各圖像的客體特徵,作為比對特徵樣本集。 Step 602: Extract the object features of each image in the comparison object image training set belonging to the same source but belonging to different source categories from the reference object image as a comparison feature sample set.

步驟603、在參與比對的客體特徵服從各自高斯分佈的假設下,建立包含參數的非對稱度量模型。 Step 603: Under the assumption that the object features participating in the comparison obey the respective Gaussian distribution, establish an asymmetric metric model including parameters.

所述非對稱度量模型包括:基於聯合貝葉斯臉的非對稱度量模型;所述非對稱度量模型如下所示: The asymmetric metric model includes: an asymmetric metric model based on a joint Bayesian face; the asymmetric metric model is as follows:

步驟604、利用上述兩類特徵樣本集中的樣本,求解所述非對稱人臉相似度度量模型中的參數。 Step 604: Use the samples in the two types of feature sample sets to solve parameters in the asymmetric face similarity measurement model.

本步驟可以利用上述兩類特徵樣本集中的樣本,採用與所建立模型相應的演算法或者方式求解所述模型中的各個參數。例如,對於基於聯合貝葉斯臉的非對稱度量模型來說,可以根據上述兩類特徵樣本集中的樣本以及標識樣本是否屬於同一客體的身份標籤資訊,利用散度矩陣估算所述模型中的參數,或者,採用期望最大化演算法反覆運算求解所述模型中的參數。 In this step, the samples in the above two types of feature sample sets can be used to solve the parameters in the model by using algorithms or methods corresponding to the established model. For example, for an asymmetric metric model based on the joint Bayesian face, the parameters in the model can be estimated using the divergence matrix based on the samples in the two types of feature sample sets and identity tag information identifying whether the samples belong to the same object. Or, iteratively solve the parameters in the model using the expectation maximization algorithm.

本實施例提供的度量學習方法,可以用於學習非對稱人臉圖像的相似度度量模型,在這種應用場景下,所述基準客體圖像以及所述比對客體圖像包括:人臉圖像;所述客體特徵包括:人臉特徵。當然,在實際應用中,也可以將本實施例提供的度量學習方法用於學習其他非對稱客體圖像的相似度度量模型。 The metric learning method provided in this embodiment may be used to learn a similarity metric model of an asymmetric face image. In this application scenario, the reference object image and the comparison object image include: a human face. Image; the object features include: face features. Of course, in practical applications, the metric learning method provided in this embodiment may also be used to learn similarity metric models of other asymmetric object images.

本發明提供的度量學習方法,對傳統圖像識別技術中的假設進行了修改,即:參與比對的兩個客體樣本x和y可以分別服從各自高斯分佈、而不必共用參數,並在此基礎上從分屬不同來源類別的樣本集合中學習用於識別非對稱客體的相似度度量模型,從而為適應各種圖像來源的高性能客體識別提供了基礎。 The metric learning method provided by the present invention modifies the assumptions in the traditional image recognition technology, that is, two object samples x and y participating in the comparison can obey their respective Gaussian distributions without sharing parameters, and based on this In the above, the similarity measurement model for identifying asymmetric objects is learned from a sample set belonging to different source categories, thereby providing a basis for high-performance object recognition adapted to various image sources.

在上述的實施例中,提供了一種度量學習方法,與之相對應的,本發明還提供一種度量學習裝置。請參看圖7,其為本發明的一種度量學習裝置的實施例示意圖。由於裝置實施例基本相似於方法實施例,所以描述得比較簡單,相關之處參見方法實施例的部分說明即可。下述描述的裝置實施例僅僅是示意性的。 In the above embodiments, a metric learning method is provided. Correspondingly, the present invention also provides a metric learning device. Please refer to FIG. 7, which is a schematic diagram of an embodiment of a metric learning apparatus according to the present invention. Since the device embodiment is basically similar to the method embodiment, it is described relatively simply. For the relevant part, refer to the description of the method embodiment. The device embodiments described below are only schematic.

本實施例的一種度量學習裝置,包括:基準樣本提取單元701,用於提取屬於同一來源類別的基準客體圖像訓練集中各圖像的人臉特徵,作為基準特徵樣本集;比對樣本提取單元702,用於提取屬於同一來源類別、但與所述基準客體圖像分屬不同來源類別的比對客體圖像訓練集中各圖像的客體特徵,作為比對特徵樣本集;非對稱度量模型建立單元703,用於在參與比對的客體特徵服從各自高斯分佈的假設下,建立包含參數的非對稱度量模型;度量模型參數求解單元704,用於利用上述兩類特徵樣本集中的樣本,求解所述非對稱度量模型中的參數。 A metric learning device of this embodiment includes a reference sample extraction unit 701 for extracting face features of each image in a reference object image training set belonging to the same source category as a reference feature sample set; a comparison sample extraction unit 702, for extracting object features of each image in the comparison object image training set belonging to the same source category but belonging to different source categories from the reference object image as a comparison feature sample set; establishing an asymmetric metric model A unit 703 is configured to establish an asymmetric metric model including parameters under the assumption that the object features participating in the comparison obey their respective Gaussian distributions; the metric model parameter solving unit 704 is configured to use the samples in the two types of feature sample sets to solve the problem Describe the parameters in the asymmetric metric model.

可選的,所述非對稱度量模型建立單元建立的度量模型包括:基於聯合貝葉斯臉的非對稱度量模型。 Optionally, the measurement model established by the asymmetric measurement model establishing unit includes: an asymmetric measurement model based on a joint Bayesian face.

可選的,所述度量模型參數求解單元具體用於,利用散度矩陣估算所述模型中的參數,或者,採用期望最大化演算法反覆運算求解所述模型中的參數。 Optionally, the metric model parameter solving unit is specifically configured to estimate a parameter in the model using a divergence matrix, or to repeatedly calculate the parameter in the model using an expectation maximization algorithm.

此外,本發明還提供一種圖像來源識別方法。請參考圖8,其為本發明提供的一種圖像來源識別方法的實施例的流程圖,本實施例與上述實施例步驟相同的部分不再贅 述,下面重點描述不同之處。本發明提供的一種圖像來源識別方法包括: In addition, the invention also provides a method for identifying an image source. Please refer to FIG. 8, which is a flowchart of an embodiment of an image source identification method according to the present invention. The steps in this embodiment that are the same as those in the foregoing embodiment are not described again, and the differences are mainly described below. An image source identification method provided by the present invention includes:

步驟801、採集屬於不同來源類別的客體圖像集,並從中提取客體特徵組成訓練樣本集合。 Step 801: Collect object image sets belonging to different source categories, and extract object features from them to form a training sample set.

步驟802、利用所述訓練樣本集合中的客體特徵樣本及其來源類別,訓練客體圖像來源分類模型。 Step 802: Use an object feature sample and its source category in the training sample set to train an object image source classification model.

所述客體圖像來源分類模型通常為多類分類模型,在具體實施時,可以採用以下演算法訓練所述客體圖像來源分類模型:Softmax演算法、多類SVM演算法、或者隨機森林演算法。 The object image source classification model is usually a multi-class classification model. In specific implementation, the following algorithm can be used to train the object image source classification model: Softmax algorithm, multi-class SVM algorithm, or random forest algorithm. .

步驟803、從待分類客體圖像中提取客體特徵。 Step 803: Extract object features from the object images to be classified.

步驟804、以上述提取的客體特徵為輸入,採用所述客體圖像來源分類模型識別所述待分類客體圖像的來源類別。 Step 804: Take the extracted object features as input, and use the object image source classification model to identify the source category of the object image to be classified.

本實施例提供的圖像來源識別方法,可以用於識別人臉圖像的來源類別,在這種應用場景下,所述客體圖像包括:人臉圖像;所述客體特徵包括:人臉特徵;所述預先訓練的客體圖像來源分類模型則是指人臉圖像來源分類模型。當然,在實際應用中,也可以採用本方法識別其他客體圖像的來源類別。 The image source recognition method provided in this embodiment can be used to identify the source category of a face image. In this application scenario, the object image includes: a face image; and the object characteristics include: a human face Feature; the pre-trained object image source classification model refers to a face image source classification model. Of course, in practical applications, this method can also be used to identify the source category of other object images.

本發明提供的圖像來源識別方法,能夠有效識別客體圖像的來源類別,從而為在客體圖像識別過程中選擇正確的相似度度量模型提供依據,保障了識別結果的正確性。 The image source recognition method provided by the present invention can effectively identify the source category of the object image, thereby providing a basis for selecting the correct similarity measurement model in the object image recognition process, and ensuring the correctness of the recognition result.

在上述的實施例中,提供了一種圖像來源識別方法, 與之相對應的,本發明還提供一種圖像來源識別裝置。請參看圖9,其為本發明的一種圖像來源識別裝置的實施例示意圖。由於裝置實施例基本相似於方法實施例,所以描述得比較簡單,相關之處參見方法實施例的部分說明即可。下述描述的裝置實施例僅僅是示意性的。 In the above embodiment, an image source identification method is provided. Correspondingly, the present invention also provides an image source identification device. Please refer to FIG. 9, which is a schematic diagram of an embodiment of an image source recognition device according to the present invention. Since the device embodiment is basically similar to the method embodiment, it is described relatively simply. For the relevant part, refer to the description of the method embodiment. The device embodiments described below are only schematic.

本實施例的一種圖像來源識別裝置,包括:訓練樣本採集單元901,用於採集屬於不同來源類別的客體圖像集,並從中提取客體特徵組成訓練樣本集合;分類模型訓練單元902,用於利用所述訓練樣本集合中的客體特徵樣本及其來源類別,訓練客體圖像來源分類模型;待分類特徵提取單元903,用於從待分類客體圖像中提取客體特徵;來源類別識別單元904,用於以所述待分類特徵提取單元提取的客體特徵為輸入,採用所述客體圖像來源分類模型識別所述待分類客體圖像的來源類別。 An image source recognition device in this embodiment includes: a training sample acquisition unit 901, configured to collect object image sets belonging to different source categories, and extract object features from the training image collection to form a training sample set; a classification model training unit 902, configured to: Using the object feature samples and their source categories in the training sample set to train an object image source classification model; a feature to be classified feature extraction unit 903 for extracting object features from the subject image to be classified; a source category recognition unit 904, It is used to take the object feature extracted by the feature to-be-classified extraction unit as an input, and use the object image source classification model to identify the source category of the to-be-classified object image.

可選的,所述客體圖像來源分類模型包括:多類分類模型;所述分類模型訓練單元具體用於,利用softmax演算法、多類SVM演算法、或者隨機森林演算法訓練所述客體圖像來源分類模型。 Optionally, the object image source classification model includes: a multi-class classification model; the classification model training unit is specifically configured to train the object map by using a softmax algorithm, a multi-class SVM algorithm, or a random forest algorithm Like source classification model.

本發明雖然以較佳實施例公開如上,但其並不是用來限定本發明,任何本領域技術人員在不脫離本發明的精神和範圍內,都可以做出可能的變動和修改,因此本發明的保護範圍應當以本案申請專利範圍所界定的範圍為准。 Although the present invention is disclosed as above with the preferred embodiments, it is not intended to limit the present invention. Any person skilled in the art can make possible changes and modifications without departing from the spirit and scope of the present invention. Therefore, the present invention The scope of protection shall be subject to the scope defined by the scope of patent application for this case.

在一個典型的配置中,計算設備包括一個或多個處理 器(CPU)、輸入/輸出介面、網路介面和記憶體。 In a typical configuration, a computing device includes one or more processors (CPUs), input / output interfaces, network interfaces, and memory.

記憶體可能包括電腦可讀媒體中的非永久性記憶體,隨機存取記憶體(RAM)和/或非易失性記憶體等形式,如唯讀記憶體(ROM)或快閃記憶體(flash RAM)。記憶體是電腦可讀媒體的示例。 Memory may include non-permanent memory, random access memory (RAM), and / or non-volatile memory in computer-readable media, such as read-only memory (ROM) or flash memory ( flash RAM). Memory is an example of a computer-readable medium.

1、電腦可讀媒體包括永久性和非永久性、可移動和非可移動媒體可以由任何方法或技術來實現資訊儲存。資訊可以是電腦可讀指令、資料結構、程式的模組或其他資料。電腦的儲存媒體的例子包括,但不限於相變記憶體(PRAM)、靜態隨機存取記憶體(SRAM)、動態隨機存取記憶體(DRAM)、其他類型的隨機存取記憶體(RAM)、唯讀記憶體(ROM)、電可抹除可程式唯讀記憶體(EEPROM)、快閃記憶體或其他記憶體技術、唯讀光碟唯讀記憶體(CD-ROM)、數位多功能光碟(DVD)或其他光學儲存、磁盒式磁帶,磁帶磁片儲存或其他磁性存放裝置或任何其他非傳輸媒體,可用於儲存可以被計算設備存取的資訊。按照本文中的界定,電腦可讀媒體不包括非暫存電腦可讀媒體(transitory media),如調變的資料信號和載波。 1. Computer-readable media include permanent and non-permanent, removable and non-removable media. Information can be stored by any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), and other types of random access memory (RAM) , Read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, read-only disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic tape cartridges, magnetic tape storage or other magnetic storage devices, or any other non-transmitting media, may be used to store information that can be accessed by computing devices. According to the definition in this article, computer-readable media does not include non-transitory computer-readable media (such as modulated data signals and carrier waves).

2、本領域技術人員應明白,本發明的實施例可提供為方法、系統或電腦程式產品。因此,本發明可採用完全硬體實施例、完全軟體實施例或結合軟體和硬體方面的實施例的形式。而且,本發明可採用在一個或多個其中包含有電腦可用程式碼的電腦可用儲存媒體(包括但不限於磁 碟記憶體、CD-ROM、光學記憶體等)上實施的電腦程式產品的形式。 2. Those skilled in the art should understand that the embodiments of the present invention may be provided as a method, a system, or a computer program product. Therefore, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk memory, CD-ROM, optical memory, etc.) containing computer-usable code therein. .

Claims (35)

一種圖像識別方法,其特徵在於,包括:獲取待識別客體圖像;提取所述待識別客體圖像的客體特徵;從預先訓練好的度量模型集合中選擇與所述待識別客體圖像的來源類別相對應的相似度度量模型,並計算所述客體特徵與註冊圖像客體特徵的相似度,作為輸出客體識別結果的依據;其中,所述度量模型集合包含至少一個相似度度量模型,不同的相似度度量模型分別與客體圖像的不同來源類別相對應。     An image recognition method, comprising: obtaining an object image to be identified; extracting the object features of the object image to be identified; and selecting a target image from the set of pre-trained metric models. A similarity measurement model corresponding to the source category, and calculating the similarity between the object feature and the registered image object feature as a basis for outputting the object recognition result; wherein the set of measurement models includes at least one similarity measurement model, which is different The similarity measurement models correspond to different source categories of object images.     根據申請專利範圍第1項所述的圖像識別方法,其中,所述度量模型集合中對應不同來源類別的各相似度度量模型,是利用屬於預設來源類別的基準客體圖像訓練集、以及對應不同來源類別的比對客體圖像訓練集分別訓練得到的。     The image recognition method according to item 1 of the scope of the patent application, wherein each of the similarity measurement models corresponding to different source categories in the measurement model set is a training set of reference object images belonging to a preset source category, and Corresponding object image training sets corresponding to different source categories are separately trained.     根據申請專利範圍第2項所述的圖像識別方法,其中,所述基準客體圖像訓練集中的客體圖像與所述註冊圖像屬於相同的來源類別。     The image recognition method according to item 2 of the scope of the patent application, wherein the object image in the reference object image training set and the registered image belong to the same source category.     根據申請專利範圍第1項所述的圖像識別方法,其中,在所述從預先訓練好的度量模型集合中選擇與所述待識別客體圖像的來源類別相對應的相似度度量模型的步驟之前,執行下述操作:以所述客體特徵為輸入,利用預先訓練好的客體圖像 來源分類模型,確定所述待識別客體圖像的來源類別。     The image recognition method according to item 1 of the scope of patent application, wherein the step of selecting a similarity measure model corresponding to the source category of the object image to be identified from the pre-trained measure model set Before, the following operations are performed: using the object feature as an input and using a pre-trained object image source classification model to determine the source category of the object image to be identified.     根據申請專利範圍第4項所述的圖像識別方法,其中,所述客體圖像來源分類模型是採用如下演算法訓練得到的多類分類模型:Softmax演算法、多類SVM演算法、或者隨機森林演算法。     The image recognition method according to item 4 of the scope of the patent application, wherein the object image source classification model is a multi-class classification model trained using the following algorithm: Softmax algorithm, multi-class SVM algorithm, or random Forest algorithm.     根據申請專利範圍第1項所述的圖像識別方法,其中,所述相似度度量模型包括:在參與比對的客體特徵服從各自高斯分佈的假設下、建立的非對稱度量模型。     The image recognition method according to item 1 of the scope of patent application, wherein the similarity measurement model includes an asymmetric measurement model established under the assumption that the object features participating in the comparison obey their respective Gaussian distributions.     根據申請專利範圍第6項所述的圖像識別方法,其中,所述非對稱度量模型包括:基於聯合貝葉斯臉的非對稱度量模型;對應於特定來源類別的上述非對稱度量模型是採用如下步驟訓練得到的:提取屬於預設來源類別的基準客體圖像訓練集中各圖像的客體特徵,作為基準特徵樣本集;提取屬於所述特定來源類別的比對客體圖像訓練集中各圖像的客體特徵,作為比對特徵樣本集;在參與比對的客體特徵服從各自高斯分佈的假設下,建立包含參數的非對稱度量模型;根據上述兩類特徵樣本集中的樣本以及標識樣本是否屬於同一客體的身份標籤,求解所述非對稱度量模型中的參數,完成所述模型的訓練。     The image recognition method according to item 6 of the scope of patent application, wherein the asymmetric metric model includes: an asymmetric metric model based on a joint Bayesian face; the asymmetric metric model corresponding to a specific source category is adopted Obtained by training in the following steps: extracting the object features of each image in the reference object image training set belonging to a preset source category as a reference feature sample set; extracting each image in the comparison object image training set belonging to the specific source category Object features as the comparison feature sample set; under the assumption that the object features participating in the comparison obey their respective Gaussian distributions, an asymmetric metric model containing parameters is established; based on the samples in the two types of feature sample sets and whether the samples belong to the same The identity label of the object, the parameters in the asymmetric metric model are solved, and the training of the model is completed.     根據申請專利範圍第7項所述的圖像識別方法,其 中,所述對應於特定來源類別的非對稱度量模型如下所示: A=( S xx + T xx ) -1- E B=( S yy + T yy ) -1- F G=-( S xx + T xx - S xy ( S yy + T yy ) -1 S yx ) -1 S xy ( S yy + T yy ) -1 E=( S xx + T xx - S xy ( S yy+ T yy ) -1 S yx ) -1 F=( S yy + T yy - S yx ( S xx + T xx ) -1 S xy ) -1其中,假設基準特徵樣本集X中的樣本 x= μ x + ε x μ x ε x 服從均值為0,協方差矩陣為S xx和T xx的高斯分佈,比對特徵樣本集Y中的樣本 y= μ y + ε y μ y ε y 服從均值為0,協方差矩陣為S yy和T yy的高斯分佈,S xy和S yx是X和Y之間的互協方差矩陣;r(x,y)為基於類內/類間對數似然比計算的相似度;所述求解所述非對稱度量模型中的參數包括:求解S xx、T xx、S yy、T yy、S xy、和S yxThe image recognition method according to item 7 of the scope of patent application, wherein the asymmetric metric model corresponding to a specific source category is as follows: A = ( S xx + T xx ) -1 - EB = ( S yy + T yy ) -1 - FG =-( S xx + T xx - S xy ( S yy + T yy ) -1 S yx ) -1 S xy ( S yy + T yy ) -1 E = ( S xx + T xx - S xy ( S yy + T yy ) -1 S yx ) -1 F = ( S yy + T yy - S yx ( S xx + T xx) -1 S xy) -1 wherein x is assumed that a reference sample wherein the sample set X = μ x + ε x, μ x , and [epsilon] x with mean 0 and covariance matrix S xx and the T xx Gaussian distribution, comparing samples in the feature sample set Y with y = μ y + ε y , μ y and ε y obey the mean of 0, the covariance matrix is Gaussian distribution of S yy and T yy , S xy and S yx are X The cross-covariance matrix between Y and Y; r (x, y) is the similarity calculated based on the intra-class / inter-class log-likelihood ratio; the parameters in the solution of the asymmetric metric model include: solving S xx , T xx , S yy , Ty y , S xy , and S yx . 根據申請專利範圍第7項所述的圖像識別方法,其中,所述求解所述非對稱度量模型中的參數包括:利用散度矩陣估算所述模型中的參數;或者,採用期望最大化演算法反覆運算求解所述模型中的參數。     The image recognition method according to item 7 of the scope of patent application, wherein the solving the parameters in the asymmetric metric model includes: estimating a parameter in the model using a divergence matrix; or using an expectation maximization algorithm The method iteratively solves the parameters in the model.     根據申請專利範圍第1項所述的圖像識別方法, 其中,所述計算所述客體特徵與註冊圖像客體特徵的相似度,包括:計算所述客體特徵與對應特定身份的註冊圖像客體特徵的相似度;在上述計算相似度的步驟後,執行下述操作:判斷所述相似度是否大於預先設定的閾值;若是,判定所述待識別客體圖像與所述對應特定身份的註冊圖像屬於同一客體,並將所述判定作為客體識別結果輸出。     The image recognition method according to item 1 of the scope of patent application, wherein the calculating the similarity between the object feature and the registered image object feature comprises: calculating the object feature and a registered image object corresponding to a specific identity Similarity of features; after the above step of calculating similarity, perform the following operations: determine whether the similarity is greater than a preset threshold; if so, determine the registration image of the object to be identified and the corresponding specific identity The images belong to the same object, and the judgment is output as an object recognition result.     根據申請專利範圍第1項所述的圖像識別方法,其中,所述計算所述客體特徵與註冊圖像客體特徵的相似度,包括:計算所述客體特徵與指定範圍內的註冊圖像客體特徵的相似度;在上述計算相似度的步驟後,執行下述操作:判斷計算所得相似度中的最大值是否大於預先設定的閾值;若是,判定所述待識別客體圖像在所述指定範圍內的註冊圖像中匹配成功,並將所述最大值對應的註冊圖像的相關身份資訊作為客體識別結果輸出。     The image recognition method according to item 1 of the scope of patent application, wherein the calculating the similarity between the object feature and the registered image object feature comprises: calculating the object feature and a registered image object within a specified range Similarity of features; after the above step of calculating similarity, perform the following operations: determine whether the maximum value of the calculated similarity is greater than a preset threshold; if yes, determine that the object image to be identified is in the specified range The registered image in the image is successfully matched, and the relevant identity information of the registered image corresponding to the maximum value is output as an object recognition result.     根據申請專利範圍第1-11項中任一項所述的圖像識別方法,其中,所述提取所述待識別客體圖像的客體特徵,包括:採用局部二值模式演算法提取所述客體特徵;或者, 採用Gabor小波變換演算法提取所述客體特徵;或者,採用深度卷積網路提取所述客體特徵。     The image recognition method according to any one of claims 1-11, wherein the extracting the object features of the object image to be identified includes: using a local binary mode algorithm to extract the object Features; or, Gabor wavelet transform algorithm is used to extract the object features; or deep convolutional network is used to extract the object features.     根據申請專利範圍第1-11項中任一項所述的圖像識別方法,其中,所述待識別客體圖像包括:待識別人臉圖像;所述客體特徵包括:人臉特徵。     The image recognition method according to any one of claims 1-11, wherein the object image to be identified includes: a face image to be identified; and the object characteristics include: face characteristics.     根據申請專利範圍第13項所述的圖像識別方法,其中,所述來源類別包括:證件照、生活照、視頻截圖、掃描圖像、翻拍圖像、或者監控畫面。     The image recognition method according to item 13 of the scope of patent application, wherein the source category includes: a photo of a photo, a photo of a life, a screenshot of a video, a scanned image, a reprinted image, or a monitoring screen.     一種圖像識別裝置,其特徵在於,包括:圖像獲取單元,用於獲取待識別客體圖像;特徵提取單元,用於提取所述待識別客體圖像的客體特徵;相似度計算單元,用於從預先訓練好的度量模型集合中選擇與所述待識別客體圖像的來源類別相對應的相似度度量模型,並計算所述客體特徵與註冊圖像客體特徵的相似度,作為輸出客體識別結果的依據;其中,所述相似度計算單元包括:度量模型選擇子單元,用於從預先訓練好的度量模型集合中選擇與所述待識別客體圖像的來源類別相對應的相似度度量模型;計算執行子單元,用於利用所述度量模型選擇子單元所選的相似度度量模型計算所述客體特徵與註冊圖像客體 特徵的相似度,作為輸出客體識別結果的依據。     An image recognition device, comprising: an image acquisition unit for acquiring an object image to be identified; a feature extraction unit for extracting object characteristics of the object image to be identified; a similarity calculation unit for Selecting a similarity measurement model corresponding to the source category of the object image to be identified from a set of pre-trained measurement models, and calculating the similarity between the object feature and the registered image object feature as output object recognition The basis of the results; wherein the similarity calculation unit includes: a metric model selection subunit for selecting a similarity metric model corresponding to the source category of the object image to be identified from a pre-trained metric model set A calculation execution subunit, configured to use the similarity metric model selected by the metric model selection subunit to calculate the similarity between the object feature and the registered image object feature as a basis for outputting the object recognition result.     根據申請專利範圍第15項所述的圖像識別裝置,其中,包括:度量模型訓練單元,用於利用屬於預設來源類別的基準客體圖像訓練集、以及對應不同來源類別的比對客體圖像訓練集,分別訓練得到所述度量模型集合中對應不同來源類別的各相似度度量模型。     The image recognition device according to item 15 of the scope of patent application, further comprising: a metric model training unit for utilizing a reference object image training set belonging to a preset source category, and a comparison object map corresponding to a different source category Like the training set, the similarity metric models corresponding to different source categories in the metric model set are trained separately.     根據申請專利範圍第15項所述的圖像識別裝置,其中,包括:來源類別確定單元,用於在觸發所述相似度計算單元工作之前,以所述客體特徵為輸入,利用預先訓練好的客體圖像來源分類模型,確定所述待識別客體圖像的來源類別。     The image recognition device according to item 15 of the scope of patent application, further comprising: a source category determination unit configured to use the object feature as an input and utilize a pre-trained source before triggering the work of the similarity calculation unit. The object image source classification model determines the source category of the object image to be identified.     根據申請專利範圍第17項所述的圖像識別裝置,其中,包括:來源分類模型訓練單元,用於在觸發所述來源類別確定單元工作之前,採用如下演算法訓練訓練所述客體圖像來源分類模型:Softmax演算法、多類SVM演算法、或者隨機森林演算法。     The image recognition device according to item 17 of the scope of patent application, further comprising: a source classification model training unit for training the object image source by using the following algorithm training before triggering the source category determination unit to work Classification model: Softmax algorithm, multi-class SVM algorithm, or random forest algorithm.     根據申請專利範圍第15項所述的圖像識別裝置,其中,包括:度量模型訓練單元,用於訓練所述度量模型集合中的各相似度度量模型,所述相似度度量模型包括:在參與比對的客體特徵服從各自高斯分佈的假設下、基於聯合貝葉 斯臉建立的非對稱度量模型;所述度量模型訓練單元藉由如下子單元訓練對應於特定來源類別的上述非對稱度量模型:基準樣本提取子單元,用於提取屬於預設來源類別的基準客體圖像訓練集中各圖像的客體特徵,作為基準特徵樣本集;比對樣本提取子單元,用於提取屬於所述特定來源類別的比對客體圖像訓練集中各圖像的客體特徵,作為比對特徵樣本集;度量模型建立子單元,用於在參與比對的客體特徵服從各自高斯分佈的假設下,建立包含參數的非對稱度量模型;模型參數求解子單元,用於根據上述兩類特徵樣本集中的樣本以及標識樣本是否屬於同一客體的身份標籤,求解所述非對稱度量模型中的參數,完成所述模型的訓練。     The image recognition device according to item 15 of the scope of patent application, further comprising: a metric model training unit configured to train each similarity metric model in the metric model set, the similarity metric model includes: participating in The object features of the comparison are subject to the asymmetric metric model based on the joint Bayesian face under the assumption of respective Gaussian distributions; the metric model training unit trains the asymmetric metric model corresponding to a specific source category by the following subunits: A reference sample extraction subunit is used to extract object features of each image in a reference object image training set belonging to a preset source category as a reference feature sample set; a comparison sample extraction subunit is used to extract a belonging to the specific source category The object features of each image in the comparison object image training set are used as the comparison feature sample set; the measurement model establishment subunit is used to establish non-contained non-contained parameters under the assumption that the object features participating in the comparison obey their respective Gaussian distributions. Symmetric metric model; model parameter solving sub-unit for This sample identification and object belong to the same identity tag, solving the asymmetric metric model, completion of the training of the model.     根據申請專利範圍第19項所述的圖像識別裝置,其中,所述模型參數求解子單元具體用於,利用散度矩陣估算所述模型中的參數,或者,採用期望最大化演算法反覆運算求解所述模型中的參數。     The image recognition device according to item 19 of the scope of patent application, wherein the model parameter solving subunit is specifically configured to estimate a parameter in the model by using a divergence matrix, or to repeatedly perform an operation using an expectation maximization algorithm Solve parameters in the model.     根據申請專利範圍第15項所述的圖像識別裝置,其中,所述計算執行子單元具體用於,計算所述客體特徵與對應特定身份的註冊圖像客體特徵的相似度;所述裝置還包括:第一閾值比對單元,用於判斷所述相似度是否大於預 先設定的閾值;第一識別結果輸出單元,用於當所述第一閾值比對單元的輸出為是時,判定所述待識別客體圖像與所述對應特定身份的註冊圖像屬於同一客體,並將所述判定作為客體識別結果輸出。     The image recognition device according to item 15 of the scope of patent application, wherein the calculation execution subunit is specifically configured to calculate a similarity between the object feature and a registered image object feature corresponding to a specific identity; the device further The method includes: a first threshold comparison unit for determining whether the similarity is greater than a preset threshold; a first recognition result output unit for determining that when the output of the first threshold comparison unit is yes; The object image to be identified belongs to the same object as the registered image corresponding to the specific identity, and the determination is output as an object recognition result.     根據申請專利範圍第15項所述的圖像識別裝置,其中,所述計算執行子單元具體用於,計算所述客體特徵與指定範圍內的註冊圖像客體特徵的相似度;所述裝置還包括:第二閾值比對單元,用於判斷計算所得相似度中的最大值是否大於預先設定的閾值;第二識別結果輸出單元,用於當所述第二閾值比對單元的輸出為是時,判定所述待識別客體圖像在所述指定範圍內的註冊圖像中匹配成功,並將所述最大值對應的註冊圖像的相關身份資訊作為客體識別結果輸出。     The image recognition device according to item 15 of the scope of patent application, wherein the calculation execution subunit is specifically configured to calculate a similarity between the object feature and a registered image object feature within a specified range; the device further The second threshold comparison unit is used to determine whether the maximum value in the calculated similarity is greater than a preset threshold; the second recognition result output unit is used to output a yes value when the output of the second threshold comparison unit is yes. , Determining that the object image to be identified is successfully matched in the registered images within the specified range, and outputting related identity information of the registered image corresponding to the maximum value as an object recognition result.     根據申請專利範圍第15-22項中任一項所述的圖像識別裝置,其中,所述特徵提取單元具體用於,採用局部二值模式演算法提取所述客體特徵、採用Gabor小波變換演算法提取所述客體特徵、或者採用深度卷積網路提取所述客體特徵。     The image recognition device according to any one of claims 15-22, wherein the feature extraction unit is specifically configured to use a local binary mode algorithm to extract the object features, and use a Gabor wavelet transform algorithm. Method to extract the object features, or use a deep convolution network to extract the object features.     一種度量學習方法,其特徵在於,包括:提取屬於同一來源類別的基準客體圖像訓練集中各圖像的客體特徵,作為基準特徵樣本集;提取屬於同一來源類別、但與所述基準客體圖像分屬 不同來源類別的比對客體圖像訓練集中各圖像的客體特徵,作為比對特徵樣本集;在參與比對的客體特徵服從各自高斯分佈的假設下,建立包含參數的非對稱度量模型;利用上述兩類特徵樣本集中的樣本,求解所述非對稱度量模型中的參數。     A metric learning method, comprising: extracting object features of each image belonging to a reference object image training set belonging to the same source category as a reference feature sample set; extracting the object source belonging to the same source category but similar to the reference object image The object features of each image in the comparison object image training set belonging to different source categories are used as the comparison feature sample set; under the assumption that the object features participating in the comparison obey their respective Gaussian distributions, an asymmetric metric model containing parameters is established ; Using the samples in the above two types of feature sample sets to solve the parameters in the asymmetric metric model.     根據申請專利範圍第24項所述的度量學習方法,其中,所述非對稱度量模型包括:基於聯合貝葉斯臉的非對稱度量模型;所述非對稱度量模型如下所示: A=( S xx + T xx ) -1- E B=( S yy + T yy ) -1- F G=-( S xx + T xx - S xy ( S yy + T yy ) -1 S yx ) -1 S xy ( S yy + T yy ) -1 E=( S xx + T xx - S xy ( S yy + T yy ) -1 S yx ) -1 F=( S yy + T yy - S yx ( S xx + T xx ) -1 S xy ) -1其中,假設基準特徵樣本集空間X中的樣本 x= μ x + ε x μ x ε x 服從均值為0,協方差矩陣為S xx和T xx的高斯分佈,比對特徵樣本集空間Y中的樣本 y= μ y + ε y μ y ε y 服從均值為0,協方差矩陣為S yy和T yy的高斯分佈,S xy和S yx是X和Y之間的互協方差矩陣;r(x,y)為基於類內/類間對數似然比計算的相似度; 所述求解所述非對稱度量模型中的參數包括:求解S xx、T xx、S yy、T yy、S xy、和S yxThe metric learning method according to item 24 of the scope of patent application, wherein the asymmetric metric model includes: an asymmetric metric model based on a joint Bayesian face; the asymmetric metric model is as follows: A = ( S xx + T xx ) -1 - EB = ( S yy + T yy ) -1 - FG =-( S xx + T xx - S xy ( S yy + T yy ) -1 S yx ) -1 S xy ( S yy + T yy ) -1 E = ( S xx + T xx - S xy ( S yy + T yy ) -1 S yx ) -1 F = ( S yy + T yy - S yx ( S xx + T xx) -1 S xy) -1 wherein, assuming that the reference feature set of samples in the sample space X x = μ x + ε x, μ x , and ε x with mean 0 and covariance matrix S xx and T xx Gaussian distribution, comparing samples in the feature sample set space Y with y = μ y + ε y , μ y and ε y obey the mean value 0, the covariance matrix is the Gaussian distribution of S yy and T yy , S xy and S yx Is the cross covariance matrix between X and Y; r (x, y) is the similarity calculated based on the intra-class / inter-class log-likelihood ratio; the parameters in the asymmetric metric model are: xx , T xx , S yy , Ty y , S xy , and S yx . 根據申請專利範圍第25項所述的度量學習方法,其中,所述求解所述非對稱度量模型中的參數包括:利用散度矩陣估算所述模型中的參數;或者,採用期望最大化演算法反覆運算求解所述模型中的參數。     The metric learning method according to item 25 of the scope of patent application, wherein the solving the parameters in the asymmetric metric model includes: using a divergence matrix to estimate the parameters in the model; or using an expectation maximization algorithm Iterative operations solve the parameters in the model.     根據申請專利範圍第24-26項中任一項所述的度量學習方法,其中,所述基準客體圖像以及所述比對客體圖像包括:人臉圖像;所述客體特徵包括:人臉特徵。     The metric learning method according to any one of claims 24-26, wherein the reference object image and the comparison object image include: a face image; and the object characteristics include: a person Face features.     一種度量學習裝置,其特徵在於,包括:基準樣本提取單元,用於提取屬於同一來源類別的基準客體圖像訓練集中各圖像的客體特徵,作為基準特徵樣本集;比對樣本提取單元,用於提取屬於同一來源類別、但與所述基準客體圖像分屬不同來源類別的比對客體圖像訓練集中各圖像的客體特徵,作為比對特徵樣本集;非對稱度量模型建立單元,用於在參與比對的客體特徵服從各自高斯分佈的假設下,建立包含參數的非對稱度量模型;度量模型參數求解單元,用於利用上述兩類特徵樣本集中的樣本,求解所述非對稱度量模型中的參數。     A metric learning device, comprising: a reference sample extraction unit for extracting object features of each image in a reference object image training set belonging to the same source category as a reference feature sample set; a comparison sample extraction unit, The object feature of each image in the comparison object image training set that belongs to the same source category but belongs to a different source category than the reference object image is used as a comparison feature sample set; the asymmetric metric model building unit uses Under the assumption that the object features participating in the comparison obey their respective Gaussian distributions, an asymmetric metric model containing parameters is established; a metric model parameter solving unit is used to solve the asymmetric metric model using samples from the two types of feature sample sets described above Parameters.     根據申請專利範圍第28項所述的度量學習裝置,其中,所述非對稱度量模型建立單元建立的度量模型包 括:基於聯合貝葉斯臉的非對稱度量模型。     The metric learning device according to item 28 of the scope of the patent application, wherein the metric model established by the asymmetric metric model establishing unit includes an asymmetric metric model based on a joint Bayesian face.     根據申請專利範圍第29項所述的度量學習裝置,其中,所述度量模型參數求解單元具體用於,利用散度矩陣估算所述模型中的參數,或者,採用期望最大化演算法反覆運算求解所述模型中的參數。     The metric learning device according to item 29 of the scope of patent application, wherein the metric model parameter solving unit is specifically configured to estimate a parameter in the model by using a divergence matrix, or iteratively solve using an expectation maximization algorithm Parameters in the model.     一種圖像來源識別方法,其特徵在於,包括:採集屬於不同來源類別的客體圖像集,並從中提取客體特徵組成訓練樣本集合;利用所述訓練樣本集合中的客體特徵樣本及其來源類別,訓練客體圖像來源分類模型;從待分類客體圖像中提取客體特徵;以上述提取的客體特徵為輸入,採用所述客體圖像來源分類模型識別所述待分類客體圖像的來源類別。     An image source recognition method, comprising: collecting object image sets belonging to different source categories, and extracting object features from them to form a training sample set; using the object feature samples in the training sample set and their source categories, Training an object image source classification model; extracting an object feature from the object image to be classified; and using the extracted object feature as an input, using the object image source classification model to identify the source category of the object image to be classified.     根據申請專利範圍第31項所述的圖像來源識別方法,其中,所述客體圖像來源分類模型是採用如下演算法訓練得到的多類分類模型:softmax演算法、多類SVM演算法、或者隨機森林演算法。     The method for identifying an image source according to item 31 of the scope of the patent application, wherein the object image source classification model is a multi-class classification model trained using the following algorithm: softmax algorithm, multi-class SVM algorithm, or Random forest algorithm.     根據申請專利範圍第31或32項所述的圖像來源識別方法,其中,所述客體圖像包括:人臉圖像;所述客體特徵包括:人臉特徵。     The method for identifying an image source according to item 31 or 32 of the scope of the patent application, wherein the object image includes: a face image; and the object feature includes: a face feature.     一種圖像來源識別裝置,其特徵在於,包括:訓練樣本採集單元,用於採集屬於不同來源類別的客體圖像集,並從中提取客體特徵組成訓練樣本集合; 分類模型訓練單元,用於利用所述訓練樣本集合中的客體特徵樣本及其來源類別,訓練圖像來源分類模型;待分類特徵提取單元,用於從待分類客體圖像中提取客體特徵;來源類別識別單元,用於以所述待分類特徵提取單元提取的客體特徵為輸入,採用所述客體圖像來源分類模型識別所述待分類客體圖像的來源類別。     An image source recognition device is characterized in that it includes: a training sample acquisition unit for collecting object image sets belonging to different source categories and extracting object features from them to form a training sample set; a classification model training unit for using all The object feature samples in the training sample set and their source categories are described, and the image source classification model is trained; the feature classification unit to be classified is used to extract object features from the object images to be classified; the source category recognition unit is used to The object feature extracted by the feature to-be-classified extraction unit is input, and the source image classification model of the object is used to identify the source category of the object-to-class image.     根據申請專利範圍第34項所述的圖像來源識別裝置,其中,所述客體圖像來源分類模型包括:多類分類模型;所述分類模型訓練單元具體用於,利用Softmax演算法、多類SVM演算法、或者隨機森林演算法訓練所述客體圖像來源分類模型。     The image source identification device according to item 34 of the scope of the patent application, wherein the object image source classification model includes: a multi-class classification model; the classification model training unit is specifically configured to use Softmax algorithm, multi-class The SVM algorithm or the random forest algorithm trains the object image source classification model.    
TW106101919A 2017-01-19 2017-01-19 Image recognition method and device and metric learning method and device TWI731919B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW106101919A TWI731919B (en) 2017-01-19 2017-01-19 Image recognition method and device and metric learning method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW106101919A TWI731919B (en) 2017-01-19 2017-01-19 Image recognition method and device and metric learning method and device

Publications (2)

Publication Number Publication Date
TW201828156A true TW201828156A (en) 2018-08-01
TWI731919B TWI731919B (en) 2021-07-01

Family

ID=63960470

Family Applications (1)

Application Number Title Priority Date Filing Date
TW106101919A TWI731919B (en) 2017-01-19 2017-01-19 Image recognition method and device and metric learning method and device

Country Status (1)

Country Link
TW (1) TWI731919B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111626371A (en) * 2020-05-29 2020-09-04 歌尔科技有限公司 Image classification method, device and equipment and readable storage medium
TWI710964B (en) * 2019-03-18 2020-11-21 大陸商深圳市商湯科技有限公司 Method, apparatus and electronic device for image clustering and storage medium thereof
CN113440843A (en) * 2021-06-25 2021-09-28 咪咕互动娱乐有限公司 Cloud game starting control method and device, cloud server and terminal equipment
TWI759731B (en) * 2020-04-27 2022-04-01 淡江大學 Machine learning method

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3903783B2 (en) * 2001-12-14 2007-04-11 日本電気株式会社 Face metadata generation method and apparatus, and face similarity calculation method and apparatus
CN103902961B (en) * 2012-12-28 2017-02-15 汉王科技股份有限公司 Face recognition method and device
CN104281843A (en) * 2014-10-20 2015-01-14 上海电机学院 Image recognition method and system based on self-adaptive features and classification model selection
CN105893920B (en) * 2015-01-26 2019-12-27 阿里巴巴集团控股有限公司 Face living body detection method and device

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI710964B (en) * 2019-03-18 2020-11-21 大陸商深圳市商湯科技有限公司 Method, apparatus and electronic device for image clustering and storage medium thereof
US11232288B2 (en) 2019-03-18 2022-01-25 Shenzhen Sensetime Technology Co., Ltd. Image clustering method and apparatus, electronic device, and storage medium
TWI759731B (en) * 2020-04-27 2022-04-01 淡江大學 Machine learning method
CN111626371A (en) * 2020-05-29 2020-09-04 歌尔科技有限公司 Image classification method, device and equipment and readable storage medium
CN111626371B (en) * 2020-05-29 2023-10-31 歌尔科技有限公司 Image classification method, device, equipment and readable storage medium
CN113440843A (en) * 2021-06-25 2021-09-28 咪咕互动娱乐有限公司 Cloud game starting control method and device, cloud server and terminal equipment
CN113440843B (en) * 2021-06-25 2023-12-08 咪咕互动娱乐有限公司 Cloud game starting control method and device, cloud server and terminal equipment

Also Published As

Publication number Publication date
TWI731919B (en) 2021-07-01

Similar Documents

Publication Publication Date Title
WO2017024963A1 (en) Image recognition method, measure learning method and image source recognition method and device
Singh et al. Face detection and recognition system using digital image processing
Ranjan et al. Deep learning for understanding faces: Machines may be just as good, or better, than humans
US10810423B2 (en) Iris liveness detection for mobile devices
Liu et al. Multi-scale triplet cnn for person re-identification
Chakraborty et al. An overview of face liveness detection
An et al. Person re-identification by robust canonical correlation analysis
WO2016150240A1 (en) Identity authentication method and apparatus
Lisanti et al. Multichannel-kernel canonical correlation analysis for cross-view person reidentification
CN109376604B (en) Age identification method and device based on human body posture
TWI731919B (en) Image recognition method and device and metric learning method and device
JP6071002B2 (en) Reliability acquisition device, reliability acquisition method, and reliability acquisition program
Srivastava et al. Real time attendance system using face recognition technique
CN113436735A (en) Body weight index prediction method, device and storage medium based on face structure measurement
Olivares-Mercado et al. Face recognition system for smartphone based on lbp
Rose et al. Deep learning based estimation of facial attributes on challenging mobile phone face datasets
Mangla et al. Sketch-based facial recognition: a weighted component-based approach (WCBA)
Almutiry Efficient iris segmentation algorithm using deep learning techniques
TWI632509B (en) Face recognition apparatus and method thereof, method for increasing image recognition accuracy, and computer-readable storage medium
Granda et al. Face recognition systems in math classroom through computer vision traditional techniques
CN114359646A (en) Video analysis method, device, system, electronic equipment and medium
CN111428670B (en) Face detection method, face detection device, storage medium and equipment
Mishra et al. Integrating State-of-the-Art Face Recognition and Anti-Spoofing Techniques into Enterprise Information Systems
Sheng et al. Evaluating the quality of face alignment without ground truth
Dhamija et al. Analysis of age invariant face recognition using quadratic support vector machine-principal component analysis

Legal Events

Date Code Title Description
MM4A Annulment or lapse of patent due to non-payment of fees