A deep learning driven small target tracking method and system

The small target tracking method driven by deep learning combines denoising, grayscale, edge detection, background subtraction and optical flow methods, and integrates deep convolutional neural networks and deep metric learning algorithms to solve the problem of small target tracking technology in small target size. and stability and accuracy issues in diverse environments, achieving efficient target recognition and tracking.

CN118587253BActive Publication Date: 2024-09-27CHANGSHA CHAOCHUANG ELECTRONICS TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411064693.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-05
Publication Date
2024-09-27
Estimated Expiration
2044-08-05

AI Technical Summary

Technical Problem

Existing small target tracking technology is difficult to achieve stable tracking when the target size is small, the features are not obvious, and under diverse environmental conditions, and it is easily interfered by noise, resulting in poor tracking results.

Method used

A small target tracking method driven by deep learning is used to perform feature extraction and target tracking by combining denoising, grayscale, edge detection, background subtraction and optical flow methods, and integrating deep convolutional neural networks and deep metric learning algorithms.

Benefits of technology

Significantly improves the recognition and tracking accuracy of small targets, enhances the adaptability and robustness in changing environments, and ensures the continuity and reliability of tracking, especially when the target is moving quickly or is blocked, maintaining high accuracy Spend.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118587253B
    Figure CN118587253B
Patent Text Reader

Abstract

The present invention discloses a deep learning driven small target tracking method and system, including: S1: using continuous image frames as input for denoising, graying and normalization, using Sobel operator for edge detection, and using edge detection information for feature extraction; S2: applying background subtraction method to separate moving target area, the background subtraction method identifies the moving target area by calculating the difference between the current frame and the background model; S3: using optical flow method to analyze the pixel motion pattern between continuous image frames to estimate the speed of the target in the moving target area; S4: fusing the estimated target speed with the extracted features, inputting into a deep convolutional neural network for feature extraction, and obtaining deep features; S5: based on the deep features, using a deep metric learning algorithm to track the small target. The present invention can realize rapid recognition and stable tracking of small targets, as well as adaptive capabilities under diverse environmental conditions.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of small target tracking, and in particular to a deep learning driven small target tracking method and system. Background Art

[0002] Small target tracking technology is an important branch of computer vision and has broad application prospects, such as video surveillance, autonomous driving, motion analysis, etc. Small targets often lack sufficient feature information because they occupy fewer pixels in the image, making their detection and tracking more difficult than large targets. In the field of small target tracking, existing technologies such as model matching, optical flow, and background subtraction face many challenges. These methods often have poor tracking effects due to small target size, unclear features, and susceptibility to noise interference. For example, although the traditional optical flow method can provide motion information, it is sensitive to changes in lighting and it is difficult to accurately capture small targets; the background subtraction method is difficult to effectively separate the foreground when the contrast between the target and the background is not high; although the deep learning method has advantages in feature extraction, many existing algorithms have failed to optimize the characteristics of small targets, resulting in insufficient tracking stability and accuracy. Summary of the invention

[0003] In view of this, the present invention provides a deep learning driven small target tracking method and system, aiming to achieve rapid recognition and stable tracking of small targets, as well as adaptability under diverse environmental conditions, thereby meeting the urgent needs for efficient small target tracking technology in the fields of real-time monitoring, intelligent video analysis, etc.

[0004] To achieve the above object, the present invention provides a deep learning driven small target tracking method, comprising the following steps:

[0005] S1: Take continuous image frames as input for denoising, grayscale and normalization, use Sobel operator for edge detection, and use edge detection information for feature extraction;

[0006] S2: applying a background subtraction method to separate the moving target area, wherein the background subtraction method identifies the moving target area by calculating the difference between the current frame and the background model;

[0007] S3: Use optical flow to analyze pixel motion patterns between consecutive image frames to estimate the speed of the target in the moving target area;

[0008] S4: The speed of the target estimated in step S3 is fused with the features extracted in step S1, and input into a deep convolutional neural network for feature extraction to obtain deep features;

[0009] S5: Based on the deep features obtained in step S4, a deep metric learning algorithm is used to track the small target.

[0010] As a further improvement method of the present invention:

[0011] Optionally, the step S1 includes the following steps:

[0012] S11: Image denoising:

[0013] Use a Gaussian filter to filter each of the consecutive input image frames Perform denoising to obtain the denoised image frame , specifically:

[0014] ;

[0015] in, is the pixel position; for exist The value at is the Gaussian kernel in The value at , , is a positive integer; for exist The value at

[0016] S12: Image grayscale and normalization:

[0017] Grayscale the denoised image frame to obtain a grayscale image frame , specifically:

[0018] ;

[0019] in, for exist The value at , and They are The red band, green band and blue band; , and They are , and exist The value at

[0020] Normalize the grayscale image frame to obtain a normalized image frame , specifically:

[0021] ;

[0022] in, and They are The minimum and maximum values ​​of for exist The value at

[0023] S13: Edge Detection:

[0024] Use the Sobel operator to calculate the horizontal and vertical The gradient amplitude is:

[0025] ;

[0026] ;

[0027] in, is the horizontal axis gradient amplitude; is the vertical axis gradient amplitude; is the convolution operation; and They are the Sobel operator weight matrices for the horizontal and vertical axes respectively;

[0028] Comprehensive gradient amplitude The calculation method is:

[0029] ;

[0030] Use double thresholds for feature extraction to obtain gradient features , specifically:

[0031] ;

[0032] in, for exist The value at for exist The value at and are the low threshold and the high threshold, respectively. The low threshold and the high threshold are the 50% quantile and the 95% quantile of the comprehensive gradient amplitude, respectively.

[0033] Optionally, the step S2 includes the following steps:

[0034] S21: Establish and update background model:

[0035] Extract the previous image in the continuous image frame Frames to build background models , specifically:

[0036] ;

[0037] in, is the first Frame The value at for exist The value at is the mean value function;

[0038] The background model changes with the sequence number of the image frame, specifically:

[0039] ;

[0040] in, and Respectively Frame and Background model corresponding to each image frame; and They are and exist The value at is the background learning rate; is the first frame, , is the total number of consecutive image frames; for exist The value at

[0041] S22: Calculate the difference and set the difference threshold:

[0042] calculate and The difference is Frame Difference Image :

[0043] ;

[0044] in, for exist The value at

[0045] Set a difference threshold To distinguish the foreground and background, The calculation method is:

[0046] ;

[0047] in, is the standard deviation function; To control the parameters;

[0048] S23: Segmentation of moving target area:

[0049] Use the difference threshold to segment the moving target area and obtain the Frame segmentation image , specifically:

[0050] ;

[0051] in, for exist The value at the position is 1 for the moving target area and 0 for the background. Frame segmentation image The pixel values ​​of the pixels in are all 0.

[0052] Optionally, the step S3 includes the following steps:

[0053] S31: Calculate spatial and temporal gradients:

[0054] Calculate the first frame The spatial and temporal gradients of , specifically:

[0055] ;

[0056] ;

[0057] in, and They are The horizontal and vertical spatial gradients; for The time gradient of

[0058] S32: Construct the optical flow equation and solve it:

[0059] The optical flow equation is constructed based on the spatial gradient and the temporal gradient, specifically:

[0060] ;

[0061] in, , and They are , and exist The value at and Based on The velocity matrix in the horizontal and vertical directions; and They are and exist The value at

[0062] Solve using the least squares method and ;

[0063] S33: Construct and optimize the total energy function:

[0064] Total Energy The calculation method is:

[0065] ;

[0066] in, Indicates accumulation at all pixel positions; is the smoothing control parameter; is a smoothing term, and its expression is:

[0067] ;

[0068] in, and They are and exist The value at

[0069] Use gradient descent to minimize the total energy, according to The moving target area segmented from the image is used to obtain the optimal estimate of the target's horizontal and vertical speed. , For the Frame segmentation image.

[0070] Optionally, the step S4 includes the following steps:

[0071] S41: Feature Fusion:

[0072] The target speed estimated in step S3 is fused with the features extracted in step S1 to obtain the fused feature tensor , specifically:

[0073] ;

[0074] in, and It is the optimal estimation of the target's speed in the horizontal and vertical directions in each frame based on the continuous image frames;

[0075] Will The input is fed into Yolo-V5, a deep convolutional neural network for target detection, and trained. The deep convolutional neural network extracts high-level features through a series of convolutional layers, specifically:

[0076] ;

[0077] in, is the deep feature; and Respectively Layer and The depth features of the layer, ; and Respectively The weights and biases of the convolutional layers; The function returns the maximum value.

[0078] Optionally, the step S5 includes the following steps:

[0079] S51: Define depth metrics:

[0080] Depth Metrics Used to measure the distance between deep features, specifically:

[0081] ;

[0082] in, and Indicates different goals; for and The depth measure between and Respectively layer and The depth features of is the normalization function;

[0083] S52: Set the loss function and optimize:

[0084] The expression of the loss function is:

[0085] ;

[0086] in, , and are respectively the small target to be tracked, the positive sample of the small target to be tracked and the negative sample of the small target to be tracked. The positive sample of the small target to be tracked is the image area of ​​the small target in different frames, and the negative sample of the small target to be tracked is the image area of ​​the non-tracked small target in different frames;

[0087] Minimizing the loss function using a gradient descent algorithm to obtain a trained metric learning model, wherein the metric learning model includes a convolutional layer, a depth metric, and a loss function of Yolo-V5;

[0088] S53: Small Target Tracking:

[0089] Use the Yolo-V5 model to analyze the first Frame and Frames are used to detect small targets and obtain the bounding box and confidence of small targets; The candidate small targets detected in the frame are extracted using the convolutional layer of Yolo-V5; In the frame, the convolutional layer of Yolo-V5 is also used to extract features for all possible small targets, and then the depth metric is used to measure the Frame candidate small target and the The distance between the depth features of small targets in different frames is found by nearest neighbor search. Frame and The region most similar to the candidate small target in the frame, if the depth metric value is greater than 0.5, then Tracking to the first Frame candidate small objects.

[0090] The present invention also discloses a small target tracking system driven by deep learning, comprising:

[0091] Preprocessing module: takes continuous image frames as input for denoising, grayscale and normalization, uses Sobel operator for edge detection, and uses edge detection information for feature extraction;

[0092] Segmentation module: applying background subtraction method to separate the moving target area, the background subtraction method identifies the moving target area by calculating the difference between the current frame and the background model;

[0093] Optical flow module: Uses optical flow method to analyze the pixel motion pattern between consecutive image frames to estimate the speed of the target in the moving target area;

[0094] Deep feature extraction module: Use deep convolutional neural network to extract features;

[0095] Tracking module: Use deep metric learning algorithm to track small targets.

[0096] Beneficial effects:

[0097] The present invention significantly improves the recognition and tracking accuracy of small targets through the organic combination of deep learning technology and image processing algorithms. In particular, when the target size is small and the features are not obvious, the present invention can effectively capture the target features and achieve stable tracking, and maintain high accuracy even in complex scenes where the target moves quickly or is partially blocked.

[0098] The present invention particularly strengthens the adaptability and robustness of the algorithm under variable environmental conditions. Through advanced denoising, grayscale, normalization processing, as well as the application of background subtraction and optical flow method, the algorithm can work stably under adverse conditions such as changing illumination and complex background, effectively resist noise interference, and ensure the continuity and reliability of tracking.

[0099] By using deep convolutional neural networks, the present invention can extract richer and more abstract feature representations, which are more sensitive to subtle changes in small targets and enhance the ability to express targets. The deep metric learning algorithm further ensures the discrimination of targets in the feature space and improves the overall performance of the tracking algorithm. BRIEF DESCRIPTION OF THE DRAWINGS

[0100] Figure 1 A schematic diagram of a process of a small target tracking method driven by deep learning according to an embodiment of the present invention;

[0101] Figure 2 Continuous image frames and small target tracking result diagram according to an embodiment of the present invention, wherein Figure 2 (a) is a continuous image frame. Figure 2 (b) is the small target tracking result. DETAILED DESCRIPTION

[0102] The present invention is further described below in conjunction with the accompanying drawings, but the present invention is not limited in any way. Any changes or substitutions made based on the teachings of the present invention belong to the protection scope of the present invention.

[0103] Embodiment 1:

[0104] A deep learning driven small target tracking method, such as Figure 1 As shown, the following steps are included:

[0105] S1: Take continuous image frames as input for denoising, grayscale and normalization, use Sobel operator for edge detection, and use edge detection information for feature extraction:

[0106] S11: Image denoising:

[0107] Use a Gaussian filter to filter each of the consecutive input image frames Perform denoising to obtain the denoised image frame , specifically:

[0108] ;

[0109] in, is the pixel position; for exist The value at is the Gaussian kernel in The value at , , is a positive integer. In this embodiment, the standard deviation of the Gaussian kernel is 3. is 2; for exist The value at

[0110] S12: Image grayscale and normalization:

[0111] Grayscale the denoised image frame to obtain a grayscale image frame , specifically:

[0112] ;

[0113] in, for exist The value at , and They are The red band, green band and blue band; , and They are , and exist The value at

[0114] Normalize the grayscale image frame to obtain a normalized image frame , specifically:

[0115] ;

[0116] in, and They are The minimum and maximum values ​​of for exist The value at

[0117] S13: Edge Detection:

[0118] Use the Sobel operator to calculate the horizontal and vertical The gradient amplitude is:

[0119] ;

[0120] ;

[0121] in, is the horizontal axis gradient amplitude; is the vertical axis gradient amplitude; is the convolution operation; and They are the Sobel operator weight matrices for the horizontal and vertical axes, specifically:

[0122]

[0123] Comprehensive gradient amplitude The calculation method is:

[0124] ;

[0125] Use double thresholds for feature extraction to obtain gradient features , specifically:

[0126] ;

[0127] in, for exist The value at for exist The value at and are the low threshold and the high threshold, respectively. The low threshold and the high threshold are the 50% quantile and the 95% quantile of the comprehensive gradient amplitude, respectively.

[0128] Through Gaussian filtering and denoising, random noise in the image is effectively reduced, the signal-to-noise ratio is enhanced, and clearer image data is provided for subsequent processing steps. Grayscale conversion converts color images into grayscale images, which simplifies the data processing process while retaining the key visual information of the image, providing the necessary information for edge detection and feature extraction. Normalization ensures that the image data is on a uniform scale, which helps the stability of subsequent algorithm processing and reduces the impact on parameter sensitivity.

[0129] The Sobel operator is an effective edge detection tool. By calculating the gradient amplitude of the image, it can accurately locate the edge in the image and provide important structural information for feature extraction. The edge features are extracted by the double threshold method, which can distinguish between strong edge pixels and weak edge pixels, as well as non-edge areas, improving the accuracy and reliability of feature extraction.

[0130] S2: Apply a background subtraction method to separate the moving target area. The background subtraction method identifies the moving target area by calculating the difference between the current frame and the background model:

[0131] S21: Establish and update background model:

[0132] Extract the previous image in the continuous image frame Frames to build background models , specifically:

[0133] ;

[0134] in, is the first Frame The value at for exist The value at is the mean value function;

[0135] The background model changes with the sequence number of the image frame, specifically:

[0136] ;

