Target tracking method and device
By constructing a position correlation information matrix and a matching algorithm to associate detection targets and tracking objects, the tracking delay problem caused by the large amount of calculation in the existing technology is solved, and fast and accurate target tracking under low power consumption is achieved, which is suitable for mobile terminals. equipment.
Patent Information
- Application Number
- CN202310190605.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-02-22
- Publication Date
- 2024-08-23
AI Technical Summary
Existing target tracking methods require a large amount of calculation, resulting in tracking delays, and methods based on deep learning are not user-friendly at the edge and cannot achieve fast tracking with low power consumption.
By obtaining target detection results and tracking trajectory data, a position correlation degree information matrix is constructed, a matching algorithm is used to associate detection targets and tracking objects, and trajectory information is updated in the association, reducing the amount of calculation and improving tracking speed.
It achieves fast and accurate target tracking under low power consumption, saves 50% of computing time, and is suitable for mobile terminal devices.
Smart Images

Figure CN118537601A
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer technology, and in particular to a target tracking method and device. Background Art
[0002] In image monitoring, target tracking plays an extremely important role in helping people quickly and accurately detect emergencies and make timely judgments to avoid loss of life and property. For example, accurate trajectory analysis of the people photographed in the monitoring scene can determine the abnormal behavior of the people and vehicles in the scene, such as whether a pedestrian suddenly falls or whether a vehicle suddenly drives abnormally, so that an alarm can be issued in time to avoid potential dangers.
[0003] In one type of existing target tracking method, such as the ByteTrack algorithm and the Sort algorithm, after receiving the target detection results from the image detection device, the Kalman filter is used to predict the position of the tracked target, and the Hungarian matching is used to assign the matching relationship between the detection results and the tracking trajectory. In this target tracking method, the Kalman filter and Hungarian matching used face a large amount of calculation, resulting in a high tracking delay. Another type of existing target tracking method is to directly use a deep learning network for tracking. The tracking algorithm based on the traditional convolutional network is not as effective as the detection-based tracking algorithm, and the transformer-based tracking algorithm is not friendly enough for edge operations, and some operations are not supported.
[0004] Therefore, how to improve the speed of target tracking and reduce tracking delay has become an urgent problem to be solved. Summary of the invention
[0005] In view of this, the present disclosure provides a target tracking method and device, so as to improve the speed of target tracking through lower calculation amount, reduce tracking delay, and enable the device to accurately and quickly track the target under low power consumption.
[0006] The technical solution of the present disclosure is achieved as follows:
[0007] A target tracking method, comprising:
[0008] Respectively obtaining a target detection result data set and a tracking trajectory data set, wherein the target detection result data set is obtained through image detection;
[0009] According to the target position information of all detected targets in the target detection result data set and the trajectory information of all tracked objects in the tracking trajectory data set, a position correlation degree information matrix is obtained, wherein the correlation degree information matrix includes the position correlation degree between any one of the detected targets and any one of the tracked objects;
[0010] Matching the position association degree information matrix, and associating the detection target and the tracking object that meet the matching conditions;
[0011] In the associated detection target and tracking object, updating the track information of the tracking object according to the target position information of the detection target to obtain the updated track information of the tracking object;
[0012] Output the updated tracking trajectory data set.
[0013] Further, the trajectory information includes object position information and object speed information of the tracked object;
[0014] The obtaining of a position correlation degree information matrix according to the target position information of all detected targets in the target detection result data set and the trajectory information of all tracked objects in the tracking trajectory data set comprises:
[0015] For any tracked object in the tracking trajectory data set, predict the object position information of the any tracked object according to the object position information and the object speed information of the any tracked object to obtain the predicted object position information of the any tracked object;
[0016] The position correlation degree information matrix is obtained according to the target position information of all detected targets in the target detection result data set and the predicted object position information of all tracked objects in the tracking trajectory data set.
[0017] Further, the position correlation degree information matrix is obtained according to the target position information of all detected targets in the target detection result data set and the predicted object position information of all tracked objects in the tracking trajectory data set, including:
[0018] Obtaining confidence information of all detected targets in the target detection result data set;
[0019] According to the confidence information, all detection targets in the target detection result data set are divided into a high-score detection group and a low-score detection group;
[0020] A first position association degree information matrix is obtained based on the target position information of all detection targets in the high-score detection group and the predicted object position information of all tracked objects in the tracking trajectory data set. The first position association degree information matrix includes the position association degree information between any detection target in the high-score detection group and any tracked object in the tracking trajectory data set.
[0021] Further, matching the position association degree information matrix to associate the detection target and the tracking object that meet the matching condition includes:
[0022] The first position association degree information matrix is matched, and the detection targets in the high-score detection group that meet the first matching condition are associated with the tracking objects in the tracking trajectory data set.
[0023] Further, the obtaining of the position correlation degree information matrix according to the target position information of all detected targets in the target detection result data set and the predicted object position information of all tracked objects in the tracking trajectory data set further includes:
[0024] In the case that there are remaining tracking objects in the tracking trajectory data set that are not associated with the detection targets in the high-score detection group, a second position association degree information matrix is obtained based on the target position information of all detection targets in the low-score detection group and the predicted object position information of all remaining tracking objects in the tracking trajectory data set, wherein the second position association degree information matrix includes the position association degree information between any detection target in the low-score detection group and any remaining tracking objects in the tracking trajectory data set.
[0025] Furthermore, matching the position association degree information matrix and associating the detection target and the tracking object that meet the matching condition further includes:
[0026] The second position association degree information matrix is matched, and the detection targets in the low-score detection group that meet the second matching condition are associated with the remaining tracking objects in the tracking trajectory data set.
[0027] Further, after updating the trajectory information of the tracked object according to the target position information of the detection target, the target tracking method further includes:
[0028] When there are remaining detection targets in the high-score detection group that are not associated with the tracking objects in the tracking trajectory data set, the target position information of the remaining detection targets is added to the tracking trajectory data set as the object position information of the new tracking objects.
[0029] Furthermore, the position correlation degree information matrix includes:
[0030] The target box intersection-over-union (IOU) ratio between any one of the detected targets in the target detection result data set and any one of the tracked objects in the tracking trajectory data set is used to characterize the degree of positional association between the detected target and the tracked object.
[0031] Further, the target position information includes the center point coordinate value information of the detected target in the image obtained by the image detection and the target frame size information of the detected target in the image;
[0032] The trajectory information includes the center point coordinate value information of the tracked object in the image, the target frame size information of the tracked object in the image, the center point speed information of the tracked object in the image, and the target frame size change speed information of the tracked object in the image.
[0033] A target tracking device, comprising:
[0034] A data acquisition module is configured to respectively acquire a target detection result data set and a tracking trajectory data set, wherein the target detection result data set is obtained through image detection;
[0035] The association matrix module is configured to obtain a position association degree information matrix based on the target position information of all detected targets in the target detection result data set and the trajectory information of all tracked objects in the tracking trajectory data set, wherein the position association degree information matrix includes the position association degree between any one of the detected targets and any one of the tracked objects;
[0036] A matching and associating module is configured to perform matching on the position association degree information matrix and associate the detection target and the tracking object that meet the matching conditions;
[0037] A trajectory information updating module is configured to execute in the associated detection target and tracking object, update the trajectory information of the tracking object according to the target position information of the detection target, and obtain the updated trajectory information of the tracking object;
[0038] The data output module is configured to output the updated tracking trajectory data set.
[0039] An electronic device, comprising:
[0040] processor;
[0041] a memory for storing executable instructions for the processor;
[0042] Wherein, the processor is configured to execute the executable instructions to implement the target tracking method as described in any one of the above items.
[0043] A computer-readable storage medium, when at least one instruction in the computer-readable storage medium is executed by a processor of an electronic device, enables the electronic device to implement any of the target tracking methods described above.
[0044] It can be seen from the above scheme that the target tracking method and device of the embodiment of the present disclosure obtain a position association degree information matrix based on the target position information of all detected targets in the target detection result data set and the trajectory information of all tracked objects in the tracking trajectory data set, and use matching to associate the detected targets and tracked objects. In the associated detected targets and tracked objects, the trajectory information of the tracked objects is updated according to the target position information of the detected targets. Compared with the existing method of using Kalman filtering to predict the position of the tracked target and using Hungarian matching to assign the matching relationship between the detection result and the tracking trajectory, the amount of calculation is significantly reduced, and the purpose of improving the speed of target tracking and reducing the tracking delay through lower calculation amount is achieved, which can save 50% of the calculation time, and the obtained tracking result is accurate, so that the device can accurately and quickly track the target under low power consumption, and can achieve target tracking on a mobile terminal device. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] Figure 1 is a flow chart of a target tracking method according to an exemplary embodiment;
[0046] Figure 2 is a flow chart showing a method of obtaining a position correlation degree information matrix according to an exemplary embodiment;
[0047] Figure 3 is a flowchart of association matching according to an exemplary embodiment;
[0048] Figure 4 is a flow chart of an application scenario of a target tracking method according to an exemplary embodiment;
[0049] Figure 5 is a schematic diagram of a logical structure of a target tracking device according to an exemplary embodiment;
[0050] Figure 6 It is a structural schematic diagram of an electronic device provided by an embodiment of the present disclosure. DETAILED DESCRIPTION
[0051] In order to make the objectives, technical solutions and advantages of the present disclosure more clearly understood, the present disclosure is further described in detail below with reference to the accompanying drawings and examples.
[0052] It should be noted that the terms "first", "second", etc. in the specification and claims of the present disclosure and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present disclosure described herein can be implemented in an order other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.
[0053] The solutions described in the specification and embodiments of this disclosure, if they involve the processing of personal information, will be processed on the premise of having a legal basis (such as obtaining the consent of the subject of personal information, or being necessary for the performance of a contract, etc.), and will only be processed within the scope of regulations or agreements. If a user refuses to process personal information other than the necessary information for basic functions, it will not affect the user's use of basic functions.
[0054] The purpose of target tracking is to track the detection results so that the same target maintains the same identity information (such as ID, identification number) between different frames of the video image, which can be used for subsequent tasks. For example, after detecting and tracking pedestrians in the video, the trajectory of the pedestrian in the video image can be obtained, and a series of images of the pedestrian in the video can be obtained based on the trajectory of the pedestrian. After cropping the image, the fall algorithm can determine whether a person in the video image has fallen, which helps to issue an alarm in the first place for relevant personnel to rescue. Therefore, target tracking plays an important auxiliary role in protecting people's lives and property safety in social life.
[0055] Figure 1 is a flow chart of a target tracking method according to an exemplary embodiment. Figure 1 As shown, the target tracking method mainly includes the following steps 101 to 105.
[0056] Step 101: respectively obtain a target detection result data set and a tracking trajectory data set, wherein the target detection result data set is obtained through image detection.
[0057] In an exemplary embodiment, the method of obtaining a target detection result data set by image detection is to detect an image using a target detection model such as the YOLO series, Faster RCNN, etc., to obtain a target detection result data set. Since the same image may contain one or more targets, the target detection result data set contains target position information of at least one detected target in the detected image. In an exemplary embodiment, the target detection result data set can be represented as (D0, D1, ..., Dm ), where D0, D1, D m They respectively represent the target position information of the 0th detected target in the detected image, the target position information of the 1st detected target in the detected image, and the target position information of the mth detected target in the detected image.
[0058] In an illustrative embodiment, the target position information includes the center point coordinate value information of the detection target in the image obtained by image detection and the target frame size information of the detection target in the image. For example, when the image is detected using a target detection model such as the YOLO series, Faster RCNN, etc., the target detection model will output the center point coordinate value information and the target frame size information of the detection target in the image. In an illustrative embodiment, the center point coordinate value information and the target frame size information of the detection target in the image, that is, the target position information can be expressed as (Dx, Dy, Dw, Dh), where Dx is the horizontal coordinate value of the center point of the detection target in the image, Dy is the vertical coordinate value of the center point of the detection target in the image, Dw is the width value of the target frame of the detection target in the image, and Dh is the height value of the target frame of the detection target in the image.
[0059] In an exemplary embodiment, the tracking trajectory data set can be represented as (T0, T1, ..., T n ), where T0, T1, T n They respectively represent the trajectory information of the 0th tracked object in the detected image, the trajectory information of the 1st tracked object in the detected image, and the trajectory information of the nth tracked object in the detected image.
[0060] In an exemplary embodiment, the trajectory information includes the coordinate value information of the center point of the tracked object in the image, the target frame size information of the tracked object in the image, the speed information of the center point of the tracked object in the image, and the speed information of the target frame size change of the tracked object in the image. In an exemplary embodiment, the coordinate value information of the center point of the tracked object in the image, the target frame size information, the speed information of the center point, and the speed information of the target frame size change, that is, the trajectory information can be expressed as (Tx, Ty, Tw, Th, Tdx, Tdy, Tdw, Tdh), where Tx is the horizontal coordinate value of the center point of the tracked object in the image, Ty is the vertical coordinate value of the center point of the tracked object in the image, Tw is the width value of the target frame of the tracked object in the image, Th is the height value of the target frame of the tracked object in the image, Tdx is the lateral change value of the center point of the tracked object in the image, Tdy is the longitudinal change value of the center point of the tracked object in the image, Tdw is the width change value of the target frame of the tracked object in the image, and Tdh is the height change value of the target frame of the tracked object in the image. (Tdx, Tdy, Tdw, Tdh) reflects the change in the center point position and the target frame size of the tracked object between the previous and next moments (previous and next frames). For example, Tdx and Tdy reflect the change in the center point between the previous and next moments (previous and next frames). Therefore, Tdx and Tdy can be called center point velocity information, and Tdw and Tdh reflect the change in the target frame size between the previous and next moments (previous and next frames). Therefore, Tdw and Tdh can be called target frame size change velocity information. Furthermore, (Tdx, Tdy, Tdw, Tdh) can also be called object velocity information of the tracked object.
[0061] In an exemplary embodiment, the tracking trajectory data set is continuously updated according to the target detection result data set generated over time. In an exemplary embodiment, the tracking trajectory data set may be an empty set. For example, at the beginning of target tracking, when the target detection result data set has not yet been generated, the tracking trajectory data set cannot be updated according to the target detection result data set, and the tracking trajectory data set at this time is an empty set. The specific scheme for updating the tracking trajectory data set is detailed in the subsequent steps.
[0062] Step 102: Obtain a position correlation degree information matrix based on the target position information of all detected targets in the target detection result data set and the trajectory information of all tracked objects in the tracking trajectory data set. The correlation degree information matrix includes the position correlation degree between any detected target and any tracked object.
[0063] In an exemplary embodiment, the trajectory information includes object position information and object speed information of the tracked object. In combination with the above description, the trajectory information can be expressed as (Tx, Ty, Tw, Th, Tdx, Tdy, Tdw, Tdh), where (Tx, Ty, Tw, Th) is the object position information of the tracked object, and (Tdx, Tdy, Tdw, Tdh) is the object speed information of the tracked object.
[0064] The target detection result is obtained through image detection, which is real-time, and the trajectory information of the tracked object is obtained according to the changes in the target detection result, so it is necessary to match and associate the tracked object with the detected target. Therefore, the trajectory information of the tracked object lags behind the target detection result. Therefore, as the target moves in the image, the position of the target in the image at two consecutive moments (or two consecutive frames) may change. Between the target detection result data set and the tracking trajectory data set obtained at the current moment (or current frame), the trajectory information of the tracked object in the tracking trajectory data set is actually the trajectory information of the previous moment (or previous frame). Therefore, to associate the detected target with the tracked object, it is necessary to first predict the position of the tracked object at the current moment (or current frame) based on the trajectory information of the tracked object at the previous moment (or previous frame), so as to ensure the accurate association between the detected target and the tracked object.
[0065] Figure 2 is a flow chart of obtaining a position correlation degree information matrix according to an exemplary embodiment. Figure 2 As shown, step 102 includes the following steps 201 to 202.
[0066] Step 201 : for any tracked object in the tracking trajectory data set, predict the object position information of the any tracked object according to the object position information and object speed information of the any tracked object to obtain the predicted object position information of the any tracked object.
[0067] In an exemplary embodiment, the trajectory information may be expressed as (Tx, Ty, Tw, Th, Tdx, Tdy, Tdw, Tdh), where (Tx, Ty, Tw, Th) is the object position information of the tracked object, and (Tdx, Tdy, Tdw, Tdh) is the object speed information of the tracked object. In step 201, the object position information of the tracked object may be predicted using the following formula:
[0068] Tx t =Tx t-1 +Tdx t-1
[0069] Ty t =Ty t-1+Tdy t-1
[0070] T t =Tw t-1 +Tdw t-1
[0071] Th t =Th t-1 +Tdh t-1
[0072] The subscripts t and t-1 represent the current moment (predicted) and the previous moment, respectively. For a video image, t and t-1 may represent the current video frame and the previous video frame. t Ty is the predicted center point coordinate value of the tracked object. t is the predicted ordinate value of the center point of the tracked object, Tw t is the target box width value after tracking object prediction, Th t is the target box height value after tracking object prediction, (Tdx t ,Tdy t ,Tdw t ,Tdh t ) is the object position information after the tracking object is predicted, (Tx t-1 ,Ty t-1 ,Tw t-1 ,Th t-1 ,Tdx t-1 ,Tdy t-1 ,Tdw t-1 ,Tdh t-1 ) is the acquired trajectory information of the tracked object, for example, the trajectory information of the tracked object acquired in step 101.
[0073] Step 202: Obtain a position correlation degree information matrix based on the target position information of all detected targets in the target detection result data set and the predicted object position information of all tracked objects in the tracking trajectory data set.
[0074] In the exemplary embodiment, the content of the position correlation degree information matrix can be seen in Table 1.
[0075] Table 1 Location association degree information matrix
[0076] <![CDATA[T0]]> <![CDATA[T1]]> <![CDATA[T2]]> <![CDATA[D0]]> <![CDATA[a 00 ]]> <![CDATA[a 01 ]]> <![CDATA[a 02 ]]> <![CDATA[D1]]> <![CDATA[a 10 ]]> <![CDATA[a 11 ]]> <![CDATA[a 12 ]]> <![CDATA[D2]]> <![CDATA[a 20 ]]> <![CDATA[a 21 ]]> <![CDATA[a 22 ]]>
[0077] As shown in Table 1, a 00 、a 01 ,……,a 22 , is the element in the position association degree information matrix, a 00 、a 01 ,……,a22 They are respectively the position correlation degree information between D0 and T0, the position correlation degree information between D0 and T1, ..., the position correlation degree information between D2 and T2.
[0078] In an exemplary embodiment, the position correlation degree information matrix includes: the target frame intersection over union (IOU) between any detected target in the target detection result data set and any tracked object in the tracking trajectory data set, and the target frame intersection over union is used to characterize the position correlation degree between the detected target and the tracked object. For example, in Table 1, a 12 is the position correlation information between D1 and T2. Specifically, a 12 is the target box intersection-union ratio between D1 and T2.
[0079] In an exemplary embodiment, the target frame intersection-over-union ratio can be obtained by the following formula:
[0080]
[0081] Wherein, IOU is the intersection-over-union ratio of the target frame, A is the area of the target frame of one of the detection target and the tracking object, and B is the area of the target frame of the other of the detection target and the tracking object, for example, A is the target frame of the detection target and B is the area of the target frame of the tracking object, or, A is the target frame of the tracking object and B is the area of the target frame of the detection target. Taking A as the area of the target frame of the detection target (referred to as the detection target frame) and B as the area of the target frame of the tracking object (referred to as the tracking target frame), A∩B represents the area of the overlap of the detection target frame A and the tracking target frame B, and A∪B represents the total area surrounded by the detection target frame A and the tracking target frame B. A∪B=Area of A+Area of B-A∩B. The area of the target frame can be obtained by multiplying the width value of the target frame by the height value of the target frame. The target frame intersection-union ratio can be obtained by combining the area of the target frame of the detection target and the area of the target frame of the tracked object, the center point coordinates of the detection target and the center point coordinates of the tracked object. The center point coordinates of the detection target are (Dx, Dy), the center point coordinates of the tracked object are (Tx, Ty), the area of the target frame of the detection target is Dw*Dh, and the area of the target frame of the tracked object is Tw*Th. In step 202, (Tx, Ty, Tw, Th) is the predicted object position information.
[0082] In an illustrative embodiment, the IOU is calculated using the upper left corner coordinates and the lower right corner coordinates of the detection target frame and the upper left corner coordinates and the lower right corner coordinates of the tracking target frame. In an illustrative embodiment, the image origin is set at the upper left corner of the image, the center point coordinates of the detection target frame are known to be (Dx, Dy), the width and height of the detection target frame are (Dw, Dh), the center point coordinates of the tracking target frame are (Tx, Ty), and the width and height of the tracking target frame are (Tw, Th), then the upper left corner coordinates (Dx_min, Dy_min) and the lower right corner coordinates (Dx_max, Dx_max) of the detection target frame and the upper left corner coordinates (Tx_min, Ty_min) and the lower right corner coordinates (Tx_max, Ty_max) of the tracking target frame can be obtained by the following formula:
[0083] Dx_max=Dx+Dw / 2
[0084] Dy_max=Dy+Dh / 2
[0085] Dx_min=Dx-Dw / 2
[0086] Dy_min=Dy-Dh / 2
[0087] Tx_max=Tx+Tw / 2
[0088] Ty_max=Ty+Th / 2
[0089] Tx_min=Tx-Tw / 2
[0090] Ty_min=Ty-Th / 2
[0091] Thus, when there is an intersection between the detection target frame and the tracking target frame, we have:
[0092] inter_x_max is the minimum value of Dx_max and Tx_max;
[0093] inter_x_min is the maximum value of Dx_min and Tx_min;
[0094] inter_y_max is the minimum value of Dy_max and Ty_max;
[0095] inter_y_min is the maximum value of Dy_min and Ty_min;
[0096] inter_w=inter_x_max-inter_x_min;
[0097] inter_h=inter_y_max-inter_y_min;
[0098] Among them, (inter_x_min, inter_y_min) is the upper left corner coordinate of the intersection box of the detection target box and the tracking target box, (inter_x_max, inter_y_max) is the lower right corner coordinate of the intersection box of the detection target box and the tracking target box, inter_w is the width of the intersection box, and inter_h is the height of the intersection box.
[0099] Obviously, when the detection target frame and the tracking target frame do not intersect, the above formula can be used to obtain the situation where inter_w<0 and / or inter_h<0. In this case, the intersection of the detection target frame and the tracking target frame is 0 (A∩B=0). Otherwise, the intersection area of the detection target frame and the tracking target frame is
[0100] inter=inter_w*inter_h
[0101] Among them, inter is the intersection box area of the detection target box and the tracking target box.
[0102] The union area of the detection target box and the tracking target box can be obtained by the following formula:
[0103] union=Dw*Dh+Tw*Th-inter
[0104] Among them, union is the union area of the detection target box and the tracking target box.
[0105] Finally, the target frame intersection and union ratio of the detected target frame and the tracked target frame can be obtained by the following formula:
[0106] IOU = inter / union
[0107] Step 103: Match the position association degree information matrix, and associate the detection target and the tracking object that meet the matching conditions.
[0108] In an exemplary embodiment, in step 103, matching the position association degree information matrix and associating the detection target and the tracking object that meet the matching condition may include associating the detection target and the tracking object through at least one round of matching as follows:
[0109] Among all the position correlation degrees in the position correlation degree information matrix, when the position correlation degree with the largest value is greater than or equal to the matching threshold, the detection target and the tracking object corresponding to the position correlation degree with the largest value are associated, and the row and column of the position correlation degree information matrix where the position correlation degree with the largest value is located are set to zero for the next round of matching.
[0110] In an illustrative embodiment, the matching of step 103 is completed when the maximum position association degree is less than the matching threshold, or all detection targets corresponding to the position association degree information matrix are associated, or all tracking objects corresponding to the position association degree information matrix are associated.
[0111] The following specifically describes the process of matching the position correlation degree information matrix in the embodiment of the present disclosure with reference to an example.
[0112] In the exemplary embodiment, the process of matching the position correlation degree information matrix is shown in Table 2-1 to Table 2-3 and the following description.
[0113] Table 2-1 Location correlation information matrix
[0114] <![CDATA[T0]]> <![CDATA[T1]]> <![CDATA[T2]]> <![CDATA[D0]]> 0.1 0.2 0.2 <![CDATA[D1]]> 0.9 0.5 0 <![CDATA[D2]]> 0 0.8 0.1
[0115] As shown in Table 2-1, the value of each element in the position correlation degree information matrix is the value of the position correlation degree information, for example, it can be an IOU value. The larger the IOU value, the higher the correlation degree, and the smaller the IOU value, the lower the correlation degree. 10 The IOU value of 0.9 at the position indicates that the overlap between the target boxes of D1 and T0 reaches 0.9, indicating that the overlap between D1 and T0 is very high, and the overlap between D1 and T0 is the highest among all elements in the position association information matrix. In other words, the correlation between D1 and T0 is the highest among all elements in the position association information matrix. 12 The IOU value of 0 at position D1 indicates that the overlap degree of the target box between D1 and T2 is 0, indicating that there is no overlap between D1 and T2, which indicates that the correlation degree between D1 and T2 is very low or even non-existent. It should be noted that in the exemplary embodiment, when calculating IOU, T0, T1, and T2 are all based on the object position information.
[0116] Based on the above description, in the exemplary embodiment, during the matching process, a matching threshold is preset, and the detected target and the tracked object corresponding to the elements (position association degree information, IOU) in the position association degree information matrix that are greater than or equal to the matching threshold are associated. Based on this, in the exemplary embodiment, the matching condition in step 103 is, for example, greater than or equal to the preset matching threshold.
[0117] In the exemplary embodiment, the matching threshold is set to 0.5. In this case, as shown in Table 2-1, the maximum value in the query position association degree information matrix is 0.9, and the maximum value 0.9 is greater than the matching threshold 0.5, which means that D1 and T0 match, D1 and T0 are associated, and the row and column where 0.9 is located are set to 0, as shown in Table 2-2. At this point, the first round of matching is completed.
[0118] Table 2-2 Position correlation degree information matrix after setting the row and column where 0.9 is located to 0
[0119] <![CDATA[T0]]> <![CDATA[T1]]> <![CDATA[T2]]> <![CDATA[D0]]> 0 0.2 0.2 <![CDATA[D1]]> 0 0 0 <![CDATA[D2]]> 0 0.8 0.1
[0120] As shown in Table 2-1 and Table 2-2, the row where 0.9 is located is the row corresponding to D1, and the column where 0.9 is located is the column corresponding to T0. Setting the row and column where 0.9 are located to 0 means setting all elements in the row corresponding to D1 and the column corresponding to T0 to 0.
[0121] As shown in Table 2-2, after setting the row and column where 0.9 is located to 0, the maximum value in the position association degree information matrix is 0.8, and the maximum value 0.8 is greater than the matching threshold 0.5, which means that D2 and T1 match. D2 and T1 are associated, and the row and column where 0.8 is located are set to 0, as shown in Table 2-3. At this point, the second round of matching is completed.
[0122] Table 2-3 Position correlation degree information matrix after setting the row and column where 0.8 is located to 0
[0123] <![CDATA[T0]]> <![CDATA[T1]]> <![CDATA[T2]]> <![CDATA[D0]]> 0 0 0.2 <![CDATA[D1]]> 0 0 0 <![CDATA[D2]]> 0 0 0
[0124] As shown in Table 2-2 and Table 2-3, the row where 0.8 is located is the row corresponding to D2, and the column where 0.8 is located is the column corresponding to T1. Setting the row and column where 0.8 are located to 0 means setting all elements in the row corresponding to D2 and the column corresponding to T1 to 0.
[0125] Refer to Table 2-3. After setting the row and column where 0.8 is located to 0, the position association degree information matrix is queried. At this time, the maximum value is 0.2, which is less than the matching threshold of 0.5. This indicates that the remaining detection targets and tracking objects do not match. In this case, the matching process is exited. This can also be called the completion of the third round of matching, but the third round of matching was unsuccessful.
[0126] At this point, the matching is completed. The final matching result is that D1 matches T0, D2 matches T1, that is, D1 is associated with T0, and D2 is associated with T1 (the remaining D0 and T2 are not matched, that is, D0 and T2 are not associated).
[0127] The example shown in Table 2-3 is the case where the position association degree with the largest value in the above description is less than the matching threshold. Assuming that the position association degree corresponding to D0 and T2 is not 0.2 in Table 2-3, but 0.6 (or a value greater than or equal to the matching threshold of 0.5), D0 and T2 are associated, and then, since all the detection targets (D0, D1, D2) and / or all the tracking objects (T0, T1, T2) corresponding to the position association degree information matrix are fully associated, the matching process is exited. This is a case where all the detection targets corresponding to the position association degree information matrix are associated, or all the tracking objects corresponding to the position association degree information matrix are associated.
[0128] Since the present disclosure is a matching process in an example, the detection target and the tracking object corresponding to the position correlation degree with the largest value are associated, and the rows and columns of the position correlation degree information matrix where the position correlation degree with the largest value is located are set to zero. Therefore, the matching of the embodiment of the present disclosure can also be called greedy matching.
[0129] The above is only an expanded description of the matching process itself. Combined with the subsequent description, in the embodiment of the present disclosure, the target detection result data set is grouped according to the confidence information of the detected target, and the different groups are matched respectively. However, according to the description of the present disclosure, in an optional implementation scheme, the target detection result data set may not be grouped, and all the detected targets in the target detection result data set and all the tracked objects in the tracking trajectory data set may be directly formed into a position correlation degree information matrix for matching and association.
[0130] In an exemplary embodiment, the target detection result data set may contain target location information of a large number of detection targets, and each target detection result also has the problem of different accuracy. The accuracy of the target detection result is represented by the confidence level. Generally speaking, the value of the confidence level varies between 0 and 100 (or 0% to 100%). The higher the confidence level, the closer the target detection result is to the true result. For example, when the confidence level of the target detection result is 80, it means that the probability of the detected target being a person is 80%. In an exemplary embodiment, the confidence level and the target location information together constitute the target detection result. In an exemplary embodiment, the target detection result can be represented as (Dx, Dy, Dw, Dh, Ds), where (Dx, Dy, Dw, Dh) is the above target location information and Ds is the confidence level.
[0131] In some cases, the target detection result data set contains target location information of a large number of detection targets. At this time, the detection target with low confidence often indicates the inaccuracy of the detection target. For example, in the scene of tracking a person to assist in determining whether the person has fallen, the confidence of the detection target is 10, which means that the detection target has only a 10% probability of being a person. In the actual scene, the detection target corresponding to this result is not actually a person. Therefore, eliminating the detection result of the target with low confidence will not affect the accuracy of tracking, and will greatly reduce the amount of calculation and improve the efficiency of tracking calculation. However, the detection target with confidence at the edge of accuracy cannot be easily discarded. For example, the confidence of the detection target is 60, which means that the detection target has a 60% probability of being a person. In the actual scene, the detection target corresponding to this result is actually a person or not. Therefore, detection targets whose confidence is on the edge of accuracy will not be discarded in order to reduce the amount of calculation. In the illustrative embodiment, the target detection result data sets are grouped and associated with the tracking objects in the tracking trajectory data set, that is, step 102 and step 103 are performed by grouping the target detection result data sets, as follows.
[0132] Figure 3 is a flowchart of association matching according to an exemplary embodiment. Figure 3 As shown, in the exemplary embodiment, step 202 includes the following steps 301 to 303 .
[0133] Step 301: Obtain confidence information of all detected targets in the target detection result data set.
[0134] Step 302: According to the confidence information, all detection targets in the target detection result data set are divided into a high-score detection group and a low-score detection group.
[0135] In an illustrative embodiment, all detected targets in a target detection result data set can be grouped according to a preset grouping threshold St. In an illustrative embodiment, the grouping threshold St can be set to any value between 0.4 and 0.7. The specific value of the grouping threshold St can be set according to actual application scenarios and experience.
[0136] Step 303: A first position correlation degree information matrix is obtained based on the target position information of all detection targets in the high-score detection group and the predicted object position information of all tracked objects in the tracking trajectory data set. The first position correlation degree information matrix includes the position correlation degree information between any detection target in the high-score detection group and any tracked object in the tracking trajectory data set.
[0137] Based on step 303, continue to refer to Figure 3 As shown, step 103 includes the following steps 304:
[0138] Step 304: Match the first position association degree information matrix, and associate the detection targets in the high-score detection group that meet the first matching condition with the tracking objects in the tracking trajectory data set.
[0139] On this basis, if Figure 3 As shown, step 202 further includes the following steps 305:
[0140] Step 305: When there are remaining tracking objects in the tracking trajectory data set that are not associated with the detection targets in the high-score detection group, a second position association degree information matrix is obtained based on the target position information of all detection targets in the low-score detection group and the predicted object position information of all remaining tracking objects in the tracking trajectory data set. The second position association degree information matrix includes the position association degree information between any detection target in the low-score detection group and any remaining tracking object in the tracking trajectory data set.
[0141] On this basis, if Figure 3 As shown, step 103 further includes the following step 306:
[0142] Step 306: Match the second position association degree information matrix, and associate the detection targets in the low-score detection group that meet the second matching condition with the remaining tracking objects in the tracking trajectory data set.
[0143] In an exemplary embodiment, the first matching condition and the second matching condition in step 304 and step 306 are different. In an exemplary embodiment, the matching threshold of the first matching condition is lower than the matching threshold of the second matching condition.
[0144] Step 104: among the associated detection targets and tracking objects, update the track information of the tracking object according to the target position information of the detection target to obtain updated track information of the tracking object.
[0145] In an exemplary embodiment, in step 104, the trajectory information of the tracked object is updated according to the target position information of the detected target using an EMA (Exponential Moving Average) method.
[0146] In an exemplary embodiment, the EMA method includes updating the trajectory information of the tracked object using the following formula:
[0147] TxD t =(1-α)*Tdx t-1 +α*(Dxt -Tx t-1 )
[0148] Tdy t =(1-α)*Tdy t-1 +α*(Dy t -Ty t-1 )
[0149] Tv t =(1-α)*Tdw t-1 +α*(Dw t -Tw t-1 )
[0150] Td t =(1-α)*Tdh t-1 +α*(Dh t -Th t-1 )
[0151] Tx t =Dx t
[0152] Ty t =Dy t
[0153] T t =Dw t
[0154] Th t =Dh t
[0155] Among them, Tx t =Dx t 、Ty t =Dy t , Tw t =Dw t ,Th t =Dh t Respectively represent Dx t Assign value to Tx t , Dy t Assign value to Ty t , Dw t Assign value to Tw t , Dh t Assign the value to Th t .
[0156] Among them, the subscripts t and t-1 are the current moment and the previous moment respectively. For video images, t and t-1 can represent the current video frame and the previous video frame, and α is the adjustment coefficient. α can be set to a value greater than 0 and less than 1. When the detection result is relatively accurate and the detection frame rate is high (for example, FPS=30, that is, 30 frames of images are detected in one second), the change of the detection frame is relatively stable and linear, then α can be set to a relatively large value, for example, it can be set to more than 0.5. When the detection result is poor or the detection frame rate is low (for example, FPS=5, that is, only 5 frames of images are detected in one second), the change of the detection frame is relatively large and unstable, then α can be set to a relatively small value, for example, it can be set to a value less than 0.5.
[0157] In an illustrative embodiment, the process of updating the trajectory information of the tracked object according to the target position information of the detected target using the EMA method is as follows (assuming α=0.5).
[0158] At time t-2 (or frame t-2):
[0159] Assuming that the target position information (100, 200, 30, 40) of D1 is not matched at time t-2 (or frame t-2), the trajectory information for creating the initialization trajectory T1 is (100, 200, 30, 40, 0, 0, 0).
[0160] At time t-1 (or frame t-1):
[0161] According to the above formula for predicting the object position information of the tracked object, the object position information of T1 is predicted to be (100, 200, 30, 40). At this time, the object speed information of T1 has not been updated, that is, the trajectory information of T1 is predicted to be (100, 200, 30, 40, 0, 0, 0);
[0162] Assuming that the target position information of D1 at time t-1 is (106, 194, 32, 48), and D1 matches T1, then according to the above formula for updating the trajectory information of the tracked object, the object speed information (Tdx, Tdy, Tdw, Tdh) of T1 is updated from (0, 0, 0, 0) to (3, -3, 1, 4), and the object position information (Tx, Ty, Tw, Th) of T1 is updated to (106, 194, 32, 48), that is, the trajectory information of T1 is updated to (106, 194, 32, 48, 3, -3, 1, 4).
[0163] At time t (or frame t):
[0164] According to the above formula for predicting the object position information of the tracked object, the object position information of T1 is predicted to be (109, 191, 33, 52). At this time, the object speed information of T1 has not been updated, that is, the trajectory information of T1 is predicted to be (109, 191, 33, 52, 3, -3, 1, 4);
[0165] Assuming that the target position information of D1 at time t is (108, 192, 34, 50), and D1 matches T1, then according to the above formula for updating the trajectory information of the tracked object, the object speed information (Tdx, Tdy, Tdw, Tdh) of T1 is updated from (3, -3, 1, 4) to (2, -2.5, 1.5, 3), and the object position information (Tx, Ty, Tw, Th) of T1 is updated to (108, 196, 34, 50), that is, the trajectory information of T1 is updated to (108, 196, 34, 50, 2, -2.5, 1.5, 3).
[0166] In the exemplary embodiment, after the trajectory information of the tracked object is updated according to the target position information of the detection target in step 104, there may be a situation in the high-score detection group that is not associated with the tracked object in the tracking trajectory data set. This situation indicates that the remaining detection target is a new detection target that appears for the first time in the image and needs to be tracked as a new tracking object. Based on this, in the exemplary embodiment, in step 104, after the trajectory information of the tracked object is updated according to the target position information of the detection target, the target tracking method of the embodiment of the present disclosure further includes:
[0167] When there are remaining detection targets in the high-score detection group that are not associated with the tracking objects in the tracking trajectory data set, the target position information of the remaining detection targets is added to the tracking trajectory data set as the object position information of the new tracking objects.
[0168] Step 105: output the updated tracking trajectory data set.
[0169] At this point, the target tracking is completed.
[0170] In an illustrative embodiment, the output tracking trajectory data set can be received by relevant functional modules as needed. For example, in a fall monitoring scenario, the output tracking trajectory data set is received by a fall judgment module, and the tracked person in the image is cut out and the subsequent fall judgment processing flow is performed based on the tracking trajectory data set.
[0171] Based on this, after step 105, the embodiment of the present disclosure may further include the following steps:
[0172] Step 106: Obtain an updated tracking trajectory data set, obtain image information of the tracking object according to the updated tracking trajectory data set, identify the behavior of the tracking object according to the image information of the tracking object, so as to make a judgment according to the behavior of the tracking object, and issue a prompt information or control information corresponding to the action when the action triggering condition is met. For example, the action triggering condition is a fall, an abnormal turn, or a tipping over.
[0173] In the target tracking method of the disclosed embodiment, a position association degree information matrix is obtained based on the target position information of all detected targets in the target detection result data set and the trajectory information of all tracked objects in the tracking trajectory data set, and the detected targets and tracked objects are associated by matching. In the associated detected targets and tracked objects, the trajectory information of the tracked objects is updated according to the target position information of the detected targets. Compared with the existing method of using Kalman filtering to predict the position of the tracked target and using Hungarian matching to assign the matching relationship between the detection result and the tracking trajectory, the amount of calculation is significantly reduced, and the purpose of improving the speed of target tracking and reducing tracking delay through lower calculation amount is achieved, which can save about 50% of the calculation time, and the obtained tracking result is accurate, so that the device can accurately and quickly track the target under low power consumption, and can achieve target tracking on a mobile terminal device.
[0174] Figure 4 is a flow chart of an application scenario of a target tracking method according to an exemplary embodiment. Figure 4 As shown, the process mainly includes the following steps 401 to 413.
[0175] Step 401 : Obtain a tracking trajectory data set that is initialized to be empty, and then execute step 402 .
[0176] In an exemplary embodiment, the tracking trajectory data set may be in a queue form, such as a tracking trajectory data queue. In an exemplary embodiment, an empty tracking trajectory data set includes trajectory information of zero tracking objects.
[0177] At the beginning of target tracking, there is no tracking object generated, so the tracking trajectory data set is initialized to empty.
[0178] In an exemplary embodiment, the tracking trajectory data set can be represented as (T0, T1, ..., T n ), where T0, T1, T nRespectively represent the trajectory information of the 0th tracked object in the detected image, the trajectory information of the 1st tracked object in the detected image, and the trajectory information of the nth tracked object in the detected image. In an exemplary embodiment, the trajectory information can be expressed as (Tx, Ty, Tw, Th, Tdx, Tdy, Tdw, Tdh), where (Tx, Ty, Tw, Th) is the object position information of the tracked object, (Tdx, Tdy, Tdw, Tdh) is the object speed information of the tracked object, Tx is the horizontal coordinate value of the center point of the tracked object in the image, Ty is the vertical coordinate value of the center point of the tracked object in the image, Tw is the width value of the target frame of the tracked object in the image, Th is the height value of the target frame of the tracked object in the image, Tdx is the lateral change value of the center point of the tracked object in the image, Tdy is the longitudinal change value of the center point of the tracked object in the image, Tdw is the width change value of the target frame of the tracked object in the image, and Tdh is the height change value of the target frame of the tracked object in the image.
[0179] When the tracking trajectory data set is initialized to be empty, (T0, T1, …, T n ) is an empty set.
[0180] Step 402: Obtain a target detection result data set, and then execute step 403.
[0181] In an illustrative embodiment, the target detection result data set may be obtained from an image detection device, which is used to detect targets from an image. The image detection device may use various target detection models to obtain the detected targets in the image.
[0182] In an exemplary embodiment, the target detection result data set can be represented as (D0, D1, ..., D m ), where D0, D1, D m Respectively represent the target position information of the 0th detected target in the detected image, the target position information of the 1st detected target in the detected image, and the target position information of the mth detected target in the detected image. In an exemplary embodiment, the target detection result can be expressed as (Dx, Dy, Dw, Dh, Ds), where (Dx, Dy, Dw, Dh) is the target position information, Ds is the confidence, Dx is the horizontal coordinate value of the center point of the detected target in the image, Dy is the vertical coordinate value of the center point of the detected target in the image, Dw is the width value of the target box of the detected target in the image, and Dh is the height value of the target box of the detected target in the image.
[0183] Step 403 , according to the confidence information of all the detected targets in the target detection result data set, divide all the detected targets in the target detection result data set into a high-score detection group and a low-score detection group, and then execute step 404 .
[0184] In an illustrative embodiment, a grouping threshold St is set in advance, and all detected targets in the target detection result data set are grouped according to the grouping threshold St, wherein the grouping threshold St can be set to any value between 0.4 and 0.7, for example, it can be set to any value among 0.4, 0.5, 0.6, and 0.7, and the specific value of the grouping threshold St can be set according to the actual application scenario and experience.
[0185] Step 404 : predict the position information of the tracking object in the tracking trajectory data set to obtain the predicted object position information, and then execute step 405 .
[0186] In an exemplary embodiment, step 404 may include predicting the object position information of any tracked object in the tracking trajectory data set according to the object position information and the object speed information of the any tracked object to obtain the predicted object position information of the any tracked object, wherein the object position information of the tracked object may be predicted using the following formula:
[0187] Tx t =Tx t-1 +Tdx t-1
[0188] Ty t =Ty t-1 +Tdy t-1
[0189] T t =Tw t-1 +Tdw t-1
[0190] Th t =Th t-1 +Tdh t-1
[0191] Among them, (Tx t-1 ,Ty t-1 ,Tw t-1 ,Th t-1 ,Tdx t-1 ,Tdy t-1 ,Tdw t-1 ,Tdh t-1 ) is the trajectory information before the tracking object is predicted, (Tx t ,Ty t ,Twt ,Th t ) is the predicted object position information of the tracked object.
[0192] Step 405 , obtaining a first position correlation degree information matrix according to the target position information of all detection targets in the high-score detection group and the predicted object position information of all tracked objects in the tracking trajectory data set, and then executing step 406 .
[0193] In an exemplary embodiment, each element in the first position correlation degree information matrix is the target box intersection-over-union (IOU) ratio between the detection target and the tracked object. For details on how to obtain the first position correlation degree information matrix, please refer to Table 1 and its related descriptions, which will not be repeated here.
[0194] Step 406 , matching the first position association degree information matrix, associating the detection target and the tracking object that meet the first matching condition, and then executing step 407 .
[0195] The matching process is detailed in Table 2-1 to Table 2-3 and their related descriptions, which will not be repeated here.
[0196] Step 407 : determine whether there are any unassociated remaining tracking objects in the tracking trajectory data set; if yes, execute step 408 ; otherwise, execute step 410 .
[0197] Step 408 , obtaining a second position correlation degree information matrix according to the target position information of all detection targets in the low-score detection group and the predicted object position information of the remaining tracking objects in the tracking trajectory data set, and then executing step 409 .
[0198] In an exemplary embodiment, each element in the second position correlation degree information matrix is the target box intersection-over-union ratio (IOU) between the detection target and the tracked object. For details on how to obtain the second position correlation degree information matrix, please refer to Table 1 and its related descriptions, which will not be repeated here.
[0199] Step 409 , matching the second position association degree information matrix, associating the detection target and the tracking object that meet the second matching condition, and then executing step 410 .
[0200] The matching process is detailed in Table 2-1 to Table 2-3 and their related descriptions, which will not be repeated here.
[0201] Because the high-score detection group and the low-score detection group have different confidence levels, in the exemplary embodiment, the first matching condition and the second matching condition in step 406 and step 409 are different, and specifically, the respective matching thresholds are different. In the exemplary embodiment, the matching threshold of the first matching condition is lower than the matching threshold of the second matching condition. For example, the matching threshold when matching the first position association degree information matrix is 0.1 to 0.3, and the matching threshold when matching the second position association degree information matrix is 0.4 to 0.6.
[0202] Step 410 : Use the EMA method to update the trajectory information of each tracking object in the tracking trajectory data set, and then execute step 411 .
[0203] The specific process of updating the trajectory information of the tracked object can be found in the above-mentioned relevant formulas and process descriptions of the EMA method, which will not be repeated here.
[0204] Step 411 , determining whether there are any remaining detection targets in the high-score detection group that are not associated with the tracking objects in the tracking trajectory data set, if yes, executing step 412 , otherwise executing step 413 .
[0205] Step 412: add the target position information of the remaining detected targets as the target position information of the new tracking objects to the tracking trajectory data set, and then execute step 413.
[0206] In an exemplary embodiment, the object speed information of the new tracking object added to the tracking trajectory data set has no corresponding object speed information at a previous moment, so the object speed information of the new tracking object is set to 0.
[0207] Step 413: output the updated tracking trajectory data set, and return to execute step 402.
[0208] In the exemplary embodiment, returning to execute step 402 is to obtain the target detection result data set of the next moment from the image detection device, and the tracking trajectory data set when executing the subsequent step 404 again is not the tracking trajectory data set initialized in step 401, but the updated tracking trajectory data set of the current step 413. By using the above-mentioned cycle of steps 402 to 413, after sequentially obtaining the target detection result data sets at each moment as time goes by, the continuous updating of the content of the tracking trajectory data set is realized.
[0209] When a tracked object in the tracking trajectory data set leaves the image acquisition range and can no longer be matched with the detection target, the tracked object will always exist in the tracking trajectory data set and cannot be updated, which indicates that the tracked object has disappeared. In this case, in an illustrative embodiment, a time threshold parameter can be set to start timing when a tracked object in the tracking trajectory data set is not updated. When the time reaches the set time threshold, the tracked object is deleted from the tracking trajectory data set. After deletion, if the person (or object) corresponding to the tracked object enters the image acquisition range again, according to the technical solution of the embodiment of the present disclosure, the trajectory information of the new tracked object is generated in the tracking trajectory data set.
[0210] In the exemplary embodiment, according to the tracking trajectory data set updated at each moment, the trajectory change of the tracking target in the image within a period of time can be obtained, thereby providing a basis for tracking the trajectory history data for subsequent functional requirements.
[0211] Figure 5 is a schematic diagram of a logical structure of a target tracking device according to an exemplary embodiment. Figure 5 As shown, the logical structure of the target tracking device mainly includes a data acquisition module 501, an association matrix module 502, a matching association module 503, a trajectory information updating module 504 and a data output module 505.
[0212] Among them, the data acquisition module 501 is configured to execute respectively acquiring the target detection result data set and the tracking trajectory data set, and the target detection result data set is obtained by image detection; the association matrix module 502 is configured to execute according to the target position information of all detection targets in the target detection result data set and the trajectory information of all tracking objects in the tracking trajectory data set, to obtain the position correlation degree information matrix, and the correlation degree information matrix contains the position correlation degree between any detection target and any tracking object; the matching association module 503 is configured to execute matching of the position correlation degree information matrix, and associate the detection target and the tracking object that meet the matching conditions; the trajectory information updating module 504 is configured to execute in the associated detection target and tracking object, according to the target position information of the detection target, to obtain the updated trajectory information of the tracking object; the data output module 505 is configured to execute output of the updated tracking trajectory data set.
[0213] In an exemplary embodiment, the trajectory information includes object position information and object speed information of the tracked object; the association matrix module 502 further includes:
[0214] A prediction submodule is configured to predict the object position information of any tracked object in the tracking trajectory data set according to the object position information and the object speed information of the any tracked object, so as to obtain the predicted object position information of the any tracked object;
[0215] The matrix acquisition submodule is configured to obtain a position correlation degree information matrix according to the target position information of all detected targets in the target detection result data set and the predicted object position information of all tracked objects in the tracking trajectory data set.
[0216] In an exemplary embodiment, the matrix acquisition submodule includes:
[0217] The confidence acquisition submodule is configured to execute the acquisition of confidence information of all detected targets in the target detection result data set;
[0218] The grouping submodule is configured to divide all detection targets in the target detection result data set into a high-score detection group and a low-score detection group according to the confidence information;
[0219] The first association matrix submodule is configured to execute the target position information of all detection targets in the high-score detection group and the predicted object position information of all tracked objects in the tracking trajectory data set to obtain a first position association degree information matrix, wherein the first position association degree information matrix includes the position association degree information between any detection target in the high-score detection group and any tracked object in the tracking trajectory data set.
[0220] In an exemplary embodiment, the matching association module 503 includes:
[0221] The first matching and associating submodule is configured to perform matching on the first position association degree information matrix, and associate the detection targets in the high-score detection group that meet the first matching condition with the tracking objects in the tracking trajectory data set.
[0222] In an exemplary embodiment, the matrix acquisition submodule further includes:
[0223] The second association matrix submodule is configured to execute, when there are remaining tracking objects in the tracking trajectory data set that are not associated with the detection targets in the high-score detection group, based on the target position information of all the detection targets in the low-score detection group and the predicted object position information of all the remaining tracking objects in the tracking trajectory data set, to obtain a second position association degree information matrix, wherein the second position association degree information matrix includes the position association degree information between any detection target in the low-score detection group and any remaining tracking object in the tracking trajectory data set.
[0224] In an exemplary embodiment, the matching association module 503 further includes:
[0225] The second matching and associating submodule is configured to perform matching on the second position association degree information matrix, and associate the detection targets in the low-score detection group that meet the second matching condition with the remaining tracking objects in the tracking trajectory data set.
[0226] In an illustrative embodiment, the target tracking device of the embodiment of the present disclosure further includes:
[0227] The position information adding module is configured to execute, when there are remaining detection targets in the high-score detection group that are not associated with the tracking objects in the tracking trajectory data set, adding the target position information of the remaining detection targets as the object position information of the new tracking objects to the tracking trajectory data set.
[0228] In an exemplary embodiment, the position correlation degree information matrix includes:
[0229] The target box intersection over union (IOU) between any detected target in the target detection result dataset and any tracked object in the tracking trajectory dataset is used to characterize the degree of positional association between the detected target and the tracked object.
[0230] In an illustrative embodiment, the target position information includes the center point coordinate value information of the detected target in the image obtained by image detection and the target frame size information of the detected target in the image; the trajectory information includes the center point coordinate value information of the tracked object in the image, the target frame size information of the tracked object in the image, the center point speed information of the tracked object in the image, and the target frame size change speed information of the tracked object in the image.
[0231] The target tracking device of the disclosed embodiment obtains a position association degree information matrix based on the target position information of all detected targets in the target detection result data set and the trajectory information of all tracked objects in the tracking trajectory data set, uses matching to associate the detected targets and the tracked objects, and updates the trajectory information of the tracked objects in the associated detected targets and tracked objects based on the target position information of the detected targets. Compared with the existing method of using Kalman filtering to predict the position of the tracked target and using Hungarian matching to assign the matching relationship between the detection result and the tracking trajectory, the amount of calculation is significantly reduced, and the purpose of improving the speed of target tracking and reducing tracking delay through lower calculation amount is achieved, which can save 50% of the calculation time, and the obtained tracking result is accurate, so that the device can accurately and quickly track the target under low power consumption, and can achieve target tracking on a mobile terminal device.
[0232] Regarding the target tracking device in the above embodiment, the specific manner in which each unit performs operations has been described in detail in the embodiment of the target tracking method, and will not be elaborated here.
[0233] It should be noted that: the above embodiment only illustrates the division of the above functional modules. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.
[0234] Figure 6 It is a structural diagram of an electronic device provided by an embodiment of the present disclosure. In some embodiments, the electronic device is a server. The electronic device 600 may have relatively large differences due to different configurations or performances, and may include one or more processors (Central Processing Units, CPU) 601 and one or more memories 602, wherein at least one program code is stored in the memory 602, and the at least one program code is loaded and executed by the processor 601 to implement the target tracking method provided by the above-mentioned various embodiments. Of course, the electronic device 600 may also have components such as a wired or wireless network interface, a keyboard, and an input and output interface for input and output. The electronic device 600 may also include other components for implementing device functions, which will not be repeated here.
[0235] In an exemplary embodiment, a computer-readable storage medium including at least one instruction is also provided, such as a memory including at least one instruction. The at least one instruction can be executed by a processor in a computer device to complete the target tracking method in the above embodiment.
[0236] Optionally, the above-mentioned computer-readable storage medium may be a non-temporary computer-readable storage medium, for example, the non-temporary computer-readable storage medium may include ROM (Read-Only Memory), RAM (Random-Access Memory), CD-ROM (Compact Disc Read-Only Memory), magnetic tape, floppy disk and optical data storage device, etc.
[0237] The above description is only a preferred embodiment of the present disclosure and is not intended to limit the present disclosure. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present disclosure shall be included in the scope of protection of the present disclosure.
Claims
1. A target tracking method, comprising: Respectively obtaining a target detection result data set and a tracking trajectory data set, wherein the target detection result data set is obtained through image detection; According to the target position information of all detected targets in the target detection result data set and the trajectory information of all tracked objects in the tracking trajectory data set, a position correlation degree information matrix is obtained, wherein the correlation degree information matrix includes the position correlation degree between any one of the detected targets and any one of the tracked objects; Matching the position association degree information matrix, and associating the detection target and the tracking object that meet the matching conditions; In the associated detection target and tracking object, updating the trajectory information of the tracking object according to the target position information of the detection target to obtain the updated trajectory information of the tracking object; Output the updated tracking trajectory data set.
2. The target tracking method according to claim 1, characterized in that: The trajectory information includes object position information and object speed information of the tracked object; The obtaining of a position correlation degree information matrix according to the target position information of all detected targets in the target detection result data set and the trajectory information of all tracked objects in the tracking trajectory data set comprises: For any tracked object in the tracking trajectory data set, predict the object position information of the any tracked object according to the object position information and the object speed information of the any tracked object to obtain the predicted object position information of the any tracked object; The position correlation degree information matrix is obtained according to the target position information of all detected targets in the target detection result data set and the predicted object position information of all tracked objects in the tracking trajectory data set.
3. The target tracking method according to claim 2, characterized in that: The obtaining of the position correlation degree information matrix according to the target position information of all detected targets in the target detection result data set and the predicted object position information of all tracked objects in the tracking trajectory data set comprises: Obtaining confidence information of all detected targets in the target detection result data set; According to the confidence information, all detection targets in the target detection result data set are divided into a high-score detection group and a low-score detection group; A first position association degree information matrix is obtained based on the target position information of all detection targets in the high-score detection group and the predicted object position information of all tracked objects in the tracking trajectory data set. The first position association degree information matrix includes the position association degree information between any detection target in the high-score detection group and any tracked object in the tracking trajectory data set.
4. The target tracking method according to claim 3, characterized in that: The matching of the position association degree information matrix to associate the detection target and the tracking object that meet the matching condition includes: The first position association degree information matrix is matched, and the detection targets in the high-score detection group that meet the first matching condition are associated with the tracking objects in the tracking trajectory data set.
5. The target tracking method according to claim 4, characterized in that: The obtaining of the position correlation degree information matrix according to the target position information of all detected targets in the target detection result data set and the predicted object position information of all tracked objects in the tracking trajectory data set further comprises: In the case that there are remaining tracking objects in the tracking trajectory data set that are not associated with the detection targets in the high-score detection group, a second position association degree information matrix is obtained based on the target position information of all detection targets in the low-score detection group and the predicted object position information of all remaining tracking objects in the tracking trajectory data set, wherein the second position association degree information matrix includes the position association degree information between any detection target in the low-score detection group and any remaining tracking objects in the tracking trajectory data set.
6. The target tracking method according to claim 5, characterized in that: The matching of the position association degree information matrix and associating the detection target and the tracking object that meet the matching condition further includes: The second position association degree information matrix is matched, and the detection targets in the low-score detection group that meet the second matching condition are associated with the remaining tracking objects in the tracking trajectory data set.
7. The target tracking method according to claim 6, characterized in that: After updating the trajectory information of the tracked object according to the target position information of the detection target, the target tracking method further includes: When there are remaining detection targets in the high-score detection group that are not associated with the tracking objects in the tracking trajectory data set, the target position information of the remaining detection targets is added to the tracking trajectory data set as the object position information of the new tracking objects.
8. The target tracking method according to claim 1, characterized in that: The position correlation degree information matrix includes: The target box intersection-over-union (IOU) ratio between any one of the detected targets in the target detection result data set and any one of the tracked objects in the tracking trajectory data set is used to characterize the degree of positional association between the detected target and the tracked object.
9. The target tracking method according to any one of claims 1 to 8, characterized in that: The target position information includes the center point coordinate value information of the detected target in the image obtained by the image detection and the target frame size information of the detected target in the image; The trajectory information includes the center point coordinate value information of the tracked object in the image, the target frame size information of the tracked object in the image, the center point speed information of the tracked object in the image, and the target frame size change speed information of the tracked object in the image.
10. A target tracking device, characterized in that: include: A data acquisition module is configured to respectively acquire a target detection result data set and a tracking trajectory data set, wherein the target detection result data set is obtained through image detection; The association matrix module is configured to obtain a position association degree information matrix based on the target position information of all detected targets in the target detection result data set and the trajectory information of all tracked objects in the tracking trajectory data set, wherein the position association degree information matrix includes the position association degree between any one of the detected targets and any one of the tracked objects; A matching and associating module is configured to perform matching on the position association degree information matrix and associate the detection target and the tracking object that meet the matching conditions; A trajectory information updating module is configured to execute in the associated detection target and tracking object, update the trajectory information of the tracking object according to the target position information of the detection target, and obtain the updated trajectory information of the tracking object; The data output module is configured to output the updated tracking trajectory data set.
11. An electronic device, characterized in that: include: processor; a memory for storing executable instructions for the processor; The processor is configured to execute the executable instructions to implement the target tracking method according to any one of claims 1 to 9.
12. A computer-readable storage medium, characterized in that: When at least one instruction in the computer-readable storage medium is executed by a processor of an electronic device, the electronic device is enabled to implement the target tracking method as described in any one of claims 1 to 9.
Citation Information
Patent Citations
Target tracking method and device, roadside equipment and storage medium
CN112561963A
Multi-target tracking method and device, terminal equipment and readable storage medium
CN114359341A
Multi-target tracking method, equipment and medium
CN114638855A
