Target tracking method and device, electronic equipment and storage medium
By combining location matching and risk coefficient-optimized feature matching, the problem of missed and false matching in delivery rider target tracking is solved, improving tracking stability and accuracy, and effectively reducing target loss, especially in complex environments.
Patent Information
- Application Number
- CN202511288985.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-09
- Publication Date
- 2025-12-12
AI Technical Summary
When tracking delivery riders, there are issues with missed or incorrect matching, resulting in low trajectory tracking stability, especially when pedestrians, low-speed or stationary vehicles are moving between them and the observation is incomplete.
By acquiring the current detection information and historical tracking information of delivery riders, location matching and feature matching are performed. The matching process is optimized by combining historical risk coefficients, including using motion models to predict the current state and using risk coefficients to assist feature matching when matching fails, thereby improving tracking accuracy.
It improves the continuity and accuracy of tracking for delivery riders in complex scenarios, reduces the loss of targets, and effectively avoids the loss of key targets, especially in high-risk environments.
Smart Images

Figure CN121120699A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of tracking technology, and in particular to a target tracking method, apparatus, electronic device, and storage medium. Background Technology
[0002] With the development of technology, more and more vehicles are now equipped with driver assistance systems, and target tracking is a crucial technology for achieving this. When tracking delivery riders, due to time-limited delivery requirements, their movement patterns differ significantly from other targets. Delivery riders weave between pedestrians, slow-moving or stationary vehicles, and are frequently obscured by other targets, resulting in incomplete observations. Consequently, missed or incorrect matches are prone to occur, leading to low stability in trajectory tracking. Summary of the Invention
[0003] This application provides a target tracking method, apparatus, electronic device, and storage medium, aiming to improve the tracking stability during the target tracking process of delivery riders.
[0004] In a first aspect, embodiments of this application provide a target tracking method, the method comprising:
[0005] For the target to be tracked, the detection information corresponding to the current moment and the historical tracking information corresponding to the previous moment are obtained, and the current moment is predicted based on the historical tracking information to obtain the tracking prediction information corresponding to the current moment; wherein, the target to be tracked includes delivery riders;
[0006] The detection information and the tracking prediction information corresponding to the current moment are matched to obtain a first matching result;
[0007] For the tracking targets that failed to match in the first matching result, obtain the historical risk coefficient corresponding to the tracking targets;
[0008] Based on the historical risk coefficient, feature matching is performed between the tracked target and the detection information to obtain a second matching result;
[0009] Based on the first matching result and the second matching result, the current tracking information corresponding to the current moment is determined.
[0010] Secondly, embodiments of this application also provide a target tracking device, the device comprising:
[0011] The first acquisition module is used to acquire detection information corresponding to the current moment and historical tracking information corresponding to the previous moment for the target to be tracked, and to predict the current moment based on the historical tracking information to obtain tracking prediction information corresponding to the current moment; wherein, the target to be tracked includes delivery riders;
[0012] The first matching module is used to perform position matching on the detection information and the tracking prediction information corresponding to the current time to obtain a first matching result;
[0013] The first determining module is used to obtain the historical risk coefficient corresponding to the tracking target for the tracking target that failed to match in the first matching result;
[0014] The second matching module is used to perform feature matching between the tracked target and the detection information based on the historical risk coefficient to obtain a second matching result;
[0015] The second determining module is used to determine the current tracking information corresponding to the current moment based on the first matching result and the second matching result. Thirdly, embodiments of this application also provide an electronic device, which includes a processor, a memory, and a computer program stored in the memory and executable on the processor. When the computer program is executed by the processor, it implements the above-described target tracking method.
[0016] Fourthly, embodiments of this application also provide a computer-readable storage medium storing a computer program that, when executed by a processor, implements the target tracking method described above.
[0017] The embodiments of this application include at least the following technical effects:
[0018] The technical solution of this application embodiment obtains the current detection information and historical tracking information of the delivery rider and predicts the current status. By combining the two results through location matching and feature matching with risk coefficient, the current tracking information is determined. This can improve the tracking continuity and accuracy of the delivery rider in complex scenarios. Especially when matching is difficult, the risk coefficient is used to assist in optimizing feature matching, which can effectively reduce the loss of the target. Attached Figure Description
[0019] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the accompanying drawings used in the description of the embodiments or the prior art will be briefly introduced below.
[0020] Figure 1 This is one of the flowcharts illustrating the target tracking method provided in the embodiments of this application;
[0021] Figure 2This is a second schematic flowchart of the target tracking method provided in the embodiments of this application;
[0022] Figure 3 This is a schematic diagram of the target tracking device provided in the embodiments of this application;
[0023] Figure 4 A block diagram of an electronic device provided in an embodiment of this application. Detailed Implementation
[0024] To make the technical problems, technical solutions, and beneficial effects solved by this application clearer, the following detailed description is provided in conjunction with embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0025] Example 1
[0026] This application provides a target tracking method. Please refer to the embodiments provided. Figure 1 This includes the following steps:
[0027] Step 101: For the target to be tracked, obtain the detection information corresponding to the current moment and the historical tracking information corresponding to the previous moment, and predict the current moment based on the historical tracking information to obtain the tracking prediction information corresponding to the current moment; wherein, the target to be tracked includes delivery riders.
[0028] This application provides a target tracking method applied to a vehicle target tracking system. The target to be tracked can be a small but fast-moving object, such as a delivery rider. The method acquires the detection information corresponding to the current moment and the historical tracking information corresponding to the previous moment. The detection information can be image information or point cloud information collected in real time by sensors such as cameras and radar. The historical tracking information is the recorded tracking information from the previous moment, including at least the position, speed, and direction of the tracked target.
[0029] Historical tracking information is input into a motion model, such as a constant velocity model or a constant acceleration model, to predict the position and velocity of the tracked target at the current moment, thus obtaining tracking prediction information. The number of tracked targets included in the historical tracking information is equal to the number of predicted targets included in the tracking prediction information, and they correspond one-to-one. For example, in the previous moment, delivery rider A was detected on the north side of an intersection at a speed of 3 m / s, heading south. Based on the historical tracking information, it is predicted that A should be located in the center of the intersection at the current moment, with his speed decreasing to 1 m / s (consistent with intersection deceleration characteristics), generating tracking prediction information containing the predicted position and velocity.
[0030] Predicting the current moment using historical tracking information can provide an initial reference for subsequent location matching, thus improving tracking continuity.
[0031] Step 102: Perform position matching on the detection information and the tracking prediction information corresponding to the current time to obtain the first matching result.
[0032] After obtaining the detection information and tracking prediction information corresponding to the current moment, the first step is to perform initial matching, also known as position matching. Specifically, this involves calculating the positional distance between each detected target in the detection information and each tracked target in the tracking prediction information. Detected targets whose distance is less than a preset distance threshold are matched with the tracked targets to obtain the first matching result. Optionally, position matching can be combined with motion consistency verification. In addition to distance, the motion direction (such as the cyclist's turning angle) of the detected target and the predicted target is compared. If the directional deviation is too large (e.g., exceeding 90 degrees), even if the distance meets the threshold, the match is considered to have failed, thus reducing false matching.
[0033] Specifically, the first matching result includes the matching result for each detected target and the matching result for each predicted target, with the matching result being either a successful match or a failed match. If the matching result for a detected target is a successful match, it indicates that the detected target is not a new target, but a target that was detected in the previous moment and is a tracked target; if the matching result for a detected target is a failed match, it indicates that the detected target is a new target. If the matching result for a predicted target is a successful match, it indicates that the tracked target corresponding to the predicted target has appeared in the current moment and there is a matching detected target; if the matching result for a predicted target is a failed match, it indicates that the tracked target corresponding to the predicted target has not been detected in the current moment, possibly due to a missed detection or the tracked target having moved outside the detection area. The reasons for a missed detection may include occlusion, rapid change of direction by the target, etc. For example, the detection information includes three detected targets, namely detected target 1, detected target 2, and detected target 3. The tracking prediction information includes four predicted targets, namely predicted target 1, predicted target 2, predicted target 3, and predicted target 4. The first matching result is obtained through position matching: Detected target 1 and predicted target 1 are successfully matched, Detected target 2 and predicted target 2 are successfully matched, Detected target 3 is not matched, and both predicted target 3 and predicted target 4 are not matched.
[0034] By quickly completing the initial matching, i.e., location matching, we can filter out target pairs that are likely to match, while also distinguishing the failed matches that need to be handled with priority.
[0035] Step 103: For the tracking targets that failed to match in the first matching result, obtain the historical risk coefficient corresponding to the tracking targets.
[0036] After obtaining the first matching result, it is determined whether the first matching result includes any tracked targets that failed to match. In other words, it is determined whether there are any tracked targets from the previous moment that have not been detected in the current moment. If so, the risk coefficient corresponding to the tracked target is obtained. This risk coefficient is used to quantify the degree of danger of the environment in which the tracked target is located, and will affect the strictness of subsequent secondary matching. For example, for tracked targets with high risk coefficients, more lenient matching conditions are required to avoid losing tracking.
[0037] Specifically, in this embodiment of the application, after obtaining the detection information, a risk coefficient is calculated for each detection target included in the detection information, and the coefficient is saved to the parameter information corresponding to that detection target. When calculating the risk coefficient, information such as traffic speed, the intersection relationship between the detection target and the trajectories of nearby vehicles, weather factors, and the behavioral characteristics of the detection target can be incorporated.
[0038] By introducing a risk perception mechanism, the tracking strategy can be adapted to the level of environmental danger, avoiding the loss of key targets due to strict matching in high-risk scenarios and improving the practicality of tracking.
[0039] Step 104: Based on the historical risk coefficient, perform feature matching between the tracking target and the detection information to obtain a second matching result.
[0040] For tracking targets that fail to match in the initial matching, the tracking target and the detection information are rematched based on the historical risk coefficient corresponding to the tracking target. Feature matching can be used here. By using the historical risk coefficient, the similarity calculated between the tracking target and the detection target in the detection information can be enhanced, such as by increasing the similarity, thereby solving the problem of position matching failure caused by occlusion, rapid movement, etc., and improving the tracking success rate in complex scenarios.
[0041] For example, the target's appearance features are "blue helmet, red electric bike". A cyclist is detected in the secondary matching area with an appearance similarity of 0.6 (below the threshold of 0.7). However, because A has a high risk coefficient (0.8), the enhanced similarity is 0.6 × 1.2 = 0.72 (exceeding the threshold of 0.7), and the match is determined to be successful.
[0042] Step 105: Determine the current tracking information corresponding to the current moment based on the first matching result and the second matching result.
[0043] The first and second matching results are fused to obtain the current tracking information corresponding to the current moment.
[0044] Specifically, for detected and predicted targets that successfully match in the first matching result, they are directly added to the current tracking information at the current moment. For detected targets that fail to match in the first matching result, they are added to the current tracking information as new tracking targets, realizing the dynamic addition of new targets. For tracking targets that fail to match in the first matching result, a second matching is performed to obtain a second matching result. If the second matching result is successful, it is added to the current tracking information at the current moment. If the second matching result is unsuccessful, the failure count of the tracking target is incremented by 1. If the failure count exceeds a preset threshold, such as 3 times, tracking is stopped in subsequent matching processes.
[0045] In this embodiment, by acquiring the current detection information and historical tracking information of the delivery rider and predicting the current status, and by combining the two results through location matching and feature matching with risk coefficient, the current tracking information is determined. This can improve the tracking continuity and accuracy of the delivery rider in complex scenarios. Especially when matching is difficult, the risk coefficient is used to assist in optimizing feature matching, which can effectively reduce the loss of the target.
[0046] The following describes how to obtain the risk coefficient of a tracking target. In an optional embodiment of this application, obtaining the historical risk coefficient corresponding to the tracking target includes:
[0047] Obtain historical traffic flow speeds;
[0048] The vehicle closest to the tracked target is identified as the target vehicle, and the historical trajectory intersection relationship between the tracked target and the target vehicle is obtained;
[0049] Based on the pre-stored correspondence between traffic flow speed, trajectory intersection relationship and risk coefficient, the risk coefficient corresponding to the historical traffic flow speed and the historical trajectory intersection relationship is determined and identified as the historical risk coefficient.
[0050] When determining the historical risk coefficient, it is necessary to obtain historical traffic environment data, such as the intersection relationship between historical traffic flow speeds and historical trajectories. When obtaining historical traffic flow speeds, a key area can be identified first, and the average or weighted average speed of all vehicles traveling in the same direction within the key area can be taken as the traffic flow speed. For example, different weights can be assigned based on the distance between the vehicle and the target being tracked, with higher weights for closer vehicles. This key area can be a rectangular area with the vehicle as the origin. For example, the longitudinal interval is [-20 meters, min(80 meters, V*3)], where V is the vehicle speed in meters per second, and the lateral interval is [-8 meters, 8 meters].
[0051] When acquiring historical trajectory intersection relationships, the target vehicle is first identified, which can be the vehicle closest to the tracked target. Then, the first forward direction corresponding to the tracked target and the second forward direction corresponding to the target vehicle are obtained, and the angle between the first and second forward directions is determined as the target angle. Finally, based on the pre-stored correspondence between angle intervals and trajectory intersection relationships, the trajectory intersection relationship corresponding to the target angle is determined and identified as the historical trajectory intersection relationship. This historical trajectory intersection relationship reflects the possibility of intersection, parallelism, or other conflicts between the target vehicle and the tracked target's trajectories. Optionally, multiple target vehicles can be selected, that is, vehicles within a preset distance threshold from the tracked target are identified as target vehicles, and multiple trajectory intersection relationships are obtained. Finally, the one with the highest risk level is selected as the historical trajectory intersection relationship.
[0052] For example, when the target angle is ±1°, the trajectory corresponds to parallel; when the target angle is 90°±3° or -90°±3°, the trajectory corresponds to traversing; when the target angle is [0°, 87°] or [0°, -87°), the trajectory corresponds to cutting in; when the target angle is (93°, 180°] or [-180°, -93°), the trajectory corresponds to reversing.
[0053] After obtaining the historical traffic flow speed and historical trajectory intersection relationship, the corresponding risk coefficient is matched by using the pre-stored correspondence between "traffic flow speed, trajectory intersection relationship and risk coefficient" as shown in Table 1. The historical traffic flow speed and historical trajectory intersection relationship are used as input, which is the historical risk coefficient.
[0054] Table 1
[0055]
[0056] The above-described implementation scheme of this application obtains the historical traffic flow speed and historical trajectory intersection relationship, and then obtains the historical risk coefficient based on the preset correspondence relationship. This can comprehensively trace and quantify the risks faced by the target in the previous moment, and provide a reliable historical reference for analyzing risk change trends and optimizing the current tracking strategy.
[0057] In an optional embodiment of this application, after performing position matching on the detection information and the tracking prediction information corresponding to the current time to obtain a first matching result, the method further includes:
[0058] For the detection targets that fail to match in the first matching result, the detection targets are created as new tracking targets, and the new tracking targets are tracked and detected at the next time corresponding to the current time.
[0059] For the tracking targets that are successfully matched in the first matching result, update the status information corresponding to the tracking targets.
[0060] This application embodiment obtains a first matching result through location matching and determines whether there are any failed-matching targets in the first matching result. If so, the detected target is created as a new tracking target, that is, a unique tracking ID is assigned to it to distinguish different tracking targets, basic state information such as current position, initial speed, and appearance features detected for the first time is initialized, and it is included in the tracking list as a new tracking target; in subsequent moments, such as the next frame or the next second of the current moment, prediction and matching are performed based on the initial state of the target, and tracking and detection are continuously carried out to ensure that the new target does not leave the monitoring range. For example, at time T, a delivery rider wearing a red uniform and a blue helmet is detected. The distance between the rider's position and the predicted position of all tracking targets at the previous moment exceeds 8 meters (the matching threshold is 5 meters), and it is determined that the match has failed. At this point, a tracking ID “Track_001” is assigned to the delivery rider, with the initial status set to “Location: Northeast side of the intersection, Speed: 4m / s, Appearance: Red work clothes + blue helmet”, and the rider is created as a new tracking target. At time T+1, the rider’s position is predicted based on the initial speed of “Track_001”, and matched with the detection information at time T+1 to continue tracking the rider.
[0061] This application embodiment also determines whether there is a successfully matched tracking target in the first matching result. If there is, it indicates that the tracking target has successfully matched one of the detected targets at the current time. At this time, based on the detection information at the current time, the status information of the tracking target, such as position, speed, appearance features, etc., is updated.
[0062] For example, the delivery rider "Track_002" tracked in the previous moment was predicted to be "slightly south of the center of the intersection" at time T, with a speed of 3 m / s; at time T, the rider's actual detected position was "1 meter south of the center of the intersection," with a speed of 3.2 m / s. After a successful match, the status of "Track_002" is updated: the position is updated to the actual detected position, and the speed is updated to 3.2 m / s, while the position and speed from the previous moment are retained as historical data.
[0063] The above-described implementation scheme of this application, by differentiating the location matching results, creates new tracking targets for the detection targets that fail to match and continues to track them, avoiding the omission of newly emerging objects to be tracked; at the same time, it updates the status information of the successfully matched tracking targets to ensure that the tracking data is synchronized with the actual situation of the targets, and finally achieves complete coverage and accurate dynamic management of the tracking targets, thereby improving the practicality and reliability of the target tracking system in dynamic scenarios.
[0064] In an optional embodiment of this application, after obtaining the second matching result, the method further includes:
[0065] When the second matching result indicates that the tracking target has been successfully matched, the status information corresponding to the tracking target is updated;
[0066] When the second matching result indicates that the tracking target has failed to match, the number of failed matches corresponding to the tracking target is incremented by one.
[0067] Determine whether the number of failed matches exceeds a preset threshold;
[0068] When the number of failed matches equals the preset threshold, the tracking and detection of the target is stopped.
[0069] Specifically, the second matching result can be either a successful match or a failed match.
[0070] When the second matching result indicates a successful match for the tracked target, it means that by using appearance features and expanding the search range, it has been confirmed that the detected target and the tracked target are the same object. For example, if the location matching failed due to occlusion, feature comparison has confirmed that it is the same cyclist. At this point, it is necessary to update the status information of the tracked target, such as real-time location, latest appearance features, speed, direction, etc., to ensure that the tracking data always reflects the latest status of the target.
[0071] When the second matching result indicates a failed match for the tracked target, it means that the target's existence cannot be confirmed through dual verification of location and features at the current moment, such as when the delivery rider has completely left the monitoring area or is obscured by a large vehicle for an extended period. In this case, the "failed match count" for the tracked target should be incremented by one to record the number of times tracking has been interrupted. At the same time, the target's historical status information, such as the location and appearance features of the last match, should be retained to provide a basis for rematching at the next moment and to avoid directly deleting the target, which would make subsequent tracking unrecoverable.
[0072] Simultaneously, it checks if the number of failed matches exceeds a preset threshold. If the number of failed matches equals the preset threshold, it indicates that the tracked target has likely left the monitoring range or been permanently lost. For example, if the cyclist leaves the intersection, tracking of the target is stopped, and the target's ID and all status information are deleted from the tracking list. If the number of failed matches does not exceed the preset threshold, it indicates that the tracked target still has a high probability of resuming tracking later, such as when the brief obstruction ends, and the tracking target is retained. The preset threshold here is the maximum number of consecutive failed matches allowed for a tracked target, such as 3 times.
[0073] The above implementation scheme of this application dynamically manages the tracking target based on the secondary matching result. When the matching is successful, the status is updated to ensure the accuracy of the tracking data and the continuity of the tracking. When the matching fails, the number of times is accumulated to avoid accidentally deleting the effective tracking target. When the number of times reaches the threshold, the tracking is terminated and resources are released, thus balancing the accuracy and continuity of the tracking.
[0074] In an optional embodiment of this application, based on the historical risk coefficient, a second matching is performed between the tracking target and the detection information to obtain a second matching result, including:
[0075] Obtain the historical appearance features corresponding to the tracked target;
[0076] The area surrounding the predicted location of the tracked target is defined as the secondary matching area.
[0077] The appearance features of the secondary matching region in the detection information are extracted to obtain the current appearance features;
[0078] Calculate the similarity between the historical appearance features and the current appearance features to obtain the appearance similarity.
[0079] The appearance similarity is enhanced based on the historical risk coefficient to obtain the target similarity;
[0080] The second matching result is obtained by comparing the target similarity with a preset similarity threshold;
[0081] Wherein, when the target similarity is greater than or equal to the preset similarity threshold, the second matching result is that the tracked target is successfully matched;
[0082] When the target similarity is less than the preset similarity threshold, the second matching result is that the tracking target has failed to match.
[0083] For tracking targets requiring secondary matching, the historical appearance features of the target, such as helmet color, clothing style, and electric vehicle brand logo, are first obtained when a match was successfully made in the past. Simultaneously, the secondary matching region is determined, specifically a search area defined around the predicted location of the tracking target, such as a rectangular area of ±M meters horizontally and ±N meters vertically. Feature extraction is then performed on the secondary matching region from the detection information to obtain the current appearance features.
[0084] After obtaining historical and current appearance features, the similarity between the historical and current appearance features is calculated to obtain the appearance similarity. A cosine similarity algorithm can be used to calculate the similarity. Then, based on the risk coefficient reflecting the degree of danger in the environment where the target is located (e.g., high traffic speeds or high risk coefficients at trajectory intersections), the appearance similarity is enhanced using historical risk coefficients to obtain the target similarity. Finally, the target similarity is compared with a preset similarity threshold to obtain a second matching result. When the target similarity is greater than or equal to the preset similarity threshold, the second matching result indicates a successful target match; when the target similarity is less than the preset similarity threshold, the second matching result indicates a failed target match.
[0085] The above-described implementation scheme of this application extracts the historical appearance features of the tracked target, delineates a secondary matching region around its predicted location and extracts the current appearance features, calculates the similarity between the two and combines it with the historical risk coefficient to enhance the similarity, and then compares it with a threshold to obtain the secondary matching result. This can effectively make up for the problem of initial matching failure, adapt to environmental interference and risk scenarios, improve the anti-interference capability and continuity of target tracking in complex dynamic environments, and ensure that key targets are not lost in high-risk scenarios.
[0086] In an optional embodiment of this application, before obtaining the detection information corresponding to the current moment and the historical tracking information corresponding to the previous moment, the method further includes:
[0087] When the vehicle is in the start-up state, map information and the location information corresponding to the vehicle are acquired;
[0088] Based on the map information and the location information, it is determined whether the vehicle is located in the target area; wherein, the target area includes intersection areas;
[0089] When it is determined that the vehicle is located in the target area, the step of obtaining the detection information corresponding to the current moment and the historical tracking information corresponding to the previous moment is executed.
[0090] To reduce the computational cost of the target tracking system, this application embodiment can set triggering conditions so that the step of obtaining the detection information corresponding to the current moment and the historical tracking information corresponding to the previous moment is triggered only when the vehicle is in the target area. This can ensure the tracking accuracy in complex scenarios while reducing the system's ineffective computational cost.
[0091] Specifically, when the vehicle is started, map information and vehicle location information are acquired. The map information includes the road topology within the administrative region where the vehicle is currently traveling and the geographical boundaries of the target area. The vehicle location information can be obtained through onboard positioning equipment and used as a real-time basis for determining the vehicle's location.
[0092] Based on map and location information, it is determined whether the vehicle's current location falls within a target area, which can be an intersection. If the vehicle is confirmed to be within the target area, subsequent processes are triggered. If it is determined not to be within the target area, subsequent processes are not initiated to reduce computational resource consumption.
[0093] The above-described implementation scheme of this application obtains map and location information while the vehicle is in motion, determines whether the vehicle is in a target area such as an intersection, and initiates the subsequent detection and tracking information acquisition process only when the vehicle is in the target area. This not only ensures sufficient data and complete process for tracking in target areas with complex traffic, improving tracking accuracy and reliability, but also avoids resource waste caused by initiating high-consumption processes in non-target areas, thus achieving a balance between efficient use of system resources and scenario-based accurate tracking.
[0094] The overall implementation process of the embodiments of this application is described below, such as... Figure 2 As shown, it includes:
[0095] Step 201: Obtain map information and location information when the vehicle is in the started state.
[0096] Step 202: Determine if the vehicle has entered the intersection area. If yes, proceed to step 203; otherwise, proceed to step 201. Specifically, it is only necessary to know whether the vehicle is near the intersection; high-precision intersection boundary coordinates are not required. SD, HD, HQ, and other maps are all acceptable.
[0097] Step 203: Obtain the detection information corresponding to the current moment and the historical tracking information corresponding to the previous moment. Specifically, this can be for delivery riders; the detection information includes the status information of the detected target, and the historical tracking information includes the status information of the tracked target.
[0098] Step 204: Based on historical tracking information, predict the current moment to obtain the tracking prediction information corresponding to the current moment. Specifically, based on motion models, such as constant velocity model (CV model) and constant acceleration model (CA model), predict the position and velocity of the target at the current moment to obtain tracking prediction information, which includes the predicted state information of the target.
[0099] Step 205: Perform position matching on the detection information and tracking prediction information corresponding to the current time to obtain the first matching result. Hungarian matching or nearest neighbor matching can be used for the matching method.
[0100] Step 206: Create a new tracking target for the detection target that failed to match.
[0101] Step 207: For tracking targets that fail to match, obtain the risk coefficient, appearance features of the surrounding area of the predicted location, and historical appearance features.
[0102] Step 208: For the successfully matched tracking and detection targets, update the state information of the tracking targets. For the tracking and detection targets matched in the initial matching, calculate the updated state at time T. Kalman filtering can be used, and save the matched appearance features [F_Head_T, F_Body_T] as the appearance feature vector of the historical matches [F_Head_his, F_Body_his].
[0103] Step 209: Calculate the appearance similarity.
[0104] Step 210: Combining the risk coefficient and appearance similarity, perform a second matching on the tracking target to obtain the second matching result.
[0105] Specifically, at time T, pixels in an image region with width W and height H surrounding the predicted value of the tracking target are extracted, and appearance features are obtained from historical matches of the tracked target. Since delivery riders usually wear safety helmets and brightly colored work clothes, head features F_Head and torso features F_Body are selected. The appearance feature vector [F_Head_T, F_Body_T] at time T is extracted from the W*H pixel region, and compared with the historically matched appearance feature vector [F_Head_his, F_Body_his]. The cosine similarity is calculated as the appearance similarity App_similarity, with a value range of [0, 1].
[0106] By combining environmental risk coefficients and appearance similarity, rematch calculations are performed on the tracking targets that did not match in the initial matching.
[0107] In intersection scenarios, the recall rate of object detection for delivery riders may decrease. If the current environmental risk coefficient is high, appearance similarity can be enhanced based on the environmental risk coefficient to improve the matching success rate and maintain tracking continuity. Specifically:
[0108] App_similarity_enhance=min[App_similarity*(1+0.2*Env_Risk_Factor), 0.95]
[0109] Among them, App_similarity_enhance is the similarity after enhancement using a risk coefficient. The higher the risk coefficient, the more the similarity is enhanced, with a maximum of 0.95.
[0110] Step 211: For tracking targets that fail to match, increment the failure count by 1. For tracking targets that still fail to match after rematching, increment the failure count by 1 and check if the maximum maintenance time has been exceeded. The default maximum maintenance time is 3 time ticks (3*T). If it is exceeded, delete the tracking target; otherwise, continue tracking.
[0111] Step 212: For the successfully matched tracking target, update the status information of the tracking target.
[0112] Step 213: Determine if the number of failures equals the preset number. If yes, proceed to step 214; otherwise, proceed to step 215.
[0113] Step 214: Stop tracking the target.
[0114] Step 215: Update the status information of the tracked target.
[0115] Step 216: Determine the current tracking information at the current moment.
[0116] The above implementation plan combines the movement and appearance characteristics of delivery riders (such as food delivery riders and express delivery riders) in intersection scenarios, sets up corresponding environmental risk coefficient calculation strategies, and applies them to target similarity and re-matching calculations to improve the stability of target tracking.
[0117] Example 2
[0118] This application also provides a target tracking device, please refer to... Figure 3 The target tracking device 30 includes:
[0119] The first acquisition module 310 is used to acquire detection information corresponding to the current moment and historical tracking information corresponding to the previous moment for the target to be tracked, and to predict the current moment based on the historical tracking information to obtain tracking prediction information corresponding to the current moment; wherein, the target to be tracked includes delivery riders;
[0120] The first matching module 320 is used to perform position matching on the detection information and the tracking prediction information corresponding to the current time to obtain a first matching result;
[0121] The first determining module 330 is used to determine the current risk coefficient of the tracking target at the current time for the tracking target that failed to match in the first matching result;
[0122] The second matching module 340 is used to perform feature matching between the tracking target and the detection information based on the current risk coefficient to obtain a second matching result;
[0123] The second determining module 350 is used to determine the current tracking information corresponding to the current moment based on the first matching result and the second matching result.
[0124] Optionally, the first determining module includes:
[0125] The first acquisition submodule is used to acquire the current traffic flow speed;
[0126] The second acquisition submodule is used to identify the vehicle closest to the tracking target as the target vehicle, and to acquire the current trajectory intersection relationship between the tracking target and the target vehicle;
[0127] The first determining submodule is used to determine the current environmental risk coefficient corresponding to the current traffic flow speed and the current trajectory intersection relationship based on the pre-stored correspondence between traffic flow speed, trajectory intersection relationship and environmental risk coefficient.
[0128] Optionally, the second acquisition submodule includes:
[0129] The first acquisition unit is used to acquire the first forward direction corresponding to the tracking target;
[0130] The second acquisition unit is used to acquire the second forward direction corresponding to the target vehicle;
[0131] The first determining unit is used to determine the angle between the first forward direction and the second forward direction as the target angle.
[0132] The second determining unit is used to determine the current trajectory intersection relationship corresponding to the target angle based on the pre-stored correspondence between the included angle interval and the trajectory intersection relationship.
[0133] Optionally, after performing position matching on the detection information and the tracking prediction information corresponding to the current time to obtain a first matching result, the device further includes:
[0134] The first processing module is used to create a new tracking target for the detection target that failed to match in the first matching result, and to track and detect the new tracking target at the next time corresponding to the current time.
[0135] The second processing module is used to update the status information corresponding to the tracking target that was successfully matched in the first matching result.
[0136] Optionally, after obtaining the second matching result, the device further includes:
[0137] The third processing module is used to update the status information corresponding to the tracking target when the second matching result indicates that the tracking target has been successfully matched;
[0138] The fourth processing module is used to increment the number of failed matches corresponding to the tracking target by one when the second matching result indicates that the tracking target has failed to match.
[0139] The first judgment module is used to determine whether the number of failed matches is greater than a preset threshold.
[0140] The fifth processing module is used to stop tracking and detecting the target when the number of failed matches equals the preset threshold.
[0141] Optionally, the second matching module includes:
[0142] The third acquisition submodule is used to acquire the historical appearance features corresponding to the tracked target;
[0143] The second determining submodule is used to determine the surrounding area of the predicted location of the tracking target as the secondary matching area;
[0144] The extraction submodule is used to extract appearance features from the secondary matching region in the detection information to obtain the current appearance features;
[0145] The calculation submodule is used to calculate the similarity between the historical appearance features and the current appearance features to obtain the appearance similarity.
[0146] An enhancement submodule is used to enhance the appearance similarity based on the current risk coefficient to obtain the target similarity.
[0147] The comparison submodule is used to compare the target similarity with a preset similarity threshold to obtain the second matching result;
[0148] Wherein, when the target similarity is greater than or equal to the preset similarity threshold, the second matching result is that the tracked target is successfully matched;
[0149] When the target similarity is less than the preset similarity threshold, the second matching result is that the tracking target has failed to match.
[0150] Optionally, before acquiring the detection information corresponding to the current moment and the historical tracking information corresponding to the previous moment, the device further includes:
[0151] The second acquisition module is used to acquire map information and the location information corresponding to the vehicle when the vehicle is in the start-up state;
[0152] The second judgment module is used to determine whether the vehicle is located in the target area based on the map information and the location information; wherein, the target area includes the intersection area;
[0153] The first acquisition module is further configured to perform the step of acquiring the detection information corresponding to the current moment and the historical tracking information corresponding to the previous moment when it is determined that the vehicle is located in the target area.
[0154] The target tracking device provided in this application embodiment achieves the following technical effects: by acquiring the current detection information and historical tracking information of the delivery rider and predicting the current state, and by combining the two results through location matching and feature matching with risk coefficient, the current tracking information is determined. This can improve the tracking continuity and accuracy of the delivery rider in complex scenarios. Especially when matching is difficult, the risk coefficient is used to assist in optimizing feature matching, which can effectively reduce the loss of the target.
[0155] It should be noted that the above modules can be implemented by software or hardware. For the latter, they can be implemented in the following ways, but are not limited to: all the above modules are located in the same processor; or, the above modules are located in different processors in any combination.
[0156] As the device embodiment is basically similar to the method embodiment, the description is relatively simple, and relevant parts can be found in the description of the method embodiment.
[0157] Example 3
[0158] This application also provides an electronic device, including: a processor, a memory, and a computer program stored in the memory and executable on the processor. When the computer program is executed by the processor, it implements the various processes of the above-described target tracking method embodiments and achieves the same technical effects. To avoid repetition, it will not be described again here.
[0159] For example, Figure 4 A schematic diagram of the physical structure of an electronic device is shown. (For example...) Figure 4As shown, the electronic device 40 may include a processor 410, a communication interface 420, a memory 430, and a communication bus 440, wherein the processor 410, the communication interface 420, and the memory 430 communicate with each other through the communication bus 440. The processor 410 can call logical instructions in the memory 430, and the processor 410 is used to perform the following steps: for the target to be tracked, obtain the detection information corresponding to the current time and the historical tracking information corresponding to the previous time, and predict the current time based on the historical tracking information to obtain the tracking prediction information corresponding to the current time; wherein the target to be tracked includes delivery riders; perform position matching on the detection information and the tracking prediction information corresponding to the current time to obtain a first matching result; for the tracking targets that fail to match in the first matching result, obtain the historical risk coefficient corresponding to the tracking target; based on the historical risk coefficient, perform feature matching on the tracking target and the detection information to obtain a second matching result; and determine the current tracking information corresponding to the current time based on the first matching result and the second matching result. The processor 410 can also execute other schemes in the embodiments of this application, which will not be further described here.
[0160] Furthermore, the logical instructions in the aforementioned memory 430 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application.
[0161] Example 4
[0162] This application also provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, it implements the various processes of the above-described target tracking method embodiments and achieves the same technical effect. To avoid repetition, it will not be described again here.
[0163] In this embodiment, the storage medium may include, but is not limited to, various media capable of storing computer programs, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.
[0164] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0165] In the above embodiments of this application, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0166] In this application, "multiple" refers to two or more.
[0167] In this application, unless otherwise expressly defined, the terms "installation," "connection," and "linking" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection between two components. Those skilled in the art can understand the specific meaning of the above terms in this application based on the specific circumstances.
[0168] The terms “first,” “second,” “third,” “fourth,” etc., used in this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence.
[0169] In this application, the term "and / or" is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone. Additionally, in this application, the character " / " generally indicates that the preceding and following related objects have an "or" relationship.
[0170] Unless otherwise specified, all steps in this application may be performed sequentially or randomly. For example, if the method includes steps A and B, it means that the method may include steps A and B performed sequentially, or it may include steps B and A performed sequentially. For example, if the method may also include step C, it means that step C may be added to the method in any order. For example, the method may include steps A, B, and C, or it may include steps A, C, and B, or it may include steps C, A, and B, etc.
[0171] The above description is merely a preferred embodiment of this application and is not intended to limit this application. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this application should be included within the protection scope of this application.
Claims
1. A target tracking method, characterized in that, The method includes: For the target to be tracked, the detection information corresponding to the current moment and the historical tracking information corresponding to the previous moment are obtained, and the current moment is predicted based on the historical tracking information to obtain the tracking prediction information corresponding to the current moment; wherein, the target to be tracked includes delivery riders; The detection information and the tracking prediction information corresponding to the current moment are matched to obtain a first matching result; For the tracking targets that failed to match in the first matching result, obtain the historical risk coefficient corresponding to the tracking targets; Based on the historical risk coefficient, feature matching is performed between the tracked target and the detection information to obtain a second matching result; Based on the first matching result and the second matching result, the current tracking information corresponding to the current moment is determined.
2. The target tracking method according to claim 1, characterized in that, Obtaining the historical risk coefficient corresponding to the tracked target includes: Obtain historical traffic flow speeds; The vehicle closest to the tracked target is identified as the target vehicle, and the historical trajectory intersection relationship between the tracked target and the target vehicle is obtained; Based on the pre-stored correspondence between traffic flow speed, trajectory intersection relationship and risk coefficient, the risk coefficient corresponding to the historical traffic flow speed and the historical trajectory intersection relationship is determined and identified as the historical risk coefficient.
3. The target tracking method according to claim 2, characterized in that, Obtaining the historical trajectory intersection relationship between the tracked target and the target vehicle includes: Obtain the first direction of travel corresponding to the tracked target; Obtain the second forward direction corresponding to the target vehicle; The angle between the first forward direction and the second forward direction is defined as the target angle. Based on the pre-stored correspondence between the included angle interval and the trajectory intersection relationship, the historical trajectory intersection relationship corresponding to the target included angle is determined.
4. The target tracking method according to claim 1, characterized in that, After performing position matching on the detection information and the tracking prediction information corresponding to the current time to obtain a first matching result, the method further includes: For the detection targets that fail to match in the first matching result, the detection targets are created as new tracking targets, and the new tracking targets are tracked and detected at the next time corresponding to the current time. For the tracking targets that are successfully matched in the first matching result, update the status information corresponding to the tracking targets.
5. The target tracking method according to claim 1, characterized in that, After obtaining the second matching result, the method further includes: When the second matching result indicates that the tracking target has been successfully matched, the status information corresponding to the tracking target is updated; When the second matching result indicates that the tracking target has failed to match, the number of failed matches corresponding to the tracking target is incremented by one. Determine whether the number of failed matches exceeds a preset threshold; When the number of failed matches equals the preset threshold, the tracking and detection of the target is stopped.
6. The target tracking method according to claim 1, characterized in that, Based on the historical risk coefficient, feature matching is performed between the tracked target and the detection information to obtain a second matching result, including: Obtain the historical appearance features corresponding to the tracked target; The area surrounding the predicted location of the tracked target is defined as the secondary matching area. The appearance features of the secondary matching region in the detection information are extracted to obtain the current appearance features; Calculate the similarity between the historical appearance features and the current appearance features to obtain the appearance similarity. The appearance similarity is enhanced based on the historical risk coefficient to obtain the target similarity; The second matching result is obtained by comparing the target similarity with a preset similarity threshold; Wherein, when the target similarity is greater than or equal to the preset similarity threshold, the second matching result is that the tracked target is successfully matched; When the target similarity is less than the preset similarity threshold, the second matching result is that the tracking target has failed to match.
7. The target tracking method according to claim 1, characterized in that, Before acquiring the detection information corresponding to the current moment and the historical tracking information corresponding to the previous moment, the method further includes: When the vehicle is in the start-up state, map information and the location information corresponding to the vehicle are acquired; Based on the map information and the location information, it is determined whether the vehicle is located in the target area; wherein, the target area includes intersection areas; When it is determined that the vehicle is located in the target area, the step of obtaining the detection information corresponding to the current moment and the historical tracking information corresponding to the previous moment is executed.
8. A target tracking device, characterized in that, include: The first acquisition module is used to acquire detection information corresponding to the current moment and historical tracking information corresponding to the previous moment for the target to be tracked, and to predict the current moment based on the historical tracking information to obtain tracking prediction information corresponding to the current moment; wherein, the target to be tracked includes delivery riders; The first matching module is used to perform position matching on the detection information and the tracking prediction information corresponding to the current time to obtain a first matching result; The first determining module is used to obtain the historical risk coefficient corresponding to the tracking target for the tracking target that failed to match in the first matching result; The second matching module is used to perform feature matching between the tracked target and the detection information based on the historical risk coefficient to obtain a second matching result; The second determining module is used to determine the current tracking information corresponding to the current moment based on the first matching result and the second matching result.
9. An electronic device, characterized in that, It includes a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the computer program, when executed by the processor, implements the target tracking method as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the target tracking method as described in any one of claims 1 to 7.