Target tracking method and related apparatus
By establishing a correlation using historical target attribute information tracked before the recording device is woken up, the problems of target tracking delay and information loss after the recording device is woken up are solved, thus achieving continuity and accuracy in target tracking.
Patent Information
- Application Number
- CN202611099443.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-23
- Publication Date
- 2026-11-27
AI Technical Summary
The target tracking method after the recording device is woken up has problems such as target tracking delay, target information loss and tracking discontinuity. This is because there is no information sharing mechanism for target tracking before and after wake-up, which means that tracking needs to start from scratch after wake-up.
After the recording device is woken up, the attribute information of the historical targets tracked before wake-up is used to establish the association with the target to be associated in the image after wake-up. Through feature matching and determination of region of interest, the continuity and accuracy of target tracking are ensured.
It reduces target tracking latency after wake-up, avoids ID reconstruction delay and target information loss, achieves target tracking continuity before and after wake-up, and improves tracking efficiency and accuracy.
Smart Images

Figure CN123181504A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of image processing technology, and in particular to a target tracking method and related apparatus. Background Technology
[0002] Target tracking aims to continuously locate the same target in an image sequence and obtain the target's trajectory. The basic process of target tracking is as follows: detect the target to be associated from the current image of the image sequence; determine whether the target to be associated matches any historical targets with IDs in the historical images of the image sequence; if a matching historical target exists, associate the target to be associated with its matching historical target, and the target to be associated inherits the ID of its matching historical target to update the trajectory of the historical target's ID; if no matching historical target exists, assign a new ID to the target to be associated to obtain the trajectory of the new ID.
[0003] Recording devices based on AOV (Always On Video) technology have a sleep mode before waking up and a wake-up mode after waking up. The power consumption of the sleep mode is lower than that of the wake-up mode. The sleep mode and the wake-up mode use different target tracking methods.
[0004] Through long-term research, the inventors of this application have discovered that the target tracking method after the video recording device is woken up in the related technology has problems such as target tracking delay. Summary of the Invention
[0005] This application provides a target tracking method and related apparatus, which can solve the problem of target tracking delay in target tracking methods after the recording device is woken up in the related art.
[0006] This application provides a target tracking method, comprising: after a recording device is woken up, acquiring a post-wake-up image using the recording device, wherein the recording device is woken up under certain conditions, the wake-up conditions including that the recording device tracked at least one historical target before being woken up; and establishing an association between at least one historical target and a target to be associated in the post-wake-up image based on the attribute information of the at least one historical target obtained by the recording device before being woken up, wherein the attribute information of the historical target includes the feature vector of the historical target in the post-wake-up image.
[0007] This application provides a video recording device, including: an acquisition module and an association module. The acquisition module is used to acquire images after the video recording device is woken up, wherein the video recording device is woken up under certain conditions, including that the video recording device tracked at least one historical target before being woken up; the association module is used to establish an association between at least one historical target and a target to be associated in the post-wake-up image based on the attribute information of the at least one historical target obtained by the video recording device before being woken up, wherein the attribute information of the historical target includes the feature vector of the historical target in the post-wake-up image.
[0008] This application provides an electronic device, including a memory and a processor, wherein the processor is used to execute program instructions stored in the memory to implement the above-described method.
[0009] This application provides a computer-readable storage medium having program instructions stored thereon, which, when executed by a processor, implement the above-described method.
[0010] This application provides a computer program product, including a computer program that, when executed by a processor, implements the above-described method.
[0011] The above scheme transmits the attribute information of at least one historical target tracked before wake-up as prior information to wake-up, allowing tracking to continue based on the attribute information of at least one historical target instead of starting from scratch. This avoids ID reconstruction delays caused by mode switching, thereby reducing overall target tracking latency after wake-up. It also prevents target information loss due to mode switching and ensures the continuity of target tracking before and after wake-up.
[0012] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this application. Attached Figure Description
[0013] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the specification, serve to explain the technical solutions of this application.
[0014] Figure 1 This is a flowchart illustrating an embodiment of the target tracking method provided in this application; Figure 2 This is a flowchart illustrating a specific example of the target tracking method provided in this application; Figure 3 This is a flowchart illustrating a specific instance of target tracking after activation in this application. Figure 4 This is a schematic diagram of the structure of an embodiment of the video recording device provided in this application; Figure 5This is a schematic diagram of the structure of an embodiment of the electronic device of this application; Figure 6 This is a schematic diagram of the structure of an embodiment of the computer-readable storage medium of this application. Detailed Implementation
[0015] The embodiments of this application will now be described in detail with reference to the accompanying drawings.
[0016] In the following description, specific details such as particular system architectures, interfaces, and technologies are presented for illustrative purposes rather than for limiting purposes, in order to provide a thorough understanding of this application.
[0017] In this document, 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 alone, A and B simultaneously, and B alone. Additionally, the character " / " generally indicates that the preceding and following related objects have an "or" relationship. Furthermore, "many" in this document means two or more. The term "at least one" in this document means any combination of at least two of any one or more of a plurality of objects. For example, including at least one of A, B, and C can mean including any one or more elements selected from the set consisting of A, B, and C. Finally, the term "several" in this document means any integer greater than 0, such as 1, 2, 3, 4, 5, ...
[0018] Through long-term research, the inventors of this application have discovered that target tracking methods after the recording device is woken up in related technologies suffer from problems such as target tracking delay (e.g., target detection delay, ID reconstruction delay), target information loss, and discontinuous target tracking. Further research by the inventors revealed that these problems arise because target tracking before and after wake-up is independent, lacking an information sharing mechanism, and requiring tracking to start from scratch after wake-up.
[0019] To address at least some of the aforementioned technical problems, this application provides a novel target tracking method. Embodiments of this method are described below.
[0020] Figure 1 This is a flowchart illustrating an embodiment of the target tracking method provided in this application. Figure 1 As shown, in this embodiment, the target tracking method may include the following steps: S110: After the recording device is woken up, the recording device is used to capture images after the wake-up process.
[0021] The recording device is woken up when wake-up conditions are met, including that the recording device has tracked at least one historical target before being woken up.
[0022] The execution subject in this embodiment is a target tracking device, which can be a recording device or other electronic devices that establish a communication connection with the recording device.
[0023] In some embodiments, the wake-up condition further includes at least one dynamic historical target among the various historical targets. That is, the recording device is woken up if a dynamic historical target is detected before the wake-up is initiated.
[0024] S120: Based on the attribute information of at least one historical target obtained by the recording device before it is woken up, establish an association between at least one historical target and the target to be associated in the image after it is woken up.
[0025] The attribute information of historical targets includes the feature vectors of historical targets in the pre-awakening image.
[0026] The image before wake-up can be either the last image containing the historical target captured by the recording device before wake-up, or another image containing the historical target captured by the recording device before wake-up. The image after wake-up can be either the first image captured by the recording device after wake-up, or another image captured by the recording device after wake-up. In the case of the first image, by executing the target tracking method provided in this application, the delay from the initial wake-up stage to stable tracking can be avoided.
[0027] Among them, the feature vector of the historical target represents information such as the appearance of the historical target.
[0028] Specifically, if at least one historical target matches the target to be associated, an association is established between the target and its matching historical target; that is, the target inherits the ID of its matching historical target to update the trajectory of the historical target's ID. If no historical target matches the target to be associated, a new ID is assigned to the target to be associated to obtain the trajectory of the new ID.
[0029] The above scheme transmits the attribute information of at least one historical target tracked before wake-up as prior information to wake-up, allowing tracking to continue based on the attribute information of at least one historical target instead of starting from scratch. This avoids ID reconstruction delays caused by mode switching, thereby reducing overall target tracking latency after wake-up. It also prevents target information loss due to mode switching and ensures the continuity of target tracking before and after wake-up.
[0030] In some embodiments, S120 includes S121-S123. S121: Perform target detection on the awakened image to obtain the feature vector of the target to be associated; S122: Determine whether the matching degree between the feature vector of the target to be associated and the feature vector of each historical target satisfies the matching condition; S123: In response to the existence of historical targets that satisfy the matching condition, establish an association between the target to be associated and its matched historical targets.
[0031] The matching conditions include maximum matching degree and / or matching degree greater than the matching degree threshold.
[0032] Among these, establishing a connection between the target to be associated and its matching historical targets can be achieved by the target to be associated inheriting the ID of the historical target.
[0033] In some embodiments, the attribute information of the historical target also includes the actual position of the historical target in the image before wake-up, and S120 includes S124-S127. S124: For each historical target, based on the actual position of the historical target, find the region of interest (ROI) in the image after wake-up; S125: Perform target detection on the ROI of the historical target to obtain the feature vector of the target to be associated corresponding to the historical target; S126: Obtain the matching degree between the feature vector of the historical target and the feature vector of the target to be associated; S127: In response to the matching degree satisfying the matching condition, establish an association between the historical target and the target to be associated.
[0034] The actual location of the historical target can be represented by a bounding box (actual coordinates, width, and height). The region of interest (ROI) of the historical target is the area in the image where the historical target may appear after wake-up.
[0035] In S125, target detection can be performed on the region of interest of the historical target to obtain the actual position of the target to be associated corresponding to the historical target; the feature vector corresponding to the actual position of the target to be associated is used as the feature vector of the target to be associated corresponding to the historical target.
[0036] The above scheme utilizes the actual location of the historical target before wake-up to narrow the tracking range of the historical target after wake-up from the wake-up image to the region of interest of the historical target in the wake-up image. On the one hand, it can improve the tracking efficiency of historical targets and reduce target detection latency, thereby further reducing the overall target tracking latency. On the other hand, it can avoid interference from other areas and improve the tracking accuracy of historical targets.
[0037] In some embodiments, S124 includes S1241-S1242. S1241: Predict the location of the historical target based on its actual location to obtain the predicted location of the historical target in the image after wake-up; S1242: Expand the predicted location of the historical target to obtain the region of interest of the historical target.
[0038] Location prediction can be achieved using Kalman filtering models, custom prediction models, etc. Location expansion can be performed by using the predicted location of the historical target as the center.
[0039] Understandably, if the historical target is static and no location expansion is performed, the predicted location of the historical target may itself cover the historical target. If the historical target is dynamic and has displacement, then location expansion to a region of interest is required to cover the historical target.
[0040] The above scheme expands the predicted location of the historical target into a region of interest before tracking the historical target, so that the tracking range can adapt to historical targets in different motion states.
[0041] In some embodiments, the attribute information of the historical target also includes the motion state of the historical target in the image before wake-up. S1241 includes S12411. S12411: Predict the position of the historical target according to the prediction model corresponding to the motion state to obtain the predicted position of the historical target; wherein, the increment of the predicted position relative to the actual position is positively correlated with the intensity of the motion state.
[0042] Motion states are categorized into static and dynamic states, with static states exhibiting less intensity than dynamic states. Dynamic states can be further subdivided. For example, dynamic states are divided into slow and fast states, with slow states exhibiting less intensity than fast states.
[0043] The motion state of a historical target can be determined based on at least one of its velocity, acceleration, or rate of change of direction. For example, a first velocity threshold, a second velocity threshold, and an acceleration threshold can be set. If the historical target's velocity is less than the first velocity threshold and its acceleration is less than the acceleration threshold, its motion state is determined to be static. If the historical target's velocity is greater than or equal to the first velocity threshold but less than the second velocity threshold, its motion state is determined to be slow. If the historical target's velocity is greater than or equal to the second velocity threshold, or its acceleration is greater than or equal to the acceleration threshold, its motion state is determined to be fast. The first velocity threshold, second velocity threshold, and acceleration threshold can be adaptively adjusted according to the actual application scenario.
[0044] The above scheme dynamically selects different prediction models for position prediction based on the different motion states of the historical target before awakening, ensuring that the increment of the predicted position relative to the actual position matches the intensity of the motion state. Compared to using the same prediction model for historical targets in various motion states, this approach improves the accuracy of the predicted position of historical targets.
[0045] In some embodiments, the attribute information of the historical target also includes the motion state of the historical target in the pre-wake image. S1242 includes: expanding the predicted position of the historical target according to the expansion ratio corresponding to the motion state to obtain the region of interest of the historical target; wherein, the expansion ratio is positively correlated with the intensity of the motion state.
[0046] Understandably, the higher the intensity, the greater the displacement of historical targets, requiring a larger target detection range. Therefore, setting the expansion ratio to be positively correlated with the intensity ensures that the region of interest covers historical targets.
[0047] The above scheme dynamically selects different expansion ratios for position expansion based on the different motion states of historical targets before awakening, so that the region of interest matches the intensity of the motion state. Compared with using the same expansion ratio for historical targets in all motion states, this approach can determine a larger region of interest for historical targets with high intensity, ensuring that the region of interest covers the historical target, and determine a smaller region of interest for historical targets with low intensity, thereby improving target detection efficiency and reducing target detection latency.
[0048] In some embodiments, the attribute information of the historical target further includes the velocity and acceleration of the historical target in the image before wake-up. S12411 includes: when the motion state is static, using the actual position of the historical target as the predicted position of the historical target; when the motion state is slow, inputting the velocity and actual position of the historical target into a uniform motion model to obtain the predicted position of the historical target; when the motion state is fast, inputting the velocity, acceleration, and actual position of the historical target into a uniformly accelerated motion model to obtain the predicted position of the historical target.
[0049] The velocity and acceleration of historical targets in the pre-wake image are calculated based on the actual positions of historical targets in the current pre-wake image and other adjacent pre-wake images.
[0050] The static prediction model is a position-invariant model, which can be represented as P(t2) = P(t1). P(t1) is the actual position of the historical target in the image before wake-up (acquisition time t1), and P(t2) is the predicted position of the historical target in the image after wake-up (acquisition time t2).
[0051] The prediction model corresponding to the slow state is a linear uniform motion model, which can be expressed as P(t2) = P(t1) + v·Δt. v is the velocity of the historical target in the image before wake-up, and Δt is the time difference between t2 and t1.
[0052] The prediction model corresponding to the fast state is a nonlinear uniformly accelerated motion model, which can be expressed as P(t2) = P(t1) + v·Δt + 1 / 2·a·Δt², where a is the acceleration of the historical target in the image before wake-up.
[0053] The above scheme employs a position-invariant model for stationary states, allowing the predicted position of the historical target to directly inherit its actual position. For slow-moving states, a linear uniform motion model is used, linearly extending the actual position of the historical target to obtain its predicted position. For fast-moving states, a uniformly accelerated motion model is used, enabling nonlinear fitting of the actual position of the historical target to obtain its predicted position.
[0054] In some embodiments, the attribute information of historical targets also includes the priority of historical targets in the pre-wake image, and target detection of regions of interest for historical targets with higher priority is prioritized over target detection of regions of interest for historical targets with lower priority.
[0055] Priority can represent the detection value and urgency of historical targets. Higher priority indicates higher detection value and urgency. Therefore, under limited computing power, the detection of regions of interest (ROIs) for high-priority historical targets is guaranteed. For example, historical targets approaching impassable areas or moving rapidly have higher priority, and ROI detection is performed first.
[0056] In some embodiments, location prediction / feature vector matching for higher-priority historical targets takes precedence over location prediction / feature vector matching for lower-priority historical targets.
[0057] In some embodiments, the matching condition includes a matching degree greater than a matching degree threshold. S127 includes: in response to the matching degree being greater than the matching degree threshold corresponding to the motion state, establishing an association between the historical target and the target to be associated; wherein the matching degree threshold is positively correlated with the intensity of the motion state.
[0058] It is understandable that the higher the intensity, the greater the degree of appearance deformation. Therefore, setting a matching threshold is positively correlated with the intensity, which allows for setting a more stringent matching threshold for historical targets with high intensity and a more lenient matching threshold for historical targets with low intensity.
[0059] The above scheme dynamically selects different matching thresholds based on the different motion states of historical targets before awakening, making the matching thresholds adaptable to the intensity of the motion state. Compared to using the same matching threshold for historical targets in all motion states, this avoids false associations caused by using lower matching thresholds for high-intensity motion states, and avoids missed associations caused by using higher matching thresholds for low-intensity motion states, thereby improving the accuracy of association.
[0060] In some embodiments, the target tracking method further includes: determining undetected regions outside the regions of interest of each historical target from the post-wake-up image; downsampling the undetected regions to obtain downsampled undetected regions; performing target detection on the downsampled undetected regions, and establishing an association between other targets to be associated and at least one historical target if other targets to be associated are detected.
[0061] Downsampling can reduce the resolution of undetected areas, thus enabling target detection at different resolutions for regions of interest and undetected areas.
[0062] The above scheme performs target tracking on the undetected areas after downsampling, and can cover the entire image range after wake-up without significantly increasing computing power, so as to discover missed or newly emerging targets to be associated.
[0063] In some embodiments, the attribute information of the historical target also includes at least one of the following: the speed, acceleration, rate of change of motion direction, detection confidence, appearance duration, and proximity to the boundary of the impassable area in the image before wake-up. The priority of the historical target is positively correlated with at least one of the following: the speed, acceleration, rate of change of motion direction, detection confidence, appearance duration, and proximity to the boundary of the impassable area.
[0064] The rate of change of the motion direction of historical targets in the pre-wake-up image is calculated based on the motion direction of historical targets in the current pre-wake-up image and its adjacent previous pre-wake-up images. The duration of the appearance of historical targets in the pre-wake-up image is the time between the first pre-wake-up image in which the historical target was detected and the acquisition time of the current pre-wake-up image.
[0065] The above scheme clarifies that the priority of historical objectives is determined based on other attribute information of the historical objectives.
[0066] The following example illustrates how to calculate the priority of historical goals: Priority_Score=w1×Motion_Score+w2×Threat_Score+w3×Confidence_Score+w4×Time_Score.
[0067] Here, Priority_Score represents the priority level. w1, w2, w3, and w4 are the weights, with w1 + w2 + w3 + w4 = 1.0. For example, w1 = 0.35, w2 = 0.30, w3 = 0.20, and w4 = 0.15. Motion_Score is the intensity of motion calculated based on at least one of velocity, acceleration, and rate of change of direction of motion. Motion intensity is positively correlated with at least one of these three factors. Threat_Score is the proximity to the boundary of the impassable area, calculated based on the distance between the actual location of the historical target and the boundary of the impassable area. Proximity is negatively correlated with this distance. Confidence_Score is the confidence score, calculated based on the detection confidence of the historical target in the image before wake-up. Confidence score is positively correlated with detection confidence. Time_Score is the time score calculated based on the duration of the historical target's appearance. Time score is positively correlated with the duration of appearance.
[0068] In some embodiments, the attribute information of the historical target also includes the motion state of the historical target in the image before wake-up. After being woken up, the target tracking method is performed once for the historical target in static, slow-moving and fast-moving states at intervals of a first number, a second number, and a third number of images after wake-up, respectively. The first number is greater than the second number and the third number.
[0069] The second quantity is equal to the third quantity, or the second quantity is greater than the third quantity. The number of intervals represents the tracking frequency; the larger the number of intervals, the lower the tracking frequency.
[0070] The above scheme detects static historical targets less frequently than it detects slow and fast targets. This saves computing power while ensuring the normal tracking of static historical targets and also prevents dynamic (slow and fast) historical targets from being lost.
[0071] In some embodiments, a lower-complexity target detection model is used for target tracking before wake-up, and a higher-complexity target detection model is used after wake-up. Lower-complexity target detection models require relatively fewer computational resources (computing power, power consumption, etc.), while higher-complexity target detection models have relatively higher detection accuracy. Therefore, using target detection models of different complexities before and after wake-up can balance detection accuracy and computational resource consumption.
[0072] In some embodiments, after determining the initial motion state of the historical target in the current pre-wake image based on the rate of change of velocity / acceleration / direction of motion of the historical target in the current pre-wake image, the final motion state of the historical target in the current pre-wake image is corrected using the final motion state of the historical target in the adjacent pre-wake images before the current pre-wake image, thus obtaining the final motion state of the historical target in the current pre-wake image. For example, if the initial motion state of the historical target in the Nth pre-wake image is determined to be static based on the rate of change of velocity / acceleration / direction of motion of the historical target in the Nth pre-wake image, the motion state of the historical target in the Nth pre-wake image is finally determined to be static only if the motion states of the historical target in the (N-1)th and (N-2)th pre-wake images are both static; otherwise, the final motion state of the historical target in the (N-1)th pre-wake image is taken as the final motion state of the historical target in the Nth pre-wake image. This avoids frequent switching of motion states caused by interference or errors, improving the stability of pre-wake target tracking.
[0073] In some embodiments, if the initial motion state of the historical target in the current pre-wake image is dynamic (e.g., fast state), no correction is performed, and it is directly taken as the final motion state of the historical target in the current pre-wake image. Thus, the recording device can be promptly triggered to wake up when a new dynamic historical target appears, or when a static historical target suddenly changes to a dynamic historical target (e.g., from crouching to running), so as to perform high-quality target tracking of the dynamic historical target after wake-up.
[0074] In some embodiments, target detection of regions of interest for static and dynamic historical targets employs target detection models with lower and higher complexity, respectively.
[0075] In some embodiments, the target tracking method further includes: updating the trajectory (actual position, velocity, acceleration, etc.) of a historical target that matches it using the actual position of the target to be associated in the image after wake-up; and performing event detection on the updated trajectory of the historical target to obtain an event detection result.
[0076] To facilitate understanding, the target tracking method provided in this application will be illustrated below with a specific example.
[0077] Figure 2 This is a flowchart illustrating a specific example of the target tracking method provided in this application. For example... Figure 2 As shown, the target tracking method of the recording device includes: I. Target tracking before the recording equipment is woken up.
[0078] Before the recording device is woken up, it is in a low-power sleep mode, capturing images before wake-up at a low frame rate of 1fps, and performing target tracking using a low-complexity target detection model to obtain attribute information of at least one historical target.
[0079] An example of the structure of the attribute information of historical targets is {the ID of historical targets, the trajectory of historical targets (P(j), velocity v(j), acceleration a(j), and rate of change of direction Δθ(j) of historical targets in the image M(j) before wake-up at acquisition time t(j)), and other information of historical targets in the image M(j) before wake-up at acquisition time t(j)}. j=1, 2, 3... v(j)=(x(j), y(j), w(j), h(j)).
[0080] An example of the structure of other information about historical targets in M(j) is {the feature vector of historical targets (f1∈R)} d (128 dimensions), motion state, priority, detection confidence, and occurrence duration.
[0081] The various methods for obtaining historical target information in M(j) are as follows: First, target detection is performed on M(j) to obtain the actual positions (x(j), y(j), w(j), h(j), θ(j)) of historical targets in M(j), and the actual coordinates of historical targets are recorded as P(j) = (x(j), y(j)).
[0082] Next, based on P(j)=(x(j), y(j)) and P(j-1)=(x(j-1), y(j-1)), the velocity of the historical target in M(j) is calculated as v(j)=sqrt(Δx²+Δy²) / Δt, where Δx=x(j)-x(j-1), Δy=y(j)-y(j-1), and Δt=t(j)-t(j-1).
[0083] Next, the acceleration of the historical target in M(j) is calculated as a(j) = |v(j) - v(j-1)| / Δt based on v(j) and v(j-1).
[0084] Next, based on the historical target's motion direction θ(j) and θ(j-1) at the acquisition times t(j) and t(j-1), calculate the rate of change of the historical target's motion direction in M(j): Δθ(j) = |θ(j) - θ(j-1)|.
[0085] Next, the motion state is obtained according to the speed and acceleration of the historical target in M(j). If v(j)<Vth1 (e.g., 2 pixels / second) and a(j)<Ath1 (e.g., 0.5 pixels / second²), the motion state of the historical target is static. If Vth1≤v(j)<Vth2 (e.g., 2≤v(j)<20 pixels / second), the motion state of the historical target is a slow-motion state. If v(j)≥Vth2 (e.g., v(j)≥20 pixels / second) or a(j)≥Ath1, the motion state of the historical target is a fast-motion state. Vth1, Vth2, and Ath1 are respectively a first speed threshold, a second speed threshold, and an acceleration threshold.
[0086] Next, a motion severity degree Motion_Score is calculated according to motion information of the historical target, an approach degree Threat_Score of a boundary of an impassable area is calculated according to an actual position of the historical target, a confidence score Confidence_Score is calculated according to detection confidence of the historical target, and a time score Time_Score is calculated according to a duration of existence of the historical target. Each score is weighted to obtain a priority of the historical target: Priority_Score=w1×Motion_Score+w2×Threat_Score+w3×Confidence_Score+w4×Time_Score; w1=0.35, w2=0.30, w3=0.20, w4=0.15.
[0087] II. In response to satisfying a wakeup condition, the video recording device is woken up. The wakeup condition includes tracking at least one historical target, where each historical target includes at least one historical target whose motion state is dynamic.
[0088] III. Target tracking after the video recording device is woken up.
[0089] After the video recording device is woken up, the video recording device is in a high-power-consumption wakeup mode, acquires post-wakeup images at a high frame rate of 12 fps, and uses a target detection model with relatively high complexity to perform target tracking. Target tracking is performed on the static historical target every 3 post-wakeup images, and computing power consumption is reduced to 40% of a baseline value. Target tracking is performed on slow-motion and fast-motion historical targets for each post-wakeup image, and the computing power consumption remains at the baseline value.
[0090] Figure 3 is a flowchart of a specific example of target tracking after wakeup according to the present application. As Figure 3 shown, the target tracking after wakeup includes: (1) Position prediction.
[0091] For historical targets that are in a static state, the position is predicted based on the actual coordinates P(j) of the historical target using a position-invariant model. This yields the predicted coordinates P(j+1)'=P(j) of the historical target in the image M(j+1) after wake-up at acquisition time t(j+1), which are then used to form the predicted location box of the historical target.
[0092] For historical targets in a slow motion state, a uniform motion model is used to predict their position based on their actual coordinates P(j) and velocity v(j). The predicted coordinates P(j+1)'=P(j)+v(j)·Δt of the historical target in the awakened image are then used to form the predicted position box of the historical target.
[0093] For historical targets in a fast motion state, a uniform acceleration motion model is used to predict their position based on their actual coordinates P(j), velocity v(j), and acceleration a(j). The predicted coordinates of the historical targets in the awakened image are obtained as P(j+1)'=P(j)+v(j)·Δj / 2·a(j)·Δt², which form the predicted position box of the historical targets.
[0094] (2) Determine the region of interest.
[0095] For historical targets that are in a static state, their predicted location boxes are expanded according to the first expansion ratio to obtain the region of interest of the historical targets.
[0096] For historical targets in a slow-moving state, their predicted location boxes are expanded according to the second expansion ratio to obtain the region of interest for the historical targets.
[0097] For historical targets in a fast-moving state, their predicted location boxes are expanded according to the third expansion ratio to obtain the region of interest for the historical targets.
[0098] Among them, the first expansion ratio is 30% smaller than the second expansion ratio, and the third expansion ratio is 50% larger than the second expansion ratio.
[0099] (3) Target detection and feature matching.
[0100] Target detection is performed on the region of interest of historical targets to obtain the actual location bounding box (x(j+1), y(j+1), w(j+1), h(j+1)) of the target to be associated.
[0101] Feature extraction is performed on the region corresponding to the actual location bounding box of the target to be associated, resulting in the feature vector of the target to be associated.
[0102] The matching degree between the feature vector f1 of the historical target and the feature vector f2 of the target to be associated: Sim(f1f2)=(f1·f2) / (||f1||×||f2||)=Σi(f1[i]×f2[i]) / (sqrt(Σif1[i]²)×sqrt(Σif2[i]²)), where Sim ∈ [-1, 1], and i is the dimension of the feature vector.
[0103] In response to Sim(f1f2) ≥ T, it is determined that the historical target and the target to be associated are the same target, the target to be associated inherits the historical target ID, and the actual position of the target to be associated is added to the trajectory of the historical target ID; in response to Sim(f1f2) < T, it is determined that the target to be associated is a new target, a new ID is assigned to the target to be associated, and the actual position of the target to be associated is added to the trajectory of the new ID. The matching degree threshold T corresponding to historical targets in the static, slow-moving, and fast-moving states is 0.75, 0.8, and 0.9, respectively.
[0104] IV. Target tracking after wake-up is performed in stages.
[0105] The target tracking duration after wake-up is 200ms. The 200ms period is subdivided into 4 pipeline stages, each with different functional responsibilities. Details are as follows: Stage 1 (0-50ms): The computing power in this stage is 0 MAC. The attribute information of each historical target tracked before wake-up is read as prior information, and images after wake-up are collected; the region of interest (ROI) of each historical target in the post-wake-up image is determined according to the actual position of each historical target before wake-up.
[0106] Stage 2 (50-100ms): The computing power budget in this stage is 40% of the total budget. Target detection and feature matching association are performed on the ROI of high-priority historical targets to update the trajectories of high-priority historical targets. If the processing of the ROIs of all high-priority historical targets is not completed in this stage, the unfinished part continues to be executed in Stage 3.
[0107] Stage 3 (100-150ms): The computing power budget in this stage is 35% of the total budget. Target detection and feature matching association are performed on the ROI of low-priority targets to update the trajectories of low-priority historical targets.
[0108] Stage 4 (150-200ms): The computing power budget in this stage is 25% of the total budget. Event detection (such as intrusion detection, boundary crossing detection, etc.) is performed based on the trajectory of each historical target; downsampling is performed on the non-ROI (for example, the resolution is reduced from 1080p to 540P), and target tracking is performed on the downsampled non-ROI.
[0109] If a phase is completed ahead of schedule (e.g., there are few high-priority historical targets), the remaining budget is automatically transferred to the next phase. If a phase lacks sufficient computing power (e.g., the number of high-priority historical targets exceeds expectations), the unfinished portion is automatically postponed to the next phase for processing.
[0110] This mechanism implements a computing power scheduling strategy of "allocation on demand and priority guarantee", prioritizing the completion of target tracking for high-priority historical targets and maximizing the overall computing power utilization.
[0111] The above specific examples have at least the following technical effects: On one hand, the attribute information of historical targets tracked before wake-up is passed as prior information to wake-up. After wake-up, tracking continues based on the prior information, thus enabling seamless target tracking before and after wake-up and achieving cross-stage target tracking. This avoids starting tracking from scratch after wake-up and reduces ID reconstruction latency. On the other hand, the detection range of historical targets is narrowed to the region of interest, reducing target detection latency. As a result, the overall tracking latency is reduced from 2-3 seconds to less than 200 milliseconds, improving tracking continuity and stability.
[0112] On the other hand, after being awakened, the target tracking strategy is executed differently according to the motion state of the historical target, which can avoid the waste of computing power and the problem of losing track of static historical targets caused by the same target tracking strategy.
[0113] On the other hand, the target tracking tasks of low-priority historical targets are postponed, while priority is given to ensuring the completion of target tracking for high-priority historical targets. This avoids computing power competition between high and low priority historical targets and maximizes the overall computing power utilization.
[0114] Figure 4 This is a schematic diagram of the structure of an embodiment of the video recording device provided in this application. Figure 4 As shown, the recording device includes a capture module and a correlation module. Wherein: The acquisition module is used to acquire images after the recording device is woken up. The recording device is woken up under certain conditions, including that the recording device tracked at least one historical target before being woken up. The association module is used to establish an association between at least one historical target and the target to be associated in the image after being woken up, based on the attribute information of at least one historical target obtained by the recording device before being woken up. The attribute information of the historical target includes the feature vector of the historical target in the image before being woken up.
[0115] For further detailed descriptions of the recording equipment, please refer to other embodiments, which will not be repeated here.
[0116] Figure 5 This is a schematic diagram of the structure of an embodiment of the electronic device of this application. Figure 5As shown, the electronic device 50 includes a memory 51 and a processor 52. The processor 52 is used to execute program instructions stored in the memory 51 to implement the steps in any of the above method embodiments. In a specific implementation scenario, the electronic device 50 may include, but is not limited to, a microcomputer or a server. In addition, the electronic device 50 may also include a laptop computer, a tablet computer, or other carrier device, which is not limited here.
[0117] Specifically, processor 52 controls itself and memory 51 to implement the steps in any of the above method embodiments. Processor 52 may also be referred to as a CPU (Central Processing Unit). Processor 52 may be an integrated circuit chip with signal processing capabilities. Processor 52 may also be a general-purpose processor, digital signal processor (DSP), application-specific integrated circuit (ASIC), field-programmable gate array (FPGA), or other programmable logic device, discrete gate or transistor logic device, or discrete hardware component. A general-purpose processor may be a microprocessor or any conventional processor. Furthermore, processor 52 may be implemented using integrated circuit chips.
[0118] Please see Figure 6 , Figure 6 This is a schematic diagram of a computer-readable storage medium according to an embodiment of the present application. The computer-readable storage medium 60 stores program instructions 601 thereon, which, when executed by a processor, implement the steps in any of the above method embodiments.
[0119] This application also provides a computer program product comprising a computer program that, when executed by a processor, can implement the steps of the methods described in any of the foregoing embodiments. Specifically, the computer program product can be a software or program product containing a computer program, capable of running on a computing device or stored on any available medium.
[0120] In some embodiments, the functions or modules of the apparatus provided in this disclosure can be used to perform the methods described in the above method embodiments. The specific implementation can be referred to the description of the above method embodiments, and for the sake of brevity, it will not be repeated here.
[0121] The description of the various embodiments above tends to emphasize the differences between the various embodiments. The similarities or similarities between them can be referred to, and for the sake of brevity, they will not be repeated here.
[0122] In the several embodiments provided in this application, it should be understood that the disclosed methods and apparatus can be implemented in other ways. For example, the apparatus implementations described above are merely illustrative. For instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, units or components may be combined or integrated into another system, or some features may be ignored or not executed. In another image location, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces, and the indirect coupling or communication connection of devices or units may be electrical, mechanical, or other forms.
[0123] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit. If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it 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 all or part 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.) or processor to execute all or part of the steps of the methods in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
Claims
1. A target tracking method, characterized in that, include: After the recording device is woken up, images are captured using the recording device. The recording device is woken up under certain conditions, including that the recording device tracked at least one historical target before being woken up. Based on the attribute information of the at least one historical target obtained by the recording device before it is woken up, an association is established between the at least one historical target and the target to be associated in the image after wake-up. The attribute information of the historical target includes the feature vector of the historical target in the image before wake-up.
2. The method according to claim 1, characterized in that, The attribute information of the historical target also includes the actual location of the historical target in the image before wake-up; the step of establishing the association between the at least one historical target and the target to be associated in the image after wake-up based on the attribute information of the at least one historical target obtained by the recording device before wake-up includes: For each historical target, based on the actual location of the historical target, the region of interest corresponding to the historical target is found in the image after wake-up; Target detection is performed on the region of interest of the historical target to obtain the feature vector of the target to be associated corresponding to the historical target; Obtain the matching degree between the feature vector of the historical target and the feature vector of the target to be associated; In response to the matching degree satisfying the matching condition, an association is established between the historical target and the target to be associated.
3. The method according to claim 2, characterized in that, The step of finding the region of interest (ROI) in the post-awakening image based on the actual location of the historical target includes: Based on the actual location of the historical target, the predicted location of the historical target in the awakened image is obtained; The predicted location of the historical target is expanded to obtain the region of interest of the historical target.
4. The method according to claim 3, characterized in that, The attribute information of the historical target also includes the motion state of the historical target in the image before wake-up; the step of predicting the position of the historical target in the image after wake-up based on the actual position of the historical target includes: The actual position of the historical target is predicted according to the prediction model corresponding to the motion state, and the predicted position of the historical target is obtained; wherein, the increment of the predicted position relative to the actual position is positively correlated with the intensity of the motion state; And / or, the step of augmenting the predicted location of the historical target to obtain the region of interest of the historical target in the post-awakening image includes: The predicted location of the historical target is expanded according to the expansion ratio corresponding to the motion state to obtain the region of interest of the historical target; wherein the expansion ratio is positively correlated with the intensity of the motion state.
5. The method according to claim 4, characterized in that, The attribute information of the historical target also includes the velocity and acceleration of the historical target in the image before wake-up; the step of predicting the actual position of the historical target according to the prediction model corresponding to the motion state to obtain the predicted position of the historical target includes: When the motion state is static, the actual position of the historical target is used as the predicted position of the historical target; When the motion state is slow, the velocity and actual position of the historical target are substituted into the uniform motion model to obtain the predicted position of the historical target. When the motion state is fast, the velocity, acceleration and actual position of the historical target are input into the uniform acceleration motion model to obtain the predicted position of the historical target.
6. The method according to claim 2, characterized in that, The attribute information of the historical target also includes the priority of the historical target in the image before wake-up; the target detection of the region of interest of the historical target with higher priority is prioritized over the target detection of the region of interest of the historical target with lower priority. And / or, the matching condition includes the matching degree being greater than a matching degree threshold, and the step of establishing an association between the historical target and the target to be associated in response to the matching degree satisfying the matching condition includes: In response to the matching degree being greater than the matching degree threshold corresponding to the motion state, an association is established between the historical target and the target to be associated; wherein, the matching degree threshold is positively correlated with the intensity of the motion state; And / or, the method further includes: From the post-awakening image, identify undetected regions outside the regions of interest for each of the historical targets; The undetected area is downsampled to obtain the downsampled undetected area; Target detection is performed on the undetected area after downsampling, and if other targets to be associated are detected, an association is established between the other targets to be associated and the at least one historical target.
7. The method according to claim 6, characterized in that, The attribute information of the historical target also includes at least one of the following in the image before wake-up: speed, acceleration, rate of change of motion direction, detection confidence, appearance duration, and proximity to the boundary of the impassable area. The priority of the historical target is positively correlated with at least one of the following: speed, acceleration, rate of change of motion direction, detection confidence, appearance duration, and proximity to the boundary of the impassable area.
8. The method according to claim 1, characterized in that, The wake-up conditions also include that each of the historical targets contains at least one dynamic historical target; and / or, The attribute information of the historical target also includes the motion state of the historical target in the image before wake-up. After wake-up, the target tracking method is performed once for the static, slow-moving, and fast-moving historical targets at intervals of a first number, a second number, and a third number of the post-wake-up images, respectively, where the first number is greater than the second number and the third number; and / or, The image after wake-up is the first image captured by the recording device after it is woken up.
9. An electronic device, characterized in that, It includes a memory and a processor, the processor being configured to execute program instructions stored in the memory to implement the method of any one of claims 1-8.
10. A computer-readable storage medium, characterized in that, It stores program instructions that, when executed by a processor, implement the method of any one of claims 1-8.
11. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the method of any one of claims 1-8.
