A face tracking method, system, computer device and medium

By employing a detection-tracking fusion strategy based on the YOLO-FR-KCF model, combined with RepConv-CSP and FI-Head, the drift problem in facial target tracking was solved, achieving efficient and robust facial tracking in complex environments and improving stability and accuracy.

CN122157337APending Publication Date: 2026-06-05YANTAI UNIV +1

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
YANTAI UNIV
Filing Date
2026-03-23
Publication Date
2026-06-05

AI Technical Summary

Technical Problem

Existing facial target tracking methods are prone to target drift, have low facial tracking stability, and are difficult to maintain efficient and robust pedestrian detection and tracking in complex environments.

Method used

The YOLO-FR-KCF model is adopted, combining the YOLO-FR detector and KCF tracker of the YOLOv11 architecture. Image features are extracted through a feature fusion network, a detection-tracking fusion strategy is designed, and the RepConv-CSP module and FI-Head detection head are used to achieve high-precision facial target detection and tracking, and active correction is performed before drift error accumulation.

Benefits of technology

Maintaining high-precision trajectory alignment in complex scenarios improves the robustness and stability of target tracking, prevents deviations from amplifying over time, and ensures the continuity and accuracy of face tracking.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122157337A_ABST
    Figure CN122157337A_ABST
Patent Text Reader

Abstract

The application provides a face tracking method, system, computer device and medium, and belongs to the face recognition field, and comprises the following steps: acquiring real-time video stream data of a to-be-tracked object; extracting a face target detection box of the to-be-tracked object from an initial frame of the video stream data; continuously tracking the to-be-tracked object in each subsequent frame of the video stream data based on the face target detection box of the to-be-tracked object, determining the number of successful continuous tracking times from the number of continuous frames of the to-be-tracked object; when the number of successful continuous tracking times is greater than a preset value, extracting a new face target detection box of the to-be-tracked object from the current frame of the video stream data; continuously tracking the to-be-tracked object in the real-time video stream data based on the new face target detection box of the to-be-tracked object, and obtaining a face tracking result of the to-be-tracked object. The method avoids the amplification of deviation over time, can still maintain high-precision trajectory alignment under long-term operation, and improves the robustness and stability of target tracking.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of facial recognition, specifically relating to a facial tracking method, system, computer device, and medium. Background Technology

[0002] The rapid development of drone technology has made it valuable in military fields such as enemy detection and border control, as well as civilian fields such as public safety, precision agriculture, and traffic management. Its mobility and flexibility overcome the limitations of ground-based monitoring, providing core support for intelligent scene management. However, efficient and robust pedestrian detection and tracking still face many bottlenecks: changes in motion perspective, blurred and complex backgrounds, and lighting interference. Coupled with limitations in computing power and energy consumption, these factors restrict the effectiveness of practical applications. Early target tracking methods based on handcrafted features were only suitable for simple scenarios and struggled to cope with complex real-world environments, such as changes in lighting and target occlusion.

[0003] To address the aforementioned shortcomings, existing technologies initialize the target position using a target detector and combine it with a tracker to maintain inter-frame continuity, thereby achieving target tracking. However, this target tracking method relies on local feature matching for target recognition. During long-term tracking, due to the bias in local feature matching, the tracker is prone to target drift, leading to target loss and a low success rate in face tracking. Summary of the Invention

[0004] To address the problems of target drift and low stability in existing facial target tracking methods, this invention provides a facial tracking method, system, computer device, and medium.

[0005] To achieve the above objectives, the present invention provides the following technical solution: A face tracking method, comprising: Acquire real-time video stream data of the object to be tracked; Extract the facial target detection box of the object to be tracked from the initial frame of the video stream data; based on the facial target detection box of the object to be tracked, continuously track the object to be tracked in each subsequent frame of the video stream data, and determine the number of consecutive tracking successes by the number of consecutive frames that track the object to be tracked. When the number of consecutive successful tracking exceeds a preset value, a new facial target detection box of the object to be tracked is extracted from the video stream data of the current frame; based on the new facial target detection box of the object to be tracked, the object to be tracked is continuously tracked in the real-time video stream data to obtain the facial tracking result of the object to be tracked.

[0006] The present invention also provides a face tracking system, comprising: The target detection module is used to acquire real-time video stream data of the object to be tracked. The target tracking module is used to extract the facial target detection box of the object to be tracked from the initial frame of the video stream data; based on the facial target detection box of the object to be tracked, the object to be tracked is continuously tracked in each subsequent frame of the video stream data, and the number of consecutive successful tracking is determined by the number of consecutive frames that track the object to be tracked. The collaborative optimization module is used to extract a new facial target detection box of the object to be tracked from the video stream data of the current frame when the number of consecutive successful tracking exceeds a preset value; based on the new facial target detection box of the object to be tracked, the object to be tracked is continuously tracked in the real-time video stream data to obtain the facial tracking result of the object to be tracked.

[0007] The present invention also provides a computer device, including a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement any of the steps of a face tracking method.

[0008] The present invention also provides a computer-readable storage medium storing a computer program that, when loaded by a processor, is capable of executing any step of a face tracking method.

[0009] The face tracking method provided by this invention has the following beneficial effects: This invention extracts an initial bounding box for the facial object to be tracked using object detection technology. Then, based on this bounding box, it switches to tracking mode and continuously tracks the object in each subsequent frame using an efficient correlation filtering algorithm, while simultaneously counting the number of consecutively successfully tracked frames in real time. When the number of consecutive successfully tracked frames reaches a preset threshold, a correction mechanism is triggered: the current tracking process is paused, and the object detector is re-invoked to perform a global rescan of the current frame to obtain a new facial object bounding box. Finally, the tracker is reinitialized based on the new bounding box, and the tracking task continues.

[0010] In particular, because the present invention can not only maintain the continuity between frames during the tracking process, but also actively intervene before the drift error accumulates to the critical point, determine a new detection box and re-track the target, reset the source of error, avoid the amplification of deviation over time, and maintain high-precision trajectory alignment under long-term operation, the robustness and stability of target tracking are improved. Attached Figure Description

[0011] To more clearly illustrate the embodiments and design schemes of the present invention, the accompanying drawings required for this embodiment will be briefly described below. The drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0012] Figure 1This is a schematic diagram of a face tracking method provided in an embodiment of the present invention; Figure 2 This is an example of a YOLO-FR network structure provided in an embodiment of the present invention; Figure 3 This is an example of the RepConv-CSP module structure provided in an embodiment of the present invention; Figure 4 This is an example of a detection head with a known parallel processing structure provided by the present invention; Figure 5 This is an example of a known branch interaction detection head provided by the present invention; Figure 6 This is an example of the FI-Head task decomposition structure provided in an embodiment of the present invention; Figure 7 This is an example of a FI-Head structure provided in an embodiment of the present invention; Figure 8 This is an example of a collaborative optimization strategy for detectors and trackers provided in an embodiment of the present invention; Figure 9 Examples of UAV maneuver strategies provided in embodiments of the present invention; Figure 10 This is an example of the comparison between the original detection head and the FI-Head provided in this embodiment of the invention; Figure 11 This is a comparison example of the effects of C3k2 and RepConv-CSP provided in this embodiment of the invention; Figure 12 This is a comparison example of the FI-Head and RepConv-CSP modules and their collaborative effects provided in this embodiment of the invention; Figure 13 This is a performance comparison example of different models provided in the embodiments of the present invention; Figure 14 This is an example of unobstructed long-term face tracking provided in an embodiment of the present invention; Figure 15 This is an example of the operation of the correction mechanism provided in the embodiments of the present invention; Figure 16 This is an example of a pedestrian interference test provided in an embodiment of the present invention; Figure 17 This is an example of an obstacle occlusion test provided in an embodiment of the present invention; Figure 18 This is an example of tracking matching degree comparison provided in an embodiment of the present invention; Figure 19 This is an example of comparing the duration of tracking tasks provided in an embodiment of the present invention. Detailed Implementation

