WO2019080411A1 - 电子装置、人脸图像聚类搜索方法和计算机可读存储介质 - Google Patents

电子装置、人脸图像聚类搜索方法和计算机可读存储介质

Info

Publication number
WO2019080411A1
WO2019080411A1 PCT/CN2018/076123 CN2018076123W WO2019080411A1 WO 2019080411 A1 WO2019080411 A1 WO 2019080411A1 CN 2018076123 W CN2018076123 W CN 2018076123W WO 2019080411 A1 WO2019080411 A1 WO 2019080411A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
feature vector
feature vectors
distance
category
Prior art date
Application number
PCT/CN2018/076123
Other languages
English (en)
French (fr)
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 平安科技(深圳)有限公司
Publication of WO2019080411A1 publication Critical patent/WO2019080411A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/50Information retrieval; Database structures therefor; File system structures therefor of still image data
    • G06F16/58Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually
    • G06F16/583Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually using metadata automatically derived from the content
    • G06F16/5838Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually using metadata automatically derived from the content using colour
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/23Clustering techniques
    • G06F18/232Non-hierarchical techniques
    • G06F18/2321Non-hierarchical techniques using statistics or function optimisation, e.g. modelling of probability density functions
    • G06F18/23213Non-hierarchical techniques using statistics or function optimisation, e.g. modelling of probability density functions with fixed number of clusters, e.g. K-means clustering
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/16Human faces, e.g. facial parts, sketches or expressions
    • G06V40/161Detection; Localisation; Normalisation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/16Human faces, e.g. facial parts, sketches or expressions
    • G06V40/168Feature extraction; Face representation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/16Human faces, e.g. facial parts, sketches or expressions
    • G06V40/172Classification, e.g. identification

