CN115512415A - Face recognition method and device based on visual template and pyramid strategy - Google Patents

Face recognition method and device based on visual template and pyramid strategy Download PDF

Info

Publication number
CN115512415A
CN115512415A CN202211181884.6A CN202211181884A CN115512415A CN 115512415 A CN115512415 A CN 115512415A CN 202211181884 A CN202211181884 A CN 202211181884A CN 115512415 A CN115512415 A CN 115512415A
Authority
CN
China
Prior art keywords
image
template
information
pyramid
feature vector
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211181884.6A
Other languages
Chinese (zh)
Inventor
杨之乐
吴承科
郭媛君
刘祥飞
王尧
吴新宇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Institute of Advanced Technology of CAS
Original Assignee
Shenzhen Institute of Advanced Technology of CAS
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 Shenzhen Institute of Advanced Technology of CAS filed Critical Shenzhen Institute of Advanced Technology of CAS
Priority to CN202211181884.6A priority Critical patent/CN115512415A/en
Priority to PCT/CN2022/137724 priority patent/WO2024066050A1/en
Publication of CN115512415A publication Critical patent/CN115512415A/en
Pending legal-status Critical Current

Links

Images

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

Landscapes

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

Abstract

The invention discloses a face recognition method and a face recognition device based on a visual template and a pyramid strategy, wherein the method comprises the following steps: acquiring image data in a preset range in front of a gate, identifying boundary information of people and objects in the image data, and extracting image feature vectors based on the boundary information; acquiring a preset visual template library, and sequentially matching the image characteristic vectors with image templates in the visual template library based on a pyramid strategy to find out a target image template; and determining the personnel identity information corresponding to the image characteristic vector according to the target image template. The face recognition based on the image template can realize the determination of the identity of the person, can also realize the recognition rapidly, improves the recognition efficiency and is beneficial to realizing the high-efficiency acquisition of information.

Description

