Object tracking method, electronic device, storage medium and vehicle
By using vehicle-mounted sensor data and network models in the target tracking method, combining the predicted trajectory information of the current frame and historical frames for matching, and establishing a predicted trajectory queue, the accuracy problem of target tracking in complex environments in the existing technology is solved. for higher accuracy and stability.
Patent Information
- Application Number
- PCT/CN2023/140010
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-02-28
- Filing Date
- 2023-12-19
- Publication Date
- 2024-09-06
AI Technical Summary
Existing target tracking methods have poor accuracy in complex environments. In particular, the optical flow method is greatly affected by the environment. The filtering algorithm has low tracking accuracy when the target shape changes, is occluded or disappears.
By acquiring vehicle sensor data, inputting the network model to output the current frame detection frame and predicted trajectory information of the detected target, and matching based on the predicted trajectory information of the current frame and historical frames, establishing a predicted trajectory queue to achieve time-series tracking of the target, and updating the queue Length and time thresholds to improve tracking accuracy.
While ensuring the tracking speed, the accuracy and stability of target tracking are improved, and problems such as target shape changes, occlusion and disappearance are effectively solved.
Smart Images

Figure CN2023140010_06092024_PF_FP
Abstract
Description
Target tracking method, electronic device, storage medium and vehicle
[0001] This application claims priority to Chinese patent application CN202310171954.8, filed on February 28, 2023, with the invention name “Target tracking method, electronic device, storage medium and vehicle”. The entire contents of the above Chinese patent application are incorporated into this application by reference. Technical Field
[0002] The present invention relates to the field of computer technology, and specifically provides a target tracking method, electronic equipment, storage medium and vehicle. Background Art
[0003] Advanced driver assistance systems are gaining increasing attention, and multi-target tracking is a fundamental component of these systems. Commonly used target tracking methods include optical flow and filtering algorithms. Optical flow is significantly affected by the environment, resulting in poor tracking accuracy in complex environments. Filtering algorithms also exhibit poor tracking accuracy when the target changes shape, is obscured, or disappears.
[0004] Accordingly, a new target tracking solution is needed in this field to solve the above problems.
[0005] Summary of the Invention
[0006] In order to overcome the above-mentioned drawbacks, the present invention is proposed to provide a solution or at least partially solve the above-mentioned technical problems. The present invention provides a target tracking method, an electronic device, a storage medium and a vehicle.
[0007] In a first aspect, the present invention provides a target tracking method, comprising: obtaining sensor data collected by a vehicle-mounted sensor; inputting the sensor data into a network model, outputting a current frame detection frame and current frame predicted trajectory information of at least one detection target; tracking the at least one detection target based on the current frame detection frame, the current frame predicted trajectory information, and historical frame predicted trajectory information to obtain a tracking result.
[0008] In one embodiment, the tracking of the at least one detection target based on the current frame detection frame, the current frame predicted trajectory information and the historical frame predicted trajectory information to obtain a tracking result includes: creating a tracker and initializing a predicted trajectory queue based on the tracker; adding the current frame predicted trajectory information to the initialized predicted trajectory queue; determining whether the predicted trajectory queue after adding the current frame predicted trajectory information contains only the current frame predicted trajectory information; if so, giving the detection target a new trajectory ID; if not, using the tracker to match the current frame detection frame with the historical frame predicted trajectory information in the predicted trajectory queue, and determining the trajectory ID of the detection target based on the matching result.
[0009] In one embodiment, the use of the tracker to match the current frame detection frame with the historical frame predicted trajectory information in the predicted trajectory queue, and determining the trajectory ID of the detection target based on the matching result, includes: matching the current frame detection frame with the prediction frame of the first trajectory point of the previous historical frame, wherein the prediction frame of the first trajectory point of the previous historical frame is obtained based on the predicted trajectory information of the previous historical frame; if the match is successful, the trajectory ID corresponding to the predicted trajectory information of the previous historical frame is used as the trajectory ID of the detection target; otherwise, the current frame is continued to be matched frame by frame with other historical frames before the previous historical frame in the predicted trajectory queue until the current frame detection frame successfully matches the predicted trajectory information of a frame of historical frames in the other historical frames, then the matching is stopped, and the trajectory ID corresponding to the predicted trajectory information of the successfully matched frame of historical frames is used as the trajectory ID of the detection target.
[0010] In one embodiment, the current frame is continued to be matched frame by frame with other historical frames before the previous historical frame in the predicted trajectory queue, including: taking the current frame as the t-th frame, matching the current frame detection frame with the predicted frame of the i-th trajectory point of the ti-th frame, wherein the predicted frame of the i-th trajectory point of the ti-th frame is obtained based on the predicted trajectory information of the ti-th frame, wherein t and i are positive integers, 1<i<t.
[0011] In one embodiment, the tracker is used to match the current frame detection frame with the historical frame predicted trajectory information in the predicted trajectory queue, and the trajectory ID of the detection target is determined based on the matching result, including: when the current frame detection frame fails to match the historical frame predicted trajectory information in the predicted trajectory queue, a new trajectory ID is given to the detection target.
[0012] In one embodiment, the initializing the predicted trajectory queue based on the tracker includes: setting a queue length threshold of the predicted trajectory queue based on the tracker, and setting a time length threshold of the predicted trajectory queue; the determining whether the predicted trajectory queue after adding the current frame predicted trajectory information contains only the current frame predicted trajectory information, the method further includes: performing a valid frame check on the predicted trajectory queue after adding the current frame predicted trajectory information based on the time length threshold, and selectively updating the predicted trajectory queue based on the check result; and / or selectively updating the predicted trajectory queue based on the queue length threshold.
[0013] In one embodiment, a valid frame check is performed on the predicted trajectory queue after the current frame predicted trajectory information is added based on the time length threshold, and the predicted trajectory queue is selectively updated based on the check result, including: obtaining a first timestamp corresponding to the current frame predicted trajectory information and a second timestamp corresponding to the previous historical frame predicted trajectory information in the predicted trajectory queue; determining a difference between the first timestamp and the second timestamp; determining whether the difference is less than the time length threshold; if so, updating the predicted trajectory queue; if not, not updating the predicted trajectory queue.
[0014] In one embodiment, the selectively updating the predicted trajectory queue based on the queue length threshold includes: when the length of the predicted trajectory queue after adding the predicted trajectory information of the current frame exceeds the queue length threshold, deleting the historical frame farthest from the predicted trajectory information of the current frame.
[0015] In one embodiment, before using the tracker to match the current frame detection frame with the historical frame predicted trajectory information in the predicted trajectory queue, the method further includes: converting the historical frame predicted trajectory information to a vehicle coordinate system corresponding to the current frame.
[0016] In a second aspect, an electronic device is provided, comprising at least one processor and at least one storage device, wherein the storage device is adapted to store a plurality of program codes, and the program codes are adapted to be loaded and run by the processor to execute any of the aforementioned target tracking methods.
[0017] In a third aspect, a computer-readable storage medium is provided, wherein a plurality of program codes are stored in the computer-readable storage medium, wherein the program codes are suitable for being loaded and run by a processor to execute any one of the aforementioned target tracking methods.
[0018] In a fourth aspect, a vehicle is provided, comprising the aforementioned electronic device.
[0019] The above one or more technical solutions of the present invention have at least one or more of the following beneficial effects:
[0020] The target tracking method of the present invention acquires sensor data collected by on-board sensors; inputs the sensor data into a detection model, which outputs a current-frame detection frame and current-frame predicted trajectory information for at least one detected target; and then tracks the at least one detected target based on the current-frame detection frame, current-frame predicted trajectory information, and historical-frame predicted trajectory information to obtain a tracking result. This method uses the predicted trajectory to perform time-series tracking of the target, improving the accuracy and stability of target tracking while maintaining tracking speed. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] The disclosure of the present invention will be more easily understood with reference to the accompanying drawings. Those skilled in the art will readily appreciate that these drawings are for illustrative purposes only and are not intended to limit the scope of protection of the present invention. Furthermore, similar numbers in the drawings represent similar components, wherein:
[0022] FIG1 is a schematic flow chart of the main steps of a target tracking method according to an embodiment of the present invention;
[0023] FIG2 is a schematic diagram of a process for tracking at least one detection target in an embodiment;
[0024] FIG3 is a schematic diagram of a complete flow chart of a target tracking method according to an embodiment;
[0025] FIG4 is a schematic structural diagram of an electronic device in an embodiment. DETAILED DESCRIPTION
[0026] Some embodiments of the present invention are described below with reference to the accompanying drawings. Those skilled in the art should understand that these embodiments are only used to explain the technical principles of the present invention and are not intended to limit the scope of protection of the present invention.
[0027] In the description of the present invention, "module" and "processor" may include hardware, software, or a combination of both. A module may include hardware circuitry, various suitable sensors, communication ports, and memory. It may also include software components, such as program code, or a combination of software and hardware. A processor may be a central processing unit (CPU), a microprocessor, an image processor, a digital signal processor, or any other suitable processor. A processor has data and / or signal processing capabilities. A processor may be implemented in software, hardware, or a combination of both. Non-transitory computer-readable storage media include any suitable medium capable of storing program code, such as magnetic disks, hard disks, optical disks, flash memory, read-only memory, random access memory, and the like. The term "A and / or B" refers to all possible combinations of A and B, such as only A, only B, or both A and B. The terms "at least one of A or B" or "at least one of A and B" have similar meanings to "A and / or B" and may include only A, only B, or both A and B. The singular forms "a" and "the" may also include the plural forms.
[0028] Currently, most traditional target tracking methods are optical flow and filtering algorithms. Among them, the optical flow method is greatly affected by the environment and has poor tracking accuracy in complex environments. The filtering algorithm has poor tracking accuracy in situations such as target shape changes, occlusion, or target disappearance.
[0029] To this end, this application proposes a target tracking method, electronic device, storage medium, and vehicle. These methods acquire sensor data collected by on-board sensors; input the sensor data into a detection model, which outputs a current-frame detection frame and current-frame predicted trajectory information for at least one detected target; and track the at least one detected target based on the current-frame detection frame, current-frame predicted trajectory information, and historical-frame predicted trajectory information to obtain a tracking result. In this way, the predicted trajectory is used to track the target in time, improving the accuracy and stability of target tracking while maintaining tracking speed.
[0030] Please refer to FIG1 , which is a schematic flow chart of main steps of a target tracking method according to an embodiment of the present invention.
[0031] As shown in FIG1 , the target tracking method in the embodiment of the present invention mainly includes the following steps S101 to S103 .
[0032] Step S101: Acquire sensor data collected by vehicle-mounted sensors.
[0033] Step S102: Input the sensor data into the network model, and output the current frame detection frame and current frame predicted trajectory information of at least one detection target.
[0034] Step S103: Track at least one detection target based on the current frame detection frame, the current frame predicted trajectory information, and the historical frame predicted trajectory information to obtain a tracking result.
[0035] Based on steps S101-S103 above, sensor data collected by onboard sensors is acquired; this sensor data is input into a detection model, which outputs a current-frame detection frame and current-frame predicted trajectory information for at least one detected target; and the at least one detected target is tracked based on the current-frame detection frame, current-frame predicted trajectory information, and historical-frame predicted trajectory information to obtain a tracking result. In this way, using the predicted trajectory to perform time-series tracking of the target improves the accuracy and stability of target tracking while maintaining tracking speed.
[0036] The above steps S101 to S103 are further explained below.
[0037] In step S101, the vehicle-mounted sensor may be any one of a camera and a laser radar. The sensor data collected by the vehicle-mounted sensor may be a video frame image or a point cloud image collected by a laser radar.
[0038] Furthermore, the sensor image captured by the vehicle's onboard sensors can be a single frame or multiple frames, such as sensor data collected by sensors with different viewing angles. Inputting multiple frames of data can improve the stability of detection and the accuracy of trajectory prediction, but tracking multiple frames of data requires a high level of time and computing power. In this embodiment, a single frame of sensor data is preferred.
[0039] The above is a further description of step S101 , and the following further describes step S102 .
[0040] The network model is an end-to-end network model that includes at least two tasks: detection and prediction. Sensor data is input into the network model. After undergoing feature extraction through the backbone network, a multi-task detection head, and a trajectory prediction head, the model outputs the current frame detection bounding box and predicted trajectory information for at least one detected target in the sensor data. The predicted trajectory information includes the coordinates and heading angle of the trajectory points at the future moment.
[0041] IntentNet can be used as an example of the network model, but is not limited thereto.
[0042] The above is a further description of step S102 , and the following further describes step S103 .
[0043] Specifically, the above step S103 can be implemented through the following steps S1031 to S1035.
[0044] Step S1031: Create a tracker, and initialize a predicted trajectory queue based on the tracker.
[0045] A tracker is an object. The process of creating a tracker is to create a new tracker object and initialize it at the same time.
[0046] The predicted trajectory queue is used to store current frame information and historical frame information, such as current frame predicted trajectory information, historical frame predicted trajectory information, and historical frame detection boxes.
[0047] In a specific embodiment, the initializing the predicted trajectory queue based on the tracker includes: setting a queue length threshold of the predicted trajectory queue based on the tracker, and setting a time length threshold of the predicted trajectory queue; the judging whether the predicted trajectory queue after adding the current frame predicted trajectory information only contains the current frame predicted trajectory information, the method further includes: performing a valid frame check on the predicted trajectory queue after adding the current frame predicted trajectory information based on the time length threshold, and selectively updating the predicted trajectory queue based on the check result; and / or selectively updating the predicted trajectory queue based on the queue length threshold.
[0048] Updating the predicted trajectory queue may include deleting historical frame information that does not meet the valid frame check or does not meet the queue length threshold, or acquiring new historical frame information from the historical frame information set and storing it in the predicted trajectory queue.
[0049] In a specific embodiment, a valid frame check is performed on the predicted trajectory queue after the current frame predicted trajectory information is added based on the time length threshold, and the predicted trajectory queue is selectively updated based on the check result, including: obtaining a first timestamp corresponding to the current frame predicted trajectory information and a second timestamp corresponding to the previous historical frame predicted trajectory information in the predicted trajectory queue; determining a difference between the first timestamp and the second timestamp; judging whether the difference is less than the time length threshold; if so, updating the predicted trajectory queue; otherwise, not updating the predicted trajectory queue.
[0050] Specifically, each frame has a corresponding timestamp. Checking for valid frames in the predicted trajectory queue involves checking whether the difference between the timestamp of the tth frame (the current frame) and the timestamp of the t-1th frame is within a reasonable range. Specifically, the predicted trajectory information for the current frame corresponds to the first timestamp, and the predicted trajectory information for the previous historical frame corresponds to the second timestamp. The difference between the first and second timestamps is calculated to determine whether the difference is within the time length threshold. If so, the predicted trajectory queue is updated; otherwise, the predicted trajectory queue is not updated.
[0051] By performing valid frame checks on the predicted trajectory queue, it is possible to ensure that the difference between the timestamp of the previous historical frame and the timestamp of the current frame is always within a reasonable time range, thereby improving the accuracy of target tracking.
[0052] In a specific embodiment, the selectively updating the predicted trajectory queue based on the queue length threshold includes: when the length of the predicted trajectory queue after adding the current frame predicted trajectory information exceeds the queue length threshold, deleting the historical frame farthest from the current frame predicted trajectory information.
[0053] When the length of the maintained predicted trajectory queue exceeds a queue length threshold, the historical frame farthest from the current frame information is deleted.
[0054] The queue length threshold is used to maintain the predicted trajectory queue. Maintaining a certain length of predicted trajectory queue can improve the tracking effect under occlusion or object disappearance conditions.
[0055] Step S1032: adding the current frame predicted trajectory information to the initialized predicted trajectory queue.
[0056] In one embodiment, the detection frame information of the current frame can also be added to the initialized prediction trajectory queue. Alternatively, a detection frame queue for storing detection frames can be rebuilt to store the current frame detection frame in the detection frame queue.
[0057] Step S1033: determining whether the predicted trajectory information of the current frame is the only one in the predicted trajectory queue after the predicted trajectory information of the current frame is added.
[0058] Generally speaking, during initial tracking, the predicted trajectory queue only contains the current frame's predicted trajectory information. In subsequent tracking of the target object, the predicted trajectory queue contains both the current frame's predicted trajectory information and the historical frame's predicted trajectory information.
[0059] Step S1034: If yes, give the detection target a new track ID.
[0060] Step S1035: If not, use the tracker to match the current frame detection frame with the historical frame prediction trajectory information in the prediction trajectory queue, and determine the trajectory ID of the detection target based on the matching result.
[0061] Track ID, specifically the target tracking ID.
[0062] Specifically, the matching of the current frame detection frame with the historical frame prediction trajectory information in the prediction trajectory queue mainly involves matching the current frame detection frame with the prediction frame corresponding to each frame of the historical frame prediction trajectory information frame by frame, so as to determine whether there is a historical frame in the prediction trajectory queue that can successfully match the current frame detection frame.
[0063] In a specific embodiment, the tracker is used to match the current frame detection frame with the historical frame predicted trajectory information in the predicted trajectory queue, and the trajectory ID of the detection target is determined according to the matching result, including: matching the current frame detection frame with the prediction frame of the first trajectory point of the previous historical frame, wherein the prediction frame of the first trajectory point of the previous historical frame is obtained based on the predicted trajectory information of the previous historical frame; if the match is successful, the trajectory ID corresponding to the predicted trajectory information of the previous historical frame is used as the trajectory ID of the detection target; otherwise, the current frame is continued to be matched frame by frame with other historical frames before the previous historical frame in the predicted trajectory queue until the current frame detection frame successfully matches the predicted trajectory information of a frame of historical frames in the other historical frames, then the matching is stopped, and the trajectory ID corresponding to the predicted trajectory information of the successfully matched frame of historical frames is used as the trajectory ID of the detection target.
[0064] The predicted trajectory information for each historical frame includes multiple trajectory points and the orientation of each trajectory point. Each trajectory point and its orientation are combined with the detection frame of the frame to obtain the corresponding prediction frame for each trajectory point in each frame.
[0065] Specifically, first match the detection frame of the current frame with the predicted frame of the first trajectory point in the previous historical frame. If the match is successful, the trajectory ID corresponding to the predicted trajectory information of the previous historical frame is used as the trajectory ID of the detection target; otherwise, continue to match the current frame with other historical frames before the previous historical frame in the predicted trajectory queue frame by frame until the current frame detection frame successfully matches the predicted trajectory information of one of the other historical frames. Then stop matching, and use the trajectory ID corresponding to the predicted trajectory information of the successfully matched historical frame as the trajectory ID of the detection target.
[0066] When there are multiple predicted trajectory information for the previous historical frame, there are multiple prediction frames. The detection frame needs to be matched with the multiple prediction frames separately. Specifically, the intersection-over-union (IoU) between the detection frame and each prediction frame is calculated, and at least one IoU that meets the conditions is selected from the multiple IoUs. Then, the Hungarian matching algorithm is used to determine the prediction frame that can successfully match the detection frame.
[0067] In a specific embodiment, the current frame is continued to be matched frame by frame with other historical frames before the previous historical frame in the predicted trajectory queue, including: taking the current frame as the t-th frame, matching the current frame detection frame with the predicted frame of the i-th trajectory point of the ti-th frame, wherein the predicted frame of the i-th trajectory point of the ti-th frame is obtained based on the predicted trajectory information of the ti-th frame, wherein t and i are positive integers, 1<i<t.
[0068] Specifically, as shown in Figure 2, when the current frame detection frame (frame t) fails to match the previous historical frame (frame t-1), the current frame detection frame is matched with the predicted frame of the second trajectory point in frame t-2. If the match is successful, the trajectory ID corresponding to the predicted trajectory information of frame t-2 is used as the trajectory ID of the detected target. If the match fails, the current frame detection frame is matched with frame t-3, and this step is repeated until the current frame detection frame successfully matches the historical frame in the predicted trajectory queue, and the trajectory ID of the detected target is output.
[0069] In a specific embodiment, the tracker is used to match the current frame detection frame with the historical frame predicted trajectory information in the predicted trajectory queue, and the trajectory ID of the detection target is determined according to the matching result, including: if the current frame detection frame fails to match the historical frame predicted trajectory information in the predicted trajectory queue, a new trajectory ID is given to the detection target.
[0070] Specifically, when the current frame detection box fails to match all historical frames in the prediction trajectory queue, a new trajectory ID is given to the detection target, indicating that the detection target is a newly appeared target.
[0071] By maintaining the predicted trajectory queue and matching the current frame information with the historical predicted information, the tracking target is obtained. This solves the problems of morphological changes, occlusion, and disappearance of the detected target during the tracking process to a certain extent, thereby outputting a stable tracking target.
[0072] In one embodiment, as specifically shown in FIG3 , after constructing the tracker and before target tracking, data preprocessing can also be performed on the current frame detection frame and current frame predicted trajectory information of at least one detected target output in step S102. For example, the detection frame information and the predicted trajectory information include the category and confidence of the frame, and confidence thresholds of different categories are set to filter out detection frames and predicted trajectories with lower confidence. In addition, for multimodal prediction of trajectories, that is, when a frame predicts multiple trajectories, it is necessary to filter out the predicted trajectory with the highest confidence. In this way, the complexity of target tracking is reduced and the efficiency and accuracy of target tracking are improved.
[0073] In a specific embodiment, before using the tracker to match the current frame detection frame with the historical frame predicted trajectory information in the predicted trajectory queue, the method further includes: converting the historical frame predicted trajectory information to a vehicle coordinate system corresponding to the current frame.
[0074] Specifically, before matching, the coordinate transformation matrix for converting the historical frame information to the current frame can be determined based on the vehicle positioning information. The predicted trajectory information from the historical frame can then be converted to the vehicle coordinate system corresponding to the current frame based on the coordinate transformation matrix. This facilitates subsequent matching of the current frame detection frame with the historical frame information.
[0075] It should be pointed out that although the various steps in the above embodiments are described in a specific order, those skilled in the art will understand that in order to achieve the effects of the present invention, different steps do not have to be performed in such an order. They can be performed simultaneously (in parallel) or in other orders. These changes are within the scope of protection of the present invention.
[0076] Those skilled in the art will appreciate that all or part of the processes in the method for implementing the above-mentioned embodiment of the present invention may also be accomplished by instructing the relevant hardware through a computer program. The computer program may be stored in a computer-readable storage medium. When the computer program is executed by a processor, it may implement the steps of each of the above-mentioned method embodiments. The computer program includes computer program code, which may be in source code form, object code form, executable file, or some intermediate form. The computer-readable storage medium may include: any entity or device, medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory, random access memory, electric carrier signal, telecommunication signal, and software distribution medium capable of carrying the computer program code. It should be noted that the content contained in the computer-readable storage medium may be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable storage media do not include electric carrier signals and telecommunication signals.
[0077] Furthermore, the present invention also provides an electronic device. In an electronic device embodiment according to the present invention, as specifically shown in FIG4 , the electronic device includes at least one processor 41 and at least one storage device 42. The storage device can be configured to store a program for executing the target tracking method of the above-mentioned method embodiment, and the processor can be configured to execute the program in the storage device, which includes but is not limited to a program for executing the target tracking method of the above-mentioned method embodiment. For ease of explanation, only the parts related to the embodiment of the present invention are shown. For specific technical details not disclosed, please refer to the method section of the embodiment of the present invention.
[0078] In an embodiment of the present invention, the electronic device may be a control device device formed by various devices. In some possible implementations, the electronic device may include multiple storage devices and multiple processors. The program for executing the target tracking method of the above method embodiment may be divided into multiple subroutines, and each subroutine may be loaded and run by a processor to execute different steps of the target tracking method of the above method embodiment. Specifically, each subroutine may be stored in different storage devices, and each processor may be configured to execute the program in one or more storage devices to jointly implement the target tracking method of the above method embodiment, that is, each processor executes different steps of the target tracking method of the above method embodiment to jointly implement the target tracking method of the above method embodiment.
[0079] The aforementioned multiple processors may be processors deployed on the same device. For example, the aforementioned electronic device may be a high-performance device composed of multiple processors, and the aforementioned multiple processors may be processors configured on the high-performance device. Furthermore, the aforementioned multiple processors may also be processors deployed on different devices. For example, the aforementioned electronic device may be a server cluster, and the aforementioned multiple processors may be processors on different servers in the server cluster.
[0080] Furthermore, the present invention also provides a computer-readable storage medium. In a computer-readable storage medium embodiment according to the present invention, the computer-readable storage medium can be configured to store a program for executing the target tracking method of the above-mentioned method embodiment, and the program can be loaded and run by the processor to implement the above-mentioned target tracking method. For ease of explanation, only the parts related to the embodiment of the present invention are shown. For specific technical details not disclosed, please refer to the method part of the embodiment of the present invention. The computer-readable storage medium can be a storage device formed by various electronic devices. Optionally, the computer-readable storage medium in the embodiment of the present invention is a non-transitory computer-readable storage medium.
[0081] Furthermore, the present invention also provides a vehicle, which includes the aforementioned electronic device.
[0082] Thus far, the technical solutions of the present invention have been described in conjunction with the preferred embodiments shown in the accompanying drawings. However, it will be readily understood by those skilled in the art that the scope of protection of the present invention is obviously not limited to these specific embodiments. Without departing from the principles of the present invention, those skilled in the art may make equivalent changes or substitutions to the relevant technical features, and the technical solutions after such changes or substitutions will fall within the scope of protection of the present invention.
Claims
1. A target tracking method, characterized in that: The method comprises: Obtain sensor data collected by vehicle-mounted sensors; Inputting the sensor data into a network model, and outputting a current frame detection frame and current frame predicted trajectory information of at least one detection target; The at least one detection target is tracked based on the current frame detection frame, the current frame predicted trajectory information and the historical frame predicted trajectory information to obtain a tracking result.
2. The target tracking method according to claim 1, characterized in that: The step of tracking the at least one detection target based on the current frame detection frame, the current frame predicted trajectory information, and the historical frame predicted trajectory information to obtain a tracking result includes: Creating a tracker, and initializing a prediction trajectory queue based on the tracker; Adding the current frame predicted trajectory information to the initialized predicted trajectory queue; Determine whether the predicted trajectory information of the current frame is the only one in the predicted trajectory queue after the predicted trajectory information of the current frame is added; If so, give the detected target a new track ID; If not, the tracker is used to match the current frame detection frame with the historical frame prediction trajectory information in the prediction trajectory queue, and the trajectory ID of the detection target is determined according to the matching result.
3. The target tracking method according to claim 2, characterized in that: The using the tracker to match the current frame detection frame with the historical frame prediction trajectory information in the prediction trajectory queue, and determining the trajectory ID of the detection target according to the matching result, includes: Matching the current frame detection frame with the prediction frame of the first trajectory point of the previous historical frame, wherein the prediction frame of the first trajectory point of the previous historical frame is obtained based on the prediction trajectory information of the previous historical frame; If the match is successful, the trajectory ID corresponding to the predicted trajectory information of the previous historical frame is used as the trajectory ID of the detected target; Otherwise, the current frame is continued to be compared with the previous historical frame in the prediction trajectory queue. The other historical frames before are matched frame by frame until the current frame detection frame successfully matches the predicted trajectory information of one historical frame in the other historical frames, then the matching is stopped, and the trajectory ID corresponding to the predicted trajectory information of the successfully matched historical frame is used as the trajectory ID of the detection target.
4. The target tracking method according to claim 3, characterized in that: The continuing to match the current frame with other historical frames before the previous historical frame in the predicted trajectory queue frame by frame includes: taking the current frame as the t-th frame, matching the current frame detection frame with the predicted frame of the i-th trajectory point of the ti-th frame, wherein the predicted frame of the i-th trajectory point of the ti-th frame is obtained based on the predicted trajectory information of the ti-th frame, wherein t and i are positive integers, 1<i<t.
5. The target tracking method according to claim 4, characterized in that: The method of using the tracker to match the current frame detection frame with the historical frame predicted trajectory information in the predicted trajectory queue, and determining the trajectory ID of the detection target according to the matching result, includes: when the current frame detection frame fails to match all the historical frame predicted trajectory information in the predicted trajectory queue, giving the detection target a new trajectory ID.
6. The target tracking method according to claim 2, characterized in that: The initializing the prediction trajectory queue based on the tracker includes: Setting a queue length threshold of the predicted trajectory queue based on the tracker, and setting a time length threshold of the predicted trajectory queue; The method further comprises: determining whether the predicted trajectory queue after adding the predicted trajectory information of the current frame contains only the predicted trajectory information of the current frame. Performing a valid frame check on the predicted trajectory queue after adding the predicted trajectory information of the current frame based on the time length threshold, and selectively updating the predicted trajectory queue based on the check result; and / or The predicted trajectory queue is selectively updated based on the queue length threshold.
7. The target tracking method according to claim 6, characterized in that: Performing a valid frame check on the predicted trajectory queue after adding the predicted trajectory information of the current frame based on the time length threshold, and selectively updating the predicted trajectory queue based on the check result, including: Obtaining a first timestamp corresponding to the predicted trajectory information of the current frame and a second timestamp corresponding to the predicted trajectory information of the previous historical frame in the predicted trajectory queue; Determine a difference between the first timestamp and the second timestamp; Determine whether the difference is less than the time length threshold; If so, the predicted trajectory queue is updated; if not, the predicted trajectory queue is not updated.
8. The target tracking method according to claim 6, characterized in that: The selectively updating the predicted trajectory queue based on the queue length threshold includes: when the length of the predicted trajectory queue after adding the current frame predicted trajectory information exceeds the queue length threshold, deleting the historical frame farthest from the current frame predicted trajectory information.
9. The target tracking method according to claim 2, characterized in that: Before using the tracker to match the current frame detection frame with the historical frame predicted trajectory information in the predicted trajectory queue, the method further includes: converting the historical frame predicted trajectory information to a vehicle coordinate system corresponding to the current frame.
10. An electronic device comprising at least one processor and at least one storage device, wherein the storage device is suitable for storing a plurality of program codes, wherein: The program code is suitable for being loaded and run by the processor to execute the target tracking method according to any one of claims 1 to 9.
11. A computer-readable storage medium storing a plurality of program codes, characterized in that: The program code is suitable for being loaded and run by a processor to execute the target tracking method according to any one of claims 1 to 9.
12. A vehicle, characterized in that: The vehicle includes the electronic device according to claim 10.
Citation Information
Patent Citations
Obstacle vehicle trajectory prediction method and device and computer device
CN111428943A
Pedestrian tracking method and device in escalator scene based on LSTM model, and medium
CN111986228A
Pedestrian tracking and image matching method and related equipment
CN112528925A
Target tracking method, electronic equipment, storage medium and vehicle
CN115965657A
Tracking on-road vehicles with sensors of different modalities
US20140032012A1
Cited By
Target detection label smoothing method based on historical information
CN119810505A
Multi-target tracking method and device, electronic equipment and computer readable storage medium
CN120912640A
Endoscopic image-based part identification method and device, and storage medium
CN121391786A
Unmanned aerial vehicle target compensation and tracking recovery method capable of resisting pose interference in complex shielding environment
CN121789100A
Vehicle control method and electronic equipment
CN122009249A
