A video face detection and recognition method and system

Through face clustering and pedestrian re-identification technology, combined with deep neural network and DBSCAN algorithm, it solves the problems of poor image quality and large calculation amount in video face detection and recognition, and improves face recognition accuracy and system efficiency.

CN112132103BActive Publication Date: 2024-09-06新华智云科技有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202011069528.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-09-30
Publication Date
2024-09-06
Estimated Expiration
2040-09-30

AI Technical Summary

Technical Problem

Existing video face detection and recognition technology faces problems such as poor image quality, low resolution, and motion blur, which results in poor face recognition accuracy and high computational complexity, making it difficult to meet the needs of practical applications.

Method used

Face clustering and pedestrian re-identification technology are used to track, associate and track merge the faces in the video, improve the clarity and integrity of face images through deep neural networks, use the DBSCAN clustering algorithm to reduce data computing pressure, and adopt Incremental clustering algorithm with online registration and offline global clustering.

Benefits of technology

It improves the accuracy and robustness of face tracking trajectories, enhances the robustness of face algorithms, reduces the amount of calculation, and improves the recognition accuracy of face information in videos and the efficiency of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112132103B
    Figure CN112132103B
Patent Text Reader

Abstract

The present invention discloses a video face detection and recognition method and system, the method comprising the following steps: obtaining a decoded video, and extracting a total of n frames of the decoded video at intervals as key frames; obtaining a plurality of target face features in the key frames; performing face tracking on the recognized face features to obtain face tracking trajectories; clustering the face tracking trajectories to form face tracking trajectory clustering clusters; obtaining re-identification features of corresponding pedestrians in the face tracking trajectory clustering clusters, and merging the face tracking trajectories according to the similarity of the pedestrian re-identification features; and registering the face features of each target face tracking clustering cluster.
Need to check novelty before this filing date? Find Prior Art

Description

Field of the Invention

[0001] The present invention relates to the field of image detection, and in particular to a video face detection and recognition method and system. Background Art

[0002] In the prior art, for the image data in the video, the video faces often have problems such as poor image quality, low resolution, small face image, and motion blur caused by camera movement or pedestrian movement. These problems have brought great challenges to face detection and recognition in the video. The existing solution needs to decode the video into a single frame image, and then perform image-based face recognition on the single frame image to achieve the purpose of recognizing the face in the video. The advantage of this method is that it can make good use of the excellent results of image face recognition, but because there is a large difference between the face in the video and the face in the image, and the video timing information cannot be effectively used, the face recognition accuracy is poor, and the same person is recognized as multiple face IDs; some solutions are to directly analyze the video and process the video sequence end-to-end. The advantage of this method is that it effectively utilizes the time domain and spatial domain information of the video, and the result is better than single-frame face recognition. The disadvantage is that the amount of calculation is large and it is difficult to meet the needs of practical applications.

[0003] Purpose of the Invention

[0004] One of the inventive objectives of the present invention is to provide a video face detection and recognition method and system, which clusters faces, tracks and associates faces in the video based on single-frame face recognition combined with pedestrian re-identification, and can continuously and well recognize face information in the video.

[0005] Another inventive object of the present invention is to provide a video face detection and recognition method and system, which clusters face tracking trajectories, and can extract faces in trajectory segments with better face clarity after clustering for ID registration, thereby enhancing the robustness of the face algorithm and eliminating noise interference caused by blurred faces.

[0006] Another object of the present invention is to provide a video face detection and recognition method and system, which uses pedestrian re-identification technology to merge face tracking trajectories and pedestrian trajectories to optimize face tracking trajectories, thereby improving the accuracy of face tracking trajectories.

[0007] Another object of the present invention is to provide a video face detection and recognition method and system, which can use an incremental clustering algorithm on the face database in the cross-camera video to merge images with high face similarity in the pictures into corresponding clustering clusters, and delete images with low face similarity in the clustering clusters, thereby reducing the pressure of data calculation.

[0008] Another object of the present invention is to provide a video face detection and recognition method and system, which can register face tracking trajectories online, perform online incremental clustering of newly added face tracking trajectories, and perform global clustering of the system offline at a scheduled time after registration.

[0009] In order to achieve at least one of the above-mentioned invention objects, the present invention further provides a video face detection and recognition method, the method comprising the following steps:

[0010] Obtain the decoded video, and extract n frames of the decoded video at intervals as key frames;

[0011] Identify multiple target facial features in key frames;

[0012] Perform face tracking on the identified facial features to obtain the face tracking trajectory;