Face recognition method and device based on visual template and pyramid strategy
Technical Field
The invention relates to the technical field of face recognition, in particular to a face recognition method and device based on a visual template and a pyramid strategy.
Background
The building industry serves as an important force for promoting the development of economic society in China, and accommodates over seventy million building workers, wherein the workers have complex structures and most of the workers come from rural business workers.
Due to the labor service subpackage mode, the informatization rate of the construction industry is low, the mobility of workers is high, and the like, the existing construction site is still in a manual statistical mode to collect the information of the workers. The entrance personnel information is collected manually, and the phenomena of low statistical information coverage rate, poor accuracy, low information reliability, wrong memory, missed memory and the like exist. The final results caused by the problems are that the information acquisition process cannot be supervised, the information authenticity is poor, and the management is disordered.
Thus, there is a need for improvements and enhancements in the art.
Disclosure of Invention
The technical problem to be solved by the present invention is to provide a face recognition method and apparatus based on a visual template and a pyramid policy, aiming at solving the problems of unsupervised personnel identity information acquisition process, poor information authenticity and disordered management in the prior art.
In a first aspect, the present invention provides a face recognition method based on a visual template and a pyramid policy, wherein the method includes:
acquiring image data in a preset range in front of a gate, identifying boundary information of people and objects in the image data, and extracting image feature vectors based on the boundary information;
acquiring a preset visual template library, and sequentially matching the image feature vectors with image templates in the visual template library based on a pyramid strategy to find out a target image template;
and determining the personnel identity information corresponding to the image feature vector according to the target image template.
In one implementation, the identifying boundary information of people and objects in the image data includes:
identifying pixel information of the image data based on customized convolution filtering, and determining gray data corresponding to the pixel information;
and determining boundary information of the image data according to the gray data, wherein the boundary information reflects the edges of the people and the objects in the image data.
In one implementation, the obtaining a preset visual template library, sequentially matching the image feature vectors with image templates in the visual template library based on a pyramid policy, and finding out a target image template includes:
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 resolution corresponding to the image templates in the pyramid structure is sequentially increased from top to bottom;
and matching the image characteristic vectors with the image templates of the pyramid structure from top to bottom in sequence to determine the target image template.
In one implementation, the sequentially matching the image feature vector with the image template of the pyramid structure from top to bottom to determine the target image template includes:
calculating the cosine similarity between the image feature vector and the reference image feature vector of the image template with the pyramid structure from top to bottom in sequence;
and determining the image template with the maximum cosine similarity according to the cosine similarity obtained by calculation, and taking the image template with the maximum cosine similarity as the target image template.
In one implementation manner, the sequentially matching the image feature vector with the image template of the pyramid structure from top to bottom to determine the target image template further includes:
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, matching the image feature vector with the reference image feature vector of the image template of the next layer in the pyramid structure;
and if the cosine similarity between the image characteristic vector and the reference image characteristic vector of the current image template of the pyramid structure is smaller than a preset threshold, stopping the matching process of the image characteristic vector.
In one implementation manner, the determining, according to the target image template, the person identity information corresponding to the image feature vector includes:
acquiring personnel information of the target image template, wherein the personnel information comprises face images of all angles corresponding to the target image template and personnel type information corresponding to the face images;
acquiring current scene information corresponding to the image feature vector, and determining current personnel type information corresponding to the image feature vector based on the current scene information, wherein the current personnel type information is used for reflecting personnel types corresponding to the current scene information;
matching the current personnel type information with the personnel information of the target image template, determining a current face image corresponding to the prime number current personnel type information, and determining the personnel identity information according to the current face image.
In one implementation, the obtaining current scene information corresponding to the image feature vector includes:
acquiring current object type information corresponding to the image feature vector;
acquiring a relative position relation between a person and an object in the image data;
and determining current scene information corresponding to the image feature vector according to the relative position relationship between the current object type information and the image feature vector.
In a second aspect, an embodiment of the present invention further provides a face recognition apparatus based on a visual template and a pyramid policy, where the apparatus includes:
the image identification module is used for acquiring image data in 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 template determining module is used for acquiring a preset visual template library, and sequentially matching the image feature vectors with the image templates in the visual template library based on a pyramid strategy to find out a target image template;
and the identity recognition module is used for determining the identity information of the personnel corresponding to the image characteristic vector according to the target image template.
In a third aspect, an embodiment of the present invention further provides a terminal device, where the terminal device is a business display terminal or a screen projection terminal, the terminal device includes a memory, a processor, and a face recognition program based on a visual template and a pyramid policy, the face recognition program being stored in the memory and being executable on the processor, and when the processor executes the face recognition program based on the visual template and the pyramid policy, the face recognition method based on the visual template and the pyramid policy in any of the above solutions is implemented.
In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, where a face recognition program based on a visual template and a pyramid policy is stored on the computer-readable storage medium, and when the face recognition program based on the visual template and the pyramid policy is executed by a processor, the steps of the face recognition method based on the visual template and the pyramid policy in any one of the above schemes are implemented.
Has the advantages that: compared with the prior art, the invention provides a face recognition method based on a visual template and a pyramid strategy. And then acquiring a preset visual template library, and matching the image characteristic vectors with the image templates in the visual template library in sequence based on a pyramid strategy to find out a target image template. And finally, determining the personnel identity information corresponding to the image feature vector according to the target image template. The face recognition based on the image template can realize the determination of the identity of the person, can also realize the recognition rapidly, improves the recognition efficiency, is beneficial to realizing the high-efficiency acquisition of information and is convenient for managing the person.
Drawings
Fig. 1 is a flowchart of a specific implementation of a face recognition method based on a visual template and a pyramid policy according to an embodiment of the present invention.
Fig. 2 is a functional schematic diagram of a face recognition apparatus based on a visual template and a pyramid policy according to an embodiment of the present invention.
Fig. 3 is a schematic block diagram of a terminal device according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and effects of the present invention clearer and clearer, the present invention is further described in detail below with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
The embodiment provides a face recognition method based on a visual template and a pyramid strategy, and based on the method of the embodiment, recognition can be rapidly achieved, recognition efficiency is improved, efficient collection of information is facilitated, and personnel management is facilitated. Specifically, in this embodiment, image data in a preset range in front of the gate is first acquired, boundary information of people and objects in the image data is identified, and an image feature vector is extracted based on the boundary information. And then acquiring a preset visual template library, and matching the image characteristic vectors with the image templates in the visual template library in sequence based on a pyramid strategy to find out a target image template. And finally, determining the personnel identity information corresponding to the image feature vector according to the target image template. The invention can find the best matched target image template based on the pyramid strategy, and then realize the information of the personnel identity based on the target image template, thereby realizing the rapid and efficient collection and management of the personnel identity information.
Exemplary method
The face recognition method based on the visual template and the pyramid strategy can be applied to terminal equipment, the terminal equipment can be computer equipment or gate equipment, and the gate equipment can collect face images and analyze the collected image data to realize face recognition. In particular, as shown in fig. 1. The face recognition method based on the visual template and the pyramid strategy comprises the following steps:
s100, acquiring image data in 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 the visual template and the pyramid strategy in the embodiment is applied to a gate, and an image acquisition device such as a camera is arranged on the gate. This image acquisition device can realize carrying out image acquisition to the region of the preset within range in floodgate machine place ahead, obtains image data, for example, the floodgate machine of this embodiment is installed at the workplace entrance and exit, and the floodgate machine can carry out image acquisition to the personnel of business turn over this access & exit department, and when gathering, the scope of gathering can be the region of the range of the dead ahead 150 jiaos of floodgate machine. After the image data is acquired, the embodiment can identify the person and the object in the image data, and identify the boundary information of the person and the object, wherein the boundary information is the boundary of the person and the object in the image data, and the boundary information can determine the range of the person and the object in the image data. After the boundary information is determined, the image feature vector can be extracted from the boundary information, the image feature vector in this embodiment is obtained by converting three matrixes (the numerical values of the matrixes are red, green and blue pixel values in the image data) corresponding to the image into one vector, the vector can be input into the neural network model, each piece of data input into the neural network model is called as one feature, therefore, the converted vector is the image feature vector, the image feature vector can reflect the pixel values of each pixel point in the image data, and the essence reflects the image content in the image data, namely, the personnel, the objects and other things.
In one implementation manner, the identifying of the boundary information in this embodiment includes the following steps:
s101, identifying pixel information of the image data based on customized convolution filtering, and determining gray data corresponding to the pixel information;
and S102, determining boundary information of the image data according to the gray data, wherein the boundary information reflects the edges of the people and the objects in the image data.
Specifically, the gate of this embodiment may acquire image data of different scenes and different illumination intensities, and after acquiring the image data, this embodiment identifies the pixel information of the image data using convolution filtering based on customization, and since the pixel information may reflect the pixel values of all the pixel points in the image data, the corresponding gray data may be determined based on the pixel information. In processing image data, the embodiment extracts pixel information based on customized convolution operation and filtering operation, and determines gray data based on pixel values. Since the gray data in the image data reflects the color depth in the image, and the color depths of the person, the object and other areas in the image data are different, the present embodiment may determine the position of the abrupt change in the gray data according to the gray data, thereby determining the boundary information of the image data, where the boundary information reflects the edge between the person and the object in the image data, that is, the position of the person and the object in the image data.
And S200, acquiring a preset visual template library, and matching the image characteristic vectors with the image templates in the visual template library in sequence based on a pyramid strategy to find out a target image template.
In this embodiment, a visual template library is preset, a plurality of image templates are arranged in the visual template library, the image templates are combined to form a pyramid structure, a corresponding image template is arranged on each layer of the pyramid structure, and the image resolutions corresponding to the image templates in the pyramid structure are sequentially increased from top to bottom. After the image feature vector is obtained, the image feature vector is sequentially matched with the image templates in the pyramid structure, so that the most matched target image template is found out.
In an implementation manner, when the visual template library is constructed, in the embodiment, firstly, image acquisition is performed based on different illumination conditions, and the acquired images also include images with different definitions. Next, in this embodiment, all the acquired images are arranged from low to high according to the resolution, the resolution of the image located at the top layer is the lowest, and the resolution of the image located at the bottom layer is the highest, so as to form a pyramid structure. In addition, in this embodiment, all the images are analyzed to determine the reference image feature vector corresponding to each image and the person information corresponding to the reference image feature vector. And finally, each layer of the formed pyramid structure is provided with a corresponding image template, and the image resolution corresponding to the image templates in the pyramid structure is sequentially increased from top to bottom. In this embodiment, the image templates are obtained based on image acquisition of people from different angles and different types, so that each image template has a face image and corresponding person type information. The personnel type information of the embodiment reflects the work type of the personnel.
In one implementation, 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 resolution corresponding to the image templates in the pyramid structure is sequentially increased from top to bottom;
and S202, matching the image characteristic vectors with the image template of the pyramid structure from top to bottom in sequence, and determining the target image template.
Specifically, in this embodiment, a pyramid structure in a visual template library is first obtained to obtain each layer of image template in the pyramid structure, and then, the image feature vector is sequentially subjected to cosine similarity calculation with a reference image feature vector of the image template in the pyramid structure from top to bottom. That is to say, in this embodiment, the cosine similarity is first calculated between the image feature vector and the reference image feature vector of the top-most image template from top to bottom in the pyramid structure, and the cosine similarity is evaluated by calculating the cosine value of the included angle between the two vectors, then the cosine similarity is calculated between the image feature vector and the reference image feature vector of the second-layer image template from top to bottom in the pyramid structure, and so on, the cosine similarity is calculated by sequentially calculating the image feature vector from top to bottom and the reference image feature vector of the image template of the pyramid structure. And then screening out the image template with the maximum cosine similarity from the cosine similarities obtained by calculation, and taking the image template with the maximum cosine similarity as the target image template. At this point, the image template that best matches the image feature vector can be determined.
In addition, in specific application, 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, matching the image feature vector with the reference image feature vector of the image template of the next layer in the pyramid structure. And if the cosine similarity between the image characteristic vector and the reference image characteristic vector of the current image template of the pyramid structure is smaller than a preset threshold, stopping the matching process of the image characteristic vector. For example, when the cosine similarity is calculated between the image feature vector and the reference image feature vector of the top-most image template from top to bottom in the pyramid structure, and the cosine similarity obtained through calculation is greater than a preset threshold, the cosine similarity is calculated between the image feature vector and the reference image feature vector of the second-level image template from top to bottom in the pyramid structure. And if the cosine similarity obtained by calculation is smaller than a preset threshold value, stopping the matching process of the image feature vectors.
Therefore, in the embodiment, the most matched target image template is found by facilitating all the image templates, and since the resolution of the image templates with the pyramid structure from top to bottom is gradually increased, the matching of the image feature vectors is performed from top to bottom, the image feature vectors are firstly matched with the image template with low resolution and then matched with the image template with high resolution, and the jumping to the next image template is stopped once the cosine similarity obtained by calculation is lower than the preset threshold, so that a great amount of calculation time and calculation force can be saved.
And S300, determining the personnel identity information corresponding to the image feature vector according to the target image template.
After finding out the target image template, this embodiment can determine the personnel identity information that this image characteristic vector corresponds according to the target image template that determines, also find out who the personnel that this image characteristic vector corresponds are exactly to realize personnel's information's collection and management.
In an implementation manner, when determining the person identity information, the embodiment includes the following steps:
step S301, acquiring personnel information of the target image template, wherein the personnel information comprises face images of all angles corresponding to the target image template and personnel type information corresponding to the face images;
step S302, obtaining current scene information corresponding to the image feature vector, and determining current personnel type information corresponding to the image feature vector based on the current scene information, wherein the current personnel type information is used for reflecting personnel types corresponding to the current scene information;
step S303, matching the current personnel type information with the personnel information of the target image template, determining a current face image corresponding to the prime number current personnel type information, and determining the personnel identity information according to the current face image.
Specifically, each image template in this embodiment has the corresponding person type information and the corresponding face image, so this embodiment first obtains the person information of the target image template, where the person information includes the face images of the angles corresponding to the target image template and the person type information corresponding to the face images, that is, the situation of the person in the target image template at this time is obtained. Next, because the boundaries of the person and the object have been determined and the corresponding image feature vector is also obtained, the present embodiment may obtain current object type information corresponding to the image feature vector, that is, determine the type of the current object, for example, the object is a steel bar, an excavator, a scaffold, or the like, where the current object type information is the construction equipment. Next, the present embodiment acquires the relative positional relationship between the person and the object in the image data. And then determining the current scene information corresponding to the image characteristic vector according to the relative position relation between the current object type information and the image characteristic vector. For example, if the current object type information is construction equipment and the relative positional relationship between a person and an object is a short distance or the person is operating the object, it may be determined that the current scene information is a worksite scene. In another implementation manner, when determining the current scene information, the present embodiment may determine based on the frequency, distance, and position of the simultaneous occurrence of the person and the object, analyze the situation of the simultaneous occurrence of the person and the object based on a large number of sample images in advance, and summarize a rule, thereby analyzing what the corresponding scene is when the person and the object occur simultaneously, and further forming a rule, and the present embodiment may apply the rule to determine the current scene information at this time.
Next, the present embodiment determines current person type information corresponding to the image feature vector according to the current scene information, where the current person type information is used to reflect a person type corresponding to the current scene information, that is, a work type of the person. For example, the determined current scene information is a worksite scene, and thus the corresponding type of person is a worker. Finally, the embodiment matches the current personnel type information with the personnel information of the target image template, determines the current face image corresponding to the prime number current personnel type information, then determines the personnel identity information according to the current face image, and at this moment, determines the identity of the personnel, so that the identification of the personnel identity is realized, and the management of the personnel is realized.
In summary, in the embodiment, image data in a preset range in front of the gate is first acquired, boundary information of people and objects in the image data is identified, and an image feature vector is extracted based on the boundary information. And then acquiring a preset visual template library, and matching the image characteristic vectors with the image templates in the visual template library in sequence based on a pyramid strategy to find out a target image template. And finally, determining the personnel identity information corresponding to the image feature vector according to the target image template. The face recognition based on the image template can determine the identity of the person, can rapidly realize recognition, improves recognition efficiency, is favorable for realizing efficient collection of information, and is convenient for managing the person.
Exemplary devices
Based on the above embodiment, the present invention further provides a face recognition apparatus based on a visual template and a pyramid policy, as shown in fig. 2, the apparatus includes: an image recognition module 10, a template determination module 20, and an identification module 30. Specifically, the image recognition module 10 is configured to acquire image data in a preset range in front of the gate, recognize boundary information of people and objects in the image data, and extract an image feature vector based on the boundary information. The template determining module 20 is configured to obtain a preset visual template library, and sequentially match the image feature vectors with image templates in the visual template library based on a pyramid policy to find out a target image template. The identity recognition module 30 is configured to determine, according to the target image template, person identity information corresponding to the image feature vector.
In one implementation, the image recognition module 10 includes:
the gray data determining unit is used for identifying pixel information of the image data based on customized convolution filtering and determining gray data corresponding to the pixel information;
and the boundary information determining unit is used for determining the boundary information of the image data according to the gray data, and the boundary information reflects the edges of the people and the objects in the image data.
In one implementation, the template determining module 20 includes:
the image template acquisition unit is used for acquiring a pyramid structure in the visual template library, each layer in the pyramid structure is provided with a corresponding image template, and the image resolution corresponding to the image templates in the pyramid structure is sequentially increased from top to bottom;
and the image template determining unit is used for sequentially matching the image characteristic vectors with the image templates of the pyramid structure from top to bottom to determine the target image template.
In one implementation, the image template determination unit includes:
the cosine similarity operator unit is used for sequentially calculating cosine similarity between the image characteristic vector and the reference image characteristic vector of the image template of the pyramid structure from top to bottom;
and the target image template determining subunit is used for determining the image template with the maximum cosine similarity according to the cosine similarity obtained by calculation, and taking the image template with the maximum cosine similarity as the target image template.
In one implementation, the image template determining unit further includes:
a matching continuation subunit, configured to match the image feature vector with a reference image feature vector of an image template in a next layer in the pyramid structure if a cosine similarity between the image feature vector and the reference image feature vector of the current image template in the pyramid structure is greater than or equal to a preset threshold;
and the matching stopping subunit is used for stopping the matching process of the image feature vector 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 smaller than a preset threshold value.
In one implementation, the identity module includes:
the target image analysis unit is used for acquiring personnel information of the target image template, wherein the personnel information comprises face images of all angles corresponding to the target image template and personnel type information corresponding to the face images;
the type information determining unit is used for acquiring current scene information corresponding to the image feature vector and determining current personnel type information corresponding to the image feature vector based on the current scene information, wherein the current personnel type information is used for reflecting personnel types corresponding to the current scene information;
and the identity recognition unit is used for matching the current personnel type information with the personnel information of the target image template, determining a current face image corresponding to the prime number current personnel type information, and determining the personnel identity information according to the current face image.
In one implementation manner, the type information determining unit further includes:
the type information acquisition subunit is used for acquiring the current object type information corresponding to the image feature vector;
the position relation acquisition subunit is used for acquiring the relative position relation between the person and the object in the image data;
and the scene information determining subunit is configured to determine, according to the relationship between the current object type information and the relative position, current scene information corresponding to the image feature vector.
The working principle of each template in the face recognition device based on the visual template and the pyramid strategy in this embodiment is the same as the principle of each step in the above method embodiments, and is not described herein again.
Based on the above embodiment, the present invention further provides a terminal device, a functional block diagram of the terminal device may be as shown in fig. 3, and the terminal device is an upper computer, such as a computer device, in the above embodiment. The terminal device may include one or more processors 100 (only one shown in fig. 3), a memory 101, and a computer program 102, e.g., a program for face recognition based on visual templates and pyramid policies, stored in the memory 101 and executable on the one or more processors 100. The one or more processors 100, when executing the computer program 102, may implement various steps in method embodiments of face recognition based on visual templates and pyramid policies. Alternatively, the one or more processors 100, when executing the computer program 102, may implement the functions of the templates/units in the apparatus embodiment of face recognition based on visual templates and pyramid policies, which are not limited herein.
In one embodiment, processor 100 may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic, discrete hardware components, or the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
In one embodiment, the storage 101 may be an internal storage unit of the electronic device, such as a hard disk or a 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 Memory Card (SMC), a Secure Digital (SD) card, a flash memory card (flash card), and the like provided on the electronic device. Further, the memory 101 may also include both an internal storage unit and an external storage device of the electronic 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.
It will be understood by those skilled in the art that the block diagram shown in fig. 3 is only a block diagram of a part of the structure related to the solution of the present invention, and does not constitute a limitation to the terminal device to which the solution of the present invention is applied, and a specific terminal device may include more or less components than those shown in the figure, or may combine some components, or have different arrangements of components.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware related to instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, operations databases, or other media used in the embodiments provided herein may include non-volatile and/or volatile memory. 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. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual operation data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous Link (Synchlink) DRAM (SLDRAM), rambus (Rambus) direct RAM (RDRAM), direct bused dynamic RAM (DRDRAM), and bused dynamic RAM (RDRAM), among others.
In summary, the present invention discloses a face recognition method and device based on a visual template and a pyramid policy, wherein the method comprises: acquiring image data in a preset range in front of a gate, identifying boundary information of people and objects in the image data, and extracting image feature vectors based on the boundary information; acquiring a preset visual template library, and sequentially matching the image feature vectors with image templates in the visual template library based on a pyramid strategy to find out a target image template; and determining the personnel identity information corresponding to the image feature vector according to the target image template. The face recognition based on the image template can realize the determination of the identity of the person, can also realize the recognition rapidly, improves the recognition efficiency and is beneficial to realizing the high-efficiency acquisition of information.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (10)