[0013] To enable those skilled in the art to better understand and implement the technical solutions of the present invention, the present invention will be described in detail below with reference to the accompanying drawings and specific embodiments. The following embodiments are only used to more clearly illustrate the technical solutions of the present invention and should not be construed as limiting the scope of protection of the present invention.

[0014] Considering that the YOLO detector operates independently between frames and lacks temporal correlation information, it is prone to losing targets due to occlusion, interference, etc. However, by fusing with tracking technologies such as KCF, the robustness and continuity of target perception in complex scenes can be improved through complementary temporal information. Thus, "detection-tracking" (TBD) becomes an effective solution. This paradigm uses the detector to provide target candidate boxes and relies on the tracker to maintain the continuity of target IDs between frames. The core lies in fusing detection accuracy and tracking continuity, and designing efficient data association strategies and model update mechanisms.

[0015] However, during long-term tracking, this TBD solution is prone to target drift due to biases in local feature matching. Without intervention, this drift amplifies over time, eventually leading to target loss and tracking failure.

[0016] To address the aforementioned shortcomings, this invention employs the YOLO-FR model for high-precision pedestrian face recognition and localization, and introduces the KCF algorithm to complete target association and trajectory maintenance between consecutive frames. A "detection-tracking" fusion strategy is designed, updating the tracker model in real time after target detection, and re-calling the detector when tracking fails or correction is triggered, effectively improving system robustness and continuity. Furthermore, for the YOLOv11 detector, this invention replaces the original detector head with a Feature Interaction Detection Head (FI-Head). This module combines Group Normalization (GN) and convolution parameter sharing strategies, improving detection accuracy for small targets and occluded scenes while achieving model lightweighting. A hybrid architecture based on heavily parameterized convolution (RepConv) and Cross-Stage Local Network (CSP) is designed, incorporating Ghost lightweighting technology to compress the number of model parameters while maintaining feature extraction performance, thus obtaining the YOLO-FR-KCF pedestrian face detection and tracking model suitable for UAVs.

[0017] Example 1 This invention provides a face tracking method, specifically as follows: Figure 1 As shown, it includes the following steps: Step 11: Obtain real-time video stream data of the object to be tracked; extract the facial target detection box of the object to be tracked from the initial frame of the video stream data. The process involves processing real-time video stream data of the object to be tracked using the YOLO-FR-KCF model to obtain the facial tracking result. The YOLO-FR-KCF model includes a YOLO-FR detector and a KCF tracker based on the YOLOv11 architecture. The YOLO-FR detector extracts image features from the initial frame using a feature fusion network, generating multiple candidate bounding boxes from these features across multiple receptive fields. NMS (Non-Maximum Suppression) is used to select the bounding box with the highest confidence from these candidate bounding boxes as the facial target bounding box of the object to be tracked. The KCF tracker defines a neighborhood centered on the facial target bounding box of the initial frame, and uses Fast Fourier Transform (FFT) within this neighborhood to determine the facial target bounding box of the object to be tracked in the next frame, enabling continuous tracking of the object and recording the number of consecutive successful tracking attempts. When the number of consecutive successful tracking attempts exceeds a preset value, the YOLO-FR detector determines a new facial target bounding box of the object to be tracked based on the video stream data of the current frame. The initialized KCF tracker then determines the facial target bounding box of the object to be tracked in the next frame based on this new bounding box, thus obtaining the facial tracking result of the object to be tracked.

[0018] Furthermore, the YOLO-FR detector is obtained by replacing the C3k2 module in the backbone network of the YOLOv11 architecture with the RepConv-CSP module and replacing the detection head with the FI-Head detection head. Step 11 includes: Step 111: The initial frames of the video stream data are split using the RepConv-CSP module in the backbone network based on the Split operation to obtain the original features of the upper branch and the lower branch after splitting; the original features of the lower branch are processed by RepConv convolution to obtain the structure reparameterized features, and the original features of the upper branch and the structure reparameterized features are concatenated to obtain a multi-scale feature map.

[0019] Specifically, such as Figure 2 As shown, this invention uses YOLOv11n as the baseline architecture for the YOLO-FR-KCF model. YOLOv11n employs a deeply optimized CSP-Darknet backbone network and an anchor-free detection paradigm, achieving an excellent balance between model size and detection accuracy. In particular, its extremely low computational overhead and parameter count make it a natural fit for the stringent deployment requirements of UAV onboard computing platforms for low latency and low power consumption, providing a reliable detection front-end for subsequent real-time tracking tasks.

[0020] Considering that YOLOv11n still suffers from limitations such as feature extraction redundancy and task coupling when facing complex backgrounds and occlusion interference from the high-altitude perspective of UAVs, this invention optimizes the feature extraction module or backbone network of the model. The RepConv-CSP module is introduced to replace the original C3k2 module. By using structural reparameterization technology, the multi-branch structure is equivalently folded into a single-path convolution during the inference stage. This significantly reduces the number of model parameters and memory usage while retaining the high-order feature extraction capabilities of deep networks, ensuring that the algorithm can still maintain a high frame rate under the condition of limited computing power of UAVs.

[0021] For example, in the backbone network of the YOLO-FR-KCF model, the image input is first processed through two convolutional layers with kernel k=3 and stride s=2, and then processed by the first RepConv-CSP module. The features obtained from the first RepConv-CSP module are then processed by two more convolutional layers with kernel k=3 and stride s=2, in conjunction with the second and third RepConv-CSP modules. Finally, feature fusion is achieved through spatial pyramid pooling, such as SPPF, and spatial attention mechanism is introduced through C2PSA to improve the detection capabilities of small and occluded targets. Subsequently, in the neck network, the C2PSA-processed features are upsampled and concatenated with the features output by the third RepConv-CSP module in the backbone network. After concatenation, the features are processed by the second RepConv-CSP module in the neck network, upsampled again, and concatenated with the features output by the second RepConv-CSP module in the backbone network. Finally, the features are processed by the first RepConv-CSP module in the neck network. The processed result is then processed by a convolutional layer with kernel k = 3 and stride s = 2 and concatenated with the features processed by the second RepConv-CSP module in the neck network. This process is then repeated by the third RepConv-CSP module in the neck network, followed by another convolutional layer with kernel k = 3 and stride s = 2 and concatenated with the features processed by the C2PSA module in the backbone network. Finally, the features are processed by the fourth RepConv-CSP module in the neck network. The features processed by the first, third, and fourth RepConv-CSP modules in the neck network are input into the FI-Head in the detection head, and the results of multiple detection heads are combined to obtain the final detection box and confidence score.