Definitions

  • the present application relates to the field of image technologies, and in particular, to an electronic device, a face image clustering search method, and a computer readable storage medium.
  • the main purpose of the present application is to provide an electronic device, a face image clustering search method, and a computer readable storage medium, which are intended to reduce the time spent on sample comparison in the face recognition process and improve the real-time performance of face recognition.
  • a first aspect of the present application provides an electronic device, where the electronic device includes a memory and a processor, where the memory stores a face image clustering search system executable on the processor, where the face image gathers
  • the class search system is implemented by the processor to implement the following steps:
  • a sample image in which the feature vector is closest to the feature vector of the real-time face image and smaller than the second threshold is found in the candidate category.
  • a second aspect of the present application provides a face image clustering search method, the method comprising the steps of:
  • a sample image in which the feature vector is closest to the feature vector of the real-time face image and smaller than the second threshold is found in the candidate category.
  • a third aspect of the present application provides a computer readable storage medium storing a face image cluster search system, the face image cluster search system being executable by at least one processor to The at least one processor performs the following steps:
  • a sample image in which the feature vector is closest to the feature vector of the real-time face image and smaller than the second threshold is found in the candidate category.
  • the sample library cluster is divided into multiple image categories in advance, and the center point feature vector of each image category is calculated; when the real-time image is searched and recognized, the real-time face image in the real-time image is firstly The feature vector is calculated, and then the distance between the feature vector of the real-time face image and the center point feature vector of each image category is calculated, and an image category whose distance is smaller than the first threshold (classification threshold) is selected as a candidate category, that is, Selecting an image category that is closer to the real-time face image, and then finding a feature vector that is closest to the feature vector of the real-time face image and smaller than a second threshold in the candidate category, the found feature vector
  • the corresponding sample image is the same as the real-time face image target, and thus, the search and recognition of the real-time image is completed.
  • the solution first selects the candidate category from each image category of the sample library, and searches for the recognition result in the candidate category, thus greatly reducing the search and recognition range of the real-time face image.
  • the size is greatly reduced, which greatly reduces the time spent on sample comparison and improves the real-time performance of face recognition.
  • FIG. 1 is a schematic flow chart of an embodiment of a method for searching for a face image of an applicant
  • FIG. 2 is a schematic flowchart of a second embodiment of a method for searching for a face image of an applicant
  • FIG. 3 is a schematic diagram of an operating environment of an embodiment of a face image clustering search system of the present applicant
  • FIG. 4 is a program module diagram of an embodiment of a face image clustering search system of the present applicant
  • FIG. 5 is a program module diagram of a second embodiment of a face image clustering search system of the present applicant.
  • FIG. 1 is a schematic flowchart of an embodiment of a method for searching for a face image of an applicant.
  • the face image method includes:
  • Step S10 performing face detection on the real-time image to determine a real-time face image, and calculating a feature vector of the real-time face image;
  • the video captured by the camera in real time is transmitted to the system through the network and stored in the storage device of the system.
  • the system extracts the image frames in the video in real time to obtain real-time images, and performs face detection on the real-time images to determine the real-time.
  • the face image is calculated, and the feature vector of the real-time face image is calculated.
  • the feature vector of the real-time face image can be calculated by using a convolutional neural network, the real-time face image is input as a convolutional neural network, and the feature vector is the output of the convolutional neural network, and the convolutional neural network is based on the input.
  • the real-time face image outputs an N-dimensional (eg, 128-dimensional) vector (ie, a feature vector of a real-time face image).
  • Step S20 Calculate a distance between a feature vector of the real-time face image and a center point feature vector of each of the predetermined image categories, and select a center point feature vector whose distance is smaller than the first threshold, and filter the center point feature vector.
  • the sample library in the system is clustered in advance, and the sample library is divided into multiple image categories, and the center point feature vectors of the respective image categories are respectively calculated.
  • the distance between the feature vector and the center point feature vector of each image category (the distance is the Euclidean distance or the cos distance), and the distance from the obtained distances is less than the first a center point feature vector of the threshold
  • the image type corresponding to the selected center point feature vector is the image type of the real-time face image whose feature vector is close, so the selected center point feature vector corresponds to
  • the image category is a candidate category of the real-time face image; wherein the first threshold is a classification threshold, and the central point feature vector smaller than the first threshold may be one or more, so a candidate category of a real-time face image There may be more than one.
  • Step S30 Find, in the candidate category, a sample image whose feature vector is closest to the feature vector of the real-time face image and smaller than a second threshold.
  • the feature vectors of all sample images in the sample library have been pre-calculated and determined. After the candidate categories of the real-time face images are determined, the feature vectors of the real-time face images and the features of each sample image in each candidate category are respectively calculated. The distance of the vector, the closest distance from the calculated distance is less than the second threshold, and the sample image corresponding to the closest distance is determined to be the same sample image as the real-time face image target, so that the current real-time is recognized. Face image.
  • the second threshold is a recognition threshold. The higher the similarity between the two images, the smaller the distance of the feature vector. When the distance between the two images is less than the recognition threshold, the difference between the two images may be negligible.
  • the person sample image of the real-time face image may be missing from the sample library. Or the sample library has not been updated for a long time, and the character appearance of the real-time face image changes greatly.
  • the sample library cluster is divided into multiple image categories in advance, and the center point feature vector of each image category is calculated; when the real-time image is searched and recognized, the real-time face image in the real-time image is firstly used.
  • the feature vector is calculated, and then the distance between the feature vector of the real-time face image and the center point feature vector of each image category is calculated, and an image category whose distance is smaller than the first threshold (classification threshold) is selected as a candidate category. That is, the image category of the real-time face image is selected, and then the feature vector that is closest to the feature vector of the real-time face image and smaller than the second threshold is found in the candidate category, and the found feature is found.
  • the sample image corresponding to the vector is the same as the real-time face image target, and thus, the search and recognition of the real-time image is completed.
  • the solution first selects the candidate category from each image category of the sample library, and searches for the recognition result in the candidate category, thus greatly reducing the search and recognition range of the real-time face image.
  • the size is greatly reduced, which greatly reduces the time spent on sample comparison and improves the real-time performance of face recognition.
  • FIG. 2 is a schematic flowchart of the second embodiment of the method for searching for a face image of the present invention.
  • the method for searching for a face image of the present embodiment after the step S30, further includes:
  • Step S40 Determine a face ID corresponding to the searched sample image according to a mapping relationship between the predetermined sample image and the face ID, and use the determined face ID as the recognition result.
  • each sample image in the sample library corresponds to a face ID (for example, a name), and the face ID determines an image of which person the sample image belongs to, and the plurality of sample images may correspond to the same personal face ID, that is, The plurality of sample images are images belonging to the same person; the system associates each sample image with a corresponding face ID by establishing a mapping relationship table between the sample image and the face ID. After searching for the sample image that is closest to the second threshold value according to the distance of the feature vector, the face ID of the searched sample image is determined by querying the mapping relationship table between the sample image and the face ID, and the determined face is determined. The ID is the recognition result of the real-time face image.
  • a face ID for example, a name
  • the face ID determines an image of which person the sample image belongs to
  • the plurality of sample images may correspond to the same personal face ID, that is,
  • the plurality of sample images are images belonging to the same person; the system associates each sample image with a corresponding face ID by
  • the predetermined center point feature vector of each image category is determined by the following steps:
  • Step 1 performing face detection on each sample image in the sample library, determining a face image from the sample image, and calculating a feature vector of the determined face image;
  • the feature vectors corresponding to all sample images of the sample library are calculated; specifically, for each sample image, the face image is first determined from the sample image, and then the feature vector of the face image is calculated.
  • the feature vector of the face image can be calculated by using a convolutional neural network, and the determined face image is input into the convolutional neural network, and the convolutional neural network outputs an N-dimensional (for example, 128-dimensional) according to the input face image.
  • Vector ie, the feature vector of the face image).
  • Step 2 calculating a distance between each feature vector, and clustering all feature vectors according to a distance between the feature vectors
  • the specific steps of performing clustering may be:
  • the feature vectors whose distance falls within the preset numerical range are classified into the same image category; for example, if
  • the feature vector is added to the existing image category as a new image category until all the feature vectors are classified.
  • Step 3 respectively adopt a calculation formula for each image category obtained after clustering Performing calculations to obtain respective center point feature vectors of respective image categories, where n represents the number of feature vectors in the category, F (i) represents the i-th feature vector, and X k represents the kth in the feature vector. The value of each element.
  • the k-means algorithm may be used, and the above step 2 is replaced by the following steps to implement clustering:
  • the feature element Pi is closest to the seed point Si, then Pi is divided into Si point groups; wherein each point in the point group represents a feature vector of a sample picture.
  • the present application also proposes a face image clustering search system.
  • FIG. 3 is a schematic diagram of an operating environment of a preferred embodiment of the present applicant's face image clustering search system 10 .
  • the face image cluster search system 10 is installed and operated in the electronic device 1.
  • the electronic device 1 may be a computing device such as a desktop computer, a notebook, a palmtop computer, and a server.
  • the electronic device 1 may include, but is not limited to, a memory 11, a processor 12, and a display 13.
  • Figure 3 shows only the electronic device 1 with components 11-13, but it should be understood that not all illustrated components may be implemented, and more or fewer components may be implemented instead.
  • the memory 11 may be an internal storage unit of the electronic device 1 in some embodiments, such as a hard disk or memory of the electronic device 1.
  • the memory 11 may also be an external storage device of the electronic device 1 in other embodiments, such as a plug-in hard disk equipped on the electronic device 1, a smart memory card (SMC), and a secure digital (SD). Card, flash card, etc.
  • the memory 11 may also include both an internal storage unit of the electronic device 1 and an external storage device.
  • the memory 11 is used to store application software and various types of data installed in the electronic device 1, such as program code of the face image cluster search system 10.
  • the memory 11 can also be used to temporarily store data that has been output or is about to be output.
  • the processor 12 in some embodiments, may be a Central Processing Unit (CPU), microprocessor or other data processing chip for running program code or processing data stored in the memory 11, such as performing a face image.
  • CPU Central Processing Unit
  • microprocessor or other data processing chip for running program code or processing data stored in the memory 11, such as performing a face image.
  • Cluster search system 10 and the like.
  • the display 13 may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode) touch sensor, or the like in some embodiments.
  • the display 13 is for displaying information processed in the electronic device 1 and a user interface for displaying visualization, such as a business customization interface or the like.
  • the components 11-13 of the electronic device 1 communicate with one another via a system bus.
  • FIG. 4 is a program module diagram of an embodiment of the applicant's face image clustering search system 10 .
  • the face image cluster search system 10 can be divided into one or more modules, one or more modules are stored in the memory 11, and processed by one or more processors (this embodiment is processed The device 12) is executed to complete the application.
  • the face image cluster search system 10 can be segmented into a detection calculation module 101, a calculation screening module 102, and an identification module 103.
  • the module referred to in the present application refers to a series of computer program instruction segments capable of performing a specific function, and is more suitable than the program for describing the execution process of the face image cluster search system 10 in the electronic device 1, wherein:
  • the detection calculation module 101 is configured to perform face detection on the real-time image to determine a real-time face image, and calculate a feature vector of the real-time face image;
  • the video captured by the camera in real time is transmitted to the system through the network and stored in the storage device of the system.
  • the system extracts the image frames in the video in real time to obtain real-time images, and performs face detection on the real-time images to determine the real-time.
  • the face image is calculated, and the feature vector of the real-time face image is calculated.
  • the feature vector of the real-time face image can be calculated by using a convolutional neural network, the real-time face image is input as a convolutional neural network, and the feature vector is the output of the convolutional neural network, and the convolutional neural network is based on the input.
  • the real-time face image outputs an N-dimensional (eg, 128-dimensional) vector (ie, a feature vector of a real-time face image).
  • the calculation screening module 102 is configured to calculate a distance between a feature vector of the real-time face image and a center point feature vector of each of the predetermined image categories, and select a center point feature vector whose distance is less than the first threshold, and the selected center is to be selected.
  • the image category corresponding to the point feature vector is used as a candidate category;
  • the sample library in the system is clustered in advance, and the sample library is divided into multiple image categories, and the center point feature vectors of the respective image categories are respectively calculated.
  • the distance between the feature vector and the center point feature vector of each image category (the distance is the Euclidean distance or the cos distance), and the distance from the obtained distances is less than the first a center point feature vector of the threshold
  • the image type corresponding to the selected center point feature vector is the image type of the real-time face image whose feature vector is close, so the selected center point feature vector corresponds to
  • the image category is a candidate category of the real-time face image; wherein the first threshold is a classification threshold, and the central point feature vector smaller than the first threshold may be one or more, so a candidate category of a real-time face image There may be more than one.
  • the identification module 103 is configured to find, in the candidate category, a sample image whose feature vector is closest to the feature vector of the real-time face image and smaller than a second threshold.
  • the feature vectors of all sample images in the sample library have been pre-calculated and determined. After the candidate categories of the real-time face images are determined, the feature vectors of the real-time face images and the features of each sample image in each candidate category are respectively calculated. The distance of the vector, the closest distance from the calculated distance is less than the second threshold, and the sample image corresponding to the closest distance is determined to be the same sample image as the real-time face image target, so that the current real-time is recognized. Face image.
  • the second threshold is a recognition threshold. The higher the similarity between the two images, the smaller the distance of the feature vector. When the distance between the two images is less than the recognition threshold, the difference between the two images may be negligible.
  • the person sample image of the real-time face image may be missing from the sample library. Or the sample library has not been updated for a long time, and the character appearance of the real-time face image changes greatly.
  • the sample library cluster is divided into multiple image categories in advance, and the center point feature vector of each image category is calculated; when the real-time image is searched and recognized, the real-time face image in the real-time image is firstly used.
  • the feature vector is calculated, and then the distance between the feature vector of the real-time face image and the center point feature vector of each image category is calculated, and an image category whose distance is smaller than the first threshold (classification threshold) is selected as a candidate category. That is, the image category of the real-time face image is selected, and then the feature vector that is closest to the feature vector of the real-time face image and smaller than the second threshold is found in the candidate category, and the found feature is found.
  • the sample image corresponding to the vector is the same as the real-time face image target, and thus, the search and recognition of the real-time image is completed.
  • the solution first selects the candidate category from each image category of the sample library, and searches for the recognition result in the candidate category, thus greatly reducing the search and recognition range of the real-time face image.
  • the size is greatly reduced, which greatly reduces the time spent on sample comparison and improves the real-time performance of face recognition.
  • the face image clustering search system of this embodiment further includes:
  • the result determining module 104 is configured to determine a face ID corresponding to the searched sample image according to a mapping relationship between the predetermined sample image and the face ID, and use the determined face ID as a recognition result.
  • each sample image in the sample library corresponds to a face ID (for example, a name), and the face ID determines an image of which person the sample image belongs to, and the plurality of sample images may correspond to the same personal face ID, that is, The plurality of sample images are images belonging to the same person; the system associates each sample image with a corresponding face ID by establishing a mapping relationship table between the sample image and the face ID. After searching for the sample image that is closest to the second threshold value according to the distance of the feature vector, the face ID of the searched sample image is determined by querying the mapping relationship table between the sample image and the face ID, and the determined face is determined. The ID is the recognition result of the real-time face image.
  • a face ID for example, a name
  • the face ID determines an image of which person the sample image belongs to
  • the plurality of sample images may correspond to the same personal face ID, that is,
  • the plurality of sample images are images belonging to the same person; the system associates each sample image with a corresponding face ID by
  • the predetermined center point feature vector of each image category is determined by the following steps:
  • Step 1 performing face detection on each sample image in the sample library, determining a face image from the sample image, and calculating a feature vector of the determined face image;
  • the feature vectors corresponding to all sample images of the sample library are calculated; specifically, for each sample image, the face image is first determined from the sample image, and then the feature vector of the face image is calculated.
  • the feature vector of the face image can be calculated by using a convolutional neural network, and the determined face image is input into the convolutional neural network, and the convolutional neural network outputs an N-dimensional (for example, 128-dimensional) according to the input face image.
  • Vector ie, the feature vector of the face image).
  • Step 2 calculating a distance between each feature vector, and clustering all feature vectors according to a distance between the feature vectors
  • the specific steps of performing clustering may be:
  • the feature vectors whose distance falls within the preset numerical range are classified into the same image category; for example, if
  • the feature vector is added to the existing image category as a new image category until all the feature vectors are classified.
  • Step 3 respectively adopt a calculation formula for each image category obtained after clustering Performing calculations to obtain respective center point feature vectors of respective image categories, where n represents the number of feature vectors in the category, F (i) represents the i-th feature vector, and X k represents the kth in the feature vector. The value of each element.
  • the k-means algorithm may be used, and the above step 2 is replaced by the following steps to implement clustering:
  • the feature element Pi is closest to the seed point Si, then Pi is divided into Si point groups; wherein each point in the point group represents a feature vector of a sample picture.
  • the present application further provides a computer readable storage medium storing a face image cluster search system, the face image cluster search system being executable by at least one processor to enable The at least one processor executes the face image cluster search method in any of the above embodiments.