1. A face recognition method based on a visual template and a pyramid strategy is characterized by comprising the following steps:
acquiring image data in a preset range in front of a gate, identifying boundary information of people and objects in the image data, and extracting image feature vectors based on the boundary information;
acquiring a preset visual template library, and sequentially matching the image characteristic vectors with image templates in the visual template library based on a pyramid strategy to find out a target image template;
and determining the personnel identity information corresponding to the image feature vector according to the target image template.
2. The method of claim 1, wherein the identifying of the boundary information of the person and the object in the image data comprises:
identifying pixel information of the image data based on customized convolution filtering, and determining gray data corresponding to the pixel information;
and determining boundary information of the image data according to the gray scale data, wherein the boundary information reflects the edges of the people and the objects in the image data.
3. The face recognition method based on the visual template and the pyramid policy of claim 1, wherein the obtaining a preset visual template library, sequentially matching the image feature vector with image templates in the visual template library based on the pyramid policy, and finding out a target image template comprises:
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 resolution corresponding to the image template in the pyramid structure is sequentially increased from top to bottom;
and matching the image characteristic vectors with the image templates of the pyramid structure from top to bottom in sequence to determine the target image template.
4. The method of claim 3, wherein the 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 comprises:
calculating the cosine similarity between the image feature vector and the reference image feature vector of the image template with the pyramid structure from top to bottom in sequence;
and determining the image template with the maximum cosine similarity according to the cosine similarity obtained by calculation, and taking the image template with the maximum cosine similarity as the target image template.
5. The method of claim 3, wherein the matching of the image feature vector and the image template of the pyramid structure is performed sequentially from top to bottom to determine the target image template, and further comprising:
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, matching the image feature vector with the reference image feature vector of the image template of the next layer in the pyramid structure;
and if the cosine similarity between the image characteristic vector and the reference image characteristic vector of the current image template of the pyramid structure is smaller than a preset threshold, stopping the matching process of the image characteristic vector.
6. The method of claim 5, wherein the determining the identity information of the person corresponding to the image feature vector according to the target image template comprises:
acquiring personnel information of the target image template, wherein the personnel information comprises face images of all angles corresponding to the target image template and personnel type information corresponding to the face images;
acquiring current scene information corresponding to the image feature vector, and determining current personnel type information corresponding to the image feature vector based on the current scene information, wherein the current personnel type information is used for reflecting personnel types corresponding to the current scene information;
matching the current personnel type information with the personnel information of the target image template, determining a current face image corresponding to the prime number current personnel type information, and determining the personnel identity information according to the current face image.
7. The method of claim 6, wherein the obtaining of the current scene information corresponding to the image feature vector comprises:
obtaining current object type information corresponding to the image feature vector;
acquiring a relative position relation between a person and an object in the image data;
and determining current scene information corresponding to the image feature vector according to the relative position relationship between the current object type information and the image feature vector.
8. A face recognition apparatus based on visual templates and pyramid policies, the apparatus comprising:
the image identification module is used for acquiring image data in 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 template determining module is used for acquiring a preset visual template library, and matching the image characteristic vectors with the image templates in the visual template library in sequence based on a pyramid strategy to find out a target image template;
and the identity recognition module is used for determining the identity information of the personnel corresponding to the image characteristic vector according to the target image template.
9. A terminal device, characterized in that the terminal device comprises a memory, a processor and a face recognition program based on a visual template and a pyramid strategy, which is stored in the memory and can run on the processor, and when the processor executes the face recognition program based on the visual template and the pyramid strategy, the steps of the face recognition method based on the visual template and the pyramid strategy according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium, wherein a face recognition program based on a visual template and a pyramid policy is stored on the computer-readable storage medium, and when the face recognition program based on the visual template and the pyramid policy is executed by a processor, the steps of the face recognition method based on the visual template and the pyramid policy according to any one of claims 1 to 7 are implemented.
CN202211181884.6A 2022-09-27 2022-09-27 Face recognition method and device based on visual template and pyramid strategy Pending CN115512415A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202211181884.6A CN115512415A (en) 2022-09-27 2022-09-27 Face recognition method and device based on visual template and pyramid strategy
PCT/CN2022/137724 WO2024066050A1 (en) 2022-09-27 2022-12-08 Facial recognition method and apparatus based on visual template and pyramid strategy

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211181884.6A CN115512415A (en) 2022-09-27 2022-09-27 Face recognition method and device based on visual template and pyramid strategy