[0022] Specifically, the structure of the RepConv-CSP module is as follows: Figure 3As shown, for the data input to the backbone network, such as the video stream data of the initial frame, the channel dimension is first adjusted by a 1×1 convolutional layer to unify the basic channels of subsequent branches. Then, the initial frame video stream data is divided into two parts by a split operation. The upper branch passes the original features corresponding to the initial frame video stream data to retain basic information and avoid feature loss. The lower branch adopts the RepConv structure, which uses multiple 3×3 convolutions and introduces a 1×1 convolution at the end of the convolution stacking path to obtain the structural reparameterization features with low computational cost. Then, the structural reparameterization features output by the lower branch are concatenated with the original features of the upper branch to obtain the final multi-scale feature map. Thus, by using the strategy of partial channel separation and concatenation, the gradient information confusion that may be caused by element-wise addition in traditional residual connections is avoided, and more efficient gradient transfer is achieved. The specific process is shown in formulas (1), (2) and (3):

[0023] (1) (2) (3) in, These are the initial video stream features input to the lower branch of the RepConv-CSP module after the split operation. The features are those obtained after RepConv convolution. The weights are 3×3 convolution kernel weights. This is the output of intermediate features after processing through multiple 3×3 convolutions. The weights are 1×1 convolution kernel weights. The final output of the next branch is the final structurally reparameterized feature. The RepConv-CSP module provided in this invention deeply integrates the structural reparameterization concept of RepConv, the lightweight characteristics of GhostNet, and the gradient splitting strategy of CSP. By optimizing the feature propagation path, this module significantly reduces computational complexity while effectively enhancing the model's ability to capture multi-scale features, making it more suitable for edge deployment. Specifically, in the feature extraction stage, RepConv units are introduced into the main branch to achieve "training-inference" decoupling. That is, during the training phase, a multi-branch parallel topology is used to collaboratively capture rich spatial information and local details of the image, strengthening the backpropagation of gradients. During the inference phase, based on structural reparameterization technology, the multiple branches are losslessly fused into a single 3×3 convolution, thereby significantly improving the model's representational ability without increasing inference latency.

[0024] Furthermore, to address the redundancy issue of feature maps in layered networks, the RepConv-CSP module provided in this invention integrates the GhostNet generation strategy and CSP architecture. At the end of the 3×3 convolution stacked path, a 1×1 convolution is introduced to generate Ghost feature maps, thereby replacing high-dimensional convolution operations and reducing the number of parameters. During the fusion process between the upper and lower branches, the RepConv-CSP module first concatenates the features of the two branches along the channel dimension, and then fuses them through a 1×1 convolution to obtain the final output features. This avoids the risk of gradient vanishing while ensuring that the output features can flexibly adapt to the dimensionality requirements of downstream detection and tracking tasks.

[0025] Step 112: Fuse the multi-scale feature maps through the neck network to obtain a fused feature map.

[0026] Step 113: Decode the fused feature map using the FI-Head detection head to obtain the facial target detection box of the object to be tracked and the corresponding confidence level.

[0027] Step 113 includes: Step 1131: Extract interactive features from the fused feature map.

[0028] Step 1132: Perform deformable convolution on the interaction features to obtain offsets and attention masks. Apply DCNv2 to the interaction features based on the offsets and attention masks to obtain localization feature maps. Use global average pooling to obtain compressed spatial dimension features from the interaction features. Generate dynamic weights from the compressed spatial dimension features through a fully connected layer and a Sigmoid activation function. Multiply the dynamic weights element-wise with the interaction features to obtain a classification-optimized feature map.

[0029] Step 1133: Determine the facial target detection box of the object to be tracked based on the localization feature map, and determine the confidence level of the object to be tracked based on the classification optimization feature map.

[0030] Specifically, in addition to improvements to the backbone network, the YOLO-FR detector provided by this invention addresses the issue of blurred target features in densely occluded scenes by replacing the existing detector head in the existing YOLOv11 with the FI-Head feature interaction detection head. By introducing an interaction mechanism, the model's ability to perceive partially occluded pedestrians is enhanced, making up for the problem of missed detection of occluded targets caused by the misalignment of feature space in classification and localization tasks in traditional detector heads, and significantly reducing the false negative rate.

[0031] In conventional YOLO series models and other single-stage object detection algorithms, the detection head typically uses parallel branches to handle classification and localization separately, specifically as follows: Figure 4As shown, this design of parallel processing of classification supervision and localization supervision results in the inability of task features to interact and differences in feature spatial distribution, which can easily lead to spatial misalignment when making predictions using this detection head.

[0032] Based on this, such as Figure 5 As shown, the FI-Head feature interaction detection head is based on the idea of ​​feature interaction. Through a branch feature interaction structure of task interaction, it ensures that the features obtained from the row branches can be aligned and fused. Specifically, it generates multi-scale features in the feature pyramid network. Figure X Subsequently, a feature extractor composed of multiple convolutions in the FI-Head feature interaction detection head obtains the interaction features for the classification and localization tasks, and then... Figure 6 As shown, these features are input into two task decomposers to process the classification and localization tasks respectively. The structures corresponding to the classification branch and the task branch are as follows: Figure 7 As shown, in the task branch, interactive features are included. Global average pooling (GAP) is used to compress the spatial dimension, followed by a concat operation on the pooling result. Finally, layer weights are generated through a fully connected layer and a sigmoid activation function. These weights are then multiplied element-wise with the original interaction features layer by layer to output a task-specific feature map that enables dynamic feature selection between layers. This includes discriminative features such as dynamically focusing on key textures and semantic regions of the target, suppressing background interference, and reducing misclassification. In the localization branch, deformable convolutions are used to obtain the offset and attention mask of a deformable convolutional network (DCNv2), allowing the convolutional kernels to dynamically adapt to target deformations such as bending and tilting, thereby determining the interaction features. The corresponding localization feature maps are used to improve localization accuracy. Finally, the classification optimization feature maps and localization feature maps output from the two branches determine the final target detection box and its corresponding confidence score.

[0033] Step 12: Based on the facial target detection box of the object to be tracked, the object to be tracked is continuously tracked in the video stream data of each subsequent frame. The number of consecutive successful tracking is determined by the number of consecutive frames that track the object to be tracked.

[0034] Step 12 includes: Step 121: Using the facial target detection box of the object to be tracked in the initial frame as the center, determine the grayscale features, color features, and texture features of the object to be tracked based on the image pixels; construct a multi-channel correlation filter based on the grayscale features, color features, and texture features.

[0035] Step 122: For each frame of video stream data, the neighborhood of the area corresponding to the facial target detection box in the previous frame is taken as the sampling area.

[0036] Step 123: Perform frequency domain calculations on the sampling region and the multi-channel correlation filter using Fast Fourier Transform to obtain the filter response diagram.

[0037] Step 124: Determine the facial target detection box of the frame based on the peak value of the filtered response map.

[0038] Specifically, target tracking aims to continuously locate specific targets in dynamic scenes. It can be broadly categorized into correlation filtering-based and detection-based algorithms. Among these, the Minimum Sum of Squared Errors (MOSSE)-based filter tracker transforms the image-filter convolution operation into frequency domain dot product through frequency domain transformation, achieving real-time performance breakthroughs using Fast Fourier Transform (FFT). This model targets the target by minimizing the sum of squared output errors in a correlation filtering problem. However, this approach is limited by grayscale features and lacks robustness. The KCF algorithm used in this invention introduces circulant matrix theory on top of MOSSE, employing kernel tricks to map features to a high-dimensional space. Utilizing the circulant matrix properties of image translation samples, it transforms the computationally complex regression problem in traditional tracking algorithms into a frequency domain optimization problem. This maintains the efficiency of frequency domain computation while significantly improving tracking accuracy in complex scenes. Therefore, this invention achieves continuous tracking of facial targets using the KCF algorithm.