[0137] in, and Respectively Frame and Background model corresponding to each image frame; and They are and exist The value at is the background learning rate, which is 0.01 in this embodiment; is the first frame, , is the total number of consecutive image frames; for exist The value at

[0138] S22: Calculate the difference and set the difference threshold:

[0139] calculate and The difference is Frame Difference Image :

[0140] ;

[0141] in, for exist The value at

[0142] Set a difference threshold To distinguish the foreground and background, The calculation method is:

[0143] ;

[0144] in, is the standard deviation function; is a control parameter, which is 2 in this embodiment;

[0145] S23: Segmentation of moving target area:

[0146] Use the difference threshold to segment the moving target area and obtain the Frame segmentation image , specifically:

[0147] ;

[0148] in, for exist The value at the position is 1 for the moving target area and 0 for the background. Frame segmentation image The pixel values ​​of the pixels in are all 0.

[0149] Using the weighted average method, the background model can smoothly incorporate new information while retaining the ability to adapt to slowly changing environments. This adaptive update strategy enables the background model to not only reflect the static characteristics of the initial scene, but also capture the effects of lighting changes and slowly moving objects in the scene, thereby significantly improving the robustness of the background subtraction method in dynamic environments.

[0150] By calculating the difference between the current frame and the background model, an accurate basis is provided for the detection of moving targets. The setting of the difference threshold takes into account the statistical characteristics of the difference image, and effectively balances the sensitivity and anti-interference ability of foreground segmentation through the combination of the mean and standard deviation. This method reduces false detections caused by random noise or small changes, while ensuring a high detection rate for real moving targets.

[0151] S3: Use optical flow to analyze pixel motion patterns between consecutive image frames to estimate the speed of targets in the moving target area:

[0152] S31: Calculate spatial and temporal gradients:

[0153] Calculate the first frame The spatial and temporal gradients of , specifically:

[0154] ;

[0155] ;

[0156] in, and They are The horizontal and vertical spatial gradients; for The time gradient of

[0157] S32: Construct the optical flow equation and solve it:

[0158] The optical flow equation is constructed based on the spatial gradient and the temporal gradient, specifically:

[0159] ;

[0160] in, , and They are , and exist The value at and Based on The velocity matrix in the horizontal and vertical directions; and They are and exist The value at

[0161] Solve using the least squares method and ;

[0162] S33: Construct and optimize the total energy function:

[0163] Total Energy The calculation method is:

[0164] ;

[0165] in, Indicates accumulation at all pixel positions; is the smoothing control parameter; is a smoothing term, and its expression is:

[0166] ;

[0167] in, and They are and exist The value at

[0168] Use gradient descent to minimize the total energy, according to The moving target area segmented from the image is used to obtain the optimal estimate of the target's horizontal and vertical speed. , For the Frame segmentation image.

[0169] The optical flow method is used to accurately estimate the pixel motion between consecutive frames, and the invention provides detailed information on the target speed and direction of motion. By calculating the spatial gradient and temporal gradient, constructing the optical flow equation, and using the least squares method to solve the displacement, the invention can accurately capture the pixel-level motion changes. This method is crucial for understanding the target behavior pattern and predicting its future position, and significantly improves the accuracy of small target tracking.

[0170] The total energy function introduced in the optical flow calculation not only ensures the accuracy of motion estimation by combining the data term and the smoothing term, but also enhances the smoothness of the optical flow field by smoothing the control parameters. This method effectively suppresses the incoherence caused by noise while retaining the true motion characteristics of the target, improving the robustness of the algorithm in complex scenes.

[0171] S4: The target speed estimated in step S3 is fused with the features extracted in step S1 and input into a deep convolutional neural network for feature extraction to obtain deep features:

[0172] S41: Feature Fusion:

[0173] The target speed estimated in step S3 is fused with the features extracted in step S1 to obtain the fused feature tensor , specifically:

[0174] ;