Publications (1)

Publication Number Publication Date
CN115512415A true CN115512415A (en) 2022-12-23

Family

ID=84507082

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211181884.6A Pending CN115512415A (en) 2022-09-27 2022-09-27 Face recognition method and device based on visual template and pyramid strategy

Country Status (2)

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

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102201061B (en) * 2011-06-24 2012-10-31 常州锐驰电子科技有限公司 Intelligent safety monitoring system and method based on multilevel filtering face recognition
CN108596135A (en) * 2018-04-26 2018-09-28 上海诚数信息科技有限公司 Personal identification method and system
CN112396640B (en) * 2020-11-11 2024-04-09 广东拓斯达科技股份有限公司 Image registration method, device, electronic equipment and storage medium
CN113128554B (en) * 2021-03-10 2022-05-24 广州大学 Target positioning method, system, device and medium based on template matching
CN114119952A (en) * 2021-10-13 2022-03-01 河北汉光重工有限责任公司 Image matching method and device based on edge information

Also Published As

Publication number Publication date
WO2024066050A1 (en) 2024-04-04

Similar Documents

Publication Publication Date Title
US9530045B2 (en) Method, system and non-transitory computer storage medium for face detection
US8548201B2 (en) Apparatus and method for recognizing identifier of vehicle
CN110826418B (en) Facial feature extraction method and device
CN111191532A (en) Face recognition method and device based on construction area and computer equipment
CN111222423A (en) Target identification method and device based on operation area and computer equipment
CN110991231B (en) Living body detection method and device, server and face recognition equipment
CN110781877B (en) Image recognition method, device and storage medium
CN110378351B (en) Seal identification method and device
CN111899270A (en) Card frame detection method, device and equipment and readable storage medium
WO2021082548A1 (en) Living body testing method and apparatus, server and facial recognition device
CN114925348B (en) Security verification method and system based on fingerprint identification
CN114565895A (en) Security monitoring system and method based on intelligent society
CN112906483A (en) Target re-identification method and device and computer readable storage medium
CN111461905A (en) Vehicle insurance fraud and claim evasion method and device, computer equipment and storage medium
JP2007025900A (en) Image processor and image processing method
Mohan et al. An intelligent recognition system for identification of wood species
CN115512415A (en) Face recognition method and device based on visual template and pyramid strategy
CN111353332B (en) Fingerprint image processing method, fingerprint image processing device and computer readable storage medium
CN110659683A (en) Image processing method and device and electronic equipment
Ghandour et al. Building shadow detection based on multi-thresholding segmentation
CN116543327A (en) Method, device, computer equipment and storage medium for identifying work types of operators
CN115131725A (en) Traffic flow statistical method, device, equipment and storage medium
CN112131919B (en) Security inspection method, device, equipment and medium
CN112907206A (en) Service auditing method, device and equipment based on video object identification
CN111860419A (en) Method for compliance detection in power overhaul process, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination