Object tracking method and device and electronic equipment
By combining multi-factor matching judgment based on motion direction similarity and regional overlap, the problem of mismatch in object tracking methods in complex scenarios is solved, improving tracking accuracy and robustness, especially tracking stability in the edge region of the field of view.
Patent Information
- Application Number
- CN202511366514.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-23
- Publication Date
- 2026-02-06
AI Technical Summary
Existing object tracking methods are prone to mismatches and low tracking accuracy in complex scenarios, especially in the edge regions of the image field of view. Cross-lane matching errors caused by perspective effects seriously affect the accuracy and reliability of the tracking system.
By acquiring historical state data, current predicted state, and matching data of scene objects, and combining motion direction similarity and regional overlap, a matching analysis is performed. This multi-factor judgment based on the combination of motion direction similarity and regional overlap avoids relying solely on the spatial position relationship of the current frame.
It significantly improves matching accuracy in complex scenarios, reduces false matches, and enhances the continuity and accuracy of tracking trajectories, especially its robustness in the edge regions of the field of view.
Smart Images

Figure CN121482085A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of vehicles and the technical field of automatic driving, in particular to an object tracking method and device and electronic equipment. BACKGROUND
[0002] In actual intelligent road and automatic driving scenarios, it is an important requirement to continuously track moving targets, especially vehicles and pedestrians, across frames and with high reliability, which requires the algorithm to maintain the accuracy of tracking identification even in complex situations such as target concentration, mutual occlusion or edge of the image, and to avoid the phenomenon of losing track or identity switching. However, the existing matching method based on Intersection over Union (IOU) mainly relies on the spatial position overlap of the detection box for association judgment, ignoring the motion characteristics of the target itself. Especially in the edge area of the image field, due to the perspective effect, vehicles moving in opposite directions on different lanes may have very close detection boxes, resulting in a high IOU value. Only relying on spatial overlap information can easily cause false cross-lane matching, causing target tracking identification to jump, and seriously affecting the accuracy and reliability of the tracking system.
[0003] At present, there is no effective solution to the above problems. SUMMARY
[0004] Embodiments of the present application provide an object tracking method, device and electronic equipment to at least solve the technical problem of easy mis-matching and low tracking accuracy of the object tracking method in related technologies.
[0005] According to one of the aspects of the embodiments of the present application, an object tracking method is provided. Historical state data corresponding to a scene object, a current predicted state and to-be-matched data are obtained, wherein the historical state data is used to represent the position state of a matched tracking box of the scene object recorded at a historical time, the current predicted state is used to represent the position state of the tracking box predicted at a current time, and the to-be-matched data is used to represent the position state of a detected candidate box at the current time. The motion direction similarity between the tracking box and the candidate box is determined based on the historical state data, the current predicted state and the to-be-matched data. The area overlap between the tracking box and the candidate box is calculated using the current predicted state and the to-be-matched data. The tracking box and the candidate box are matched and analyzed according to the motion direction similarity and the area overlap to obtain a matching result. In response to the matching result indicating that the tracking box and the candidate box are successfully matched, the candidate box is determined as the tracking box matched with the scene object at the current time.
[0006] Optionally, determining the motion direction similarity based on the historical state data, the current predicted state and the to-be-matched data comprises: determining a motion direction vector corresponding to the tracking frame based on the historical state data and the current predicted state; and calculating the motion direction similarity by using the motion direction vector and the to-be-matched data.
[0007] Optionally, the historical state data comprises a plurality of sets of corner point coordinates corresponding to a target number of continuous time points, and the current predicted state comprises predicted corner point coordinates calculated based on the plurality of sets of corner point coordinates; and determining the motion direction vector based on the historical state data and the current predicted state comprises: performing coordinate difference calculation by using the predicted corner point coordinates and reference corner point coordinates corresponding to a reference time point in the target number of continuous time points to obtain the motion direction vector.
[0008] Optionally, the to-be-matched data comprises candidate corner point coordinates corresponding to the candidate frame; and calculating the motion direction similarity by using the motion direction vector and the to-be-matched data comprises: determining a relative position vector based on the predicted corner point coordinates and the candidate corner point coordinates; and calculating the motion direction similarity by using the motion direction vector and the relative position vector.
[0009] Optionally, calculating the motion direction similarity by using the motion direction vector and the relative position vector comprises: performing angle cosine calculation on the motion direction vector and the relative position vector to obtain the motion direction similarity.
[0010] Optionally, the reference time point is an earliest time point in the target number of continuous time points.
[0011] Optionally, after the candidate frame is determined as the tracking frame matched with the scene object at the current time point, the method further comprises: deleting the reference corner point coordinates from the historical state data and adding the candidate corner point coordinates to the historical state data to update the historical state data.
[0012] Optionally, the matching analysis of the tracking frame and the candidate frame according to the motion direction similarity and the region overlap degree to obtain the matching result comprises: performing multiplication calculation on the motion direction similarity and the region overlap degree to obtain a target similarity; and performing comparison analysis according to the target similarity and a matching condition to obtain the matching result, wherein the matching condition is obtained based on a preset similarity threshold.
[0013] According to an aspect of the embodiments of the present application, an object tracking device is provided, comprising: an acquisition module configured to acquire historical state data corresponding to a scene object, a current predicted state, and to-be-matched data, wherein the historical state data is used to represent a position state of a matched tracking box of the scene object recorded at a historical time, the current predicted state is used to represent a predicted position state of the tracking box at a current time, and the to-be-matched data is used to represent a position state of a detected candidate box at the current time; a first calculation module configured to determine a motion direction similarity between the tracking box and the candidate box based on the historical state data, the current predicted state, and the to-be-matched data; a second calculation module configured to calculate a region overlap degree between the tracking box and the candidate box using the current predicted state and the to-be-matched data; a matching module configured to perform matching analysis on the tracking box and the candidate box according to the motion direction similarity and the region overlap degree to obtain a matching result; and a determination module configured to determine the candidate box as a tracking box matched with the scene object at the current time in response to the matching result indicating that the tracking box and the candidate box are successfully matched.
[0014] According to an aspect of the embodiments of the present application, an electronic device is provided, comprising a memory and a processor, the memory stores a computer program, and the processor is configured to run the computer program to perform the object tracking method of any one of the above.
[0015] In the embodiments of the present application, the historical state data corresponding to the scene object, the current predicted state, and the to-be-matched data are acquired, wherein the historical state data is used to represent a position state of a matched tracking box of the scene object recorded at a historical time, the current predicted state is used to represent a predicted position state of the tracking box at a current time, and the to-be-matched data is used to represent a position state of a detected candidate box at the current time; the motion direction similarity between the tracking box and the candidate box is determined based on the historical state data, the current predicted state, and the to-be-matched data; the region overlap degree between the tracking box and the candidate box is calculated using the current predicted state and the to-be-matched data; the matching analysis on the tracking box and the candidate box is performed according to the motion direction similarity and the region overlap degree to obtain a matching result; and the candidate box is determined as a tracking box matched with the scene object at the current time in response to the matching result indicating that the tracking box and the candidate box are successfully matched.
[0016] It is easy to note that the embodiment of the present application introduces motion direction similarity in the similarity calculation by comprehensively utilizing the historical state sequence of the tracking target (i.e., the scene object), the current predicted state, and the candidate box information to be matched, and the motion direction similarity is combined with the region overlap degree to construct a multi-factor matching judgment basis. The above technical solution makes the matching decision no longer simply rely on the spatial position relationship of the current frame, but can perceive the motion trend of the target through the historical data, so as to make more accurate distinction in the scene where the positions are close but the motion trends are different. This fusion judgment mechanism significantly improves the matching robustness in complex scenes, especially in the edge area of the field of view.
[0017] That is, the embodiment of the present application achieves the purpose of improving the matching accuracy by introducing the motion direction similarity and fusing it with the region overlap degree, thereby realizing the technical effects of effectively reducing the false matching, improving the tracking trajectory continuity and accuracy, and further solving the technical problems of the object tracking method in the related art that the object tracking method is prone to false matching and has low tracking accuracy. BRIEF DESCRIPTION OF DRAWINGS
[0018] The accompanying drawings, which are included to provide a further understanding of the present application, constitute a part of the present application and illustrate the illustrative embodiments of the present application and their description serve to explain the present application, and do not constitute improper limitations on the present application. In the drawings:
[0019] Figure 1 is a hardware structure block diagram of an optional terminal device for implementing an object tracking method according to an embodiment of the present application;
[0020] Figure 2 is a flowchart of an object tracking method according to an embodiment of the present application;
[0021] Figure 3 is a schematic diagram of an optional similarity calculation method according to an embodiment of the present application;
[0022] Figure 4 is a structure block diagram of an object tracking device according to an embodiment of the present application. DETAILED DESCRIPTION
[0023] In order for those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor should be within the scope of protection of the present application.
[0024] It should be noted that the terms "first", "second", and the like in the description and in the claims of the present application and the above-described accompanying 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 under appropriate circumstances, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion, for example, a process, method, system, product or device that includes a list of steps or units does not necessarily limit to those steps or units clearly listed, but can include other steps or units not clearly listed or inherent to these processes, methods, products or devices.
[0025] According to an embodiment of the present application, an embodiment of an object tracking method is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described herein can be executed in an order different from that shown herein.
[0026] Figure 1 is a hardware structure block diagram of an optional terminal device for implementing an object tracking method according to an embodiment of the present application, as Figure 1 shown, the terminal device can include one or more processors 102 (the processor 102 can include but not limited to a microcontroller unit (MCU) or a field programmable gate array (FPGA) processing device, a memory 104 for storing data, and a transmission device 106 for communication function. In addition, it can also include a display device 110, an input and output device 108, a universal serial bus (USB) port (which can be included as one of the ports of the computer bus, not shown in the figure), a network interface (not shown in the figure), a power supply (not shown in the figure) and / or a camera (not shown in the figure). Those skilled in the art can understand that Figure 1 the structure shown is only schematic, which does not limit the structure of the above-mentioned terminal device. For example, the terminal device can also include more or less components than Figure 1 shown, or have a different configuration than Figure 1 shown.
[0027] It should be noted that the one or more processors 102 and / or other data processing circuitry described above can be embodied as, include or otherwise comprise software, hardware, firmware or any combination thereof, in whole or in part. Further, the data processing circuitry can be a single independent processing module or any one of the other elements incorporated into a terminal device (or mobile device) in whole or in part.
[0028] The memory 104 can be used to store software programs of application software and modules, such as program instructions / data storage means corresponding to the object tracking method in the embodiments of the present application. The processor 102 executes various functional applications and data processing by running the software programs and modules stored in the memory 104, i.e. implements the object tracking method described above. The memory 104 can include a high-speed random access memory, and can further include a non-volatile memory, such as one or more magnetic storage devices, flash memories, or other non-volatile solid-state memories. In some examples, the memory 104 can further include a memory remotely arranged with respect to the processor 102, which can be connected to the terminal device through a network. Examples of the network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof.
[0029] The transmission device 106 is used to receive or send data via a network. Specific examples of the network can include a wireless network provided by a communication provider of the terminal device. In one example, the transmission device 106 includes a network adapter (NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (RF) module, which is used to communicate with the Internet in a wireless manner.
[0030] Under the above operating environment, the embodiments of the present application provide an object tracking method as shown in Figure 2 Figure 2 is a flowchart of an object tracking method according to an embodiment of the present application, as shown in Figure 2 The method includes the following implementation steps S201 to S205.
[0031] In step S201, historical state data corresponding to a scene object, a current predicted state and to-be-matched data are acquired, wherein the historical state data is used to represent a position state of a matched tracking box of the scene object recorded at a historical time, the current predicted state is used to represent a predicted position state of the tracking box at a current time, and the to-be-matched data is used to represent a position state of a detected candidate box at the current time.
[0032] The scene object can refer to a physical object that is continuously tracked, such as a vehicle, a pedestrian, or other moving entity. The historical state data can include a sequence of position states of the matched tracking box of the scene object recorded at multiple consecutive historical time instants, which can include the center point coordinates, size, and other information of the tracking box. The current predicted state can be a predicted position state of the tracking box at the current time instant calculated by a motion model based on the historical state data. The to-be-matched data can be a set of position states of all candidate boxes detected by the image perception system at the current time instant, each candidate box representing a detection result that can correspond to the tracked scene object.
[0033] In the target tracking application scenario, the system continuously maintains the historical state data of the scene object and predicts the possible position of the tracking box at the current time instant based on the historical state data, thereby providing a basis for subsequent similarity calculation and data association. Meanwhile, the system obtains candidate box information in the current frame image as to-be-matched data in real time, thereby providing a comparison object for matching analysis. The step S201 integrates the historical state data, the current predicted state, and the to-be-matched data, thereby providing data preparation for accurate and robust target tracking.
[0034] In the target tracking application scenario, the system continuously maintains the historical state data of the scene object and predicts the possible position of the tracking box at the current time instant based on the historical state data, thereby providing a basis for subsequent similarity calculation and data association. Meanwhile, the system obtains candidate box information in the current frame image as to-be-matched data in real time, thereby providing a comparison object for matching analysis. The step S201 integrates the historical state data, the current predicted state, and the to-be-matched data, thereby providing data preparation for accurate and robust target tracking.
[0035] The motion direction similarity is a scalar value used to quantify the consistency of the motion trend between the tracking box and the candidate box. When determining the motion direction similarity, the system can derive the motion trend of the tracking box in combination with the historical state data and the current predicted state, and compare the motion trend with the relative position relationship determined by the current predicted state and the to-be-matched data.
[0036] In the target tracking application scenario, by introducing the motion direction similarity, the system can perceive the motion continuity of the scene object in addition to the traditional spatial overlap information. For example, for a scene object located in the edge region of the image, the motion direction similarity calculated between the tracking box and the candidate box with opposite motion directions is low, thereby effectively avoiding cross-lane mis-matching. The step S202 calculates the motion direction similarity, thereby providing key motion context information for subsequent comprehensive matching judgment.
[0037] In the target tracking application scenario, by introducing the motion direction similarity, the system can perceive the motion continuity of the scene object in addition to the traditional spatial overlap information. For example, for a scene object located in the edge region of the image, the motion direction similarity calculated between the tracking box and the candidate box with opposite motion directions is low, thereby effectively avoiding cross-lane mis-matching. The step S202 calculates the motion direction similarity, thereby providing key motion context information for subsequent comprehensive matching judgment.
[0038] The region overlap degree can be used to measure the spatial overlap degree of the tracking box and the candidate box in the current frame image, for example, the IOU can be used for calculation. When calculating the region overlap degree, the system determines the predicted region of the tracking box according to the current predicted state, and determines the actual region of the candidate box according to the to-be-matched data, and then calculates the ratio of the intersection and the union of the two regions.
[0039] In the target tracking application scenario, the region overlap degree is a basic index for judging whether the tracking box and the candidate box represent the same object. Higher region overlap degree usually means that the two boxes are close in position in the image space, and there is a matching possibility. The step S203 provides the spatial position similarity measurement necessary for matching analysis by calculating the region overlap degree.
[0040] In step S204, the tracking box and the candidate box are matched according to the motion direction similarity and the region overlap degree, and a matching result is obtained.
[0041] When matching the tracking box and the candidate box, the system can perform fusion calculation on the motion direction similarity and the region overlap degree, for example, multiply the motion direction similarity and the region overlap degree to obtain a comprehensive similarity score. Subsequently, the system can determine the matching result according to whether the comprehensive similarity score exceeds a preset threshold, or by selecting the candidate box with the highest score.
[0042] In the target tracking application scenario, by fusing the motion direction similarity and the region overlap degree, the system can make a more robust matching decision. For example, when the region overlap degrees of two candidate boxes and the tracking box are similar, the candidate box with higher motion direction similarity will be matched first, thereby reducing the identity switching caused by instantaneous occlusion or detection error. The step S204 significantly improves the accuracy of matching analysis by combining motion and spatial information.
[0043] In step S205, in response to the matching result indicating that the tracking box and the candidate box match successfully, the candidate box is determined as the tracking box matched with the scene object at the current time.
[0044] When the matching result indicates that the tracking box and the candidate box match successfully, the system assigns the position state and other information of the candidate box to the tracking trajectory of the current scene object, and completes the update of the tracking box. This means that the candidate box is officially recognized as the latest representation of the scene object at the current time, and its position state will be used to update the historical state data and may participate in the calculation of the current predicted state at the next time.
[0045] In the target tracking application scenario, after successful matching, the tracking identifier of the scene object is continued to be used, and the motion trajectory of the scene object is smoothly updated. For example, in a vehicle-road cooperative system, a continuously tracked vehicle can be correctly associated even if it temporarily drives to the edge of the image due to its consistent motion trend, avoiding tracking identifier jumping or losing. The above step S205 ensures the continuity and stability of target tracking by finally confirming the matching relationship.
[0046] Based on the above steps S201 to S205, the embodiment of the application proposes a more robust object tracking method by fusing the motion direction similarity and the region overlap degree. First, by obtaining and maintaining the historical state data, the current predicted state and the to-be-matched data, sufficient information basis is provided for the tracking process. Then, by calculating the motion direction similarity, the motion trend of the target is effectively perceived, making up for the deficiency of traditional methods which only rely on instantaneous spatial information. Combined with the region overlap degree as a spatial similarity index, the system can perform more comprehensive matching analysis on the tracking frame and the candidate frame. Further, according to the fused result, a matching decision is made, and the tracking frame state is successfully updated. The above technical solution can significantly reduce mis-matching and improve tracking accuracy and reliability, especially in complex scenes such as the edge of the field of view and target intersection.
[0047] It is easy to note that, by comprehensively utilizing the historical state sequence of the tracking target (i.e. the scene object), the current predicted state and the candidate frame information to be matched, the embodiment of the application introduces the motion direction similarity in the similarity calculation, which is combined with the region overlap degree to construct a multi-factor matching judgment basis. The above technical solution makes the matching decision no longer simply rely on the spatial position relationship of the current frame, but can perceive the motion trend of the target through historical data, so as to make more accurate distinction in the scene where the positions are close but the motion trends are different. This fusion judgment mechanism significantly improves the matching robustness in complex scenes, especially in the edge area of the field of view. That is, the embodiment of the application achieves the purpose of improving the matching accuracy by introducing the motion direction similarity and fusing it with the region overlap degree, thereby realizing the technical effects of effectively reducing mis-matching, improving the continuity and accuracy of the tracking trajectory, and further solving the technical problems of the related art that the object tracking method is prone to mis-matching and has low tracking accuracy.
[0048] The following further introduces other implementation manners of the above method in the embodiment of the application.
[0049] As an optional implementation manner, in the above step S202, based on the historical state data, the current predicted state and the to-be-matched data, determining the motion direction similarity can further include the following execution steps:
[0050] Step S221, determining a motion direction vector corresponding to the tracking box based on the historical state data and the current predicted state;
[0051] Step S222, calculating a motion direction similarity using the motion direction vector and the to-be-matched data.
[0052] In the above optional embodiment, the motion direction vector is the key data for quantifying the macroscopic motion trend of the tracked scene object. The motion direction vector is calculated from the position state sequence recorded by the tracking box at the historical time and the predicted position state at the current time, which represents the overall moving direction and displacement of the scene object within a period of time. The motion direction vector is the basis for calculating the motion direction similarity and provides motion context information for the matching process.
[0053] In the application scenario, the motion direction vector can be a two-dimensional vector (dirx k ,diry k ). For example, in the overhead camera picture of the car-road cooperative system, a vehicle driving to the right upper side, the motion direction vector can be a larger positive dirx k value and a smaller positive diry k value. This motion direction vector can effectively reflect the true driving intention of the vehicle and avoid false direction judgment due to the slight jitter of the single-frame detection box.
[0054] According to the above step S221, a motion direction vector corresponding to the tracking box is determined based on the historical state data and the current predicted state. Specifically, the system selects a position state at a reference time from the historical state data and performs difference operation with the current predicted state, thereby obtaining a motion direction vector from the reference point to the current predicted position. The above calculation process can filter out position noise within a short period of time and extract stable and reliable macroscopic motion trend, laying a foundation for subsequent similarity comparison.
[0055] According to the above step S222, a motion direction similarity is calculated using the motion direction vector and the to-be-matched data. When calculating the motion direction similarity, the system first constructs a relative position vector from the tracking box to the candidate box according to the current predicted state and the position state of the candidate box. Then, by calculating the consistency of the angle between the motion direction vector and the relative position vector (for example, calculating the cosine value of the angle between the motion direction vector and the relative position vector), the motion direction similarity between the motion direction vector and the relative position vector is quantified. The higher the motion direction similarity, the greater the possibility that the candidate box appears directly in front of the tracking box in the motion direction, and the higher the probability that the candidate box corresponds to the same object as the tracking box.
[0056] Through the steps S221 to S222, the embodiment of the present application realizes the fine and robust calculation of the motion direction similarity. By calculating the motion direction vector according to the historical state data, and comparing the motion direction vector with the relative position of the candidate box, the above scheme makes the motion direction similarity index accurately reflect the consistency of the motion trend between the tracking box and the candidate box. The above mechanism enhances the object distinguishing ability in the scene where the appearance is similar, the position is close, but the motion intention is opposite (such as the crossroad or the cross-lane vehicle at the image edge), provides high-quality and high-credibility motion feature input for the subsequent fusion matching decision, thereby reducing the false matching and improving the tracking accuracy.
[0057] As an optional implementation, the historical state data includes a plurality of groups of corner point coordinates corresponding to a target number of continuous time instants, and the current predicted state includes predicted corner point coordinates calculated based on the plurality of groups of corner point coordinates; in the step S221, the motion direction vector is determined based on the historical state data and the current predicted state, and the step S221 can further include the following execution steps:
[0058] In the step S2211, the predicted corner point coordinates and the reference corner point coordinates corresponding to a reference time instant in the target number of continuous time instants are used for coordinate difference calculation to obtain the motion direction vector.
[0059] In the above optional embodiment, the corner point coordinates are coordinate data representing the spatial position of the tracking box, and generally refer to the coordinate values of the center point of the tracking box in the image pixel coordinate system. The target number is a preset constant, which is used to define the time range covered by the historical state data, thereby controlling the size of the time window for motion trend calculation. The predicted corner point coordinates are the expected position of the tracking box at the current time instant, which are calculated according to the historical corner point coordinate sequence by a motion prediction algorithm (such as linear extrapolation or Kalman filtering). The reference corner point coordinates are the actual corner point coordinates recorded at the reference time instant at the start point of the time window in the historical state data. The motion direction vector can be determined by comparing the current predicted position with the historical reference position.
[0060] According to the step S2211, the predicted corner point coordinates and the reference corner point coordinates corresponding to a reference time instant in the target number of continuous time instants are used for coordinate difference calculation to obtain the motion direction vector. Specifically, the calculation method of the motion direction vector is as follows: the horizontal component of the motion direction vector is obtained by subtracting the horizontal component of the reference corner point coordinates from the horizontal component of the predicted corner point coordinates; and the vertical component of the motion direction vector is obtained by subtracting the vertical component of the reference corner point coordinates from the vertical component of the predicted corner point coordinates. The above calculation method essentially calculates the net displacement in a relatively long period of time, thereby filtering the motion fluctuations in a short period of time, extracting the stable and reliable macro motion direction, and providing high-quality feature input for the subsequent similarity comparison.
[0061] In an application scenario, for example, tracking a road vehicle, the corner point coordinates can be the center point pixel coordinates [cx, cy] of the vehicle bounding box. Assuming that the target number is set to 5, the system will maintain the 5 sets of corner point coordinates corresponding to the last 5 continuous time points as historical state data, denoted as stateList = [p k-5 ,p k-4 ,p k-3 ,p k-2 ,p k-1 ]. The current predicted state includes the predicted corner point coordinates p k = [cx k , cy k ] at time k predicted from the 5 sets of historical coordinates. The above reference corner point coordinates can be the predicted order corner point coordinates selected from stateList, for example, the corner point coordinates at time k-5 are selected as the reference corner point coordinates p k-5 = [cx k-5 , cy k-5 ]. By calculating the difference between the predicted corner point coordinates and the reference corner point coordinates, a macroscopic and smoothed motion direction vector (dirx k , diry k ) can be obtained. Specifically, the motion direction vector is calculated according to the following formulas (1) and (2).
[0062] dirx k = cx k - cx k-5 Formula (1)
[0063] diry k = cy k - cy k-5 Formula (2)
[0064] Through the above calculation method of the motion direction vector, the embodiment of the application can effectively avoid the direction noise caused by single-frame detection jitter, and accurately reflect the overall displacement trend of the vehicle from time k-5 to time k.
[0065] Through the above step S2211, the embodiment of the application provides a specific, robust and anti-noise motion direction vector calculation method. By using the historical data of multiple continuous time points and the current predicted state for coordinate difference operation, the instantaneous detection error can be effectively smoothed, and the true motion trend of the tracked target can be highlighted. The motion direction vector calculated in this way can better represent the macroscopic movement intention of the target, and provides data guarantee for subsequent accurate calculation of motion direction similarity and finally reducing false matching in complex scenes.
[0066] As an optional implementation, the to-be-matched data comprises candidate corner coordinates corresponding to the candidate box, and in the step S222, the motion direction similarity is calculated by using the motion direction vector and the to-be-matched data, and the step S222 can further comprise the following execution steps:
[0067] In step S2221, a relative position vector is determined based on the predicted corner coordinates and the candidate corner coordinates.
[0068] In step S2222, the motion direction similarity is calculated by using the motion direction vector and the relative position vector.
[0069] In the optional embodiment, the candidate corner coordinates are coordinate data representing the spatial position of the candidate box, and generally refer to the coordinate values of the center point of the candidate box in the image pixel coordinate system. The relative position vector is a vector used to quantify the instantaneous spatial relative relationship between the tracking box and the candidate box. The relative position vector is calculated by pointing from the current predicted position of the tracked target to the current position of the candidate box, and the relative position vector represents the orientation and distance of the candidate box relative to the tracking box. The motion direction similarity is obtained by calculating the consistency between the motion direction vector and the relative position vector.
[0070] According to the step S2221, the relative position vector is determined based on the predicted corner coordinates and the candidate corner coordinates. Specifically, the calculation method of the relative position vector is as follows: the horizontal component of the relative position vector is obtained by subtracting the horizontal component of the predicted corner coordinates from the horizontal component of the candidate corner coordinates; and the vertical component of the relative position vector is obtained by subtracting the vertical component of the predicted corner coordinates from the vertical component of the candidate corner coordinates. The relative position vector clearly defines the orientation of the candidate box relative to the tracking box, and can be used as a geometric basis for determining whether the candidate box is on the motion path of the tracking box.
[0071] According to the step S2222, the motion direction similarity is calculated by using the motion direction vector and the relative position vector. When calculating the motion direction similarity, the system measures the directional consistency between the motion direction vector and the relative position vector by calculating the cosine value of the included angle between the motion direction vector and the relative position vector. Specifically, the dot product of the motion direction vector and the relative position vector is first calculated, and then the lengths of the motion direction vector and the relative position vector are calculated respectively. Finally, the dot product is divided by the product of the two lengths to obtain the cosine value. The absolute value of the cosine value is taken to obtain a scalar value between 0 and 1 as the motion direction similarity. The closer the motion direction similarity is to 1, the greater the possibility that the candidate box appears in the positive direction of the motion of the tracking box; the closer the motion direction similarity is to 0, the less relevant the motion directions of the two are.
[0072] By the steps S2221 to S2222, the embodiment of the application realizes a precise and physically meaningful motion direction similarity calculation mechanism. The relative position vector is constructed to represent the instant spatial relationship of the target, and the relative position vector is compared with the motion direction vector for direction consistency, so as to realize the conversion of the matching judgment of the motion context into a calculable vector space relationship. The above calculation mechanism enhances the perception of the motion trend, which helps the embodiment of the application to suppress the false matching in the object tracking and improve the object tracking accuracy.
[0073] As an optional implementation, in the step S2222, the motion direction similarity is calculated by using the motion direction vector and the relative position vector, and the step can further include the following execution steps:
[0074] In the step S2223, the motion direction vector and the relative position vector are subjected to the included angle cosine calculation to obtain the motion direction similarity.
[0075] In the above optional embodiment, the included angle cosine calculation measures the direction similarity degree of the motion direction vector and the relative position vector by solving the cosine value of the included angle of the motion direction vector and the relative position vector in the vector space. The absolute value of the cosine value ranges from 0 to 1, and the closer the value is to 1, the more consistent the directions of the two vectors are; the closer the value is to 0, the more perpendicular or opposite the directions of the two vectors are, and the lower the similarity is. The motion direction similarity is a scalar result obtained by taking the absolute value of the cosine value.
[0076] In an application scenario, for example, in a road monitoring picture of a vehicle-road cooperative system, the motion direction vector of the tracked vehicle can be (5, 2) (indicating a movement to the right and down), and the relative position vector of a certain candidate vehicle can be (4, 1.5). The included angle cosine calculation of the two vectors will obtain a cosine value close to 1, indicating that the candidate vehicle is likely to be located in front of the motion path of the tracked vehicle, and the possibility of the two being the same vehicle is high. Conversely, if the candidate vehicle comes from the opposite lane, the relative position vector can be (-3, 0), the calculated cosine value will be a small value or a negative value, and the motion direction similarity obtained by taking the absolute value is also low, thereby effectively avoiding false matching.
[0077] According to the above step S2223, the included angle cosine calculation is performed on the motion direction vector and the relative position vector to obtain the motion direction similarity. Specifically, the included angle cosine calculation follows the cosine theorem formula in the vector space. First, the dot product of the motion direction vector and the relative position vector is calculated. Then, the lengths of the motion direction vector and the relative position vector are calculated respectively. Then, the dot product is divided by the product of the two lengths to obtain the original cosine value of the included angle of the two vectors. Finally, the absolute value of the original cosine value is taken to ensure that the motion direction similarity is always a non-negative value between 0 and 1, thereby obtaining the final motion direction similarity.
[0078] In the application scenario, an optional similarity calculation mode is provided as shown in Figure 3 , as shown in Figure 3 , the predicted corner point coordinates [cx kA , cy kA ] represent the predicted center position of the tracking frame A of the tracked vehicle at time k, and the candidate corner point coordinates [cx kB , cy kB ] represent the actual detection center position of the candidate frame B of the candidate vehicle at time k. The relative position vector is a vector from point [cx k , cy k ] to point [cx kB , cy kB ], which can also be called AB vector, denoted as (vecx AB , vecy AB ), and the calculation method is shown in the following formula (3) and formula (4).
[0079] vecx AB = cx kB -cx kA Formula (3)
[0080] vecy AB = cy kB -cy kA Formula (4)
[0081] According to the calculation method of the motion direction vector, the state data of the tracking frame A at a plurality of consecutive historical time points is used to calculate the motion direction vector at the current time (i.e., time k), which is the AC vector as shown in Figure 3 , denoted as (dirx k , dity k ). Based on this, the motion direction similarity SDir k is calculated according to the following formula (5).
[0082]
[0083] In the above formula (5), lengthdir This represents the length of the vector indicating the direction of motion.
[0084] length AB This represents the length of the relative position vector. abs() represents the absolute value function.
[0085] By comparing the motion direction vector of tracking box A with the relative position vector pointing to candidate box B, the directional consistency between the two vectors can be calculated. If the directions are consistent, the motion direction similarity is high, indicating that candidate box B is likely located directly in front of the motion of tracking box A; if the directions are opposite or inconsistent, the motion direction similarity is low, indicating that candidate box B is likely unrelated to the motion of tracking box A, thus providing a basis for subsequent matching decisions.
[0086] Through the above steps S2223, this application provides a method for calculating motion direction similarity that has clear mathematical meaning, stable calculation results, and intuitive physical meaning. By calculating the cosine of the angle between the motion direction vector and the relative position vector, the consistency judgment between the target motion trend and the relative orientation of the candidate box is transformed into a calculable and standardized scalar metric. The above calculation method based on the geometric relationship of vector space not only enhances the objectivity and accuracy of motion context awareness, but also lays the foundation for effective integration with region overlap (IOU), thereby helping to reduce cross-lane mismatches and improve tracking accuracy.
[0087] As an optional implementation, in the above object tracking method, the reference time is the earliest time among the consecutive times of the target number.
[0088] In the above optional embodiments, the reference time is a time reference point used to calculate the macroscopic motion trend. The reference time is specifically designated as the starting point of the time series within a time window defined by the number of targets, i.e., the earliest time recorded in the historical state data. Setting the reference time as the earliest time aims to obtain a starting reference that can fully reflect the overall displacement of the target, thereby ensuring that the calculated motion direction vector can cover a sufficiently long time span, effectively reflecting the smoothed macroscopic motion trend of the target across multiple moments, rather than instantaneous changes over a short period.
[0089] In some other exemplary application scenarios, when continuously tracking pedestrians in an intelligent monitoring system, it is assumed that the system maintains a target number of 5, i.e., the position states of the current time k and the previous four consecutive historical times (k-4, k-3, k-2, k-1) are saved. At this time, the reference time is the earliest time k-4 among them. By comparing the predicted position of the current time with the actual position of the reference time k-4, the overall displacement vector from time k-4 to time k can be calculated. This calculation method with the earliest time as the reference can maximize the use of historical information, effectively filter out the detection jitter or slight deviation that may exist at the intermediate time, so that the final motion direction vector is more stable and reliable, and the main moving path and direction of the pedestrian in this period of time are accurately described.
[0090] By explicitly specifying the reference time as the earliest time among the target number of consecutive times, the embodiments of the present application provide a stable motion direction vector calculation strategy. The above strategy selects the starting point of the time window as the calculation reference, ensures that the motion direction vector can be calculated based on the longest available historical span, and thus captures the most real and most significant macro motion trend. The above specific embodiments lay the foundation for generating high-quality motion direction similarity, thereby helping to achieve high-precision target matching and improve object tracking accuracy.
[0091] As an optional implementation, in the step S204, the motion direction similarity and the region overlap degree are used to perform matching analysis on the tracking frame and the candidate frame to obtain a matching result. The step S204 can further include the following execution steps:
[0092] In the step S241, the motion direction similarity and the region overlap degree are multiplied to obtain a target similarity.
[0093] In the step S242, the target similarity and a matching condition are compared to obtain a matching result, wherein the matching condition is obtained based on a preset similarity threshold.
[0094] In the above optional embodiment, the target similarity is a comprehensive matching score obtained by fusing the motion direction similarity and the region overlap degree, and is the basis for the final matching decision. The matching condition is a set of rules for determining whether the matching is successful, and can be obtained by a preset similarity threshold. The preset similarity threshold is a configurable constant used to set the qualified line of the target similarity. Only the target similarity that reaches or exceeds the preset similarity threshold is considered as an effective matching candidate. This fusion decision mechanism ensures that the matching result takes into account both the consistency of the spatial position and the continuity of the motion trend.
[0095] In an application scenario, for example, in a multi-target tracking scenario at a road intersection, one tracking box can have a similar area overlap (IOU) with multiple candidate boxes. At this time, a single area overlap index cannot make a correct decision. Through the above steps of the embodiments of the present application, the system will calculate the target similarity between each candidate box and the tracking box. For a candidate box with a motion direction consistent with the tracking box height, the motion direction similarity is higher, and after multiplying the higher area overlap, the target similarity score will also be very high, which may exceed the preset similarity threshold and be successfully matched. Conversely, for a candidate box with opposite or large motion direction difference (such as a vehicle in the opposite lane), even if the area overlap is high, the lower motion direction similarity will significantly lower the target similarity score, resulting in a failure to meet the matching condition, so it is excluded by the system, effectively avoiding the occurrence of mis-matching.
[0096] According to the above step S241, the motion direction similarity and the area overlap are multiplied to obtain the target similarity. Multiplication is a simple and effective fusion strategy that combines two scalars (motion direction similarity and area overlap) whose values are between 0 and 1. Low scores in either the motion direction similarity or the area overlap will significantly suppress the final product (i.e., the target similarity). This calculation method ensures that the matching decision requires the candidate box to be close in spatial position and consistent in motion direction, which is the logical relationship of "and", thereby greatly improving the strictness and accuracy of matching.
[0097] According to the above step S242, the target similarity and the matching condition are compared and analyzed to obtain the matching result. When performing comparison and analysis, the system directly compares the calculated target similarity with the preset similarity threshold. If the target similarity is greater than or equal to the preset similarity threshold, a matching success result is generated; if the target similarity is less than the preset similarity threshold, a matching failure result is generated. In the case of multiple candidate boxes, the system usually selects the candidate box with the highest target similarity score as the final matching object, but this score still needs to meet the condition of not being lower than the preset similarity threshold.
[0098] For example, after calculating the intersection over union IOU between the tracking box A and the candidate box B, the target similarity S is calculated according to the following formula (6) k .
[0099] S k =IOU×SDir k Formula (6)
[0100] Through the steps S241 to S242, the embodiment of the application provides a clear, effective and configurable comprehensive matching decision mechanism. By multiplying the motion direction similarity and the region overlap degree, a matching criterion responding to spatial and motion information is constructed. Then, through comparison analysis based on a preset threshold, the matching process is automated and standardized. The above-mentioned implementation converts the indexes calculated in the previous steps into the final matching decision, directly realizes the purpose of reducing false matching and improving tracking accuracy, and ensures the reliability and robustness of target tracking in complex scenes.
[0101] As an optional implementation, after the candidate box is determined as the tracking box matched with the scene object at the current time, the object tracking method can further include the following execution steps:
[0102] In step S206, the reference corner coordinates are deleted from the historical state data, and the candidate corner coordinates are added to the historical state data to update the historical state data.
[0103] In the above optional embodiment, the historical state data is a fixed-length sequence managed according to the first-in first-out (FIFO) principle, used to maintain the latest and continuous position history information of the scene object. The reference corner coordinates are the position data stored earliest in time, i.e., the oldest position data in the historical state data. The candidate corner coordinates are the new data representing the most accurate position of the scene object at the current time after matching confirmation. Updating the historical state data is a maintenance and update step in the target tracking process, which can ensure that the historical state data always contains the latest and most relevant continuous motion information of the scene object, while discarding the obsolete information that is no longer needed, and preparing for the motion direction calculation at the next time.
[0104] According to step S206, the reference corner coordinates are deleted from the historical state data, and the candidate corner coordinates are added to the historical state data to update the historical state data. Specifically, the update operation follows a strict fixed-length queue management mechanism. The deletion operation removes the corner coordinates earliest in time in the historical state data, which are used as the reference for the previous motion direction calculation. The addition operation adds the latest and most accurate corner coordinates confirmed in the current frame to the historical record.
[0105] Through the above step S206, the embodiment of the present application realizes a kind of efficient, robust history state data maintenance mechanism. By the way of first-in first-out, the latest confirmed position data is replaced with the oldest history data, it is guaranteed that the history information used for calculating motion direction is always the latest, continuous and constant length. This dynamic updating mechanism is the core guarantee of maintaining long-term accurate tracking, it ensures the sustained reliability and adaptability of motion direction vector calculation, provides the data basis for the entire tracking system to make accurate matching decision at each moment, thereby continuously ensuring high-precision, high-robustness target tracking performance.
[0106] In the embodiment, an object tracking device is also provided, which is used to implement the above-mentioned embodiments and preferred embodiments, and will not be described again. As used below, a "module" can be a combination of software and / or hardware that implements a predetermined function. Although the device described in the following embodiments is preferably implemented in software, hardware, or a combination of software and hardware can also be implemented and conceived.
[0107] Figure 4 is a structural block diagram of an object tracking device according to the embodiment of the present application, as shown in Figure 4 The device includes: an acquisition module 401, configured to acquire history state data corresponding to a scene object, a current predicted state and to-be-matched data, wherein the history state data is used to represent the position state of the matched tracking frame of the scene object recorded at the historical time, the current predicted state is used to represent the position state of the tracking frame predicted at the current time, and the to-be-matched data is used to represent the position state of the detected candidate frame at the current time; a first calculation module 402, configured to determine the motion direction similarity between the tracking frame and the candidate frame based on the history state data, the current predicted state and the to-be-matched data; a second calculation module 403, configured to calculate the area overlap degree between the tracking frame and the candidate frame using the current predicted state and the to-be-matched data; a matching module 404, configured to perform matching analysis on the tracking frame and the candidate frame according to the motion direction similarity and the area overlap degree to obtain a matching result; and a determination module 405, configured to determine the candidate frame as the tracking frame matched with the scene object at the current time in response to the matching result indicating that the tracking frame and the candidate frame are matched successfully.
[0108] Optionally, the first calculation module 402 is further configured to: determine a motion direction vector corresponding to the tracking frame based on the history state data and the current predicted state; and calculate the motion direction similarity using the motion direction vector and the to-be-matched data.
[0109] Optionally, the historical state data comprises a plurality of groups of corner point coordinates corresponding to a target number of continuous time instants, and the current predicted state comprises predicted corner point coordinates calculated based on the plurality of groups of corner point coordinates; the first calculation module 402 is further configured to: perform coordinate difference calculation on the predicted corner point coordinates and reference corner point coordinates corresponding to a reference time instant among the target number of continuous time instants, to obtain a motion direction vector.
[0110] Optionally, the to-be-matched data comprises candidate corner point coordinates corresponding to the candidate bounding box; the first calculation module 402 is further configured to: determine a relative position vector based on the predicted corner point coordinates and the candidate corner point coordinates; and calculate the motion direction similarity by using the motion direction vector and the relative position vector.
[0111] Optionally, the first calculation module 402 is further configured to: perform angle cosine calculation on the motion direction vector and the relative position vector, to obtain the motion direction similarity.
[0112] Optionally, in the object tracking apparatus, the reference time instant is the earliest time instant among the target number of continuous time instants.
[0113] Optionally, the object tracking apparatus further comprises an updating module (not shown in the figure) in addition to the above-described modules, and the updating module is configured to: after the candidate bounding box is determined as the tracking bounding box matched with the scene object at the current time instant, delete the reference corner point coordinates from the historical state data, and add the candidate corner point coordinates to the historical state data, to update the historical state data.
[0114] Optionally, the matching module 404 is further configured to: perform multiplication calculation on the motion direction similarity and the region overlap degree, to obtain a target similarity; and perform comparison analysis on the target similarity and a matching condition, to obtain the matching result, wherein the matching condition is configured based on a preset similarity threshold.
[0115] It should be noted that the above-described modules can be implemented by software or hardware, and for the latter, the following implementation manners can be used, but are not limited thereto: the above-described modules are located in the same processor; or the above-described modules are located in different processors in any combination.
[0116] According to another aspect of the embodiments of the present application, a computer readable storage medium is provided, which stores a program, wherein the program controls a device where the storage medium is located to perform any one of the above-described object tracking methods when the program is running.
[0117] Optionally, in the embodiment of the present application, the storage medium can be configured to store a computer program for performing the following steps: obtaining historical state data corresponding to a scene object, a current predicted state, and to-be-matched data, wherein the historical state data is used to represent a position state of a matched tracking box of the scene object recorded at a historical time, the current predicted state is used to represent a predicted position state of the tracking box at a current time, and the to-be-matched data is used to represent a position state of a detected candidate box at the current time; determining a motion direction similarity between the tracking box and the candidate box based on the historical state data, the current predicted state, and the to-be-matched data; calculating a region overlap degree between the tracking box and the candidate box by using the current predicted state and the to-be-matched data; performing matching analysis on the tracking box and the candidate box according to the motion direction similarity and the region overlap degree to obtain a matching result; and in response to the matching result indicating that the tracking box and the candidate box are successfully matched, determining the candidate box as the tracking box matched with the scene object at the current time.
[0118] Optionally, in the embodiment, the storage medium can include, but is not limited to, a U disk, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk, and various computer program storage media.
[0119] According to another aspect of the embodiment of the present application, an object tracking system is also provided, which includes a memory and a processor, the memory stores a computer program, and the processor is configured to run the computer program to perform the object tracking method of any one of the preceding aspects.
[0120] Optionally, in the embodiment, the processor can be configured to perform the following steps by using the computer program: obtaining historical state data corresponding to a scene object, a current predicted state, and to-be-matched data, wherein the historical state data is used to represent a position state of a matched tracking box of the scene object recorded at a historical time, the current predicted state is used to represent a predicted position state of the tracking box at a current time, and the to-be-matched data is used to represent a position state of a detected candidate box at the current time; determining a motion direction similarity between the tracking box and the candidate box based on the historical state data, the current predicted state, and the to-be-matched data; calculating a region overlap degree between the tracking box and the candidate box by using the current predicted state and the to-be-matched data; performing matching analysis on the tracking box and the candidate box according to the motion direction similarity and the region overlap degree to obtain a matching result; and in response to the matching result indicating that the tracking box and the candidate box are successfully matched, determining the candidate box as the tracking box matched with the scene object at the current time.
[0121] Optionally, specific examples in the embodiment can refer to the examples described in the above embodiments and optional implementation manners, which will not be described herein again.
[0122] In the present application, the description of each embodiment is focused on, and the part not described in detail in a certain embodiment can refer to the relevant description of other embodiments.
[0123] In several embodiments provided in the present application, it should be understood that the disclosed technical content can be implemented by other ways. Among them, the above-mentioned device embodiments are only schematic, for example, the division of the units can be a logical function division, and actual implementation can have another division way, for example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the units or modules shown or discussed can be indirect coupling or communication connection through some interfaces, units or modules, which can be electrical or other forms.
[0124] The units described as separate components can or can not be physically separated, and the components shown as units can or can not be physical units, that is, they can be located in one place, or they can be distributed to multiple units. Part or all of the units can be selected according to actual needs to achieve the purpose of the embodiment scheme.
[0125] In addition, each functional unit in each embodiment of the present application can be integrated in one processing unit, or each unit can exist physically, or two or more units can be integrated in one unit. The above integrated unit can be realized in the form of hardware or in the form of software functional unit.
[0126] The integrated unit, if realized in the form of software functional unit and sold or used as an independent product, can be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present application essentially or the part of the prior art that makes a contribution or the whole or part of the technical solutions can be embodied in the form of software product, which is stored in a storage medium and includes a plurality of instructions for making a computer device (which can be a personal computer, a server or a network device, etc.) execute all or part of the steps of the method described in each embodiment of the present application. The foregoing storage medium includes: U disk, ROM, RAM, mobile hard disk, magnetic disk or optical disk and various program code storage media.
[0127] The above is only the preferred embodiment of the present application, and it should be pointed out that for ordinary skilled in the art, without departing from the principle of the present application, a number of improvements and refinements can be made, which should be regarded as the protection scope of the present application.
Claims
1. A method of object tracking, characterized by, The method comprises: obtaining historical state data corresponding to a scene object, a current predicted state, and to-be-matched data, wherein the historical state data is used to represent the position state of a matched tracking box of the scene object recorded at a historical time, the current predicted state is used to represent the predicted position state of the tracking box at a current time, and the to-be-matched data is used to represent the position state of a detected candidate box at the current time; based on the historical state data, the current predicted state, and the to-be-matched data, determining the motion direction similarity between the tracking box and the candidate box; using the current predicted state and the to-be-matched data, calculating the area overlap degree between the tracking box and the candidate box; based on the motion direction similarity and the area overlap degree, performing matching analysis on the tracking box and the candidate box to obtain a matching result; in response to the matching result indicating that the tracking box and the candidate box match successfully, determining the candidate box as the tracking box matched with the scene object at the current time.
2. The object tracking method of claim 1, wherein, Based on the historical state data, the current predicted state, and the to-be-matched data, determining the motion direction similarity comprises: based on the historical state data and the current predicted state, determining a motion direction vector corresponding to the tracking box; using the motion direction vector and the to-be-matched data, calculating the motion direction similarity.
3. The object tracking method of claim 2, wherein, The historical state data comprises a plurality of sets of corner point coordinates corresponding to a target number of continuous time points, and the current predicted state comprises predicted corner point coordinates calculated based on motion prediction of the plurality of sets of corner point coordinates; based on the historical state data and the current predicted state, determining the motion direction vector comprises: using the predicted corner point coordinates and reference corner point coordinates corresponding to a reference time point in the target number of continuous time points to calculate a coordinate difference value, to obtain the motion direction vector.
4. The object tracking method of claim 3, wherein, The to-be-matched data comprises candidate corner point coordinates corresponding to the candidate box, and using the motion direction vector and the to-be-matched data to calculate the motion direction similarity comprises: based on the predicted corner point coordinates and the candidate corner point coordinates, determining a relative position vector; using the motion direction vector and the relative position vector, calculating the motion direction similarity.
5. The object tracking method of claim 4, wherein, Using the motion direction vector and the relative position vector to calculate the motion direction similarity comprises: calculating the included angle cosine of the motion direction vector and the relative position vector to obtain the motion direction similarity.
6. The object tracking method of claim 4, wherein, The reference time point is the earliest time point in the target number of continuous time points.
7. The object tracking method of claim 6, wherein, After determining the candidate box as the tracking box matched with the scene object at the current time, the method further comprises: deleting the reference corner point coordinates from the historical state data and adding the candidate corner point coordinates to the historical state data to update the historical state data.
8. The object tracking method according to any one of claims 1 to 7, characterized in that, Based on the motion direction similarity and the area overlap degree, performing matching analysis on the tracking box and the candidate box to obtain a matching result comprises: The motion direction similarity and the area overlap degree are multiplied to obtain a target similarity; The target similarity and a matching condition are compared to obtain the matching result, wherein the matching condition is configured based on a preset similarity threshold.
9. An object tracking apparatus, characterized by, Comprise: An acquisition module is configured to acquire historical state data corresponding to a scene object, a current predicted state, and to-be-matched data. The historical state data is used to represent a position state of a matched tracking box of the scene object recorded at a historical time. The current predicted state is used to represent a predicted position state of the tracking box at a current time. The to-be-matched data is used to represent a position state of a detected candidate box at the current time. A first calculation module is configured to determine a motion direction similarity between the tracking box and the candidate box based on the historical state data, the current predicted state, and the to-be-matched data. A second calculation module is configured to calculate an area overlap degree between the tracking box and the candidate box using the current predicted state and the to-be-matched data. A matching module is configured to perform matching analysis on the tracking box and the candidate box based on the motion direction similarity and the area overlap degree to obtain a matching result. A determination module is configured to determine the candidate box as a tracking box matched with the scene object at the current time in response to the matching result indicating that the tracking box and the candidate box are successfully matched.
10. An electronic device, comprising: A device comprises a memory and a processor. The memory stores a computer program. The processor is configured to run the computer program to perform the object tracking method of any one of claims 1 to 8.