Clustering face recognition method and device based on tracking

By adopting a track-based clustering method in the face recognition technology, the problems of high requirements for facial feature storage and video decoding in the prior art are solved, and higher recognition accuracy and natural interaction experience are achieved.

CN119274223APending Publication Date: 2025-01-07SUZHOU SHENTINGJI INTELLIGENT TECHNOLOGY CO LTD
View PDF 0 Cites 4 Cited by

Patent Information

Application Number
CN202411289933.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-14
Publication Date
2025-01-07

AI Technical Summary

Technical Problem

Existing face recognition technology has high requirements for face features stored in the database, which affects the recognition accuracy, and requires decoding the video into a single frame image for comparison, resulting in poor face recognition accuracy.

Method used

Using a clustered face recognition method based on tracking, the face tracking and clustering are obtained by obtaining the face images in the video stream, the face IDs and features of each cluster are obtained, and the tracking trajectory and face features are identified. Determine the face ID of the target object and improve the matching degree.

Benefits of technology

There is no need for high-precision face data acquisition in the early stage. Face data acquisition and recognition are based on video stream format, which improves the accuracy and nature of face recognition, reduces the impact of noise, and improves recognition accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119274223A_ABST
    Figure CN119274223A_ABST
Patent Text Reader

Abstract

The invention relates to a tracking-based clustering face recognition method and device. The method comprises the following steps: acquiring a video stream with a face image; face tracking is carried out on face images in the video stream, clustering is carried out on the face images according to a tracking trajectory, and face IDs and face features corresponding to all clusters are obtained; and recognizing the target object according to the tracking trajectory and the face features, and determining the face ID of the target object. The face data in the video stream is processed through face tracking and clustering, preparation work such as early-stage high-precision face data collection is not needed, meanwhile, face data collection and face recognition work are both based on the video stream format, the matching degree is improved, and therefore face recognition is more accurate.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of artificial intelligence technology, and in particular to a clustering face recognition method and device based on tracking. Background Art

[0002] Nowadays, the face recognition technology in the industry is very mature and can support password-level accuracy, that is, different faces can be converted into different digital signals, and for the same face, the digital signal is unique. The mainstream face recognition technology now generally requires a complete face scan before use to generate complete facial features, and store the facial features in the database. The next time face recognition is performed, the facial features of the recognized face need to be compared with the facial features in the database. If the similarity meets the requirements, it is considered to be the same face.

[0003] However, the above technical solution has high requirements on the facial features stored in the database, otherwise it will affect the accuracy of face recognition, and the actual situation may not have such operating conditions. At the same time, 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, but due to the large difference between the face in the video and the face image in the database, the face recognition accuracy is also poor. Summary of the invention

[0004] Based on this, it is necessary to provide a tracking-based clustering face recognition method and device that can improve the accuracy of face recognition in order to address the above technical problems.

[0005] In a first aspect, the present application provides a clustering face recognition method based on tracking. The method comprises:

[0006] Get a video stream with a face image;

[0007] Perform face tracking on the face images in the video stream, cluster the face images according to the tracking trajectory, and obtain the face ID and face features corresponding to each cluster;

[0008] The target object is identified based on the tracking trajectory and facial features to determine the target object's face ID.

[0009] In one embodiment, performing face tracking on a face image in a video stream includes:

[0010] Perform face detection on the face image in the video stream to obtain the face area;

[0011] Face tracking is performed based on the changes in the face area in consecutive frames of the video stream to obtain the tracking trajectory.

[0012] In one embodiment, clustering the face images according to the tracking trajectory to obtain the face ID and face features corresponding to each cluster includes:

[0013] The face image with the highest confidence on the same tracking trajectory is used as the standard image corresponding to the tracking trajectory;

[0014] Cluster the standard images corresponding to each tracking trajectory to obtain several clusters;

[0015] Each cluster is marked with a unique face ID, and the face features are obtained based on the face image with the highest confidence in the cluster; the face ID and the face features correspond to each other.

[0016] Among them, all face images on the same tracking trajectory are clustered into the same cluster.

[0017] In one embodiment, identifying the target object based on the tracking trajectory and the facial features to determine the face ID of the target object includes:

[0018] Obtaining a target face image and a target trajectory corresponding to the target object;

