A stable tracking method for ground targets under complex background
Through multi-template design and combination of SiamRPN, Reid network and improved KCF algorithm, the difficulty of tracking the visual guidance tracker in complex backgrounds is solved, stable tracking of high-speed aircraft in the front-end and mid-stage stages is achieved, and tracking accuracy and speed, avoiding dependence on radar navigation.
Patent Information
- Application Number
- CN202410813394.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-24
- Publication Date
- 2024-08-23
- Estimated Expiration
- 2044-06-24
AI Technical Summary
Existing visual guidance trackers are difficult to stably track ground targets under complex backgrounds and occlusions, especially in the front and middle flight stages of high-speed aircraft. They rely on radar navigation, and the algorithm speed and accuracy are not ideal.
Using a multi-template design, combined with the SiamRPN network, Reid network and improved KCF algorithm, different template images are used for tracking and matching at different flight stages. The search area matching is performed through the SiamRPN network. The Reid network obtains the feature map, determines the best tracking position, and The HOG feature and kernel correlation filter are used in the improved KCF algorithm for target detection and lost target detection.
It achieves stable tracking of high-speed aircraft under complex backgrounds and occlusions, can be independent of radar guidance, improves tracking accuracy and speed, and is suitable for a variety of target detection tasks.
Smart Images