[0039] KCF utilizes the Fourier diagonalization property of the circulant matrix to transform the ridge regression objective function into element-wise operations in the frequency domain. Its closed-form solution for linear regression... As shown in formula (4):

[0040] (4) in, It is the basic sample The discrete Fourier transform; It is a Gaussian regression target The peak value of the discrete Fourier transform of the target corresponds to the center position of the target. It is the regularization coefficient for ridge regression, which is used to control overfitting; It is an element-wise multiplication operator. Formula (4) reduces the spatial complexity. Transform the matrix inversion into the frequency domain Element-level operations significantly reduce computational complexity.

[0041] Based on the above frequency domain acceleration mechanism, the closed-form solution of the kernelized correlation filter in the KCF algorithm is shown in Equation (5): (5) in, Dual space coefficients The discrete Fourier transform; Represents the kernel autocorrelation vector The DFT of the kernel regression. Equation (5) shows that kernel regression can still be diagonalized in the frequency domain under cyclic samples, with the same complexity as the linear filter, effectively overcoming the "complexity inflation" problem of traditional kernel methods.

[0042] In the KCF algorithm, the detection response calculation formula is the core of the tracking phase, as shown in formulas (6) and (7): (6) (7) in, The detection response map in the discrete Fourier transform form of the test sample z, where the location of its spatial domain maximum value corresponds to the target location. For training samples With test samples The kernel cross-correlation discrete Fourier transform, It is the discrete Fourier transform function. This is a cyclic shift operation. This is the kernel function.

[0043] Step 13: When the number of consecutive successful tracking exceeds a preset value, extract a new facial target detection box of the object to be tracked from the video stream data of the current frame; based on the new facial target detection box of the object to be tracked, continuously track the object to be tracked in the real-time video stream data to obtain the facial tracking result of the object to be tracked.

[0044] Step 14: If the facial target detection box of the object to be tracked is not identified in the video stream data of the next frame, the facial target detection box of the object to be tracked is extracted again from the video stream data of the next frame.

[0045] Specifically, the fusion strategy of the YOLO detector and the KCF tracker is as follows: Figure 8 As shown, following the closed-loop optimization framework of "detection-tracking-correction", the high-precision YOLO detector is deeply coupled with the high-efficiency KCF tracker. YOLO's semantic-level localization capability is used to solve the initialization and drift problems of KCF, while relying on KCF's fast correlation filtering mechanism to make up for YOLO's computational power shortcomings in high frame rate processing.

[0046] Specifically, during the detection phase, the real-time video stream from the drone serves as input. When the system starts or enters a new tracking task, the YOLO-FR detector is activated and performs a global scan of the current frame image. In this phase, the detector extracts image features through a multi-scale feature fusion network, generates candidate regions under different receptive fields, and uses Non-Maximum Search (NMS) to filter out high-confidence target candidate boxes. In the frame where the target is captured, the model outputs the target's detection box coordinates, class confidence, and keypoint coordinates. If the target is successfully detected, the system enters the tracking phase, where the KCF tracker continuously tracks the target. Otherwise, YOLO will maintain detection mode, continuously scanning subsequent frames until the target is captured. When the KCF tracker reaches preset conditions, such as a count condition or a duration condition, a correction mechanism is triggered, and the YOLO-FR detector re-detects the target.

[0047] Subsequently, after the YOLO detector completes its initial localization, it pauses its operation during the tracking phase to release computational resources, and the KCF tracker performs real-time tracking. The KCF tracker provided in this invention uses the initial detection box output by YOLO as the center, calculates the grayscale, color, and texture features of the target using image pixel values, and constructs a multi-channel correlation filter. In each subsequent frame, the tracker samples within the target's neighborhood, accelerates the calculation of the filtered response using FFT, and finds the region corresponding to the response peak as the target position for the current frame. Furthermore, to address the issue of drastic target scale changes during UAV flight, this invention introduces a scale adaptation mechanism. By analyzing the rate of change of the target area, the search window size is dynamically adjusted, effectively avoiding tracking drift or loss due to changes in target distance.

[0048] To address the target drift issue, this invention employs a periodic correction mechanism. By actively incorporating YOLO's global detection capabilities, it periodically calibrates the local errors of the KCF tracker, ensuring the accuracy of the tracking position. For instance, the specific implementation of the correction mechanism is deeply coupled with state management and parameter control logic, defining a maximum tracking period and a real-time tracking counter. For example, `correction_interval` defines the maximum allowed number of consecutive successful tracking attempts, while `correction_counter` continuously counts the current number of consecutively successful tracking frames. Each time the KCF tracker completes a tracking operation, `correction_counter` increments. If the number of consecutive successful tracking attempts reaches `correction_interval`, the system triggers the correction mechanism. When correction is triggered, the `use_yolo` status flag is reset to True, and the system switches back to the YOLO detector to perform a full-frame scan of the current frame. After YOLO successfully detects the target and outputs the target detection box and confidence score, the system evaluates the reliability of the detection result through double verification. If the verification passes, the YOLO output detection box is extracted as the new initial state, the KCF tracker is reinitialized, and `correction_counter` is cleared. A specific algorithm flow example is as follows:

[0049] Input: Drone video stream, improved YOLOv11 detector, KCF tracker Parameters: Calibration interval = 60, Detection flag = True, Counter = 0 Output: The processed video frame sequence (including object detection boxes) 1: Initialization: Improved YOLOv11 detector (enabling FI_Head and RepConv_CSP modules) 2: Initialization: Load the KCF tracer 3: Perform the following steps on each frame of the video stream: 4: If use_yolo is True, then 5: Use YOLOv11 to detect the current frame, obtain the set of bounding boxes (bboxes) and the confidence score (score=yolo). 6: If the set of bounding boxes (bboxes) in the detection results is not empty, then 7: Initialize the KCF tracker using the first detection box bboxes[0]. 8: Update status: use_yolo=False, reset counter correction_counter=0 9: Termination condition judgment 10: Otherwise 11: Use KCF to track the current frame and predict the tracked bounding box. 12: Increment the counter: correction_counter + 1 13: If KCF tracking fails or the calibration counter is greater than or equal to the calibration interval, then 14: Trigger re-detection: use_yolo=True, reset the correction_counter counter=0 15: Termination condition judgment 16: Termination condition judgment 17: Visualization: Frame drawing of target bounding boxes (if in tracking state, draw tracked_bbox; otherwise, draw bboxes[0]) 18: Output the current frame 19: End the loop.

[0050] As shown above, the correction algorithm provided by this invention, through a collaborative mode of local tracking + global calibration, retains the high efficiency of KCF while compensating for the limitations of KCF's local features by leveraging YOLO's global detection capabilities, effectively suppressing the accumulation of drift errors. Simultaneously, this mechanism enables the system to maintain stable tracking even under complex conditions such as target attitude changes, lighting fluctuations, or brief occlusions, avoiding tracking interruptions caused by the deficiencies of a single tracking algorithm, and providing reliable technical support for UAV inspection and target surveillance tasks.