[0175] in, and It is the optimal estimation of the target's speed in the horizontal and vertical directions in each frame based on the continuous image frames;

[0176] Will The input is fed into Yolo-V5, a deep convolutional neural network for target detection, and trained. The deep convolutional neural network extracts high-level features through a series of convolutional layers, specifically:

[0177] ;

[0178] in, is the deep feature; and Respectively Layer and The depth features of the layer, ; and Respectively The weights and biases of the convolutional layers; The function returns the maximum value, specifically: ;

[0179] The present invention achieves a more comprehensive characterization of the target by fusing the speed and static features of the target from different steps. By combining the image features extracted in step S1 with the displacement information obtained in step S3, the feature tensor can capture both the static properties and dynamic behaviors of the target. This fusion strategy not only enhances the expressive power of the features, but also provides a rich source of information for the deep learning model, thereby improving the accuracy of target detection and tracking.

[0180] By processing the fused feature tensors using the deep convolutional neural network Yolo-V5, the present invention can automatically learn more advanced and abstract feature representations. Compared with traditional manually designed features, these deep features can better capture the essential attributes of the target and improve the ability to identify the target. In addition, the convolutional layer structure of Yolo-V5 has been optimized to effectively extract multi-scale and multi-dimensional features, enhancing the model's sensitivity to small targets.

[0181] S5: Based on the deep features obtained in step S4, use the deep metric learning algorithm to track the small target:

[0182] S51: Define depth metrics:

[0183] Depth Metrics Used to measure the distance between deep features, specifically:

[0184] ;

[0185] in, and Indicates different goals; for and The depth measure between and Respectively layer and The depth features of is the normalization function;

[0186] S52: Set the loss function and optimize:

[0187] The expression of the loss function is:

[0188] ;

[0189]

[0190] in, , and are respectively the small target to be tracked, the positive sample of the small target to be tracked and the negative sample of the small target to be tracked. The positive sample of the small target to be tracked is the image area of ​​the small target in different frames, and the negative sample of the small target to be tracked is the image area of ​​the non-tracked small target in different frames;

[0191] Minimizing the loss function using a gradient descent algorithm to obtain a trained metric learning model, wherein the metric learning model includes a convolutional layer, a depth metric, and a loss function of Yolo-V5;

[0192] S53: Small Target Tracking:

[0193] Use the Yolo-V5 model to analyze the first Frame and Frames are used to detect small targets and obtain the bounding box and confidence of small targets; The candidate small targets detected in the frame are extracted using the convolutional layer of Yolo-V5; In the frame, the convolutional layer of Yolo-V5 is also used to extract features for all possible small targets, and then the depth metric is used to measure the Frame candidate small target and the The distance between the depth features of small targets in different frames is found by nearest neighbor search. Frame and The region most similar to the candidate small target in the frame, if the depth metric value is greater than 0.5, then Tracking to the first Frame candidate small objects.

[0194] In this embodiment, the continuous image frames and the small target tracking result diagram can be shown as follows Figure 2 As shown, Figure 2 (a) is a continuous image frame. Figure 2 (b) is the small target tracking result.

[0195] The present invention combines the advanced features extracted by deep learning with the metric learning algorithm and defines a new deep metric to measure the similarity between different target features. The normalized Euclidean distance can express the similarity of features more finely, thereby improving the accuracy of small target tracking. This method effectively utilizes the powerful feature extraction capability of the deep learning model and combines it with the similarity measurement advantage of the metric learning algorithm to provide a more accurate matching strategy for small target tracking.

[0196] Through a specially designed loss function, the present invention strengthens the model's ability to distinguish positive and negative sample pairs during the training process. The application of the gradient descent algorithm ensures the minimization of the loss function, thereby training a metric learning model that can accurately distinguish between targets and non-targets. This optimization strategy not only improves the model's ability to recognize small targets, but also enhances the performance of stable tracking of targets in complex environments.

[0197] Example 2

[0198] A deep learning driven small target tracking system, including the following five modules:

