CN116884065A - Face recognition method and computer readable storage medium - Google Patents

Face recognition method and computer readable storage medium Download PDF

Info

Publication number
CN116884065A
CN116884065A CN202310823669.XA CN202310823669A CN116884065A CN 116884065 A CN116884065 A CN 116884065A CN 202310823669 A CN202310823669 A CN 202310823669A CN 116884065 A CN116884065 A CN 116884065A
Authority
CN
China
Prior art keywords
face
target
initial
tracking
face target
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
CN202310823669.XA
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.)
Leedarson Lighting Co Ltd
Original Assignee
Leedarson Lighting Co Ltd
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 Leedarson Lighting Co Ltd filed Critical Leedarson Lighting Co Ltd
Priority to CN202310823669.XA priority Critical patent/CN116884065A/en
Publication of CN116884065A publication Critical patent/CN116884065A/en
Pending legal-status Critical Current

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/161Detection; Localisation; Normalisation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/80Analysis of captured images to determine intrinsic or extrinsic camera parameters, i.e. camera calibration
    • 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/75Organisation of the matching processes, e.g. simultaneous or sequential comparisons of image or video features; Coarse-fine approaches, e.g. multi-scale approaches; using context analysis; Selection of dictionaries
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30196Human being; Person
    • G06T2207/30201Face
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30244Camera pose

Landscapes

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

Abstract

The application provides a face recognition method and a computer readable storage medium. The method comprises the following steps: acquiring initial images acquired by each camera at the current moment, and synthesizing each initial image to acquire a current frame image; performing face detection on the current frame image to obtain a plurality of face targets; determining the tracking ID of each face target, and tracking each face target by adopting a target tracking algorithm; aiming at each face target, identifying the face target according to a preset face feature library; if the identification is successful, the identification result and the identification information of the face target are stored in association with the tracking ID of the face target. The application combines face recognition and face tracking, can correlate and continuously record the recognition results of different cameras, and is convenient for the user to carry out personnel analysis and the like in later period.

Description

Face recognition method and computer readable storage medium
Technical Field
The application relates to the technical field of face recognition, in particular to a face recognition method and a computer readable storage medium.
Background
Face recognition is a biological recognition technology for carrying out identity recognition based on facial feature information of people. In the prior art, for one frame of image
In the prior art, in the scenes of large-scale business, factories, schools, parks and the like, multiple paths of cameras are usually erected, and in a common face recognition scheme, recognition results among the cameras are not associated and are isolated. After finishing face recognition under a certain path of camera, when the person appears under other cameras again, the face ID information obtained by the recognition under the previous path of camera is invalid, and the recognition needs to be carried out again, which is unfavorable for the behavior analysis, the video structured search, the person ReID and the like of the person.
Disclosure of Invention
The embodiment of the application provides a face recognition method and a computer readable storage medium, which are used for solving the problems that recognition results among different cameras are not associated in the prior art, are not beneficial to behavior analysis of personnel and the like.
In a first aspect, an embodiment of the present application provides a face recognition method, including:
acquiring initial images acquired by each camera at the current moment, and synthesizing each initial image to acquire a current frame image;
performing face detection on the current frame image to obtain a plurality of face targets;
determining the tracking ID of each face target, and tracking each face target by adopting a target tracking algorithm;
aiming at each face target, identifying the face target according to a preset face feature library; if the identification is successful, the identification result and the identification information of the face target are stored in association with the tracking ID of the face target.
In a second aspect, embodiments of the present application provide a computer readable storage medium storing a computer program which, when executed by a processor, implements the steps of the face recognition method as described above in the first aspect or any one of the possible implementations of the first aspect.
The embodiment of the application provides a face recognition method and a computer readable storage medium. The method comprises the following steps: acquiring initial images acquired by each camera at the current moment, and synthesizing each initial image to acquire a current frame image; performing face detection on the current frame image to obtain a plurality of face targets; determining the tracking ID of each face target, and tracking each face target by adopting a target tracking algorithm; aiming at each face target, identifying the face target according to a preset face feature library; if the identification is successful, the identification result and the identification information of the face target are stored in association with the tracking ID of the face target. In the embodiment of the application, the images acquired by the cameras are synthesized, the information in the cameras is associated, and meanwhile, the face recognition and the face tracking are combined, so that the recognition results of the different cameras can be associated and continuously recorded, and the later personnel analysis and the like of a user are facilitated.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the embodiments or the description of the prior art will be briefly described below, it being obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a flowchart of an implementation of a face recognition method according to an embodiment of the present application;
fig. 2 is a schematic diagram of a positional relationship of the same coordinate point in different cameras according to an embodiment of the present application;
FIG. 3 is a schematic diagram of a pose relationship matrix according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of a face recognition device according to an embodiment of the present application;
fig. 5 is a schematic diagram of an identification terminal according to an embodiment of the present application.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth such as the particular system architecture, techniques, etc., in order to provide a thorough understanding of the embodiments of the present application. It will be apparent, however, to one skilled in the art that the present application may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present application with unnecessary detail.
For the purpose of making the objects, technical solutions and advantages of the present application more apparent, the following description will be made by way of specific embodiments with reference to the accompanying drawings.
Referring to fig. 1, a flowchart of an implementation of a face recognition method provided by an embodiment of the present application is shown, and details are as follows:
the method comprises the following steps:
s101: acquiring initial images acquired by each camera at the current moment, and synthesizing each initial image to acquire a current frame image;
the target site is usually provided with a plurality of cameras, and in the embodiment of the application, initial images acquired by the cameras in the same scene are synthesized into a current frame image for processing.
Specifically, in the embodiment of the present application, since the images acquired by each camera are based on the coordinates of the camera itself, referring to fig. 2, the coordinates of the same point in the images acquired by different cameras are different (the X point corresponds to X in the three graphs respectively) 1 、X 2 And X 3 ) Therefore, each camera needs to be calibrated, and the internal parameters of the camera are determined for unifying coordinates.
Specifically, S101 may include:
s1011: acquiring initial images acquired by each camera at the current moment;
s1012: performing feature point matching on each initial image, and obtaining pose matrixes among cameras based on internal parameters of each camera;
s1013: and synthesizing each initial image according to the pose matrix among the cameras to obtain the current frame image.
Referring to fig. 2, for initial images acquired by multiple cameras in the same scene, there is usually a partial overlap in the actual layout, and by processing the overlapping area, the relative positions between the cameras (that is, the pose matrix between the cameras is determined by feature point matching) can be obtained, so as to obtain a spliced and synthesized image.
Specifically, referring to fig. 3, the pose matrix can be obtained by calculating the camera internal parameters based on the solvePnP function according to the following formula:
wherein p and q are pixel points in two cameras respectively, K 1 And K 2 Internal reference of two cameras respectively, rt]Is a pose matrix between two cameras.
Based on the pose matrix among the cameras, the coordinates of the cameras can be unified, so that the initial images can be synthesized to obtain a frame of image.
It should be noted that, for the current frame image synthesized in the same scene, the overlapping area is removed, and there is no overlapping area, and only one identical face object exists in the image.
S102: performing face detection on the current frame image to obtain a plurality of face targets;
specifically, S102 may include:
s1021: inputting the current frame image into a face detection model, and taking a face with confidence coefficient larger than preset confidence coefficient as an initial face target;
s1022: and screening all the initial face targets to obtain a plurality of face targets.
A plurality of initial face targets can be obtained through detection of the face detection model, but are affected by image definition, angles and the like, and the quality of part of the initial face targets is poor, so that the detection accuracy is affected. For each initial face target detected by the face detection model, the definition or angle and other high probability of a face with low confidence level can be poor. Based on the above, in the embodiment of the application, the face with poor quality is filtered according to the confidence, so that the recognition accuracy can be effectively improved.
S103: determining the tracking ID of each face target, and tracking each face target by adopting a target tracking algorithm;
specifically, a multi-target tracker may be used to track each face target.
S104: aiming at each face target, identifying the face target according to a preset face feature library; if the identification is successful, the identification result and the identification information of the face target are stored in association with the tracking ID of the face target.
In the embodiment of the application, a multi-target tracking algorithm is adopted to track each face target, each face target is accurately identified by combining face recognition, and the identified identification result and identification information are associated with a tracking ID, so that the identification result and identification information identified by each frame of image can be continuously recorded and tracked.
In the embodiment of the application, the initial image acquired by each camera is synthesized into one image, each face target in the image is tracked and identified, and the identification result and the identification information are associated with the tracking ID. In the embodiment of the application, the multi-path concurrent thought is adopted to track each face target (aiming at multi-frame images), and simultaneously, each face target is identified, so that the resource sharing among cameras is realized, the utilization rate of system information and computing resources is optimized, the face user identification result and identification information are continuously recorded and maintained, and the method has important significance for subsequent personnel retrieval, personnel analysis, video structuring and the like.
In one possible embodiment, S1022 may include:
1. determining the size of each initial face target, the position of the initial face target, the symmetry of key points of the initial face target and the deflection angle of the face of the initial face target, and determining whether the initial face target is qualified or not based on the size of the initial face target, the position of the initial face target, the symmetry of key points of the initial face target and the deflection angle of the face of the initial face target;
2. and taking the qualified initial face target as a face target.
Further, apart from confidence, the distance between faces, face angle deflection, whether there is shielding, and expression with a large amplitude all affect the quality of faces. In the embodiment of the application, the size of the initial face target, the position of the initial face target, the symmetry of key points of the initial face target and the deflection angle of the face of the initial face target are further used for filtering the face with poor quality.
Specifically, determining whether the initial face target is qualified based on the size of the initial face target, the position of the initial face target, symmetry of key points of the initial face target, and a deflection angle of a face of the initial face target may include:
(1) If the size of the initial face target is smaller than the preset size, determining that the initial face target is unqualified;
the smaller size of the face image (initial face target) means that the smaller the face information contained in the image, the smaller face can be filtered out through screening the size of the face image, and the subsequent detection accuracy is improved.
Specifically, the preset size can be set according to the actual application requirement, and is not limited herein.
(2) If the position of the initial face target is at the edge of the current frame image, determining that the initial face target is unqualified;
the face appearing at the edge of the current frame image often means that the face information is truncated, and incomplete faces can be filtered out through screening the face positions.
Specifically, the face position may be the coordinates of each point of the edge of the initial face target. The coordinates of the edge of the current frame image can be obtained, if the difference between the coordinates of the preset number of coordinate points in the coordinates of each point of the edge of the face and the coordinates of the edge of the current frame image is smaller than the preset difference, the initial face target is close to the edge of the current frame image, the initial face target is possibly cut off, the information is incomplete, and the initial face target can be filtered.
(3) If the key points of the initial face target are asymmetric, determining that the initial face target is unqualified;
the key points of the face are asymmetric, which indicates that the face deflects greatly, and even the alignment correction has a lot of distortion, which is unfavorable for the later face recognition, so the face with asymmetric key points can be filtered out.
Specifically, the key points of the initial face target can be determined by selecting a plurality of key points on two eyes and two mouth corners. Specifically, the offset of the key points of the eyes in the x direction and the y direction and the offset of the mouth angles on the left side and the right side in the x direction and the y direction can be determined, the deviation of the position of the face in the horizontal direction and the vertical direction is obtained, and the larger the deviation is, the asymmetry of the key points is indicated.
(4) If the deflection angle of the face of the initial face target is larger than the preset deflection angle, determining that the initial face target is unqualified.
The larger the deflection angle of the face is, the distortion of the face is indicated, the subsequent face recognition is not facilitated, and the face can be filtered out.
And the four judgments are satisfied, and the disqualification of the initial face target can be judged.
Further, the execution sequence of the four judgments can be determined according to the calculation difficulty, for example, the judgments are performed according to the sequence from small to large calculation amount, so that the calculation amount can be effectively reduced, and the calculation efficiency can be improved.
In one possible implementation, determining the deflection angle of the initial face target may include:
(1) Selecting 5 key points on the initial face target to obtain coordinates of the 5 key points;
(2) Determining a rotation matrix of the initial face target based on a solvePnP function according to coordinates of the 5 key points;
(3) And determining the deflection angle of the initial face target according to the rotation matrix.
Based on the solvePnP function, the method acquires internal parameters of the camera, selects 5 key points to form a face 2D model, calculates a rotation matrix by adopting the solvePnP function, and further converts the rotation matrix into Euler angles to obtain the 3D pose of the face, so as to obtain the deflection angle of the face.
The specific formula is as follows:
wherein x and y are coordinates of the image, u 0 And v 0 As an internal reference of the camera, the camera is provided with a camera lens,for rotating matrix, X w 、Y w And Z w Is world coordinates.
In one possible implementation, S103 may include:
s1031: acquiring each tracking target in the previous frame of image;
s1032: for each face target, searching whether each tracking target in the previous frame image contains the face target or not; if the tracking ID of the tracking target corresponding to the face target is included, the tracking ID of the face target is used as the tracking ID of the face target, if the tracking ID of the tracking target does not include, the face target is used as a new tracking target, and the tracking ID is allocated to the face target; and continuously tracking the detection information of the face target as a tracking initial value of the next frame.
In the embodiment of the application, if the tracking target exists for each face target, the detection information of the face target is updated to continue tracking. If the tracking target does not exist, a new tracking target is created for tracking.
In one possible embodiment, the method may further include:
s105: at each moment, the steps of S101 to S104 are repeatedly performed;
s106: and aiming at each tracking target, if the continuous first preset number of frame images do not have the corresponding recognition result and recognition information of the face target and are stored in association with the face target, deleting the tracking target.
S101 to S104 are circularly executed, and the face recognition result and information are continuously recorded. In the embodiment of the application, in the continuous tracking and identifying process, if a certain tracking target does not update the identification information for a long time, the tracking target is indicated to leave the current scene, the tracking target can be deleted, the computing resource is saved, and the waste of the computing resource is avoided.
Further, the method may further include:
s107: aiming at each tracking target, determining a type of recognition result with the largest number of recognition results of the tracking target in the recognition results of corresponding face targets in continuous second preset number of frame images; if the most number of the types of the identification results corresponding to the tracking targets is larger than a third preset number, the most number of the types of the identification results corresponding to the tracking targets is used as the identification result of the tracking targets.
According to the embodiment of the application, the identification result is associated with the tracking ID, the identification information of the tracking target is continuously recorded, the identification result of the tracking target can be determined according to the continuous multi-frame images, the influence of the failure of the face identification in a certain segment on the whole face identification process is greatly reduced, and the dynamic identification target is achieved.
In one possible implementation, before S102, the method may further include:
s108: evaluating the definition of the current frame image; if the current frame image is clear, executing the step S102; if the current frame image is not clear, deleting the current frame image, and not executing the step of S102.
Specifically, S108 may include: and determining the definition of the current frame image by using the Brenner gradient function, the Tenenrad gradient function and the Laplacian gradient function.
Illustratively, the specific formula for the Brenner gradient function is as follows:
D(f)=∑ yx |f(x+2,y)-f(x,y)| 2
wherein D (f) is definition, and f (x, y) is gray corresponding to the pixel point (x, y). If the definition is larger than a preset threshold, determining that the current frame image is clear; otherwise, it is unclear.
The specific formula of the tenangrad gradient function is as follows:
D(f)=∑ yx |G(x,y)|
wherein G is x (x, y) and G y And (x, y) are convolutions of Sobel horizontal and vertical edge detection operators at pixel points (x, y), and T is a preset edge detection threshold. If the definition is larger than a preset edge detection threshold, the definition is clear; otherwise, it is unclear.
By evaluating the definition of the current frame image, the image with low definition is filtered, and the accuracy of face recognition is improved.
It should be understood that the sequence number of each step in the foregoing embodiment does not mean that the execution sequence of each process should be determined by the function and the internal logic, and should not limit the implementation process of the embodiment of the present application.
The following are device embodiments of the application, for details not described in detail therein, reference may be made to the corresponding method embodiments described above.
Fig. 4 shows a schematic structural diagram of a face recognition device according to an embodiment of the present application, and for convenience of explanation, only the parts related to the embodiment of the present application are shown in detail as follows:
as shown in fig. 4, the above-mentioned apparatus includes:
the image synthesis module 21 is configured to acquire initial images acquired by each camera at the current moment, and synthesize each initial image to obtain a current frame image;
the face detection module 22 is configured to perform face detection on the current frame image to obtain a plurality of face targets;
the face tracking module 23 is configured to determine a tracking ID of each face target, and track each face target by using a target tracking algorithm;
the face recognition module 24 is configured to recognize, for each face target, the face target according to a preset face feature library; if the identification is successful, the identification result and the identification information of the face target are stored in association with the tracking ID of the face target.
In one possible implementation, the face detection module 22 may include:
the initial detection unit is used for inputting the current frame image into a face detection model, and taking a face with the confidence coefficient being greater than the preset confidence coefficient as an initial face target;
and the target screening unit is used for screening each initial face target to obtain a plurality of face targets.
In one possible embodiment, the target screening unit may comprise:
a screening subunit, configured to determine, for each initial face target, a size of the initial face target, a position of the initial face target, symmetry of key points of the initial face target, and a deflection angle of a face of the initial face target, and determine whether the initial face target is qualified based on the size of the initial face target, the position of the initial face target, symmetry of the key points of the initial face target, and the deflection angle of the face of the initial face target;
and the face target output subunit is used for taking the qualified initial face target as a face target.
In one possible embodiment, the screening subunit may be specifically configured to:
1. if the size of the initial face target is smaller than the preset size, determining that the initial face target is unqualified;
2. if the position of the initial face target is at the edge of the current frame image, determining that the initial face target is unqualified;
3. if the key points of the initial face target are asymmetric, determining that the initial face target is unqualified;
4. if the deflection angle of the face of the initial face target is larger than the preset deflection angle, determining that the initial face target is unqualified.
In one possible implementation manner, determining the deflection angle of the initial face target may specifically include:
(1) Selecting 5 key points on the initial face target to obtain coordinates of the 5 key points;
(2) Determining a rotation matrix of the initial face target based on a solvePnP function according to coordinates of the 5 key points;
(3) And determining the deflection angle of the initial face target according to the rotation matrix.
In one possible implementation, the face tracking module 23 may include:
a parameter acquisition unit for acquiring each tracking target in the previous frame image;
the target updating unit is used for searching whether each tracking target in the previous frame image contains the face target or not aiming at each face target; if the tracking ID of the tracking target corresponding to the face target is included, the tracking ID of the face target is used as the tracking ID of the face target, if the tracking ID of the tracking target does not include, the face target is used as a new tracking target, and the tracking ID is allocated to the face target; and continuously tracking the detection information of the face target as a tracking initial value of the next frame.
In one possible implementation, the image synthesis module 21 may include:
the initial image acquisition unit is used for acquiring initial images acquired by each camera at the current moment;
the pose matrix determining unit is used for carrying out feature point matching on each initial image and obtaining pose matrixes among cameras based on internal parameters of each camera;
and the image synthesis unit is used for synthesizing each initial image according to the pose matrix among the cameras to obtain a current frame image.
In one possible embodiment, the apparatus may further include:
the circulation module is used for repeatedly executing and acquiring initial images acquired by each camera at the current moment, synthesizing each initial image to acquire a current frame image, and identifying each face target according to a preset face feature library; if the identification is successful, the identification result and the identification information of the face target are associated and stored with the tracking ID of the face target;
and the tracking target updating module is used for deleting each tracking target if the continuous first preset number of frame images do not have the corresponding recognition result and recognition information of the face target and are stored in association with the corresponding recognition result and recognition information.
In one possible embodiment, the apparatus may further include:
the recognition result statistics module is used for determining a type of recognition result with the largest number of the recognition results of the face targets corresponding to the tracking targets in the continuous second preset number of frame images according to each tracking target; if the most number of the types of the identification results corresponding to the tracking targets is larger than a third preset number, the most number of the types of the identification results corresponding to the tracking targets is used as the identification result of the tracking targets.
Fig. 5 is a schematic diagram of an identification terminal 3 according to an embodiment of the present application. As shown in fig. 5, the identification terminal 3 of this embodiment includes: a processor 30 and a memory 31. The memory 31 is used for storing a computer program 32, and the processor 30 is used for calling and running the computer program 32 stored in the memory 31 to perform the steps in the above-described respective face recognition method embodiments, such as steps S101 to S104 shown in fig. 1. Alternatively, the processor 30 is configured to invoke and run the computer program 32 stored in the memory 31 to implement the functions of the modules/units in the above-described device embodiments, such as the functions of the modules 21 to 24 shown in fig. 4.
By way of example, the computer program 32 may be partitioned into one or more modules/units that are stored in the memory 31 and executed by the processor 30 to complete the present application. One or more of the modules/units may be a series of computer program instruction segments capable of performing a specific function for describing the execution of the computer program 32 in the identification terminal 3. For example, the computer program 32 may be split into the modules/units 21 to 24 shown in fig. 4.
The identification terminal 3 may be a computing device such as a desktop computer, a notebook computer, a palm computer, a cloud server, etc. The identification terminal 3 may include, but is not limited to, a processor 30, a memory 31. It will be appreciated by those skilled in the art that fig. 5 is merely an example of the identification terminal 3 and does not constitute a limitation of the identification terminal 3, and may include more or less components than illustrated, or may combine certain components, or different components, e.g., the terminal may further include an input-output device, a network access device, a bus, etc.
The processor 30 may be a central processing unit (Central Processing Unit, CPU), other general purpose processors, digital signal processors (Digital Signal Processor, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), field-programmable gate arrays (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, 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.
The memory 31 may be an internal storage unit of the identification terminal 3, such as a hard disk or a memory of the identification terminal 3. The memory 31 may be an external storage device of the identification terminal 3, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card) or the like, which are provided on the identification terminal 3. Further, the memory 31 may also include both an internal storage unit and an external storage device of the identification terminal 3. The memory 31 is used to store computer programs and other programs and data required by the terminal. The memory 31 may also be used to temporarily store data that has been output or is to be output.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-described division of the functional units and modules is illustrated, and in practical application, the above-described functional distribution may be performed by different functional units and modules according to needs, i.e. the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-described functions. The functional units and modules in the embodiment may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit, where the integrated units may be implemented in a form of hardware or a form of a software functional unit. In addition, the specific names of the functional units and modules are only for distinguishing from each other, and are not used for limiting the protection scope of the present application. The specific working process of the units and modules in the above system may refer to the corresponding process in the foregoing method embodiment, which is not described herein again.
In the foregoing embodiments, the descriptions of the embodiments are emphasized, and in part, not described or illustrated in any particular embodiment, reference is made to the related descriptions of other embodiments.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus/terminal and method may be implemented in other manners. For example, the apparatus/terminal embodiments described above are merely illustrative, e.g., the division of modules or units is merely a logical functional division, and there may be additional divisions when actually implemented, e.g., multiple units or components may be combined or integrated into another system, or some features may be omitted or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection via interfaces, devices or units, which may be in electrical, mechanical or other forms.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed over a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in the embodiments of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The integrated modules/units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the present application may implement all or part of the flow of the method of the above embodiment, or may be implemented by a computer program to instruct related hardware, and the computer program may be stored in a computer readable storage medium, where the computer program, when executed by a processor, may implement the steps of each of the method embodiments described above. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, executable files or in some intermediate form, etc. The computer readable medium may include: any entity or device capable of carrying computer program code, a recording medium, a U disk, a removable hard disk, a magnetic disk, an optical disk, a computer Memory, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), an electrical carrier signal, a telecommunications signal, a software distribution medium, and so forth.
The above embodiments are only for illustrating the technical solution of the present application, and are not limiting; although the application 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 scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present application, and are intended to be included in the scope of the present application.

Claims (10)

1. A face recognition method, comprising:
acquiring initial images acquired by each camera at the current moment, and synthesizing each initial image to acquire a current frame image;
performing face detection on the current frame image to obtain a plurality of face targets;
determining the tracking ID of each face target, and tracking each face target by adopting a target tracking algorithm;
aiming at each face target, identifying the face target according to a preset face feature library; if the identification is successful, the identification result and the identification information of the face target are stored in association with the tracking ID of the face target.
2. The face recognition method according to claim 1, wherein the performing face detection on the current frame image to obtain a plurality of face targets includes:
inputting the current frame image into a face detection model, and taking a face with confidence coefficient larger than preset confidence coefficient as an initial face target;
and screening all the initial face targets to obtain the face targets.
3. The face recognition method according to claim 2, wherein the screening each initial face object to obtain the plurality of face objects includes:
determining the size of each initial face target, the position of the initial face target, the symmetry of key points of the initial face target and the deflection angle of the face of the initial face target, and determining whether the initial face target is qualified or not based on the size of the initial face target, the position of the initial face target, the symmetry of key points of the initial face target and the deflection angle of the face of the initial face target;
and taking the qualified initial face target as the face target.
4. A face recognition method according to claim 3, wherein determining whether the initial face target is qualified based on the size of the initial face target, the position of the initial face target, symmetry of key points of the initial face target, and a deflection angle of the face of the initial face target comprises:
if the size of the initial face target is smaller than the preset size, determining that the initial face target is unqualified;
if the position of the initial face target is at the edge of the current frame image, determining that the initial face target is unqualified;
if the key points of the initial face target are asymmetric, determining that the initial face target is unqualified;
if the deflection angle of the face of the initial face target is larger than the preset deflection angle, determining that the initial face target is unqualified.
5. A method of face recognition according to claim 3, wherein said determining the angle of deflection of the initial face object comprises:
selecting 5 key points on the initial face target to obtain coordinates of the 5 key points;
determining a rotation matrix of the initial face target based on a solvePnP function according to the coordinates of the 5 key points;
and determining the deflection angle of the initial face target according to the rotation matrix.
6. The face recognition method according to any one of claims 1 to 5, wherein determining the tracking ID of each face target and tracking each face target using a target tracking algorithm includes:
acquiring each tracking target in the previous frame of image;
for each face target, searching whether each tracking target in the previous frame image contains the face target or not; if the tracking ID of the tracking target corresponding to the face target is included, the tracking ID of the face target is used as the tracking ID of the face target, if the tracking ID of the tracking target does not include, the face target is used as a new tracking target, and the tracking ID is allocated to the face target; and continuously tracking the detection information of the face target as a tracking initial value of the next frame.
7. The face recognition method according to any one of claims 1 to 5, wherein the steps of obtaining initial images collected by each camera at the current time, and synthesizing each initial image to obtain a current frame image include:
acquiring initial images acquired by each camera at the current moment;
performing feature point matching on each initial image, and obtaining pose matrixes among cameras based on internal parameters of each camera;
and synthesizing each initial image according to the pose matrix among the cameras to obtain the current frame image.
8. The face recognition method according to any one of claims 1 to 5, further comprising;
repeatedly executing the initial images acquired by the cameras at the current moment at each moment, synthesizing the initial images to obtain a current frame image, and identifying each face target according to a preset face feature library; if the identification is successful, the identification result and the identification information of the face target are associated and stored with the tracking ID of the face target;
and aiming at each tracking target, if the continuous first preset number of frame images do not have the corresponding recognition result and recognition information of the face target and are stored in association with the face target, deleting the tracking target.
9. The face recognition method of claim 8, further comprising:
aiming at each tracking target, determining a type of recognition result with the largest number of recognition results of the tracking target in the recognition results of corresponding face targets in continuous second preset number of frame images; if the most number of the types of the identification results corresponding to the tracking targets is larger than a third preset number, the most number of the types of the identification results corresponding to the tracking targets is used as the identification result of the tracking targets.
10. A computer readable storage medium storing a computer program, characterized in that the computer program when executed by a processor implements the steps of the face recognition method according to any one of the preceding claims 1 to 9.
CN202310823669.XA 2023-07-05 2023-07-05 Face recognition method and computer readable storage medium Pending CN116884065A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310823669.XA CN116884065A (en) 2023-07-05 2023-07-05 Face recognition method and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310823669.XA CN116884065A (en) 2023-07-05 2023-07-05 Face recognition method and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN116884065A true CN116884065A (en) 2023-10-13

Family

ID=88262786

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310823669.XA Pending CN116884065A (en) 2023-07-05 2023-07-05 Face recognition method and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN116884065A (en)

Similar Documents

Publication Publication Date Title
Ma et al. Stage-wise salient object detection in 360 omnidirectional image via object-level semantical saliency ranking
CN111046752B (en) Indoor positioning method, computer equipment and storage medium
US8879894B2 (en) Pixel analysis and frame alignment for background frames
CN111640181A (en) Interactive video projection method, device, equipment and storage medium
CN111460967A (en) Illegal building identification method, device, equipment and storage medium
CN113850136A (en) Yolov5 and BCNN-based vehicle orientation identification method and system
CN104156982A (en) Moving object tracking method and device
JP7204786B2 (en) Visual search method, device, computer equipment and storage medium
CN111368860B (en) Repositioning method and terminal equipment
CN111161348B (en) Object pose estimation method, device and equipment based on monocular camera
WO2017205554A1 (en) Shape detection
CN116958267B (en) Pose processing method and device, electronic equipment and storage medium
CN108040244B (en) Snapshot method and device based on light field video stream and storage medium
CN114022531A (en) Image processing method, electronic device, and storage medium
Rodríguez et al. Robust estimation of local affine maps and its applications to image matching
CN110849380B (en) Map alignment method and system based on collaborative VSLAM
CN113228105A (en) Image processing method and device and electronic equipment
CN116884065A (en) Face recognition method and computer readable storage medium
WO2022205841A1 (en) Robot navigation method and apparatus, and terminal device and computer-readable storage medium
CN112085788B (en) Loop detection method and device, computer readable storage medium and mobile device
JP2016045538A (en) Information processing apparatus, image determination method, and program
CN114004891A (en) Distribution network line inspection method based on target tracking and related device
JP2022025878A (en) Object detection device and program
CN112016609A (en) Image clustering method, device and equipment and computer storage medium
JP2022534314A (en) Picture-based multi-dimensional information integration method and related equipment

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