[0051] Step 15: Determine the horizontal error, vertical error, and detection box area of ​​the target object relative to the UAV based on the parameters of the facial target detection box and the image frame size in the facial tracking results; determine the vertical ascent / descent command based on the vertical error, and the angular velocity control command based on the horizontal error; control the movement of the UAV based on the vertical ascent / descent command and the angular velocity control command; when the horizontal error is greater than the preset translation error threshold, control the UAV to move horizontally; when the detection box area is outside the preset area range, control the UAV to move away from or closer to the target object until the detection box area is within the area range.

[0052] Specifically, since real-time video stream data acquisition is primarily achieved through drones, this invention also provides a drone maneuver control strategy. This strategy controls the drone's flight based on the facial target detection bounding boxes output by a KCF tracker or YOLO-FR detector, thereby ensuring the integrity of the video stream data acquisition and consequently ensuring the robustness and stability of target tracking. The drone's operating logic is as follows: Figure 9 As shown, after the drone completes initialization, it flies and collects images to complete image search. Then, it continuously tracks the target by means of translation, ascent and hovering. When the target is lost, it searches for the target again and continues to track it. After the target is tracked, it lands and stops working.

[0053] For example, the input video stream is normalized to obtain a 640×640 tensor, which is then input into a convolutional neural network. The feature pyramid network outputs prediction results at three scales: 8, 16, and 32. The center of the feature layer grid is mapped back to the original image coordinates through an anchor point generation algorithm, as shown in formula (8). (8) in, This is the downsampling factor. For the horizontal index of the grid cells in the feature layer network, This refers to the vertical index of the grid cells in the feature layer network. To map back to the anchor point center coordinates on the original image. Then, using the equation shown in Equation (9) combined with the Sigmoid function, the normalized offset is obtained by decoding the facial target detection box output by the KCF tracker or YOLO-FR detector:

[0054] (9) in, To obtain the coordinates of the top-left corner of the target detection box after decoding, To obtain the coordinates of the lower right corner of the target detection box after decoding, and This is the normalized offset in the predicted width direction. and This is the normalized offset in the predicted width direction. The area parameter is used to estimate the depth of the UAV relative to the object to be detected. The target center coordinates can be determined by the geometric center of the detection frame. Specific UAV control includes lateral translation control, vertical depth adjustment, vertical ascent and descent control, yaw angle control, and combinations of these four control types. Specifically, when the target center coordinates... When the horizontal offset exceeds the threshold of ±15 pixels, the drone is controlled to move horizontally via a translation servo system, and the horizontal movement speed is... As shown in formula (10):

[0055] (10) in, This refers to the width of the video frame or the image width. Additionally, it specifies the output horizontal movement speed. It can also be done through functions Amplitude limiting is applied to avoid overshoot. Furthermore, this invention can determine the depth of the UAV relative to the target based on the area of ​​the detection frame, and make adjustments when the distance is too close or too far, as shown in formula (11):

[0056] (11) in, The scaling factor is obtained in advance through camera calibration and is used for... depth With area The conversion. Furthermore, the face tracking method provided by this invention can also perform yaw angle control and vertical ascent / descent control based on horizontal and vertical errors respectively. Wherein the vertical error... Vertical lifting control speed As shown in formula (12):

[0057] (12) in, This is the vertical error. Furthermore, to ensure flight stability, the climb / descendancy rate can be limited to within ±1 m / s. Horizontal error... Yaw angle control speed As shown in formula (13):

[0058] (13) in, The horizontal error at the previous moment is given. Furthermore, incremental PID control can be used to eliminate steady-state errors, with a maximum angular velocity limit of 60° / s. Additionally, the translation-rotation coupling effect can be suppressed using a feedforward compensator as shown in formula (14):

[0059] (14) in, The final output is the angular velocity yaw command. This is the final output command for the lateral average velocity. The original yaw rate calculated by PID. The original lateral average velocity is calculated for the PID controller. The matrix coefficients in formula (14) are obtained by fitting flight experiment data using the least squares method, and this invention does not impose any limitations on them. This invention can also dynamically adjust the control parameters according to the flight altitude h, as shown in formula (15):

[0060] (15) in, This is the proportional gain coefficient for the lateral position. This is the velocity gain coefficient for lateral movement. Furthermore, when the drone's ultrasonic sensors detect the distance to lateral obstacles... When the depth is less than 1.5 meters, the injection repulsion velocity term is as shown in formula (16):

[0061] (16) in, The lateral speed command generated for obstacle avoidance, and during the detection-tracking-correction process, when the target is lost, the UAV can perform a spiral search at the speed shown in formula (17). The UAV descends 0.6 meters for every 360° rotation, thereby expanding the search coverage area: (17) in, The yaw rate in search mode. This refers to the vertical speed in search mode. It should be emphasized that in the face tracking method provided by this invention, multiple drone controls can be activated simultaneously. That is, the drone control system can be in one or more states at the same time. For example, if the target object moves horizontally and the distance between it and the drone increases, the system will be in both tracking-translation and tracking-lift / ascent states simultaneously to ensure that the target always remains within the camera's field of view.

[0062] Example 2 Building upon Example 1, this paper further evaluates the performance of the YOLO-FR-KCF model provided by this invention using the Wider Face dataset, a publicly available benchmark dataset for face detection. This face data primarily originates from the internet and contains rich annotation information. Besides basic face detection bounding box location information, it also includes attributes such as blur level, expression, lighting conditions, occlusion, and pose. In this example, the dataset is divided into a training set, a validation set, and a test set in a 4:1:5 ratio. The training set is used for algorithm training, the validation set is used for parameter adjustment during training, and the test set is used to evaluate the model's accuracy and stability. Furthermore, to more accurately evaluate algorithm performance, the Wider Face dataset ranks the detection difficulty of 60 event categories based on three key factors: scale, occlusion, and pose. The Easy category has low detection difficulty, with faces mostly of medium or large scale, minimal occlusion, and relatively frontal poses. The Medium category has moderate detection difficulty, containing a certain proportion of small-scale, partially occluded, or non-frontal pose faces. The Hard category has high detection difficulty, containing a large number of small-scale, severely occluded, extreme poses, or faces against complex backgrounds.

[0063] The evaluation metrics for the YOLO object detection model mainly include precision (P), recall (R), AP, mAP (multiple parameters per second), and floating-point operations per second (FLOPs). Precision measures the correctness of the algorithm in predicting faces in all cases. Recall represents the algorithm's ability to correctly identify faces. Furthermore, this embodiment uses model parameters and FLOPs as additional metrics to evaluate the model's computational efficiency. The number of model parameters represents the model's complexity and storage requirements, a key metric for deployment on UAV platforms with limited computing resources. FLOPs quantify the computational load required for a single forward pass, reflecting its suitability for real-time applications. AP is the average precision for a single class, while mAP is the average AP across all classes, reflecting the model's robustness and generalization ability. To evaluate the model's performance, this embodiment selects mAP50 at different difficulty levels as the primary metric: mAP50 (Easy), mAP50 (Medium), and mAP50 (Hard).

[0064] First, to verify the effectiveness of each improved module in the YOLO-FR-KCF model provided in this invention, YOLOv11n was used as the baseline model, and two improved modules were gradually added and ablation tests were performed on the network model. A total of four ablation experiments were set up, and the performance of the improved model was quantitatively analyzed from three dimensions: mAP50, Parameters, and FLOPs. The results are shown in Table 1.

