Unmanned aerial vehicle target re-identification tracking method based on feature matching
By combining YOLOv8, SIFT, ORB and color histogram feature extractor, combined with KCF tracker and FLANN matcher, the occlusion and field of view departure problems of drone targets in complex environments is solved, and stable and real-time target re-identification and tracking recovery are achieved.
Patent Information
- Application Number
- CN202510513781.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-22
- Publication Date
- 2025-08-12
AI Technical Summary
The existing drone target tracking technology has problems such as target occlusion, difficulty in identifying after leaving the field of view, poor adaptability to posture changes, large environmental interference, contradiction between computing resource requirements and real-time, lack of long-term memory mechanisms and insufficient ability to distinguish similar targets in complex environments.
The YOLOv8 detection model is used to combine SIFT, ORB and color histogram feature extractor, and KCF tracker and FLANN feature matcher, combined with a multi-factor verification mechanism and a two-stage search strategy to achieve target re-identification and tracking recovery.
It improves the stability and real-time goal tracking in complex environments, adapts to target pose changes and appearance changes, reduces the error matching rate, and achieves the ability to remember long-term and distinguish similar goals.
Smart Images

Figure CN120472340A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of unmanned aerial vehicles (UAVs), and in particular relates to a UAV target re-identification and tracking method based on feature matching. Background Art
[0002] With the rapid development of drone technology, drones are increasingly being used in military reconnaissance, disaster relief, power inspections, aerial filming, express delivery, and other fields. The tracking and identification of moving targets is a core function in many of these applications. Currently, drone target tracking technologies are primarily categorized into two main categories: vision-based tracking methods and multi-sensor fusion-based tracking methods.
[0003] Vision-based tracking methods are the mainstream technology for drone target tracking. Deep learning-based target detection algorithms (such as YOLO, SSD, and Faster R-CNN) and traditional visual tracking algorithms (such as KCF, CSRT, and MOSSE) are the most common. These technologies can achieve real-time target tracking under ideal conditions. Multi-sensor fusion tracking technologies, on the other hand, combine data from multiple sensors, such as infrared, lidar, and millimeter-wave radar, to improve tracking robustness through data fusion.
[0004] In the field of target re-identification, the main technologies used include deep learning-based feature extraction (such as Siamese networks and ReID networks) and traditional feature matching methods (such as SIFT, SURF, ORB, and other local feature matching). These technologies are mainly used in security monitoring and personnel identification, and in recent years have begun to extend to drone target tracking.
[0005] Existing UAV target tracking technology has the following defects and deficiencies in complex environments:
[0006] (1) Target occlusion problem: When the target is partially or completely occluded by other objects, existing tracking algorithms (such as KCF and CSRT) often cannot maintain stable tracking, resulting in tracking loss. This is especially true in urban environments and woodlands, where targets are frequently occluded by buildings, trees, etc., which seriously affects tracking performance.
[0007] (2) Insufficient re-identification capability after the target leaves the field of view: When the target temporarily leaves the field of view of the drone (such as passing through a tunnel, entering a building and then coming out), existing technologies are usually unable to effectively identify and resume tracking when the target reappears, resulting in mission interruption.
[0008] (3) Poor adaptability to changes in target posture and appearance: Existing tracking algorithms are not adaptable enough to changes in target posture such as rotation, scaling, inversion, and appearance changes caused by changes in lighting conditions, which can easily lead to tracking drift or loss.
[0009] (4) Environmental interference factors have a great impact: Under conditions of complex backgrounds, bad weather (such as rain, snow, fog, etc.), and lighting changes (such as strong light, shadows, night, etc.), the robustness of existing tracking technologies is generally poor.
[0010] (5) The contradiction between computing resource requirements and real-time performance: High-precision target detection and tracking algorithms (especially those based on deep learning) often require a large amount of computing resources, while the computing equipment on drones is usually limited by battery capacity, weight, and volume, making it difficult to achieve high-precision tracking while ensuring real-time performance.
[0011] (6) Lack of long-term memory mechanism: Existing tracking technologies mostly use short-term memory mechanism, which cannot preserve the long-term appearance characteristics of the target. As a result, it is impossible to re-identify the target after it has changed for a long time (such as changes in clothing or posture after passing through a tunnel).
[0012] (7) Weak ability to distinguish similar targets: When multiple similar targets appear in a scene (such as multiple vehicles of the same color, pedestrians wearing similar clothes, etc.), it is difficult for existing technologies to accurately distinguish the original tracking target from other similar targets, which easily leads to target switching errors. Summary of the Invention
[0013] In response to the above-mentioned technical deficiencies, the present invention provides a UAV target re-identification and tracking method based on feature matching, which aims to solve the problem of re-identification after the target temporarily leaves the field of view, improve the UAV's continuous tracking capability of moving targets in complex environments, and achieve long-term stable tracking of targets, especially accurate identification and tracking recovery when the target re-enters the field of view after experiencing posture changes, partial occlusion, or completely leaving the field of view.
[0014] In order to solve the above technical problems, the present invention provides the following technical solutions:
[0015] A method for re-identifying and tracking unmanned aerial vehicle targets based on feature matching includes the following steps:
[0016] S1. System initialization, including:
[0017] S11. Configure and load the target detection model, using the YOLOv8 detection model for initial target detection and candidate region generation;
[0018] S12, initialize the feature extractor, using SIFT feature extractor, ORB feature extractor and color histogram feature extractor;
[0019] S13, initialize the feature matcher, using the SIFT feature matcher based on FLANN and the ORB feature matcher based on Hamming distance;
[0020] S14, initialize the tracker and use the KCF tracker;
[0021] S15. Create a target feature database storage directory for storing target feature information;
[0022] S2. Target selection and feature extraction, including:
[0023] S21, detecting all targets in the video frame using the YOLOv8 target detection algorithm, and displaying the detection results on the screen;
[0024] S22. The user selects the target to be tracked by clicking, and the system records the bounding box coordinates of the target;
[0025] S23, extracting the target image area from the current video frame according to the bounding box coordinates;
[0026] S24, performing feature extraction on the extracted target image area:
[0027] S25, saving the extracted target image and its feature information to a local memory;
[0028] S26, initialize the KCF tracker, pass the target's bounding box coordinates into the tracker, and start real-time tracking;
[0029] S3, target tracking process, including:
[0030] S31, for each frame of video image, use KCF tracker to update the target position;
[0031] S32, determining the tracking status;
[0032] S4, target re-identification stage, when target tracking fails, the system enters the target re-identification stage;
[0033] S5. Tracking recovery process: When a matching target is found in the re-identification stage, the tracking recovery process is executed.
[0034] Preferably, the feature extraction of the extracted target image area in step S24 specifically includes:
[0035] S241, extract SIFT features: grayscale the target image and use the SIFT algorithm to extract key points and descriptors;
[0036] S242, extract ORB features: grayscale the target image and use the ORB algorithm to extract key points and descriptors;
[0037] S243, extracting color histogram features: converting the target image into the HSV color space, and calculating the joint histogram of the H channel and the S channel;
[0038] S244. Record the size ratio information of the target: calculate the target aspect ratio.
[0039] Preferably, the specific steps for determining the tracking status in step S32 are as follows: if the tracking is successful (success is True), a tracking frame is drawn on the video frame and the "Tracking" status is marked; if the tracking fails (success is False) or the tracking frame exceeds the screen range, the tracking status is set to failure and the target re-identification stage is entered.
[0040] Preferably, the specific steps of step S4 are as follows:
[0041] S41, displaying the saved target image in the upper right corner of the video frame, and marking the "Waiting for target" status on the screen;
[0042] S42, performing a target re-identification and matching process every N frames;
[0043] S43, multiple verification matching;
[0044] S44, calculation of comprehensive score;
[0045] S45, if the comprehensive score of the best match exceeds the threshold T5, it is considered that the target has been found and the re-tracking process is executed;
[0046] S46. If no matching target is found in the candidate region generated by YOLOv8, a sliding window search is performed within the limited image area.
[0047] Preferably, the step S42 specifically includes: S421, using the YOLOv8 detector to generate a candidate area; S422, performing feature extraction and multiple verification matching on each candidate area; the S43 includes the following steps: S431, geometric verification: calculating the size ratio difference between the candidate area and the original target, if the difference exceeds the threshold T1, the candidate area is excluded; S432, color verification: if the color similarity is lower than the threshold T2, the candidate area is excluded; S433, SIFT feature matching: requiring the number of valid matching points to be no less than the threshold T3; S434, spatial consistency verification: requiring the number of geometrically consistent internal points to be no less than the threshold T4; the specific steps of S46 are as follows: S461, determining the search range to be twice the original size of the target; S462, the sliding step size is 1 / 2 of the target size; S463, performing feature matching on each sliding window position; S464, if a position is found where the matching score exceeds the threshold, it is considered that the target has been found.
[0048] Preferably, in step S42, N=5 for every N frames, in step S431, threshold T1=0.5, in step S432, threshold T2=0.4, in step S433, threshold T3=5% or 10 of the number of target feature points, whichever is larger, in step S434, threshold T4=30% or 4 of the number of valid matching points, whichever is smaller, and in step S435, threshold T5=0.20.
[0049] Preferably, the specific steps of step S5 are as follows:
[0050] S51, reinitialize the KCF tracker using the matched target area;
[0051] S52, setting the tracking status to success, drawing the re-identified target box on the video frame and marking it as "Re-identified";
[0052] S53: Resume the normal tracking process and continue the target tracking process.
[0053] Preferably, user interaction and control functions are also included, as follows:
[0054] Debug mode switch: Users can press the 'd' key to switch to debug mode. In debug mode, the system will display more technical details of the matching process;
[0055] Manual reset function: When the system has an incorrect match, the user can manually reset the tracking status by pressing the 'r' key;
[0056] Exit the program: Users can exit the program by pressing the 'q' key.
[0057] The user-friendly interactive interface of the present invention enables users to intuitively understand the system status by displaying the current target image to be identified on the screen; the manual intervention mechanism provides a manual reset function when the system has an incorrect match to ensure system reliability.
[0058] Compared with the prior art, the present invention has the following beneficial effects:
[0059] First, multi-feature fusion: The present invention combines SIFT features, ORB features, and color histogram features for target representation, improving the ability to adapt to changes in target appearance;
[0060] Second, multiple verification mechanisms: This uses a multiple verification mechanism that includes geometric verification, color verification, feature point matching, and spatial consistency verification, significantly reducing the false matching rate.
[0061] Third, a two-stage search strategy: First, use the YOLOv8 detection results as candidate regions for efficient search, and then use a limited range sliding window for supplementary search, which improves search coverage while ensuring real-time performance.
[0062] Fourth, adaptive threshold: dynamically adjust the minimum number of matching points required for matching according to the number of target feature points to adapt to targets of different complexities. BRIEF DESCRIPTION OF THE DRAWINGS
[0063] Figure 1 This is a diagram of the overall system architecture of the present invention;
[0064] Figure 2 Schematic diagram of the target re-identification and tracking method of the present invention;
[0065] Figure 3 This is a flow chart of the feature extraction and multiple verification matching algorithm of the present invention. DETAILED DESCRIPTION
[0066] The specific embodiments of the present invention will be described in further detail below with reference to the accompanying drawings.
[0067] Example 1
[0068] See also Figure 1-3 A feature matching-based UAV target re-identification and tracking method is used to solve the problem of target re-identification and tracking recovery when the UAV tracks a moving target in a complex environment and the target re-enters the field of view after temporarily leaving the field of view. In particular, it solves the problem of accurate recognition and tracking recovery when the target posture changes or is partially occluded.
[0069] The following steps are involved:
[0070] 1. System initialization
[0071] ① Configure and load the target detection model. This paper uses the YOLOv8 detection model for initial target detection and candidate region generation;
[0072] ② Initialize feature extractors, including SIFT feature extractor, ORB feature extractor, and color histogram feature extractor;
[0073] ③ Initialize feature matchers, including SIFT feature matcher based on FLANN and ORB feature matcher based on Hamming distance;
[0074] ④ Initialize the tracker. The present invention adopts KCF (Kernelized Correlation Filter) tracker;
[0075] ⑤ Create a target feature database storage directory to save the target feature information.
[0076] 2. Target Selection and Feature Extraction
[0077] ① Detect all targets in the video frame using the YOLOv8 target detection algorithm and display the detection results on the screen;
[0078] ② The user selects the target to be tracked by clicking, and the system records the bounding box coordinates of the target;
[0079] ③ Extract the target image area from the current video frame according to the bounding box coordinates;
[0080] ④ Perform feature extraction on the extracted target image area:
[0081] Extract SIFT features: grayscale the target image and use the SIFT algorithm to extract key points and descriptors;
[0082] Extract ORB features: grayscale the target image and use the ORB algorithm to extract key points and descriptors;
[0083] Extract color histogram features: convert the target image to HSV color space and calculate the joint histogram of H channel and S channel;
[0084] Record the target's size ratio information: calculate the target's aspect ratio;
[0085] ⑤ Save the extracted target image and its feature information to the local memory;
[0086] ⑥ Initialize the KCF tracker, pass the target's bounding box coordinates into the tracker, and start real-time tracking.
[0087] 3. Target Tracking Process
[0088] ① For each frame of video image, use the KCF tracker to update the target position:
[0089] ② Determine the tracking status:
[0090] If tracking is successful (success is True), a tracking box is drawn on the video frame and the "Tracking" status is marked;
[0091] If tracking fails (success is False) or the tracking box exceeds the screen range, the tracking status is set to failure and the target re-identification stage is entered.
[0092] 4. Target Re-Identification Stage
[0093] When target tracking fails, the system enters the target re-identification phase. The specific steps are as follows:
[0094] ① Display the saved target image in the upper right corner of the video frame and mark the "Waiting for target" status on the screen;
[0095] ② Execute the target re-identification matching process every N frames (N=5 in the present invention):
[0096] Generate candidate regions using the YOLOv8 detector;
[0097] Perform feature extraction and multiple verification matching on each candidate region;
[0098] ③Multiple verification matching includes the following steps:
[0099] Geometric verification: Calculate the size ratio difference between the candidate region and the original target. If the difference exceeds the threshold T1 (T1 = 0.5 in this invention), the candidate region is excluded.
[0100] Color verification: If the color similarity is lower than the threshold T2 (T2=0.4 in this invention), the candidate region is excluded;
[0101] SIFT feature matching: The number of valid matching points is required to be no less than the threshold T3 (T3 in the present invention = 5% of the number of target feature points or 10, whichever is greater);
[0102] Spatial consistency verification: The number of geometrically consistent inliers is required to be no less than a threshold T4 (T4 in the present invention = 30% of the number of valid matching points or 4, whichever is smaller);
[0103] ④ Calculation of comprehensive scores;
[0104] ⑤ If the comprehensive score of the best match exceeds the threshold T5 (T5=0.20 in the present invention), it is considered that the target has been found and the re-tracking process is executed;
[0105] ⑥If no matching target is found in the candidate region generated by YOLOv8, a sliding window search is performed within a limited image area:
[0106] Determine the search range to be twice the original size of the target;
[0107] The sliding step size is 1 / 2 of the target size;
[0108] Perform feature matching for each sliding window position;
[0109] If a location is found with a matching score exceeding a threshold, the target is considered to have been found.
[0110] 5. Tracking the recovery process
[0111] When a matching target is found in the re-identification phase, the tracking recovery process is executed:
[0112] ① Reinitialize the KCF tracker using the matched target area:
[0113] ② Set the tracking status to success, draw the re-identified target box on the video frame and mark it as "Re-identified";
[0114] ③Resume normal tracking process and continue the target tracking process.
[0115] 6. User Interaction and Control
[0116] The present invention also provides the following user interaction and control functions:
[0117] ① Debug mode switch: Users can switch to debug mode by pressing the 'd' key. In debug mode, the system will display more technical details of the matching process;
[0118] ② Manual reset function: When the system has an incorrect match, the user can manually reset the tracking status by pressing the 'r' button;
[0119] ③Exit the program: Users can exit the program by pressing the 'q' key.
[0120] Technical features and advantages
[0121] ① Multi-feature fusion: This invention combines SIFT features, ORB features and color histogram features to represent the target, improving the adaptability to changes in target appearance;
[0122] ②Multiple verification mechanism: The multiple verification mechanism of geometry verification, color verification, feature point matching and spatial consistency verification significantly reduces the false matching rate;
[0123] ③ Two-stage search strategy: First, use YOLOv8 detection results as candidate regions for efficient search, and then use a limited range sliding window for supplementary search, which improves search coverage while ensuring real-time performance;
[0124] ④ Adaptive threshold: Dynamically adjust the minimum number of matching points required for matching according to the number of target feature points to adapt to targets of different complexity;
[0125] ⑤ User-friendly interactive interface: By displaying the target image to be identified on the screen, users can intuitively understand the system status;
[0126] ⑥ Manual intervention mechanism: When the system has an incorrect match, a manual reset function is provided to ensure system reliability.
[0127] Example 2
[0128] Lightweight implementation based on embedded computing platform
[0129] This embodiment is suitable for small UAV platforms and adopts lightweight computing resource configuration.
[0130] System Configuration:
[0131] Drone Platform 1: Equipped with Jetson Nano computing module
[0132] Camera module 2: 720p / 30fps RGB camera
[0133] Video Processing Unit 3: Video processing framework based on OpenCV
[0134] Target detection module 4: YOLOv8n lightweight version
[0135] Feature extraction module 5: SIFT feature extractor (up to 300 feature points) and color histogram feature extractor
[0136] Target Tracking Module 6: KCF Tracker
[0137] Re-ID matching module 7: FLANN-based feature matching algorithm
[0138] Storage module 8: local SD card storage
[0139] Human-computer interaction interface 9: Ground station control software
[0140] The workflow is as follows:
[0141] 1. System initialization phase (A):
[0142] o When the drone starts, load the YOLOv8n lightweight target detection model
[0143] Initialize the SIFT feature extractor and limit the maximum number of feature points to 300 to reduce the computational burden Initialize the KCF tracker and feature matcher
[0144] oCreate a target feature database storage directory in the SD card
[0145] 2. Target selection and feature extraction stage (B):
[0146] o Through the ground station control software, the operator clicks on the target to be tracked in the live video stream
[0147] oThe system extracts the image area of the selected target from the current video frame
[0148] oExtract features from the target image area
[0149] o Extract SIFT features
[0150] oSave the target image and its features to the SD card
[0151] oInitialize KCF tracker and start real-time tracking
[0152] 3. Target tracking stage (C):
[0153] For each frame of video, update the target position using the KCF tracker
[0154] oTransmit tracking results to ground station for display
[0155] 4. Target loss judgment (D):
[0156] If tracking fails (success is False) or the tracking box exceeds the screen range, the target re-identification stage is entered
[0157] 5. Target re-identification stage (E):
[0158] oIn order to save computing resources, the re-identification process is performed every 5 frames
[0159] oFirst use the YOLOv8n detector to generate candidate regions
[0160] o Perform lightweight multi-verification matching on each candidate region:
[0161] Geometric verification: Check the size ratio difference between the candidate region and the original target
[0162] Color verification: using downsampled histograms (15x16 bins) to improve efficiency
[0163] SIFT feature matching: Using FLANN matching algorithm to speed up the matching process
[0164] When calculating the composite score, increase the weight of color features and reduce the weight of computationally intensive feature point matching:
[0165] o score=feature_score*0.4+color_sim*0.5+ratio_sim*0.1
[0166] o Reduce the verification threshold to 0.18 to accommodate the reduced accuracy brought by lightweight feature extraction
[0167] 6. Tracking recovery phase (F):
[0168] After finding a matching target, reinitialize the KCF tracker
[0169] oResume normal tracking process
[0170] The optimization measures of this embodiment enable the system to run in real time on a small drone with limited computing resources while maintaining good re-identification performance.
[0171] Example 3
[0172] Enhanced implementation suitable for military reconnaissance
[0173] This embodiment is specially optimized for military reconnaissance applications, enhancing the reliability and security of the system in harsh environments.
[0174] Based on Example 2, the following functions are added:
[0175] 1. Adaptation to low-light environments:
[0176] oAdd infrared camera module to achieve visible light and infrared image fusion
[0177] oOptimization of feature extraction algorithm for infrared images
[0178] o Automatic switching mechanism for day and night modes
[0179] 2. Target classification enhancement:
[0180] o Dedicated detection models for military targets (vehicles, personnel, facilities, etc.)
[0181] oTarget threat level assessment mechanism
[0182] oTarget behavior analysis function
[0183] 3. Communication security mechanism:
[0184] oData encryption transmission
[0185] oDisconnected autonomous working capability
[0186] oCompressed feature transmission in low-bandwidth environments
[0187] 4. Anti-interference measures:
[0188] oFiltering algorithm for optical interference
[0189] oElectromagnetic interference protection mechanism
[0190] oRedundant sensor design.
[0191] The special optimization of this embodiment enables the system to demonstrate excellent performance and reliability in challenging environments such as military reconnaissance.
[0192] The detailed descriptions of Examples 2 and 3 above demonstrate the implementation of the present invention in different resource configurations and application scenarios. The technical solution of the present invention has strong adaptability and scalability, and can be flexibly configured and optimized according to actual needs.
[0193] The present invention addresses the defects and shortcomings of the prior art and achieves the following significant advantages through innovative technical solutions:
[0194] (1) Solve the problem of re-identification after the target is occluded and leaves the field of view
[0195] This invention uses multi-feature fusion technology to combine SIFT, ORB, and color histogram features for target characterization, creating a multi-dimensional feature description of the target. When a target temporarily leaves the drone's field of view and then reappears, the system can accurately identify the target and resume tracking using a multi-feature matching algorithm, even in the presence of posture changes and partial occlusion. This overcomes the key drawback of existing technologies, which prevents re-identification of targets after they leave the field of view.
[0196] (2) Improve the ability to adapt to changes in target posture and appearance
[0197] The feature matching mechanism of this invention utilizes the Scale-Invariant Feature Transform (SIFT) and the Oriented Fast and Rotated BRIEF (ORB) features, both of which are highly invariant to rotation, scaling, and perspective changes. Through feature point matching and spatial consistency verification, the system can adapt to changes in the target's posture, such as rotation, inversion, and scaling. Furthermore, histogram matching in the HSV color space improves the system's adaptability to lighting variations. This addresses the existing technology's poor adaptability to changes in the target's posture and appearance.
[0198] (3) Reduce the impact of environmental interference factors
[0199] The present invention employs a multi-layered verification mechanism, including geometric verification, color verification, feature point matching, and spatial consistency verification, forming a multi-level screening mechanism. This mechanism effectively filters out background interference and environmental noise, significantly reducing the false matching rate. The system maintains high recognition accuracy, particularly under complex backgrounds and varying lighting conditions, addressing the poor robustness of existing technologies in complex environments.
[0200] (4) Balancing computing resource requirements and real-time performance
[0201] The present invention adopts a two-stage search strategy. First, the efficient YOLOv8 detection results are used as candidate regions for matching. Only when necessary, the more computationally intensive sliding window search is performed, and the search range is limited. In addition, the system performs the re-identification and matching process every N frames (N=5) instead of every frame, which greatly reduces the consumption of computing resources. This strategy significantly improves the real-time performance of the system while ensuring recognition accuracy, resolving the contradiction between computing resource requirements and real-time performance in the existing technology.
[0202] (5) Establishing a long-term memory mechanism
[0203] This invention saves the target's image and feature information to local memory, establishing a "long-term memory" of the target. Even after the target has been out of view for an extended period, the system can still use this stored feature information to identify the target. This addresses the lack of a long-term memory mechanism in existing tracking technologies, enabling the system to handle long-term missions.
[0204] (6) Enhance the ability to distinguish similar targets
[0205] By combining the spatial distribution characteristics of SIFT feature points with color histogram features, the present invention accurately captures the unique characteristics of a target. The system uses the RANSAC algorithm to estimate the homography matrix, verify the geometric consistency of feature points, and effectively distinguish similar targets. This addresses the existing problem of weak ability to distinguish similar targets and reduces target switching errors.
[0206] (7) Optimization of human-computer interaction and improvement of system reliability
[0207] This invention features a user-friendly interactive interface that displays the current target image to be identified, allowing users to intuitively understand the system status. Furthermore, the system provides a manual reset function. If an incorrect match occurs, the user can manually reset the tracking status by pressing the 'r' key, ensuring system reliability. This improves the system's usability and reliability in practical applications.
[0208] (8) Wide range of application scenarios and strong practicality
[0209] This invention is not only applicable to UAV platforms but can also be extended to other mobile devices, such as robots and intelligent vehicles. The system enables continuous tracking of moving targets in complex environments, particularly in military reconnaissance, disaster relief, security monitoring, and film and television production. Compared to traditional tracking methods, this invention demonstrates greater robustness and adaptability in complex environments, offering significant practical value.
[0210] Although specific embodiments of the present invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and variations can be made to these embodiments without departing from the principles and spirit of the present invention, and the scope of the present invention is defined by the appended claims and their equivalents.
Claims
1. A method for re-identifying and tracking unmanned aerial vehicle targets based on feature matching, characterized by: The following steps are involved: S1. System initialization, including: S11. Configure and load the target detection model, using the YOLOv8 detection model for initial target detection and candidate region generation; S12, initialize the feature extractor, using SIFT feature extractor, ORB feature extractor and color histogram feature extractor; S13, initialize the feature matcher, using the SIFT feature matcher based on FLANN and the ORB feature matcher based on Hamming distance; S14, initialize the tracker and use the KCF tracker; S15. Create a target feature database storage directory for storing target feature information; S2. Target selection and feature extraction, including: S21, detecting all targets in the video frame using the YOLOv8 target detection algorithm, and displaying the detection results on the screen; S22. The user selects the target to be tracked by clicking, and the system records the bounding box coordinates of the target; S23, extracting the target image area from the current video frame according to the bounding box coordinates; S24, performing feature extraction on the extracted target image area: S25, saving the extracted target image and its feature information to a local memory; S26, initialize the KCF tracker, pass the target's bounding box coordinates into the tracker, and start real-time tracking; S3, target tracking process, including: S31, for each frame of video image, use KCF tracker to update the target position; S32, determining the tracking status; S4, target re-identification stage, when target tracking fails, the system enters the target re-identification stage; S5. Tracking recovery process: When a matching target is found in the re-identification stage, the tracking recovery process is executed.
2. The method for re-identifying and tracking unmanned aerial vehicle targets based on feature matching according to claim 1, characterized in that: The feature extraction of the extracted target image area in step S24 specifically includes: S241, extract SIFT features: grayscale the target image and use the SIFT algorithm to extract key points and descriptors; S242, extract ORB features: grayscale the target image and use the ORB algorithm to extract key points and descriptors; S243, extracting color histogram features: converting the target image into the HSV color space, and calculating the joint histogram of the H channel and the S channel; S244. Record the size ratio information of the target: calculate the target aspect ratio.
3. The method for re-identifying and tracking unmanned aerial vehicle targets based on feature matching according to claim 1, characterized in that: The specific steps for determining the tracking status in step S32 are as follows: if the tracking is successful (success is True), a tracking box is drawn on the video frame and the "Tracking" status is marked; if the tracking fails (success is False) or the tracking box exceeds the screen range, the tracking status is set to failure and the target re-identification stage is entered.
4. The method for re-identifying and tracking unmanned aerial vehicle targets based on feature matching according to claim 1, wherein: The specific steps of step S4 are as follows: S41, displaying the saved target image in the upper right corner of the video frame, and marking the "Waiting for target" status on the screen; S42, performing a target re-identification and matching process every N frames; S43, multiple verification matching; S44, calculation of comprehensive score; S45, if the comprehensive score of the best match exceeds the threshold T5, it is considered that the target has been found and the re-tracking process is executed; S46. If no matching target is found in the candidate region generated by YOLOv8, a sliding window search is performed within the limited image area.
5. The method for re-identifying and tracking unmanned aerial vehicle targets based on feature matching according to claim 4, characterized in that: The step S42 specifically includes: S421, using the YOLOv8 detector to generate candidate areas; S422, performing feature extraction and multiple verification matching on each candidate area; the S43 includes the following steps: S431, geometric verification: calculating the size ratio difference between the candidate area and the original target, if the difference exceeds the threshold T1, the candidate area is excluded; S432, color verification: if the color similarity is lower than the threshold T2, the candidate area is excluded; S433, SIFT feature matching: requiring the number of valid matching points to be no less than the threshold T3; S434, spatial consistency verification: requiring the number of geometrically consistent internal points to be no less than the threshold T4; the specific steps of S46 are as follows: S461, determining the search range to be twice the original size of the target; S462, the sliding step size is 1 / 2 of the target size; S463, performing feature matching on each sliding window position; S464, if a position is found where the matching score exceeds the threshold, it is considered that the target has been found.
6. The method for re-identifying and tracking unmanned aerial vehicle targets based on feature matching according to claim 4, characterized in that: In the step S42, N=5 for every N frames, in the step S431, the threshold T1=0.5, in the step S432, the threshold T2=0.4, in the step S433, the threshold T3=5% of the number of target feature points or 10, whichever is larger, in the step S434, the threshold T4=30% of the number of valid matching points or 4, whichever is smaller, and in the step S435, the threshold T5=0.
20.
7. The method for re-identifying and tracking unmanned aerial vehicle targets based on feature matching according to claim 1, characterized in that: The specific steps of step S5 are as follows: S51, reinitialize the KCF tracker using the matched target area; S52, setting the tracking status to success, drawing the re-identified target box on the video frame and marking it as "Re-identified"; S53: Resume the normal tracking process and continue the target tracking process.
8. The method for re-identifying and tracking unmanned aerial vehicle targets based on feature matching according to claim 1, characterized in that: It also includes user interaction and control functions, as follows: Debug mode switch: Users can press the 'd' key to switch to debug mode. In debug mode, the system will display more technical details of the matching process; Manual reset function: When the system has an incorrect match, the user can manually reset the tracking status by pressing the 'r' key; Exit the program: Users can exit the program by pressing the 'q' key.