[0013] Clustering the face tracking trajectories to form face tracking trajectory clustering clusters;

[0014] Obtain the re-identification features of the corresponding pedestrians in the face tracking trajectory clustering clusters, and merge the face tracking trajectories according to the similarity of the pedestrian re-identification features;

[0015] Register the facial features of each target face tracking cluster.

[0016] According to one of the preferred embodiments of the present invention, the maximum blurred face image and the minimum blurred face image of each face tracking cluster are obtained, a deep neural network is used to establish a 0-1 distribution model of face image clarity, and the face image is input into the model to obtain the face clarity score.

[0017] According to one of the preferred embodiments of the present invention, the maximum occlusion image and the minimum occlusion image corresponding to each face tracking cluster are obtained, a 0-1 distribution model of the face image completeness is established, and the completeness score of each face image is obtained.

[0018] According to one of the preferred embodiments of the present invention, the completeness score and the clarity score are weightedly summed to obtain the quality score of the face image in each frame image, and a quality score threshold is set. If the quality score of the face image corresponding to the trajectory in the face tracking cluster is greater than the quality score threshold, the trajectory corresponding to the face image is selected as the preferred trajectory and saved.

[0019] According to one of the preferred embodiments of the present invention, a face image with the highest face image quality score corresponding to the trajectory in the face tracking cluster is selected as the target face registration.

[0020] According to one of the preferred embodiments of the present invention, a DBSCAN clustering algorithm is used to cluster each trajectory segment.

[0021] According to one of the preferred embodiments of the present invention, the re-identification features of the corresponding pedestrians are selected from the face tracking trajectory clustering clusters, the similarity between the pedestrian re-identification features is calculated, and a merging threshold is set. If the similarity of the pedestrian re-identification features obtained between different trajectories is higher than the merging threshold, the trajectories higher than the merging threshold are merged.

[0022] According to one of the preferred embodiments of the present invention, an incremental image is obtained, an incremental face tracking trajectory in the incremental image is identified, the cosine similarity between the incremental face tracking trajectory features and all cluster cluster features is calculated, the cluster cluster with maximum similarity is calculated and obtained, and a similarity insertion threshold is set. If the maximum similarity value is greater than the similarity insertion threshold, the incremental face tracking trajectory is inserted into the cluster cluster with maximum similarity.

[0023] According to one of the preferred embodiments of the present invention, the cosine similarity between the incremental face tracking trajectory features and all cluster cluster features is calculated, the cluster cluster with the maximum similarity is calculated and obtained, and a similarity insertion threshold is set. If the maximum similarity value is less than the similarity insertion threshold, a new cluster cluster is generated for the incremental face tracking trajectory.

[0024] In order to achieve at least one of the above-mentioned purposes of the invention, the present invention further provides a video face detection and recognition system, wherein the system adopts the above-mentioned video face detection and recognition method. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] Figure 1 Shown is a flow chart of a video face detection and recognition method of the present invention. DETAILED DESCRIPTION

[0026] The following description is used to disclose the present invention so that those skilled in the art can implement the present invention. The preferred embodiments described below are only examples, and those skilled in the art may think of other obvious variations. The basic principles of the present invention defined in the following description can be applied to other embodiments, variations, improvements, equivalents, and other technical solutions that do not deviate from the spirit and scope of the present invention.

[0027] Those skilled in the art should understand that, in the disclosure of the present invention, the terms "longitudinal", "lateral", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside" and the like indicating the orientation or position relationship are based on the orientation or position relationship shown in the drawings, which are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operate in a specific orientation. Therefore, the above terms should not be understood as limiting the present invention.

[0028] It is to be understood that the term "one" should be understood as "at least one" or "one or more", that is, in one embodiment, the number of an element may be one, while in another embodiment, the number of the element may be multiple, and the term "one" should not be understood as a limitation on the quantity.

[0029] Please refer to Figure 1 A flow chart of a preferred embodiment of a video face detection and recognition method of the present invention is shown, and the method includes the following steps: acquiring a target video, extracting frames of the target video at intervals, wherein one frame is extracted every 3-10 frames, processing the extracted frames as key frames, and recording the timestamps of the extracted frames in the target video, and sorting the key frames in the order of the timestamps. It should be noted that due to the large time redundancy between key frames, the effect of video frame extraction on recognition accuracy is relatively small, and the recognition efficiency can also be improved.