[0065] Table 1 Ablation Experiments of the YOLO-FR-KCF Model Among them, YOLOv11n is the baseline model, YOLOv11n-1 is a model with the detection head replaced by the FI-Head detection head, but the backbone network is not improved, YOLOv11n-2 has no updated detection head, but the backbone network integrates the RepConv-CSP module, and YOLO-FR is a target detection model with improvements in both the detection head and the backbone network. YOLOv11n-1 achieves mAP50 of 93.97 / 92.20 / 79.26% in Easy / Medium / Hard scenarios, an improvement of 0.88 / 1.19 / 1.16% compared to the baseline model, verifying the rationality of using the task interaction method with FI-Head. To more intuitively verify the optimization effect of FI-Head on target discrimination and detection box accuracy, this invention compares the detection effects of the original detection head and FI-Head in a medium-difficulty scenario with densely packed people. The visual differences are shown below. Figure 10As shown: In the red-marked area, FI-Head successfully helped the model detect two occluded targets missed by the original detection head, verifying the discriminative power of feature interaction for some occluded targets. In addition, the overall confidence of the detection boxes improved. Although a few low-confidence boxes existed due to the scarcity of features for extremely occluded targets, the proportion of high-confidence boxes significantly increased, proving that the feature interaction method effectively aggregated stable discriminative features.

[0066] The number of parameters in YOLOv11n-2 is reduced to 2.20M, a 14.7% reduction compared to the baseline. This efficiency improvement stems from the reduced inference latency due to reparameterization and the reduced memory pressure from Ghost features. In Easy / Medium / Hard scenarios, thanks to the optimized feature representation capabilities, mAP50 increased by 0.19 / 0.42 / 0.40%, respectively. To visually demonstrate the optimization effect of the RepConv-CSP lightweight module on feature representation capabilities, this embodiment visualizes the second feature extraction layer of the original YOLOv11n backbone and compares it with the output feature map of the improved model's RepConv-CSP module. The visualization differences are shown below. Figure 11 As shown, in the feature map output by C3k2, the feature responses of the character queue are sparse, and the effective semantic information is interfered with by noise, making it difficult to form a coherent structure. In contrast, in the feature map output by RepConv-CSP, the model significantly reduces computational redundancy and enhances the expression of effective features by leveraging multi-branch feature fusion of heavily parameterized convolutions and the lightweight construction of Ghost features.

[0067] YOLO-FR achieved mAP50 of 94.56 / 92.75 / 80.25% in Easy / Medium / Hard difficulty scenarios, representing improvements of 1.47 / 1.74 / 2.15% over the benchmark. This improvement stems from deep complementarity: the enhanced feature discrimination power of FI-Head compensates for the representational loss of the lightweight structure, while the computational optimization of RepConv-CSP offsets the increased complexity of FI-head. The number of parameters was further compressed to 1.94M, a 24.8% reduction compared to the benchmark model, with computational cost stabilized at 6.4G. To further demonstrate the collaborative effect of the FI-Head and RepConv-CSP modules, images of three different difficulty levels from the Wider Face dataset were randomly selected for testing. The test results are as follows: Figure 12As shown: In the Easy scenario, faces are clear with minimal occlusion, and all four models exhibit good detection performance. Thanks to task interaction and lightweight modules, the YOLO-FR model achieves the highest detection confidence. In the Medium scenario, target occlusion and small faces increase the detection difficulty. Therefore, YOLOv11n shows significant false negatives in the Medium class. The introduced FI-Head module effectively improves the re-identification ability of occluded targets through cross-task feature decoupling. Simultaneously, the RepConv-CSP module enhances the model's confidence in recognizing small-scale faces in the background. Through the collaborative work of these two modules, the YOLO-FR model effectively reduces the false negative and false positive rates, and improves detection confidence and bounding box localization accuracy. The Hard scenario mainly includes dense crowd queues, extremely small-scale faces, and extreme occlusion. The YOLOv11n model faces challenges in these complex scenarios, exhibiting problems such as decreased bounding box localization accuracy and neglect of small targets. By introducing FI-Head into the baseline model, the model's ability to locate and identify small-scale targets is significantly improved. Further integration of the Ghost feature compression mechanism effectively reduces redundant information in the model, achieving a lightweight design. Ultimately, in Hard scenarios, the YOLO-FR model achieves a balance between accuracy and lightweight design.

[0068] To further verify the model's superiority, this embodiment compares the performance of the YOLO-FR model with five other mainstream detection models: SSD, YOLOv5-Face, YOLOv8n, YOLOv10n, and the benchmark model YOLOv11n. YOLOv5-Face is an algorithm specifically designed for face detection and achieves high accuracy on the Wider Face dataset. To ensure fairness, all models were not pre-trained, and the training parameters were kept consistent. The comparative experimental results are shown in Table 2.

[0069] Table 2 Comparison Results of Different Models In the Easy scenario, the YOLO-FR model achieved an mAP50 of 94.56%, a 1.47% improvement over the benchmark YOLOv11n and a 0.86% higher than YOLOv5-Face, demonstrating its efficient ability to identify clear, large-scale targets. In the Medium scenario, the YOLO-FR model achieved an mAP50 of 92.75%, slightly higher than YOLOv5-Face and significantly better than YOLOv8n and YOLOv11n, indicating that it can maintain high accuracy even in scenarios containing some small-scale, slightly occluded targets. In the Hard scenario, the improved model, with an mAP50 of 80.25%, outperformed models such as YOLOv8n, YOLOv10n, and YOLOv11n, although slightly lower than YOLOv5-Face, the difference was kept within 3%. Considering the performance in other difficulty scenarios, the improved model exhibits better overall robustness.

[0070] Lightweighting directly impacts the feasibility of deploying the model on edge devices such as drones. The improved model has 1.94M parameters, a reduction of approximately 25% and 14% compared to YOLOv11n / YOLOv10n, and only 7.2% of the parameters required by an SSD, significantly reducing memory consumption. In terms of computational complexity, the improved model has 6.4G of floating-point operations, close to YOLOv11n's 6.3G, and far lower than YOLOv5-Face's 15.8G and SSD's 107.5G. The YOLO-FR model significantly reduces its reliance on hardware computing power while maintaining feature extraction capabilities.

[0071] The above comparative experiments systematically verified the comprehensive advantages of the improved YOLO model, meeting the UAV's requirements for "high precision and real-time performance." To intuitively demonstrate the detection performance of the YOLO-FR model, this embodiment conducted tests on randomly selected images in three scene types: Easy, Medium, and Hard. The visualization results are shown below. Figure 13 As shown: In the Easy scenario, mainstream algorithms and the YOLO-FR model yielded similar results, both successfully identifying clear and complete targets. In the Medium scenario, the YOLOv5-Face model exhibited false positives, and other models showed lower confidence levels for blurred and occluded targets, reflecting their insufficient ability to detect weakly semantic targets. In contrast, the YOLO-FR model, relying on the deformation feature adaptation of RepConv-CSP, successfully detected all targets with improved confidence. In the Hard scenario, algorithms such as YOLOv8n and YOLOv10n began to show false negatives and missed detections. However, the YOLO-FR model, through the combined effect of FI-Head and RepConv-CSP, enhanced feature interaction and feature recognition, resulting in a reduction in the number of duplicate bounding boxes, a lower false negative rate, and improved confidence for small targets.