Abstract

一种电子装置、人脸图像聚类搜索方法和计算机可读存储介质,其中,该方法包括:对实时图像进行人脸检测以确定出实时人脸图像,计算出该实时人脸图像的特征向量(S10);计算所述实时人脸图像的特征向量分别与预先确定的各个图像类别的中心点特征向量的距离,筛选距离小于第一阈值的中心点特征向量,将筛选出的中心点特征向量所对应的图像类别作为候选类别(S20);在所述候选类别中找出特征向量与所述实时人脸图像的特征向量的距离最近且小于第二阈值的样本图像(S30)。上述技术方案减少了人脸识别过程中样本比对花费的时间,提升人脸识别的实时性。

Description

电子装置、人脸图像聚类搜索方法和计算机可读存储介质
本申请基于巴黎公约申明享有2017年10月23日递交的申请号为CN 201710993380.7、名称为“电子装置、人脸图像聚类搜索方法和计算机可读存储介质”中国专利申请的优先权,该中国专利申请的整体内容以参考的方式结合在本申请中。
技术领域
本申请涉及图像技术领域,特别涉及一种电子装置、人脸图像聚类搜索方法和计算机可读存储介质。
背景技术
目前,在人脸识别的应用中,通常的做法是,对于每个识别目标人脸都会计算出一个特征向量,与样本库中每个人脸的特征向量进行比较,距离最小的作为识别结果。当样本库很大时,逐个样本的比较花费时间较多,会使人脸识别的实时性降低。
发明内容
本申请的主要目的是提供一种电子装置、人脸图像聚类搜索方法和计算机可读存储介质,旨在减少人脸识别过程中样本比对花费的时间,提升人脸识别的实时性。
本申请第一方面提供一种电子装置,所述电子装置包括存储器、处理器,所述存储器上存储有可在所述处理器上运行的人脸图像聚类搜索系统,所述人脸图像聚类搜索系统被所述处理器执行时实现如下步骤:
对实时图像进行人脸检测以确定出实时人脸图像,计算出该实时人脸图像的特征向量;
计算所述实时人脸图像的特征向量分别与预先确定的各个图像类别的中心点特征向量的距离,筛选距离小于第一阈值的中心点特征向量,将筛选出的中心点特征向量所对应的图像类别作为候选类别;
在所述候选类别中找出特征向量与所述实时人脸图像的特征向量的距离最近且小于第二阈值的样本图像。
本申请第二方面提供一种人脸图像聚类搜索方法,该方法包括步 骤:
对实时图像进行人脸检测以确定出实时人脸图像,计算出该实时人脸图像的特征向量;
计算所述实时人脸图像的特征向量分别与预先确定的各个图像类别的中心点特征向量的距离,筛选距离小于第一阈值的中心点特征向量,将筛选出的中心点特征向量所对应的图像类别作为候选类别;
在所述候选类别中找出特征向量与所述实时人脸图像的特征向量的距离最近且小于第二阈值的样本图像。
本申请第三方面提供一种计算机可读存储介质,所述计算机可读存储介质存储有人脸图像聚类搜索系统,所述人脸图像聚类搜索系统可被至少一个处理器执行,以使所述至少一个处理器执行如下步骤:
对实时图像进行人脸检测以确定出实时人脸图像,计算出该实时人脸图像的特征向量;
计算所述实时人脸图像的特征向量分别与预先确定的各个图像类别的中心点特征向量的距离,筛选距离小于第一阈值的中心点特征向量,将筛选出的中心点特征向量所对应的图像类别作为候选类别;
在所述候选类别中找出特征向量与所述实时人脸图像的特征向量的距离最近且小于第二阈值的样本图像。
本申请技术方案,采用预先将样本库聚类分成多个图像类别,并计算出各个图像类别的中心点特征向量;当对实时图像进行搜索识别时,先将实时图像中的实时人脸图像的特征向量计算出,再通过计算将该实时人脸图像的特征向量分别与各个图像类别的中心点特征向量的距离,从其中选取距离小于第一阈值(分类阈值)的图像类别作为候选类别,即选出该实时人脸图像较接近的图像类别,然后就在候选类别中找出与所述实时人脸图像的特征向量的距离最近且小于第二阈值的特征向量,则该找出的特征向量所对应的样本图像与该实时人脸图像目标相同,如此,则完成该实时图像的搜索识别。与现有技术相比,本方案先通过从样本库的各个图像类别中筛选出较接近候选类别,再在候选类别中搜索识别结果,如此,大幅降低了对该实时人 脸图像的搜索识别范围大幅缩小,从而大幅降低了样本比对耗费的时间,提升了人脸识别的实时性。
附图说明
图1为本申请人脸图像聚类搜索方法一实施例的流程示意图;
图2为本申请人脸图像聚类搜索方法二实施例的流程示意图;
图3为本申请人脸图像聚类搜索系统一实施例的运行环境示意图;
图4为本申请人脸图像聚类搜索系统一实施例的程序模块图;
图5为本申请人脸图像聚类搜索系统二实施例的程序模块图。
具体实施方式
以下结合附图对本申请的原理和特征进行描述,所举实例只用于解释本申请,并非用于限定本申请的范围。
如图1所示,图1为本申请人脸图像聚类搜索方法一实施例的流程示意图。
本实施例中,该人脸图像方法包括:
步骤S10,对实时图像进行人脸检测以确定出实时人脸图像,计算出该实时人脸图像的特征向量;
摄像装置实时拍摄得到的视频通过网络实时传输到系统,并存储在系统的存储设备中,系统实时提取视频中的图像帧以得到实时图像,并对实时图像进行人脸检测以确定出其中的实时人脸图像,再计算出该实时人脸图像的特征向量。本实施例中,计算实时人脸图像的特征向量可以使用卷积神经网络,实时人脸图像作为卷积神经网络的输入,特征向量则为卷积神经网络的输出,卷积神经网络根据输入的实时人脸图像输出一个N维(例如128维)的向量(即实时人脸图像的特征向量)。
步骤S20,计算所述实时人脸图像的特征向量分别与预先确定的各个图像类别的中心点特征向量的距离,筛选距离小于第一阈值的中心点特征向量,将筛选出的中心点特征向量所对应的图像类别作为候选类别;
系统中的样本库预先进行了聚类处理,样本库被分成了多个图像类别,并且分别计算了各个图像类别的中心点特征向量。在得到实时人脸图像的特征向量后,系统分别该特征向量与各个图像类别的中心点特征向量的距离(该距离为欧氏距离或cos距离),从得到的各个距离中筛选出距离小于第一阈值的中心点特征向量,那么,该筛选出的中心点特征向量所对应的图像类别就是该实时人脸图像的特征向量较接近的图像类别,故将筛选出的中心点特征向量所对应的图像类别作为该实时人脸图像的候选类别;其中,第一阈值为分类阈值,小于第一阈值的中心点特征向量可能为一个,也可能为多个,所以一张实时人脸图像的候选类别可能不只一个。通过筛选出候选类别,使得对该实时人脸图像的搜索识别范围大幅缩小,从而大幅降低了样本比对耗费的时间。
步骤S30,在所述候选类别中找出特征向量与所述实时人脸图像的特征向量的距离最近且小于第二阈值的样本图像。
样本库中所有样本图像的特征向量已经预先计算确定了,在确定了实时人脸图像的候选类别后,分别计算出该实时人脸图像的特征向量与各个候选类别中的每个样本图像的特征向量的距离,从计算得到的所有距离中找到小于第二阈值的最近距离,则确定该最近距离对应的样本图像为与所述实时人脸图像目标相同的样本图像,如此,即识别出当前实时人脸图像。本实施例中,第二阈值为识别阈值,两张图像的相似度越高、则其特征向量的距离越小,当两张图像的距离小于识别阈值时,该两张图像的差异可以忽略不计,可断定为同一个目标的图像。当然,如果出现所述候选类别中不存在与所述实时人脸图像的特征向量的距离小于第二阈值的特征向量的情况,则可能是样本库中缺少该实时人脸图像的人物样本图像,或者样本库太久未更新,该实时人脸图像的人物样貌变化较大等原因。
本实施例技术方案,采用预先将样本库聚类分成多个图像类别,并计算出各个图像类别的中心点特征向量;当对实时图像进行搜索识别时,先将实时图像中的实时人脸图像的特征向量计算出,再通过计算将该实时人脸图像的特征向量分别与各个图像类别的中心点特征 向量的距离,从其中选取距离小于第一阈值(分类阈值)的图像类别作为候选类别,即选出该实时人脸图像较接近的图像类别,然后就在候选类别中找出与所述实时人脸图像的特征向量的距离最近且小于第二阈值的特征向量,则该找出的特征向量所对应的样本图像与该实时人脸图像目标相同,如此,则完成该实时图像的搜索识别。与现有技术相比,本方案先通过从样本库的各个图像类别中筛选出较接近候选类别,再在候选类别中搜索识别结果,如此,大幅降低了对该实时人脸图像的搜索识别范围大幅缩小,从而大幅降低了样本比对耗费的时间,提升了人脸识别的实时性。
如图2所示,图2为本申请人脸图像聚类搜索方法二实施例的流程示意图;本实施例的人脸图像聚类搜索方法在所述步骤S30之后,还包括:
步骤S40,根据预先确定的样本图像与人脸ID的映射关系,确定所述搜索到的样本图像对应的人脸ID,将该确定的人脸ID作为识别结果。
本实施例中,样本库中每张样本图像均对应一个人脸ID(例如,姓名),人脸ID确定了样本图像是属于哪个人的图像,可以多张样本图像对应同一个人脸ID,即该多张样本图像是属于同一个人的图像;系统通过建立样本图像与人脸ID的映射关系表,将每张样本图像与对应的人脸ID关联。在根据特征向量的距离搜索到距离最近且小于第二阈值的样本图像后,通过查询样本图像与人脸ID的映射关系表,确定该搜索到的样本图像的人脸ID,则该确定人脸ID则为该实时人脸图像的识别结果。
进一步地,在上述实施例中,所述预先确定的各个图像类别的中心点特征向量通过以下步骤确定:
步骤1,对样本库中的每张样本图像进行人脸检测,从样本图像中确定人脸图像,并计算出确定的人脸图像的特征向量;
本步骤中,计算出样本库的所有样本图像对应的特征向量;具体 的,正对每张样本图像,先从样本图像中确定人脸图像,再计算人脸图像的特征向量。其中,人脸图像的特征向量的计算可以使用卷积神经网络,将确定的人脸图像输入卷积神经网络中,卷积神经网络则根据输入的人脸图像输出一个N维(例如128维)的向量(即该人脸图像的特征向量)。
步骤2,计算各个特征向量之间的距离,根据特征向量之间的距离对所有的特征向量进行聚类;
本实施例中,进行聚类的具体步骤可以为:
首先,计算每个特征向量与其它特征向量之间的距离;在得到所有样本图像的特征向量后,将所有特征向量两两之间的距离(欧氏距离或cos距离)全部计算出来;例如,有T1~Tn个特征向量,则分别计算|T1-T2|、|T1-T3|、|T1-T4|、…、|T1-Tn|、|T2-T3|、|T2-T4|、…、|T2-Tn|、…|T(n-1)-Tn|。
然后,将距离落入预设的数值范围的特征向量归为相同图像类别;例如,假设|T1-T2|、|T1-T3|落入预设的第一数值范围A,则将T1、T2、T3归为同一图像类别,|T5-T4|、|T5-T(n-1)|落入预设的第二数值范围B,则将T4、T5、T(n-1)归为同一图像类别,依此类推,完成所有特征向量的图像类别划分。
如果在聚类过程中,若有特征向量未归入任意一个已有图像类别,则将该特征向量作为一个新的图像类别追加到已有图像类别,直到将所有的特征向量完成分类。
步骤3,对聚类后得到的各个图像类别分别采用计算公式
Figure PCTCN2018076123-appb-000001
进行计算,以得到各个图像类别各自的中心点特征向量,所述计算公式中,n表示类别中特征向量的个数,F (i)表示第i个特征向量,X k表示特征向量中第k个元素的值。
另外,在其他实施例中,可以采用k-means算法,将上述步骤2替换为以下步骤实现聚类:
a、随机在得到的特征向量中取m(例如m=3)个特征向量作为 种子点;
b、计算所有余下的特征向量分别到这m个种子点的距离(例如欧氏距离或cos距离),将所有余下的特征向量分别划分到其距离最近的种子点的点群;
例如,特征元素Pi离种子点Si最近,那么Pi被划分到Si点群;其中,点群中的每个点均代表一张样本图片的特征向量。
c、计算每个点群的中心(即中心点特征向量),将各个种子点移动到其所在点群的中心;
d、重复步骤b和c,直到种子点不再移动,则得到的点群为分类结果。
此外,本申请还提出一种人脸图像聚类搜索系统。
请参阅图3,是本申请人脸图像聚类搜索系统10较佳实施例的运行环境示意图。
在本实施例中,人脸图像聚类搜索系统10安装并运行于电子装置1中。电子装置1可以是桌上型计算机、笔记本、掌上电脑及服务器等计算设备。该电子装置1可包括,但不仅限于,存储器11、处理器12及显示器13。图3仅示出了具有组件11-13的电子装置1,但是应理解的是,并不要求实施所有示出的组件,可以替代的实施更多或者更少的组件。
存储器11在一些实施例中可以是电子装置1的内部存储单元,例如该电子装置1的硬盘或内存。存储器11在另一些实施例中也可以是电子装置1的外部存储设备,例如电子装置1上配备的插接式硬盘,智能存储卡(Smart Media Card,SMC),安全数字(Secure Digital,SD)卡,闪存卡(Flash Card)等。进一步地,存储器11还可以既包括电子装置1的内部存储单元也包括外部存储设备。存储器11用于存储安装于电子装置1的应用软件及各类数据,例如人脸图像聚类搜索系统10的程序代码等。存储器11还可以用于暂时地存储已经输出或者将要输出的数据。
处理器12在一些实施例中可以是一中央处理器(Central  Processing Unit,CPU),微处理器或其他数据处理芯片,用于运行存储器11中存储的程序代码或处理数据,例如执行人脸图像聚类搜索系统10等。
显示器13在一些实施例中可以是LED显示器、液晶显示器、触控式液晶显示器以及OLED(Organic Light-Emitting Diode,有机发光二极管)触摸器等。显示器13用于显示在电子装置1中处理的信息以及用于显示可视化的用户界面,例如业务定制界面等。电子装置1的部件11-13通过系统总线相互通信。
请参阅图4,是本申请人脸图像聚类搜索系统10一实施例的程序模块图。在本实施例中,人脸图像聚类搜索系统10可以被分割成一个或多个模块,一个或者多个模块被存储于存储器11中,并由一个或多个处理器(本实施例为处理器12)所执行,以完成本申请。例如,在图4中,人脸图像聚类搜索系统10可以被分割成检测计算模块101、计算筛选模块102及识别模块103。本申请所称的模块是指能够完成特定功能的一系列计算机程序指令段,比程序更适合于描述人脸图像聚类搜索系统10在电子装置1中的执行过程,其中:
检测计算模块101,用于对实时图像进行人脸检测以确定出实时人脸图像,计算出该实时人脸图像的特征向量;
摄像装置实时拍摄得到的视频通过网络实时传输到系统,并存储在系统的存储设备中,系统实时提取视频中的图像帧以得到实时图像,并对实时图像进行人脸检测以确定出其中的实时人脸图像,再计算出该实时人脸图像的特征向量。本实施例中,计算实时人脸图像的特征向量可以使用卷积神经网络,实时人脸图像作为卷积神经网络的输入,特征向量则为卷积神经网络的输出,卷积神经网络根据输入的实时人脸图像输出一个N维(例如128维)的向量(即实时人脸图像的特征向量)。
计算筛选模块102,用于计算所述实时人脸图像的特征向量分别与预先确定的各个图像类别的中心点特征向量的距离,筛选距离小于第一阈值的中心点特征向量,将筛选出的中心点特征向量所对应的图像类别作为候选类别;
系统中的样本库预先进行了聚类处理,样本库被分成了多个图像类别,并且分别计算了各个图像类别的中心点特征向量。在得到实时人脸图像的特征向量后,系统分别该特征向量与各个图像类别的中心点特征向量的距离(该距离为欧氏距离或cos距离),从得到的各个距离中筛选出距离小于第一阈值的中心点特征向量,那么,该筛选出的中心点特征向量所对应的图像类别就是该实时人脸图像的特征向量较接近的图像类别,故将筛选出的中心点特征向量所对应的图像类别作为该实时人脸图像的候选类别;其中,第一阈值为分类阈值,小于第一阈值的中心点特征向量可能为一个,也可能为多个,所以一张实时人脸图像的候选类别可能不只一个。通过筛选出候选类别,使得对该实时人脸图像的搜索识别范围大幅缩小,从而大幅降低了样本比对耗费的时间。
识别模块103,用于在所述候选类别中找出特征向量与所述实时人脸图像的特征向量的距离最近且小于第二阈值的样本图像。
样本库中所有样本图像的特征向量已经预先计算确定了,在确定了实时人脸图像的候选类别后,分别计算出该实时人脸图像的特征向量与各个候选类别中的每个样本图像的特征向量的距离,从计算得到的所有距离中找到小于第二阈值的最近距离,则确定该最近距离对应的样本图像为与所述实时人脸图像目标相同的样本图像,如此,即识别出当前实时人脸图像。本实施例中,第二阈值为识别阈值,两张图像的相似度越高、则其特征向量的距离越小,当两张图像的距离小于识别阈值时,该两张图像的差异可以忽略不计,可断定为同一个目标的图像。当然,如果出现所述候选类别中不存在与所述实时人脸图像的特征向量的距离小于第二阈值的特征向量的情况,则可能是样本库中缺少该实时人脸图像的人物样本图像,或者样本库太久未更新,该实时人脸图像的人物样貌变化较大等原因。
本实施例技术方案,采用预先将样本库聚类分成多个图像类别,并计算出各个图像类别的中心点特征向量;当对实时图像进行搜索识别时,先将实时图像中的实时人脸图像的特征向量计算出,再通过计算将该实时人脸图像的特征向量分别与各个图像类别的中心点特征 向量的距离,从其中选取距离小于第一阈值(分类阈值)的图像类别作为候选类别,即选出该实时人脸图像较接近的图像类别,然后就在候选类别中找出与所述实时人脸图像的特征向量的距离最近且小于第二阈值的特征向量,则该找出的特征向量所对应的样本图像与该实时人脸图像目标相同,如此,则完成该实时图像的搜索识别。与现有技术相比,本方案先通过从样本库的各个图像类别中筛选出较接近候选类别,再在候选类别中搜索识别结果,如此,大幅降低了对该实时人脸图像的搜索识别范围大幅缩小,从而大幅降低了样本比对耗费的时间,提升了人脸识别的实时性。
参阅图5,本实施例的人脸图像聚类搜索系统还包括:
结果确定模块104,用于根据预先确定的样本图像与人脸ID的映射关系,确定所述搜索到的样本图像对应的人脸ID,将该确定的人脸ID作为识别结果。
本实施例中,样本库中每张样本图像均对应一个人脸ID(例如,姓名),人脸ID确定了样本图像是属于哪个人的图像,可以多张样本图像对应同一个人脸ID,即该多张样本图像是属于同一个人的图像;系统通过建立样本图像与人脸ID的映射关系表,将每张样本图像与对应的人脸ID关联。在根据特征向量的距离搜索到距离最近且小于第二阈值的样本图像后,通过查询样本图像与人脸ID的映射关系表,确定该搜索到的样本图像的人脸ID,则该确定人脸ID则为该实时人脸图像的识别结果。
进一步地,在上述实施例中,所述预先确定的各个图像类别的中心点特征向量通过以下步骤确定:
步骤1,对样本库中的每张样本图像进行人脸检测,从样本图像中确定人脸图像,并计算出确定的人脸图像的特征向量;
本步骤中,计算出样本库的所有样本图像对应的特征向量;具体的,正对每张样本图像,先从样本图像中确定人脸图像,再计算人脸图像的特征向量。其中,人脸图像的特征向量的计算可以使用卷积神 经网络,将确定的人脸图像输入卷积神经网络中,卷积神经网络则根据输入的人脸图像输出一个N维(例如128维)的向量(即该人脸图像的特征向量)。
步骤2,计算各个特征向量之间的距离,根据特征向量之间的距离对所有的特征向量进行聚类;
本实施例中,进行聚类的具体步骤可以为:
首先,计算每个特征向量与其它特征向量之间的距离;在得到所有样本图像的特征向量后,将所有特征向量两两之间的距离(欧氏距离或cos距离)全部计算出来;例如,有T1~Tn个特征向量,则分别计算|T1-T2|、|T1-T3|、|T1-T4|、…、|T1-Tn|、|T2-T3|、|T2-T4|、…、|T2-Tn|、…|T(n-1)-Tn|。
然后,将距离落入预设的数值范围的特征向量归为相同图像类别;例如,假设|T1-T2|、|T1-T3|落入预设的第一数值范围A,则将T1、T2、T3归为同一图像类别,|T5-T4|、|T5-T(n-1)|落入预设的第二数值范围B,则将T4、T5、T(n-1)归为同一图像类别,依此类推,完成所有特征向量的图像类别划分。
如果在聚类过程中,若有特征向量未归入任意一个已有图像类别,则将该特征向量作为一个新的图像类别追加到已有图像类别,直到将所有的特征向量完成分类。
步骤3,对聚类后得到的各个图像类别分别采用计算公式
Figure PCTCN2018076123-appb-000002
进行计算,以得到各个图像类别各自的中心点特征向量,所述计算公式中,n表示类别中特征向量的个数,F (i)表示第i个特征向量,X k表示特征向量中第k个元素的值。
另外,在其他实施例中,可以采用k-means算法,将上述步骤2替换为以下步骤实现聚类:
a、随机在得到的特征向量中取m(例如m=3)个特征向量作为种子点;
b、计算所有余下的特征向量分别到这m个种子点的距离(例如 欧氏距离或cos距离),将所有余下的特征向量分别划分到其距离最近的种子点的点群;
例如,特征元素Pi离种子点Si最近,那么Pi被划分到Si点群;其中,点群中的每个点均代表一张样本图片的特征向量。
c、计算每个点群的中心(即中心点特征向量),将各个种子点移动到其所在点群的中心;
d、重复步骤b和c,直到种子点不再移动,则得到的点群为分类结果。
进一步地,本申请还提出一种计算机可读存储介质,所述计算机可读存储介质存储有人脸图像聚类搜索系统,所述人脸图像聚类搜索系统可被至少一个处理器执行,以使所述至少一个处理器执行上述任一实施例中的人脸图像聚类搜索方法。
以上所述仅为本申请的优选实施例,并非因此限制本申请的专利范围,凡是在本申请的申请构思下,利用本申请说明书及附图内容所作的等效结构变换,或直接/间接运用在其他相关的技术领域均包括在本申请的专利保护范围内。