[0030] For the key frames obtained after the above-mentioned frame extraction, a face recognition model is used to identify the facial features of the key frames, and the similarity relationship between adjacent key frames is calculated based on the facial features, wherein the similarity measurement may include but is not limited to calculating the cosine similarity between facial features, by calculating the similarity measurement of facial features in adjacent key frames, and then judging whether the faces between adjacent key frames are the same face according to the set similarity threshold, and collecting the coordinate value of the center point of the face, further obtaining the trajectory line formed by each face on different key frames. It should be noted that the present invention preferably uses features to judge the similarity of faces between key frames, and records the movement trajectory of the face according to the timestamp to generate a face tracking trajectory.

[0031] The face tracking trajectories are clustered, the features of each face tracking trajectory are calculated, and the face tracking trajectories are clustered to obtain at least one cluster of face tracking trajectories. The clustering algorithm preferably adopts the DBSCAN algorithm, inputs all key frame face tracking trajectories, identifies the features of all key frame face tracking trajectories, and calculates the feature vector of each trajectory, calculates the distance between each trajectory and other trajectories, and the distance includes but is not limited to cosine distance and Euclidean distance, sets neighborhood parameters, and outputs clusters according to the distance threshold in the domain parameters. It should be noted that in the initial stage, all key frame face tracking trajectories are globally clustered to generate at least one cluster.

[0032] Furthermore, in the generated clusters, corresponding pedestrian features are obtained according to the face image in each frame, and the pedestrian features of two adjacent frames are input into a pedestrian re-identification model (ReID) to determine whether the pedestrians in the two adjacent frames are the same. If they are the same, the face features corresponding to the two pedestrian features are determined to be the same face, wherein the face image and the pedestrian image are data associated through methods including but not limited to labeling, and the pedestrian in the associated key frames is effectively identified through the pedestrian re-identification model (ReID), and the same face images are further merged according to the pedestrian trajectory to obtain a more accurate trajectory of the face image on different frames. In the video, the pedestrian re-identification feature is more robust than the face feature, and can effectively eliminate the influence of noise or missing caused by blurred faces.

[0033] The face image quality score of each track in each cluster is calculated, and the face images with a quality score higher than a certain value are used to register the corresponding track. The specific method includes the following steps:

[0034] Set the most blurred face image and the clearest face image, assign values ​​to the most blurred face image and the clearest face image respectively, where the value of the most blurred face image is 0 and the value of the clearest face image is 1, use a deep convolutional network to train and identify the face clarity score, and establish a 0-1 distribution of the face clarity score;

[0035] A face image with a maximum occlusion degree and a face image with no occlusion are set, and values ​​are assigned to the image with no occlusion degree and the image with a maximum occlusion degree, respectively, wherein the value of the image with a maximum occlusion degree is 0, and the value of the image with no occlusion degree is 1, key points in the face image are identified, and a 0-1 distribution of face completeness is established according to the number of key point positions. In one of the preferred embodiments of the present invention, if all key points are occluded, the completeness of the face image can be judged to be 0, and the corresponding face completeness of all key points is identified to be 1.

[0036] Further, the weights of face completeness and face clarity are set respectively, and the face completeness and face clarity scores and the corresponding weights are added to obtain the face image quality score. Assume that P is the face quality score, P1 is the face clarity score, W1 is the face clarity weight, and P2 is the face completeness score weight. Then P=P1*W1+P2*W1, wherein W1+W2=1, W1∈[0,1], W2∈[0,1]. It can be understood that the above-mentioned face clarity and face completeness are used as statistical parameters of the face quality score. In another preferred embodiment of the present invention, parameters including but not limited to face position, face size, etc. can be added to participate in the calculation of the face quality score. A face quality score threshold is set, preferably, the face quality score threshold is 0.8, the face image quality scores of all pictures of each face tracking trajectory are detected and obtained, the number of trajectories of each trajectory whose face quality score is greater than the face quality score threshold of 0.8 is calculated, and the trajectory with a face quality score higher than the face quality score threshold is taken as the preferred trajectory, and the face with the highest face quality score in the preferred trajectory is further registered as the ID of the trajectory, so that each trajectory can obtain a registered face with a clear image, and at the same time, the merged face tracking trajectory obtained by each trajectory according to the pedestrian re-identification model is clearer and more accurate.