[0072] Following this, further flight tests were conducted on the drone. Considering that multi-rotor drones with three or more rotor axes have a fixed rotor collective pitch, compact structure, high component reliability, excellent hovering performance, and are easily controllable by adjusting different rotor speeds, this embodiment selected the DJI Tello small quadcopter drone as the flight test verification platform. This drone has a visual positioning system and an onboard camera, supporting the capture of 5-megapixel JPG photos and 720p MP4 videos. The drone features built-in infrared altitude hold, barometer altitude hold, LED indicator lights, WiFi connectivity, and electronic image stabilization. The drone measures 98×92×41mm, weighs 87 grams, has a maximum flight distance of 100m, a maximum flight altitude of 30m, a maximum flight speed of 8m / s, and a maximum flight time of 13 minutes.

[0073] To demonstrate that the fusion model can achieve long-term tracking of pedestrian faces by drones, this embodiment conducted verification in multiple ways. The verification scenario was set in a medium-sized open area, with a total test duration of 15 minutes, simulating a typical application scenario of drones in public safety monitoring. Throughout the verification process, the operator controlled the drone to fly to the mission area and hover, while the drone's onboard camera continuously detected the target and transmitted the video stream back to the terminal. The verification scenario and the results of the unobstructed long-term tracking test are as follows: Figure 14 As shown, the results demonstrate that the YOLO-FR-KCF model provided by this invention can achieve long-term pedestrian face tracking even when pedestrians are unobstructed; and, as... Figure 15 As shown, for the target drift phenomenon that occurs during KCF tracking, the YOLO-FR-KCF model provided by this invention periodically enables the YOLO detector to re-detect through a correction mechanism, which successfully corrects the target box display position and provides the KCF tracker with the correct initial tracking position.

[0074] Considering that real-world environments often contain numerous obstructions such as pedestrians, pillars, and large objects, which can cause the tracked target to disappear and reappear, severely impacting the drone's continuous tracking capability and real-time performance in complex scenarios, this embodiment adds two sets of test examples: pedestrian interference test and obstacle occlusion interference test, to further verify the robustness of the fusion model in complex dynamic scenarios. Specific pedestrian interference test results are as follows: Figure 16 As shown, the obstacle interference test results are as follows: Figure 17As shown: When a target intersects with a pedestrian or obstacle, the target will disappear. Upon detecting an occlusion signal, the system immediately freezes the KCF tracker and calls the YOLO-FR detector to rescan the entire current frame. When the detector successfully detects the original target again, it will use the KCF tracker to continue tracking in the next frame. This demonstrates that the YOLO-FR-KCF model provided by this invention can achieve continuous target tracking even when facing occlusion.

[0075] Furthermore, considering that the alignment between the UAV's flight trajectory and the target's movement path is a key indicator for evaluating tracking performance when the UAV performs ultra-low-altitude target tracking tasks, this embodiment uses experiments to compare the actual movement trajectories of the UAV and the target, intuitively evaluating the system's ability to closely follow the target in complex motion modes. The comparative analysis of tracking trajectories for different algorithm combinations is as follows: Figure 18 As shown, the solid line represents the actual flight path of the drone, and the dashed line represents the trajectory of the human face target. Specifically, Figure 18 (a) is a combination algorithm of CenterNet + DeepSORT, with a tracking matching accuracy of 85%. Figure 18 (b) is a combination algorithm of FaceBoxes + SiamFC, with a tracking matching accuracy of 72%. Figure 18 (c) is a combination algorithm of Haar + CamShift, with a tracking matching accuracy of 58%. Figure 18 (d) is a combination algorithm of Gabor + Kalman, with a tracking matching accuracy of 68%. Figure 18 (e) is the YOLO-FR-KCF model provided by the present invention, with a tracking matching degree of 98%. That is, when using the YOLO-FR-KCF model provided by the present invention, the UAV can accurately follow the target's motion trajectory and exhibit robust performance in both straight-line and complex curved motion, thereby significantly improving the tracking accuracy.

[0076] And the comparison of tracking duration, such as Figure 19 As shown, the YOLO-FR-KCF model provided by this invention exhibits excellent tracking continuity, with an average tracking duration of 28.5 seconds. In contrast, other mainstream algorithm combinations all show varying degrees of inadequacy: the CenterNet + DeepSORT combination can sustain tracking for an average of 22.3 seconds, while the FaceBoxes + SiamFC, Haar + CamShift, and Gabor + Kalman combinations achieve 18.7 seconds, 12.4 seconds, and 15.9 seconds, respectively. This demonstrates that the YOLO-FR-KCF model provided by this invention possesses stronger robustness and stability in target tracking, effectively reducing the probability of target loss and thus enabling longer continuous tracking in practical applications.

[0077] In summary, this invention addresses the dynamic occlusion problem in face detection and tracking on UAV platforms by proposing a YOLO-FR-KCF model based on the fusion of improved YOLOv11 and KCF. Regarding the YOLO detector, this invention introduces FI-Head to optimize the interaction alignment between classification and localization tasks, and combines it with a lightweight RepConv-CSP module to maintain feature discrimination capability, significantly improving detection robustness in occluded and small target scenarios. YOLO performance experiments show that YOLO-FR exhibits balanced scale adaptability on the WiderFace dataset: in the Easy scenario, mAP50 reaches 94.56%, an improvement of 1.47% over the baseline model YOLOv11n and 0.86% over the state-of-the-art model YOLOv5-Face; in the Medium scenario, mAP50 is 92.75%, an improvement of 1.74% over the baseline, significantly outperforming YOLOv8n and YOLOv10n; especially in the highly challenging Hard scenario, mAP50 reaches 80.25%, an improvement of 2.15% over the baseline, and only 2.77% behind the dedicated face detection model YOLOv5-Face. Regarding parameter efficiency, the YOLO-FR model achieves a synergistic optimization of accuracy and efficiency through lightweight parameter count (1.94M) and computational complexity (6.4 GFLOPs), making it suitable for deployment on edge devices such as drones. Comparative experiments further validated that the YOLO-FR model exhibits superior overall performance compared to mainstream models such as SSD and YOLOv8n in complex scenarios.

[0078] Furthermore, flight test experiments conducted on DJI drones using the YOLO-FR-KCF fusion model demonstrated that YOLO-FR-KCF maintains excellent tracking performance even in challenging occlusion scenarios within complex environments. The system achieved a trajectory alignment accuracy of 98% and maintained an average continuous target acquisition capability of 28.5 seconds during tracking. These advancements validate the fusion model's ability to maintain target identity and spatial consistency during long-term operation, highlighting its technological maturity in demanding real-world scenarios such as urban surveillance and tactical reconnaissance.

[0079] Example 3 The present invention also provides a face tracking system, comprising: The target detection module is used to acquire real-time video stream data of the object to be tracked. The target tracking module is used to extract the facial target detection box of the object to be tracked from the initial frame of the video stream data; based on the facial target detection box of the object to be tracked, the object to be tracked is continuously tracked in each subsequent frame of the video stream data, and the number of consecutive successful tracking is determined by the number of consecutive frames that track the object to be tracked. The collaborative optimization module is used to extract a new facial target detection box of the object to be tracked from the video stream data of the current frame when the number of consecutive successful tracking exceeds a preset value; based on the new facial target detection box of the object to be tracked, the object to be tracked is continuously tracked in the real-time video stream data to obtain the facial tracking result of the object to be tracked.

[0080] The present invention also provides a computer device, including a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the steps in an embodiment of a face tracking method. Specific implementation methods can be found in the method embodiments, and will not be repeated here.

