WO2024066050A1 - 一种基于视觉模板和金字塔策略的人脸识别方法及装置 - Google Patents

一种基于视觉模板和金字塔策略的人脸识别方法及装置 Download PDF

Info

Publication number
WO2024066050A1
WO2024066050A1 PCT/CN2022/137724 CN2022137724W WO2024066050A1 WO 2024066050 A1 WO2024066050 A1 WO 2024066050A1 CN 2022137724 W CN2022137724 W CN 2022137724W WO 2024066050 A1 WO2024066050 A1 WO 2024066050A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
template
feature vector
pyramid
image feature
Prior art date
Application number
PCT/CN2022/137724
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 WO2024066050A1 publication Critical patent/WO2024066050A1/zh

Links

Classifications

    • 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
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/74Image or video pattern matching; Proximity measures in feature spaces
    • G06V10/761Proximity, similarity or dissimilarity measures

Definitions

  • the present invention relates to the technical field of face recognition, and in particular to a face recognition method and device based on visual template and pyramid strategy.
  • the manual statistics method for collecting information on personnel entering the site has the problems of low statistical information coverage, poor accuracy, low information credibility, wrong records, and omissions.
  • the final result of these problems is that the information collection process cannot be supervised, the authenticity of the information is poor, and the management is chaotic.
  • the technical problem to be solved by the present invention is that, in view of the above-mentioned defects of the prior art, a face recognition method and device based on visual templates and pyramid strategy are provided, aiming to provide a solution to the problems in the prior art that the process of collecting personnel identity information cannot be supervised, the authenticity of the information is poor, and the management is chaotic.
  • the present invention provides a face recognition method based on visual templates and pyramid strategy, wherein the method comprises:
  • Acquire image data within a preset range in front of the gate identify boundary information of people and objects in the image data, and extract image feature vectors based on the boundary information;
  • the person identity information corresponding to the image feature vector is determined.
  • the identifying boundary information of people and objects in the image data includes:
  • Boundary information of the image data is determined according to the grayscale data, where the boundary information reflects edges of people and objects in the image data.
  • obtaining a preset visual template library, matching the image feature vector with image templates in the visual template library in sequence based on a pyramid strategy, and finding a target image template includes:
  • each layer in the pyramid structure is provided with a corresponding image template, and image resolutions corresponding to the image templates in the pyramid structure increase from top to bottom;
  • the image feature vector is matched with the image template of the pyramid structure from top to bottom in sequence to determine the target image template.
  • matching the image feature vector with the image template of the pyramid structure from top to bottom in sequence to determine the target image template includes:
  • an image template with the largest cosine similarity is determined, and the image template with the largest cosine similarity is used as the target image template.
  • matching the image feature vector with the image template of the pyramid structure from top to bottom in sequence to determine the target image template further includes:
  • the matching process of the image feature vector is stopped.
  • determining the person identity information corresponding to the image feature vector according to the target image template includes:
  • the personnel information including facial images at various angles corresponding to the target image template and personnel type information corresponding to the facial images;
  • the current person type information is matched with the person information of the target image template to determine a current face image corresponding to the current person type information, and the person identity information is determined based on the current face image.
  • the obtaining current scene information corresponding to the image feature vector includes:
  • the current scene information corresponding to the image feature vector is determined according to the current object type information and the relative position relationship.
  • an embodiment of the present invention further provides a face recognition device based on a visual template and a pyramid strategy, wherein the device comprises:
  • An image recognition module is used to obtain image data within a preset range in front of the gate, identify boundary information of people and objects in the image data, and extract image feature vectors based on the boundary information;
  • a template determination module is used to obtain a preset visual template library, and sequentially match the image feature vector with the image templates in the visual template library based on a pyramid strategy to find a target image template;
  • the identity recognition module is used to determine the person identity information corresponding to the image feature vector according to the target image template.
  • an embodiment of the present invention further provides a terminal device, wherein the terminal device is a commercial display terminal or a projection terminal, and the terminal device includes a memory, a processor, and a face recognition program based on a visual template and a pyramid strategy stored in the memory and runnable on the processor.
  • the processor executes the face recognition program based on a visual template and a pyramid strategy, the steps of the face recognition method based on a visual template and a pyramid strategy of any one of the above-mentioned schemes are implemented.
  • an embodiment of the present invention further provides a computer-readable storage medium, wherein a face recognition program based on a visual template and a pyramid strategy is stored on the computer-readable storage medium, and when the face recognition program based on a visual template and a pyramid strategy is executed by a processor, the steps of the face recognition method based on a visual template and a pyramid strategy described in any one of the above-mentioned schemes are implemented.
  • the present invention provides a face recognition method based on visual templates and pyramid strategies.
  • the present invention first obtains image data within a preset range in front of the gate, identifies the boundary information of people and objects in the image data, and extracts image feature vectors based on the boundary information. Then, a preset visual template library is obtained, and the image feature vector is matched with the image templates in the visual template library in sequence based on the pyramid strategy to find the target image template. Finally, according to the target image template, the identity information of the person corresponding to the image feature vector is determined.
  • the face recognition based on image templates of the present invention can realize the determination of the identity of the person, and can also quickly realize recognition, improve recognition efficiency, facilitate the efficient collection of information, and facilitate the management of personnel.
  • FIG1 is a flowchart of a specific implementation of a face recognition method based on visual templates and pyramid strategy provided by an embodiment of the present invention.
  • FIG2 is a functional schematic diagram of a face recognition device based on visual templates and pyramid strategy provided by an embodiment of the present invention.
  • FIG3 is a functional block diagram of a terminal device provided in an embodiment of the present invention.
  • the present embodiment provides a face recognition method based on visual templates and pyramid strategy. Based on the method of the present embodiment, recognition can be quickly realized, recognition efficiency can be improved, it is conducive to the efficient collection of information, and it is convenient to manage personnel. Specifically, the present embodiment first obtains image data within a preset range in front of the gate, identifies the boundary information of people and objects in the image data, and extracts image feature vectors based on the boundary information. Then, a preset visual template library is obtained, and the image feature vector is matched with the image template in the visual template library in sequence based on the pyramid strategy to find the target image template. Finally, according to the target image template, the identity information of the person corresponding to the image feature vector is determined. The present invention can find the most matching target image template based on the pyramid strategy, and then realize the information of the identity of the person based on the target image template, so as to realize the rapid and efficient collection and management of the identity information of the person.
  • the face recognition method based on visual template and pyramid strategy of this embodiment can be applied to a terminal device, which can be a computer device or a gate device, and the gate device can collect face images and analyze the collected image data to realize face recognition.
  • a terminal device which can be a computer device or a gate device
  • the gate device can collect face images and analyze the collected image data to realize face recognition.
  • Figure 1 The face recognition method based on visual template and pyramid strategy of this embodiment includes the following steps:
  • Step S100 acquiring image data within a preset range in front of the gate, identifying boundary information of people and objects in the image data, and extracting image feature vectors based on the boundary information.
  • the face recognition method based on visual templates and pyramid strategy in this embodiment is applied to a gate, which is provided with an image acquisition device, such as a camera.
  • the image acquisition device can realize image acquisition of the area within a preset range in front of the gate to obtain image data.
  • the gate of this embodiment is installed at the entrance and exit of the construction site, and the gate can acquire images of people entering and exiting the entrance and exit.
  • the acquisition range can be the range area of 150° angle directly in front of the gate.
  • the present embodiment can identify the people and objects in the image data, and identify the boundary information of the people and objects, the boundary information is the boundary between the people and objects in the image data, and the boundary information can determine the range of the people and objects in the image data.
  • this embodiment can extract the image feature vector from the boundary information.
  • the image feature vector in this embodiment converts the three matrices corresponding to the image (the values of the matrices are the red, green and blue pixel values in the image data) into a vector.
  • the vector can be input into the neural network model.
  • Each data input into the neural network model is called a feature, so the converted vector is an image feature vector.
  • the image feature vector can reflect the pixel value of each pixel in the image data. Its essence is to reflect the image content in the image data, that is, it reflects people, objects and other things.
  • the present embodiment includes the following steps in identifying the boundary information:
  • Step S101 identifying pixel information of the image data based on customized convolution filtering, and determining grayscale data corresponding to the pixel information;
  • Step S102 Determine boundary information of the image data according to the grayscale data, where the boundary information reflects edges of people and objects in the image data.
  • the gate machine of this embodiment can collect image data of different scenes and different light intensities. After collecting the image data, this embodiment uses customized convolution filtering to identify the pixel information of the image data. Since the pixel information can reflect the pixel values of all pixels in the image data, the corresponding grayscale data can be determined based on these pixel information. When processing the image data, this embodiment extracts the pixel information based on customized convolution operations and filtering operations, and then determines the grayscale data based on the pixel values.
  • this embodiment can determine the location of the grayscale data mutation based on the grayscale data, thereby determining the boundary information of the image data, and the boundary information reflects the edges of people and objects in the image data, and thus determines the location of people and objects in the image data.
  • Step S200 obtaining a preset visual template library, and matching the image feature vector with the image templates in the visual template library in sequence based on a pyramid strategy to find a target image template.
  • a visual template library is preset, and a plurality of image templates are set in the visual template library, and these image templates are combined to form a pyramid structure, and a corresponding image template is set in each layer of the pyramid structure, and the image resolution corresponding to the image template in the pyramid structure increases from top to bottom.
  • this embodiment sequentially matches the image feature vector with the image templates in the pyramid structure to find the most matching target image template.
  • this embodiment when constructing a visual template library, this embodiment first collects images under different lighting conditions, and the collected images also include images with different resolutions. Then, this embodiment arranges all collected images from low to high according to resolution, with the image at the top layer having the lowest resolution and the image at the bottom layer having the highest resolution, forming a pyramid structure. In addition, this embodiment also analyzes all images to determine the reference image feature vector corresponding to each image and the personnel information corresponding to the reference image feature vector. Finally, each layer of the formed pyramid structure is provided with a corresponding image template, and the image resolution corresponding to the image template in the pyramid structure increases from top to bottom.
  • the image templates are obtained based on image collection of different angles and different types of personnel, so each image template has its own corresponding face image and corresponding personnel type information.
  • the personnel type information in this embodiment reflects the type of work of the personnel.
  • the step of determining the target image template in this embodiment includes:
  • Step S201 obtaining a pyramid structure in the visual template library, wherein each layer in the pyramid structure is provided with a corresponding image template, and the image resolutions corresponding to the image templates in the pyramid structure are increased from top to bottom;
  • Step S202 Match the image feature vector with the image template of the pyramid structure from top to bottom in sequence to determine the target image template.
  • the present embodiment first obtains a pyramid structure in a visual template library, obtains each layer of image templates in the pyramid structure, and then, the present embodiment calculates cosine similarity between the image feature vector and the reference image feature vector of the image template of the pyramid structure from top to bottom.
  • the present embodiment first calculates cosine similarity between the image feature vector and the reference image feature vector of the topmost image template from top to bottom in the pyramid structure, and the cosine similarity is evaluated by calculating the cosine value of the angle between the two vectors, and then calculates cosine similarity between the image feature vector and the reference image feature vector of the image template of the second layer from top to bottom in the pyramid structure, and so on, calculates cosine similarity between the image feature vector and the reference image feature vector of the image template of the pyramid structure from top to bottom. Then, from the calculated cosine similarity, the image template with the largest cosine similarity is screened out, and the image template with the largest cosine similarity is used as the target image template. At this point, the image template that best matches the image feature vector can be determined.
  • the image feature vector is matched with the reference image feature vector of the image template of the next layer in the pyramid structure. If the cosine similarity between the image feature vector and the reference image feature vector of the current image template of the pyramid structure is less than the preset threshold, the matching process of the image feature vector is stopped.
  • the cosine similarity is calculated between the image feature vector and the reference image feature vector of the topmost image template from the top to the bottom in the pyramid structure, and the calculated cosine similarity is greater than the preset threshold, the cosine similarity is calculated between the image feature vector and the reference image feature vector of the image template of the second layer from the top to the bottom in the pyramid structure. If the calculated cosine similarity is less than the preset threshold, the matching process of the image feature vector is stopped.
  • the present embodiment is to find the most matching target image template by facilitating all image templates, and since the resolution of the image templates from top to bottom of the pyramid structure gradually increases, the matching of the image feature vectors is performed from top to bottom, so the present embodiment is to match the image feature vectors with the low-resolution image templates first, and then with the high-resolution image templates, and once the calculated cosine similarity is lower than the preset threshold, it stops jumping to the next image template, which can save a lot of computing time and computing power.
  • Step S300 Determine the person identity information corresponding to the image feature vector according to the target image template.
  • this embodiment can determine the person identity information corresponding to the image feature vector based on the determined target image template, that is, find out who the person corresponding to the image feature vector is, thereby realizing the collection and management of personnel information.
  • this embodiment when determining the identity information of a person, this embodiment includes the following steps:
  • Step S301 obtaining personnel information of the target image template, the personnel information including facial images of various angles corresponding to the target image template and personnel type information corresponding to the facial images;
  • Step S302 obtaining current scene information corresponding to the image feature vector, and determining current person type information corresponding to the image feature vector based on the current scene information, wherein the current person type information is used to reflect the person type corresponding to the current scene information;
  • Step S303 Match the current person type information with the person information of the target image template, determine the current face image corresponding to the current person type information, and determine the person identity information based on the current face image.
  • each image template in this embodiment has its own corresponding personnel type information and corresponding face image
  • this embodiment first obtains the personnel information of the target image template, and the personnel information includes the face images of each angle corresponding to the target image template and the personnel type information corresponding to the face image, that is, the situation of the personnel in the target image template at this time is obtained. Then, since this embodiment has determined the boundaries of the personnel and the object, and also obtained the corresponding image feature vector, this embodiment can obtain the current object type information corresponding to the image feature vector, that is, determine the type of the current object, for example, if the object is a steel bar, an excavator or a scaffold, the current object type information at this time is construction equipment.
  • this embodiment obtains the relative position relationship between the personnel and the object in the image data. Then, according to the current object type information and the relative position relationship, the current scene information corresponding to the image feature vector is determined. For example, if the current object type information is construction equipment, and the relative position relationship between the personnel and the object is very close or the personnel is operating the object, then it can be determined that the current scene information is a construction site scene. In another implementation, when determining the current scene information, this embodiment may make judgments based on the frequency, distance, and position of the simultaneous appearance of people and objects.
  • It may analyze the simultaneous appearance of people and objects based on a large number of sample images in advance, and summarize the rules, thereby analyzing what the scene corresponding to the simultaneous appearance of the person and the object is, and then forming a rule.
  • This embodiment can apply the rule to determine the current scene information at this time.
  • this embodiment determines the current personnel type information corresponding to the image feature vector based on the current scene information, and the current personnel type information is used to reflect the personnel type corresponding to the current scene information, that is, the type of work of the personnel.
  • the current scene information determined above is a construction site scene, so the corresponding personnel type is a worker.
  • this embodiment matches the current personnel type information with the personnel information of the target image template, determines the current facial image corresponding to the prime current personnel type information, and then determines the personnel identity information based on the current facial image. At this time, the identity of the personnel is determined, and the identification of the personnel identity is realized, thereby realizing the management of the personnel.
  • the present embodiment first obtains image data within a preset range in front of the gate, identifies the boundary information of people and objects in the image data, and extracts image feature vectors based on the boundary information. Then, a preset visual template library is obtained, and the image feature vector is matched with the image templates in the visual template library in sequence based on the pyramid strategy to find the target image template. Finally, according to the target image template, the identity information of the person corresponding to the image feature vector is determined.
  • the face recognition based on the image template of the present embodiment can realize the determination of the identity of the person, and can also realize the recognition quickly, improve the recognition efficiency, facilitate the efficient collection of information, and facilitate the management of personnel.
  • the present invention also provides a face recognition device based on visual templates and pyramid strategy, as shown in FIG2 , the device includes: an image recognition module 10, a template determination module 20 and an identity recognition module 30.
  • the image recognition module 10 is used to obtain image data within a preset range in front of the gate, identify boundary information of people and objects in the image data, and extract image feature vectors based on the boundary information.
  • the template determination module 20 is used to obtain a preset visual template library, and based on the pyramid strategy, the image feature vector is matched with the image templates in the visual template library in sequence to find the target image template.
  • the identity recognition module 30 is used to determine the person identity information corresponding to the image feature vector according to the target image template.
  • the image recognition module 10 includes:
  • a grayscale data determination unit configured to identify pixel information of the image data based on a customized convolution filter, and determine grayscale data corresponding to the pixel information
  • the boundary information determining unit is used to determine the boundary information of the image data according to the grayscale data, wherein the boundary information reflects the edges of people and objects in the image data.
  • the template determination module 20 includes:
  • An image template acquisition unit used for acquiring a pyramid structure in the visual template library, wherein each layer in the pyramid structure is provided with a corresponding image template, and the image resolutions corresponding to the image templates in the pyramid structure are increased from top to bottom;
  • the image template determination unit is used to match the image feature vector with the image template of the pyramid structure from top to bottom in sequence to determine the target image template.
  • the image template determining unit includes:
  • a cosine similarity calculation subunit used for calculating the cosine similarity of the image feature vector and the reference image feature vector of the image template of the pyramid structure in order from top to bottom;
  • the target image template determination subunit is used to determine the image template with the largest cosine similarity according to the calculated cosine similarity, and use the image template with the largest cosine similarity as the target image template.
  • the image template determining unit further includes:
  • a matching continuous subunit configured to match the image feature vector with a reference image feature vector of an image template of a next layer in the pyramid structure if the cosine similarity between the image feature vector and the reference image feature vector of the current image template of the pyramid structure is greater than or equal to a preset threshold;
  • the matching stopping subunit is used to stop the matching process of the image feature vector if the cosine similarity between the image feature vector and the reference image characteristic vector of the current image template of the pyramid structure is less than a preset threshold.
  • the identity recognition module includes:
  • a target image analysis unit configured to obtain personnel information of the target image template, wherein the personnel information includes facial images of various angles corresponding to the target image template and personnel type information corresponding to the facial images;
  • a type information determining unit configured to obtain current scene information corresponding to the image feature vector, and determine current person type information corresponding to the image feature vector based on the current scene information, wherein the current person type information is used to reflect the person type corresponding to the current scene information;
  • the identity recognition unit is used to match the current person type information with the person information of the target image template, determine the current face image corresponding to the current person type information, and determine the person identity information based on the current face image.
  • the type information determining unit further includes:
  • a type information acquisition subunit used to acquire current object type information corresponding to the image feature vector
  • a position relationship acquisition subunit used to acquire the relative position relationship between the person and the object in the image data
  • the scene information determination subunit is used to determine the current scene information corresponding to the image feature vector according to the current object type information and the relative position relationship.
  • the present invention further provides a terminal device, the principle block diagram of which can be shown in Figure 3, and the terminal device is the host computer in the above embodiments, such as a computer device.
  • the terminal device may include one or more processors 100 (only one is shown in Figure 3), a memory 101, and a computer program 102 stored in the memory 101 and executable on one or more processors 100, for example, a program for face recognition based on visual templates and pyramid strategies.
  • processors 100 execute the computer program 102
  • the various steps in the method embodiment of face recognition based on visual templates and pyramid strategies can be implemented.
  • the functions of each template/unit in the device embodiment of face recognition based on visual templates and pyramid strategies can be implemented, which is not limited here.
  • the processor 100 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.
  • a general-purpose processor may be a microprocessor or any conventional processor, etc.
  • the memory 101 may be an internal storage unit of an electronic device, such as a hard disk or memory of the electronic device.
  • the memory 101 may also be an external storage device of the electronic device, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the electronic device.
  • the memory 101 may also include both an internal storage unit of the electronic device and an external storage device.
  • the memory 101 is used to store computer programs and other programs and data required by the terminal device.
  • the memory 101 may also be used to temporarily store data that has been output or is to be output.
  • FIG3 is only a block diagram of a partial structure related to the solution of the present invention, and does not constitute a limitation on the terminal device to which the solution of the present invention is applied.
  • the specific terminal device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
  • Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory.
  • Volatile memory can include random access memory (RAM) or external cache memory.
  • RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual operating data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
  • the present invention discloses a method and device for face recognition based on visual templates and pyramid strategy, the method comprising: obtaining image data within a preset range in front of the gate, identifying boundary information of people and objects in the image data, and extracting image feature vectors based on the boundary information; obtaining a preset visual template library, and matching the image feature vectors with image templates in the visual template library in sequence based on the pyramid strategy to find the target image template; and determining the person identity information corresponding to the image feature vector according to the target image template.
  • the face recognition based on image templates of the present invention can realize the determination of the identity of a person, and can also realize identification quickly, improve the recognition efficiency, and facilitate the efficient collection of information.