[0019] The target face image is matched with the face features. If the match is successful, the face ID corresponding to the successfully matched face features is determined as the face ID corresponding to the target object;

[0020] The target trajectory is matched with the tracking trajectory. If the match is successful, the corresponding face ID of the cluster where the successfully matched tracking trajectory is located is determined as the corresponding face ID of the target object.

[0021] In one embodiment, the target face image and the face features are matched using cosine distance;

[0022] The target trajectory and the tracking trajectory are matched using the interaction ratio.

[0023] In one embodiment, the method further comprises:

[0024] The facial images corresponding to each facial ID are counted; the facial IDs whose number of facial images is lower than a preset number are cleared; the facial IDs whose number of facial images is lower than a preset number are retained, and the facial features corresponding to the facial ID are continuously updated.

[0025] In a second aspect, the present application also provides a clustering face recognition device based on tracking. The device comprises:

[0026] A data acquisition module, used for acquiring a video stream with a face image;

[0027] The tracking and clustering module is used to track the face images in the video stream, cluster the face images according to the tracking trajectory, and obtain the face ID and face features corresponding to each cluster;

[0028] The target recognition module is used to identify the target object based on the tracking trajectory and facial features and determine the face ID of the target object.

[0029] In a third aspect, the present application further provides a computer device, which includes a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps in the above-mentioned tracking-based clustering face recognition method when executing the computer program.

[0030] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, which implements the steps in the above-mentioned tracking-based clustering face recognition method when executed by a processor.

[0031] In a fifth aspect, the present application further provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, the steps in the above-mentioned tracking-based clustering face recognition method are implemented.

[0032] The above-mentioned tracking-based clustering face recognition method and device obtain a video stream with face images; perform face tracking on the face images in the video stream, cluster the face images according to the tracking trajectory, and obtain the face ID and face features corresponding to each cluster; identify the target object according to the tracking trajectory and face features, and determine the face ID of the target object. By processing the face data in the video stream through face tracking and clustering, there is no need for preparatory work such as high-precision face data collection in the early stage. At the same time, the face data collection and face recognition work are based on the video stream format, which improves the matching degree, thereby making face recognition more accurate. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] Figure 1 1 is a flow chart of a clustering face recognition method based on tracking in one embodiment;

[0034] Figure 2 A schematic diagram of a process for obtaining facial features in one embodiment;

[0035] Figure 3 is a flow chart of a clustering face recognition method based on tracking in another embodiment;

[0036] Figure 4 It is a structural block diagram of a clustering face recognition device based on tracking in one embodiment. DETAILED DESCRIPTION

[0037] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0038] The present application embodiment provides a clustering face recognition method based on tracking, such as Figure 1 As shown, the following steps are included:

[0039] Step 102: Acquire a video stream with a face image.

[0040] Video streams with facial data usually refer to streaming media in which facial information is embedded or recognized. Application scenarios include but are not limited to monitoring systems, facial recognition attendance, social media live broadcasts, etc.

[0041] Step 104 , performing face tracking on the face images in the video stream, clustering the face images according to the tracking trajectories, and obtaining the face ID and face features corresponding to each cluster.

[0042] Face tracking is the process of continuously tracking the detected face based on face detection. It involves knowledge from multiple disciplines such as pattern recognition, image processing, and computer vision. The goal of face tracking is to accurately track the position, size, and posture of the face in a video sequence.

[0043] Taking the general sampling frequency of face tracking on video stream as an example, the movement range of the tracked object on the previous and next sampling frames is limited. Based on this, the face images on the same tracking trajectory can be judged as the same person, and clustering will cluster the face images on the same tracking trajectory into the same cluster.

[0044] After clustering is completed, faces in the same cluster have similarities. Face features are extracted based on the face images in the cluster, and a unique face ID is marked for the cluster. Different clusters represent different people and correspond to different face IDs.

[0045] In this embodiment, the facial images collected on the same tracking trajectory are not always frontal faces, but also side faces. Facial data from various angles are clustered together, thereby utilizing rich three-dimensional geometric facial information to assist clustering, providing reliable data support for subsequent face recognition classification and improving the accuracy of face recognition classification.