Claims (20)

  1. 一种电子装置,其特征在于,所述电子装置包括存储器、处理器,所述存储器上存储有可在所述处理器上运行的人脸图像聚类搜索系统,所述人脸图像聚类搜索系统被所述处理器执行时实现如下步骤:
    A1、对实时图像进行人脸检测以确定出实时人脸图像,计算出该实时人脸图像的特征向量;
    A2、计算所述实时人脸图像的特征向量分别与预先确定的各个图像类别的中心点特征向量的距离,筛选距离小于第一阈值的中心点特征向量,将筛选出的中心点特征向量所对应的图像类别作为候选类别;
    A3、在所述候选类别中找出特征向量与所述实时人脸图像的特征向量的距离最近且小于第二阈值的样本图像。
  2. 如权利要求1所述的电子装置,其特征在于,所述预先确定的各个图像类别的中心点特征向量通过以下步骤确定:
    对样本库中的每张样本图像进行人脸检测,从样本图像中确定人脸图像,并计算出确定的人脸图像的特征向量;
    计算各个特征向量之间的距离,根据特征向量之间的距离对所有的特征向量进行聚类;
    对聚类后得到的各个图像类别分别采用计算公式
    Figure PCTCN2018076123-appb-100001
    进行计算,以得到各个图像类别各自的中心点特征向量,所述计算公式中,n表示类别中特征向量的个数,F (i)表示第i个特征向量,X k表示特征向量中第k个元素的值。
  3. 如权利要求2所述的电子装置,其特征在于,所述计算各个特征向量之间的距离,根据特征向量之间的距离对所有的特征向量进行聚类的步骤包括:
    计算每个特征向量与其它特征向量之间的距离;
    将距离落入预设的数值范围的特征向量归为相同图像类别;
    在聚类过程中,若有特征向量未归入任意一个已有图像类别,则将该特征向量作为一个新的图像类别追加到已有图像类别,直到将所有的特征向量完成分类。
  4. 如权利要求2所述的电子装置,其特征在于,所述计算各个特征向量之间的距离,根据特征向量之间的距离对所有的特征向量进行聚类的步骤替换为:
    a、随机在得到的特征向量中取m个特征向量作为种子点;
    b、计算所有余下的特征向量分别到这m个种子点的距离,将所有余下的特征向量分别划分到其距离最近的种子点的点群;
    c、计算每个点群的中心,将各个种子点移动到其所在点群的中心;
    d、重复步骤b和c,直到种子点不再移动,则得到的点群为分类结果。
  5. 如权利要求1所述的电子装置,其特征在于,于所述步骤A3之后,所述处理器还用于执行所述人脸图像聚类搜索系统,以实现步骤:
    根据预先确定的样本图像与人脸ID的映射关系,确定所述找出的样本图像对应的人脸ID,将该确定的人脸ID作为识别结果。
  6. 如权利要求5所述的电子装置,其特征在于,所述预先确定的各个图像类别的中心点特征向量通过以下步骤确定:
    对样本库中的每张样本图像进行人脸检测,从样本图像中确定人脸图像,并计算出确定的人脸图像的特征向量;
    计算各个特征向量之间的距离,根据特征向量之间的距离对所有的特征向量进行聚类;
    对聚类后得到的各个图像类别分别采用计算公式
    Figure PCTCN2018076123-appb-100002
    进行计算,以得到各个图像类别各自的中心点特征向量,所述计算公式中,n表示类别中特征向量的个数,F (i)表示第i个特征向量,X k表示特征向量中第k个元素的值。
  7. 如权利要求6所述的电子装置,其特征在于,所述计算各个特征向量之间的距离,根据特征向量之间的距离对所有的特征向量进行聚类的步骤包括:
    计算每个特征向量与其它特征向量之间的距离;
    将距离落入预设的数值范围的特征向量归为相同图像类别;
    在聚类过程中,若有特征向量未归入任意一个已有图像类别,则将该特征向量作为一个新的图像类别追加到已有图像类别,直到将所有的特征向量完成分类。
  8. 如权利要求6所述的电子装置,其特征在于,所述计算各个特征向量之间的距离,根据特征向量之间的距离对所有的特征向量进行聚类的步骤替换为:
    a、随机在得到的特征向量中取m个特征向量作为种子点;
    b、计算所有余下的特征向量分别到这m个种子点的距离,将所有余下的特征向量分别划分到其距离最近的种子点的点群;
    c、计算每个点群的中心,将各个种子点移动到其所在点群的中心;
    d、重复步骤b和c,直到种子点不再移动,则得到的点群为分类结果。
  9. 一种人脸图像聚类搜索方法,其特征在于,该方法包括步骤:
    B1、对实时图像进行人脸检测以确定出实时人脸图像,计算出该实时人脸图像的特征向量;
    B2、计算所述实时人脸图像的特征向量分别与预先确定的各个图像类别的中心点特征向量的距离,筛选距离小于第一阈值的中心点特征向量,将筛选出的中心点特征向量所对应的图像类别作为候选类 别;
    B3、在所述候选类别中找出特征向量与所述实时人脸图像的特征向量的距离最近且小于第二阈值的样本图像。
  10. 如权利要求9所述的人脸图像聚类搜索方法,其特征在于,所述预先确定的各个图像类别的中心点特征向量通过以下步骤确定:
    对样本库中的每张样本图像进行人脸检测,从样本图像中确定人脸图像,并计算出确定的人脸图像的特征向量;
    计算各个特征向量之间的距离,根据特征向量之间的距离对所有的特征向量进行聚类;
    对聚类后得到的各个图像类别分别采用计算公式
    Figure PCTCN2018076123-appb-100003
    进行计算,以得到各个图像类别各自的中心点特征向量,所述计算公式中,n表示类别中特征向量的个数,F (i)表示第i个特征向量,X k表示特征向量中第k个元素的值。
  11. 如权利要求10所述的人脸图像聚类搜索方法,其特征在于,所述计算各个特征向量之间的距离,根据特征向量之间的距离对所有的特征向量进行聚类的步骤包括:
    计算每个特征向量与其它特征向量之间的距离;
    将距离落入预设的数值范围的特征向量归为相同图像类别;
    在聚类过程中,若有特征向量未归入任意一个已有图像类别,则将该特征向量作为一个新的图像类别追加到已有图像类别,直到将所有的特征向量完成分类。
  12. 如权利要求10所述的人脸图像聚类搜索方法,其特征在于,所述计算各个特征向量之间的距离,根据特征向量之间的距离对所有的特征向量进行聚类的步骤替换为:
    a、随机在得到的特征向量中取m个特征向量作为种子点;
    b、计算所有余下的特征向量分别到这m个种子点的距离,将所 有余下的特征向量分别划分到其距离最近的种子点的点群;
    c、计算每个点群的中心,将各个种子点移动到其所在点群的中心;
    d、重复步骤b和c,直到种子点不再移动,则得到的点群为分类结果。
  13. 如权利要求9所述的人脸图像聚类搜索方法,其特征在于,于所述步骤B3之后,所述方法还包括步骤:
    根据预先确定的样本图像与人脸ID的映射关系,确定所述搜索到的样本图像对应的人脸ID,将该确定的人脸ID作为识别结果。
  14. 如权利要求13所述的人脸图像聚类搜索方法,其特征在于,所述预先确定的各个图像类别的中心点特征向量通过以下步骤确定:
    对样本库中的每张样本图像进行人脸检测,从样本图像中确定人脸图像,并计算出确定的人脸图像的特征向量;
    计算各个特征向量之间的距离,根据特征向量之间的距离对所有的特征向量进行聚类;
    对聚类后得到的各个图像类别分别采用计算公式 进行计算,以得到各个图像类别各自的中心点特征向量,所述计算公式中,n表示类别中特征向量的个数,F (i)表示第i个特征向量,X k表示特征向量中第k个元素的值。
  15. 如权利要求14所述的人脸图像聚类搜索方法,其特征在于,所述计算各个特征向量之间的距离,根据特征向量之间的距离对所有的特征向量进行聚类的步骤包括:
    计算每个特征向量与其它特征向量之间的距离;
    将距离落入预设的数值范围的特征向量归为相同图像类别;
    在聚类过程中,若有特征向量未归入任意一个已有图像类别,则将该特征向量作为一个新的图像类别追加到已有图像类别,直到将所 有的特征向量完成分类。
  16. 如权利要求14所述的人脸图像聚类搜索方法,其特征在于,所述计算各个特征向量之间的距离,根据特征向量之间的距离对所有的特征向量进行聚类的步骤替换为:
    a、随机在得到的特征向量中取m个特征向量作为种子点;
    b、计算所有余下的特征向量分别到这m个种子点的距离,将所有余下的特征向量分别划分到其距离最近的种子点的点群;
    c、计算每个点群的中心,将各个种子点移动到其所在点群的中心;
    d、重复步骤b和c,直到种子点不再移动,则得到的点群为分类结果。
  17. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质存储有人脸图像聚类搜索系统,所述人脸图像聚类搜索系统可被至少一个处理器执行,以使所述至少一个处理器执行如下步骤:
    C1、对实时图像进行人脸检测以确定出实时人脸图像,计算出该实时人脸图像的特征向量;
    C2、计算所述实时人脸图像的特征向量分别与预先确定的各个图像类别的中心点特征向量的距离,筛选距离小于第一阈值的中心点特征向量,将筛选出的中心点特征向量所对应的图像类别作为候选类别;
    C3、在所述候选类别中找出特征向量与所述实时人脸图像的特征向量的距离最近且小于第二阈值的样本图像。
  18. 如权利要求17所述的人脸图像聚类搜索方法,其特征在于,所述预先确定的各个图像类别的中心点特征向量通过以下步骤确定:
    对样本库中的每张样本图像进行人脸检测,从样本图像中确定人脸图像,并计算出确定的人脸图像的特征向量;
    计算各个特征向量之间的距离,根据特征向量之间的距离对所有 的特征向量进行聚类;
    对聚类后得到的各个图像类别分别采用计算公式
    Figure PCTCN2018076123-appb-100005
    进行计算,以得到各个图像类别各自的中心点特征向量,所述计算公式中,n表示类别中特征向量的个数,F (i)表示第i个特征向量,X k表示特征向量中第k个元素的值。
  19. 如权利要求18所述的人脸图像聚类搜索方法,其特征在于,所述计算各个特征向量之间的距离,根据特征向量之间的距离对所有的特征向量进行聚类的步骤包括:
    计算每个特征向量与其它特征向量之间的距离;
    将距离落入预设的数值范围的特征向量归为相同图像类别;
    在聚类过程中,若有特征向量未归入任意一个已有图像类别,则将该特征向量作为一个新的图像类别追加到已有图像类别,直到将所有的特征向量完成分类。
  20. 如权利要求17所述的人脸图像聚类搜索方法,其特征在于,于所述步骤C3之后,所述人脸图像聚类搜索系统还被所述至少一个处理器执行,以实现如下步骤:
    根据预先确定的样本图像与人脸ID的映射关系,确定所述搜索到的样本图像对应的人脸ID,将该确定的人脸ID作为识别结果。