Landscapes

  • Engineering & Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Theoretical Computer Science (AREA)
  • Multimedia (AREA)
  • Oral & Maxillofacial Surgery (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • General Health & Medical Sciences (AREA)
  • Computing Systems (AREA)
  • Artificial Intelligence (AREA)
  • Human Computer Interaction (AREA)
  • Databases & Information Systems (AREA)
  • Evolutionary Computation (AREA)
  • Medical Informatics (AREA)
  • Software Systems (AREA)
  • Collating Specific Patterns (AREA)
  • Image Analysis (AREA)

Abstract

本发明公开了一种基于视觉模板和金字塔策略的人脸识别方法及装置,所述方法包括:获取闸机前方预设范围内的图像数据,识别所述图像数据中人员以及物体的边界信息,并基于所述边界信息提取图像特征向量;获取预设的视觉模板库,并基于金字塔策略将所述图像特征向量与所述视觉模板库中的图像模板依次进行匹配,找出目标图像模板;根据所述目标图像模板,确定所述图像特征向量所对应的人员身份信息。本发明基于图像模板的人脸识别可实现对人员身份的确定,并且还可以快速地实现识别,提高识别效率,有利于实现信息的高效采集。

Description

一种基于视觉模板和金字塔策略的人脸识别方法及装置 技术领域
本发明涉及人脸识别技术领域,尤其涉及一种基于视觉模板和金字塔策略的人脸识别方法及装置。
背景技术
建筑行业作为推动我国经济社会发展的重要力量,容纳超过七千万建筑从业人员,其中人员结构复杂且绝大多数来自农村务工人员。
由于劳务分包模式,建筑行业信息化率较低,务工人员流动性强等原因,目前建筑工地还处于人为统计的方式来搜集入场人员信息。人为统计方式搜集入场人员信息,存在统计信息覆盖率偏低,准确性差,信息可信度低,错记,漏记等现象。这些问题导致的最终结果为信息采集过程无法监督,信息真实性差,管理混乱。
因此,现有技术还有待改进和提高。
技术问题
本发明要解决的技术问题在于,针对现有技术的上述缺陷,提供一种基于视觉模板和金字塔策略的人脸识别方法及装置,旨在提供解决现有技术中对于人员身份信息采集过程无法监督,信息真实性差,管理混乱的问题。
技术解决方案
第一方面,本发明提供一种基于视觉模板和金字塔策略的人脸识别方法,其中,所述方法包括:
获取闸机前方预设范围内的图像数据,识别所述图像数据中人员以及物体的边界信息,并基于所述边界信息提取图像特征向量;
获取预设的视觉模板库,并基于金字塔策略将所述图像特征向量与所述视觉模板库中的图像模板依次进行匹配,找出目标图像模板;
根据所述目标图像模板,确定所述图像特征向量所对应的人员身份信息。
在一种实现方式中,所述识别所述图像数据中人员以及物体的边界信息,包括:
基于定制化卷积滤波识别所述图像数据的像素信息,并确定所述像素信息所对应的灰度数据;
根据所述灰度数据,确定所述图像数据的边界信息,所述边界信息反映的是所述图像数据中的人员与物体的边缘。
在一种实现方式中,所述获取预设的视觉模板库,基于金字塔策略将所述图像特征向量与所述视觉模板库中的图像模板依次进行匹配,找出目标图像模板,包括:
获取所述视觉模板库中的金字塔结构,所述金字塔结构中的每一层都设置有对应的图像模板,且所述金字塔结构中图像模板对应的图像分辨率从上至下依次升高;
将所述图像特征向量与所述金字塔结构的图像模板从上至下依次进行匹配,确定所述目标图像模板。
在一种实现方式中,所述将所述图像特征向量与所述金字塔结构的图像模板从上至下依次进行匹配,确定所述目标图像模板,包括:
将所述图像特征向量从上之下依次与所述金字塔结构的图像模板的参考图像特征向量进行余弦相似度的计算;
根据计算得到的余弦相似度,确定余弦相似度最大的图像模板,并将所述余弦相似度最大的图像模板作为所述目标图像模板。
在一种实现方式中,所述将所述图像特征向量与所述金字塔结构的图像模板从上至下依次进行匹配,确定所述目标图像模板,还包括:
若所述图像特征向量与所述金字塔结构的当前图像模板的参考图像特性向量之间的余弦相似度大于或者等于预设阈值,则将所述图像特征向量与金字塔结构中下一层的图像模板的参考图像特征向量进行匹配;
若所述图像特征向量与所述金字塔结构的当前图像模板的参考图像特性向量之间的余弦相似度小于预设阈值,则停止所述图像特征向量的匹配流程。
在一种实现方式中,所述根据所述目标图像模板,确定所述图像特征向量所对应的人员身份信息,包括:
获取所述目标图像模板的人员信息,所述人员信息包括所述目标图像模板所对应的各个角度的人脸图像以及与所述人脸图像所对应的人员类型信息;
获取所述图像特征向量所对应的当前场景信息,并基于所述当前场景信息确定所述图像特征向量所对应的当前人员类型信息,所述当前人员类型信息用于反映所述当前场景信息所对应的人员类型;
将所述当前人员类型信息与所述目标图像模板的人员信息进行匹配,确定与素数当前人员类型信息所对应的当前人脸图像,并根据所述当前人脸图像,确定所述人员身份信息。
在一种实现方式中,所述获取所述图像特征向量所对应的当前场景信息,包括:
获取所述图像特征向量所对应的当前物体类型信息;
获取所述图像数据中人员与物体之间的相对位置关系;
根据所述当前物体类型信息与所述相对位置关系,确定所述图像特征向量所对应的当前场景信息。
第二方面,本发明实施例还提供一种基于视觉模板和金字塔策略的人脸识别装置,其中,所述装置包括:
图像识别模块,用于获取闸机前方预设范围内的图像数据,识别所述图像数据中人员以及物体的边界信息,并基于所述边界信息提取图像特征向量;
模板确定模块,用于获取预设的视觉模板库,并基于金字塔策略将所述图像特征向量与所述视觉模板库中的图像模板依次进行匹配,找出目标图像模板;
身份识别模块,用于根据所述目标图像模板,确定所述图像特征向量所对应的人员身份信息。
第三方面,本发明实施例还提供一种终端设备,其中,所述终端设备为商显终端或者投屏终端,所述终端设备包括存储器、处理器及存储在存储器中并可在处理器上运行的基于视觉模板和金字塔策略的人脸识别程序,处理器执行基于视觉模板和金字塔策略的人脸识别程序时,实现上述方案中任一项的基于视觉模板和金字塔策略的人脸识别方法的步骤。
第四方面,本发明实施例还提供一种计算机可读存储介质,其中,计算机可读存储介质上存储有基于视觉模板和金字塔策略的人脸识别程序,所述基于视觉模板和金字塔策略的人脸识别程序被处理器执行时,实现上述方案中任一项所述的基于视觉模板和金字塔策略的人脸识别方法的步骤。
有益效果
与现有技术相比,本发明提供了一种基于视觉模板和金字塔策略的人脸识别方法,本发明首先获取闸机前方预设范围内的图像数据,识别所述图像数据中人员以及物体的边界信息,并基于所述边界信息提取图像特征向量。然后获取预设的视觉模板库,并基于金字塔策略将所述图像特征向量与所述视觉模板库中的图像模板依次进行匹配,找出目标图像模板。最后根据所述目标图像模板,确定所述图像特征向量所对应的人员身份信息。本发明基于图像模板的人脸识别可实现对人员身份的确定,并且还可以快速地实现识别,提高识别效率,有利于实现息信的高效采集,便于对人员进行管理。
附图说明
图1为本发明实施例提供的基于视觉模板和金字塔策略的人脸识别方法的具体实施方式的流程图。
图2为本发明实施例提供的基于视觉模板和金字塔策略的人脸识别装置的功能原理图。
图3为本发明实施例提供的终端设备的原理框图。
本发明的实施方式
为使本发明的目的、技术方案及效果更加清楚、明确,以下参照附图并举实施例对本发明进一步详细说明。应当理解,此处所描述的具体实施例仅用以解释本发明,并不用于限定本发明。
本实施例提供一种基于视觉模板和金字塔策略的人脸识别方法,基于本实施例的方法,可快速地实现识别,提高识别效率,有利于实现息信的高效采集,便于对人员进行管理。具体地,本实施例首先获取闸机前方预设范围内的图像数据,识别所述图像数据中人员以及物体的边界信息,并基于所述边界信息提取图像特征向量。然后获取预设的视觉模板库,并基于金字塔策略将所述图像特征向量与所述视觉模板库中的图像模板依次进行匹配,找出目标图像模板。最后,根据所述目标图像模板,确定所述图像特征向量所对应的人员身份信息。本发明可基于金字塔策略找到最匹配的目标图像模板,然后基于目标图像模板来实现人员身份的信息,实现快速且高效地对人员身份信息进行采集与管理。
示例性方法
本实施例的基于视觉模板和金字塔策略的人脸识别方法可应用于终端设备中,所述终端设备可为电脑设备或者闸机设备,该闸机设备可对人脸图像进行采集,并对采集到的图像数据进行分析,实现对人脸的识别。具体地,如图1中所示。本实施例的基于视觉模板和金字塔策略的人脸识别方法包括如下步骤:
步骤S100、获取闸机前方预设范围内的图像数据,识别所述图像数据中人员以及物体的边界信息,并基于所述边界信息提取图像特征向量。
本实施例中的基于视觉模板和金字塔策略的人脸识别方法应用于闸机上,该闸机上设置有图像采集装置,比如摄像头。该图像采集装置可实现对闸机前方预设范围内的区域进行图像采集,得到图像数据,比如,本实施例的闸机安装在工地出入口处,闸机可对进出该出入口处的人员进行图像采集,在采集时,采集的范围可为闸机正前方150°角的范围区域。当采集到图像数据后,本实施例可对该图像数据中的人员与物体进行识别,并且识别出该人员以及物体的边界信息,所述边界信息为人员与物体在图像数据中的边界,该边界信息可确定出人员和物体在图像数据中的范围。当确定出边界信息后,本实施例可边界信息提取出图像特征向量,本实施例中的图像特征向量是将图像所对应的三个矩阵(该矩阵的数值为图像数据中的红绿蓝像素值)转化成一个向量,该向量可输入至神经网络模型中,每一个输入到神经网络模型的数据都被叫做一个特征,因此转化成的一个向量就是一个图像特征向量,该图像特征向量可反映出图像数据中各个像素点的像素值,其本质就是反映出了图像数据中的图像内容,也就是反映出了人员、物体以及其他事物。
在一种实现方式中,本实施例在对边界信息的识别包括如下步骤:
步骤S101、基于定制化卷积滤波识别所述图像数据的像素信息,并确定所述像素信息所对应的灰度数据;
步骤S102、根据所述灰度数据,确定所述图像数据的边界信息,所述边界信息反映的是所述图像数据中的人员与物体的边缘。
具体地,本实施例的闸机可采集到不同场景、不同光照强度的图像数据,当采集到图像数据后,本实施例使用基于定制化卷积滤波识别所述图像数据的像素信息,由于像素信息可反映出图像数据中的所有像素点的像素值,因此,基于这些像素信息就可以确定出对应的灰度数据。在对图像数据进行处理时,本实施例基于定制化的卷积操作与滤波操作来实现对像素信息的提取,进而基于像素值确定出灰度数据。由于在图像数据中,灰度数据反映的是图像中的颜色深度,而在图像数据中,人员和物体以及其他区域的颜色深度不一样,因此,本实施例可根据所述灰度数据,可确定出灰度数据突变的位置,从而确定所述图像数据的边界信息,所述边界信息反映的是所述图像数据中的人员与物体的边缘,也就确定出了图像数据中,人员和物体的位置。
步骤S200、获取预设的视觉模板库,并基于金字塔策略将所述图像特征向量与所述视觉模板库中的图像模板依次进行匹配,找出目标图像模板。
在本实施例中,预设有一视觉模板库,该视觉模板库中设置有多个图像模板,并且这些图像模板组合形成一个金字塔结构,在金字塔结构的每一层都设置有对应的图像模板,且所述金字塔结构中图像模板对应的图像分辨率从上至下依次升高。在得到图像特征向量后,本实施例将该图像特征向量与金字塔结构中的图像模板依次进行匹配,从而找出最为匹配的目标图像模板。
在一种实现方式中,本实施例在构建视觉模板库时,首先基于不同的光照条件下进行图像采集,采集到的图像也包括有不同清晰度的图像。接着,本实施例将对所有采集到的图像按照分辨率从低到高进行排列,位于最顶层的图像的分辨率最低,位于最底层的图像的分辨率最高,形成一个金字塔结构。并且,本实施例在还对所有的图像进行分析,确定出每个图像所对应的参考图像特征向量,以及参考图像特性向量所对应的人员信息。最后,形成的金字塔结构每一层都设置有对应的图像模板,且所述金字塔结构中图像模板对应的图像分辨率从上至下依次升高。在本实施例中,图像模板都是基于对不同角度以及不同类型的人员进行图像采集得到的,因此每一张图像模板都有各自对应的人脸图像以及对应的人员类型信息。本实施例的人员类型信息反映的是人员的工种。
在一种实现方式中,本实施例中确定目标图像模板的步骤包括:
步骤S201、获取所述视觉模板库中的金字塔结构,所述金字塔结构中的每一层都设置有对应的图像模板,且所述金字塔结构中图像模板对应的图像分辨率从上至下依次升高;
步骤S202、将所述图像特征向量与所述金字塔结构的图像模板从上至下依次进行匹配,确定所述目标图像模板。
具体地,本实施例首先获取视觉模板库中的金字塔结构,得到金字塔结构中每一层图像模板,然后,本实施例将所述图像特征向量从上之下依次与所述金字塔结构的图像模板的参考图像特征向量进行余弦相似度的计算。也就是说,本实施例首先将图像特征向量与金字塔结构中从上之下的最顶层的图像模板的参考图像特征向量计算余弦相似度,所述余弦相似度是通过计算两个向量的夹角余弦值来评估他们的相似度,然后再计算图像特征向量与金字塔结构中从上之下的第二层的图像模板的参考图像特征向量计算余弦相似度,以此类推,将图像特征向量从上之下依次与所述金字塔结构的图像模板的参考图像特征向量来计算余弦相似度。然后从计算得到余弦相似度中,筛选出余弦相似度最大的图像模板,并将所述余弦相似度最大的图像模板作为所述目标图像模板。此时就可以确定出与图像特征向量最为匹配的图像模板。
此外,在具体应用时,若所述图像特征向量与所述金字塔结构的当前图像模板的参考图像特性向量之间的余弦相似度大于或者等于预设阈值,则将所述图像特征向量与金字塔结构中下一层的图像模板的参考图像特征向量进行匹配。若所述图像特征向量与所述金字塔结构的当前图像模板的参考图像特性向量之间的余弦相似度小于预设阈值,则停止所述图像特征向量的匹配流程。比如,当将图像特征向量与金字塔结构中从上之下的最顶层的图像模板的参考图像特征向量计算余弦相似度,此时计算得到的余弦相似度大于预设阈值,则就计算图像特征向量与金字塔结构中从上之下的第二层的图像模板的参考图像特征向量计算余弦相似度。而如果计算得到的余弦相似度小于预设阈值,则就停止所述图像特征向量的匹配流程。
由此可以看出,本实施例是将通过便利所有的图像模板来找出最为匹配的目标图像模板,而由于金字塔结构从上至下的图像模板的分辨率是逐渐增大的,图像特征向量的匹配是从上之下进行的,因此本实施例是将图像特征向量首先与低分辨率的图像模板进行匹配,然后再与高分辨率的图像模板来匹配,并且一旦出现计算得到的余弦相似度低于预设阈值就停止跳到下一个图像模板,这样可节约大量计算时间与算力。
步骤S300、根据所述目标图像模板,确定所述图像特征向量所对应的人员身份信息。
当找出目标图像模板后,本实施例可根据确定出的目标图像模板,确定出该图像特征向量所对应的人员身份信息,也就是找出该图像特征向量所对应的人员是谁,从而实现人员信息的采集与管理。
在一种实现方式中,本实施例在确定人员身份信息时,包括如下步骤:
步骤S301、获取所述目标图像模板的人员信息,所述人员信息包括所述目标图像模板所对应的各个角度的人脸图像以及与所述人脸图像所对应的人员类型信息;
步骤S302、获取所述图像特征向量所对应的当前场景信息,并基于所述当前场景信息确定所述图像特征向量所对应的当前人员类型信息,所述当前人员类型信息用于反映所述当前场景信息所对应的人员类型;
步骤S303、将所述当前人员类型信息与所述目标图像模板的人员信息进行匹配,确定与素数当前人员类型信息所对应的当前人脸图像,并根据所述当前人脸图像,确定所述人员身份信息。
具体地,由于本实施例中的每一个图像模板都有各自对应的人员类型信息以及对应的人脸图像,因此,本实施例首先获取所述目标图像模板的人员信息,所述人员信息包括所述目标图像模板所对应的各个角度的人脸图像以及与所述人脸图像所对应的人员类型信息,也就是得到此时的目标图像模板中的人员的情况。接着,由于本实施例已经确定出人员以及物体的边界,并且还得到了对应的图像特征向量,因此,本实施例可获取所述图像特征向量所对应的当前物体类型信息,也就是确定当前的物体的类型,比如,物体为钢筋、挖掘机或者脚手架等,此时的当前物体类型信息即为施工设备。接着,本实施例获取所述图像数据中人员与物体之间的相对位置关系。然后根据所述当前物体类型信息与所述相对位置关系,确定所述图像特征向量所对应的当前场景信息。比如,如果当前物体类型信息为施工设备,并且人员与物体之间的相对位置关系为距离很近或者人员正在操作物体,则就可以确定当前场景信息为工地场景。在另一种实现方式中,本实施例在确定当前场景信息时,可基于人员和物体同时出现的频率、距离以及位置来判断,预先可基于大量的样本图像来分析人员和物体同时出现的情况,并总结出规律,从而分析出人员与该物体同时出现时所对应的场景是什么,进而形成一种规律,本实施例就可以应用该规律来确定此时的当前场景信息。
接着,本实施例根据所述当前场景信息确定所述图像特征向量所对应的当前人员类型信息,所述当前人员类型信息用于反映所述当前场景信息所对应的人员类型,也就是该人员的工种。比如,上述确定的当前场景信息为工地场景,因此对应的人员类型为工人。最后,本实施例将所述当前人员类型信息与所述目标图像模板的人员信息进行匹配,确定与素数当前人员类型信息所对应的当前人脸图像,然后根据所述当前人脸图像,确定所述人员身份信息,此时也就确定出人员的身份,实现了对人员身份的识别,从而实现了对人员的管理。
综上,本实施例首先获取闸机前方预设范围内的图像数据,识别所述图像数据中人员以及物体的边界信息,并基于所述边界信息提取图像特征向量。然后获取预设的视觉模板库,并基于金字塔策略将所述图像特征向量与所述视觉模板库中的图像模板依次进行匹配,找出目标图像模板。最后根据所述目标图像模板,确定所述图像特征向量所对应的人员身份信息。本实施例基于图像模板的人脸识别可实现对人员身份的确定,并且还可以快速地实现识别,提高识别效率,有利于实现息信的高效采集,便于对人员进行管理。
示例性装置
基于上述实施例,本发明还提供一种基于视觉模板和金字塔策略的人脸识别装置,如图2中所示,所述装置包括:图像识别模块10、模板确定模块20以及身份识别模块30。具体地,所述图像识别模块10,用于获取闸机前方预设范围内的图像数据,识别所述图像数据中人员以及物体的边界信息,并基于所述边界信息提取图像特征向量。所述模板确定模块20,用于获取预设的视觉模板库,并基于金字塔策略将所述图像特征向量与所述视觉模板库中的图像模板依次进行匹配,找出目标图像模板。所述身份识别模块30,用于根据所述目标图像模板,确定所述图像特征向量所对应的人员身份信息。
在一种实现方式中,所述图像识别模块10包括:
灰度数据确定单元,用于基于定制化卷积滤波识别所述图像数据的像素信息,并确定所述像素信息所对应的灰度数据;
边界信息确定单元,用于根据所述灰度数据,确定所述图像数据的边界信息,所述边界信息反映的是所述图像数据中的人员与物体的边缘。
在一种实现方式中,所述模板确定模块20包括:
图像模板获取单元,用于获取所述视觉模板库中的金字塔结构,所述金字塔结构中的每一层都设置有对应的图像模板,且所述金字塔结构中图像模板对应的图像分辨率从上至下依次升高;
图像模板确定单元,用于将所述图像特征向量与所述金字塔结构的图像模板从上至下依次进行匹配,确定所述目标图像模板。
在一种实现方式中,所述图像模板确定单元,包括:
余弦相似度计算子单元,用于将所述图像特征向量从上之下依次与所述金字塔结构的图像模板的参考图像特征向量进行余弦相似度的计算;
目标图像模板确定子单元,用于根据计算得到的余弦相似度,确定余弦相似度最大的图像模板,并将所述余弦相似度最大的图像模板作为所述目标图像模板。
在一种实现方式中,所述图像模板确定单元,还包括:
匹配持续子单元,用于若所述图像特征向量与所述金字塔结构的当前图像模板的参考图像特性向量之间的余弦相似度大于或者等于预设阈值,则将所述图像特征向量与金字塔结构中下一层的图像模板的参考图像特征向量进行匹配;
匹配停止子单元,用于若所述图像特征向量与所述金字塔结构的当前图像模板的参考图像特性向量之间的余弦相似度小于预设阈值,则停止所述图像特征向量的匹配流程。
在一种实现方式中,所述身份识别模块,包括:
目标图像分析单元,用于获取所述目标图像模板的人员信息,所述人员信息包括所述目标图像模板所对应的各个角度的人脸图像以及与所述人脸图像所对应的人员类型信息;
类型信息确定单元,用于获取所述图像特征向量所对应的当前场景信息,并基于所述当前场景信息确定所述图像特征向量所对应的当前人员类型信息,所述当前人员类型信息用于反映所述当前场景信息所对应的人员类型;
身份识别单元,用于将所述当前人员类型信息与所述目标图像模板的人员信息进行匹配,确定与素数当前人员类型信息所对应的当前人脸图像,并根据所述当前人脸图像,确定所述人员身份信息。
在一种实现方式中,所述类型信息确定单元,还包括:
类型信息获取子单元,用于获取所述图像特征向量所对应的当前物体类型信息;
位置关系获取子单元,用于获取所述图像数据中人员与物体之间的相对位置关系;
场景信息确定子单元,用于根据所述当前物体类型信息与所述相对位置关系,确定所述图像特征向量所对应的当前场景信息。
本实施例的基于视觉模板和金字塔策略的人脸识别装置中各个模板的工作原理与上述方法实施例中各个步骤的原理相同,此处不再赘述。
基于上述实施例,本发明还提供了一种终端设备,所述终端设备的原理框图可以如3所示,所述终端设备为上述实施例中的上位机,比如电脑设备。终端设备可以包括一个或多个处理器100(图3中仅示出一个),存储器101以及存储在存储器101中并可在一个或多个处理器100上运行的计算机程序102,例如,基于视觉模板和金字塔策略的人脸识别的程序。一个或多个处理器100执行计算机程序102时可以实现基于视觉模板和金字塔策略的人脸识别的方法实施例中的各个步骤。或者,一个或多个处理器100执行计算机程序102时可以实现基于视觉模板和金字塔策略的人脸识别的装置实施例中各模板/单元的功能,此处不作限制。
在一个实施例中,所称处理器100可以是中央处理单元(Central Processing Unit,CPU),还可以是其他通用处理器、数字信号处理器 (Digital Signal Processor,DSP)、专用集成电路 (Application Specific Integrated Circuit,ASIC)、现成可编程门阵列 (Field-Programmable Gate Array,FPGA) 或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。
在一个实施例中,存储器101可以是电子设备的内部存储单元,例如电子设备的硬盘或内存。存储器101也可以是电子设备的外部存储设备,例如电子设备上配备的插接式硬盘,智能存储卡(smart media card,SMC),安全数字(secure digital,SD)卡,闪存卡(flash card)等。进一步地,存储器101还可以既包括电子设备的内部存储单元也包括外部存储设备。存储器101用于存储计算机程序以及终端设备所需的其他程序和数据。存储器101还可以用于暂时地存储已经输出或者将要输出的数据。
本领域技术人员可以理解,图3中示出的原理框图,仅仅是与本发明方案相关的部分结构的框图,并不构成对本发明方案所应用于其上的终端设备的限定,具体的终端设备以包括比图中所示更多或更少的部件,或者组合某些部件,或者具有不同的部件布置。
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成,的计算机程序可存储于一非易失性计算机可读取存储介质中,该计算机程序在执行时,可包括如上述各方法的实施例的流程。其中,本发明所提供的各实施例中所使用的对存储器、存储、运营数据库或其它介质的任何引用,均可包括非易失性和/或易失性存储器。非易失性存储器可包括只读存储器(ROM)、可编程ROM(PROM)、电可编程ROM(EPROM)、电可擦除可编程ROM(EEPROM)或闪存。易失性存储器可包括随机存取存储器(RAM)或者外部高速缓冲存储器。作为说明而非局限,RAM以多种形式可得,诸如静态RAM(SRAM)、动态RAM(DRAM)、同步DRAM(SDRAM)、双运营数据率SDRAM(DDRSDRAM)、增强型SDRAM(ESDRAM)、同步链路(Synchlink) DRAM(SLDRAM)、存储器总线(Rambus)直接RAM(RDRAM)、直接存储器总线动态RAM(DRDRAM)、以及存储器总线动态RAM(RDRAM)等。
综上,本发明公开了一种基于视觉模板和金字塔策略的人脸识别方法及装置,所述方法包括:获取闸机前方预设范围内的图像数据,识别所述图像数据中人员以及物体的边界信息,并基于所述边界信息提取图像特征向量;获取预设的视觉模板库,并基于金字塔策略将所述图像特征向量与所述视觉模板库中的图像模板依次进行匹配,找出目标图像模板;根据所述目标图像模板,确定所述图像特征向量所对应的人员身份信息。本发明基于图像模板的人脸识别可实现对人员身份的确定,并且还可以快速地实现识别,提高识别效率,有利于实现信息的高效采集。
最后应说明的是:以上实施例仅用以说明本发明的技术方案,而非对其限制;尽管参照前述实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本发明各实施例技术方案的精神和范围。

Claims (10)

  1. 一种基于视觉模板和金字塔策略的人脸识别方法,其特征在于,所述方法包括:
    获取闸机前方预设范围内的图像数据,识别所述图像数据中人员以及物体的边界信息,并基于所述边界信息提取图像特征向量;
    获取预设的视觉模板库,并基于金字塔策略将所述图像特征向量与所述视觉模板库中的图像模板依次进行匹配,找出目标图像模板;
    根据所述目标图像模板,确定所述图像特征向量所对应的人员身份信息。
  2. 根据权利要求1所述的基于视觉模板和金字塔策略的人脸识别方法,其特征在于,所述识别所述图像数据中人员以及物体的边界信息,包括:
    基于定制化卷积滤波识别所述图像数据的像素信息,并确定所述像素信息所对应的灰度数据;
    根据所述灰度数据,确定所述图像数据的边界信息,所述边界信息反映的是所述图像数据中的人员与物体的边缘。
  3. 根据权利要求1所述的基于视觉模板和金字塔策略的人脸识别方法,其特征在于,所述获取预设的视觉模板库,基于金字塔策略将所述图像特征向量与所述视觉模板库中的图像模板依次进行匹配,找出目标图像模板,包括:
    获取所述视觉模板库中的金字塔结构,所述金字塔结构中的每一层都设置有对应的图像模板,且所述金字塔结构中图像模板对应的图像分辨率从上至下依次升高;
    将所述图像特征向量与所述金字塔结构的图像模板从上至下依次进行匹配,确定所述目标图像模板。
  4. 根据权利要求3所述的基于视觉模板和金字塔策略的人脸识别方法,其特征在于,所述将所述图像特征向量与所述金字塔结构的图像模板从上至下依次进行匹配,确定所述目标图像模板,包括:
    将所述图像特征向量从上之下依次与所述金字塔结构的图像模板的参考图像特征向量进行余弦相似度的计算;
    根据计算得到的余弦相似度,确定余弦相似度最大的图像模板,并将所述余弦相似度最大的图像模板作为所述目标图像模板。
  5. 根据权利要求3所述的基于视觉模板和金字塔策略的人脸识别方法,其特征在于,所述将所述图像特征向量与所述金字塔结构的图像模板从上至下依次进行匹配,确定所述目标图像模板,还包括:
    若所述图像特征向量与所述金字塔结构的当前图像模板的参考图像特性向量之间的余弦相似度大于或者等于预设阈值,则将所述图像特征向量与金字塔结构中下一层的图像模板的参考图像特征向量进行匹配;
    若所述图像特征向量与所述金字塔结构的当前图像模板的参考图像特性向量之间的余弦相似度小于预设阈值,则停止所述图像特征向量的匹配流程。
  6. 根据权利要求5所述的基于视觉模板和金字塔策略的人脸识别方法,其特征在于,所述根据所述目标图像模板,确定所述图像特征向量所对应的人员身份信息,包括:
    获取所述目标图像模板的人员信息,所述人员信息包括所述目标图像模板所对应的各个角度的人脸图像以及与所述人脸图像所对应的人员类型信息;
    获取所述图像特征向量所对应的当前场景信息,并基于所述当前场景信息确定所述图像特征向量所对应的当前人员类型信息,所述当前人员类型信息用于反映所述当前场景信息所对应的人员类型;
    将所述当前人员类型信息与所述目标图像模板的人员信息进行匹配,确定与素数当前人员类型信息所对应的当前人脸图像,并根据所述当前人脸图像,确定所述人员身份信息。
  7. 根据权利要求6所述的基于视觉模板和金字塔策略的人脸识别方法,其特征在于,所述获取所述图像特征向量所对应的当前场景信息,包括:
    获取所述图像特征向量所对应的当前物体类型信息;
    获取所述图像数据中人员与物体之间的相对位置关系;
    根据所述当前物体类型信息与所述相对位置关系,确定所述图像特征向量所对应的当前场景信息。
  8. 一种基于视觉模板和金字塔策略的人脸识别装置,其特征在于,所述装置包括:
    图像识别模块,用于获取闸机前方预设范围内的图像数据,识别所述图像数据中人员以及物体的边界信息,并基于所述边界信息提取图像特征向量;
    模板确定模块,用于获取预设的视觉模板库,并基于金字塔策略将所述图像特征向量与所述视觉模板库中的图像模板依次进行匹配,找出目标图像模板;
    身份识别模块,用于根据所述目标图像模板,确定所述图像特征向量所对应的人员身份信息。
  9. 一种终端设备,其特征在于,所述终端设备包括存储器、处理器及存储在存储器中并可在处理器上运行的基于视觉模板和金字塔策略的人脸识别程序,所述处理器执行所述基于视觉模板和金字塔策略的人脸识别程序时,实现如权利要求1-7任一项所述的基于视觉模板和金字塔策略的人脸识别方法的步骤。
  10. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质上存储有基于视觉模板和金字塔策略的人脸识别程序,所述基于视觉模板和金字塔策略的人脸识别程序被处理器执行时,实现如权利要求1-7任一项所述的基于视觉模板和金字塔策略的人脸识别方法的步骤。
PCT/CN2022/137724 2022-09-27 2022-12-08 一种基于视觉模板和金字塔策略的人脸识别方法及装置 WO2024066050A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202211181884.6 2022-09-27
CN202211181884.6A CN115512415A (zh) 2022-09-27 2022-09-27 一种基于视觉模板和金字塔策略的人脸识别方法及装置

Publications (1)

Publication Number Publication Date
WO2024066050A1 true WO2024066050A1 (zh) 2024-04-04

Family

ID=84507082

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/137724 WO2024066050A1 (zh) 2022-09-27 2022-12-08 一种基于视觉模板和金字塔策略的人脸识别方法及装置

Country Status (2)

Country Link
CN (1) CN115512415A (zh)
WO (1) WO2024066050A1 (zh)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102201061A (zh) * 2011-06-24 2011-09-28 常州锐驰电子科技有限公司 基于多阶层过滤人脸识别的智能安全监控系统及方法
CN108596135A (zh) * 2018-04-26 2018-09-28 上海诚数信息科技有限公司 身份识别方法及系统
CN113128554A (zh) * 2021-03-10 2021-07-16 广州大学 一种基于模板匹配的目标定位方法、系统、装置及介质
CN114119952A (zh) * 2021-10-13 2022-03-01 河北汉光重工有限责任公司 一种基于边缘信息的图像匹配方法及装置
WO2022100065A1 (zh) * 2020-11-11 2022-05-19 广东拓斯达科技股份有限公司 图像配准方法、装置、电子设备及存储介质

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102201061A (zh) * 2011-06-24 2011-09-28 常州锐驰电子科技有限公司 基于多阶层过滤人脸识别的智能安全监控系统及方法
CN108596135A (zh) * 2018-04-26 2018-09-28 上海诚数信息科技有限公司 身份识别方法及系统
WO2022100065A1 (zh) * 2020-11-11 2022-05-19 广东拓斯达科技股份有限公司 图像配准方法、装置、电子设备及存储介质
CN113128554A (zh) * 2021-03-10 2021-07-16 广州大学 一种基于模板匹配的目标定位方法、系统、装置及介质
CN114119952A (zh) * 2021-10-13 2022-03-01 河北汉光重工有限责任公司 一种基于边缘信息的图像匹配方法及装置

Also Published As

Publication number Publication date
CN115512415A (zh) 2022-12-23

Similar Documents

Publication Publication Date Title
US9530045B2 (en) Method, system and non-transitory computer storage medium for face detection
WO2019033572A1 (zh) 人脸遮挡检测方法、装置及存储介质
CN107169458B (zh) 数据处理方法、装置及存储介质
WO2017080196A1 (zh) 基于人脸图像的视频分类方法和装置
CN110838119B (zh) 人脸图像质量评估方法、计算机装置及计算机可读存储介质
US20210166015A1 (en) Certificate image extraction method and terminal device
CN105678213B (zh) 基于视频特征统计的双模式蒙面人事件自动检测方法
CN110826418B (zh) 脸部特征提取方法及装置
CN110866466A (zh) 一种人脸识别方法、装置、存储介质和服务器
CN112464850B (zh) 图像处理方法、装置、计算机设备及介质
CN111191532A (zh) 基于施工区域的人脸识别方法、装置、计算机设备
CN111160202A (zh) 基于ar设备的身份核验方法、装置、设备及存储介质
CN111753782A (zh) 一种基于双流网络的假脸检测方法、装置及电子设备
CN114067431A (zh) 图像处理方法、装置、计算机设备和存储介质
CN111899270A (zh) 卡片边框检测方法、装置、设备及可读存储介质
JP2007025900A (ja) 画像処理装置、画像処理方法
WO2017092272A1 (zh) 人脸识别方法和装置
CN111191521A (zh) 人脸活体检测方法、装置、计算机设备及存储介质
WO2024066050A1 (zh) 一种基于视觉模板和金字塔策略的人脸识别方法及装置
CN110135274B (zh) 一种基于人脸识别的人流量统计方法
CN104615985B (zh) 一种人脸相似度的识别方法
WO2022198751A1 (zh) 基于多层预处理的快速人脸检测方法
CN110991434A (zh) 自助终端证件识别方法及装置
CN110659683A (zh) 图像处理方法、装置及电子设备
WO2022156441A1 (zh) 活体检测方法及装置、存储介质、终端

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: 22960645

Country of ref document: EP

Kind code of ref document: A1