[0199] Preprocessing module: takes continuous image frames as input for denoising, grayscale and normalization, uses Sobel operator for edge detection, and uses edge detection information for feature extraction;

[0200] Segmentation module: Apply background subtraction method to separate the moving target area. The background subtraction method identifies the moving target area by calculating the difference between the current frame and the background model;

[0201] Optical flow module: Uses optical flow method to analyze the pixel motion pattern between consecutive image frames to estimate the speed of the target in the moving target area;

[0202] Deep feature extraction module: Use deep convolutional neural network to extract features;

[0203] Tracking module: Use deep metric learning algorithm to track small targets.

[0204] It should be noted that the serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages and disadvantages of the embodiments. And the terms "including", "comprising" or any other variants thereof in this article are intended to cover non-exclusive inclusion, so that a process, device, article or method including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, device, article or method. In the absence of further restrictions, an element defined by the sentence "including a ..." does not exclude the presence of other identical elements in the process, device, article or method including the element.

[0205] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above, and includes a number of instructions for a terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present invention.

[0206] The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.

Claims

1. A deep learning driven small target tracking method, characterized in that: The following steps are involved: S1: Take continuous image frames as input for denoising, grayscale and normalization, use Sobel operator for edge detection, and use edge detection information for feature extraction; S2: applying a background subtraction method to separate the moving target area, wherein the background subtraction method identifies the moving target area by calculating the difference between the current frame and the background model; The step S2 includes the following steps: S21: Establish and update background model: Extract the previous image in the continuous image frame Frames to build background models , specifically: ; in, is the first Frame The value at is the pixel position; for exist The value at is the mean value function; The background model changes with the sequence number of the image frame, specifically: ; in, and Respectively Frame and Background model corresponding to each image frame; and They are and exist The value at is the background learning rate; is the first frame, , is the total number of consecutive image frames; for exist The value at S22: Calculate the difference and set the difference threshold: calculate and The difference between Frame Difference Image : ; in, for exist The value at Set a difference threshold To distinguish the foreground and background, The calculation method is: ; in, is the standard deviation function; To control the parameters; S23: Segmentation of moving target area: Use the difference threshold to segment the moving target area and obtain the Frame segmentation image , specifically: ; in, for exist The value at the position is 1 for the moving target area and 0 for the background. Frame segmentation image The pixel values ​​of the pixels in are all 0; S3: Use optical flow to analyze pixel motion patterns between consecutive image frames to estimate the speed of the target in the moving target area; S4: The speed of the target estimated in step S3 is fused with the features extracted in step S1, and input into a deep convolutional neural network for feature extraction to obtain deep features; S5: Based on the deep features obtained in step S4, a deep metric learning algorithm is used to track the small target.

2. The deep learning driven small target tracking method according to claim 1, characterized in that: The step S1 includes the following steps: S11: Image denoising: Use a Gaussian filter to filter each of the consecutive input image frames Perform denoising to obtain the denoised image frame , specifically: ; in, for exist The value at is the Gaussian kernel in The value at , , is a positive integer; for exist The value at S12: Image grayscale and normalization: Grayscale the denoised image frame to obtain a grayscale image frame , specifically: ; in, for exist The value at , and They are The red band, green band and blue band; , and They are , and exist The value at Normalize the grayscale image frame to obtain a normalized image frame , specifically: ; in, and They are The minimum and maximum values ​​of for exist The value at S13: Edge Detection: Use the Sobel operator to calculate the horizontal and vertical The gradient amplitude is: ; ; in, is the horizontal axis gradient amplitude; is the vertical axis gradient amplitude; is the convolution operation; and They are the Sobel operator weight matrices for the horizontal and vertical axes respectively; Comprehensive gradient amplitude The calculation method is: ; Use double thresholds for feature extraction to obtain gradient features , specifically: ; in, for exist The value at for exist The value at and are the low threshold and the high threshold, respectively. The low threshold and the high threshold are the 50% quantile and the 95% quantile of the comprehensive gradient amplitude, respectively.