Figure CN118379331B
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of target tracking, and in particular to a method for stable tracking of ground targets under complex backgrounds. Background Art
[0002] The visual guidance tracker can detect and capture the target, and guide the high-speed aircraft to fly towards the target. With the rapid development of electronic technology, navigation methods such as radar tracking are subject to certain restrictions. Visual tracking navigation equipment has been widely used in foreign navigation systems. The technical core of the visual guidance tracker is image navigation, which is a commonly used navigation method in precise navigation systems. The image navigation system uses the camera installed on the guidance tracker of the aircraft to capture ground information in real time, and performs real-time analysis and processing on the obtained image sequence to obtain the position of the tracking target in the image, thereby determining the position information of the target in the actual scene. The motion trajectory of the aircraft is adjusted according to the real-time position of the target to achieve target tracking, and finally guide the aircraft to the target position.
[0003] Existing image tracking technologies for visual guidance trackers include, but are not limited to, centroid tracking and correlation filter tracking algorithms. However, they have certain limitations in navigation, including two points. First, they can only be used in the terminal flight phase. Since the target appears in the field of view of the guidance tracker in the terminal flight phase, the target template for image tracking needs to be passed to the tracking algorithm in the terminal flight phase before tracking the target can begin. In the front flight phase and the mid-flight phase, radar navigation technology is still needed to guide the high-speed aircraft in the direction of the target. Second, the tracking capability decreases under interference from complex backgrounds, occlusions, and target deformation. The existing technology relies on artificial feature extractors in traditional image processing methods. The feature extraction patterns for targets and search areas are too fixed, and the features are relatively one-sided. It is difficult to flexibly cope with complex situations such as complex backgrounds and target deformations, and it is difficult to cope with occlusions.
[0004] Existing implementation solutions include tracking based on deep learning technology. Some existing technologies use neural networks such as goturn and siamanse for tracking inference calculations, which can solve interference problems such as complex backgrounds, occlusions and deformations. However, there are still problems with the algorithm speed and accuracy being less than ideal. Summary of the invention
[0005] The purpose of the present invention is to provide a method for stable tracking of ground targets under complex backgrounds to solve the problems raised in the above background technology.
[0006] In order to solve the above technical problems, the present invention provides a method for stable tracking of ground targets under complex backgrounds, comprising the following steps:
[0007] S1. Route detection The UAV flies along the flight route of the high-speed aircraft and takes different scene images at different flight stages;
[0008] S2, manually set the best landmark positions on the scene images at different stages, and send the images and landmark position information to the visual guidance tracker as tracking templates for different flight stages;
[0009] S3, at different flight stages, retrieve the corresponding template image, use the pre-set landmark position in the template image as the matching target of the tracking algorithm, and guide the aircraft to fly toward the current landmark;
[0010] S4. In the acquired image, the SiamRPN network is used to track and match different search areas to obtain the best tracking position;
[0011] S5, obtain the feature map of the template image through the Reid network, and also obtain the corresponding feature map of the search area in S4 through the Reid network to obtain the location of the search area with the highest similarity;
[0012] S6, judging whether it is the final tracking position, if the best tracking position obtained in S4 is the same as the position of the search area with the highest similarity obtained in S5, then the position is recorded as the final tracking position, otherwise, S4 and S5 are repeated in the next frame image until the final tracking position is obtained, and the matching tracking task is completed;
[0013] S7: Tracking is performed using the improved KCF algorithm. The tracking target is set to the best tracking position obtained in S6. When the improved KCF tracking confidence score is higher than the set threshold, it is determined that the improved KCF has lost the target. S4, S5 and S6 are repeated to obtain the final tracking position again. Then, the improved KCF algorithm is used for tracking again.
[0014] As a further improvement of the technical solution, the specific steps of S4 are:
[0015] Use a camera to obtain video and extract images, select the center point and five search areas (up, down, left, and right), and perform SiamRPN network tracking and matching on the template image with the five search areas respectively. Obtain the best matching position coordinates and matching confidence scores for each of the five positions, select the position with the largest confidence as the position that best matches the template image, and record it as the best tracking position obtained by the SiamRPN network.
[0016] As a further improvement of the technical solution, the specific steps of S5 are:
[0017] The template image is passed through the Reid network to obtain the feature map of the template image, and the search area images of the five positions in S4 are also passed through the Reid network to obtain the corresponding feature maps. The cosine similarity of the template feature map and the feature maps of the five search areas is calculated respectively to obtain the location of the search area with the highest similarity.
[0018] As a further improvement of the technical solution, the specific steps of S7 include:
[0019] S71, image preprocessing: performing noise removal and image enhancement on the final tracking position in each frame of the image;
[0020] S72, collecting samples: constructing a circulant matrix;
[0021] S73, feature extraction: extracting HOG features from the template image and the current frame image;
[0022] S74, training classifier: training the kernel correlation filter using the features and labels of the training samples;
[0023] S75, target detection: calculate the correlation between the feature and the filter to obtain a response map, and the position with the highest response value on the response map is the target position in the current frame;
[0024] S76, updating the model: in the new frame, using the area near the position predicted in the previous frame as a new sample to update the filter, and selecting a new scale;
[0025] S77, lost target detection: detect whether the target is lost and choose whether to switch to S4, S5 and S6.
[0026] As a further improvement of the present technical solution, in S71, Gaussian filtering is used to remove noise and sharpening filtering is used to enhance the image.
[0027] As a further improvement of the technical solution, the initial target frame is sampled once in S72, the initial target frame is the final tracking position in S6, and other target samples are generated by cyclic shift. Assume that the basic sample is , move the basic sample vertically by m pixels and then horizontally by n pixels, and the resulting sample is , then the training sample rectangle X is:
[0028]
[0029] Each row is a training sample, and other rows are generated by cyclic shift of this row.
[0030] As a further improvement of the technical solution, the specific steps of S74 are:
[0031] Assume that the training sample set is ,in, is the initial sample, x is given by After cyclic shift, the sample label set is , n is the set sample number, and the linear ridge regression of the objective function is:
[0032]
[0033] in, is the objective function, satisfying , is the weight coefficient, is the predicted value, is a regularization parameter to prevent overfitting. is the regular term, N represents the number of samples;
[0034] The kernel function is introduced to project the samples into the high-dimensional feature space. It is linearly separable in high-dimensional feature space, that is,
[0035]
[0036] in, is the linear combination coefficient, is a nonlinear mapping function;
[0037] The closed-form solution of ridge regression is:
[0038]
[0039] Among them, I represents the identity matrix, K represents the kernel correlation matrix;
[0040] Performing discrete Fourier transform gives:
[0041]
[0042] in, , They are , The Fourier transform of is the Fourier transform of the first row of matrix K;
[0043] The kernel function introduced is a Gaussian function, and the specific formula is:
[0044]
[0045] in, is the Gaussian kernel function, is the bandwidth factor, represents the inverse Fourier transform, is the Fourier transform of the training sample feature x, for The complex conjugate of To detect the Fourier transform of sample feature z, Represents dot product.
[0046] As a further improvement of the technical solution, the specific steps of S75 are:
[0047] Construct the kernel function matrix of test samples and training samples ,but , is the kernel cross-correlation vector of the training sample feature x and the detection sample z, is a circulant matrix formed by circulant operations on vectors;
[0048] Calculate the total test sample response consisting of the test sample characteristic z-shift:
[0049]
[0050] in, For the matrix The Fourier transform of the first row of is the output response.
[0051] As a further improvement of the technical solution, the specific steps of updating the target scale in S76 are:
[0052] After obtaining the target response position, use the DSST scale filter to obtain Q candidate targets of different scales with the current center position as the center point, calculate the maximum response value, and update the current scale with the corresponding scale at this time. The principle of selecting the target sample scale is:
[0053]
[0054] Among them, P and R are the width and height of the target area respectively. is the scale factor, is the scale quantity.
[0055] As a further improvement of the present technical solution, the difference between the response confidences of adjacent frames is used as the tracking confidence score in S77.
[0056] Compared with the prior art, the present invention has the following beneficial effects: in the method for stable tracking of ground targets under complex background, different templates are used for matching in different flight stages, and corresponding template images are retrieved in different flight stages. The template images used in the front and middle flight stages are used to guide the high-speed aircraft to fly toward the target area, and the template images are used in the terminal flight stage to guide the high-speed aircraft to track and reach the target. The high-speed aircraft can be independently guided without relying on radar and infrared during the entire flight stage. Through the unique multi-template design and the combined use of SiamRPN network, Reid network and improved KCF algorithm, stable and accurate tracking can still be achieved under interference such as complex background, occlusion and target deformation. BRIEF DESCRIPTION OF THE DRAWINGS
[0057] Figure 1 It is the overall flow chart of the present invention;
[0058] Figure 2 This is a flow chart of the improved KCF algorithm in the present invention. DETAILED DESCRIPTION
[0059] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0060] like Figure 1-Figure 2 As shown, this embodiment provides a method for stable tracking of ground targets under complex backgrounds, including the following steps:
[0061] S1. Route detection The UAV flies along the flight route of the high-speed aircraft and takes different scene images at different flight stages;
[0062] S2, manually set the best landmark positions on the scene images at different stages, and send the images and landmark position information to the visual guidance tracker as tracking templates for different flight stages;
[0063] S3. In different flight stages, the corresponding template image is retrieved, and the pre-set landmark position in the template image is used as the matching target of the tracking algorithm to guide the aircraft to fly toward the current landmark. The aircraft will gradually approach the final target by flying toward the landmark. In the terminal flight stage, the template image is the image where the final target is located, and the aircraft has already arrived at the target. The camera has captured the picture containing the target. At this time, the target in the template image is used as the algorithm tracking matching target to guide the aircraft toward. In this way, different image templates are used at different stages, but the same image tracking algorithm is used to guide the high-speed aircraft from the launch site to the target and reach the target, so that the assistance of radar guidance is no longer needed to help the high-speed aircraft reach the correct target. Finally, the target is reached only by the image tracking algorithm at the terminal flight.
[0064] S4. In the acquired image, the SiamRPN network is used to track and match different search areas to obtain the best tracking position. The SiamRPN network has a high accuracy in video target tracking and can effectively deal with situations such as target occlusion and rapid movement. At the same time, the deep learning method is adopted, so that the SiamRPN network can adapt to a variety of different target detection tasks, with good detection effect and good flexibility, allowing it to be used in combination with other network structures or tracking methods, and can be flexibly adjusted according to specific needs;
[0065] S5, obtain the feature map of the template image through the Reid network, and also pass the search area in S4 through the Reid network to obtain the corresponding feature map, and get the location of the search area with the highest similarity. The Reid network can be used in combination with the SiamRPN network to establish a joint decision-making mechanism to ensure accurate tracking of the target, and can still stably and correctly track the target under interference such as complex background, background changes, target deformation, and target occlusion;
[0066] S6, judging whether it is the final tracking position, if the best tracking position obtained in S4 is the same as the position of the search area with the highest similarity obtained in S5, then the position is recorded as the final tracking position, otherwise, S4 and S5 are repeated in the next frame image until the final tracking position is obtained, and the matching tracking task is completed;
[0067] S7. Tracking is performed using the improved KCF algorithm. The tracking target is set to the best tracking position obtained in S6. When the improved KCF tracking confidence score is higher than the set threshold, usually when the target is blocked or suddenly accelerates or decelerates to leave the local search area of the improved KCF algorithm, the improved KCF algorithm is likely to lose the target. It is judged that the improved KCF has lost the target. S4, S5 and S6 are repeated to obtain the final tracking position again, and then the improved KCF algorithm is used for tracking again.
[0068] The specific steps of S4 are:
[0069] Use a camera to obtain video and extract each image. Select the center point and five search areas: up, down, left, and right. Perform SiamRPN network tracking and matching on the template image and the five search areas respectively. Obtain the best matching position coordinates and matching confidence scores for each of the five positions. Select the position with the largest confidence as the position that best matches the template image and record it as the best tracking position obtained by the SiamRPN network. Preliminarily determine the target position to facilitate subsequent algorithm detection.
[0070] The specific steps of S5 are:
[0071] The template image is passed through the Reid network to obtain the feature map of the template image, and the search area images of the five positions in S4 are also passed through the Reid network to obtain the corresponding feature maps. The cosine similarity of the template feature map and the feature maps of the five search areas is calculated respectively to obtain the location of the search area with the highest similarity and determine the target location.
[0072] refer to Figure 2 , the specific steps of S7 include:
[0073] S71, image preprocessing: noise removal and image enhancement are performed on the final tracking position in each frame of the image, using Gaussian filtering to remove noise and sharpening filtering to enhance the image.
[0074] The expression corresponding to Gaussian filtering is:
[0075]
[0076]
[0077] in, is the standard deviation, is the Gaussian kernel, is the input image, is the output image;
[0078] The sharpening filter uses the Laplacian operator, and the template of the Laplacian operator is expressed as:
[0079] ;
[0080] S72, collecting samples: constructing a circulant matrix, sampling the initial target frame once, the initial target frame is the final tracking position in S6, and other target samples are generated by cyclic shift. Let the basic sample be , move the basic sample vertically by m pixels and then horizontally by n pixels, and the resulting sample is , then the training sample rectangle X is:
[0081]
[0082] Among them, each row is a training sample, and other rows are generated by cyclic shift of this row;
[0083] S73, feature extraction: extracting HOG features from the template image and the current frame image;
[0084] S74, training classifier: using the features and labels of the training samples to train the kernel correlation filter, the specific steps are:
[0085] Assume that the training sample set is ,in, is the initial sample, x is given by After cyclic shift, the sample label set is , n is the set sample number, and the linear ridge regression of the objective function is:
[0086]
[0087] in, is the objective function, satisfying , is the weight coefficient, is the predicted value, is a regularization parameter to prevent overfitting. is the regular term, N represents the number of samples;
[0088] The kernel function is introduced to project the samples into the high-dimensional feature space. It is linearly separable in high-dimensional feature space, that is,
[0089]
[0090] in, is the linear combination coefficient, is a nonlinear mapping function;
[0091] The closed-form solution of ridge regression is:
[0092]
[0093] Among them, I represents the identity matrix, K represents the kernel correlation matrix;
[0094] Performing discrete Fourier transform gives:
[0095]
[0096] in, , They are , The Fourier transform of is the Fourier transform of the first row of matrix K;
[0097] The kernel function introduced is a Gaussian function, and the specific formula is:
[0098]
[0099] in, is the Gaussian kernel function, is the bandwidth factor, represents the inverse Fourier transform, is the Fourier transform of the training sample feature x, for The complex conjugate of To detect the Fourier transform of sample feature z, represents dot product;
[0100] S75, target detection: Calculate the correlation between the feature and the filter to obtain a response map. The position with the highest response value on the response map is the target position in the current frame. The specific steps are:
[0101] Construct the kernel function matrix of test samples and training samples ,but , is the kernel cross-correlation vector of the training sample feature x and the detection sample z, is a circulant matrix formed by circulant operations on vectors;
[0102] Calculate the total test sample response consisting of the test sample characteristic z-shift:
[0103]
[0104] in, For the matrix The Fourier transform of the first row of is the output response;
[0105] S76, update model: In the new frame, use the area near the position predicted in the previous frame as a new sample to update the filter, usually using linear interpolation to update the linear combination coefficients And training sample x, and select a new scale, after obtaining the target response position, use the DSST scale filter with the current center position as the center point, obtain Q candidate targets of different scales, calculate the maximum response value, and update the current scale with the corresponding scale at this time. The selection principle of the target sample scale is:
[0106]
[0107] Among them, P and R are the width and height of the target area respectively. is the scale factor, is the scale quantity;
[0108] S77, lost target detection: detect whether a lost target occurs, select whether to switch to S4, S5 and S6, use the difference between the response confidences of adjacent frames as the tracking confidence score, and the corresponding formula when switching to S4, S5 and S6 is:
[0109]
[0110] in, represents the response confidence of the (t+1)th frame image, represents the response confidence of the t-th frame image, To set the threshold.
[0111] The above shows and describes the basic principles, main features and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited by the above embodiments. The above embodiments and descriptions are only preferred examples of the present invention and are not intended to limit the present invention. Without departing from the spirit and scope of the present invention, the present invention may have various changes and improvements, which fall within the scope of the present invention. The scope of protection of the present invention is defined by the attached claims and their equivalents.
Claims
1. A stable tracking method for ground targets under complex backgrounds, characterized in that: The steps include: S1. Route detection The UAV flies along the flight route of the high-speed aircraft and takes different scene images at different flight stages; S2, manually set the best landmark positions on the scene images at different stages, and send the images and landmark position information to the visual guidance tracker as tracking templates for different flight stages; S3, at different flight stages, retrieve the corresponding template image, use the pre-set landmark position in the template image as the matching target of the tracking algorithm, and guide the aircraft to fly toward the current landmark; S4. In the acquired image, the SiamRPN network is used to track and match different search areas to obtain the best tracking position; S5, obtain the feature map of the template image through the Reid network, and also obtain the corresponding feature map of the search area in S4 through the Reid network to obtain the location of the search area with the highest similarity; S6, judging whether it is the final tracking position, if the best tracking position obtained in S4 is the same as the position of the search area with the highest similarity obtained in S5, then the position is recorded as the final tracking position, otherwise, S4 and S5 are repeated in the next frame image until the final tracking position is obtained, and the matching tracking task is completed; S7, use the improved KCF algorithm to track, and set the tracking target to the best tracking position obtained in S6. When the improved KCF tracking confidence score is higher than the set threshold, it is judged that the improved KCF has lost the target, and S4, S5 and S6 are repeated to obtain the final tracking position again, and then the improved KCF algorithm is used for tracking again; The specific steps of S7 include: S71, image preprocessing: performing noise removal and image enhancement on the final tracking position in each frame of the image; S72, collecting samples: constructing a circulant matrix; S73, feature extraction: extracting HOG features from the template image and the current frame image; S74, training classifier: training the kernel correlation filter using the features and labels of the training samples; S75, target detection: calculate the correlation between the feature and the filter to obtain a response map, and the position with the highest response value on the response map is the target position in the current frame; S76, updating the model: in the new frame, using the area near the position predicted in the previous frame as a new sample to update the filter, and selecting a new scale; S77, lost target detection: detect whether the target is lost and choose whether to switch to S4, S5 and S6.
2. The method for stable tracking of ground targets under complex background according to claim 1, characterized in that: The specific steps of S4 are: Use a camera to obtain video and extract images, select the center point and five search areas (up, down, left, and right), and perform SiamRPN network tracking and matching on the template image with the five search areas respectively. Obtain the best matching position coordinates and matching confidence scores for each of the five positions, select the position with the largest confidence as the position that best matches the template image, and record it as the best tracking position obtained by the SiamRPN network.
3. The method for stable tracking of ground targets under complex background according to claim 1, characterized in that: The specific steps of S5 are: The template image is passed through the Reid network to obtain the feature map of the template image, and the search area images of the five positions in S4 are also passed through the Reid network to obtain the corresponding feature maps. The cosine similarity of the template feature map and the feature maps of the five search areas is calculated respectively to obtain the location of the search area with the highest similarity.
4. The method for stable tracking of ground targets under complex background according to claim 1, characterized in that: In the S71, Gaussian filtering is used to remove noise and sharpening filtering is used to enhance the image.
5. The method for stable tracking of ground targets under complex background according to claim 4, characterized in that: In S72, the initial target frame is sampled once. The initial target frame is the final tracking position in S6. Other target samples are generated by cyclic shift. Let the basic sample be , move the basic sample vertically by m pixels and then horizontally by n pixels, and the resulting sample is , then the training sample rectangle X is: Each row is a training sample, and other rows are generated by cyclic shift of this row.
6. The method for stable tracking of ground targets under complex background according to claim 4, characterized in that: The specific steps of S74 are: Assume that the training sample set is ,in, is the initial sample, x is given by After cyclic shift, the sample label set is , n is the set sample number, and the linear ridge regression of the objective function is: in, is the objective function, satisfying , is the weight coefficient, is the predicted value, is a regularization parameter to prevent overfitting. is the regular term, N represents the number of samples; The kernel function is introduced to project the samples into the high-dimensional feature space. It is linearly separable in high-dimensional feature space, that is, in, is the linear combination coefficient, is a nonlinear mapping function; The closed-form solution of ridge regression is: Among them, I represents the identity matrix, K represents the kernel correlation matrix; Performing discrete Fourier transform gives: in, , They are , The Fourier transform of is the Fourier transform of the first row of matrix K; The kernel function introduced is a Gaussian function, and the specific formula is: in, is the Gaussian kernel function, is the bandwidth factor, represents the inverse Fourier transform, is the Fourier transform of the training sample feature x, for The complex conjugate of To detect the Fourier transform of sample feature z, Represents dot product.
7. The method for stable tracking of ground targets under complex background according to claim 4, characterized in that: The specific steps of S75 are: Construct the kernel function matrix of test samples and training samples ,but , is the kernel cross-correlation vector of the training sample feature x and the detection sample z, is a circulant matrix formed by circulant operations on vectors; Calculate the total test sample response consisting of the test sample characteristic z-shift: in, For the matrix The Fourier transform of the first row of is the output response.
8. The method for stable tracking of ground targets under complex background according to claim 4, characterized in that: The specific steps of updating the target scale in S76 are: After obtaining the target response position, use the DSST scale filter to obtain Q candidate targets of different scales with the current center position as the center point, calculate the maximum response value, and update the current scale with the corresponding scale at this time. The principle of selecting the target sample scale is: Among them, P and R are the width and height of the target area respectively. is the scale factor, is the scale quantity.
9. The method for stable tracking of ground targets under complex background according to claim 4, characterized in that: In S77, the difference between the response confidences of adjacent frames is used as the tracking confidence score.