[0081] Furthermore, the present invention also provides a non-transitory computer-readable storage medium containing instructions on which a computer program is stored. For example, a memory containing instructions that can be executed by a processor of a computer device to perform the above-described method. For example, the non-transitory computer-readable storage medium may be a ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, and optical data storage device, etc. When the computer program is executed by the processor, it can implement the steps in an embodiment of a face tracking method. Specific implementation methods can be found in the method embodiments, which will not be repeated here.

[0082] Those skilled in the art will understand that embodiments of the present invention can provide methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0083] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, as well as combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0084] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0085] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0086] It should be noted that the specific embodiments described above enable those skilled in the art to more fully understand the present invention, but do not limit the present invention in any way. Therefore, although the present invention has been described in detail in this specification and embodiments, those skilled in the art should understand that modifications or equivalent substitutions can still be made to the present invention; and all technical solutions and improvements that do not depart from the spirit and scope of the present invention are covered within the protection scope of the present invention patent. No reference numerals in the claims should be construed as limiting the scope of the claims. Any simple variations or equivalent substitutions of technical solutions that can be readily obtained by those skilled in the art within the scope of the technology disclosed in the present invention are within the protection scope of the present invention.

Claims

1. A face tracking method, characterized in that, include: Acquire real-time video stream data of the object to be tracked; Extract the facial target detection box of the object to be tracked from the initial frame of the video stream data; Based on the facial target detection box of the object to be tracked, the object to be tracked is continuously tracked in the video stream data of each subsequent frame, and the number of consecutive successful tracking is determined by the number of consecutive frames in which the object to be tracked is tracked. When the number of consecutive successful trackings exceeds a preset value, a new facial target detection box of the object to be tracked is extracted from the video stream data of the current frame. Based on the new facial target detection box of the object to be tracked, the object to be tracked is continuously tracked in the real-time video stream data to obtain the facial tracking result of the object to be tracked.

2. The face tracking method according to claim 1, characterized in that, The real-time video stream data of the object to be tracked is processed by the YOLO-FR-KCF model to obtain the face tracking result of the object to be tracked; the YOLO-FR-KCF model includes a YOLO-FR detector and a KCF tracker based on the YOLOv11 architecture; Image features are extracted from the initial frame by the feature fusion network in the YOLO-FR detector. Multiple candidate detection boxes are generated from the image features under multiple different receptive fields. The detection box with the highest confidence is selected from the multiple candidate detection boxes by NMS as the facial target detection box of the object to be tracked. The KCF tracker defines a neighborhood centered on the facial target detection box of the initial frame. Within this neighborhood, the fast Fourier transform is used to determine the facial target detection box of the object to be tracked in the next frame, thereby achieving continuous tracking of the object to be tracked and recording the number of consecutive successful tracking. When the number of consecutive successful tracking exceeds a preset value, the YOLO-FR detector determines a new facial target detection box of the object to be tracked based on the video stream data of the current frame. The initialized KCF tracker then determines the facial target detection box of the object to be tracked in the next frame based on the new facial target detection box, thus obtaining the facial tracking result of the object to be tracked.

3. The face tracking method according to claim 2, characterized in that, The YOLO-FR detector is obtained by replacing the C3k2 module in the backbone network of the YOLOv11 architecture with the RepConv-CSP module and replacing the detection head with the FI-Head detection head. Extracting the facial target detection box of the object to be tracked from the initial frame of the video stream data includes: The RepConv-CSP module in the backbone network splits the initial frames of the video stream data based on the Split operation to obtain the original features of the upper branch and the original features of the lower branch. The original features of the lower branch are processed by RepConv convolution to obtain the structure reparameterized features. The original features of the upper branch and the structure reparameterized features are concatenated to obtain a multi-scale feature map. The multi-scale feature maps are fused using the neck network to obtain a fused feature map. The FI-Head detection head is used to decode the fused feature map to obtain the facial target detection box and the corresponding confidence level of the object to be tracked.

4. The face tracking method according to claim 3, characterized in that, The detection head decodes the fused feature map to obtain the facial target detection box and corresponding confidence score of the object to be tracked, including: Extract interaction features from the fused feature map; The interaction features are subjected to deformable convolution to obtain offsets and attention masks. DCNv2 is applied to the interaction features based on the offsets and attention masks to obtain localization feature maps. The interaction features are subjected to global average pooling to obtain features in compressed spatial dimensions. Dynamic weights are generated from the features in compressed spatial dimensions through a fully connected layer and a Sigmoid activation function. The dynamic weights are multiplied element-wise with the interaction features to obtain classification-optimized feature maps. The facial target detection box of the object to be tracked is determined based on the localization feature map, and the confidence level of the object to be tracked is determined based on the classification optimization feature map.

5. A face tracking method according to claim 2, characterized in that, The facial target detection bounding box of the object to be tracked in the next frame obtained by the KCF tracker includes: Centered on the facial target detection box of the object to be tracked in the initial frame, the grayscale features, color features, and texture features of the object to be tracked are determined based on image pixels; a multi-channel correlation filter is constructed from the grayscale features, color features, and texture features; For each frame of video stream data, the neighborhood of the area corresponding to the facial target detection box in the previous frame is used as the sampling area; The frequency domain calculation of the sampling region and the multi-channel correlation filter is performed by fast Fourier transform to obtain the filter response diagram; The facial target detection box of the frame is determined by the peak value of the filtered response map.

6. The face tracking method according to claim 2, characterized in that, The video stream data is acquired through a drone. After obtaining the facial tracking result of the object to be tracked, the method further includes: The horizontal error, vertical error, and detection box area of ​​the object to be tracked relative to the UAV are determined based on the parameters of the facial target detection box and the image frame size in the facial tracking results. The vertical ascent and descent command is determined based on the vertical error, and the angular velocity control command is determined based on the horizontal error; the movement of the UAV is controlled based on the vertical ascent and descent command and the angular velocity control command. When the horizontal error exceeds a preset translation error threshold, the drone is controlled to move horizontally. When the area of ​​the detection frame is outside the preset area range, the drone is controlled to move away from or closer to the object to be tracked until the area of ​​the detection frame is within the area range.

7. The face tracking method according to claim 1, characterized in that, After continuously tracking the object to be tracked in each subsequent frame of the video stream data, the following is also included: If the facial target detection box of the object to be tracked is not identified in the video stream data of the next frame, the facial target detection box of the object to be tracked is extracted again from the video stream data of the next frame.

8. A facial tracking system, characterized in that, include: The target detection module is used to acquire real-time video stream data of the object to be tracked. The target tracking module is used to extract the facial target detection box of the object to be tracked from the initial frame of the video stream data; Based on the facial target detection box of the object to be tracked, the object to be tracked is continuously tracked in the video stream data of each subsequent frame, and the number of consecutive successful tracking is determined by the number of consecutive frames in which the object to be tracked is tracked. The collaborative optimization module is used to extract a new facial target detection box of the object to be tracked from the video stream data of the current frame when the number of consecutive successful tracking exceeds a preset value. Based on the new facial target detection box of the object to be tracked, the object to be tracked is continuously tracked in the real-time video stream data to obtain the facial tracking result of the object to be tracked.

9. A computer device, comprising a memory, a processor, and a computer program stored in the memory, characterized in that, The processor executes the computer program to implement the steps of the face tracking method according to any one of claims 1 to 7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is loaded by the processor, it is able to perform the steps of the face tracking method according to any one of claims 1 to 7.