PCT/CN2018/076123 2017-10-23 2018-02-10 电子装置、人脸图像聚类搜索方法和计算机可读存储介质 WO2019080411A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201710993380.7 2017-10-23
CN201710993380.7A CN107766822A (zh) 2017-10-23 2017-10-23 电子装置、人脸图像聚类搜索方法和计算机可读存储介质

Publications (1)

Publication Number Publication Date
WO2019080411A1 true WO2019080411A1 (zh) 2019-05-02

Family

ID=61269977

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/076123 WO2019080411A1 (zh) 2017-10-23 2018-02-10 电子装置、人脸图像聚类搜索方法和计算机可读存储介质

Country Status (2)

Country Link
CN (1) CN107766822A (zh)
WO (1) WO2019080411A1 (zh)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110991514A (zh) * 2019-11-27 2020-04-10 深圳市商汤科技有限公司 图像聚类方法及装置、电子设备和存储介质
CN111507238A (zh) * 2020-04-13 2020-08-07 三一重工股份有限公司 人脸数据筛选方法、装置及电子设备
CN111539285A (zh) * 2020-04-16 2020-08-14 艾特城信息科技有限公司 一种基于特征编码的高效人脸聚类方法

Families Citing this family (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110502953A (zh) * 2018-05-16 2019-11-26 杭州海康威视数字技术股份有限公司 一种图像模型比对方法和装置
CN109472292A (zh) * 2018-10-11 2019-03-15 平安科技(深圳)有限公司 一种图像的情感分类方法、存储介质和服务器
CN109165639B (zh) * 2018-10-15 2021-12-10 广州广电运通金融电子股份有限公司 一种指静脉识别方法、装置及设备
CN111435424A (zh) * 2019-01-14 2020-07-21 北京京东尚科信息技术有限公司 一种图像处理方法和设备
CN109766470A (zh) * 2019-01-15 2019-05-17 北京旷视科技有限公司 图像检索方法、装置及处理设备
CN110084268A (zh) * 2019-03-18 2019-08-02 浙江大华技术股份有限公司 图像比对方法、人脸识别方法及装置、计算机存储介质
CN111860062B (zh) * 2019-04-29 2023-11-24 中国移动通信集团河北有限公司 人脸识别样本处理方法及装置
CN112052706B (zh) * 2019-06-06 2022-07-29 鸿富锦精密工业(武汉)有限公司 电子装置及人脸识别方法
CN111009065A (zh) * 2019-12-09 2020-04-14 金现代信息产业股份有限公司 基于聚类算法的人脸识别门禁系统优化方法及系统
CN110969215B (zh) * 2019-12-18 2023-06-16 浙江大华技术股份有限公司 聚类处理方法和装置、存储介质及电子装置
CN111091106B (zh) * 2019-12-23 2023-10-10 浙江大华技术股份有限公司 图像聚类方法及装置、存储介质、电子装置
CN111444366B (zh) * 2020-04-10 2024-02-20 Oppo广东移动通信有限公司 图像分类方法、装置、存储介质及电子设备
CN112733916B (zh) * 2020-12-31 2023-04-07 五八有限公司 虚假证件图片的识别方法、装置、电子设备及存储介质
CN113065447A (zh) * 2021-03-29 2021-07-02 南京掌控网络科技有限公司 一种图像集中自动识别商品的方法和设备
CN113255694B (zh) * 2021-05-21 2022-11-11 北京百度网讯科技有限公司 训练图像特征提取模型和提取图像特征的方法、装置

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103793466A (zh) * 2013-12-20 2014-05-14 深圳先进技术研究院 一种图像检索方法及装置
CN105303150A (zh) * 2014-06-26 2016-02-03 腾讯科技(深圳)有限公司 实现图像处理的方法和系统
CN105320945A (zh) * 2015-10-30 2016-02-10 小米科技有限责任公司 图像分类的方法及装置
CN106156755A (zh) * 2016-07-29 2016-11-23 深圳云天励飞技术有限公司 一种人脸识别中的相似度计算方法及系统

Family Cites Families (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101576913B (zh) * 2009-06-12 2011-09-21 中国科学技术大学 基于自组织映射神经网络的舌象自动聚类、可视化和检索方法
CN102542058B (zh) * 2011-12-29 2013-04-03 天津大学 一种融合全局与局部视觉特征的层次化地标识别方法
JP6188147B2 (ja) * 2013-10-15 2017-08-30 国立大学法人広島大学 認識システム
CN103617609B (zh) * 2013-10-24 2016-04-13 上海交通大学 基于图论的k-means非线性流形聚类与代表点选取方法
CN103778436B (zh) * 2014-01-20 2017-04-05 电子科技大学 一种基于图像处理的行人姿态检测方法
CN104239898B (zh) * 2014-09-05 2017-07-14 浙江捷尚视觉科技股份有限公司 一种快速卡口车辆比对和车型识别方法
CN104765768B (zh) * 2015-03-09 2018-11-02 深圳云天励飞技术有限公司 海量人脸库的快速准确检索方法
CN105574494B (zh) * 2015-12-11 2020-01-17 清华大学 一种多分类器姿势识别方法及装置
CN105631416B (zh) * 2015-12-24 2018-11-13 华侨大学 采用新型密度聚类进行人脸识别的方法
CN106250821A (zh) * 2016-07-20 2016-12-21 南京邮电大学 一种聚类再分类的人脸识别方法
CN106778653A (zh) * 2016-12-27 2017-05-31 北京光年无限科技有限公司 面向智能机器人的基于人脸识别样本库的交互方法和装置
CN106997629B (zh) * 2017-02-17 2019-06-11 北京格灵深瞳信息技术有限公司 门禁控制方法、装置及系统

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103793466A (zh) * 2013-12-20 2014-05-14 深圳先进技术研究院 一种图像检索方法及装置
CN105303150A (zh) * 2014-06-26 2016-02-03 腾讯科技(深圳)有限公司 实现图像处理的方法和系统
CN105320945A (zh) * 2015-10-30 2016-02-10 小米科技有限责任公司 图像分类的方法及装置
CN106156755A (zh) * 2016-07-29 2016-11-23 深圳云天励飞技术有限公司 一种人脸识别中的相似度计算方法及系统

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110991514A (zh) * 2019-11-27 2020-04-10 深圳市商汤科技有限公司 图像聚类方法及装置、电子设备和存储介质
CN111507238A (zh) * 2020-04-13 2020-08-07 三一重工股份有限公司 人脸数据筛选方法、装置及电子设备
CN111507238B (zh) * 2020-04-13 2023-08-01 盛景智能科技(嘉兴)有限公司 人脸数据筛选方法、装置及电子设备
CN111539285A (zh) * 2020-04-16 2020-08-14 艾特城信息科技有限公司 一种基于特征编码的高效人脸聚类方法
CN111539285B (zh) * 2020-04-16 2023-06-06 艾特城信息科技有限公司 一种基于特征编码的高效人脸聚类方法

Also Published As

Publication number Publication date
CN107766822A (zh) 2018-03-06

Similar Documents

Publication Publication Date Title
WO2019080411A1 (zh) 电子装置、人脸图像聚类搜索方法和计算机可读存储介质
US11816888B2 (en) Accurate tag relevance prediction for image search
CN107085585B (zh) 用于图像搜索的准确的标签相关性预测
US10891465B2 (en) Methods and apparatuses for searching for target person, devices, and media
US11048966B2 (en) Method and device for comparing similarities of high dimensional features of images
US10438050B2 (en) Image analysis device, image analysis system, and image analysis method
JP6144839B2 (ja) 画像を検索するための方法およびシステム
US8027541B2 (en) Image organization based on image content
US9405965B2 (en) Vector-based face recognition algorithm and image search system
RU2668717C1 (ru) Генерация разметки изображений документов для обучающей выборки
US8649602B2 (en) Systems and methods for tagging photos
US20170351934A1 (en) Object recognition device, object recognition method, and program
WO2019001481A1 (zh) 车辆外观特征识别及车辆检索方法、装置、存储介质、电子设备
US8582872B1 (en) Place holder image detection via image clustering
Chang et al. A novel content based image retrieval system using k-means/knn with feature extraction
US10706322B1 (en) Semantic ordering of image text
WO2019237558A1 (zh) 电子装置、图片样本集生成方法和计算机可读存储介质
JP7287511B2 (ja) 情報処理装置、容疑者情報生成方法及びプログラム
Sundara Vadivel et al. An efficient CBIR system based on color histogram, edge, and texture features
US10628662B2 (en) Automated and unsupervised curation of image datasets
WO2019100348A1 (zh) 图像检索方法和装置以及图像库的生成方法和装置
Ho et al. A novel content based image retrieval system using K-means with feature extraction
Gao et al. Occluded person re-identification based on feature fusion and sparse reconstruction
CN110209895B (zh) 向量检索方法、装置和设备
Tang et al. Label-specific training set construction from web resource for image annotation

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 18871299

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS (EPO FORM 1205A DATED 23.09.2020)

122 Ep: pct application non-entry in european phase

Ref document number: 18871299

Country of ref document: EP

Kind code of ref document: A1