[0037] An incremental clustering method is used to cluster newly added face tracking trajectories, and the method includes the following steps: obtaining incremental images; identifying face tracking trajectories and corresponding pedestrian features based on the incremental images, merging face tracking trajectories using pedestrian features, and performing incremental clustering on the merged face tracking trajectories. Specifically, the face tracking trajectories in each incremental image are identified, and the face tracking trajectory features in each incremental image are calculated. The cosine similarity calculation is performed on the face tracking trajectory features and the features of each cluster cluster to obtain the cluster cluster corresponding to the maximum similarity; a similarity insertion threshold is set. If the calculated maximum similarity value is less than the similarity insertion threshold, the face tracking trajectory corresponding to the incremental image is used as a new cluster cluster. If the calculated maximum similarity value is greater than the similarity insertion threshold, the face tracking trajectory corresponding to the incremental image is inserted into the cluster cluster with the largest similarity. Preferably, the similarity insertion threshold is set to 0.8.

[0038] Furthermore, in order to balance computing power and accuracy, the present invention periodically performs offline global clustering on all clusters, and for newly added images, the above-mentioned incremental clustering is used.

[0039] In particular, according to the embodiments disclosed in the present invention, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part, and / or installed from a removable medium. When the computer program is executed by a central processing unit (CPU) or a GPU, the above functions defined in the method of the present application are executed. It should be noted that the computer-readable medium described above in the present application can be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium can be, for example, but not limited to, a system, device or device of an electrical, magnetic, optical, electromagnetic, infrared segment, or semiconductor, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to, an electrical connection with one or more wire segments, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present application, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In the present application, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, which carries a computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device. The program code embodied on the computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, electrical wire, optical cable, RF, etc., or any suitable combination of the foregoing.

[0040] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present invention. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0041] Those skilled in the art should understand that the embodiments of the present invention described above and shown in the accompanying drawings are only examples and do not limit the present invention. The objectives of the present invention have been fully and effectively achieved. The functional and structural principles of the present invention have been demonstrated and explained in the embodiments. Without departing from the principles, the implementation methods of the present invention may be deformed or modified in any way.

Claims

1. A video face detection and recognition method, characterized in that: The method comprises the following steps: Obtain the decoded video, and extract n frames of the decoded video at intervals as key frames; Identify multiple target facial features in key frames; Perform face tracking on the identified facial features to obtain the face tracking trajectory; Clustering the face tracking trajectories to form face tracking trajectory clustering clusters; Obtain the re-identification features of the corresponding pedestrians in the face tracking trajectory clustering clusters, and merge the face tracking trajectories according to the similarity of the pedestrian re-identification features; Register the facial features of each target face tracking cluster; The method further comprises: For the incremental image, the incremental face tracking trajectory and features in the incremental image are identified, and the cosine similarity between the incremental face tracking trajectory features and all cluster cluster features is calculated, the cluster cluster with maximum similarity is calculated and obtained, and a similarity insertion threshold is set. If the maximum similarity value is greater than the similarity insertion threshold, the incremental face tracking trajectory is inserted into the cluster cluster with maximum similarity. If the maximum similarity value is less than the similarity insertion threshold, a new cluster cluster is generated for the incremental face tracking trajectory.

2. A video face detection and recognition method according to claim 1, characterized in that: The maximum face blur image and the minimum face blur image of each face tracking cluster are obtained, a 0-1 distribution model of face image clarity is established using a deep neural network, and the face image is input into the model to obtain the face clarity score.

3. A video face detection and recognition method according to claim 2, characterized in that: The maximum occlusion image and the minimum occlusion image of the corresponding face image in each face tracking cluster are obtained, a 0-1 distribution model of the face image completeness is established, and the completeness score of each face image is obtained.

4. A video face detection and recognition method according to claim 3, characterized in that: The completeness score and the clarity score are weightedly summed to obtain the quality score of the face image in each frame image, and a quality score threshold is set. If the quality score of the face image corresponding to the trajectory in the face tracking cluster is greater than the quality score threshold, the trajectory corresponding to the face image is selected as the preferred trajectory and saved.

5. The video face detection and recognition method according to claim 1, characterized in that: The face image with the highest quality score corresponding to the trajectory in the face tracking cluster is selected as the target face registration.

6. A video face detection and recognition method according to claim 1, characterized in that: The DBSCAN clustering algorithm is used to cluster each trajectory.

7. The video face detection and recognition method according to claim 1, characterized in that: The re-identification features of the corresponding pedestrians are selected from the face tracking trajectory clustering clusters, the similarity between the pedestrian re-identification features is calculated, and the merging threshold is set. If the similarity of the pedestrian re-identification features obtained between different trajectories is higher than the merging threshold, the trajectories higher than the merging threshold will be merged.

8. A video face detection and recognition system, characterized in that: The system adopts a video face detection and recognition method as described in any one of claims 1-7 above.