[0046] Step 106: Identify the target object based on the tracking trajectory and facial features to determine the face ID of the target object.

[0047] The target object is matched and identified by the tracking trajectory and facial features. In essence, the target object is classified and the matching degree between the target object and each cluster is judged, so as to determine the facial ID of the target object and complete the identification of the target object.

[0048] The existing technology performs face recognition based on accurate face collection images, which does not conform to the natural way of remembering faces between humans. When humans see a strange face, they will not have a deep and comprehensive memory of its features, but will gradually deepen their memory through repeated encounters. The present application uses the law of human face memory as a breakthrough in face recognition, especially in the field of human-computer interaction, so that robots can gradually store facial features during the interaction with people, achieving the effect of natural face memory, making people feel that interacting with robots is more natural. By processing the face data in the video stream through face tracking and clustering, the preparatory work such as high-precision face data collection in the early stage is abandoned, which reflects the friendliness of the design of the present application. At the same time, the collection of face data and face recognition are based on the video stream format, which improves the matching degree, making face recognition more accurate.

[0049] In one embodiment, face tracking is performed on the face image in the video stream in step 104, including: performing face detection on the face image in the video stream to obtain the face area; and performing face tracking based on changes in the face area in consecutive frames of the video stream to obtain a tracking trajectory.

[0050] This embodiment performs face detection and tracking based on face embedding vectors. Face embedding vectors refer to the conversion of face images into high-dimensional vector representations through deep learning models. This representation captures the features of the face and can be used for tasks such as face recognition and verification. Face embedding vectors are semantically rich, and similar faces will have similar embedding vectors, which makes the vectors have certain semantic similarities in space. At the same time, compared with directly comparing the original images, the embedding vector comparison is more efficient.

[0051] like Figure 2 As shown in the figure, face embedding vector acquisition is based on DeepFace implementation, and the algorithm pipeline is as follows Figure 2 As shown. The overall pipeline can be divided into the following three steps:

[0052] 1. Face detection: First, DeepFace uses various face detection models to find the face area in the image. This step is to locate and crop the face in the image.

[0053] 2. Face alignment: Once a face is detected, DeepFace will perform face alignment. The alignment process is usually based on the detection of key points such as eyes and nose, which can standardize the position and posture of the face, thereby reducing errors caused by changes in angle and direction.

[0054] 3. Feature extraction: The aligned faces are fed into a pre-trained deep learning model, which extracts high-dimensional feature vectors that represent the features of the face.

[0055] This embodiment uses yolov8 as the face detection model. Due to its single-stage efficient model design, support for multi-scale detection, and improved loss function, it maintains real-time detection capabilities while ensuring high-precision detection effects.

[0056] This embodiment uses VGG-Face as a feature extraction model, which is based on the VGGNet architecture. Thanks to its use of very small convolution kernels (3x3) and a large number of convolutional layers, the model can learn more complex features. Through convolutional neural networks (CNN, Convolutional Neural Network), VGGFace extracts multi-level features from the input image, which vary from low-level edges and textures to high-level facial structures. The convolution and pooling operations of each layer further abstract and compress the image information, and finally form a high-dimensional feature space representation in the fully connected layer. The training set of VGGFace contains 3.31M images, 9131 identities, and the data is more diverse, including different postures, ages, races and other changes.

[0057] The output vector of VGGFace can be used to calculate the similarity between different facial images. Euclidean distance or cosine similarity is usually used to measure the distance between feature vectors. If the distance between the feature vectors of two facial images is small, the model believes that they belong to the same person, otherwise they belong to different people.

[0058] Common face tracking methods include:

[0059] 1. Model-based tracking: By acquiring prior knowledge of the face, a low-cost parameter model (such as skin color model, ellipse model, etc.) is established, and the model is matched for each frame of the input image to achieve face recognition and tracking.

[0060] 2. Tracking based on motion information: Utilize the continuity of target motion between consecutive frames of an image to predict and track the face area. Common methods include optical flow method, Kalman filter, etc.

[0061] 3. Based on local facial feature tracking: Tracking is performed based on local facial features (such as eyes, nose, mouth, etc.). This type of method is usually combined with feature point tracking technology to achieve accurate face tracking.

