Target tracking method and system, computer equipment and storage medium
The target tracking method improves accuracy by predicting motion patterns and refining Kalman filtering with neural networks, addressing unstable detection issues in autonomous driving systems.
Patent Information
- Application Number
- CN202411330216.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-24
- Publication Date
- 2024-12-31
AI Technical Summary
Existing target tracking methods, particularly in autonomous driving, suffer from inaccuracies due to unstable vehicle detection, leading to incorrect judgments and large errors in tracking, especially when vehicles are stationary or moving with orientation deviations.
A target tracking method that predicts motion patterns based on detection data from multiple frames, determines the actual state by calculating change values and thresholds, and uses Kalman filtering to refine the state estimation, incorporating a neural network model for feature extraction and long-term dependency analysis.
Enhances tracking accuracy by predicting motion modes and adjusting Kalman filtering based on historical data, reducing errors and improving system stability and response speed.
Smart Images

Figure CN119228855A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of target tracking, and in particular to a target tracking method, system, computer equipment and storage medium. Background Art
[0002] Multi-Object Tracking (MOT) is a key technology in the field of autonomous driving. At present, when performing multi-target tracking, Kalman filter is generally used for filtering to predict the target state. Kalman filter algorithm is widely used in the field of target tracking. Kalman filter can estimate the state of dynamic system from a series of data with measurement noise when the measurement variance is known, and can effectively remove noise and restore real data.
[0003] However, in actual scenarios, due to the instability of detection, a stationary vehicle waiting for a red light at an intersection will appear to shake in the detection data, resulting in shaking in the normal multi-target tracking (MOT) results. Similarly, a moving vehicle may have position and orientation deviations due to unstable detection, causing the Kalman filter to make incorrect judgments, such as mistakenly thinking that the vehicle needs to turn, which ultimately causes the Kalman filter to output information with large errors, affecting tracking accuracy. Summary of the invention
[0004] In view of this, in order to overcome at least one aspect of the above problems, an embodiment of the present invention proposes a target tracking method of a fusion sensing device, comprising the following steps: Get the detection data of the first N frames of the target; Predicting a motion pattern of the target based on the detection data of the first N frames; Get the detection data of the target's N+1th frame; An actual state of the target in the N+1th frame is determined based on the motion pattern, the detection data of the Nth frame, and the detection data of the N+1th frame.
[0005] In some embodiments, determining the actual state of the target in the N+1th frame based on the motion pattern, the detection data of the Nth frame, and the detection data of the N+1th frame further includes: In response to the motion mode being a non-stationary state, calculating a position change value and a direction change value of the target based on the detection data of the N+1th frame and the detection data of the Nth frame; Obtaining a position change threshold and a direction change threshold corresponding to the actual motion state of the target; Calculating the observation variance based on the position change value and the orientation change value of the target, and the position change threshold and the orientation change threshold corresponding to the actual motion state of the target; Kalman filtering is performed based on the observed variance to determine the actual state of the target in the N+1th frame.
[0006] In some embodiments, determining the actual state of the target in the N+1th frame based on the motion pattern, the detection data of the Nth frame, and the detection data of the N+1th frame further includes: In response to the motion mode being a stationary state, the state corresponding to the detection data of the Nth frame is used as the actual state of the target in the N+1th frame.
[0007] In some embodiments, acquiring detection data of the first N frames of the target further includes: Acquire detection data of the target in each frame, wherein the detection data includes a center point abscissa, a center point ordinate, a direction, a target length, a target width, and a target type; Using each of the abscissas of the center point to construct an abscissa vector, using each of the ordinates of the center point to construct an ordinate vector, and using each of the directions to construct an orientation vector; The abscissa vector, the ordinate vector, the orientation vector, the target length, the target width, and the target type are preprocessed.
[0008] In some embodiments, predicting the motion pattern of the target based on the first N frames of detection data further includes: Get the trained prediction model; The preprocessed horizontal coordinate vector, the vertical coordinate vector, the orientation vector, the target length, the target width and the target type are input as input data to the prediction model to predict the motion mode of the target.
[0009] In some embodiments, the preprocessed abscissa vector, ordinate vector, orientation vector, target length, target width, and target type are input into the prediction model to predict the motion mode of the target, further comprising: Using the convolutional neural network of the prediction model to extract features from the input data; Inputting the features extracted by the convolutional neural network into the long short-term memory network of the prediction model for calculation; Adding the calculation results of the long short-term memory network and the features extracted by the convolutional neural network and inputting them into the fully connected feedforward neural network of the prediction model; The output of the fully connected feedforward neural network is used as the motion pattern of the target.
[0010] In some embodiments, preprocessing the abscissa vector, the ordinate vector, the orientation vector, the target length, the target width, and the target type further includes: Calculate a first average value of the maximum and minimum values of all elements of the abscissa vector and subtract the first average value from each element; Calculate a second average value of the maximum and minimum values of all elements of the ordinate vector and subtract the second average value from each element; Calculate a third average value of the maximum and minimum values of all elements of the direction vector and subtract the third average value from each element; Dividing the target length by a preset length normalization hyperparameter; Divide the target width by a preset width normalization hyperparameter; Divide the target type by the preset type normalization hyperparameter.
[0011] Based on the same inventive concept, according to another aspect of the present invention, an embodiment of the present invention further provides a target tracking system, comprising: A first acquisition module is configured to acquire detection data of the first N frames of the target; A prediction module, configured to predict the motion pattern of the target based on the first N frames of detection data; A second acquisition module is configured to acquire detection data of the target at the N+1th frame; The calculation module is configured to determine the actual state of the target in the N+1th frame based on the motion pattern, the detection data of the Nth frame, and the detection data of the N+1th frame.
[0012] Based on the same inventive concept, according to another aspect of the present invention, an embodiment of the present invention further provides a computer device, including: at least one processor; and A memory storing a computer program executable on the processor, wherein the processor executes the steps of any one of the target tracking methods of the fusion perception device as described above when executing the program.
[0013] Based on the same inventive concept, according to another aspect of the present invention, an embodiment of the present invention also provides a computer-readable storage medium, which stores a computer program, and when the computer program is executed by a processor, it performs the steps of the target tracking method of any one of the fusion perception devices described above.
[0014] The present invention has one of the following beneficial technical effects: the scheme proposed in the present invention pre-judges the motion mode of the target by the detection data of the first N frames of the target, and then determines the actual state of the N+1 frame in combination with the motion mode and the detection data of the N+1 frame, thereby obtaining a more accurate tracking effect. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present invention. For ordinary technicians in this field, other embodiments can be obtained based on these drawings without paying creative work.
[0016] Figure 1 A schematic diagram of a target tracking method according to an embodiment of the present invention; Figure 2 A schematic diagram of the structure of a prediction model provided by an embodiment of the present invention; Figure 3 A schematic diagram of the structure of a target tracking system provided by an embodiment of the present invention; Figure 4 A schematic diagram of the structure of a computer device provided by an embodiment of the present invention; Figure 5 A schematic diagram of the structure of a computer-readable storage medium provided for an embodiment of the present invention. DETAILED DESCRIPTION
[0017] In order to make the objectives, technical solutions and advantages of the present invention more clearly understood, the embodiments of the present invention are further described in detail below in combination with specific embodiments and with reference to the accompanying drawings.
[0018] It should be noted that all expressions using "first" and "second" in the embodiments of the present invention are for distinguishing two non-identical entities with the same name or non-identical parameters. It can be seen that "first" and "second" are only for the convenience of expression and should not be understood as limitations on the embodiments of the present invention. The subsequent embodiments will not explain this one by one.
[0019] In the embodiment of the present invention, the target direction takes a value from -180° to 180°, with the east direction being 0°.
[0020] According to one aspect of the present invention, an embodiment of the present invention provides a target tracking method of a fusion sensing device, such as Figure 1 As shown, it may include the steps of: S1, obtain the detection data of the first N frames of the target; S2, predicting the motion pattern of the target based on the detection data of the first N frames; S3, obtaining the detection data of the target at the N+1th frame; S4, determining the actual state of the target in the N+1th frame based on the motion pattern, the detection data of the Nth frame, and the detection data of the N+1th frame.
[0021] The solution proposed in the present invention pre-judges the target's motion mode by detecting data of the first N frames of the target, and then determines the actual state of the N+1 frame in combination with the motion mode and the detection data of the N+1 frame, thereby obtaining a more accurate tracking effect.
[0022] In some embodiments, determining the actual state of the target at the N+1th frame based on the motion pattern, the detection data of the Nth frame, and the detection data of the N+1th frame further includes: In response to the motion mode being a non-stationary state, calculating a position change value and a direction change value of the target based on the detection data of the N+1th frame and the detection data of the Nth frame; Obtaining a position change threshold and a direction change threshold corresponding to the actual motion state of the target; Calculating the observation variance based on the position change value and the orientation change value of the target, and the position change threshold and the orientation change threshold corresponding to the actual motion state of the target; Kalman filtering is performed based on the observed variance to determine the actual state of the target in the N+1th frame.
[0023] Specifically, if the target is predicted to be in a non-stationary state based on the detection data of the first N frames of the target, for example, the target is in a straight state, a turning state, or a U-turn state, then the position change value and orientation change value of the target in the N+1 frame relative to the N frame are calculated. For example, if the position coordinates of the target in the N frame are (x1, y1) and the position coordinates in the N+1 frame are (x2, y2), then the position change value can be expressed as Δx = x2-x1, Δy = y2-y1. Similarly, the orientation change value Δh can be obtained by calculating the orientation change of the target between the two frames.
[0024] Different motion states have different position change thresholds (Δx', Δy') and orientation change thresholds (Δh'), that is, the straight state, turning state or U-turn state correspond to different position change and orientation change thresholds. The specific values of these thresholds can be set based on experience, experimental data or specific application scenarios. For example, a target moving fast may change more between two adjacent frames, so a larger position change threshold and orientation change threshold can be set, while a target moving slowly may change less between two adjacent frames, so a smaller threshold can be set.
[0025] After determining the corresponding threshold, the observation variance can be calculated based on the position change value and the orientation change value, the position change threshold and the orientation change threshold. The observation variance reflects the degree of difference between the actual observation value and the expected value. In some embodiments, the observation variance It can be obtained based on the following formula:
[0026] in, d is (Δx, Δy, Δh), is (Δx', Δy', Δh'), The specific value of the weight can be set according to experience, experimental data or specific application scenarios.
[0027] Finally, Kalman filtering is performed based on the observed variance to determine the actual state of the target in the N+1th frame. Kalman filtering is a state estimation method that can estimate the state of the system based on the dynamic model of the system and the observed data. The Kalman filtering process includes two stages: prediction and update. In the prediction stage, the state of the target is predicted based on the dynamic model of the system; in the update stage, the state estimate of the target is updated by calculating the Kalman gain in combination with the observed data and the predicted results. By continuously iterating this process, a more accurate estimate of the target state can be obtained.
[0028] By judging the actual state of the target in the current frame based on the historical trajectory and calculating the observation variance based on the actual state, the filter can be fine-tuned based on the observation variance during Kalman filtering to obtain a more accurate tracking effect. For example, when the target is moving straight, if the detected data is unstable, there will be position and orientation deviations, which may cause the Kalman filter to mistakenly think that the vehicle needs to turn, so the orientation and position will follow the filter and have corresponding deviations. Before filtering, if it can be predicted that the vehicle is still moving straight based on the historical trajectory, the observation variance in the filter can be increased, thereby outputting a more accurate prediction result.
[0029] In some embodiments, determining the actual state of the target at the N+1th frame based on the motion pattern, the detection data of the Nth frame, and the detection data of the N+1th frame further includes: In response to the motion mode being a stationary state, the state corresponding to the detection data of the Nth frame is used as the actual state of the target in the N+1th frame.
[0030] Specifically, when it is determined that the target's motion mode is stationary, the state corresponding to the detection data of the Nth frame can be directly used as the actual state of the target in the N+1 frame. Because in the stationary state, the change of the target between adjacent frames is small or negligible. If the target is in a completely stationary state, its position, orientation and other features in consecutive frames should remain unchanged. Therefore, the state of the previous frame can be directly used as the state of the current frame without complex calculations and analysis. This can reduce the computational burden of the system and improve the response speed and stability of the system.
[0031] In some embodiments, acquiring detection data of the first N frames of the target further includes: Acquire detection data of the target in each frame, wherein the detection data includes a center point abscissa, a center point ordinate, a direction, a target length, a target width, and a target type; Using each of the abscissas of the center point to construct an abscissa vector, using each of the ordinates of the center point to construct an ordinate vector, and using each of the directions to construct an orientation vector; The abscissa vector, the ordinate vector, the orientation vector, the target length, the target width, and the target type are preprocessed.
[0032] Specifically, when detecting the target, the horizontal coordinate of the center point of the target in each frame, the vertical coordinate of the center point, the direction, the target length, the target width and the target type can be detected. Then the horizontal coordinate, vertical coordinate and direction data of each frame are respectively integrated into the vector, that is, the horizontal coordinate of each frame is integrated into the horizontal coordinate vector, the vertical coordinate of the center point of each frame is integrated into the vertical coordinate vector, and the direction of each frame is integrated into the direction vector, so that each element in the horizontal coordinate vector represents the horizontal coordinate value of the center point of the target in different frames, and the vertical coordinate vector and the direction vector are the same. By integrating the same type of data into vectors respectively, subsequent unified processing can be facilitated. Finally, the horizontal coordinate vector, the vertical coordinate vector, the direction vector, the target length, the target width and the target type are pre-processed, such as standardization, to make the data more suitable for subsequent analysis and processing.
[0033] In some embodiments, predicting the motion pattern of the target based on the first N frames of detection data further includes: Get the trained prediction model; The preprocessed horizontal coordinate vector, the vertical coordinate vector, the orientation vector, the target length, the target width and the target type are input as input data to the prediction model to predict the motion mode of the target.
[0034] Specifically, after the above data processing, a prediction model is used to make a prediction based on the horizontal coordinate vector, the vertical coordinate vector, the orientation vector, the target length, the target width and the target type, so as to obtain the motion pattern of the target.
[0035] In some embodiments, when training the prediction model, training data can be obtained from multiple intersections, for example, multiple intersections are selected, and target data of the M-meter section before the intersection, the middle section of the intersection, and the M-meter section after the intersection are collected. And the section can contain a place for turning around or contain the entrance and exit of the community and the mall, that is, the trajectory of the target can contain multiple situations such as straight, stationary, turning and turning. Then, in all the continuous detection data of the target, the position, direction, length, width, height, type and other data of each frame are obtained, and the continuous trajectory of each traffic participant is segmented with a sliding window of N frames and a step size of 1. Each segment contains N frames of data. If the total number of detection data is M frames, M-N+1 segments will be obtained, and the data of the M-N+1 segments will be preprocessed. The annotation personnel will annotate and classify the segmented data according to the graphics of the trajectory of each segment, and determine whether the last frame is stationary, straight, turning or turning. Then the prediction model is trained with the annotated M-N+1 segmented data.
[0036] In some embodiments, in addition to preprocessing the data of the M-N+1 segments, in order to improve the generalization ability of the model, the data of the M-N+1 segments can also be enhanced, such as randomly scaling the values of the horizontal and vertical coordinates and adding random noise to the direction. Since the sampled vehicle data may have uneven data distribution, which will cause the error of the detection result to increase, the data can be resampled to balance the training set samples to further improve the model detection ability.
[0037] In some embodiments, the preprocessed abscissa vector, ordinate vector, orientation vector, target length, target width, and target type are input into the prediction model to predict the motion mode of the target, further comprising: Using the convolutional neural network of the prediction model to extract features from the input data; Inputting the features extracted by the convolutional neural network into the long short-term memory network of the prediction model for calculation; Adding the calculation results of the long short-term memory network and the features extracted by the convolutional neural network and inputting them into the fully connected feedforward neural network of the prediction model; The output of the fully connected feedforward neural network is used as the motion pattern of the target.
[0038] Specifically, Figure 2As shown, the prediction model can include convolutional neural network (CNN), long short-term memory network (LSTM), residual connection (Residual Connection), and feed-forward neural network (FFN).
[0039] When making predictions, CNN can input data sequences to extract local features and obtain high-dimensional feature vectors through activation functions.
[0040] Then, LSTM is used to extract short-term dependencies in the sequence. Specifically, in the input layer of LSTM, the output of CNN is transformed to serve as the input of LSTM, and then the long-term dependencies in the sequence are captured. In the output layer, the output of the last time step is selected as the prediction result of the entire sequence, and the LOSS curve of the output of the last time step can be used to judge the training and learning effect of the model during the training stage.
[0041] As the number of deep learning network layers increases, problems such as model overfitting and network degradation will occur. Therefore, residual connections are added to add the calculation results of LSTM to the features extracted by CNN and then input into FFN, thereby solving problems such as overfitting and network degradation, and also helping to improve the performance of the model. Finally, the output of FFN is used as the motion pattern of the target.
[0042] In some embodiments, preprocessing the abscissa vector, the ordinate vector, the orientation vector, the target length, the target width, and the target type further includes: Calculate a first average value of the maximum and minimum values of all elements of the abscissa vector and subtract the first average value from each element; Calculate a second average value of the maximum and minimum values of all elements of the ordinate vector and subtract the second average value from each element; Calculate a third average value of the maximum and minimum values of all elements of the direction vector and subtract the third average value from each element; Dividing the target length by a preset length normalization hyperparameter; Divide the target width by a preset width normalization hyperparameter; Divide the target type by the preset type normalization hyperparameter.
[0043] Specifically, in order to speed up the convergence speed and generalization ability of the model, the data can be preprocessed in advance, such as standardization. The standardization can be performed based on the following formula: ; Where max(x) is the maximum value of all elements of the horizontal coordinate vector, min(x) is the minimum value of all elements of the horizontal coordinate vector, and x is an element in the horizontal coordinate vector; ; Where max(y) is the maximum value among all elements of the ordinate vector, min(y) is the minimum value among all elements of the ordinate vector, and y is an element in the ordinate vector; ; To detect the target movement direction; Where max(h) is the maximum value among all elements of the heading vector, min(h) is the minimum value among all elements of the heading vector, and h is an element in the heading vector; ; To detect the target length, Normalize the hyperparameter to a pre-set length; ; To detect the target width, is the preset width normalization hyperparameter; ; To detect the target type enumeration value (used to limit and clarify the specific value of the target type), Normalizes hyperparameters for a pre-defined type.
[0044] The solution proposed in the present invention pre-judges the target's motion mode by detecting data of the first N frames of the target, and then determines the actual state of the N+1 frame in combination with the motion mode and the detection data of the N+1 frame, thereby obtaining a more accurate tracking effect.
[0045] Based on the same inventive concept, according to another aspect of the present invention, an embodiment of the present invention further provides a target tracking system 400, such as Figure 3 As shown, including: A first acquisition module 401 is configured to acquire detection data of the first N frames of the target; A prediction module 402 is configured to predict the motion pattern of the target based on the first N frames of detection data; The second acquisition module 403 is configured to acquire the detection data of the target at the N+1th frame; The calculation module 404 is configured to determine the actual state of the target in the N+1th frame based on the motion pattern, the detection data of the Nth frame, and the detection data of the N+1th frame.
[0046] In some embodiments, the calculation module 404 is further configured to: In response to the motion mode being a non-stationary state, calculating a position change value and a direction change value of the target based on the detection data of the N+1th frame and the detection data of the Nth frame; Obtaining a position change threshold and a direction change threshold corresponding to the actual motion state of the target; Calculating the observation variance based on the position change value and the orientation change value of the target, and the position change threshold and the orientation change threshold corresponding to the actual motion state of the target; Kalman filtering is performed based on the observed variance to determine the actual state of the target in the N+1th frame.
[0047] In some embodiments, the calculation module 404 is further configured to: In response to the motion mode being a stationary state, the state corresponding to the detection data of the Nth frame is used as the actual state of the target in the N+1th frame.
[0048] In some embodiments, the first acquisition module 401 is further configured to: Acquire detection data of the target in each frame, wherein the detection data includes a center point abscissa, a center point ordinate, a direction, a target length, a target width, and a target type; Using each of the abscissas of the center point to construct an abscissa vector, using each of the ordinates of the center point to construct an ordinate vector, and using each of the directions to construct an orientation vector; The abscissa vector, the ordinate vector, the orientation vector, the target length, the target width, and the target type are preprocessed.
[0049] In some embodiments, the prediction module 402 is further configured to: Get the trained prediction model; The preprocessed horizontal coordinate vector, the vertical coordinate vector, the orientation vector, the target length, the target width and the target type are input as input data to the prediction model to predict the motion mode of the target.
[0050] In some embodiments, the prediction module 402 is further configured to: Using the convolutional neural network of the prediction model to extract features from the input data; Inputting the features extracted by the convolutional neural network into the long short-term memory network of the prediction model for calculation; Adding the calculation results of the long short-term memory network and the features extracted by the convolutional neural network and inputting them into the fully connected feedforward neural network of the prediction model; The output of the fully connected feedforward neural network is used as the motion pattern of the target.
[0051] In some embodiments, the first acquisition module 401 is further configured to: Calculate a first average value of the maximum and minimum values of all elements of the abscissa vector and subtract the first average value from each element; Calculate a second average value of the maximum and minimum values of all elements of the ordinate vector and subtract the second average value from each element; Calculate a third average value of the maximum and minimum values of all elements of the direction vector and subtract the third average value from each element; Dividing the target length by a preset length normalization hyperparameter; Divide the target width by a preset width normalization hyperparameter; Divide the target type by the preset type normalization hyperparameter.
[0052] Based on the same inventive concept, according to another aspect of the present invention, Figure 4 As shown, an embodiment of the present invention further provides a computer device 501, including: at least one processor 520; and The memory 510 stores a computer program 511 that can be run on the processor. When the processor 520 executes the program, the steps of any of the above target tracking methods of the fusion perception device are performed.
[0053] Based on the same inventive concept, according to another aspect of the present invention, Figure 5 As shown, an embodiment of the present invention further provides a computer-readable storage medium 601, which stores a computer program 610. When the computer program 610 is executed by a processor, the steps of the target tracking method of any of the above fusion perception devices are performed.
[0054] Finally, it should be noted that a person skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be implemented by instructing related hardware through a computer program, and the program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods.
[0055] Furthermore, it should be appreciated that the computer-readable storage medium (eg, memory) herein may be either volatile memory or nonvolatile memory, or may include both volatile memory and nonvolatile memory.
[0056] It will also be appreciated by those skilled in the art that various exemplary logic blocks, modules, circuits and algorithm steps described in conjunction with the disclosure herein can be implemented as electronic hardware, computer software or a combination of the two. In order to clearly illustrate this interchangeability of hardware and software, a general description has been given to the functions of various schematic components, blocks, modules, circuits and steps. Whether this function is implemented as software or hardware depends on specific applications and the design constraints imposed on the entire system. Those skilled in the art can implement the function in various ways for each specific application, but this implementation decision should not be interpreted as causing a departure from the disclosed scope of the embodiments of the present invention.
[0057] The above are exemplary embodiments disclosed in the present invention, but it should be noted that various changes and modifications may be made without departing from the scope disclosed in the embodiments of the present invention as defined in the claims. The functions, steps and / or actions of the method claims according to the disclosed embodiments described herein do not need to be performed in any particular order. In addition, although the elements disclosed in the embodiments of the present invention may be described or required in individual form, they may also be understood as multiple unless explicitly limited to the singular.
[0058] It should be understood that, as used herein, the singular forms "a", "an" are intended to include the plural forms as well, unless the context clearly supports an exception. It should also be understood that, as used herein, "and / or" refers to any and all possible combinations including one or more of the associated listed items.
[0059] The serial numbers of the embodiments disclosed in the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.
[0060] A person skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware or by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a disk or an optical disk, etc.
[0061] A person skilled in the art should understand that the discussion of any of the above embodiments is only exemplary and is not intended to imply that the scope of the disclosure of the embodiments of the present invention (including the claims) is limited to these examples; under the concept of the embodiments of the present invention, the technical features in the above embodiments or different embodiments can also be combined, and there are many other changes in different aspects of the above embodiments of the present invention, which are not provided in detail for the sake of simplicity. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the embodiments of the present invention should be included in the protection scope of the embodiments of the present invention.
Claims
1. A target tracking method, characterized in that: The following steps are involved: Get the detection data of the first N frames of the target; Predicting a motion pattern of the target based on the detection data of the first N frames; Get the detection data of the target's N+1th frame; An actual state of the target in the N+1th frame is determined based on the motion pattern, the detection data of the Nth frame, and the detection data of the N+1th frame.
2. The method according to claim 1, characterized in that Determining the actual state of the target in the N+1th frame based on the motion pattern, the detection data of the Nth frame, and the detection data of the N+1th frame, further comprising: In response to the motion mode being a non-stationary state, calculating a position change value and a direction change value of the target based on the detection data of the N+1th frame and the detection data of the Nth frame; Obtaining a position change threshold and a direction change threshold corresponding to the actual motion state of the target; Calculating the observation variance based on the position change value and the orientation change value of the target, and the position change threshold and the orientation change threshold corresponding to the actual motion state of the target; Kalman filtering is performed based on the observed variance to determine the actual state of the target in the N+1th frame.
3. The method according to claim 1, characterized in that Determining the actual state of the target in the N+1th frame based on the motion pattern, the detection data of the Nth frame, and the detection data of the N+1th frame, further comprising: In response to the motion mode being a stationary state, the state corresponding to the detection data of the Nth frame is used as the actual state of the target in the N+1th frame.
4. The method according to claim 1, characterized in that Acquiring detection data of the first N frames of the target further includes: Acquire detection data of the target in each frame, wherein the detection data includes a center point abscissa, a center point ordinate, a direction, a target length, a target width, and a target type; Using each of the abscissas of the center point to construct an abscissa vector, using each of the ordinates of the center point to construct an ordinate vector, and using each of the directions to construct an orientation vector; The abscissa vector, the ordinate vector, the orientation vector, the target length, the target width, and the target type are preprocessed.
5. The method according to claim 4, characterized in that Predicting the motion mode of the target based on the first N frames of detection data further includes: Get the trained prediction model; The preprocessed horizontal coordinate vector, the vertical coordinate vector, the orientation vector, the target length, the target width and the target type are input as input data to the prediction model to predict the motion mode of the target.
6. The method according to claim 5, characterized in that Inputting the preprocessed abscissa vector, ordinate vector, orientation vector, target length, target width and target type into the prediction model to predict the motion mode of the target, further comprising: Using the convolutional neural network of the prediction model to extract features from the input data; Inputting the features extracted by the convolutional neural network into the long short-term memory network of the prediction model for calculation; Adding the calculation results of the long short-term memory network and the features extracted by the convolutional neural network and inputting them into the fully connected feedforward neural network of the prediction model; The output of the fully connected feedforward neural network is used as the motion pattern of the target.
7. The method according to claim 4, characterized in that Preprocessing the abscissa vector, the ordinate vector, the orientation vector, the target length, the target width, and the target type further includes: Calculate a first average value of the maximum and minimum values of all elements of the abscissa vector and subtract the first average value from each element; Calculate a second average value of the maximum and minimum values of all elements of the ordinate vector and subtract the second average value from each element; Calculate a third average value of the maximum and minimum values of all elements of the direction vector and subtract the third average value from each element; Dividing the target length by a preset length normalization hyperparameter; Divide the target width by a preset width normalization hyperparameter; Divide the target type by the preset type normalization hyperparameter.
8. A target tracking system, characterized in that: include: A first acquisition module is configured to acquire detection data of the first N frames of the target; A prediction module, configured to predict the motion pattern of the target based on the first N frames of detection data; A second acquisition module is configured to acquire detection data of the target at the N+1th frame; The calculation module is configured to determine the actual state of the target in the N+1th frame based on the motion pattern, the detection data of the Nth frame, and the detection data of the N+1th frame.
9. A computer device comprising: at least one processor; as well as A memory storing a computer program executable on the processor, wherein the processor executes the steps of the method according to any one of claims 1 to 7 when executing the program.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are performed.
