A target tracking method and device for fast-moving small targets
By dynamically adjusting the sampling probability and using the speed sensitive loss function, the target tracking model is optimized, and the problems of inaccurate positioning and target loss in high-speed moving small target tracking are solved, which significantly improves tracking performance and prediction accuracy.
Patent Information
- Application Number
- CN202411920710.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-25
- Publication Date
- 2025-04-01
- Estimated Expiration
- 2044-12-25
AI Technical Summary
When existing target tracking methods deal with small targets that move at high speed, it is difficult to predict the next motion trajectory of the target, resulting in inaccurate positioning or loss of targets, especially when tracking small targets.
By monitoring the change in target position in successive frames of the original target tracking data set, estimating the target motion speed, and dynamically adjusting the sampling probability of the video frame according to the motion speed, a fast motion target tracking training set is generated. Based on this training set and the speed sensitive loss function, iterative optimization training of the target tracking model is carried out to obtain an optimized target tracking model suitable for fast moving small targets.
It significantly improves the model's prediction ability of small target trajectories, enhances the tracking performance of high-speed moving small targets, reduces the risk of target loss, and achieves stable and accurate positioning of small targets in a diversified environment.
Smart Images

Figure CN119360452B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer vision technology, and in particular to a target tracking method and device for a fast-moving small target. Background Art
[0002] In recent years, with the rapid development of computer vision and deep learning technology, target tracking has become one of the important research topics in image processing and video analysis. Target tracking plays a key role in many application fields, including drone monitoring, autonomous driving, security monitoring, motion analysis, etc. However, existing target tracking methods still face many challenges and limitations when dealing with small targets moving at high speed.
[0003] When a target moves at high speed in a video, the target position changes greatly between consecutive frames. Traditional tracking algorithms usually have difficulty predicting the next movement trajectory of a fast-moving target, and are prone to inaccurate or even lost target positioning. This is more obvious when tracking small targets. Existing target tracking models are usually trained based on slower or regular motion datasets, resulting in insufficient generalization capabilities in real scenarios, especially when dealing with complex trajectories and changing motion patterns of high-speed moving targets. Tracking performance is significantly reduced. Traditional sampling methods cannot flexibly adjust the sampling frequency according to the target's movement speed, and cannot provide the model with enough training samples to adapt to high-speed moving targets, resulting in the model being difficult to guarantee tracking effects for small targets in practical applications. Summary of the invention
[0004] The present application aims to solve one of the technical problems in the related art at least to some extent.
[0005] To this end, the first purpose of this application is to propose a target tracking method for fast-moving small targets.
[0006] The second objective of the present application is to provide a target tracking device for fast-moving small targets.
[0007] The third objective of the present application is to provide an electronic device.
[0008] A fourth objective of the present application is to provide a computer-readable storage medium.
[0009] A fifth object of the present application is to provide a computer program product.
[0010] To achieve the above-mentioned purpose, the first embodiment of the present application proposes a target tracking method for a fast-moving small target, comprising:
[0011] The position change of the target is monitored in the continuous frames of the original target tracking dataset, and the target movement speed is estimated by calculating the difference of the target position in adjacent frames;
[0012] Dynamically adjusting the sampling probability of the video frame according to the target motion speed;
[0013] Probabilistically resampling the original target tracking data set according to the adjusted sampling probability of each frame to generate a fast-moving target tracking training set;
[0014] Determining hyperparameters of a speed-sensitive loss function based on image features of the fast-moving target tracking training set;
[0015] The fast-moving target tracking training set and the speed-sensitive loss function are used to perform iterative optimization training of the target tracking model to obtain an optimized target tracking model suitable for fast-moving small targets.
[0016] Optionally, dynamically adjusting the sampling probability of the video frame according to the target motion speed includes:
[0017] Set the speed threshold of the target movement speed ;
[0018] The target movement speed With the speed threshold Make comparisons and determine the sampling probability.
[0019] Optionally, the target movement speed With the speed threshold Compare and determine sampling probability, including:
[0020] When the target movement speed Greater than or equal to the speed threshold When , the sampling probability is set to 1 and the frame is retained;
[0021] When the target movement speed Less than the speed threshold When The ratio of is taken as the sampling probability of the frame.
[0022] Optionally, determining the hyper parameters of the speed-sensitive loss function based on the image features of the fast-moving target tracking training set includes:
[0023] Extracting multi-dimensional image features of the target from the fast-moving target tracking training set, wherein the multi-dimensional image features include the motion trajectory features, spatial distribution features, and motion speed change trends of the target;
[0024] Constructing speed loss function , where the loss weight is adjusted according to the target's moving speed, and the corresponding weight is assigned to the small target whose moving speed reaches the preset threshold;
[0025] Constructing the position loss function , assuming is the true value of the small target motion vector in adjacent frames, is the estimated value of the small target motion vector, for and The angle between the adjacent frames is:
[0026]
[0027] in, Used to quantify the distance error of the vector endpoint, is the constraint of angle error;
[0028] Combine the speed loss function and the position loss function to construct a complete speed-sensitive loss function , the expression is:
[0029]
[0030] in, and are the weight parameters of the speed loss function and the position loss function respectively.
[0031] Optionally, the using the fast-moving target tracking training set and the speed-sensitive loss function to perform iterative optimization training of a target tracking model to obtain an optimized target tracking model suitable for fast-moving small targets includes:
[0032] S1. Pre-training the model using the original target tracking data set to obtain an initial target tracking model;
[0033] S2, performing preliminary training on the initial target tracking model according to the fast-moving target tracking training set and in combination with the speed-sensitive loss function;
[0034] S3. Readjust the sampling probability according to the preliminary training results, generate an optimized fast-moving target tracking training set, and dynamically readjust the speed-sensitive loss function;
[0035] S4, adjust the learning rate, and retrain the target tracking model using the optimized fast-moving target training set and the dynamically adjusted speed-sensitive loss function;
[0036] S5. Repeat steps S3 and S4 until the speed-sensitive loss function of the target tracking model converges or reaches the maximum number of training rounds, thereby obtaining an optimized target tracking model suitable for fast-moving small targets.
[0037] To achieve the above-mentioned purpose, the second embodiment of the present application proposes a target tracking device for a fast-moving small target, comprising:
[0038] The speed calculation module is used to monitor the position change of the target in the continuous frames of the original target tracking data set and estimate the target movement speed by calculating the difference of the target position in adjacent frames;
[0039] A sampling probability adjustment module, used to dynamically adjust the sampling probability of the video frame according to the target motion speed;
[0040] A resampling module, used for performing probability resampling on the original target tracking data set according to the adjusted sampling probability of each frame to generate a fast-moving target tracking training set;
[0041] A loss function construction module, used to determine the hyper parameters of the speed-sensitive loss function based on the image features of the fast-moving target tracking training set;
[0042] The training module is used to use the fast-moving target tracking training set and the speed-sensitive loss function to perform iterative optimization training of the target tracking model to obtain an optimized target tracking model suitable for fast-moving small targets.
[0043] To achieve the above-mentioned purpose, the third aspect of the present application provides an electronic device, including: a processor, and a memory communicatively connected to the processor;
[0044] The memory stores computer-executable instructions;
[0045] The processor executes the computer-executable instructions stored in the memory to implement the method as described in any one of the first aspects.
[0046] To achieve the above-mentioned purpose, the fourth aspect embodiment of the present application proposes a computer-readable storage medium, in which computer-readable storage medium is stored computer execution instructions, and when the computer execution instructions are executed by a processor, they are used to implement the method as described in any one of the first aspects.
[0047] The technical solution provided by the embodiments of the present application brings at least the following beneficial effects:
[0048] By introducing a dynamic sampling strategy based on the target's motion speed and a speed-sensitive loss function, the model's ability to predict the trajectory of small targets is effectively improved, and the tracking performance of high-speed moving small targets is significantly enhanced. By adding the angle between the true direction and the predicted direction as a constraint in the loss function, the model can dynamically correct the predicted position of the target, further improving the accuracy of the motion direction prediction. In addition, this method is suitable for drone tracking, autonomous driving, security monitoring and other fields, and can achieve stable and accurate positioning of small targets in a variety of environments, and has a wide range of application value.
[0049] Additional aspects and advantages of the present application will be given in part in the description below, and in part will become apparent from the description below, or will be learned through the practice of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] The above and / or additional aspects and advantages of the present application will become apparent and easily understood from the following description of the embodiments in conjunction with the accompanying drawings, in which:
[0051] Figure 1 A flowchart of a target tracking method for a fast-moving small target provided by an embodiment of the present application;
[0052] Figure 2 A schematic diagram of constructing a fast-moving target tracking training set provided in an embodiment of the present application;
[0053] Figure 3 A schematic diagram of a position loss function of adjacent frames provided in an embodiment of the present application;
[0054] Figure 4 A schematic diagram of the structure of a target tracking device for fast-moving small targets provided in an embodiment of the present application. DETAILED DESCRIPTION
[0055] Embodiments of the present application are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present application, and should not be construed as limiting the present application.
[0056] In view of the technical problems existing in the prior art, the present invention provides a target tracking method for a fast-moving small target. Figure 1 The following is a flow chart of a target tracking method for a fast-moving small target provided by an embodiment of the present application. Figure 1 As shown, the method comprises the following steps:
[0057] Step 101 , monitoring the position change of the target in the continuous frames of the original target tracking data set, and estimating the target movement speed by calculating the difference of the target position in adjacent frames.
[0058] In an embodiment of the present application, the position data of the target in each frame is first obtained from the original target tracking data set. The position coordinates of the target can be extracted through a target detection algorithm or pre-labeled data, and the present application does not make any specific limitations on this.
[0059] Then, in two consecutive frames, the positions of the target in the previous frame and the current frame are recorded, and the position changes of the target in the horizontal and vertical directions are calculated to quantify its displacement in a short time.
[0060] Finally, the target’s position change in adjacent frames and the time interval between frames are used to estimate the target’s movement speed, and the target’s movement direction is recorded at the same time to supplement the speed data and form the target’s complete motion characteristics, providing basic data support for subsequent dynamic sampling and model training.
[0061] Step 102: dynamically adjust the sampling probability of the video frame according to the target motion speed.
[0062] In this embodiment, it is first necessary to set the target motion speed threshold This threshold is an important criterion for distinguishing high-speed moving targets from slow-moving targets, and is usually set according to the specific requirements of the target scene, and this application does not make any specific limitation on this.
[0063] Then the target movement speed With speed threshold The comparison is performed to determine the sampling probability.
[0064] As a possible implementation method, when the target movement speed Greater than or equal to the speed threshold When , the sampling probability is set to 1, that is, this frame is always retained. This is because high-speed moving targets often carry more dynamic information. Retaining these frames can restore the target's motion trajectory to the greatest extent and ensure the integrity of the data.
[0065] When the target moving speed Less than speed threshold When The ratio of is used as the sampling probability of the frame. In this way, the sampling frequency of low-speed targets can be adjusted dynamically. Target frames with speeds closer to the threshold will be retained more, while target frames with lower speeds may be appropriately reduced to avoid excessive redundancy of stationary or low-speed targets in the data set.
[0066] It should be noted that this dynamically adjusted sampling strategy optimizes the distribution of frames through probability screening based on the original target tracking dataset, making the dataset more inclined to the characteristics of high-speed moving targets, while retaining some samples of low-speed targets to ensure data diversity and balance. In addition, through the above processing, not only the storage and processing costs of useless data are reduced, but also the learning ability of subsequent models for fast-moving targets is enhanced, so that it can more accurately adapt to the actual application scenarios of high-speed moving small targets.
[0067] Step 103 , based on the adjusted sampling probability of each frame, the original target tracking data set is probabilistically resampled to generate a fast-moving target tracking training set.
[0068] In the present application embodiment, Figure 2 As shown, after completing the dynamic adjustment of the sampling probability of each frame, the probability resampling stage of the original target tracking data set is entered, that is, each frame image in the original data set is screened using the dynamic sampling probability calculated in step 102, and finally the screened images are enriched to obtain a fast-moving target tracking training set.
[0069] Specifically, for frames with a sampling probability of 1, that is, high-speed moving target frames, they are directly retained to ensure the integrity of high-speed targets; for frames with a sampling probability less than 1, a random decision is made whether to retain the frame based on the set probability, thereby effectively reducing redundant frames of low-speed targets.
[0070] It should be noted that during the probabilistic resampling process, frames of targets with different speeds need to be retained to maintain the diversity of the data set. The sampled data is checked to ensure that although the low-speed target frames are appropriately reduced, they can still provide the necessary feature information to support model training.
[0071] Through this process, the original target tracking dataset is effectively optimized, the proportion of high-speed targets in the dataset is significantly increased, and a moderate amount of low-speed target samples are retained, forming a training set that contains both high-speed target details and diverse characteristics. The generated fast-moving target tracking training set provides high-quality input for subsequent model training, which can significantly improve the model's learning and prediction capabilities for fast-moving targets.
[0072] Step 104 , determining hyper parameters of a speed-sensitive loss function based on image features of a fast-moving target tracking training set.
[0073] In an embodiment of the present application, after the fast-moving target tracking training set is constructed, the multi-dimensional image features of the target are extracted according to the characteristics of the data set, and a speed-sensitive loss function adapted thereto is designed.
[0074] Specifically, we first extract the multi-dimensional image features of the target from the fast-moving target tracking training set. The multi-dimensional image features include the target's motion trajectory features, spatial distribution features, and motion speed change trends. Among them, the motion trajectory features refer to the position changes of the target in consecutive frames, which are used to extract the motion direction and speed trajectory; the spatial distribution features refer to the distribution of the target in the image space, which are used to determine the target's moving range and positioning characteristics. The motion speed change trend refers to the dynamic change of the target speed over time, which provides a reference for the dynamic weight design.
[0075] Then, construct the speed loss function , adjust the loss weight according to the target's movement speed, and assign corresponding weights to small targets whose movement speed reaches the preset threshold. The speed loss function is used to dynamically adjust the loss weight according to the target's movement speed characteristics, and assign higher weights to small targets with higher movement speeds, so as to improve the model's prediction ability for high-speed moving targets. The speed loss function directly reflects the impact of the target speed on loss optimization and is a key part of the loss function design.
[0076] And, construct the position loss function .like Figure 3 As shown, assuming is the true value of the small target motion vector in adjacent frames, is the estimated value of the small target motion vector, for and The angle between the adjacent frames is:
[0077]
[0078] in, Used to quantify the distance error of the vector endpoint, reflecting the difference in motion amplitude; It is a constraint on the angle error, which is used to reduce the deviation of the model in direction prediction and improve the adaptability to the target motion direction.
[0079] Finally, the speed loss function and the position loss function are combined to construct a complete speed-sensitive loss function. , the expression is:
[0080]
[0081] in, and They are the weight parameters of the speed loss function and the position loss function, respectively. They are dynamically adjusted by analyzing the error distribution of the training set to ensure a balanced optimization effect of the two parts on the target characteristics.
[0082] By introducing the angle between the true direction and the predicted direction into the loss function, the model's prediction accuracy of the direction of motion is significantly enhanced, enabling the model to dynamically correct the predicted position of small targets. Furthermore, by constructing a speed-sensitive loss function, the model's tracking performance for high-speed moving targets is improved, while balancing the adaptability to low-speed targets to ensure stable performance in different scenarios.
[0083] Step 105, using the fast-moving target tracking training set and the speed-sensitive loss function, iteratively optimize the target tracking model to obtain an optimized target tracking model suitable for fast-moving small targets.
[0084] In the embodiment of the present application, the adaptability and prediction accuracy of the target tracking model to fast-moving small targets are gradually improved through iterative optimization.
[0085] It can be understood that the optimization process is divided into several key stages, each of which revolves around the improvement goal of the model, and finally obtains an optimized target tracking model with stable performance and high accuracy. Specifically, the optimization process includes the following steps:
[0086] S1. Use the original target tracking dataset to pre-train the model and obtain the initial target tracking model.
[0087] In this step, the original target tracking dataset is used for preliminary training of the model. The main goal is to initialize the basic parameters of the model so that the model can master basic target detection and tracking capabilities.
[0088] It is understandable that this stage does not involve the characteristics of fast-moving targets, but rather conducts extensive learning of the model through large-scale and diverse data, providing basic support for subsequent optimization training for fast-moving targets. The output of the pre-training is an initial target tracking model with basic target position prediction and trajectory tracking capabilities.
[0089] S2. Based on the fast-moving target tracking training set, the initial target tracking model is preliminarily trained in combination with the speed-sensitive loss function.
[0090] In this step, the fast-moving target tracking training set generated previously is used as input data, and a speed-sensitive loss function is introduced to train the model.
[0091] It should be noted that the speed-sensitive loss function plays a core role in this stage. By assigning higher loss weights to high-speed moving targets, the model is guided to focus on optimizing the characteristics of fast-moving targets. The goal of the initial training is to make the model initially adapt to the trajectory prediction and motion direction judgment of fast-moving targets, and improve the model's adaptability to fast-moving scenes.
[0092] S3. Based on the preliminary training results, readjust the sampling probability, generate an optimized fast-moving target tracking training set, and dynamically readjust the speed-sensitive loss function.
[0093] In an embodiment of the present application, after the preliminary training is completed, the performance of the model on the fast-moving target tracking training set is first analyzed in detail, including the prediction error and accuracy evaluation of high-speed targets, the error performance of low-speed or stationary targets, and the accuracy analysis of the motion direction prediction.
[0094] Then, based on the analysis results, the fast-moving target training set is optimized by readjusting the sampling probability to increase the proportion of high-speed target samples and reduce the redundancy of low-speed or stationary target samples, making the training data more targeted.
[0095] At the same time, the weight parameters of the speed-sensitive loss function are dynamically adjusted to make the loss function more adaptable to current training needs by strengthening the focus on high-speed targets and optimizing the constraints of directional errors.
[0096] S4. Adjust the learning rate and retrain the target tracking model using the optimized fast-moving target training set and the dynamically adjusted speed-sensitive loss function.
[0097] In the embodiment of the present application, the model is retrained with the support of the optimized training set and the dynamically adjusted loss function.
[0098] This phase of training uses a lower learning rate to ensure the stability of the model during parameter updates and to avoid training oscillations or overfitting. After this phase of training, the model's prediction accuracy and trajectory tracking capabilities for fast-moving targets are further improved.
[0099] S5. Repeat steps S3 and S4 until the speed-sensitive loss function of the target tracking model converges or reaches the maximum number of training rounds, thereby obtaining an optimized target tracking model suitable for fast-moving small targets.
[0100] In the embodiment of the present application, steps S3 and S4 are repeated, and the model's learning ability for fast-moving targets is continuously enhanced by optimizing the sampling strategy and loss function round by round.
[0101] Specifically, after each training, the performance of the model on the training set is re-analyzed, and the sampling strategy and weight parameters of the loss function are dynamically adjusted so that the model can gradually converge to a better state until the value of the speed-sensitive loss function stabilizes or reaches the preset maximum number of training rounds. This step-by-step optimization approach ensures that the model's final prediction performance reaches the best level. The final output of the optimized target tracking model significantly improves the trajectory prediction capability of small targets moving at high speeds, and has higher accuracy in predicting the direction of motion.
[0102] In addition, in order to verify the effectiveness of the target tracking method for fast-moving small targets proposed in this application, this embodiment designs a series of verification steps.
[0103] First, this embodiment calculates the target motion speed in each frame for the tracking task of a low-speed small drone. Then, according to the set speed threshold, combined with the comparison result of the target motion speed and the threshold, the sampling probability of the current frame is calculated, and the original data is resampled to generate a fast-moving target tracking data set. Then, based on the overall characteristics of the data set, such as the average motion speed, the hyperparameters of the loss function are set. Finally, according to the predetermined model training process, the target tracking model is trained to ensure its high-precision tracking capability and good generalization performance for fast-moving small targets.
[0104] In order to verify the performance of this method, the embodiment of the present application also uses the Anti-UAV target tracking dataset to conduct a small target tracking experiment. This embodiment first calculates the motion speed and sampling probability of each frame of the image for 151,890 images in the low-speed small target training dataset, and generates a high-speed moving target dataset based on probability sampling. Subsequently, the target tracking model was trained using this dataset and the speed-sensitive loss function, and the target tracking accuracy was used as a performance evaluation indicator. The target tracking accuracy is used to measure the degree of match between the tracking result and the actual target position, and is usually evaluated by calculating the overlap between the predicted bounding box and the actual bounding box.
[0105] In the embodiment of the present application, after predicting 152,840 test samples, the test results show that the average tracking accuracy of small targets is 74.38%, which is 6.02% higher than the traditional method. Among them, the average tracking accuracy of high-speed moving targets is 74.4%, which is 5.98% higher than the traditional method.
[0106] In summary, this application effectively improves the overall small target tracking accuracy by introducing dynamic sampling strategies and speed-sensitive loss functions, especially in tracking small targets moving at high speeds, greatly reducing the risk of target loss in fast-moving target scenarios. This innovative method successfully overcomes the bottleneck problem of existing technologies in the field of small target tracking, and can provide efficient target tracking solutions for drone tracking, autonomous driving, security monitoring and other fields.
[0107] In order to implement the above embodiment, the present application also proposes a target tracking device for fast-moving small targets. Figure 4 The following is a schematic diagram of a target tracking device for a fast-moving small target provided in an embodiment of the present application. Figure 4 As shown, the device comprises:
[0108] The speed calculation module 100 is used to monitor the position change of the target in the continuous frames of the original target tracking data set, and estimate the target movement speed by calculating the difference of the target position in adjacent frames;
[0109] The sampling probability adjustment module 200 is used to dynamically adjust the sampling probability of the video frame according to the target motion speed;
[0110] The resampling module 300 is used to perform probability resampling on the original target tracking data set according to the adjusted sampling probability of each frame to generate a fast-moving target tracking training set;
[0111] A loss function construction module 400 is used to determine hyper parameters of a speed-sensitive loss function based on image features of a fast-moving target tracking training set;
[0112] The training module 500 is used to perform iterative optimization training of the target tracking model using the fast-moving target tracking training set and the speed-sensitive loss function to obtain an optimized target tracking model suitable for fast-moving small targets.
[0113] In order to implement the above embodiments, the present application also proposes an electronic device, comprising: a processor, and a memory communicatively connected to the processor; the memory stores computer-executable instructions; the processor executes the computer-executable instructions stored in the memory to implement the method provided by the above embodiments.
[0114] In order to implement the above embodiments, the present application also proposes a computer-readable storage medium, in which computer-executable instructions are stored. When the computer-executable instructions are executed by a processor, they are used to implement the methods provided by the above embodiments.
[0115] In order to implement the above embodiments, the present application also proposes a computer program product, including a computer program, which implements the methods provided by the above embodiments when executed by a processor.
[0116] The collection, storage, use, processing, transmission, provision and disclosure of user personal information involved in this application are in compliance with relevant laws and regulations and do not violate public order and good morals.
[0117] It should be noted that personal information from users should be collected for legitimate and reasonable purposes and should not be shared or sold outside of these legitimate uses. In addition, such collection / sharing should be carried out after receiving the user's informed consent, including but not limited to notifying the user to read the user agreement / user notice and sign the agreement / authorization including authorization of relevant user information before the user uses the function. In addition, any necessary steps should be taken to protect and safeguard access to such personal information data and ensure that others who have access to personal information data comply with its privacy policy and procedures.
[0118] The present application is expected to provide an implementation scheme for users to selectively block the use or access of personal information data. That is, the present disclosure is expected to provide hardware and / or software to prevent or block access to such personal information data. Once the personal information data is no longer needed, the risk can be minimized by limiting data collection and deleting the data. In addition, when applicable, such personal information is de-identified to protect the privacy of the user.
[0119] In the description of the aforementioned embodiments, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, unless they contradict each other.
[0120] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In the description of this application, the meaning of "plurality" is at least two, such as two, three, etc., unless otherwise clearly and specifically defined.
[0121] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, fragment or portion of code comprising one or more executable instructions for implementing the steps of a custom logical function or process, and the scope of the preferred embodiments of the present application includes alternative implementations in which functions may not be performed in the order shown or discussed, including performing functions in a substantially simultaneous manner or in the reverse order depending on the functions involved, which should be understood by technicians in the technical field to which the embodiments of the present application belong.
[0122] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute instructions), or in combination with these instruction execution systems, devices or apparatuses. For the purposes of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in combination with these instruction execution systems, devices or apparatuses. More specific examples (non-exhaustive list) of computer-readable media include the following: an electrical connection with one or more wires (electronic device), a portable computer disk box (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium and then editing, interpreting or processing in other suitable ways if necessary, and then stored in a computer memory.
[0123] It should be understood that the various parts of the present application can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, multiple steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.
[0124] A person skilled in the art may understand that all or part of the steps in the method for implementing the above-mentioned embodiment may be completed by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, which, when executed, includes one or a combination of the steps of the method embodiment.
[0125] In addition, each functional unit in each embodiment of the present application may be integrated into a processing module, or each unit may exist physically separately, or two or more units may be integrated into one module. The above-mentioned integrated module may be implemented in the form of hardware or in the form of a software functional module. If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it may also be stored in a computer-readable storage medium.
[0126] The storage medium mentioned above may be a read-only memory, a magnetic disk or an optical disk, etc. Although the embodiments of the present application have been shown and described above, it can be understood that the above embodiments are exemplary and cannot be understood as limiting the present application. A person of ordinary skill in the art may change, modify, replace and modify the above embodiments within the scope of the present application.
[0127] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this application can be executed in parallel, sequentially or in different orders, as long as the expected results of the technical solution of this application can be achieved, and this document is not limited here.
[0128] The above specific implementations do not constitute a limitation on the protection scope of this application. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of this application should be included in the protection scope of this application.
Claims
1. A target tracking method for a fast-moving small target, characterized in that: The following steps are involved: The position change of the target is monitored in the continuous frames of the original target tracking dataset, and the target movement speed is estimated by calculating the difference of the target position in adjacent frames; Dynamically adjusting the sampling probability of the video frame according to the target motion speed; Probabilistically resampling the original target tracking data set according to the adjusted sampling probability of each frame to generate a fast-moving target tracking training set; Determining hyperparameters of a speed-sensitive loss function based on image features of the fast-moving target tracking training set; Using the fast-moving target tracking training set and the speed-sensitive loss function, iterative optimization training of the target tracking model is performed to obtain an optimized target tracking model suitable for fast-moving small targets; The step of determining the hyperparameters of the speed-sensitive loss function based on the image features of the fast-moving target tracking training set includes: Extracting multi-dimensional image features of the target from the fast-moving target tracking training set, wherein the multi-dimensional image features include the motion trajectory features, spatial distribution features, and motion speed change trends of the target; Constructing speed loss function , where the loss weight is adjusted according to the target's moving speed, and the corresponding weight is assigned to the small target whose moving speed reaches the preset threshold; Constructing the position loss function , assuming is the true value of the small target motion vector in adjacent frames, is the estimated value of the small target motion vector, for and The angle between the adjacent frames is: in, Used to quantify the distance error of the vector endpoint, is the constraint of angle error; Combine the speed loss function and the position loss function to construct a complete speed-sensitive loss function , the expression is: in, and are the weight parameters of the speed loss function and the position loss function respectively.
2. The method according to claim 1, characterized in that: The dynamically adjusting the sampling probability of the video frame according to the target motion speed includes: Set the speed threshold of the target movement speed ; The target movement speed With the speed threshold Make comparisons and determine the sampling probability.
3. The method according to claim 2, characterized in that The target movement speed With the speed threshold Compare and determine sampling probability, including: When the target movement speed Greater than or equal to the speed threshold When , the sampling probability is set to 1 and the frame is retained; When the target movement speed Less than the speed threshold When The ratio of is taken as the sampling probability of the frame.
4. The method according to claim 3, characterized in that The method uses the fast-moving target tracking training set and the speed-sensitive loss function to perform iterative optimization training of the target tracking model to obtain an optimized target tracking model suitable for fast-moving small targets, including: S1. Pre-training the model using the original target tracking data set to obtain an initial target tracking model; S2, performing preliminary training on the initial target tracking model according to the fast-moving target tracking training set and in combination with the speed-sensitive loss function; S3. Readjust the sampling probability according to the preliminary training results, generate an optimized fast-moving target tracking training set, and dynamically readjust the speed-sensitive loss function; S4, adjust the learning rate, and retrain the target tracking model using the optimized fast-moving target training set and the dynamically adjusted speed-sensitive loss function; S5. Repeat steps S3 and S4 until the speed-sensitive loss function of the target tracking model converges or reaches the maximum number of training rounds, thereby obtaining an optimized target tracking model suitable for fast-moving small targets.
5. A target tracking device for a fast-moving small target, characterized in that: include: The speed calculation module is used to monitor the position change of the target in the continuous frames of the original target tracking data set and estimate the target movement speed by calculating the difference of the target position in adjacent frames; A sampling probability adjustment module, used to dynamically adjust the sampling probability of the video frame according to the target motion speed; A resampling module, used for performing probability resampling on the original target tracking data set according to the adjusted sampling probability of each frame to generate a fast-moving target tracking training set; A loss function construction module, used to determine the hyper parameters of the speed-sensitive loss function based on the image features of the fast-moving target tracking training set; A training module, used to use the fast-moving target tracking training set and the speed-sensitive loss function to perform iterative optimization training of a target tracking model to obtain an optimized target tracking model suitable for fast-moving small targets; The step of determining the hyperparameters of the speed-sensitive loss function based on the image features of the fast-moving target tracking training set includes: Extracting multi-dimensional image features of the target from the fast-moving target tracking training set, wherein the multi-dimensional image features include the motion trajectory features, spatial distribution features, and motion speed change trends of the target; Constructing speed loss function , where the loss weight is adjusted according to the target's moving speed, and the corresponding weight is assigned to the small target whose moving speed reaches the preset threshold; Constructing the position loss function , assuming is the true value of the small target motion vector in adjacent frames, is the estimated value of the small target motion vector, for and The angle between the adjacent frames is: in, Used to quantify the distance error of the vector endpoint, is the constraint of angle error; Combine the speed loss function and the position loss function to construct a complete speed-sensitive loss function , the expression is: in, and are the weight parameters of the speed loss function and the position loss function respectively.
6. An electronic device, characterized in that: include: A processor, and a memory communicatively connected to the processor; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory to implement the method according to any one of claims 1 to 4.
7. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, which are used to implement the method according to any one of claims 1 to 4 when executed by a processor.
8. A computer program product, characterized in that The invention comprises a computer program, which implements the method according to any one of claims 1 to 4 when being executed by a processor.
Citation Information
Patent Citations
Object tracking method and device and vehicle
CN114842050A
Multi-target tracking system used in large scene
CN118397042A