[0062] 4. Tracking based on deep learning: Use deep learning models (such as Siamese network, DeepSORT, etc.) to learn the feature representation and motion pattern of the face to achieve efficient and robust face tracking.

[0063] In one embodiment, in step 104, the face images are clustered according to the tracking trajectory to obtain the face ID and face features corresponding to each cluster, including: taking the face image with the highest confidence on the same tracking trajectory as the standard image corresponding to the tracking trajectory; clustering the standard images corresponding to each tracking trajectory to obtain a number of clusters; marking each cluster with a unique face ID, and obtaining face features according to the face image with the highest confidence in the cluster; and corresponding face IDs and face features. Among them, all face images on the same tracking trajectory are clustered into the same cluster.

[0064] The confidence of a face image reflects the quality of the image to a certain extent. For example, the confidence of a face image with only half of the face is lower than that of a face image with the whole face. Therefore, the higher the confidence, the more accurate and effective the facial features extracted from the face image. In this embodiment, all face images on the same tracking trajectory are input into the clustering model. All face images on the same tracking trajectory can be clustered in the same cluster by weighting. Different tracking trajectories are clustered by the standard image with the highest confidence. The higher the confidence, the more effective the facial features are, and the corresponding clustering results will be more accurate.

[0065] After clustering is completed, each cluster is marked with a unique face ID. The face image with the highest confidence in each cluster is considered to have the most effective face features. Therefore, face features are extracted from the face image with the highest confidence as the face features corresponding to the cluster. Since each cluster corresponds to a unique face ID, there is also a one-to-one correspondence between the face ID and the face feature. In this embodiment, the face feature can be a face embedding vector.

[0066] In one embodiment, step 106 includes: obtaining a target facial image and a target trajectory corresponding to the target object; matching the target facial image with facial features, and if the match is successful, determining the facial ID corresponding to the successfully matched facial features as the facial ID corresponding to the target object; matching the target trajectory with the tracking trajectory, and if the match is successful, determining the facial ID corresponding to the cluster where the successfully matched tracking trajectory is located as the facial ID corresponding to the target object.

[0067] Face classification requires real-time acquisition of the target face image of the target object, extraction of the face embedding vector, and tracking to obtain the target trajectory. According to the existing faces, it is classified. The specific classification method is as follows: if the target trajectory of the face can be associated with the existing tracking trajectory, the face is classified as the face ID corresponding to the associated tracking trajectory; if it cannot be associated with the existing tracking trajectory, it is necessary to calculate the similarity between the target object's face embedding vector and the existing face embedding vector (i.e., face features), and take the face features with the highest similarity and their corresponding face ID as the classification result; if the similarity between the target object's face embedding vector and all face embedding vectors exceeds the threshold, and it cannot be associated with the existing tracking trajectory, the target object is considered to be a stranger.

[0068] In this embodiment, facial features and tracking trajectories are used as supervisory signals at the same time. Compared with the method of matching pre-collected facial data with subsequent faces, the influence of noise can be reduced to a certain extent, thereby improving the accuracy of video face recognition.

[0069] In one embodiment, all the face recognition results and face embedding vectors obtained by classification, as well as the target trajectory, are stored as the source data for face clustering to achieve data update. At the same time, if a face with a higher confidence level than the existing one appears, the face embedding vector of the face is updated to a vector with a higher confidence level. As the data increases, the face recognition accuracy of the algorithm will continue to improve.

[0070] In one embodiment, the target face image and the face features are matched by cosine distance; the target trajectory and the tracking trajectory are matched by interaction ratio.

[0071] In this embodiment, for the face embedding vectors output by the VGG-Face model, if the cosine distance between two face embedding vectors is less than 0.64, they are considered to be the same person.

[0072] The target trajectory and the tracking trajectory are matched through the Intersection over Union (IoU) ratio. The IoU threshold is 0.3. If it is greater than the threshold, the target trajectory and the tracking trajectory are considered to be matched successfully. Specifically, the IoU ratio is calculated based on the target frame obtained by face detection. In the same video, if the IoU ratio between the target frame in the current frame and the previous frame is greater than 0.3, the trajectory corresponding to the current frame and the previous frame is matched successfully, and the face appearing in the current frame and the previous frame is considered to be the same person.

