Target tracking method and device, equipment and storage medium
Through frame-by-frame matching and observation state management, the problem of the target tracking performance degradation in complex scenarios is solved, which reduces misjudgment and improves the accuracy and tracking stability of target positioning.
Patent Information
- Application Number
- CN202411221870.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-02
- Publication Date
- 2025-01-10
AI Technical Summary
The tracking performance of existing target tracking algorithms significantly decreases when dealing with complex scenarios, resulting in misjudgment and affecting the accuracy of target positioning.
By treating the identified video stream frame by frame, the detection box and prediction track are matched, and if the match is not successful, it will enter the observation state, continuously track and detect whether the set conditions are met, avoid unnecessary tracking interrupts, and maintain the continuity of tracking and stability.
Reduce misjudgment in complex scenarios, improve the accuracy and stability of target tracking, adapt to changeable environment changes, and avoid wrong target loss and tracking failure.
Smart Images

Figure CN119295508A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer vision, and in particular to a target tracking method, device, equipment and storage medium. Background Art
[0002] In the field of computer vision, object tracking is an important research direction, which aims to estimate the position and state of the target in the video sequence. This technology has a wide range of applications in intelligent monitoring, autonomous driving, human-computer interaction and other fields. In recent years, with the development of deep learning, the object tracking algorithm based on deep learning has made significant progress.
[0003] Although the existing target tracking algorithms have solved the problem of target tracking to a certain extent, in practical applications, when dealing with complex scenes, such as when the target is occluded or the lighting changes, the tracking performance of the existing target tracking algorithms will be significantly reduced, resulting in misjudgment and affecting the accuracy of target positioning. Summary of the invention
[0004] The present application provides a target tracking method, device, equipment and storage medium to solve the technical problem that the target tracking algorithm in the prior art significantly reduces the tracking performance when processing complex scenes, resulting in misjudgment and affecting the accuracy of target positioning.
[0005] In a first aspect, the present application provides a target tracking method, the method comprising:
[0006] Perform target detection on the video stream to be identified frame by frame, obtain the detection frame of the target in the current video frame and the predicted trajectory of the target in the previous video frame in the current video frame;
[0007] Matching the detection frame with the currently existing predicted trajectory;
[0008] When it is determined that the first predicted trajectory is successfully matched to the detection frame, continue tracking the first predicted trajectory, where the first predicted trajectory is any currently existing predicted trajectory;
[0009] When it is determined that the first predicted trajectory has not been successfully matched to the detection frame, the first predicted trajectory continues to be tracked, and during the tracking process, whether the first predicted trajectory meets the set observation condition is detected, and when it is determined that the first predicted trajectory does not meet the observation condition, the tracking of the first predicted trajectory is stopped.
[0010] In a possible implementation, matching the detection frame with the currently existing predicted trajectory includes:
[0011] For each detection frame in the current video frame, determining a distribution distance between the detection frame and the first predicted trajectory, and determining an apparent feature similarity between the detection frame and the first predicted trajectory;
[0012] Determining a correlation between the detection box and the first predicted trajectory according to the distribution distance and the apparent feature similarity;
[0013] When the correlation degree satisfies a first set condition, it is determined that the detection box matches the first predicted trajectory; when the correlation degree does not satisfy the first set condition, it is determined that the detection box does not match the first predicted trajectory.
[0014] In a possible implementation, when it is determined that the first predicted trajectory is not successfully matched to the detection frame, continuing to track the first predicted trajectory, and detecting whether the first predicted trajectory satisfies a set observation condition during the tracking process, and when it is determined that the first predicted trajectory does not satisfy the observation condition, stopping tracking the first predicted trajectory, includes:
[0015] When it is determined that the first predicted trajectory is not successfully matched to the detection frame, the first predicted trajectory is continuously tracked in the following manner: for each detection frame in the current video frame, the detection frame is matched with the first predicted trajectory by using a set first matching algorithm;
[0016] In the case where it is determined by using the first matching algorithm that the first predicted trajectory is not successfully matched to the detection frame, the first predicted trajectory is continued to be tracked in the following manner: for each detection frame in the current video frame, the detection frame is matched with the first predicted trajectory by using a set second matching algorithm;
[0017] When it is determined by using the second matching algorithm that the first predicted trajectory is not successfully matched to the detection frame, it is determined that the first predicted trajectory does not meet a set observation condition, and tracking of the first predicted trajectory is stopped.
[0018] In a possible implementation, the method further includes:
[0019] When it is determined that the first predicted trajectory is successfully matched to the detection frame by using the second matching algorithm, recording the number of successful matching results obtained by using the second matching algorithm;
[0020] When the number of times reaches a set threshold, determining that the first predicted trajectory does not meet the observation condition, and stopping tracking the first predicted trajectory;
[0021] When the number of times does not reach the set threshold, it is determined that the first predicted trajectory meets the observation condition, and the first predicted trajectory continues to be tracked.
[0022] In a possible implementation, matching the detection frame and the first predicted trajectory by using a set first matching algorithm includes:
[0023] Determine an intersection area and a union area between the detection box and the first predicted trajectory;
[0024] Determining an overlap degree between the detection box and the first predicted trajectory according to the intersection area and the union area;
[0025] When the overlap degree satisfies a second set condition, it is determined that the detection frame matches the first predicted trajectory; when the overlap degree does not satisfy the second set condition, it is determined that the detection frame does not match the first predicted trajectory.
[0026] In a possible implementation, the method further includes:
[0027] When it is determined that the first predicted trajectory is successfully matched to the detection frame, performing validity verification on the first predicted trajectory and the detection frame matched thereto;
[0028] If the verification result indicates that the first predicted trajectory is invalid and / or the detection frame matched by the first predicted trajectory is invalid, stopping tracking the first predicted trajectory;
[0029] When the verification result indicates that the first predicted trajectory is valid and the detection frame matched by the first predicted trajectory is valid, the first predicted trajectory continues to be tracked.
[0030] In one possible implementation, the predicted trajectory of the target in the next video frame is obtained by:
[0031] Establishing a state vector according to the motion state of the target, wherein the motion state includes velocity, acceleration and position;
[0032] Establishing a state transfer matrix according to the state vector, and obtaining a predicted state of the target using the state transfer matrix;
[0033] Establishing an observation matrix, and using the observation matrix to map the state vector to an observation value;
[0034] Based on the observed value, the predicted state is updated through a Kalman filter algorithm to obtain a predicted trajectory of the target in the next video frame.
[0035] In a second aspect, the present application provides a target tracking device, the device comprising:
[0036] The target detection module is used to perform target detection on the video stream to be identified frame by frame, obtain the detection frame of the target in the current video frame and the predicted trajectory of the target in the previous video frame in the current video frame;
[0037] A trajectory matching module, used to match the detection frame with the currently existing predicted trajectory;
[0038] The trajectory tracking module is used to continue tracking the first predicted trajectory when it is determined that the first predicted trajectory is successfully matched to the detection frame, where the first predicted trajectory is any currently existing predicted trajectory; when it is determined that the first predicted trajectory is not successfully matched to the detection frame, continue tracking the first predicted trajectory, and detect whether the first predicted trajectory meets the set observation condition during the tracking process, and stop tracking the first predicted trajectory when it is determined that the first predicted trajectory does not meet the observation condition.
[0039] In a possible implementation, the trajectory matching module includes:
[0040] a distance determination unit, configured to determine, for each detection frame in a current video frame, a distribution distance between the detection frame and the first predicted trajectory;
[0041] a similarity determination unit, configured to determine an apparent feature similarity between the detection frame and the first predicted trajectory;
[0042] a correlation determination unit, configured to determine a correlation between the detection box and the first predicted trajectory according to the distribution distance and the apparent feature similarity;
[0043] A matching result determination unit is used to determine that the detection box matches the first predicted trajectory when the correlation degree satisfies a first set condition; and to determine that the detection box does not match the first predicted trajectory when the correlation degree does not satisfy the first set condition.
[0044] In a possible implementation, the trajectory tracking module includes:
[0045] A first tracking unit is configured to, when it is determined that the first predicted trajectory is not successfully matched to the detection frame, continue to track the first predicted trajectory in the following manner: for each detection frame in the current video frame, match the detection frame with the first predicted trajectory by using a set first matching algorithm;
[0046] a second tracking unit, configured to, when it is determined by using the first matching algorithm that the first predicted trajectory is not successfully matched to the detection frame, continue to track the first predicted trajectory in the following manner: for each detection frame in the current video frame, match the detection frame with the first predicted trajectory by using a set second matching algorithm;
[0047] When it is determined by using the second matching algorithm that the first predicted trajectory is not successfully matched to the detection frame, it is determined that the first predicted trajectory does not meet a set observation condition, and tracking of the first predicted trajectory is stopped.
[0048] In a possible implementation, the device further includes:
[0049] a recording unit, configured to record the number of successful matching results obtained by using the second matching algorithm when it is determined that the first predicted trajectory is successfully matched to the detection frame by using the second matching algorithm;
[0050] a third tracking unit, configured to determine that the first predicted trajectory does not satisfy the observation condition and stop tracking the first predicted trajectory when the number of times reaches a set threshold;
[0051] When the number of times does not reach the set threshold, it is determined that the first predicted trajectory meets the observation condition, and the first predicted trajectory continues to be tracked.
[0052] In a possible implementation manner, the first tracking unit is specifically configured to:
[0053] Determine an intersection area and a union area between the detection box and the first predicted trajectory;
[0054] Determining an overlap degree between the detection box and the first predicted trajectory according to the intersection area and the union area;
[0055] When the overlap degree satisfies a second set condition, it is determined that the detection frame matches the first predicted trajectory; when the overlap degree does not satisfy the second set condition, it is determined that the detection frame does not match the first predicted trajectory.
[0056] In a possible implementation, the device further includes:
[0057] A verification module, configured to, when it is determined that the first predicted trajectory is successfully matched to the detection frame, perform validity verification on the first predicted trajectory and the detection frame matched thereto;
[0058] a processing module, configured to stop tracking the first predicted trajectory if the verification result indicates that the first predicted trajectory is invalid and / or the detection frame matched by the first predicted trajectory is invalid;
[0059] When the verification result indicates that the first predicted trajectory is valid and the detection frame matched by the first predicted trajectory is valid, the first predicted trajectory continues to be tracked.
[0060] In a possible implementation, the target detection module is used to obtain the predicted trajectory of the target in the next video frame by:
[0061] Establishing a state vector according to the motion state of the target, wherein the motion state includes velocity, acceleration and position;
[0062] Establishing a state transfer matrix according to the state vector, and obtaining a predicted state of the target using the state transfer matrix;
[0063] Establishing an observation matrix, and using the observation matrix to map the state vector to an observation value;
[0064] Based on the observed value, the predicted state is updated through a Kalman filter algorithm to obtain a predicted trajectory of the target in the next video frame.
[0065] In a third aspect, the present application provides a device comprising: a processor and a memory, wherein the processor is used to execute a target tracking program stored in the memory to implement the target tracking method described in any one of the first aspects.
[0066] In a fourth aspect, the present application provides a storage medium storing one or more programs, wherein the one or more programs can be executed by one or more processors to implement the target tracking method described in any one of the first aspects.
[0067] The above technical solution provided by the embodiment of the present application has the following advantages over the prior art: the method provided by the embodiment of the present application performs target detection on the video stream to be identified frame by frame, obtains the detection frame of the target in the current video frame and the predicted trajectory of the target in the previous video frame in the current video frame, and matches the detection frame with the currently existing predicted trajectory; when it is determined that the first predicted trajectory successfully matches the detection frame, the first predicted trajectory continues to be tracked, and the first predicted trajectory is any currently existing predicted trajectory; when it is determined that the first predicted trajectory does not successfully match the detection frame, the first predicted trajectory continues to be tracked, and during the tracking process, it is detected whether the first predicted trajectory meets the set observation conditions, and when it is determined that the first predicted trajectory does not meet the observation conditions, the first predicted trajectory is stopped from being tracked. In this scheme, since the predicted trajectory that has not successfully matched the detection frame will not be tracked immediately, but will enter an observation state, so as to find the target again in the subsequent frame or confirm whether the target has really disappeared, this can achieve more flexible response to these changes and reduce misjudgment in complex and changeable scenes. For example, if the target is only temporarily obscured or cannot be accurately detected due to the noise of the detection algorithm, then stopping tracking immediately will cause the wrong target to be lost, resulting in tracking failure. By entering the observation state, the effectiveness of the predicted trajectory can be evaluated more accurately, thereby reducing the occurrence of misjudgment. At the same time, unnecessary tracking interruptions can be avoided by entering the observation state, thereby maintaining the continuity and stability of tracking. In summary, the technical solution provided in the embodiment of the present application can well adapt to target tracking tasks in complex scenes. BRIEF DESCRIPTION OF THE DRAWINGS
[0068] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0069] In order to more clearly illustrate the embodiments of the present application 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, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0070] One or more embodiments are exemplarily described by pictures in the corresponding drawings, and these exemplified descriptions do not constitute limitations on the embodiments. Elements with the same reference numerals in the drawings represent similar elements, and unless otherwise stated, the figures in the drawings do not constitute proportional limitations.
[0071] Figure 1 A schematic diagram of an application scenario involved in an embodiment of the present application;
[0072] Figure 2A flow chart of an embodiment of a target tracking method provided in an embodiment of the present application;
[0073] Figure 3 A flowchart of another target tracking method provided in an embodiment of the present application;
[0074] Figure 4 A flowchart of another target tracking method provided in an embodiment of the present application;
[0075] Figure 5 A flowchart of another target tracking method provided in an embodiment of the present application;
[0076] Figure 6 A block diagram of an embodiment of a target tracking device provided in an embodiment of the present application;
[0077] Figure 7 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0078] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.
[0079] The disclosure below provides many different embodiments or examples to realize the different structures of the present application. In order to simplify the disclosure of the present application, the parts and settings of specific examples are described below. Of course, they are only examples, and the purpose is not to limit the present application. In addition, the present application can repeat reference numbers and / or letters in different examples. This repetition is for the purpose of simplification and clarity, and does not itself indicate the relationship between the various embodiments and / or settings discussed.
[0080] In order to solve the technical problem that the tracking performance of the target tracking algorithm in the prior art is significantly reduced when processing complex scenes, resulting in misjudgment and affecting the accuracy of target positioning, the present application provides a target tracking method, device, electronic device and storage medium, which can reduce misjudgment and maintain the continuity and stability of tracking, so as to be well adapted to target tracking tasks in complex scenes.
[0081] Figure 1 A schematic diagram of an application scenario involved in an embodiment of the present application. Figure 1 The application scenario shown is the blind spot monitoring scenario of the car rearview mirror.
[0082] As an important tool for drivers to observe the situation behind them, the rearview mirror plays a vital role in driving. However, traditional rearview mirrors have the problem of narrow field of view, especially when the vehicle changes lanes or turns, blind spots are prone to appear, which brings safety hazards to the driver. For example, Figure 1 The area marked with numbers in the figure is a schematic representation of the blind spot of the rearview mirror during driving. Figure 1 As can be seen from the example, due to factors such as the vehicle body structure, the vehicle has a blind spot when it is driving. When the rear-coming vehicle enters the blind spot, it will bring certain risks to driving safety.
[0083] In order to solve the above problems, an electronic rearview mirror system (Camera Monitor System, CMS) equipped with a camera has been introduced in the prior art. As an important part of the car, the CMS system mainly acquires environmental information around the vehicle through the camera so that the driver can make correct driving decisions.
[0084] Specifically, during the driving process of the vehicle (or during the driving process of the vehicle and when the speed meets the set conditions), the video stream collected by the CMS camera is transmitted to the data processing module in real time. This module processes the blind spot road condition information through software and algorithms to realize various detection functions, and can realize fast and accurate detection and make corresponding decisions. The CMS system also includes a screen display module and a sound warning module. The screen display module uses the touch screen of the monitor, and its function is to display the information or image analyzed and processed by the data processing module on the display screen, so that the driver can understand the road conditions of the blind spot in real time. The sound warning module includes a built-in speaker of the device. When the data processing module determines that the road conditions in the blind spot are dangerous, the sound warning module issues a danger alarm, and can also flash an alarm icon on the touch screen to remind the driver to take necessary safety measures.
[0085] Among the software and algorithms used in the above-mentioned data processing modules, the target tracking algorithm is an important component. Optimizing the target tracking algorithm is crucial for the blind spot monitoring function of the electronic rearview mirror.
[0086] In this regard, the embodiment of the present application provides an optimized target tracking algorithm, the purpose of which is to improve the multi-target tracking capability and tracking efficiency, thereby improving the accuracy and real-time performance of target tracking, reducing dangerous false alarms and missed alarms, and being able to adapt to different driving environments, thereby greatly improving driving safety.
[0087] Figure 2 A flow chart of an embodiment of a target tracking method provided in an embodiment of the present application.
[0088] like Figure 2 As shown, the method comprises the following steps:
[0089] Step 201: Detect the target frame by frame on the video stream to be identified, and obtain the detection frame of the target in the current video frame and the predicted trajectory of the target in the previous video frame in the current video frame.
[0090] In one embodiment, the execution subject of the embodiment of the present application is a CMS system. Figure 1 The video stream captured by the CMS camera during the driving process of the vehicle in the application scenario shown. The above-mentioned target usually refers to a vehicle. Of course, in actual applications, it can also be other moving targets such as pedestrians.
[0091] In step 201, the execution subject of the embodiment of the present application performs frame-by-frame analysis on the video stream to be identified, with the purpose of detecting the target in each frame. In this process, a computer vision algorithm, such as a deep learning model, can be applied to identify the target in the video frame, and a detection frame is generated for each detected target. Normally, the detection frame can accurately surround the target in the video frame. Among them, the deep learning model is, for example, a CBA-YOLOv5 camera visual detection algorithm based on a convolutional attention module, which has excellent target detection capabilities and robustness, and can accurately detect targets in complex scenes (such as when the target is blocked, the illumination changes, etc.). Optionally, the confidence threshold used by the above-mentioned deep learning model is 0.7, which means that only when the confidence of the model for the detected target is greater than or equal to 0.7, the detection frame of the target will be regarded as a valid output, which helps to reduce false detection. Optionally, the non-maximum suppression threshold used by the above-mentioned deep learning model is set to 0.6. The non-maximum threshold is used to process overlapping detection frames. By comparing the scores (confidence) of the detection frames and the degree of overlap between them, the best (highest scoring) detection frame is retained and other overlapping detection frames are suppressed. The non-maximum suppression threshold is set to 0.6, which means that only when the overlap between two detection frames is less than 0.6, they will be considered as independent detection frames. This can improve the accuracy and reliability of the detection results.
[0092] In step 201, the execution subject of the embodiment of the present application also uses the position of the target in each video frame in the current video frame to predict the position of the target in the next video frame, that is, the tracking frame. Based on this, when analyzing the current video frame, the predicted trajectory of the target in the previous video frame in the current video frame can be obtained.
[0093] In one embodiment, the CMS system can use various prediction algorithms (such as Kalman filter, particle filter, etc.) to estimate the position of the target in the next video frame. These prediction algorithms usually take into account the target's motion mode (such as uniform speed, acceleration, turning, etc.) and possible noise and uncertainty.
[0094] Optionally, set the prediction and matching interval to 5 frames. This means that every 5 frames, the target tracking algorithm will try to predict the position of the target in the current video frame based on the previous trajectory information and match it with the target detected in the current video frame. This helps to find the target again after it is occluded or disappears for a short time.
[0095] Optionally, the Kalman filter obtains the predicted trajectory of the target in the next video frame by: establishing a state vector based on the motion state of the target, the motion state including velocity, acceleration and position, establishing a state transfer matrix based on the state vector, and using the state transfer matrix to obtain the predicted state of the target; establishing an observation matrix, and using the observation matrix to map the state vector to observation values; based on the observation values, updating the predicted state through the Kalman filter algorithm to obtain the predicted trajectory of the target in the next video frame.
[0096] From the above description, it can be found that in the technical solution of the embodiment of the present application, the acceleration parameter is introduced in the state vector. This is because the Kalman filter is a uniform linear filter, but in actual road scenes, the motion state of the target vehicle is not uniform motion, but often experiences large acceleration, deceleration, and even frequent lane changes. Therefore, the Kalman filter in the prior art easily leads to unsatisfactory final tracking effect.
[0097] Specifically, let p = (u, v, y, h), v = (u', v', y, h'), a = (u", v", y", h"), and the sampling period is Δt. p is pixel, representing the frame, v is the velocity information, a is the acceleration parameter, (u, v) is the center coordinate of the tracking frame, y is the aspect ratio of the tracking frame, and h is the height of the tracking frame.
[0098] According to the motion state of the target in the w-1 frame, the state equation shown in formula (1) can be derived, and then the state transfer matrix A shown in formula (2) can be obtained:
[0099]
[0100] The observation value z of frame w w and the observation matrix H are shown in equations (3) and (4) respectively. The state x of the uniformly accelerated Kalman filter is w and the observed value z w Calculate as formula (5):
[0101]
[0102] H=[1 0 0] Formula (4)
[0103]
[0104] In formula (5), ωw-1 V represents the process noise in w-1 frame and represents the error between the state transition matrix and the actual process. w is the observation noise in the current w frame, and its expectation is 0. w-1 and V w The initial value of will be automatically updated according to the continuous iteration of the prediction and update steps.
[0105] Step 202: Match the detection frame with the currently existing predicted trajectory. If it is determined that the first predicted trajectory is successfully matched to the detection frame, execute step 203; if it is determined that the first predicted trajectory is not successfully matched to the detection frame, execute step 204.
[0106] Step 203: Continue tracking the first predicted trajectory.
[0107] Step 204: Continue to track the first predicted trajectory, and detect whether the first predicted trajectory meets the set observation condition during the tracking process. When it is determined that the first predicted trajectory does not meet the observation condition, stop tracking the first predicted trajectory.
[0108] For ease of understanding, steps 202 to 204 are described in a unified manner as follows:
[0109] The currently existing predicted trajectory refers to the currently tracked predicted trajectory. The first predicted trajectory is any currently existing predicted trajectory.
[0110] After detecting the targets in the current video frame, the execution subject of the embodiment of the present application matches these detected targets with the predicted trajectories that have been tracked before. The purpose of this step is to determine which detected targets are the continuation of the predicted trajectories that have been tracked before and which are newly appeared targets. Accordingly, in step 202, the detection frame of the target detected from the current video frame is matched with each existing predicted trajectory.
[0111] If a predicted trajectory successfully matches a detection box, it means that the target corresponding to the predicted trajectory is still visible in the current video frame and is successfully detected. Therefore, the predicted trajectory can continue to be tracked, its position and status information can be updated, and preparations can be made for the prediction of the next frame.
[0112] If a predicted track fails to successfully match any detection box, this may mean that the target corresponding to the predicted track has left the field of view, or is blocked, or there is a false detection / missed detection.
[0113] From the description of step 204, it can be seen that for the predicted trajectory that has not been successfully matched to the detection frame, the tracking will not be stopped immediately, but an observation state will be entered, in which the predicted trajectory will continue to be tracked, and during the tracking process, it will be continuously checked whether the predicted trajectory meets the set observation condition. During the tracking process, once it is determined that the first predicted trajectory does not meet the set observation condition, the tracking of the predicted trajectory will be stopped and removed from the tracking list, so that the system can handle new and persistent targets more efficiently.
[0114] The technical solution provided by the embodiment of the present application performs target detection frame by frame on the video stream to be identified, obtains the detection frame of the target in the current video frame and the predicted trajectory of the target in the previous video frame in the current video frame, and matches the detection frame with the currently existing predicted trajectory; when it is determined that the first predicted trajectory successfully matches the detection frame, the first predicted trajectory continues to be tracked, and the first predicted trajectory is any currently existing predicted trajectory; when it is determined that the first predicted trajectory does not successfully match the detection frame, the first predicted trajectory continues to be tracked, and during the tracking process, it is detected whether the first predicted trajectory meets the set observation conditions, and when it is determined that the first predicted trajectory does not meet the observation conditions, the first predicted trajectory is stopped from being tracked. In this scheme, since the predicted trajectory that has not successfully matched the detection frame will not be tracked immediately, but will enter an observation state, so as to find the target again in the subsequent frame or confirm whether the target has really disappeared, this can achieve more flexible response to these changes and reduce misjudgment in complex and changeable scenes. For example, if the target is only temporarily blocked or cannot be accurately detected due to the noise of the detection algorithm, then stopping the tracking immediately will cause the wrong target to be lost, resulting in tracking failure. By entering the observation state, the effectiveness of the predicted trajectory can be evaluated more accurately, thereby reducing the occurrence of misjudgments. At the same time, unnecessary tracking interruptions can be avoided by entering the observation state, thereby maintaining the continuity and stability of tracking. In summary, the technical solution provided by the embodiment of the present application can well adapt to target tracking tasks in complex scenes.
[0115] In one embodiment, the above step 202 is performed to match the detection frame with the currently existing predicted trajectory. When it is determined that the first predicted trajectory is successfully matched to the detection frame, the validity of the first predicted trajectory and the detection frame matched to it is continued to be checked. When the check result indicates that the first predicted trajectory is invalid and / or the detection frame matched to the first predicted trajectory is invalid, the tracking of the first predicted trajectory is stopped; when the check result indicates that the first predicted trajectory is valid and the detection frame matched to the first predicted trajectory is valid, the tracking of the first predicted trajectory is continued.
[0116] The invalidity of the first predicted trajectory includes but is not limited to: the movement direction of the first predicted trajectory is inconsistent with expectations, the first predicted trajectory gradually moves away from the monitoring area (such as Figure 1 The blind spot shown in the example) and other situations.
[0117] Invalid detection boxes include, but are not limited to: the target type is not the expected type, the target confidence is low, etc.
[0118] It can be seen that the above embodiment is intended to further exclude those predicted trajectories that may no longer be valid or do not meet specific conditions although they are currently matched successfully. By excluding invalid predicted trajectories and detection boxes, on the one hand, it is possible to reduce false tracking and false alarms, improve the accuracy and robustness of target tracking, and on the other hand, because unnecessary calculations and updates are no longer performed on invalid predicted trajectories, the overall efficiency of target tracking can be improved, saving computing resources.
[0119] Figure 3 A flowchart of another target tracking method provided in an embodiment of the present application. Figure 3 The process shown in Figure 2 Based on the process shown in the figure, the implementation method of matching the target detection box with the currently existing predicted trajectory is described. Figure 3 As shown, the following steps are included:
[0120] Step 301: for each detection frame in the current video frame, determine the distribution distance between the detection frame and the first predicted trajectory, and determine the apparent feature similarity between the detection frame and the first predicted trajectory.
[0121] In one embodiment, the Mahalanobis distance is used to represent the above distribution distance. In the field of target tracking, the Mahalanobis distance can reflect the association of motion information between the detection frame and the tracking frame to evaluate the similarity or matching degree between the two, or to evaluate the motion consistency between the detection frame and the tracking frame. Among them, the smaller the Mahalanobis distance between the detection frame and the tracking frame, the higher the motion consistency between the two, which means that the detected target is likely to be the tracked target. Then, the Mahalanobis distance between the detection frame and the tracking frame is calculated according to the above formula. The smaller this distance is, the higher the motion consistency between the two, that is, the detected target is likely to be the tracked target.
[0122] The calculation formula of Mahalanobis distance is shown in the following formula (6):
[0123]
[0124] In the above formula (6), d (1) (i, j) represents the motion matching degree between the i-th detection box and the j-th tracking box, that is, the Mahalanobis distance.
[0125] d j represents the predicted position of the jth tracking box, y i Represents the position of the i-th detection box.
[0126] S i is the covariance matrix of the current video frame predicted by the Kalman filter, which reflects the uncertainty of the position estimation during the tracking process.
[0127] In one embodiment, the minimum cosine distance is used to represent the above-mentioned apparent feature similarity.
[0128] The calculation formula of the minimum cosine distance is shown in the following formula (7):
[0129]
[0130] In the above formula (7), d (2) (i, j) represents the minimum cosine distance between the i-th detection box and the j-th tracking box, that is, the apparent feature similarity. is the feature vector of the detection box, r j is the feature vector of the tracking box.
[0131] R k is the set of target feature vectors. When a target is considered lost, if the target reappears in the picture, it will cause the current target to switch. To prevent this from happening, the feature vector of each target is retained for a period of time, which is represented by the set R. k express.
[0132] Step 302: Determine the correlation between the detection box and the first predicted trajectory according to the distribution distance and the apparent feature similarity.
[0133] In one embodiment, the linear weighted result of the above distribution distance and the apparent feature similarity is determined as the correlation between the detection box and the first predicted trajectory. The specific calculation formula is shown in the following formula (8):
[0134] c i,j =λd( 1 )(i,j)+(1-λ)d( 2 )(i, j) Formula (8)
[0135] In the above formula (8), c i,j represents the association between the i-th detection box and the j-th tracking box, and λ represents the weight.
[0136] Step 303: When the correlation degree satisfies the first set condition, it is determined that the detection box matches the first predicted trajectory; when the correlation degree does not satisfy the first set condition, it is determined that the detection box does not match the first predicted trajectory.
[0137] The first set condition is, for example, reaching a set correlation threshold. That is, when the correlation between the detection frame and the first predicted trajectory reaches the set correlation threshold, it is determined that the detection frame matches the first predicted trajectory, and when the correlation between the detection frame and the first predicted trajectory does not reach the set correlation threshold, it is determined that the detection frame does not match the first predicted trajectory.
[0138] Figure 3 The process shown in the figure can more comprehensively evaluate the matching degree between the detection box and the predicted trajectory by comprehensively considering the distribution distance and the similarity of the apparent features. Compared with a single factor, this multi-dimensional evaluation method can more accurately reflect the actual motion state and appearance changes of the target in the video stream, thereby reducing the situation of false matching and tracking loss, and improving the stability and accuracy of target tracking; at the same time, it also helps to maintain continuous tracking of the target, and enhance the robustness of target tracking and its adaptability to complex scenes.
[0139] Figure 4 A flowchart of another target tracking method provided in an embodiment of the present application. Figure 4 The process shown in Figure 2 Based on the process shown, the following describes an implementation method of continuing to track the first predicted trajectory when it is determined that the first predicted trajectory has not been successfully matched to the detection frame, and detecting whether the first predicted trajectory meets the set observation condition during the tracking process, and stopping tracking the first predicted trajectory when it is determined that the first predicted trajectory does not meet the observation condition. Figure 4 As shown, the following steps are included:
[0140] Step 401: When it is determined that the first predicted trajectory has not been successfully matched to the detection frame, continue to track the first predicted trajectory in the following manner: for each detection frame in the current video frame, match the detection frame with the first predicted trajectory using a set first matching algorithm; when it is determined that the first predicted trajectory has not been successfully matched to the detection frame using the first matching algorithm, execute step 402; when it is determined that the first predicted trajectory has been successfully matched to the detection frame using the first matching algorithm, execute step 405.
[0141] Step 402, continue tracking the first predicted trajectory in the following manner: for each detection frame in the current video frame, match the detection frame with the first predicted trajectory using a set second matching algorithm; if it is determined by the second matching algorithm that the first predicted trajectory is not successfully matched to the detection frame, execute step 403; if it is determined by the second matching algorithm that the first predicted trajectory is successfully matched to the detection frame, execute step 404.
[0142] Step 403: determine that the first predicted trajectory does not meet the set observation condition, and stop tracking the first predicted trajectory.
[0143] It can be seen from the description of step 401 to step 403 that when it is determined that the first predicted trajectory has a trajectory mismatch, the target is tracked under different conditions using different matching algorithms, and the tracking is stopped in time when necessary.
[0144] Specifically, the first matching algorithm is used for matching, and this matching process can be regarded as a primary matching attempt. If the first matching algorithm also fails to match, the second matching algorithm is used for further matching. The process of matching using the second matching algorithm can be regarded as a higher-level matching attempt, and the second matching algorithm may be more complex than the first matching algorithm, and consider more factors to improve the accuracy and robustness of matching.
[0145] If the second matching algorithm also fails to match successfully, it will be considered that the first predicted trajectory no longer meets the set observation conditions, and the tracking of the first predicted trajectory will be stopped to save computing resources and avoid invalid tracking attempts.
[0146] In one embodiment, a specific implementation of matching the detection frame and the first predicted trajectory using a set first matching algorithm includes: determining an intersection area and a union area between the detection frame and the first predicted trajectory, determining an overlap degree between the detection frame and the first predicted trajectory based on the intersection area and the union area, and determining that the detection frame matches the first predicted trajectory when the overlap degree satisfies a second set condition; and determining that the detection frame does not match the first predicted trajectory when the overlap degree does not satisfy the second set condition.
[0147] The above overlap is usually a number less than 1. The second set condition may be that the overlap reaches a set threshold, such as 0.5. That is, when it is determined that the overlap between the detection frame and the first predicted trajectory reaches the set threshold, it is determined that the detection frame matches the first predicted trajectory; when the overlap between the detection frame and the first predicted trajectory does not reach the set threshold, it is determined that the detection frame does not match the first predicted trajectory.
[0148] In one embodiment, the second matching algorithm is Figure 3 The matching algorithm described in the process shown will not be repeated here.
[0149] Step 404, record the number of successful matching results obtained using the second matching algorithm; if the number reaches the set threshold, execute step 403; if the number does not reach the set threshold, determine that the first predicted trajectory meets the observation condition, and execute step 405.
[0150] Step 405: Continue tracking the first predicted trajectory.
[0151] It can be seen from the description of step 404 and step 405 that when the first predicted trajectory is matched by the second matching algorithm and the number of successful matching results reaches the set threshold (for example, 3 times), it is determined that the first predicted trajectory does not meet the set observation condition, and the tracking of the first predicted trajectory is stopped. This is because: the second matching algorithm is continued to be used for matching only when the primary matching obtains a matching result of trajectory mismatch. Then, multiple matching by the second matching algorithm means that the matching results of trajectory mismatch have appeared in multiple frames. In this case, it indicates that the first predicted trajectory is likely to have a certain degree of uncertainty or instability, and even if the second matching algorithm is used to successfully match the first predicted trajectory to the detection frame, this uncertainty or instability cannot be completely eliminated. Therefore, a reasonable decision can be made in time to avoid unnecessary waste of system resources by stopping tracking.
[0152] Figure 4 The process shown can temporarily retain the tracking of the target in complex scenarios and reduce misjudgment by maintaining the tracking of the target under different conditions through different matching algorithms when a trajectory mismatch occurs in a certain predicted trajectory. At the same time, it can also promptly abandon the tracking of targets that are no longer important, thereby optimizing the overall tracking effect and computing resource allocation.
[0153] Figure 5 A flow chart of another target tracking method provided in an embodiment of the present application. Figure 5 The process shown describes the technical solution provided by the embodiment of the present application as a whole based on the above-mentioned embodiment.
[0154] like Figure 5 As shown, in Figure 1 In the scenario shown, the video frame sequence captured in real time by the on-board camera is input into the data processing module. The data processing module uses a deep learning-based detector to determine the detection frame of the target frame by frame, and determines the predicted trajectory of the target based on the Kalman filter taking acceleration into account. Then the detection frame is matched with the currently existing predicted trajectory. If the match is successful (which also means that the state of the predicted trajectory is confirmed), the validity of the predicted trajectory and the matched detection frame is checked. There are three verification results here: verification success, trajectory invalid, and detection frame invalid. When the verification is successful, the predicted trajectory is output and the predicted trajectory continues to be tracked. When the trajectory is invalid, the tracking of the trajectory is stopped. When the detection frame is invalid, the predicted trajectory can be stopped from being tracked, or the detection frame can be matched again using the IOU intersection-over-union matching algorithm.
[0155] If the detection box fails to match the existing predicted trajectory, the predicted trajectory is not immediately stopped from being tracked. Instead, the detection box and the predicted trajectory are matched again using the IOU matching algorithm.
[0156] The above IOU matching includes three matching results: successful matching, detection mismatch, and trajectory mismatch. When the match is successful, the predicted trajectory is output and the predicted trajectory continues to be tracked. When the detection mismatch occurs, it means that the detection box does not match any predicted trajectory, which means that the detection box is a newly appeared target, so a new predicted trajectory is created. When the trajectory video is missing, it means that the predicted trajectory does not match any detection box. At this time, continue to match the predicted trajectory with the detection box. If the match still fails, stop tracking the predicted trajectory. If the match is successful, record the number of times the predicted trajectory is currently matched twice and the match is successful. If the number does not reach the set threshold, continue to track the predicted trajectory. If the number reaches the set threshold, stop tracking the predicted trajectory.
[0157] In addition, through Figure 5 It can be seen from the process shown that in the entire target tracking process, once the predicted trajectory is determined to be valid, the predicted trajectory is output, which can realize the real-time drawing of the target's motion trajectory on the plane image. This method can effectively reduce the errors that may occur when mapping the target from the plane image to the actual motion trajectory, thereby helping to improve the accuracy of target positioning.
[0158] Figure 5 For other specific implementations of the process shown, please refer to the above embodiments and will not be described again here.
[0159] Figure 6 A block diagram of an embodiment of a target tracking device provided in an embodiment of the present application, such as Figure 6 As shown, the device comprises:
[0160] The target detection module 61 is used to perform target detection on the video stream to be identified frame by frame, and obtain the detection frame of the target in the current video frame and the predicted trajectory of the target in the previous video frame in the current video frame;
[0161] A trajectory matching module 62, used to match the detection frame with the currently existing predicted trajectory;
[0162] The trajectory tracking module 63 is used to continue tracking the first predicted trajectory when it is determined that the first predicted trajectory successfully matches the detection frame, and the first predicted trajectory is any currently existing predicted trajectory; when it is determined that the first predicted trajectory does not successfully match the detection frame, continue tracking the first predicted trajectory, and detect whether the first predicted trajectory meets the set observation condition during the tracking process, and stop tracking the first predicted trajectory when it is determined that the first predicted trajectory does not meet the observation condition.
[0163] In a possible implementation, the trajectory matching module 62 includes:
[0164] a distance determination unit, configured to determine, for each detection frame in a current video frame, a distribution distance between the detection frame and the first predicted trajectory;
[0165] a similarity determination unit, configured to determine an apparent feature similarity between the detection frame and the first predicted trajectory;
[0166] a correlation determination unit, configured to determine a correlation between the detection box and the first predicted trajectory according to the distribution distance and the apparent feature similarity;
[0167] A matching result determination unit is used to determine that the detection box matches the first predicted trajectory when the correlation degree satisfies a first set condition; and to determine that the detection box does not match the first predicted trajectory when the correlation degree does not satisfy the first set condition.
[0168] In a possible implementation, the trajectory tracking module 63 includes:
[0169] A first tracking unit is configured to, when it is determined that the first predicted trajectory is not successfully matched to the detection frame, continue to track the first predicted trajectory in the following manner: for each detection frame in the current video frame, match the detection frame with the first predicted trajectory by using a set first matching algorithm;
[0170] a second tracking unit, configured to, when it is determined by using the first matching algorithm that the first predicted trajectory is not successfully matched to the detection frame, continue to track the first predicted trajectory in the following manner: for each detection frame in the current video frame, match the detection frame with the first predicted trajectory by using a set second matching algorithm;
[0171] When it is determined by using the second matching algorithm that the first predicted trajectory is not successfully matched to the detection frame, it is determined that the first predicted trajectory does not meet a set observation condition, and tracking of the first predicted trajectory is stopped.
[0172] In a possible implementation, the device further includes:
[0173] a recording unit, configured to record the number of successful matching results obtained by using the second matching algorithm when it is determined that the first predicted trajectory is successfully matched to the detection frame by using the second matching algorithm;
[0174] a third tracking unit, configured to determine that the first predicted trajectory does not satisfy the observation condition and stop tracking the first predicted trajectory when the number of times reaches a set threshold;
[0175] When the number of times does not reach the set threshold, it is determined that the first predicted trajectory meets the observation condition, and the first predicted trajectory continues to be tracked.
[0176] In a possible implementation manner, the first tracking unit is specifically configured to:
[0177] Determine an intersection area and a union area between the detection box and the first predicted trajectory;
[0178] Determining an overlap degree between the detection box and the first predicted trajectory according to the intersection area and the union area;
[0179] When the overlap degree satisfies a second set condition, it is determined that the detection frame matches the first predicted trajectory; when the overlap degree does not satisfy the second set condition, it is determined that the detection frame does not match the first predicted trajectory.
[0180] In a possible implementation, the device further includes:
[0181] A verification module, configured to, when it is determined that the first predicted trajectory is successfully matched to the detection frame, perform validity verification on the first predicted trajectory and the detection frame matched thereto;
[0182] a processing module, configured to stop tracking the first predicted trajectory if the verification result indicates that the first predicted trajectory is invalid and / or the detection frame matched by the first predicted trajectory is invalid;
[0183] When the verification result indicates that the first predicted trajectory is valid and the detection frame matched by the first predicted trajectory is valid, the first predicted trajectory continues to be tracked.
[0184] In a possible implementation, the target detection module is used to obtain the predicted trajectory of the target in the next video frame by:
[0185] Establishing a state vector according to the motion state of the target, wherein the motion state includes velocity, acceleration and position;
[0186] Establishing a state transfer matrix according to the state vector, and obtaining a predicted state of the target using the state transfer matrix;
[0187] Establishing an observation matrix, and using the observation matrix to map the state vector to an observation value;
[0188] Based on the observed value, the predicted state is updated through a Kalman filter algorithm to obtain a predicted trajectory of the target in the next video frame.
[0189] like Figure 7As shown, an embodiment of the present application provides a device, including a processor 111, a communication interface 112, a memory 113 and a communication bus 114, wherein the processor 111, the communication interface 112, and the memory 113 communicate with each other through the communication bus 114.
[0190] Memory 113, used for storing computer programs;
[0191] In one embodiment of the present application, the processor 111 is used to execute the program stored in the memory 113 to implement the target tracking method provided by any of the above method embodiments, including:
[0192] Perform target detection on the video stream to be identified frame by frame, obtain the detection frame of the target in the current video frame and the predicted trajectory of the target in the previous video frame in the current video frame;
[0193] Matching the detection frame with the currently existing predicted trajectory;
[0194] When it is determined that the first predicted trajectory is successfully matched to the detection frame, continue tracking the first predicted trajectory, where the first predicted trajectory is any currently existing predicted trajectory;
[0195] When it is determined that the first predicted trajectory has not been successfully matched to the detection frame, the first predicted trajectory continues to be tracked, and during the tracking process, whether the first predicted trajectory meets the set observation condition is detected, and when it is determined that the first predicted trajectory does not meet the observation condition, the tracking of the first predicted trajectory is stopped.
[0196] An embodiment of the present application also provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the steps of the target tracking method provided in any of the aforementioned method embodiments are implemented.
[0197] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0198] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a general hardware platform, and of course, by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the relevant technology can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0199] It should be understood that the terms used herein are only for the purpose of describing specific example embodiments and are not intended to be limiting. Unless the context clearly indicates otherwise, the singular forms "one", "an" and "said" as used herein may also be meant to include plural forms. The terms "include", "comprise", "contain", and "have" are inclusive, and therefore specify the existence of stated features, steps, operations, elements and / or parts, but do not exclude the existence or addition of one or more other features, steps, operations, elements, parts, and / or combinations thereof. The method steps, processes, and operations described herein are not interpreted as necessarily requiring them to be performed in the specific order described or illustrated, unless the execution order is clearly indicated. It should also be understood that additional or alternative steps may be used.
[0200] The above description is only a specific implementation of the present application, so that those skilled in the art can understand or implement the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest range consistent with the principles and novel features applied for herein.
Claims
1. A target tracking method, characterized in that: The method comprises: Perform target detection on the video stream to be identified frame by frame, obtain the detection frame of the target in the current video frame and the predicted trajectory of the target in the previous video frame in the current video frame; Matching the detection frame with the currently existing predicted trajectory; When it is determined that the first predicted trajectory is successfully matched to the detection frame, continue tracking the first predicted trajectory, where the first predicted trajectory is any currently existing predicted trajectory; When it is determined that the first predicted trajectory has not been successfully matched to the detection frame, the first predicted trajectory continues to be tracked, and during the tracking process, whether the first predicted trajectory meets the set observation condition is detected, and when it is determined that the first predicted trajectory does not meet the observation condition, the tracking of the first predicted trajectory is stopped.
2. The method according to claim 1, characterized in that The matching of the detection frame with the currently existing predicted trajectory includes: For each detection frame in the current video frame, determining a distribution distance between the detection frame and the first predicted trajectory, and determining an apparent feature similarity between the detection frame and the first predicted trajectory; Determining a correlation between the detection box and the first predicted trajectory according to the distribution distance and the apparent feature similarity; When the correlation degree satisfies a first set condition, it is determined that the detection box matches the first predicted trajectory; when the correlation degree does not satisfy the first set condition, it is determined that the detection box does not match the first predicted trajectory.
3. The method according to claim 1, characterized in that When it is determined that the first predicted trajectory is not successfully matched to the detection frame, the first predicted trajectory is continued to be tracked, and during the tracking process, whether the first predicted trajectory satisfies a set observation condition is detected, and when it is determined that the first predicted trajectory does not satisfy the observation condition, the first predicted trajectory is stopped from being tracked, including: When it is determined that the first predicted trajectory is not successfully matched to the detection frame, the first predicted trajectory is continuously tracked in the following manner: for each detection frame in the current video frame, the detection frame is matched with the first predicted trajectory by using a set first matching algorithm; In the case where it is determined by using the first matching algorithm that the first predicted trajectory is not successfully matched to the detection frame, the first predicted trajectory is continued to be tracked in the following manner: for each detection frame in the current video frame, the detection frame is matched with the first predicted trajectory by using a set second matching algorithm; When it is determined by using the second matching algorithm that the first predicted trajectory is not successfully matched to the detection frame, it is determined that the first predicted trajectory does not meet a set observation condition, and tracking of the first predicted trajectory is stopped.
4. The method according to claim 3, characterized in that The method further comprises: When it is determined that the first predicted trajectory is successfully matched to the detection frame by using the second matching algorithm, recording the number of successful matching results obtained by using the second matching algorithm; When the number of times reaches a set threshold, determining that the first predicted trajectory does not meet the observation condition, and stopping tracking the first predicted trajectory; When the number of times does not reach the set threshold, it is determined that the first predicted trajectory meets the observation condition, and the first predicted trajectory continues to be tracked.
5. The method according to claim 3, characterized in that: The matching the detection frame and the first predicted trajectory by using a set first matching algorithm includes: Determine an intersection area and a union area between the detection box and the first predicted trajectory; Determining an overlap degree between the detection box and the first predicted trajectory according to the intersection area and the union area; When the overlap degree satisfies a second set condition, it is determined that the detection frame matches the first predicted trajectory; when the overlap degree does not satisfy the second set condition, it is determined that the detection frame does not match the first predicted trajectory.
6. The method according to claim 1, characterized in that The method further comprises: When it is determined that the first predicted trajectory is successfully matched to the detection frame, performing validity verification on the first predicted trajectory and the detection frame matched thereto; If the verification result indicates that the first predicted trajectory is invalid and / or the detection frame matched by the first predicted trajectory is invalid, tracking of the first predicted trajectory is stopped.
7. The method according to claim 1, characterized in that The predicted trajectory of the target in the next video frame is obtained by: Establishing a state vector according to the motion state of the target, wherein the motion state includes velocity, acceleration and position; Establishing a state transfer matrix according to the state vector, and obtaining a predicted state of the target using the state transfer matrix; Establishing an observation matrix, and using the observation matrix to map the state vector to an observation value; Based on the observed value, the predicted state is updated through a Kalman filter algorithm to obtain a predicted trajectory of the target in the next video frame.
8. A target tracking device, characterized in that: The device comprises: The target detection module is used to perform target detection on the video stream to be identified frame by frame, obtain the detection frame of the target in the current video frame and the predicted trajectory of the target in the previous video frame in the current video frame; A trajectory matching module, used to match the detection frame with the currently existing predicted trajectory; The trajectory tracking module is used to continue tracking the first predicted trajectory when it is determined that the first predicted trajectory is successfully matched to the detection frame, where the first predicted trajectory is any currently existing predicted trajectory; when it is determined that the first predicted trajectory is not successfully matched to the detection frame, continue tracking the first predicted trajectory, and detect whether the first predicted trajectory meets the set observation condition during the tracking process, and stop tracking the first predicted trajectory when it is determined that the first predicted trajectory does not meet the observation condition.
9. A device, characterized in that: include: A processor and a memory, wherein the processor is used to execute a target tracking program stored in the memory to implement the target tracking method according to any one of claims 1 to 7.
10. A storage medium, characterized in that: The storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the target tracking method according to any one of claims 1 to 7.