3. The deep learning driven small target tracking method according to claim 2, characterized in that: The step S3 comprises the following steps: S31: Calculate spatial and temporal gradients: Calculate the first frame The spatial and temporal gradients of , specifically: ; ; in, and They are The horizontal and vertical spatial gradients; for The time gradient of S32: Construct the optical flow equation and solve it: The optical flow equation is constructed based on the spatial gradient and the temporal gradient, specifically: ; in, , and They are , and exist The value at and Based on The velocity matrix in the horizontal and vertical directions; and They are and exist The value at Solve using the least squares method and ; S33: Construct and optimize the total energy function: Total Energy The calculation method is: ; in, Indicates accumulation at all pixel positions; is the smoothing control parameter; is a smoothing term, and its expression is: ; in, and They are and exist The value at Use gradient descent to minimize the total energy, according to The moving target area segmented from the image is used to obtain the optimal estimate of the target's horizontal and vertical speed. , For the Frame segmentation image.

4. The deep learning driven small target tracking method according to claim 3, characterized in that: The step S4 includes the following steps: S41: Feature Fusion: The target speed estimated in step S3 is fused with the features extracted in step S1 to obtain the fused feature tensor , specifically: ; in, and It is the optimal estimation of the target's speed in the horizontal and vertical directions in each frame based on the continuous image frames; Will The input is fed into Yolo-V5, a deep convolutional neural network for target detection, and trained. The deep convolutional neural network extracts high-level features through a series of convolutional layers, specifically: ; in, is the deep feature; and Respectively Layer and The depth features of the layer, ; and Respectively The weights and biases of the convolutional layers; The function returns the maximum value.

5. The deep learning driven small target tracking method according to claim 4, characterized in that: The step S5 includes the following steps: S51: Define depth metrics: Depth Metrics Used to measure the distance between deep features, specifically: ; in, and Indicates different goals; for and The depth measure between and Respectively layer and The depth features of is the normalization function; S52: Set the loss function and optimize: The expression of the loss function is: ; in, , and are respectively the small target to be tracked, the positive sample of the small target to be tracked and the negative sample of the small target to be tracked. The positive sample of the small target to be tracked is the image area of ​​the small target in different frames, and the negative sample of the small target to be tracked is the image area of ​​the non-tracked small target in different frames; Minimizing the loss function using a gradient descent algorithm to obtain a trained metric learning model, wherein the metric learning model includes a convolutional layer, a depth metric, and a loss function of Yolo-V5; S53: Small Target Tracking: Use the Yolo-V5 model to analyze the first Frame and Frames are used to detect small targets and obtain the bounding box and confidence of small targets; The candidate small targets detected in the frame are extracted using the convolutional layer of Yolo-V5; In the frame, the convolutional layer of Yolo-V5 is also used to extract features for all possible small targets, and then the depth metric is used to measure the Frame candidate small target and the The distance between the depth features of small targets in different frames is found by nearest neighbor search. Frame and The region most similar to the candidate small target in the frame, if the depth metric value is greater than 0.5, then Tracking to the first Frame candidate small objects.

6. A deep learning driven small target tracking system, characterized in that: include: Preprocessing module: takes continuous image frames as input for denoising, grayscale and normalization, uses Sobel operator for edge detection, and uses edge detection information for feature extraction; Segmentation module: applying background subtraction method to separate the moving target area, the background subtraction method identifies the moving target area by calculating the difference between the current frame and the background model; Optical flow module: Uses optical flow method to analyze the pixel motion pattern between consecutive image frames to estimate the speed of the target in the moving target area; Deep feature extraction module: Use deep convolutional neural network to extract features; Tracking module: Use deep metric learning algorithm to track small targets; To implement a deep learning driven small target tracking method as described in any one of claims 1-5.