[0073] In this embodiment, a greedy matching algorithm is used to match the target trajectory with the tracking trajectory.

[0074] In one embodiment, the method also includes: counting the facial images corresponding to each facial ID; clearing the facial IDs whose number of facial images is less than a preset number; retaining the facial IDs whose number of facial images is less than a preset number, and continuously updating the facial features corresponding to the facial ID.

[0075] After clustering is completed, the clustering results, facial features and corresponding face IDs are stored in the database for subsequent face classification. At the same time, the database will regularly clear the face data that has been seen briefly (short-term memory) and update the face data of common faces (long-term memory). The specific operation can be: if the number of face images corresponding to a face ID is less than 1 / 10 of the number of face images corresponding to the face ID with the highest number of appearances, and it has not been updated within the preset period, then the face data will be cleared, including the face ID and face image. The update method for common faces is: if a face with a higher confidence than the existing one appears, the face embedding vector of the face is updated to a face embedding vector with a higher confidence.

[0076] like Figure 3 As shown in FIG. 1 , it is an embodiment of face recognition. Initially, the face database is empty, and the face classification algorithm will classify all faces as strangers (face ID = -1), and at the same time, the target frame and face area of ​​the face will be cropped and stored in the database. The face clustering algorithm runs at fixed intervals according to the settings, and obtains the tracking segment ID and face embedding vector based on the face position marked by the target frame and the cropped face image. The clustering is performed in units of tracklets. If the cosine distance between the corresponding face embedding vectors on two tracking segments is less than the threshold, it is considered that the two tracking segments belong to the same person.

[0077] Based on the results of face clustering in the previous step, face classification is performed in real time. The face ID with the highest similarity to the target object face is searched in the database as the face ID of the current target object. At the same time, if the target object face in the current frame can be associated with the target frame corresponding to the face of the previous frame through the intersection and union ratio, the face ID of the current frame can also be determined. If the face of the current frame can neither find a similar face in the database nor be associated with the face of the historical frame through the intersection and union ratio, it will be considered a stranger and the face ID is set to -1.

[0078] This application scheme effectively achieves the effect of recognizing faces in the natural human-computer interaction process. On the self-collected data set, the accuracy of the clustering face recognition algorithm based on tracking reached 94%, and as the data increases, the face recognition accuracy of the algorithm will continue to improve. At the same time, the concept of long-term and short-term memory is used to clean and update the data stored in the database, retaining some important and repeatedly encountered faces, and erasing faces that have been seen briefly, so as to achieve the effect of naturally memorizing faces, making people feel that interacting with robots is more natural, and further optimizing the interactive experience.

[0079] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0080] Based on the same inventive concept, the embodiment of the present application also provides a tracking-based clustered face recognition device for implementing the tracking-based clustered face recognition method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more tracking-based clustered face recognition device embodiments provided below can refer to the limitations of the tracking-based clustered face recognition method above, and will not be repeated here.

[0081] In one embodiment, Figure 4 As shown, a clustering face recognition device based on tracking is provided, comprising: a data acquisition module 402, a tracking clustering module 404 and a target recognition module 406, wherein:

[0082] The data acquisition module 402 is used to acquire a video stream with a face image;

[0083] The tracking and clustering module 404 is used to track the face images in the video stream, cluster the face images according to the tracking trajectories, and obtain the face ID and face features corresponding to each cluster;

[0084] The target recognition module 406 is used to recognize the target object according to the tracking trajectory and facial features, and determine the face ID of the target object.

[0085] In one embodiment, the tracking clustering module 404 is also used to perform face detection on the face image in the video stream to obtain the face area; perform face tracking based on the changes of the face area in consecutive frames of the video stream to obtain the tracking trajectory.

[0086] In one embodiment, the face image with the highest confidence on the same tracking track is used as the standard image corresponding to the tracking track; the standard images corresponding to each tracking track are clustered to obtain a number of clusters; each cluster is marked with a unique face ID, and the face features are obtained according to the face image with the highest confidence in the cluster; the face ID corresponds to the face features. Among them, all face images on the same tracking track are clustered into the same cluster.

[0087] In one embodiment, the target recognition module 406 is also used to obtain a target facial image and a target trajectory corresponding to the target object; match the target facial image with the facial features, and if the match is successful, determine the facial ID corresponding to the successfully matched facial features as the facial ID corresponding to the target object; match the target trajectory with the tracking trajectory, and if the match is successful, determine the facial ID corresponding to the cluster where the successfully matched tracking trajectory is located as the facial ID corresponding to the target object.

[0088] In one embodiment, the target face image and the face features are matched by cosine distance; the target trajectory and the tracking trajectory are matched by interaction ratio.

[0089] In one embodiment, the tracking clustering module 404 is also used to count the facial images corresponding to each facial ID; remove the facial IDs whose number of facial images is lower than a preset number; retain the facial IDs whose number of facial images is lower than a preset number, and continuously update the facial features corresponding to the facial ID.

[0090] Each module in the above-mentioned tracking-based clustering face recognition device can be implemented in whole or in part by software, hardware, or a combination thereof. Each of the above-mentioned modules can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute the operations corresponding to each of the above modules.

[0091] In one embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in all the above method embodiments when executing the computer program.

[0092] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in all the above method embodiments are implemented.

[0093] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in all the above method embodiments when executed by a processor.

[0094] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards of relevant countries and regions.

[0095] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited thereto. The processors involved in each embodiment provided in this application may be general-purpose processors, central processing units, graphics processors, digital signal processors, programmable logic devices, data processing logic devices based on quantum computing, etc., but are not limited thereto.

[0096] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0097] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A clustering face recognition method based on tracking, characterized in that: The method comprises: Get a video stream with a face image; Performing face tracking on the face images in the video stream, clustering the face images according to the tracking trajectories, and obtaining face IDs and face features corresponding to each cluster; The target object is identified according to the tracking trajectory and the facial features, and the facial ID of the target object is determined.

2. The method according to claim 1, characterized in that The step of performing face tracking on the face image in the video stream comprises: Performing face detection on the face image in the video stream to obtain a face area; Face tracking is performed based on changes in the face area in consecutive frames of the video stream to obtain a tracking trajectory.

3. The method according to claim 1, characterized in that The clustering of the face images according to the tracking trajectory to obtain the face ID and face features corresponding to each cluster includes: Taking the face image with the highest confidence on the same tracking trajectory as the standard image corresponding to the tracking trajectory; Clustering the standard images corresponding to the tracking trajectories to obtain a plurality of clusters; Marking each cluster with a unique face ID, and obtaining the face feature according to the face image with the highest confidence in the cluster; the face ID corresponds to the face feature; Wherein, all the face images on the same tracking track are clustered into the same cluster.

4. The method according to claim 1, characterized in that: The step of identifying the target object according to the tracking trajectory and the facial features to determine the facial ID of the target object includes: Acquire the target face image and target trajectory corresponding to the target object; Matching the target face image with the face features, and if the match is successful, determining the face ID corresponding to the successfully matched face features as the face ID corresponding to the target object; The target track is matched with the tracking track. If the match is successful, the face ID corresponding to the cluster where the successfully matched tracking track is located is determined as the face ID corresponding to the target object.

5. The method according to claim 4, characterized in that The target face image and the face features are matched by cosine distance; The target trajectory and the tracking trajectory are matched through an interaction ratio.

6. The method according to any one of claims 1 to 5, characterized in that: The method further comprises: The face images corresponding to each face ID are counted; the face IDs whose number of face images is lower than a preset number are cleared; the face IDs whose number of face images is lower than the preset number are retained, and the face features corresponding to the face IDs are continuously updated.

7. A clustering face recognition device based on tracking, characterized in that: The device comprises: A data acquisition module, used for acquiring a video stream with a face image; A tracking and clustering module, used for tracking the face images in the video stream, clustering the face images according to the tracking trajectories, and obtaining the face ID and face features corresponding to each cluster; The target recognition module is used to recognize the target object according to the tracking trajectory and the facial features, and determine the facial ID of the target object.

8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.

Citation Information

Cited By

  • Flow analysis method and system based on face recognition

    CN120088829A

  • Target tracking identification method and apparatus, and electronic device

    CN120997887A

  • A target tracking and identifying method, device and electronic equipment

    CN120997887B

  • Information processing apparatus, information processing method, and machine-readable storage medium

    WO2026207874A1