WO2023184197A1 - Target tracking method and apparatus, system, and storage medium - Google Patents

Target tracking method and apparatus, system, and storage medium Download PDF

Info

Publication number
WO2023184197A1
WO2023184197A1 PCT/CN2022/083887 CN2022083887W WO2023184197A1 WO 2023184197 A1 WO2023184197 A1 WO 2023184197A1 CN 2022083887 W CN2022083887 W CN 2022083887W WO 2023184197 A1 WO2023184197 A1 WO 2023184197A1
Authority
WO
WIPO (PCT)
Prior art keywords
target
tracked
detected
detection
key point
Prior art date
Application number
PCT/CN2022/083887
Other languages
French (fr)
Chinese (zh)
Inventor
王杰
孔繁昊
Original Assignee
京东方科技集团股份有限公司
成都京东方智慧科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 京东方科技集团股份有限公司, 成都京东方智慧科技有限公司 filed Critical 京东方科技集团股份有限公司
Priority to CN202280000596.8A priority Critical patent/CN117178292A/en
Priority to PCT/CN2022/083887 priority patent/WO2023184197A1/en
Publication of WO2023184197A1 publication Critical patent/WO2023184197A1/en

Links

Images

Definitions

  • the present disclosure relates to the field of image processing, and in particular, to a target tracking method, device, system and storage medium.
  • tracking pedestrians can be used to determine the pedestrian's route trajectory
  • tracking key points of the pedestrian can be used to determine whether the pedestrian has fallen.
  • Related technologies usually require target detection and key point detection of the target object respectively, and tracking the target object based on the outer box image obtained by the target detection, so as to indirectly detect the key points based on the relationship between the outer box image of the target object and the key points.
  • Another related technology detects key points of the target object and generates an outer box image of the target object based on the key points, thereby tracking the target object based on the generated outer box image.
  • a target tracking method which method includes: obtaining an image to be detected at a first moment; determining the detection position of a key point of the target to be detected in the image to be detected; and obtaining the position of the key point of the target to be tracked at a second moment. ;
  • the second moment is the moment before the first moment; according to the position of the key point of the target to be tracked at the second moment, predict the predicted position of the key point of the target to be tracked at the first moment; according to the detection position and the predicted position, determine the detection
  • the method includes: performing a first target operation on each detected target and each target to be tracked, and determining a distance between each detected target and each target to be tracked;
  • the first target operation includes: according to The distance between the detected position of the key point in the i-th detection target and the predicted position of the key point of the j-th target to be tracked determines the distance between the i-th detection target and the j-th target to be tracked; where , i is a positive integer less than or equal to N; j is a positive integer less than or equal to M; the matching relationship is determined based on the distance between each detected target and each target to be tracked.
  • the method includes: performing a second target operation on each corresponding key point of the i-th detected target and the j-th target to be tracked, and determining a distance between each corresponding key point; the second target operation It includes: determining the first key point and the second key point; determining the distance between the first key point and the second key point according to the detected position of the first key point and the predicted position of the second key point; the first key point is the Any key point among the i detection targets; the second key point is the key point corresponding to the first key point in the j-th target to be tracked; determine the i-th detection target based on the distance between each corresponding key point The distance between the jth target to be tracked.
  • the distance between the i-th detected target and the j-th target to be tracked is calculated by the following formula:
  • D(i,j) represents the distance between the i-th detection target and the j-th target to be tracked
  • p ik represents the detection position of the k-th key point of the i-th detection target
  • p′ jk represents the j-th
  • d(p ik , p′ jk ) represents the distance between the k-th key point of the i-th detection target and the k-th key point of the j-th target to be tracked
  • the distance of ⁇ (v ik ,v′ jk ) represents the detection situation of the k-th key point of the i-th detection target and the k-th key point of the j-th target to be tracked.
  • the matching relationship includes at least one of the following: at least one target to be tracked matches the detected target, at least one target to be tracked does not match the detected target, and at least one detected target does not match the target to be tracked. match.
  • the method includes: determining the weight value of each target to be tracked and the weight value of each detected target; wherein the weight value of any target to be tracked is the weight value of any target to be tracked and each detected target respectively.
  • the value of the minimum distance among the distances; the weight value of each detection target is the preset weight value; perform the third target operation on each target to be tracked, and determine the detection target matching each target to be tracked;
  • the third target operation includes : Determine the first detection target with the shortest distance from the mth target to be tracked; where the sum of the weight values of the first detection target and the mth target to be tracked is greater than or equal to the sum of the weight values of the first detection target and the mth target to be tracked distance; m is a positive integer; perform the fourth target operation on the mth target to be tracked and the first detection target to determine the detection target matching the mth target to be tracked; the fourth target operation includes: determining whether there is the first target to be tracked Tracking target; the first target to be tracked is the target to be
  • the method includes: when the first influence value is less than the second influence value, performing a fourth target operation on the mth target to be tracked and the second detected target, and determining the relationship between the mth target to be tracked and the second detected target. Matching detection target; when the first influence value is greater than the second influence value, it is determined that the mth target to be tracked matches the first detection target.
  • the method further includes: when the first influence value is greater than the second influence value, performing a fourth target operation on the first target to be tracked and the third target to be detected, and determining whether they match the first target to be tracked. detection target.
  • the method further includes: when the first influence value is less than the second influence value, updating the weights of the mth target to be tracked, the first target to be tracked and the first detected target according to the first influence value. value; when the first influence value is greater than the second influence value, the weight values of the m-th target to be tracked, the first target to be tracked and the first detected target are updated according to the second influence value.
  • the method includes: increasing the weight value of the mth target to be tracked by a first influence value, increasing the weight value of the first target to be tracked by a first influence value, and reducing the weight value of the first detected target.
  • First influence value increase the weight value of the mth target to be tracked by the second influence value, increase the weight value of the first target to be tracked by the second influence value, and reduce the weight value of the first detection target by the second influence value.
  • the method includes: determining a list of targets to be tracked and a list of detected targets; wherein the list of targets to be tracked includes each target to be tracked, and the list of detected targets includes each detected target; the list of targets to be tracked and the list of detected targets The target to be tracked and the target to be detected in the target iteratively execute the fifth target operation until there is no target to be tracked in the list of targets to be tracked or there is no target to be detected in the list of detection targets, and the matching relationship is determined based on the execution result of the fifth target operation; fifth The target operation includes: determining the target distance between each target to be tracked in the current target list to be tracked and each target to be tracked in the current detected target list; determining the minimum distance among the target distances, and the second value corresponding to the minimum distance.
  • the target to be tracked and the fourth detected target The target to be tracked and the fourth detected target; the distance between the second target to be tracked and the fourth detected target is the minimum distance; the matching relationship between the second target to be tracked and the fourth detected target is determined; deleted from the current list of targets to be tracked
  • the second target to be tracked deletes the fourth detection target from the current detection target list.
  • the method includes: determining a third target to be tracked; each target to be tracked in the third target to be tracked has a matching detection target; and based on the key points of the detection target matching the third target to be tracked. Detect the position and the predicted position of the key point of the third target to be tracked, and update the position of the key point of the third target to be tracked.
  • the method includes: determining a fifth detection target; each of the fifth detection targets does not have a matching target to be tracked; and adding a fifth detection target to the targets to be tracked.
  • the method includes: determining the fourth target to be tracked and the number of mismatches for the fourth target to be tracked; there is no matching detection target for each target to be tracked in the fourth target to be tracked; the number of mismatches is The number of times that the target to be tracked has no matching detection target continuously; when the number of mismatches is greater than the preset tracking threshold, the fourth target to be tracked is deleted from the targets to be tracked.
  • the method includes: when the number of mismatches is less than or equal to a preset tracking threshold, changing the predicted position of the key point of the fourth target to be tracked or the key point of the fourth target to be tracked at the second moment The position is used as the updated position of the key point of the fourth target to be tracked.
  • the method includes: when there is a matching detection target for the fifth target to be tracked, updating the third target according to the detection position of the key point of the matching detection target and the predicted position of the key point of the fifth target to be tracked.
  • the position of the key point of the fifth target to be tracked; the fifth target to be tracked is any target among the targets to be tracked; there is no matching detection target in the fifth target to be tracked, and the number of mismatches of the fifth target to be tracked is greater than the predetermined number
  • the tracking threshold is set, the fifth target to be tracked is deleted from the targets to be tracked; the number of mismatches is the number of consecutive times that the target to be tracked does not have a matching detection target; in the case where the sixth detection target does not have a matching target to be tracked Next, a sixth detection target is added to the targets to be tracked; the sixth detection target is any target among the detection targets.
  • the method includes: when there is no matching detection target for the fifth target to be tracked, and the number of mismatches for the fifth target to be tracked is less than or equal to a preset tracking threshold, moving the fifth target to be tracked
  • the predicted position of the key point or the position of the fifth target to be tracked at the second moment is used as the updated position of the key point of the fifth target to be tracked.
  • the method includes: determining the motion state of the key points of the target to be tracked; and predicting the position and motion state of the key points of the target to be tracked at the first moment based on the position and motion state of the key points of the target to be tracked at the first moment. Predicted location.
  • the method includes: when the number of detection targets is 0, determining that there is no matching detection target for each target to be tracked.
  • the method includes: when the number of targets to be tracked is 0, determining that there is no matching target to be tracked for each detected target.
  • a target tracking device including: a processing unit and an acquisition unit.
  • the acquisition unit is configured to acquire the image to be detected at the first moment; the processing unit is configured to determine the detection position of the key point of the detection target in the image to be detected; the acquisition unit is also configured to acquire the key point of the target to be tracked at The position at the second moment; the second moment is the moment before the first moment; the processing unit is also configured to predict the position of the key point of the target to be tracked at the first moment based on the position of the key point of the target to be tracked at the second moment.
  • the processing unit is further configured to determine a matching relationship between the detected target and the target to be tracked based on the detected position and the predicted position; the matching relationship is used to match the same target in the detected target and the target to be tracked; the processing unit is also configured to Configured to track the target to be tracked based on the matching relationship.
  • the processing unit is configured to perform a first target operation on each detected target and each target to be tracked, and determine a distance between each detected target and each target to be tracked;
  • the first target operation includes : Determine the distance between the i-th detection target and the j-th target to be tracked based on the distance between the detection position of the key point in the i-th detection target and the predicted position of the key point of the j-th target to be tracked ; where i is a positive integer less than or equal to N; j is a positive integer less than or equal to M; the processing unit is also configured to determine a matching relationship based on the distance between each detected target and each target to be tracked.
  • the processing unit is configured to perform a second target operation on each corresponding key point of the i-th detected target and the j-th target to be tracked, and determine the distance between each corresponding key point;
  • second The target operation includes: determining the first key point and the second key point; determining the distance between the first key point and the second key point based on the detected position of the first key point and the predicted position of the second key point; the first key point is any key point in the i-th detection target; the second key point is the key point corresponding to the first key point in the j-th target to be tracked; the processing unit is also configured to determine the relationship between each corresponding key point The distance determines the distance between the i-th detection target and the j-th target to be tracked.
  • the distance between the i-th detected target and the j-th target to be tracked is calculated by the following formula:
  • D(i,j) represents the distance between the i-th detection target and the j-th target to be tracked
  • p ik represents the detection position of the k-th key point of the i-th detection target
  • p′ jk represents the j-th
  • d(p ik , p′ jk ) represents the distance between the k-th key point of the i-th detection target and the k-th key point of the j-th target to be tracked
  • the distance of ⁇ (v ik ,v′ jk ) represents the detection situation of the k-th key point of the i-th detection target and the k-th key point of the j-th target to be tracked.
  • the matching relationship includes at least one of the following: at least one target to be tracked matches the detected target, at least one target to be tracked does not match the detected target, and at least one detected target does not match the target to be tracked. match.
  • the processing unit is configured to determine the weight value of each target to be tracked and the weight value of each detected target; wherein the weight value of any target to be tracked is the weight value of any target to be tracked and each target respectively.
  • the value of the minimum distance among the distances of the detected targets; the weight value of each detected target is the preset weight value; perform a third target operation on each target to be tracked, and determine the detection target that matches each target to be tracked; the third target
  • the operation includes: determining the first detected target with the shortest distance from the mth target to be tracked; wherein the sum of the weight values of the first detected target and the mth target to be tracked is greater than or equal to the first detected target and the mth target to be tracked The distance of the target; m is a positive integer; perform the fourth target operation on the mth target to be tracked and the first detection target to determine the detection target matching the mth target to be tracked; the fourth target operation includes: determining whether there is the A target to be tracked; the first target to be tracked is a
  • the processing unit is configured to perform a fourth target operation on the mth target to be tracked and the second detected target, and determine the relationship between the mth target to be tracked and the second detected target when the first influence value is less than the second influence value.
  • the tracking target matches the detection target; when the first influence value is greater than the second influence value, it is determined that the mth target to be tracked matches the first detection target.
  • the processing unit is configured to perform a fourth target operation on the first target to be tracked and the third target to be detected, and determine the relationship between the first target to be tracked and the first target to be tracked when the first influence value is greater than the second influence value. Matching detection targets.
  • the processing unit is configured to update the mth target to be tracked, the first target to be tracked, and the first detected target according to the first influence value when the first influence value is less than the second influence value.
  • Weight value when the first influence value is greater than the second influence value, the weight values of the mth target to be tracked, the first target to be tracked and the first detected target are updated according to the second influence value.
  • the processing unit is configured to increase the weight value of the mth target to be tracked by the first influence value, increase the weight value of the first target to be tracked by the first influence value, and increase the weight value of the first detected target by the first influence value.
  • the value decreases the first influence value;
  • the processing unit is further configured to increase the weight value of the mth target to be tracked by the second influence value, increase the weight value of the first target to be tracked by the second influence value, and increase the weight value of the first detection target by the second influence value.
  • the weight value reduces the second influence value.
  • the processing unit is configured to determine a list of targets to be tracked and a list of detected targets; wherein the list of targets to be tracked includes each target to be tracked, and the list of detected targets includes each detected target; the list of targets to be tracked and the list of detected targets are The target to be tracked and the detection target in the target list iteratively perform the fifth target operation until there is no target to be tracked in the target list to be tracked or there is no detection target in the detection target list, and the matching relationship is determined based on the execution result of the fifth target operation;
  • the fifth target operation includes: determining the target distance between each target to be tracked in the current target list to be tracked and each target to be tracked in the current detected target list; determining the minimum distance in the target distance, and the minimum distance corresponding to The second target to be tracked and the fourth target to be detected; the distance between the second target to be tracked and the fourth target to be detected is the minimum distance; the matching relationship between the second target to be tracked and the fourth target to be detected is determined; from the current list of targets to be tracked
  • the processing unit is configured to determine a third target to be tracked; each of the third targets to be tracked has a matching detection target; the processing unit is further configured to determine the third target to be tracked according to The target matches the detected position of the key point of the detected target and the predicted position of the key point of the third target to be tracked, and updates the position of the key point of the third target to be tracked.
  • the processing unit is configured to determine a fifth detection target; each detection target in the fifth detection target does not have a matching target to be tracked; the processing unit is further configured to add a third target to the target to be tracked. Five detection targets.
  • the processing unit is configured to determine the fourth target to be tracked and the number of mismatches of the fourth target to be tracked; there is no matching detection target for each target to be tracked in the fourth target to be tracked; no matching The number of times is the number of consecutive times that the target to be tracked does not have a matching detection target; the processing unit is also configured to delete the fourth target to be tracked from the targets to be tracked when the number of mismatches is greater than the preset tracking threshold.
  • the processing unit is configured to, when the number of mismatches is less than or equal to a preset tracking threshold, change the predicted position of the key point of the fourth target to be tracked or the key point of the fourth target to be tracked in the first The position at the second moment is used as the updated position of the key point of the fourth target to be tracked.
  • the processing unit is configured to, in the case where a matching detection target exists in the fifth target to be tracked, based on the detection position of the key point of the matching detection target and the predicted position of the key point of the fifth target to be tracked. Update the position of the key point of the fifth target to be tracked; the fifth target to be tracked is any target among the targets to be tracked; the processing unit is also configured to have no matching detection target in the fifth target to be tracked, and the fifth target to be tracked is any one of the targets to be tracked; When the number of mismatches of the target to be tracked is greater than the preset tracking threshold, the fifth target to be tracked is deleted from the targets to be tracked; the number of mismatches is the number of consecutive times that the target to be tracked does not have a matching detection target; the processing unit is also It is configured to add a sixth detection target to the targets to be tracked when the sixth detection target does not have a matching target to be tracked; the sixth detection target is any target among the detection targets.
  • the processing unit is configured to, when the fifth target to be tracked does not have a matching detection target and the number of mismatches of the fifth target to be tracked is less than or equal to a preset tracking threshold, The predicted position of the key point of the tracking target or the position of the fifth target to be tracked at the second moment is used as the updated position of the key point of the fifth target to be tracked.
  • the processing unit is configured to determine the motion state of the key points of the target to be tracked; the processing unit is also configured to predict the position and motion state of the key points of the target to be tracked at the second moment. The predicted position of the key point of the target at the first moment.
  • the processing unit is configured to determine that there is no matching detection target for each target to be tracked when the number of detection targets is 0.
  • the processing unit is configured to determine that there is no matching target to be tracked for each detected target when the number of targets to be tracked is 0.
  • a non-transitory computer-readable storage medium stores computer program instructions.
  • the computer program instructions When the computer program instructions are run on a computer (for example, a target tracking device), they cause the computer to execute the target tracking method as described in any of the above embodiments.
  • a computer program product includes computer program instructions.
  • the computer program instructions When the computer program instructions are executed on a computer (eg, a target tracking device), the computer program instructions cause the computer to perform the target tracking method as described in any of the above embodiments.
  • a computer program is provided.
  • the computer program When the computer program is executed on a computer (eg, a target tracking device), the computer program causes the computer to perform the target tracking method as described in any of the above embodiments.
  • a target tracking device in another aspect, includes: a processor and a memory; the memory is used to store computer programs or instructions, and the processor is used to run the computer programs or instructions to achieve the goals described in any of the above embodiments. Tracking methods.
  • a chip in another aspect, includes a processor and a communication interface.
  • the communication interface is coupled to the processor.
  • the processor is used to run computer programs or instructions to implement the target tracking method as described in any of the above embodiments.
  • the chip provided in the present disclosure also includes a memory for storing computer programs or instructions.
  • the above computer instructions may be stored in whole or in part on a computer-readable storage medium.
  • the computer-readable storage medium may be packaged together with the processor of the device, or may be packaged separately from the processor of the device, which is not limited in this disclosure.
  • a target tracking system including: a target tracking device and an image acquisition device, wherein the image acquisition device is used to collect images to be detected, and the target tracking device is used to perform target tracking as described in any of the above embodiments. method.
  • the name of the above-mentioned target tracking device does not limit the device or functional module itself. In actual implementation, these devices or functional modules may appear under other names. As long as the functions of each device or functional module are similar to the present disclosure, they fall within the scope of the claims of the present disclosure and its equivalent technology.
  • Figure 1 is an architectural diagram of a target tracking system 10 provided according to some embodiments.
  • Figure 2 is a relationship diagram between goals and key points provided according to some embodiments.
  • Figure 3 is a flow chart of a target tracking method provided according to some embodiments.
  • Figure 4 is a matching relationship diagram between a detected target and a target to be tracked according to some embodiments
  • Figure 5 is a flow chart of another target tracking method provided according to some embodiments.
  • Figure 6 is a scene diagram of target tracking provided according to some embodiments.
  • Figure 7 is a schematic diagram of target tracking in related technology
  • Figure 8 is a schematic diagram of a target tracking provided according to some embodiments of the present disclosure.
  • Figure 9 is a flow chart of another target tracking method provided according to some embodiments.
  • FIG. 10 is a flowchart of a third target operation provided in accordance with some embodiments.
  • FIG. 11 is a flowchart of a fourth target operation provided in accordance with some embodiments.
  • Figure 12 is a flow chart of another target tracking method provided according to some embodiments.
  • Figure 13 is a flowchart of a fifth target operation provided in accordance with some embodiments.
  • Figure 14 is a flow chart of another target tracking method provided according to some embodiments.
  • Figure 15 is a relationship diagram between a target to be tracked and key points of corresponding matching detected targets provided according to some embodiments
  • Figure 16 is a flow chart of another target tracking method provided according to some embodiments.
  • Figure 17 is a structural diagram of a target tracking device provided according to some embodiments.
  • Figure 18 is a structural diagram of another target tracking device provided according to some embodiments.
  • first and second are used for descriptive purposes only and cannot be understood as indicating or implying relative importance or implicitly indicating the quantity of indicated technical features. Therefore, features defined as “first” and “second” may explicitly or implicitly include one or more of these features. In the description of the embodiments of the present disclosure, unless otherwise specified, "plurality" means two or more.
  • At least one of A, B and C has the same meaning as “at least one of A, B or C” and includes the following combinations of A, B and C: A only, B only, C only, A and B The combination of A and C, the combination of B and C, and the combination of A, B and C.
  • a and/or B includes the following three combinations: A only, B only, and a combination of A and B.
  • the term “if” is optionally interpreted to mean “when” or “in response to” or “in response to determining” or “in response to detecting,” depending on the context.
  • the phrase “if it is determined" or “if [stated condition or event] is detected” is optionally interpreted to mean “when it is determined" or “in response to the determination" or “on detection of [stated condition or event]” or “in response to detection of [stated condition or event]”.
  • Key point detection is used to detect specific nodes corresponding to the target, and can be used for behavior recognition, posture analysis, etc.
  • key point detection algorithms include top-down detection methods and bottom-up detection methods.
  • the top-down detection method is to detect targets in images and perform key point detection based on the detected targets.
  • top-down detection methods include the HRNet algorithm (Deep High-Resolution Representation Learning for Human Pose Estimation).
  • the bottom-up detection method is to detect all key points from the image, and then cluster according to the position of each key point to obtain the target corresponding to the associated key point.
  • bottom-up detection methods include the OpenPose algorithm (Realtime Multi-Person 2D Pose Estimation using Part Affinity Fields).
  • the Hungarian algorithm is used to determine the matching relationship between elements in two sets, that is, to perform data association on the elements in the two sets to obtain matching results with as many combinations as possible.
  • the KM algorithm uses the correlation degree of the elements in the two sets as weights to perform data correlation on the elements in the two sets, thereby obtaining a matching result with the optimal matching degree.
  • intersection over union refers to the ratio of the intersection area of two image areas to the union area of the two image areas.
  • IoU is usually used to detect the relationship between two image areas. For example, by calculating the IoU of the detection target in different frame images of the video data stream, the detection target is tracked.
  • tracking pedestrians can be used to determine the pedestrian's route trajectory
  • tracking key points of the pedestrian can be used to determine whether the pedestrian has fallen.
  • the present disclosure provides a target tracking method that matches the target to be tracked and the detected target according to the detected position of the key point of the detected target and the predicted position of the key point of the target to be tracked, and updates the target to be tracked according to the matching relationship and the key points of the target to be tracked. Therefore, the present disclosure can directly track targets based on key points, improve the stability of target tracking, and at the same time reduce computational overhead, thereby reducing computational costs.
  • FIG 1 is an architectural diagram of a target tracking system 10 according to some embodiments.
  • the target tracking system 10 includes: a target tracking device 101 and an image acquisition device 102.
  • the target tracking device 101 and the image acquisition device 102 are connected through a communication link.
  • the communication link may be a wired communication link or a wireless communication link, which is not limited by this disclosure.
  • target tracking device 101 and the image acquisition device 102 in this disclosure may be one or multiple. For ease of understanding, only one target tracking device 101 and image acquisition device 102 are shown in FIG. 1 .
  • the image acquisition device 102 is configured to acquire an image to be detected of the target area and send the image to be detected to the target tracking device 101 .
  • the target tracking device 101 receives the image to be detected sent by the image acquisition device 102.
  • the image acquisition device 102 can acquire an image to be detected of the target area in real time, and send the image to be detected to the target tracking device 101 .
  • the image acquisition device 102 can also acquire the image to be detected of the target area at a preset frequency, and send the video stream data including the image to be detected to the target tracking device 101 .
  • the image acquisition device 102 in the embodiment of the present disclosure is a device that converts image data into analog signals or digital signals through a photoreceptor, and can be deployed on land, including indoors or outdoors, handheld or vehicle-mounted. It can also be deployed on water (such as ships, etc.). It can also be deployed in the air (such as on airplanes, balloons, satellites, etc.).
  • the image capture device 102 includes a camera, a video camera, and a still camera.
  • the image acquisition device 102 may also be a device with a camera function.
  • the image acquisition device 102 may be a mobile phone, a tablet computer, a notebook computer, a handheld computer, or a wearable device (such as a smart watch, a smart bracelet, or a pedometer) with a camera function. machines, etc.), vehicle-mounted equipment and flight equipment (such as intelligent robots, hot air balloons, drones, airplanes), etc.
  • a wearable device such as a smart watch, a smart bracelet, or a pedometer
  • vehicle-mounted equipment and flight equipment such as intelligent robots, hot air balloons, drones, airplanes
  • the image acquisition device 102 in the embodiment of the present disclosure may also be an infrared imager or a night vision device, used to acquire image data in dark areas.
  • the target tracking device 101 is configured to obtain an image to be detected at the first moment, and determine the detection position of a key point of the detection target based on the image to be detected.
  • the target tracking device 101 is further configured to determine the predicted position of the key point of the target to be tracked at the first moment, and to track the target to be tracked and the key points of the target to be tracked based on the detected position and the predicted position.
  • the detection target is a target detected by the target tracking device 101 from the image to be detected, and the target to be tracked is a target tracked by the target tracking device 101 .
  • Key points are nodes at specific parts corresponding to the target (detection target and/or target to be tracked).
  • the targets in this disclosure may be physical substances that exist objectively in nature, such as people, animals, plants, vehicles, commodities, etc.
  • Figure 2 is a relationship diagram between targets and key points provided according to some embodiments.
  • the target 201 may be a detection target or a target to be tracked in this disclosure
  • the solid point 202 is the key point corresponding to the target 102 .
  • the number and location of key points can be set according to actual conditions, and this disclosure does not limit this.
  • the number of detected targets and targets to be tracked at the first moment may be 0, or may be one or more.
  • the number of targets to be tracked at this time is 0.
  • the number of detection targets is 0.
  • the number of detection targets is one or more.
  • the position of the key point in this disclosure may be the relative position of the key point in the image to be detected relative to the image to be detected, or it may be the actual position determined based on the relative position of the image to be detected and the area corresponding to the image to be detected.
  • the target tracking device 101 in the present disclosure can perform the operation of tracking the target in real time, that is, continuously acquiring the image to be detected at the current moment, and tracking the target to be tracked.
  • the target tracking device 101 can also perform non-real-time tracking of the target, that is, track the target to be tracked based on the image data stream in the past period of time.
  • the target tracking device 101 in the embodiment of the present disclosure may be a server, including:
  • the processor can be a general central processing unit (CPU), a microprocessor, an application-specific integrated circuit (ASIC), or one or more programs for controlling the disclosed solution implemented integrated circuit.
  • CPU central processing unit
  • ASIC application-specific integrated circuit
  • Transceiver can be any device such as a transceiver used to communicate with other devices or communication networks, such as Ethernet, radio access network (RAN), wireless local area networks, WLAN) etc.
  • RAN radio access network
  • WLAN wireless local area networks
  • memory can be read-only memory (ROM) or other types of static storage devices that can store static information and instructions, random access memory (random access memory, RAM) or other types that can store information and instructions.
  • Type of dynamic storage device it can also be electrically erasable programmable read-only memory (EEPROM), compact disc read-only memory (CD-ROM) or other optical disk storage, optical disc Storage (including compact discs, laser discs, optical discs, digital versatile discs, Blu-ray discs, etc.), magnetic disk storage media or other magnetic storage devices, or can be used to carry or store desired program code in the form of instructions or data structures and can be used by Any other media accessible by a computer, but not limited to this.
  • the memory can exist independently and be connected to the processor through communication lines. Memory can also be integrated with the processor.
  • the target tracking device 101 can also be an application program installed on the server that provides a target tracking function, or the target tracking device 101 can be a central processing unit in the server, or the target tracking device 101 can be configured to execute in the server. Control module of target tracking method.
  • the target tracking device 101 may also be coupled to the image acquisition device 102 as the same device.
  • Figure 3 is a flow chart of a target tracking method provided according to some embodiments. As shown in Figure 3, the method includes the following steps:
  • Step 301 The target tracking device acquires the image to be detected at the first moment.
  • the image to be detected is an image collected for the target area.
  • the target area can be an airport waiting area, a road, a scenic spot, a building stair passage, etc.
  • the first time may be the current time when the target tracking device obtains the image to be detected.
  • the target tracking device can acquire the image to be detected from the image acquisition device in real time, and use the current moment as the first moment.
  • the first moment may be the acquisition moment of the image to be detected.
  • the collection time is the time when the image collection device collects the image to be detected.
  • the target tracking device may obtain video stream data including the image to be detected from the image acquisition device at a preset frequency, and use the acquisition time of the image frame of the image to be detected as the first time. .
  • Step 302 The target tracking device determines the detection position of the key point of the detection target in the image to be detected.
  • the number of detection targets can be 0, or one or more.
  • the detection position of the key point of the detection target may be the relative position of the key point in the image to be detected relative to the image to be detected, or it may be the actual position determined based on the relative position of the image to be detected and the area corresponding to the image to be detected.
  • the target tracking device may determine the identification of key points of the detected target based on the location of the detected target. That is to say, the identification of key points of the same part in each detection target in this disclosure is the same. Therefore, the target tracking device can determine the corresponding relationship between the key points of different targets based on the identification.
  • the number of key points in this disclosure can be set according to actual conditions.
  • the target tracking device determines the position information of the key points of the detected target, some key points may not be detected due to factors such as occlusion.
  • the target tracking device can set the position information of the undetected key points as preset values. Set the position value (for example (-1, -1)). This preset position value is used to indicate that the key point has not been detected.
  • the target tracking device inputs the image to be detected into the key point detection model to obtain the key point detection result.
  • the key point detection results include the detection target and the key points corresponding to the detection target.
  • the key point detection result may be a data vector with a data size of N*K*A.
  • N represents the number of detection targets
  • K represents the number of key points
  • A represents the location information of the key points.
  • the position information can be expressed as (x, y).
  • the target tracking device may set the location information of the undetected key points to (-1, -1).
  • the key point detection model can be a top-down key point detection model, such as the HRnet model, and the key point detection model can also be a bottom-up key point detection model, such as the OpenPose model.
  • Step 303 The target tracking device obtains the position of the key point of the target to be tracked at the second moment.
  • the second moment is the moment before the first moment.
  • the target to be tracked is the target that needs to be tracked in this disclosure.
  • Each target to be tracked has a unique identifier.
  • the number of targets to be tracked can be 0, one or more.
  • the target tracking device in the present disclosure can perform a target tracking operation at the second moment, thereby obtaining the position of the key point of the target to be tracked at the second moment.
  • the target tracking method in the present disclosure not only needs to identify the target to be tracked and the key points of the target to be tracked, but also needs to determine the target to be tracked and the detected target and the target to be tracked in continuous images (that is, multiple images collected continuously). The relationship between the tracking target and the key points of the detection target is achieved, thereby achieving the effect of tracking the target to be tracked.
  • the target tracking device uses the detection target determined at the initial time as the target to be tracked. Please refer to the subsequent description for specific content and will not be repeated here.
  • Step 304 The target tracking device predicts the predicted position of the key point of the target to be tracked at the first time based on the position of the key point of the target to be tracked at the second time.
  • the target tracking device can determine the motion state of key points of the target to be tracked.
  • the target tracking device can predict the predicted position of the key point of the target to be tracked at the first time based on the position and motion state of the key point of the target to be tracked at the second time.
  • the motion state may include the velocity of the key point, or the motion state may include the velocity and acceleration of the key point, or the motion state may include the velocity and direction of the key point.
  • the target tracking device may perform a target tracking operation at the second moment to determine the motion state of the key point of the target to be tracked.
  • a target tracking operation at the second moment to determine the motion state of the key point of the target to be tracked.
  • the target tracking device can set the predicted position of an undetected key point in the target to be detected as a preset position value, thereby indicating that the key point has not been detected.
  • Step 305 The target tracking device determines the matching relationship between the detected target and the target to be tracked based on the detected position and the predicted position.
  • the matching relationship is used to match the same target among the detected target and the target to be tracked.
  • the targets to be tracked include target A and target B.
  • the detection targets include target C, target D and target E.
  • target A and target C are the same target, which means that target A and target C match. If target B and target D are not the same target, it means that target B and target D do not match.
  • the detection position of the key point of the target to be detected can represent the detection position state of the corresponding target to be detected at the first moment.
  • the predicted position of the key point of the target to be tracked can represent the predicted position state of the target to be tracked at the first moment. Therefore, the target tracking device can determine the matching relationship between the detected target and the target to be tracked based on the detected position state and the predicted position state of the key point.
  • the matching relationship includes at least one of the following: at least one target to be tracked matches the target to be tracked, at least one target to be tracked does not match the target to be tracked, and at least one target to be tracked does not match the target to be tracked.
  • FIG. 4 is a matching relationship diagram between a detected target and a target to be tracked according to some embodiments.
  • the target 4011 to be tracked matches the detection target 4021
  • the target 4013 to be tracked matches the detection target 4022
  • the target 4014 to be tracked matches the detection target 4023
  • the target 4012 to be tracked does not match any of the detection targets.
  • Matching, the target to be tracked 4015 does not match any of the detected targets, and the detected target 4024 does not match any of the targets to be tracked.
  • Step 306 The target tracking device tracks the target to be tracked according to the matching relationship.
  • the target tracking device can update the target identifier and the location of the key point of the target to be tracked at the first moment.
  • the target tracking device may determine that the key point of the target to be tracked is at the first location based on the predicted position of the key point of the target to be tracked and the detection position of the key point of the corresponding matching detection target. moment position.
  • the target tracking device can add the detected target to the target to be tracked.
  • the target tracking device can determine that there is no matching target to be tracked for each detected target. Therefore, the target tracking device can add each of the detected targets to the targets to be tracked.
  • the target tracking device when the first moment is the initial moment, sets the updated motion state of the key points of the target to be tracked as the initial motion state.
  • the speed and acceleration of the initial motion state can be 0.
  • the target tracking device may determine whether to delete the target from the targets to be tracked based on whether the matching situation of the target within a certain period of time satisfies the first preset condition.
  • the first preset condition may be that the number of mismatches is less than or equal to the preset tracking threshold.
  • the number of mismatches is the number of consecutive times that the target to be tracked does not have a matching detection target.
  • the target tracking device determines that there is no matching detection target for each target to be tracked.
  • the target tracking device can be based on the predicted position of the key point of the target to be tracked 4011 and the detected target 4021.
  • the detection position of the key point determines the position of the key point of the target 4011 to be tracked at the first moment.
  • the target tracking device determines the position of the key point of the target 4013 to be tracked at the first moment based on the predicted position of the key point of the target 4013 to be tracked and the detected position of the key point of the detection target 4022 .
  • the target tracking device determines the position of the key point of the target 4014 to be tracked at the first moment based on the predicted position of the key point of the target 4014 to be tracked and the detected position of the key point of the detection target 4023 .
  • the target tracking device determines that the matching situation of the target to be tracked 4012 satisfies the first preset condition, and retains the target to be tracked 4012. The target tracking device determines that the matching situation of the target to be tracked 4015 does not meet the first preset condition, that is, the number of unmatched times is greater than the preset tracking threshold, and deletes the target to be tracked 4012.
  • the target tracking device adds the detected target 4024 to the targets to be tracked.
  • the target tracking device can also send an updated tracking sequence of the target to be tracked to the target device, so that the target device performs relevant identification detection based on the tracking sequence.
  • the tracking sequence includes the target to be tracked and the key point information of the target to be tracked. For example, the identification of the target to be tracked and the locations of key points of the target to be tracked at different times.
  • the target device can perform passerby action detection, workshop machine status detection and other related solutions based on the tracking sequence.
  • the target tracking device may determine the motion state of the key points of the target to be tracked based on the position of the key points of the target to be tracked at the first time and the position at the second time.
  • the target tracking device in the present disclosure can determine the detection position of the key point of the detection target based on the image to be detected at the first time, and predict the tracking target based on the position of the key point of the target to be tracked at the second time. The predicted position of the key point at the first moment.
  • the target tracking device can determine the matching relationship between the detection target and the target to be tracked based on the detection position of the key point of the target to be detected and the predicted position of the key point of the target to be tracked, and update the target to be tracked and the target to be tracked based on the matching relationship. Track the location of key points of the target to achieve target tracking.
  • the target tracking device in the present disclosure can match the detected target and the target to be tracked based on the location information of the key points of the target, and then update the target to be tracked and the key points of the target to be tracked, so that the target to be tracked at different times and The key points of the target to be tracked are related to each other.
  • the technical solution in this disclosure first predicts the position of the key point of the target to be tracked at the first moment, and then based on the predicted position and The detection position of the key points of the target is detected for target tracking, which is not affected by changes in the outer frame image, improving the stability and accuracy of target tracking.
  • the technical solution in this disclosure directly tracks the target based on key points, without the need for additional detection of the target, and has low computational overhead, reducing the computational cost.
  • steps 301 to 302 and steps 303 to 304 in the above embodiment are independent of each other.
  • Steps 301 to 302 may be executed before steps 303 to 304, or may be executed after steps 303 to 304, or may be executed in parallel with steps 303 to 304.
  • the target tracking algorithm provided by the present disclosure is only explained by taking step 301 to step 302 before step 303 to step 304 as an example. This disclosure does not limit the execution order of the above steps.
  • step 305 can also be implemented through the following steps 501 to 502.
  • Step 501 The target tracking device performs a first target operation on each detected target and each target to be tracked, and determines the distance between each detected target and each target to be tracked.
  • the number of detection targets is N
  • the number of targets to be tracked is M
  • M and N are positive integers.
  • the first target operation includes:
  • Step 5011 The target tracking device determines the i-th detected target and the j-th target to be tracked based on the distance between the detected position of the key point in the i-th detected target and the predicted position of the key point of the j-th target to be tracked. The distance between targets.
  • the process of the target tracking device determining the distance between the i-th detection target and the j-th target to be tracked can be implemented through the following steps 501a-step 501b:
  • Step 501a The target tracking device may perform a second target operation on each corresponding key point of the i-th detected target and the j-th target to be tracked, and determine the distance between each corresponding key point.
  • the identification of the corresponding key points of the i-th detection target and the j-th target to be tracked is the same.
  • the second target operation includes the following steps 5012 to 5013:
  • Step 5012 The target tracking device determines the first key point and the second key point.
  • the first key point is any key point in the i-th detection target.
  • the second key point is the key point corresponding to the first key point in the j-th target to be tracked.
  • Step 5013 The target tracking device determines the distance between the first key point and the second key point based on the detected position of the first key point and the predicted position of the second key point.
  • the distance between the first key point and the second key point is calculated by the following formula 1:
  • p is the first key point
  • p′ is the second key point
  • d(p, p′) represents the distance between the first key point and the second key point
  • x and y are the position coordinates of the first key point
  • x′, y′ are the position coordinates of the second key point.
  • the target tracking device can set the distance between the undetected key points to a preset distance value.
  • the preset distance value is used to indicate that at least one key point among the two corresponding key points has not been detected.
  • the preset distance value may be -1.
  • Step 501b The target tracking device determines the distance between the i-th detection target and the j-th target to be tracked based on the distance between each corresponding key point.
  • the distance between the i-th detection target and the j-th target to be tracked is calculated by the following formula 2:
  • D(i,j) represents the distance between the i-th detection target and the j-th target to be tracked
  • p ik represents the detection position of the k-th key point of the i-th detection target
  • p′ jk represents the j-th
  • d(p ik , p′ jk ) represents the distance between the k-th key point of the i-th detection target and the k-th key point of the j-th target to be tracked
  • the distance of , ⁇ (v ik ,v′ jk ) represents the detection situation of the k-th key point of the i-th detection target and the k-th key point of the j-th target to be tracked.
  • s can represent either the size information of the i-th detected target or the size information of the j-th target to be tracked, or it can also be composed of the size information of the i-th detected target and the j-th target to be tracked.
  • the size information is determined. For example, s is the average value of the size information of the i-th detected target and the j-th size information to be tracked.
  • the size information can be expressed by the image area of the target, the positive square root of the image area of the target, or the number of pixels occupied by the target.
  • ⁇ (v ik ,v′ The value of jk ) can be 0.
  • the value of ⁇ (v ik ,v′ jk ) can be 1.
  • Step 502 The target tracking device determines a matching relationship based on the distance between each detected target and each target to be tracked.
  • the target tracking device can determine the matching relationship between the target to be tracked and the detected target from an overall perspective based on the distance between each detected target and each target to be tracked.
  • the target tracking device can also determine the matching relationship between the target to be tracked and the detection target from the perspective of the individual target to be tracked based on the distance between any target to be tracked and each detected target.
  • the target tracking device can determine whether each target to be tracked matches the detection target based on a preset matching algorithm and the distance between each detection target and each target to be tracked.
  • the preset matching algorithm may be the KM algorithm.
  • the target tracking device can also determine whether the distance between the detection target and the target to be tracked satisfies the second preset condition. When the distance between the detected target and the target to be tracked does not meet the second preset condition, it is determined that the detected target and the target to be tracked do not match.
  • the target tracking device can further filter the matching targets to be tracked and the detection targets, and exclude the targets to be tracked and the detection targets that do not actually match, thereby improving the accuracy of target tracking.
  • the second preset condition may be that the distance between the detection target and the target to be tracked is less than or equal to the target distance threshold.
  • the target distance threshold is 3.5
  • the targets to be tracked include A1, A2, A3, and A4
  • the detected targets include B1, B2, B3, and B4.
  • A1 matches B1, and the distance between A1 and B1 is 3.
  • A2 matches B2, and the distance between A2 and B2 is 4.
  • A3 matches B4, and the distance between A3 and B4 is 3.
  • A4 matches B3, and the distance between A4 and B3 is 2.
  • the distance between A2 and B2 does not meet the second preset condition. Therefore, the target tracking device determines that A2 and B2 do not match.
  • Figure 6 is a scene diagram of target tracking provided according to some embodiments. For ease of understanding, only one target is shown in FIG. 6 , and the technical solutions in this disclosure are applicable to target tracking scenarios of one or more targets.
  • Target 601 is in jumping motion. At the second moment, the target 601 in the image a to be detected is in a preparatory action. At the first moment, the target 601 in the image b to be detected is in the process of jumping.
  • Figure 7 is a schematic diagram of a target tracking in the related art.
  • the outer frame image 701 of the target 601 at the second time is determined based on the image a to be detected at the second time in Figure 6, and the target is determined based on the image b to be detected at the first time in Figure 6 601
  • the outer box image 702 at the first moment. Calculate the IoU of the outer box image 701 and the outer box image 702, and determine whether the targets corresponding to the two outer box images are the same target based on the IoU.
  • the jumping action of the target 601 causes large changes in the position and size of the outer frame image, it is difficult to accurately track the target 601 in the related technology.
  • Figure 8 is a schematic diagram of a target tracking provided according to some embodiments of the present disclosure.
  • the target tracking device in the present disclosure predicts the predicted position of the key point of the target 601 at the first time based on the position of the key point of the target 601 determined at the second time in Figure 6 (i.e., the hollow in Figure 8 point), and determine the detection position of the key point of the target 601 (ie, the solid point in Figure 8) based on the image b to be detected at the first moment in Figure 6.
  • the target tracking device can determine the matching relationship of the target based on the detected position and the predicted position.
  • the target tracking method in the present disclosure can still be based on other key points
  • the location information is used to track the target, which will not have too much impact on the target tracking of the disclosure.
  • the technical solution in the present disclosure is not affected by changes in the outer frame image, and improves the stability and accuracy of target tracking.
  • the technical solution in this disclosure directly tracks the target based on key points, without the need for additional detection of the target, and has low computational overhead, reducing the computational cost.
  • Figure 6 only takes a single target as an example to illustrate the differences between the tracking principles in this disclosure and those in related technologies.
  • the technical solutions in this disclosure are also applicable to multi-target tracking.
  • the scene in Figure 6 does not limit the solution of the present disclosure.
  • the following describes the process by which the target tracking device determines the matching relationship based on the distance between each detected target and each target to be tracked.
  • step 502 can also be implemented through the following steps.
  • Step 901 The target tracking device determines the weight value of each target to be tracked and the weight value of each detected target.
  • the weight value of any target to be tracked is the value of the minimum distance between any target to be tracked and each detected target.
  • the weight value of each detection target is a preset weight value.
  • weight value of the target to be tracked is used to represent the expected value of the distance of the target to be tracked
  • weight value of the detection target is used to represent the expected value of the distance of the detection target
  • the default weight value is 0, which can be set according to the actual situation, and this disclosure does not limit this.
  • Step 902 The target tracking device performs a third target operation on each target to be tracked, and determines a detection target matching each target to be tracked.
  • the third target operation includes the following steps 1001-1002.
  • Step 1001 The target tracking device determines the first detected target with the shortest distance from the mth target to be tracked.
  • the sum of the weight values of the first detection target and the m-th target to be tracked is greater than or equal to the distance between the first detection target and the m-th target to be tracked.
  • m is a positive integer.
  • the target tracking device selects any one of the detection targets.
  • the weight value of target A to be tracked is 4, the weight value of target B to be detected is -1, and the distance between target A to be tracked and target B to be detected is 2. Since the sum of the weight values of target A to be tracked and target B to be detected is 3, it is greater than the distance 2 between target A to be tracked and target B to be detected. Therefore, the distance meets the distance requirements between the target A to be tracked and the target B to be detected, that is, the target A to be tracked and the target B to be detected meet the matching conditions in distance. Afterwards, the target tracking device needs to further determine whether the distance is the smallest among the distances that meet the matching conditions, and perform subsequent operations.
  • the target tracking device uses the second detection target as the first detection target, and updates the weight value of the mth target to be tracked.
  • the difference between the distance and the sum of weight values between the second detected target and the m-th target to be tracked is the smallest.
  • the target tracking device may select any one of the second detection targets as the first detection target. Since there is no detection target whose weight value sum to the mth target to be tracked is greater than or equal to the distance, that is, each detection target and the mth target to be tracked do not meet the matching condition in distance, therefore, the The m target to be tracked needs to reduce its expected distance value in order to match the detection target for the m target to be tracked. In order to ensure that the target to be tracked achieves optimal matching as a whole, the target tracking device uses the second detection target as the first detection target and updates the weight value of the mth target to be tracked.
  • the target tracking device updates the weight value of the mth target to be tracked in the following manner: the target tracking device increases the weight value of the mth target to be tracked by the distance and weight between the second detected target and the mth target to be tracked. The difference between the sum of values.
  • Step 1002 The target tracking device performs a fourth target operation on the mth target to be tracked and the first detection target, and determines the detection target matching the mth target to be tracked.
  • the fourth target operation includes the following steps 1101-1104.
  • Step 1101 The target tracking device determines whether there is a first target to be tracked.
  • the first target to be tracked is a target to be tracked that matches the first detected target and is determined according to the third target operation.
  • the target tracking device can perform step 1102.
  • Step 1102 The target tracking device determines that the mth target to be tracked matches the first detected target.
  • the target tracking device When there is a first target to be tracked, it means that the optimal matching between the mth target to be tracked and the first target to be tracked is the first detection target. That is to say, the target tracking device needs to re-determine the mth target to be tracked.
  • the matching relationship between the tracking target and one of the first targets to be tracked and the detection targets other than the first detection target is such that the matching relationship between the target to be tracked and the detection target achieves optimal matching as a whole. Therefore, the target tracking device can perform step 1103.
  • Step 1103 The target tracking device determines the first influence value of the mth target to be tracked and the second influence value of the first target to be tracked.
  • the first influence value is the difference determined based on the mth target to be tracked and the second detected target.
  • the difference is the difference between the distance between a target to be tracked and a detected target and the sum of the weights of a target to be tracked and a detected target.
  • the second detection target is the detection target that has the smallest difference from the mth target to be tracked, except the first detection target.
  • the second influence value is the difference determined based on the first target to be tracked and the third detected target.
  • the third detection target is the detection target that has the smallest difference from the first target to be tracked except the first detection target.
  • the first influence value is used to characterize the minimum degree of influence of the target tracking device in re-determining the detection target that matches the m-th target to be tracked; the second influence value is used to characterize the target tracking device in re-determining the detection target that matches the first target to be tracked. Minimum impact on detection target.
  • the target tracking device selects any one of the detection targets as the second detection target. In the case where the difference between the sum of distances and weight values between multiple detection targets and the first target to be tracked is the smallest, the target tracking device selects any one of the detection targets as the third detection target.
  • Step 1104 The target tracking device determines the detection target matching the mth target to be tracked based on the first influence value and the second influence value.
  • the target tracking device performs step 1105.
  • Step 1105 The target tracking device performs a fourth target operation on the mth target to be tracked and the second detection target, and determines the detection target matching the mth target to be tracked.
  • the target tracking device can re-determine the detection target that matches the mth target to be tracked.
  • the target tracking device can also update the weight values of the mth target to be tracked, the first target to be tracked, and the first detected target according to the first influence value.
  • the target tracking device increases the weight value of the mth target to be tracked by the first influence value, increases the weight value of the first target to be tracked by the first influence value, and reduces the weight value of the first detected target by the first influence value. value.
  • the target tracking device performs step 1106.
  • Step 1106 The target tracking device determines that the mth target to be tracked matches the first detected target.
  • the target tracking device may also perform a fourth target operation on the first target to be tracked and the third target to be detected, and determine the detection target that matches the first target to be tracked.
  • the target tracking device re-determines the matching relationship between the m-th target to be tracked and the second detected target, which has a greater impact on the overall matching relationship than re-determining the first
  • the matching relationship between the target to be tracked and the second detected target has a greater impact on the overall matching relationship.
  • the target tracking device can re-determine the detection target that matches the first target to be tracked.
  • the target tracking device can also update the weight values of the mth target to be tracked, the first target to be tracked, and the first detected target according to the second influence value.
  • the target tracking device increases the weight value of the mth target to be tracked by the second influence value, increases the weight value of the first target to be tracked by the second influence value, and reduces the weight value of the first detected target by the second influence value. value.
  • the target tracking device performs step 1105, or the target tracking device performs step 1106.
  • the target tracking device in the above solution can determine a one-to-one matching relationship between the target to be tracked and the detected target as a whole based on the distance between each detected target and each target to be tracked.
  • some targets can be added to a smaller number of targets to make the number of targets to be tracked and detected targets Quantities are equal.
  • the target tracking device increases the number of detected targets so that the number of detected targets is the same as the number of targets to be tracked.
  • the increased distance between the detection target and each target to be tracked can be set to a larger preset distance to avoid affecting the matching relationship.
  • the value of the preset distance can theoretically be infinite.
  • the preset distance may be 1,000,000.
  • the above technical solution takes the target tracking device to determine the detection target that matches the target to be tracked as an example to illustrate the process of the target tracking device determining the matching relationship in the present disclosure.
  • Target tracking can also determine the target to be tracked that matches the detection target through the above technical solution, thereby determining the matching relationship, that is, exchanging the execution object of the target to be tracked with the detection target in the above technical solution.
  • the specific implementation method is the same as the above technical solution. , which will not be described again here.
  • the target tracking device in the present disclosure can, when determining the matching relationship between the target to be tracked and the detection target, consider whether the detection target has matched other targets to be tracked, and re-determine based on the current target to be tracked.
  • the distance between the target to be tracked and the detected target is as shown in Table 1 below:
  • Table 1 The distance between the target to be tracked and the target to be detected
  • the targets to be tracked include A1, A2, A3, and A4, and the detection targets include B1, B2, B3, and B4.
  • the distance between A1 and B1 is 3, the distance between A1 and B2 is 4, the distance between A1 and B3 is 6, the distance between A1 and B4 is 4, and so on.
  • the target tracking device determines the weight value of the target to be tracked, as shown in Table 2 below:
  • the weight value of the detection target is shown in Table 3 below:
  • the target tracking device determines the matching relationship between A1 and the detection target.
  • the sum of the weight values of A1 and B1 is 3, which is equal to the distance between A1 and B1, and the distance between A1 and B1 is the shortest. Therefore, the target tracking device takes B1 as the first detection target. At the same time, B1 does not match other targets to be tracked. Therefore, the target tracking device determines that A1 matches B1.
  • the matching relationship at this time is: A1 matches B1.
  • the target tracking device determines the matching relationship between A2 and the detection target.
  • the sum of the weight values of A2 and B4 is 3, which is equal to the distance between A2 and B4, and the distance between A2 and B4 is the shortest. Therefore, the target tracking device takes B4 as the first detection target. At the same time, B4 does not match other targets to be tracked. Therefore, the target tracking device determines that A2 matches B4.
  • the matching relationships at this time are: A1 matches B1, and A2 matches B4.
  • the target tracking device determines the matching relationship between A3 and the detection target.
  • the sum of the weight values of A3 and B4 is 3, which is equal to the distance between A3 and B4, and the distance between A3 and B4 is the shortest. Therefore, the target tracking device takes B4 as the first detection target. However, since A2 and B4 have been matched, the target tracking device needs to determine the difference between the sum of the weight values of A3 and B1 and the distance, the difference between the sum of the weight values of A3 and B2 and the distance, and the difference between the sum of the weight values of A3 and B3.
  • Table 4 The difference between the sum of weight values and the distance between A2, A3 and the detection target
  • the first influence value and the second influence value are both 1, the second detection target is B3, and the third detection target is B2.
  • the target tracking device may execute step 9027 or step 9028.
  • the target tracking device executes step 9028 as an example.
  • the target tracking device determines that A3 and B4 match, and performs a fourth target operation on A2 and B2.
  • the target tracking device can also update the weight values of A2, A3 and B4 according to the second influence value.
  • the target tracking device determines that A2 matches B2.
  • the matching relationships at this time are: A1 matches B1, A2 matches B2, and A3 matches B4.
  • the target tracking device determines the matching relationship between A4 and the detection target.
  • the sum of the weight values of A4 and B3 is equal to the distance between A4 and B3, and the distance between A4 and B3 is the shortest. At the same time, B3 does not match other targets to be tracked, so the target tracking device determines that A4 matches B3.
  • the matching relationships at this time are: A1 matches B1, A2 matches B2, A3 matches B4, and A4 matches B3.
  • the target tracking device determines the detection target matching each target to be tracked.
  • the following describes the process by which the target tracking device determines the matching relationship based on the distance between each detected target and each target to be tracked.
  • step 502 can also be implemented through the following steps.
  • Step 1201 The target tracking device determines a list of targets to be tracked and a list of detected targets.
  • the list of targets to be tracked includes each target to be tracked, and the list of detected targets includes each target to be detected.
  • Step 1202 The target tracking device performs the fifth target operation on the targets to be tracked and the detected targets in the target to be tracked list and the target to be detected list, until there is no target to be tracked in the target list to be tracked or there is no detection target in the target target list to be detected, determine Detected targets that match each target to be tracked.
  • the target tracking device may determine that there is no matching detection target for the part of the target to be tracked, or determine that there is no matching target to be tracked for the part of the detection target.
  • the fifth target operation includes the following steps 1301-1304.
  • Step 1301 The target tracking device determines the target distance between each target to be tracked in the current target list to be tracked and each target to be tracked in the current detected target list.
  • Step 1302 The target tracking device determines the minimum distance among the target distances, and the second target to be tracked and the fourth detection target corresponding to the minimum distance.
  • the distance between the second target to be tracked and the fourth detection target is the minimum distance.
  • the target tracking device can select any one of the distances as the minimum distance, and use the target to be tracked corresponding to the minimum distance as the second target to be tracked.
  • the corresponding detection target is used as the fourth detection target.
  • Step 1303 The target tracking device determines the matching relationship between the second target to be tracked and the fourth detected target.
  • the target tracking device can first determine that the second target to be tracked matches the fourth detected target, thereby obtaining the best value of the second target to be tracked. Excellent matching relationship.
  • Step 1304 The target tracking device deletes the second target to be tracked from the current list of targets to be tracked, and deletes the fourth detected target from the current list of detected targets.
  • the target tracking device determines the matching relationship between the subsequent target to be tracked and the detection target, it does not need to consider the distance between the target to be tracked and other detection targets that have already determined the matching relationship, nor does it need to consider the already determined matching relationship.
  • the distance between the detection target and other targets to be tracked is reduced, thereby reducing the calculation amount of the target tracking device when determining the matching relationship.
  • the above technical solution takes the target tracking device to determine the detection target that matches the target to be tracked as an example to explain the process of the target tracking device determining the matching relationship in the present disclosure.
  • Target tracking can also determine the target to be tracked that matches the detection target through the above technical solution, thereby determining the matching relationship, that is, exchanging the execution object of the target to be tracked with the detection target in the above technical solution.
  • the specific implementation method is the same as the above technical solution. , which will not be described again here.
  • the target tracking device in the present disclosure can match the second target to be tracked with the third target to be tracked.
  • Four detected targets are removed from the list to determine the matching relationship between the remaining targets to be tracked and the detected targets. Therefore, the target tracking device can determine whether each target to be tracked matches the detection target from the perspective of the target individual to be tracked, further reducing the computational cost of determining the matching relationship by the target tracking device, thereby improving the target tracking efficiency.
  • the target tracking device determines that the list of targets to be tracked includes: A1, A2, A3, and A4, and the list of detected targets includes: B1, B2, B3, and B4.
  • the distance between A4 and B3 and the distance between A4 and B4 are 2, which are both minimum values. Therefore, the target tracking device can select A4 and B3 to match, and delete A4 and B3 from the to-be-tracked target list and the detected target list.
  • the target tracking device determines that the list of targets to be tracked includes: A1, A2, and A3, and the list of detected targets includes: B1, B2, and B4.
  • the target tracking device can select A2 and B4 to match, and delete A2 and B4 from the to-be-tracked target list and the detected target list.
  • the target tracking device determines that the list of targets to be tracked includes: A1 and A3, and the list of detected targets includes: B1 and B2.
  • the target tracking device can select A1 and B1 to match, and delete A1 and B1 from the to-be-tracked target list and the detected target list.
  • the target tracking device determines that the list of targets to be tracked includes: A3, and the list of detected targets includes: B2.
  • the target tracking device can select A3 and B2 to match, and delete A3 and B2 from the to-be-tracked target list and the detected target list. At this time, the target tracking device determines that there is no target to be tracked in the list of targets to be tracked, and there is no detection target in the list of detection targets.
  • the matching relationships determined by the target tracking device are: A1 matches B1, A2 matches B4, A3 matches B2, and A4 matches B3.
  • step 306 can also be implemented through the following steps.
  • the above step 306 can be implemented through the following steps 1401 to 1402:
  • Step 1401 The target tracking device determines the third target to be tracked.
  • each of the third targets to be tracked has a matching detection target.
  • the third target to be tracked is a target that successfully matches the detected target among the targets to be tracked. Therefore, for the third target to be tracked, the target tracking device can associate the third target to be tracked with the matching detection target, thereby achieving the technical effect of target tracking.
  • Step 1402 The target tracking device updates the position of the key point of the third target to be tracked based on the detected position of the key point of the detected target that matches the third target to be tracked and the predicted position of the key point of the third target to be tracked.
  • the target tracking device can correct the predicted position and the detected position according to the Kalman filtering algorithm to determine the position of the key point of the third target to be tracked at the first moment.
  • the third target to be tracked may have undetected key points, and the matching detection target may also have undetected key points.
  • the left side is the third target to be tracked, and the right side is the matching detection target.
  • key points 1501 and 1504 are detected key points of the third target to be tracked (ie, the solid points in Figure 15).
  • Key points 1502 and 1503 are undetected key points of the third target to be tracked (ie, hollow points in Figure 15).
  • Key points 1505 and 1506 are detected key points of the detection target.
  • Key points 1507 and 1508 are undetected key points of the detection target.
  • only one target to be tracked is shown in Figure 15 .
  • the target tracking device The position of the key point of the third target to be tracked may be updated based on the detected position of the key point of the detected target that matches the third target to be tracked and the predicted position of the key point of the third target to be tracked.
  • the target tracking device When the key point of the third target to be tracked has been detected, and the corresponding key point of the matching detection target has not been detected (for example, key point 1504 and key point 1508 in Figure 15), the target tracking device The predicted position of the key point of the third target to be tracked or the position at the second time can be used as the position of the key point at the first time.
  • the target tracking device The detection position of the corresponding key point of the matching detection target may be used as the position of the undetected key point at the first moment.
  • the target tracking device When the key point of the third target to be tracked has not been detected, and the corresponding key point of the matching detection target has not been detected (for example, key point 1503 and key point 1507 in Figure 15), the target tracking device The position information of an undetected key point can be set to a preset position value to indicate that the key point has not been detected.
  • step 306 can be implemented through the following steps 1403 to 1404:
  • Step 1403 The target tracking device determines the fifth detection target.
  • each detection target in the fifth detection target does not have a matching target to be tracked.
  • Step 1404 The target tracking device adds a fifth detection target to the targets to be tracked.
  • a detected target for which there is no matching target to be tracked may be a new target that appears in the target area at the first moment. Therefore, the target tracking device needs to add it to the target to be tracked and subsequently track it.
  • step 1404 includes: the target tracking device uses the fifth detected target as a newly added target to be tracked at the first moment, and uses the key points of the fifth detected target as the key points of the newly added target to be tracked.
  • step 306 can be implemented through the following steps 1405 to 1408:
  • Step 1405 The target tracking device determines the fourth target to be tracked and the number of mismatches between the fourth target to be tracked.
  • each of the fourth targets to be tracked does not have a matching detection target
  • the number of mismatches is the number of consecutive times that the target to be tracked does not have a matching detection target.
  • the target tracking device sets the number of mismatches for the target to be tracked plus one.
  • the target tracking device clears the number of mismatches of the target to be tracked.
  • the target tracking device may set a matching counter for each target to be tracked.
  • the match counter is used to count the number of mismatches for the target to be tracked.
  • Step 1406 The target tracking device determines whether the number of mismatches is greater than the preset tracking threshold.
  • the preset tracking threshold can be set according to actual conditions, and this disclosure does not limit this.
  • the target tracking device determines that the fourth target to be tracked has disappeared from the target area.
  • the target tracking device may perform step 1407.
  • Step 1407 The target tracking device deletes the fourth target to be tracked from the targets to be tracked.
  • the target tracking device may perform step 1408.
  • Step 1408 The target tracking device uses the predicted position of the key point of the fourth target to be tracked or the position of the key point of the fourth target to be tracked at the second time as the updated position of the key point of the fourth target to be tracked.
  • the target tracking device can set the position information of the undetected key points as a preset position value to indicate that the key points have not been detected. detected.
  • the target tracking device in the present disclosure can divide the target to be tracked and the detection target into three categories according to the matching relationship, that is, the target to be tracked has a matching detection target and the target to be tracked does not have a matching detection target.
  • the target tracking device performs corresponding update operations based on the above three types of targets, effectively improving the stability and accuracy of target tracking.
  • steps 1401 to 1402, steps 1403 to 1404, and steps 1405 to 1408 are independent of each other. Steps 1401 to 1402, steps 1403 to 1404, and steps 1405 to 1408 may be executed in any combination of execution order, or may be executed in parallel. This disclosure does not limit the execution order of the above steps.
  • the following is an introduction to the process in which the target tracking device updates the positions of the target to be tracked and the key points of the target to be tracked based on the matching relationship.
  • the above step 306 can also be implemented through the following steps.
  • Step 1601 The target tracking device determines whether there is a matching detection target for the fifth target to be tracked.
  • the fifth target to be tracked is any target among the targets to be tracked.
  • the target tracking device executes step 1602.
  • Step 1602 The target tracking device updates the position of the key point of the fifth target to be tracked based on the matching detected position of the key point of the detected target and the predicted position of the key point of the fifth target to be tracked.
  • step 902 For relevant implementation methods, please refer to the description in step 902, which will not be described again here.
  • the target tracking device executes step 1603.
  • Step 1603 The target tracking device determines whether the number of mismatches of the fifth target to be tracked is greater than a preset tracking threshold.
  • the number of mismatches is the number of consecutive times that the target to be tracked does not have a matching detection target.
  • the target tracking device may perform step 1604.
  • Step 1604 The target tracking device deletes the fifth target to be tracked from the targets to be tracked.
  • the target tracking device may perform step 1605.
  • Step 1605 The target tracking device uses the predicted position of the key point of the fifth target to be tracked or the position of the key point of the fifth target to be tracked at the second time as the updated position of the key point of the fifth target to be tracked.
  • the target tracking device can set the position information of the undetected key points as a preset position value to indicate that the key points have not been detected. detected.
  • Step 1606 The target tracking device determines whether there is a matching target to be tracked for the sixth detected target.
  • the sixth detection target is any one of the detection targets.
  • the target tracking device may perform step 1607.
  • Step 1607 The target tracking device adds a sixth detection target to the targets to be tracked.
  • step 1404 For relevant implementation methods, please refer to the description in step 1404, which will not be described again here.
  • the target tracking device in the present disclosure can determine the matching relationship between each target to be tracked and each detected target, and perform corresponding update operations for each target to be tracked and each detected target based on the matching relationship. , improving the stability and accuracy of target tracking.
  • step 1601 and step 1606 in the above embodiment are independent of each other. This disclosure does not limit the execution order of the above steps.
  • Embodiments of the present disclosure can divide the target tracking device into functional modules or functional units according to the above method examples.
  • each functional module or functional unit can be divided corresponding to each function, or two or more functions can be integrated into one in the processing module.
  • the above-mentioned integrated modules can be implemented in the form of hardware or in the form of software function modules or functional units.
  • the division of modules or units in the embodiments of the present disclosure is schematic and is only a logical function division. In actual implementation, there may be other division methods.
  • FIG. 17 it is a structural diagram of a target tracking device 170 provided according to some embodiments.
  • the device includes: a processing unit 1701 and an acquisition unit 1702.
  • the acquisition unit 1702 is configured to acquire the image to be detected at the first moment.
  • the processing unit 1701 is configured to determine the detection position of the key point of the detection target in the image to be detected.
  • the obtaining unit 1702 is also configured to obtain the position of the key point of the target to be tracked at the second moment.
  • the second moment is the moment before the first moment.
  • the processing unit 1701 is also configured to predict the predicted position of the key point of the target to be tracked at the first time based on the position of the key point of the target to be tracked at the second time.
  • the processing unit 1701 is also configured to determine the matching relationship between the detected target and the target to be tracked based on the detected position and the predicted position.
  • the matching relationship is used to match the same target among the detected target and the target to be tracked.
  • the processing unit 1701 is also configured to track the target to be tracked according to the matching relationship.
  • the processing unit 1701 is configured to perform a first target operation on each detected target and each target to be tracked, and determine the distance between each detected target and each target to be tracked; the first target operation It includes: determining the distance between the i-th detection target and the j-th target to be tracked based on the distance between the detection position of the key point in the i-th detection target and the predicted position of the key point of the j-th target to be tracked. distance; where i is a positive integer less than or equal to N; j is a positive integer less than or equal to M; the processing unit 1701 is also configured to determine a match based on the distance between each detected target and each target to be tracked relation.
  • the processing unit 1701 is configured to perform a second target operation on each corresponding key point of the i-th detected target and the j-th target to be tracked, and determine the distance between each corresponding key point;
  • the second target operation includes: determining the first key point and the second key point; determining the distance between the first key point and the second key point based on the detected position of the first key point and the predicted position of the second key point;
  • the point is any key point in the i-th detected target;
  • the second key point is the key point corresponding to the first key point in the j-th target to be tracked;
  • the processing unit 1701 is also configured to determine the key point according to each corresponding key point. The distance between them determines the distance between the i-th detection target and the j-th target to be tracked.
  • the distance between the i-th detected target and the j-th target to be tracked is calculated by the following formula:
  • D(i,j) represents the distance between the i-th detection target and the j-th target to be tracked
  • p ik represents the detection position of the k-th key point of the i-th detection target
  • p′ jk represents the j-th
  • d(p ik , p′ jk ) represents the distance between the k-th key point of the i-th detection target and the k-th key point of the j-th target to be tracked
  • the distance of ⁇ (v ik ,v′ jk ) represents the detection situation of the k-th key point of the i-th detection target and the k-th key point of the j-th target to be tracked.
  • the matching relationship includes at least one of the following: at least one target to be tracked matches the detected target, at least one target to be tracked does not match the detected target, and at least one detected target does not match the target to be tracked. At least one of the matches.
  • the processing unit 1701 is configured to determine the weight value of each target to be tracked and the weight value of each detected target; wherein the weight value of any target to be tracked is the weight value of any target to be tracked and each target, respectively.
  • the value of the minimum distance among the distances of the detection targets; the weight value of each detection target is the preset weight value; perform the third target operation on each target to be tracked, and determine the detection target matching each target to be tracked; third The target operation includes: determining the first detected target with the shortest distance from the mth target to be tracked; wherein the sum of the weight values of the first detected target and the mth target to be tracked is greater than or equal to the first detected target and the mth target to be tracked.
  • the distance of the tracking target; m is a positive integer; perform the fourth target operation on the mth target to be tracked and the first detection target to determine the detection target that matches the mth target to be tracked; the fourth target operation includes: determining whether there is The first target to be tracked; the first target to be tracked is the target to be tracked that matches the first detected target determined according to the third target operation; in the absence of the first target to be tracked, determine the mth target to be tracked and the The first detected target matches; in the case where the first target to be tracked exists, determine the first influence value of the mth target to be tracked, and the second influence value of the first target to be tracked; wherein the first influence value is based on The difference between the mth target to be tracked and the second detection target; the difference is the difference between the distance between a target to be tracked and a detection target and the sum of the weights of a target to be tracked and a detection target; the second The detection target is the detection target that has the smallest difference with the mth target to be tracked except
  • the processing unit 1701 is configured to perform a fourth target operation on the m-th target to be tracked and the second detected target when the first influence value is less than the second influence value, and determine the relationship between the m-th target and the second detected target.
  • the target to be tracked matches the detected target; when the first influence value is greater than the second influence value, it is determined that the mth target to be tracked matches the first detected target.
  • the processing unit 1701 is configured to perform a fourth target operation on the first target to be tracked and the third detected target when the first influence value is greater than the second influence value, and determine the relationship between the first target to be tracked and the third target to be tracked. Target matching detection target.
  • the processing unit 1701 is configured to update the mth target to be tracked, the first target to be tracked, and the first detection target according to the first influence value when the first influence value is less than the second influence value.
  • weight value when the first influence value is greater than the second influence value, the weight values of the mth target to be tracked, the first target to be tracked and the first detected target are updated according to the second influence value.
  • the processing unit 1701 is configured to increase the weight value of the m-th target to be tracked by a first influence value, increase the weight value of the first target to be tracked by a first influence value, and increase the weight value of the first detected target by a first influence value.
  • the weight value is reduced by the first influence value;
  • the processing unit 1701 is also configured to increase the weight value of the m-th target to be tracked by the second influence value, increase the weight value of the first target to be tracked by the second influence value, and increase the weight value of the first target to be tracked by the second influence value.
  • the weight value of the detection target is reduced by the second influence value.
  • the processing unit 1701 is configured to determine a list of targets to be tracked and a list of detected targets; wherein the list of targets to be tracked includes each target to be tracked, and the list of detected targets includes each detected target; and the list of targets to be tracked and The target to be tracked and the detection target in the detection target list iteratively perform the fifth target operation until there is no target to be tracked in the target list to be tracked or there is no detection target in the detection target list, and the matching relationship is determined based on the execution result of the fifth target operation.
  • the fifth target operation includes: determining the target distance between each target to be tracked in the current target list to be tracked and each target to be tracked in the current detected target list; determining the minimum distance in the target distance, and the minimum distance corresponding The second target to be tracked and the fourth target to be detected; the distance between the second target to be tracked and the fourth target to be detected is the minimum distance; determine the matching relationship between the second target to be tracked and the fourth target to be detected; from the current target to be tracked The second target to be tracked is deleted from the list, and the fourth detection target is deleted from the current detection target list.
  • the processing unit 1701 is configured to determine a third target to be tracked; each of the third targets to be tracked has a matching detected target; the processing unit 1701 is further configured to determine the third target to be tracked according to the The detected position of the key point of the detected target to be tracked matches the predicted position of the key point of the third target to be tracked, and the position of the key point of the third target to be tracked is updated.
  • the processing unit 1701 is configured to determine the fifth detection target; each detection target in the fifth detection target does not have a matching target to be tracked; the processing unit 1701 is also configured to determine among the targets to be tracked Added fifth detection target.
  • the processing unit 1701 is configured to determine the fourth target to be tracked and the number of mismatches for the fourth target to be tracked; there is no matching detection target for each target to be tracked in the fourth target to be tracked; no The number of matches is the number of times that the target to be tracked has no matching detection target continuously; the processing unit 1701 is also configured to delete the fourth target to be tracked from the targets to be tracked when the number of mismatches is greater than the preset tracking threshold.
  • the processing unit 1701 is configured to, when the number of mismatches is less than or equal to the preset tracking threshold, change the predicted position of the key point of the fourth target to be tracked or the key point of the fourth target to be tracked in The position at the second moment is used as the updated position of the key point of the fourth target to be tracked.
  • the processing unit 1701 is configured to, in the case where a matching detection target exists for the fifth target to be tracked, based on the detection position of the key point of the matching detection target and the prediction of the key point of the fifth target to be tracked.
  • the position updates the position of the key point of the fifth target to be tracked;
  • the fifth target to be tracked is any one of the targets to be tracked;
  • the processing unit 1701 is also configured to have no matching detection target in the fifth target to be tracked, and If the number of mismatches for the fifth target to be tracked is greater than the preset tracking threshold, the fifth target to be tracked is deleted from the targets to be tracked; the number of mismatches is the number of consecutive times that the target to be tracked does not have a matching detection target;
  • the processing unit 1701 is also configured to add a sixth detection target to the target to be tracked when the sixth detection target does not have a matching target to be tracked; the sixth detection target is any target among the detection targets.
  • the processing unit 1701 is configured to, when the fifth target to be tracked does not have a matching detection target, and the number of mismatches of the fifth target to be tracked is less than or equal to the preset tracking threshold, The predicted position of the key point of the target to be tracked or the position of the fifth target to be tracked at the second moment is used as the updated position of the key point of the fifth target to be tracked.
  • the processing unit 1701 is configured to determine the motion state of the key points of the target to be tracked; the processing unit 1701 is also configured to predict based on the position and motion state of the key points of the target to be tracked at the second moment. The predicted position of the key point of the target to be tracked at the first moment.
  • the processing unit 1701 is configured to determine that there is no matching detection target for each target to be tracked when the number of detection targets is 0.
  • the processing unit 1701 is configured to determine that there is no matching target to be tracked for each detected target when the number of targets to be tracked is 0.
  • the acquisition unit 1702 in the embodiment of the present disclosure can be integrated on the communication interface, and the processing unit 1701 can be integrated on the processor.
  • the specific implementation is shown in Figure 18.
  • FIG. 18 shows another possible structural diagram of the target tracking device involved in the above embodiment.
  • the target tracking device 180 includes: a processor 1802 and a communication interface 1803.
  • the processor 1802 is configured to control and manage the actions of the target tracking device 180, for example, perform the steps performed by the processing unit 1701 described above, and/or be configured to perform other processes of the technology described herein.
  • the communication interface 1803 is configured to support communication between the target tracking device 180 and other network entities, for example, performing the steps performed by the acquisition unit 1702 described above.
  • Target tracking device 180 may also include memory 1801 and bus 1804 , memory 1801 configured to store program code and data for target tracking device 180 .
  • the memory 1801 can be the memory in the target tracking device 180, etc.
  • the memory can include volatile memory, such as random access memory; the memory can also include non-volatile memory, such as read-only memory, flash memory, Hard disk or solid state drive; the memory may also include a combination of the above types of memory.
  • the processor 1802 described above may implement or execute various exemplary logical blocks, modules and circuits described in conjunction with the present disclosure.
  • the processor may be a central processing unit, a general-purpose processor, a digital signal processor, an application-specific integrated circuit, a field-programmable gate array or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. It may implement or execute the various illustrative logical blocks, modules and circuits described in connection with this disclosure.
  • the processor may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, etc.
  • the bus 1804 may be an Extended Industry Standard Architecture (EISA) bus or the like.
  • Bus 1804 can be divided into address bus, data bus, control bus, etc. For ease of presentation, only one thick line is used in Figure 18, but it does not mean that there is only one bus or one type of bus.
  • the target tracking device 180 in Figure 18 can also be a chip.
  • the chip includes one or more (including two) processors 1802 and communication interfaces 1803.
  • the chip also includes memory 1801, which may include read-only memory and random access memory, and provides operating instructions and data to the processor 1802. Part of memory 1801 may also include non-volatile random access memory (NVRAM).
  • NVRAM non-volatile random access memory
  • memory 1801 stores elements, execution modules, or data structures, or subsets thereof, or extended sets thereof.
  • the corresponding operation is performed by calling the operation instructions stored in the memory 1801 (the operation instructions may be stored in the operating system).
  • Some embodiments of the present disclosure provide a computer-readable storage medium (e.g., a non-transitory computer-readable storage medium) having computer program instructions stored therein, and the computer program instructions are stored in a computer (e.g., a target When running on the tracking device), the computer is caused to execute the target tracking method as described in any of the above embodiments.
  • a computer e.g., a target When running on the tracking device
  • the above-mentioned computer-readable storage media may include, but are not limited to: magnetic storage devices (such as hard disks, floppy disks or tapes, etc.), optical disks (such as CD (Compact Disk, compressed disk), DVD (Digital Versatile Disk, etc.) Digital versatile disk), etc.), smart cards and flash memory devices (e.g., EPROM (Erasable Programmable Read-Only Memory, Erasable Programmable Read-Only Memory), cards, sticks or key drives, etc.).
  • the various computer-readable storage media described in this disclosure may represent one or more devices and/or other machine-readable storage media for storing information.
  • the term "machine-readable storage medium" may include, but is not limited to, wireless channels and various other media capable of storing, containing and/or carrying instructions and/or data.
  • Some embodiments of the present disclosure also provide a computer program product, for example, the computer program product is stored on a non-transitory computer-readable storage medium.
  • the computer program product includes computer program instructions.
  • the computer program instructions When the computer program instructions are executed on a computer (eg, a target tracking device), the computer program instructions cause the computer to perform the target tracking method as described in the above embodiments.
  • Some embodiments of the present disclosure also provide a computer program.
  • the computer program When the computer program is executed on a computer (eg, a target tracking device), the computer program causes the computer to perform the target tracking method as described in the above embodiments.
  • the disclosed systems, devices and methods can be implemented in other ways.
  • the device embodiments described above are only illustrative.
  • the division of the units is only a logical function division. In actual implementation, there may be other division methods.
  • multiple units or components may be combined or can be integrated into another system, or some features can be ignored, or not implemented.
  • the coupling or direct coupling or communication connection between each other shown or discussed may be through some interfaces, and the indirect coupling or communication connection of the devices or units may be in electrical, mechanical or other forms.
  • the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place, or they may be distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
  • each functional unit in various embodiments of the present disclosure may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit.

Landscapes

  • Image Analysis (AREA)
  • Radar Systems Or Details Thereof (AREA)

Abstract

A target tracking method and apparatus, a system, and a storage medium. The method comprises: at a first moment, acquiring an image to be subjected to detection; determining the detected positions of key points of detection targets in said image; acquiring the positions, at a second moment, of key points of targets to be tracked, wherein the second moment is a moment before the first moment; according to the positions, at the second moment, of the key points of the targets to be tracked, predicting the predicted positions, at the first moment, of the key points of the targets to be tracked; according to the detected positions and the predicted positions, determining a matching relationship between the detection targets and the targets to be tracked, wherein the matching relationship is used for matching the same targets among the detection targets and the targets to be tracked; and according to the matching relationship, tracking the targets to be tracked.

Description

目标跟踪方法、装置、系统及存储介质Target tracking method, device, system and storage medium 技术领域Technical field
本公开涉及图像处理领域,尤其涉及一种目标跟踪方法、装置、系统及存储介质。The present disclosure relates to the field of image processing, and in particular, to a target tracking method, device, system and storage medium.
背景技术Background technique
在图像处理领域中,对于目标以及关键点的检测跟踪的相关方案在行为识别、姿态分析以及三维关键点估计等方面都具有广泛的应用。例如对行人进行跟踪能够用于确定行人的路线轨迹,对行人的关键点跟踪能够用于判断该行人是否跌倒。In the field of image processing, related solutions for detection and tracking of targets and key points are widely used in behavior recognition, posture analysis, and three-dimensional key point estimation. For example, tracking pedestrians can be used to determine the pedestrian's route trajectory, and tracking key points of the pedestrian can be used to determine whether the pedestrian has fallen.
相关技术通常需要分别对目标对象进行目标检测以及关键点检测,并根据目标检测得到的外包框图像对目标对象进行跟踪,从而基于目标对象的外包框图像与关键点的关联关系间接地对关键点进行跟踪。又一种相关技术会对目标对象进行关键点检测,并基于关键点生成目标对象的外包框图像,从而根据生成的外包框图像对目标对象进行跟踪。Related technologies usually require target detection and key point detection of the target object respectively, and tracking the target object based on the outer box image obtained by the target detection, so as to indirectly detect the key points based on the relationship between the outer box image of the target object and the key points. Follow up. Another related technology detects key points of the target object and generates an outer box image of the target object based on the key points, thereby tracking the target object based on the generated outer box image.
发明内容Contents of the invention
一方面,提供一种目标跟踪方法,该方法包括:获取第一时刻的待检测图像;确定待检测图像中检测目标的关键点的检测位置;获取待跟踪目标的关键点在第二时刻的位置;第二时刻为第一时刻之前的时刻;根据待跟踪目标的关键点在第二时刻的位置,预测待跟踪目标的关键点在第一时刻的预测位置;根据检测位置和预测位置,确定检测目标和待跟踪目标之间的匹配关系;匹配关系用于匹配检测目标和待跟踪目标中相同的目标;根据匹配关系,跟踪待跟踪目标。On the one hand, a target tracking method is provided, which method includes: obtaining an image to be detected at a first moment; determining the detection position of a key point of the target to be detected in the image to be detected; and obtaining the position of the key point of the target to be tracked at a second moment. ; The second moment is the moment before the first moment; according to the position of the key point of the target to be tracked at the second moment, predict the predicted position of the key point of the target to be tracked at the first moment; according to the detection position and the predicted position, determine the detection The matching relationship between the target and the target to be tracked; the matching relationship is used to match the same target in the detected target and the target to be tracked; based on the matching relationship, the target to be tracked is tracked.
在一些实施例中,该方法包括:对每个检测目标和每个待跟踪目标执行第一目标操作,确定每个检测目标与每个待跟踪目标之间的距离;第一目标操作包括:根据第i个检测目标中的关键点的检测位置,和第j个待跟踪目标的关键点的预测位置之间的距离,确定第i个检测目标和第j个待跟踪目标之间的距离;其中,i为小于或等于N的正整数;j为小于或等于M的正整数;根据每个检测目标与每个待跟踪目标之间的距离,确定匹配关系。In some embodiments, the method includes: performing a first target operation on each detected target and each target to be tracked, and determining a distance between each detected target and each target to be tracked; the first target operation includes: according to The distance between the detected position of the key point in the i-th detection target and the predicted position of the key point of the j-th target to be tracked determines the distance between the i-th detection target and the j-th target to be tracked; where , i is a positive integer less than or equal to N; j is a positive integer less than or equal to M; the matching relationship is determined based on the distance between each detected target and each target to be tracked.
在一些实施例中,该方法包括:对第i个检测目标与第j个待跟踪目标的每个对应关键点执行第二目标操作,确定每个对应关键点之间的距离;第二目标操作包括:确定第一关键点与第二关键点;根据第一关键点的检测位置和第二关键点的预测位置确定第一关键点与第二关键点之间的距离;第一关 键点为第i个检测目标中的任一个关键点;第二关键点为第j个待跟踪目标中与第一关键点对应的关键点;根据每个对应关键点之间的距离,确定第i个检测目标和第j个待跟踪目标之间的距离。In some embodiments, the method includes: performing a second target operation on each corresponding key point of the i-th detected target and the j-th target to be tracked, and determining a distance between each corresponding key point; the second target operation It includes: determining the first key point and the second key point; determining the distance between the first key point and the second key point according to the detected position of the first key point and the predicted position of the second key point; the first key point is the Any key point among the i detection targets; the second key point is the key point corresponding to the first key point in the j-th target to be tracked; determine the i-th detection target based on the distance between each corresponding key point The distance between the jth target to be tracked.
在一些实施例中,第i个检测目标和第j个待跟踪目标之间的距离通过以下公式来计算:In some embodiments, the distance between the i-th detected target and the j-th target to be tracked is calculated by the following formula:
Figure PCTCN2022083887-appb-000001
Figure PCTCN2022083887-appb-000001
其中,D(i,j)表示第i个检测目标和第j个待跟踪目标之间的距离,p ik表示第i个检测目标的第k个关键点的检测位置,p′ jk表示第j个待跟踪目标的第k个关键点的预测位置,d(p ik,p′ jk)表示第i个检测目标的第k个关键点与第j个待跟踪目标的第k个关键点之间的距离,s表示目标的尺寸信息,v ik表示第i个检测目标的第k个关键点是否被检测到,v′ jk表示第j个待跟踪目标的第k个关键点是否被检测到,δ(v ik,v′ jk)表征第i个检测目标的第k个关键点与第j个待跟踪目标的第k个关键点的检测情况。 Among them, D(i,j) represents the distance between the i-th detection target and the j-th target to be tracked, p ik represents the detection position of the k-th key point of the i-th detection target, and p′ jk represents the j-th The predicted position of the k-th key point of the target to be tracked, d(p ik , p′ jk ) represents the distance between the k-th key point of the i-th detection target and the k-th key point of the j-th target to be tracked The distance of δ(v ik ,v′ jk ) represents the detection situation of the k-th key point of the i-th detection target and the k-th key point of the j-th target to be tracked.
在一些实施例中,匹配关系包括如下中的至少一项:存在至少一个待跟踪目标与检测目标匹配、存在至少一个待跟踪目标与检测目标不匹配、以及存在至少一个检测目标与待跟踪目标不匹配。In some embodiments, the matching relationship includes at least one of the following: at least one target to be tracked matches the detected target, at least one target to be tracked does not match the detected target, and at least one detected target does not match the target to be tracked. match.
在一些实施例中,该方法包括:确定每个待跟踪目标的权重值与每个检测目标的权重值;其中,任一待跟踪目标的权重值为任一待跟踪目标分别与每个检测目标的距离中最小距离的值;每个检测目标的权重值为预设权重值;对每个待跟踪目标执行第三目标操作,确定与每个待跟踪目标匹配的检测目标;第三目标操作包括:确定与第m个待跟踪目标距离最短的第一检测目标;其中,第一检测目标与第m个待跟踪目标的权重值之和大于或等于第一检测目标与第m个待跟踪目标的距离;m为正整数;对第m个待跟踪目标与第一检测目标执行第四目标操作,确定与第m个待跟踪目标匹配的检测目标;第四目标操作包括:确定是否存在第一待跟踪目标;第一待跟踪目标为根据第三目标操作确定的与第一检测目标匹配的待跟踪目标;在不存在第一待跟踪目标的情况下,确定第m个待跟踪目标与第一检测目标匹配;在存在第一待跟踪目标的情况下,确定第m个待跟踪目标的第一影响值,以及第一待跟踪目标的第二影响值;其中,第一影响值为根据第m个待跟踪目标与第二检测目标确定的差值;差值为一个待跟踪目标与一个检测目标的距离与一个待跟踪目标与一个检测目标的权重之和之间的差值;第二检测目标为除第一检测 目标外与第m个待跟踪目标确定的差值最小的检测目标;第二影响值为根据第一待跟踪目标与第三检测目标确定的差值;第三检测目标为除第一检测目标外与第一待跟踪目标确定的差值最小的检测目标;根据第一影响值和第二影响值,确定与第m个待跟踪目标匹配的检测目标。In some embodiments, the method includes: determining the weight value of each target to be tracked and the weight value of each detected target; wherein the weight value of any target to be tracked is the weight value of any target to be tracked and each detected target respectively. The value of the minimum distance among the distances; the weight value of each detection target is the preset weight value; perform the third target operation on each target to be tracked, and determine the detection target matching each target to be tracked; the third target operation includes : Determine the first detection target with the shortest distance from the mth target to be tracked; where the sum of the weight values of the first detection target and the mth target to be tracked is greater than or equal to the sum of the weight values of the first detection target and the mth target to be tracked distance; m is a positive integer; perform the fourth target operation on the mth target to be tracked and the first detection target to determine the detection target matching the mth target to be tracked; the fourth target operation includes: determining whether there is the first target to be tracked Tracking target; the first target to be tracked is the target to be tracked that matches the first detection target determined according to the third target operation; in the absence of the first target to be tracked, determine the mth target to be tracked and the first detection target Target matching; in the case where there is a first target to be tracked, determine the first influence value of the m-th target to be tracked, and the second influence value of the first target to be tracked; where the first influence value is based on the m-th target The difference between the target to be tracked and the second detection target; the difference is the difference between the distance between a target to be tracked and a detection target and the sum of the weights of a target to be tracked and a detection target; the second detection target is Except for the first detection target, it is the detection target with the smallest difference determined from the mth target to be tracked; the second influence value is the difference determined based on the first target to be tracked and the third detection target; the third detection target is the detection target except the mth target to be tracked. A detection target that has the smallest difference between a detection target and the first target to be tracked; determine a detection target that matches the mth target to be tracked based on the first influence value and the second influence value.
在一些实施例中,该方法包括:在第一影响值小于第二影响值的情况下,对第m个待跟踪目标与第二检测目标执行第四目标操作,确定与第m个待跟踪目标匹配的检测目标;在第一影响值大于第二影响值的情况下,确定第m个待跟踪目标与第一检测目标匹配。In some embodiments, the method includes: when the first influence value is less than the second influence value, performing a fourth target operation on the mth target to be tracked and the second detected target, and determining the relationship between the mth target to be tracked and the second detected target. Matching detection target; when the first influence value is greater than the second influence value, it is determined that the mth target to be tracked matches the first detection target.
在一些实施例中,该方法还包括:在第一影响值大于第二影响值的情况下,对第一待跟踪目标与第三检测目标执行第四目标操作,确定与第一待跟踪目标匹配的检测目标。In some embodiments, the method further includes: when the first influence value is greater than the second influence value, performing a fourth target operation on the first target to be tracked and the third target to be detected, and determining whether they match the first target to be tracked. detection target.
在一些实施例中,该方法还包括:在第一影响值小于第二影响值的情况下,根据第一影响值更新第m个待跟踪目标、第一待跟踪目标以及第一检测目标的权重值;在第一影响值大于第二影响值的情况下,根据第二影响值更新第m个待跟踪目标、第一待跟踪目标以及第一检测目标的权重值。In some embodiments, the method further includes: when the first influence value is less than the second influence value, updating the weights of the mth target to be tracked, the first target to be tracked and the first detected target according to the first influence value. value; when the first influence value is greater than the second influence value, the weight values of the m-th target to be tracked, the first target to be tracked and the first detected target are updated according to the second influence value.
在一些实施例中,该方法包括:将第m个待跟踪目标的权重值增加第一影响值,将第一待跟踪目标的权重值增加第一影响值,将第一检测目标的权重值降低第一影响值;将第m个待跟踪目标的权重值增加第二影响值,将第一待跟踪目标的权重值增加第二影响值,将第一检测目标的权重值降低第二影响值。In some embodiments, the method includes: increasing the weight value of the mth target to be tracked by a first influence value, increasing the weight value of the first target to be tracked by a first influence value, and reducing the weight value of the first detected target. First influence value; increase the weight value of the mth target to be tracked by the second influence value, increase the weight value of the first target to be tracked by the second influence value, and reduce the weight value of the first detection target by the second influence value.
在一些实施例中,该方法包括:确定待跟踪目标列表与检测目标列表;其中,待跟踪目标列表包括每个待跟踪目标,检测目标列表包括每个检测目标;对待跟踪目标列表与检测目标列表中的待跟踪目标与检测目标迭代执行第五目标操作,直至待跟踪目标列表中不存在待跟踪目标或者检测目标列表中不存在检测目标,根据第五目标操作的执行结果确定匹配关系;第五目标操作包括:确定当前待跟踪目标列表中的每个待跟踪目标与当前检测目标列表中的每个待跟踪目标之间的目标距离;确定目标距离中的最小距离,以及最小距离对应的第二待跟踪目标和第四检测目标;第二待跟踪目标和第四检测目标之间的距离为最小距离;确定第二待跟踪目标与第四检测目标的匹配关系;从当前待跟踪目标列表中删除第二待跟踪目标,从当前检测目标列表中删除第四检测目标。In some embodiments, the method includes: determining a list of targets to be tracked and a list of detected targets; wherein the list of targets to be tracked includes each target to be tracked, and the list of detected targets includes each detected target; the list of targets to be tracked and the list of detected targets The target to be tracked and the target to be detected in the target iteratively execute the fifth target operation until there is no target to be tracked in the list of targets to be tracked or there is no target to be detected in the list of detection targets, and the matching relationship is determined based on the execution result of the fifth target operation; fifth The target operation includes: determining the target distance between each target to be tracked in the current target list to be tracked and each target to be tracked in the current detected target list; determining the minimum distance among the target distances, and the second value corresponding to the minimum distance. The target to be tracked and the fourth detected target; the distance between the second target to be tracked and the fourth detected target is the minimum distance; the matching relationship between the second target to be tracked and the fourth detected target is determined; deleted from the current list of targets to be tracked The second target to be tracked deletes the fourth detection target from the current detection target list.
在一些实施例中,该方法包括:确定第三待跟踪目标;第三待跟踪目标中的每个待跟踪目标存在匹配的检测目标;根据与第三待跟踪目标匹配的检 测目标的关键点的检测位置以及第三待跟踪目标的关键点的预测位置,更新第三待跟踪目标的关键点的位置。In some embodiments, the method includes: determining a third target to be tracked; each target to be tracked in the third target to be tracked has a matching detection target; and based on the key points of the detection target matching the third target to be tracked. Detect the position and the predicted position of the key point of the third target to be tracked, and update the position of the key point of the third target to be tracked.
在一些实施例中,该方法包括:确定第五检测目标;第五检测目标中的每个检测目标不存在匹配的待跟踪目标;在待跟踪目标中增加第五检测目标。In some embodiments, the method includes: determining a fifth detection target; each of the fifth detection targets does not have a matching target to be tracked; and adding a fifth detection target to the targets to be tracked.
在一些实施例中,该方法包括:确定第四待跟踪目标以及第四待跟踪目标的不匹配次数;第四待跟踪目标中的每个待跟踪目标不存在匹配的检测目标;不匹配次数为待跟踪目标连续不存在匹配的检测目标的次数;在不匹配次数大于预设跟踪阈值的情况下,在待跟踪目标中删除第四待跟踪目标。In some embodiments, the method includes: determining the fourth target to be tracked and the number of mismatches for the fourth target to be tracked; there is no matching detection target for each target to be tracked in the fourth target to be tracked; the number of mismatches is The number of times that the target to be tracked has no matching detection target continuously; when the number of mismatches is greater than the preset tracking threshold, the fourth target to be tracked is deleted from the targets to be tracked.
在一些实施例中,该方法包括:在不匹配次数小于或等于预设跟踪阈值的情况下,将第四待跟踪目标的关键点的预测位置或者第四待跟踪目标的关键点在第二时刻的位置作为更新后的第四待跟踪目标的关键点的位置。In some embodiments, the method includes: when the number of mismatches is less than or equal to a preset tracking threshold, changing the predicted position of the key point of the fourth target to be tracked or the key point of the fourth target to be tracked at the second moment The position is used as the updated position of the key point of the fourth target to be tracked.
在一些实施例中,该方法包括:在第五待跟踪目标存在匹配的检测目标的情况下,根据匹配的检测目标的关键点的检测位置与第五待跟踪目标的关键点的预测位置更新第五待跟踪目标的关键点的位置;第五待跟踪目标为待跟踪目标中的任一个目标;在第五待跟踪目标不存在匹配的检测目标,且第五待跟踪目标的不匹配次数大于预设跟踪阈值的情况下,在待跟踪目标中删除第五待跟踪目标;不匹配次数为待跟踪目标连续不存在匹配的检测目标的次数;在第六检测目标不存在匹配的待跟踪目标的情况下,在待跟踪目标中增加第六检测目标;第六检测目标为检测目标中的任一个目标。In some embodiments, the method includes: when there is a matching detection target for the fifth target to be tracked, updating the third target according to the detection position of the key point of the matching detection target and the predicted position of the key point of the fifth target to be tracked. The position of the key point of the fifth target to be tracked; the fifth target to be tracked is any target among the targets to be tracked; there is no matching detection target in the fifth target to be tracked, and the number of mismatches of the fifth target to be tracked is greater than the predetermined number When the tracking threshold is set, the fifth target to be tracked is deleted from the targets to be tracked; the number of mismatches is the number of consecutive times that the target to be tracked does not have a matching detection target; in the case where the sixth detection target does not have a matching target to be tracked Next, a sixth detection target is added to the targets to be tracked; the sixth detection target is any target among the detection targets.
在一些实施例中,该方法包括:在第五待跟踪目标不存在匹配的检测目标,且第五待跟踪目标的不匹配次数小于或等于预设跟踪阈值的情况下,将第五待跟踪目标的关键点的预测位置或者第五待跟踪目标在第二时刻的位置作为更新后的第五待跟踪目标的关键点的位置。In some embodiments, the method includes: when there is no matching detection target for the fifth target to be tracked, and the number of mismatches for the fifth target to be tracked is less than or equal to a preset tracking threshold, moving the fifth target to be tracked The predicted position of the key point or the position of the fifth target to be tracked at the second moment is used as the updated position of the key point of the fifth target to be tracked.
在一些实施例中,该方法包括:确定待跟踪目标的关键点的运动状态;根据待跟踪目标的关键点在第二时刻的位置以及运动状态,预测待跟踪目标的关键点在第一时刻的预测位置。In some embodiments, the method includes: determining the motion state of the key points of the target to be tracked; and predicting the position and motion state of the key points of the target to be tracked at the first moment based on the position and motion state of the key points of the target to be tracked at the first moment. Predicted location.
在一些实施例中,该方法包括:在检测目标的数量为0的情况下,确定每个待跟踪目标不存在匹配的检测目标。In some embodiments, the method includes: when the number of detection targets is 0, determining that there is no matching detection target for each target to be tracked.
在一些实施例中,该方法包括:在待跟踪目标的数量为0的情况下,确定每个检测目标不存在匹配的待跟踪目标。In some embodiments, the method includes: when the number of targets to be tracked is 0, determining that there is no matching target to be tracked for each detected target.
另一方面,提供一种目标跟踪装置,包括:处理单元和获取单元。获取单元,被配置为获取第一时刻的待检测图像;处理单元,被配置为确定待检测图像中检测目标的关键点的检测位置;获取单元,还被配置为获取待跟踪 目标的关键点在第二时刻的位置;第二时刻为第一时刻之前的时刻;处理单元,还被配置为根据待跟踪目标的关键点在第二时刻的位置,预测待跟踪目标的关键点在第一时刻的预测位置;处理单元,还被配置为根据检测位置和预测位置,确定检测目标和待跟踪目标之间的匹配关系;匹配关系用于匹配检测目标和待跟踪目标中相同的目标;处理单元,还被配置为根据匹配关系,跟踪待跟踪目标。On the other hand, a target tracking device is provided, including: a processing unit and an acquisition unit. The acquisition unit is configured to acquire the image to be detected at the first moment; the processing unit is configured to determine the detection position of the key point of the detection target in the image to be detected; the acquisition unit is also configured to acquire the key point of the target to be tracked at The position at the second moment; the second moment is the moment before the first moment; the processing unit is also configured to predict the position of the key point of the target to be tracked at the first moment based on the position of the key point of the target to be tracked at the second moment. predicted position; the processing unit is further configured to determine a matching relationship between the detected target and the target to be tracked based on the detected position and the predicted position; the matching relationship is used to match the same target in the detected target and the target to be tracked; the processing unit is also configured to Configured to track the target to be tracked based on the matching relationship.
在一些实施例中,处理单元,被配置为对每个检测目标和每个待跟踪目标执行第一目标操作,确定每个检测目标与每个待跟踪目标之间的距离;第一目标操作包括:根据第i个检测目标中的关键点的检测位置,和第j个待跟踪目标的关键点的预测位置之间的距离,确定第i个检测目标和第j个待跟踪目标之间的距离;其中,i为小于或等于N的正整数;j为小于或等于M的正整数;处理单元,还被配置为根据每个检测目标与每个待跟踪目标之间的距离,确定匹配关系。In some embodiments, the processing unit is configured to perform a first target operation on each detected target and each target to be tracked, and determine a distance between each detected target and each target to be tracked; the first target operation includes : Determine the distance between the i-th detection target and the j-th target to be tracked based on the distance between the detection position of the key point in the i-th detection target and the predicted position of the key point of the j-th target to be tracked ; where i is a positive integer less than or equal to N; j is a positive integer less than or equal to M; the processing unit is also configured to determine a matching relationship based on the distance between each detected target and each target to be tracked.
在一些实施例中,处理单元,被配置为对第i个检测目标与第j个待跟踪目标的每个对应关键点执行第二目标操作,确定每个对应关键点之间的距离;第二目标操作包括:确定第一关键点与第二关键点;根据第一关键点的检测位置和第二关键点的预测位置确定第一关键点与第二关键点之间的距离;第一关键点为第i个检测目标中的任一个关键点;第二关键点为第j个待跟踪目标中与第一关键点对应的关键点;处理单元,还被配置为根据每个对应关键点之间的距离,确定第i个检测目标和第j个待跟踪目标之间的距离。In some embodiments, the processing unit is configured to perform a second target operation on each corresponding key point of the i-th detected target and the j-th target to be tracked, and determine the distance between each corresponding key point; second The target operation includes: determining the first key point and the second key point; determining the distance between the first key point and the second key point based on the detected position of the first key point and the predicted position of the second key point; the first key point is any key point in the i-th detection target; the second key point is the key point corresponding to the first key point in the j-th target to be tracked; the processing unit is also configured to determine the relationship between each corresponding key point The distance determines the distance between the i-th detection target and the j-th target to be tracked.
在一些实施例中,第i个检测目标和第j个待跟踪目标之间的距离通过以下公式来计算:In some embodiments, the distance between the i-th detected target and the j-th target to be tracked is calculated by the following formula:
Figure PCTCN2022083887-appb-000002
Figure PCTCN2022083887-appb-000002
其中,D(i,j)表示第i个检测目标和第j个待跟踪目标之间的距离,p ik表示第i个检测目标的第k个关键点的检测位置,p′ jk表示第j个待跟踪目标的第k个关键点的预测位置,d(p ik,p′ jk)表示第i个检测目标的第k个关键点与第j个待跟踪目标的第k个关键点之间的距离,s表示目标的尺寸信息,v ik表示第i个检测目标的第k个关键点是否被检测到,v′ jk表示第j个待跟踪目标的第k个关键点是否被检测到,δ(v ik,v′ jk)表征第i个检测目标的第k个关键点与第j个待跟踪目标的第k个关键点的检测情况。 Among them, D(i,j) represents the distance between the i-th detection target and the j-th target to be tracked, p ik represents the detection position of the k-th key point of the i-th detection target, and p′ jk represents the j-th The predicted position of the k-th key point of the target to be tracked, d(p ik , p′ jk ) represents the distance between the k-th key point of the i-th detection target and the k-th key point of the j-th target to be tracked The distance of δ(v ik ,v′ jk ) represents the detection situation of the k-th key point of the i-th detection target and the k-th key point of the j-th target to be tracked.
在一些实施例中,匹配关系包括如下中的至少一项:存在至少一个待跟 踪目标与检测目标匹配、存在至少一个待跟踪目标与检测目标不匹配、以及存在至少一个检测目标与待跟踪目标不匹配。In some embodiments, the matching relationship includes at least one of the following: at least one target to be tracked matches the detected target, at least one target to be tracked does not match the detected target, and at least one detected target does not match the target to be tracked. match.
在一些实施例中,处理单元,被配置为确定每个待跟踪目标的权重值与每个检测目标的权重值;其中,任一待跟踪目标的权重值为任一待跟踪目标分别与每个检测目标的距离中最小距离的值;每个检测目标的权重值为预设权重值;对每个待跟踪目标执行第三目标操作,确定与每个待跟踪目标匹配的检测目标;第三目标操作包括:确定与第m个待跟踪目标距离最短的第一检测目标;其中,第一检测目标与第m个待跟踪目标的权重值之和大于或等于第一检测目标与第m个待跟踪目标的距离;m为正整数;对第m个待跟踪目标与第一检测目标执行第四目标操作,确定与第m个待跟踪目标匹配的检测目标;第四目标操作包括:确定是否存在第一待跟踪目标;第一待跟踪目标为根据第三目标操作确定的与第一检测目标匹配的待跟踪目标;在不存在第一待跟踪目标的情况下,确定第m个待跟踪目标与第一检测目标匹配;在存在第一待跟踪目标的情况下,确定第m个待跟踪目标的第一影响值,以及第一待跟踪目标的第二影响值;其中,第一影响值为根据第m个待跟踪目标与第二检测目标确定的差值;差值为一个待跟踪目标与一个检测目标的距离与一个待跟踪目标与一个检测目标的权重之和之间的差值;第二检测目标为除第一检测目标外与第m个待跟踪目标确定的差值最小的检测目标;第二影响值为根据第一待跟踪目标与第三检测目标确定的差值;第三检测目标为除第一检测目标外与第一待跟踪目标确定的差值最小的检测目标;根据第一影响值和第二影响值,确定与第m个待跟踪目标匹配的检测目标。In some embodiments, the processing unit is configured to determine the weight value of each target to be tracked and the weight value of each detected target; wherein the weight value of any target to be tracked is the weight value of any target to be tracked and each target respectively. The value of the minimum distance among the distances of the detected targets; the weight value of each detected target is the preset weight value; perform a third target operation on each target to be tracked, and determine the detection target that matches each target to be tracked; the third target The operation includes: determining the first detected target with the shortest distance from the mth target to be tracked; wherein the sum of the weight values of the first detected target and the mth target to be tracked is greater than or equal to the first detected target and the mth target to be tracked The distance of the target; m is a positive integer; perform the fourth target operation on the mth target to be tracked and the first detection target to determine the detection target matching the mth target to be tracked; the fourth target operation includes: determining whether there is the A target to be tracked; the first target to be tracked is a target to be tracked that matches the first detected target determined according to the third target operation; in the absence of the first target to be tracked, determine the mth target to be tracked and the th target to be tracked Detection target matching; in the case where the first target to be tracked exists, determine the first influence value of the mth target to be tracked, and the second influence value of the first target to be tracked; wherein the first influence value is based on the The difference between m targets to be tracked and the second detection target; the difference is the difference between the distance between a target to be tracked and a detection target and the sum of the weights of a target to be tracked and a detection target; the second detection The target is the detection target with the smallest difference between the mth target to be tracked and the first detection target; the second influence value is the difference determined based on the first target to be tracked and the third detection target; the third detection target is Except for the first detection target, the detection target with the smallest difference determined from the first target to be tracked is determined; based on the first influence value and the second influence value, the detection target matching the mth target to be tracked is determined.
在一些实施例中,处理单元,被配置为在第一影响值小于第二影响值的情况下,对第m个待跟踪目标与第二检测目标执行第四目标操作,确定与第m个待跟踪目标匹配的检测目标;在第一影响值大于第二影响值的情况下,确定第m个待跟踪目标与第一检测目标匹配。In some embodiments, the processing unit is configured to perform a fourth target operation on the mth target to be tracked and the second detected target, and determine the relationship between the mth target to be tracked and the second detected target when the first influence value is less than the second influence value. The tracking target matches the detection target; when the first influence value is greater than the second influence value, it is determined that the mth target to be tracked matches the first detection target.
在一些实施例中,处理单元,被配置为在第一影响值大于第二影响值的情况下,对第一待跟踪目标与第三检测目标执行第四目标操作,确定与第一待跟踪目标匹配的检测目标。In some embodiments, the processing unit is configured to perform a fourth target operation on the first target to be tracked and the third target to be detected, and determine the relationship between the first target to be tracked and the first target to be tracked when the first influence value is greater than the second influence value. Matching detection targets.
在一些实施例中,处理单元,被配置为在第一影响值小于第二影响值的情况下,根据第一影响值更新第m个待跟踪目标、第一待跟踪目标以及第一检测目标的权重值;在第一影响值大于第二影响值的情况下,根据第二影响值更新第m个待跟踪目标、第一待跟踪目标以及第一检测目标的权重值。In some embodiments, the processing unit is configured to update the mth target to be tracked, the first target to be tracked, and the first detected target according to the first influence value when the first influence value is less than the second influence value. Weight value; when the first influence value is greater than the second influence value, the weight values of the mth target to be tracked, the first target to be tracked and the first detected target are updated according to the second influence value.
在一些实施例中,处理单元,被配置为将第m个待跟踪目标的权重值增 加第一影响值,将第一待跟踪目标的权重值增加第一影响值,将第一检测目标的权重值降低第一影响值;处理单元,还被配置为将第m个待跟踪目标的权重值增加第二影响值,将第一待跟踪目标的权重值增加第二影响值,将第一检测目标的权重值降低第二影响值。In some embodiments, the processing unit is configured to increase the weight value of the mth target to be tracked by the first influence value, increase the weight value of the first target to be tracked by the first influence value, and increase the weight value of the first detected target by the first influence value. The value decreases the first influence value; the processing unit is further configured to increase the weight value of the mth target to be tracked by the second influence value, increase the weight value of the first target to be tracked by the second influence value, and increase the weight value of the first detection target by the second influence value. The weight value reduces the second influence value.
在一些实施例中,处理单元,被配置为确定待跟踪目标列表与检测目标列表;其中,待跟踪目标列表包括每个待跟踪目标,检测目标列表包括每个检测目标;对待跟踪目标列表与检测目标列表中的待跟踪目标与检测目标迭代执行第五目标操作,直至待跟踪目标列表中不存在待跟踪目标或者检测目标列表中不存在检测目标,根据第五目标操作的执行结果确定匹配关系;第五目标操作包括:确定当前待跟踪目标列表中的每个待跟踪目标与当前检测目标列表中的每个待跟踪目标之间的目标距离;确定目标距离中的最小距离,以及最小距离对应的第二待跟踪目标和第四检测目标;第二待跟踪目标和第四检测目标之间的距离为最小距离;确定第二待跟踪目标与第四检测目标的匹配关系;从当前待跟踪目标列表中删除第二待跟踪目标,从当前检测目标列表中删除第四检测目标。In some embodiments, the processing unit is configured to determine a list of targets to be tracked and a list of detected targets; wherein the list of targets to be tracked includes each target to be tracked, and the list of detected targets includes each detected target; the list of targets to be tracked and the list of detected targets are The target to be tracked and the detection target in the target list iteratively perform the fifth target operation until there is no target to be tracked in the target list to be tracked or there is no detection target in the detection target list, and the matching relationship is determined based on the execution result of the fifth target operation; The fifth target operation includes: determining the target distance between each target to be tracked in the current target list to be tracked and each target to be tracked in the current detected target list; determining the minimum distance in the target distance, and the minimum distance corresponding to The second target to be tracked and the fourth target to be detected; the distance between the second target to be tracked and the fourth target to be detected is the minimum distance; the matching relationship between the second target to be tracked and the fourth target to be detected is determined; from the current list of targets to be tracked Delete the second target to be tracked from , and delete the fourth detection target from the current detection target list.
在一些实施例中,处理单元,被配置为确定第三待跟踪目标;第三待跟踪目标中的每个待跟踪目标存在匹配的检测目标;处理单元,还被配置为根据与第三待跟踪目标匹配的检测目标的关键点的检测位置以及第三待跟踪目标的关键点的预测位置,更新第三待跟踪目标的关键点的位置。In some embodiments, the processing unit is configured to determine a third target to be tracked; each of the third targets to be tracked has a matching detection target; the processing unit is further configured to determine the third target to be tracked according to The target matches the detected position of the key point of the detected target and the predicted position of the key point of the third target to be tracked, and updates the position of the key point of the third target to be tracked.
在一些实施例中,处理单元,被配置为确定第五检测目标;第五检测目标中的每个检测目标不存在匹配的待跟踪目标;处理单元,还被配置为在待跟踪目标中增加第五检测目标。In some embodiments, the processing unit is configured to determine a fifth detection target; each detection target in the fifth detection target does not have a matching target to be tracked; the processing unit is further configured to add a third target to the target to be tracked. Five detection targets.
在一些实施例中,处理单元,被配置为确定第四待跟踪目标以及第四待跟踪目标的不匹配次数;第四待跟踪目标中的每个待跟踪目标不存在匹配的检测目标;不匹配次数为待跟踪目标连续不存在匹配的检测目标的次数;处理单元,还被配置为在不匹配次数大于预设跟踪阈值的情况下,在待跟踪目标中删除第四待跟踪目标。In some embodiments, the processing unit is configured to determine the fourth target to be tracked and the number of mismatches of the fourth target to be tracked; there is no matching detection target for each target to be tracked in the fourth target to be tracked; no matching The number of times is the number of consecutive times that the target to be tracked does not have a matching detection target; the processing unit is also configured to delete the fourth target to be tracked from the targets to be tracked when the number of mismatches is greater than the preset tracking threshold.
在一些实施例中,处理单元,被配置为在不匹配次数小于或等于预设跟踪阈值的情况下,将第四待跟踪目标的关键点的预测位置或者第四待跟踪目标的关键点在第二时刻的位置作为更新后的第四待跟踪目标的关键点的位置。In some embodiments, the processing unit is configured to, when the number of mismatches is less than or equal to a preset tracking threshold, change the predicted position of the key point of the fourth target to be tracked or the key point of the fourth target to be tracked in the first The position at the second moment is used as the updated position of the key point of the fourth target to be tracked.
在一些实施例中,处理单元,被配置为在第五待跟踪目标存在匹配的检测目标的情况下,根据匹配的检测目标的关键点的检测位置与第五待跟踪目标的关键点的预测位置更新第五待跟踪目标的关键点的位置;第五待跟踪目 标为待跟踪目标中的任一个目标;处理单元,还被配置为在第五待跟踪目标不存在匹配的检测目标,且第五待跟踪目标的不匹配次数大于预设跟踪阈值的情况下,在待跟踪目标中删除第五待跟踪目标;不匹配次数为待跟踪目标连续不存在匹配的检测目标的次数;处理单元,还被配置为在第六检测目标不存在匹配的待跟踪目标的情况下,在待跟踪目标中增加第六检测目标;第六检测目标为检测目标中的任一个目标。In some embodiments, the processing unit is configured to, in the case where a matching detection target exists in the fifth target to be tracked, based on the detection position of the key point of the matching detection target and the predicted position of the key point of the fifth target to be tracked. Update the position of the key point of the fifth target to be tracked; the fifth target to be tracked is any target among the targets to be tracked; the processing unit is also configured to have no matching detection target in the fifth target to be tracked, and the fifth target to be tracked is any one of the targets to be tracked; When the number of mismatches of the target to be tracked is greater than the preset tracking threshold, the fifth target to be tracked is deleted from the targets to be tracked; the number of mismatches is the number of consecutive times that the target to be tracked does not have a matching detection target; the processing unit is also It is configured to add a sixth detection target to the targets to be tracked when the sixth detection target does not have a matching target to be tracked; the sixth detection target is any target among the detection targets.
在一些实施例中,处理单元,被配置为在第五待跟踪目标不存在匹配的检测目标,且第五待跟踪目标的不匹配次数小于或等于预设跟踪阈值的情况下,将第五待跟踪目标的关键点的预测位置或者第五待跟踪目标在第二时刻的位置作为更新后的第五待跟踪目标的关键点的位置。In some embodiments, the processing unit is configured to, when the fifth target to be tracked does not have a matching detection target and the number of mismatches of the fifth target to be tracked is less than or equal to a preset tracking threshold, The predicted position of the key point of the tracking target or the position of the fifth target to be tracked at the second moment is used as the updated position of the key point of the fifth target to be tracked.
在一些实施例中,处理单元,被配置为确定待跟踪目标的关键点的运动状态;处理单元,还被配置为根据待跟踪目标的关键点在第二时刻的位置以及运动状态,预测待跟踪目标的关键点在第一时刻的预测位置。In some embodiments, the processing unit is configured to determine the motion state of the key points of the target to be tracked; the processing unit is also configured to predict the position and motion state of the key points of the target to be tracked at the second moment. The predicted position of the key point of the target at the first moment.
在一些实施例中,处理单元,被配置为在检测目标的数量为0的情况下,确定每个待跟踪目标不存在匹配的检测目标。In some embodiments, the processing unit is configured to determine that there is no matching detection target for each target to be tracked when the number of detection targets is 0.
在一些实施例中,处理单元,被配置为在待跟踪目标的数量为0的情况下,确定每个检测目标不存在匹配的待跟踪目标。In some embodiments, the processing unit is configured to determine that there is no matching target to be tracked for each detected target when the number of targets to be tracked is 0.
再一方面,提供一种非暂态计算机可读存储介质。所述计算机可读存储介质存储有计算机程序指令,所述计算机程序指令在计算机(例如,目标跟踪装置)上运行时,使得所述计算机执行如上述任一实施例所述的目标跟踪方法。In yet another aspect, a non-transitory computer-readable storage medium is provided. The computer-readable storage medium stores computer program instructions. When the computer program instructions are run on a computer (for example, a target tracking device), they cause the computer to execute the target tracking method as described in any of the above embodiments.
又一方面,提供一种计算机程序产品。所述计算机程序产品包括计算机程序指令,在计算机(例如,目标跟踪装置)上执行所述计算机程序指令时,所述计算机程序指令使计算机执行如上述任一实施例所述的目标跟踪方法。In yet another aspect, a computer program product is provided. The computer program product includes computer program instructions. When the computer program instructions are executed on a computer (eg, a target tracking device), the computer program instructions cause the computer to perform the target tracking method as described in any of the above embodiments.
又一方面,提供一种计算机程序。当所述计算机程序在计算机(例如,目标跟踪装置)上执行时,所述计算机程序使计算机执行如上述任一实施例所述的目标跟踪方法。In yet another aspect, a computer program is provided. When the computer program is executed on a computer (eg, a target tracking device), the computer program causes the computer to perform the target tracking method as described in any of the above embodiments.
又一方面,提供一种目标跟踪装置,该装置包括:处理器和存储器;存储器用于存储计算机程序或指令,处理器用于运行计算机程序或指令,以实现如上述任一实施例所述的目标跟踪方法。In another aspect, a target tracking device is provided. The device includes: a processor and a memory; the memory is used to store computer programs or instructions, and the processor is used to run the computer programs or instructions to achieve the goals described in any of the above embodiments. Tracking methods.
又一方面,提供一种芯片,芯片包括处理器和通信接口,通信接口和处理器耦合,处理器用于运行计算机程序或指令,以实现如上述任一实施例所述的目标跟踪方法。In another aspect, a chip is provided. The chip includes a processor and a communication interface. The communication interface is coupled to the processor. The processor is used to run computer programs or instructions to implement the target tracking method as described in any of the above embodiments.
示例性的,本公开中提供的芯片还包括存储器,用于存储计算机程序或指令。Exemplarily, the chip provided in the present disclosure also includes a memory for storing computer programs or instructions.
需要说明的是,上述计算机指令可以全部或者部分存储在计算机可读存储介质上。其中,计算机可读存储介质可以与装置的处理器封装在一起的,也可以与装置的处理器单独封装,本公开对此不作限定。It should be noted that the above computer instructions may be stored in whole or in part on a computer-readable storage medium. The computer-readable storage medium may be packaged together with the processor of the device, or may be packaged separately from the processor of the device, which is not limited in this disclosure.
又一方面,提供一种目标跟踪系统,包括:目标跟踪装置和图像采集装置,其中,图像采集装置用于采集待检测图像,目标跟踪装置用于执行如上述任一实施例所述的目标跟踪方法。In another aspect, a target tracking system is provided, including: a target tracking device and an image acquisition device, wherein the image acquisition device is used to collect images to be detected, and the target tracking device is used to perform target tracking as described in any of the above embodiments. method.
在本公开中,上述目标跟踪装置的名字对设备或功能模块本身不构成限定,在实际实现中,这些设备或功能模块可以以其他名称出现。只要各个设备或功能模块的功能和本公开类似,属于本公开权利要求及其等同技术的范围之内。In this disclosure, the name of the above-mentioned target tracking device does not limit the device or functional module itself. In actual implementation, these devices or functional modules may appear under other names. As long as the functions of each device or functional module are similar to the present disclosure, they fall within the scope of the claims of the present disclosure and its equivalent technology.
附图说明Description of drawings
为了更清楚地说明本公开中的技术方案,下面将对本公开一些实施例中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本公开的一些实施例的附图,对于本领域普通技术人员来讲,还可以根据这些附图获得其他的附图。此外,以下描述中的附图可以视作示意图,并非对本公开实施例所涉及的产品的实际尺寸、方法的实际流程、信号的实际时序等的限制。In order to explain the technical solutions in the present disclosure more clearly, the drawings required to be used in some embodiments of the present disclosure will be briefly introduced below. Obviously, the drawings in the following description are only appendices of some embodiments of the present disclosure. For those of ordinary skill in the art, other drawings can also be obtained based on these drawings. In addition, the drawings in the following description can be regarded as schematic diagrams and are not intended to limit the actual size of the product, the actual flow of the method, the actual timing of the signals, etc. involved in the embodiments of the present disclosure.
图1为根据一些实施例提供的一种目标跟踪系统10的架构图;Figure 1 is an architectural diagram of a target tracking system 10 provided according to some embodiments;
图2为根据一些实施例提供的一种目标与关键点的关系图;Figure 2 is a relationship diagram between goals and key points provided according to some embodiments;
图3为根据一些实施例提供的一种目标跟踪方法的流程图;Figure 3 is a flow chart of a target tracking method provided according to some embodiments;
图4为根据一些实施例提供的一种检测目标与待跟踪目标的匹配关系图;Figure 4 is a matching relationship diagram between a detected target and a target to be tracked according to some embodiments;
图5为根据一些实施例提供的另一种目标跟踪方法的流程图;Figure 5 is a flow chart of another target tracking method provided according to some embodiments;
图6为根据一些实施例提供的一种目标跟踪的场景图;Figure 6 is a scene diagram of target tracking provided according to some embodiments;
图7为相关技术中的一种目标跟踪的原理图;Figure 7 is a schematic diagram of target tracking in related technology;
图8为根据本公开一些实施例提供的一种目标跟踪的原理图;Figure 8 is a schematic diagram of a target tracking provided according to some embodiments of the present disclosure;
图9为根据一些实施例提供的另一种目标跟踪方法的流程图;Figure 9 is a flow chart of another target tracking method provided according to some embodiments;
图10为根据一些实施例提供的第三目标操作的流程图;Figure 10 is a flowchart of a third target operation provided in accordance with some embodiments;
图11为根据一些实施例提供的第四目标操作的流程图;Figure 11 is a flowchart of a fourth target operation provided in accordance with some embodiments;
图12为根据一些实施例提供的另一种目标跟踪方法的流程图;Figure 12 is a flow chart of another target tracking method provided according to some embodiments;
图13为根据一些实施例提供的第五目标操作的流程图;Figure 13 is a flowchart of a fifth target operation provided in accordance with some embodiments;
图14为根据一些实施例提供的另一种目标跟踪方法的流程图;Figure 14 is a flow chart of another target tracking method provided according to some embodiments;
图15为根据一些实施例提供的一种待跟踪目标与对应匹配的检测目标的关键点的关系图;Figure 15 is a relationship diagram between a target to be tracked and key points of corresponding matching detected targets provided according to some embodiments;
图16为根据一些实施例提供的另一种目标跟踪方法的流程图;Figure 16 is a flow chart of another target tracking method provided according to some embodiments;
图17为根据一些实施例提供的一种目标跟踪装置的结构图;Figure 17 is a structural diagram of a target tracking device provided according to some embodiments;
图18为根据一些实施例提供的另一种目标跟踪装置的结构图。Figure 18 is a structural diagram of another target tracking device provided according to some embodiments.
具体实施方式Detailed ways
下面将结合附图,对本公开一些实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本公开一部分实施例,而不是全部的实施例。基于本公开所提供的实施例,本领域普通技术人员所获得的所有其他实施例,都属于本公开保护的范围。The technical solutions in some embodiments of the present disclosure will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some of the embodiments of the present disclosure, rather than all of the embodiments. Based on the embodiments provided by this disclosure, all other embodiments obtained by those of ordinary skill in the art fall within the scope of protection of this disclosure.
除非上下文另有要求,否则,在整个说明书和权利要求书中,术语“包括(comprise)”及其其他形式例如第三人称单数形式“包括(comprises)”和现在分词形式“包括(comprising)”被解释为开放、包含的意思,即为“包含,但不限于”。在说明书的描述中,术语“一个实施例(one embodiment)”、“一些实施例(some embodiments)”、“示例性实施例(exemplary embodiments)”、“示例(example)”、“特定示例(specific example)”或“一些示例(some examples)”等旨在表明与该实施例或示例相关的特定特征、结构、材料或特性包括在本公开的至少一个实施例或示例中。上述术语的示意性表示不一定是指同一实施例或示例。此外,所述的特定特征、结构、材料或特点可以以任何适当方式包括在任何一个或多个实施例或示例中。Unless the context otherwise requires, throughout the specification and claims, the term "comprise" and its other forms such as the third person singular "comprises" and the present participle "comprising" are used. Interpreted as open and inclusive, it means "including, but not limited to." In the description of the specification, the terms "one embodiment", "some embodiments", "exemplary embodiments", "example", "specific "example" or "some examples" and the like are intended to indicate that a particular feature, structure, material or characteristic associated with the embodiment or example is included in at least one embodiment or example of the present disclosure. The schematic representations of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the particular features, structures, materials or characteristics described may be included in any suitable manner in any one or more embodiments or examples.
以下,术语“第一”、“第二”仅用于描述目的,而不能理解为指示或暗示相对重要性或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”的特征可以明示或者隐含地包括一个或者更多个该特征。在本公开实施例的描述中,除非另有说明,“多个”的含义是两个或两个以上。Hereinafter, the terms “first” and “second” are used for descriptive purposes only and cannot be understood as indicating or implying relative importance or implicitly indicating the quantity of indicated technical features. Therefore, features defined as "first" and "second" may explicitly or implicitly include one or more of these features. In the description of the embodiments of the present disclosure, unless otherwise specified, "plurality" means two or more.
在描述一些实施例时,可能使用了“耦接”和“连接”及其衍伸的表达。例如,描述一些实施例时可能使用了术语“连接”以表明两个或两个以上部件彼此间有直接物理接触或电接触。又如,描述一些实施例时可能使用了术语“耦接”以表明两个或两个以上部件有直接物理接触或电接触。然而,术语“耦接”或“通信耦合(communicatively coupled)”也可能指两个或两个以上部件彼此间并无直接接触,但仍彼此协作或相互作用。这里所公开的实施例并不必然限制于本文内容。In describing some embodiments, expressions "coupled" and "connected" and their derivatives may be used. For example, some embodiments may be described using the term "connected" to indicate that two or more components are in direct physical or electrical contact with each other. As another example, the term "coupled" may be used when describing some embodiments to indicate that two or more components are in direct physical or electrical contact. However, the terms "coupled" or "communicatively coupled" may also refer to two or more components that are not in direct contact with each other but still cooperate or interact with each other. The embodiments disclosed herein are not necessarily limited by the content herein.
“A、B和C中的至少一个”与“A、B或C中的至少一个”具有相同含义,均包括以下A、B和C的组合:仅A,仅B,仅C,A和B的组合,A 和C的组合,B和C的组合,及A、B和C的组合。"At least one of A, B and C" has the same meaning as "at least one of A, B or C" and includes the following combinations of A, B and C: A only, B only, C only, A and B The combination of A and C, the combination of B and C, and the combination of A, B and C.
“A和/或B”,包括以下三种组合:仅A,仅B,及A和B的组合。"A and/or B" includes the following three combinations: A only, B only, and a combination of A and B.
如本文中所使用,根据上下文,术语“如果”任选地被解释为意思是“当……时”或“在……时”或“响应于确定”或“响应于检测到”。类似地,根据上下文,短语“如果确定……”或“如果检测到[所陈述的条件或事件]”任选地被解释为是指“在确定……时”或“响应于确定……”或“在检测到[所陈述的条件或事件]时”或“响应于检测到[所陈述的条件或事件]”。As used herein, the term "if" is optionally interpreted to mean "when" or "in response to" or "in response to determining" or "in response to detecting," depending on the context. Similarly, depending on the context, the phrase "if it is determined..." or "if [stated condition or event] is detected" is optionally interpreted to mean "when it is determined..." or "in response to the determination..." or “on detection of [stated condition or event]” or “in response to detection of [stated condition or event]”.
本文中“适用于”或“被配置为”的使用意味着开放和包容性的语言,其不排除适用于或被配置为执行额外任务或步骤的设备。The use of "suitable for" or "configured to" in this document implies open and inclusive language that does not exclude devices that are suitable for or configured to perform additional tasks or steps.
另外,“基于”的使用意味着开放和包容性,因为“基于”一个或多个所述条件或值的过程、步骤、计算或其他动作在实践中可以基于额外条件或超出所述的值。Additionally, the use of "based on" is meant to be open and inclusive in that a process, step, calculation or other action "based on" one or more stated conditions or values may in practice be based on additional conditions or beyond the stated values.
如本文所使用的那样,“约”、“大致”或“近似”包括所阐述的值以及处于特定值的可接受偏差范围内的平均值,其中所述可接受偏差范围如由本领域普通技术人员考虑到正在讨论的测量以及与特定量的测量相关的误差(即,测量系统的局限性)所确定。As used herein, "about," "approximately," or "approximately" includes the stated value as well as an average within an acceptable range of deviations from the particular value, as determined by one of ordinary skill in the art. Determined taking into account the measurement in question and the errors associated with the measurement of the specific quantity (i.e., the limitations of the measurement system).
以下,对本公开实施例涉及的名词进行解释,以方便读者理解。In the following, nouns involved in the embodiments of the present disclosure are explained to facilitate readers' understanding.
(1)关键点检测(1)Key point detection
关键点检测用于检测目标对应的特定节点,能够用于行为识别、姿态分析等方面。其中,关键点检测算法包括自上而下的检测方法以及自下而上的检测方法。自上而下的检测方法为对图像进行目标检测,并根据检测出的目标进行关键点检测。例如自上而下的检测方法包括HRNet算法(Deep High-Resolution Representation Learning for Human Pose Estimation)。自下而上的检测方法为从图像中检测出全部关键点,然后根据每个关键点的位置进行聚类,从而得到相关联的关键点对应的目标。例如自下而上的检测方法包括OpenPose算法(Realtime Multi-Person 2D Pose Estimation using Part Affinity Fields)。Key point detection is used to detect specific nodes corresponding to the target, and can be used for behavior recognition, posture analysis, etc. Among them, key point detection algorithms include top-down detection methods and bottom-up detection methods. The top-down detection method is to detect targets in images and perform key point detection based on the detected targets. For example, top-down detection methods include the HRNet algorithm (Deep High-Resolution Representation Learning for Human Pose Estimation). The bottom-up detection method is to detect all key points from the image, and then cluster according to the position of each key point to obtain the target corresponding to the associated key point. For example, bottom-up detection methods include the OpenPose algorithm (Realtime Multi-Person 2D Pose Estimation using Part Affinity Fields).
(2)匈牙利算法(Hungarian algorithm)(2)Hungarian algorithm
匈牙利算法用于确定两个集合中元素的匹配关系,即对两个集合中的元素进行数据关联,从而得到组合数量尽可能多的匹配结果。The Hungarian algorithm is used to determine the matching relationship between elements in two sets, that is, to perform data association on the elements in the two sets to obtain matching results with as many combinations as possible.
(3)KM算法(Kuhn-Munkres algorithm)(3)KM algorithm (Kuhn-Munkres algorithm)
KM算法在匈牙利算法的基础上,将两个集合中元素的关联程度作为权重,对两个集合中的元素进行数据关联,从而得到匹配程度最优的匹配结果。Based on the Hungarian algorithm, the KM algorithm uses the correlation degree of the elements in the two sets as weights to perform data correlation on the elements in the two sets, thereby obtaining a matching result with the optimal matching degree.
(4)交并比(4) Cross-union ratio
交并比(intersection over union,IoU)是指两个图像区域的交集面积与两个图像区域的并集面积的比值。IoU通常用于检测两个图像区域的关系,例如通过计算视频数据流的不同帧图像中的检测目标的IoU,对检测目标进行跟踪。The intersection over union (IoU) refers to the ratio of the intersection area of two image areas to the union area of the two image areas. IoU is usually used to detect the relationship between two image areas. For example, by calculating the IoU of the detection target in different frame images of the video data stream, the detection target is tracked.
在图像处理领域中,对于目标以及关键点的检测跟踪的相关方案在行为识别、姿态分析以及三维关键点估计等方面都具有广泛的应用。例如对行人进行跟踪能够用于确定行人的路线轨迹,对行人的关键点跟踪能够用于判断该行人是否跌倒。In the field of image processing, related solutions for detection and tracking of targets and key points are widely used in behavior recognition, posture analysis, and three-dimensional key point estimation. For example, tracking pedestrians can be used to determine the pedestrian's route trajectory, and tracking key points of the pedestrian can be used to determine whether the pedestrian has fallen.
相关技术通常需要分别对目标对象进行目标检测以及关键点检测,并根据目标检测得到的外包框图像对目标对象进行跟踪,从而基于目标对象的外包框图像与关键点的关联关系间接地对关键点进行跟踪。相关技术还会对目标对象进行关键点检测,并基于关键点生成目标对象的外包框图像,从而根据生成的外包框图像对目标对象进行跟踪。然而上述方案受外包框图像的变化影响较大,导致跟踪目标对象不稳定,同时难以将目标对象的外包框图像与关键点一一对应,因此对关键点的跟踪效果较差。此外,上述方案需要对目标对象进行目标检测,从而间接实现对关键点的跟踪,计算开销大,使得方案的计算成本较高。Related technologies usually require target detection and key point detection of the target object respectively, and tracking the target object based on the outer box image obtained by the target detection, so as to indirectly detect the key points based on the relationship between the outer box image of the target object and the key points. Follow up. The related technology will also detect key points of the target object and generate an outer box image of the target object based on the key points, so as to track the target object based on the generated outer box image. However, the above scheme is greatly affected by changes in the outer box image, resulting in unstable tracking of the target object. At the same time, it is difficult to correspond one-to-one between the outer box image of the target object and the key points, so the tracking effect of the key points is poor. In addition, the above scheme requires target detection of the target object to indirectly achieve tracking of key points, and the calculation overhead is large, making the calculation cost of the scheme high.
鉴于此,本公开提供了一种目标跟踪方法,根据检测目标的关键点的检测位置以及待跟踪目标的关键点的预测位置,对待跟踪目标以及检测目标进行匹配,并根据匹配关系更新待跟踪目标以及待跟踪目标的关键点。因此,本公开能够直接基于关键点对目标进行跟踪,提高了目标跟踪的稳定性,同时降低了计算开销,从而降低了计算成本。In view of this, the present disclosure provides a target tracking method that matches the target to be tracked and the detected target according to the detected position of the key point of the detected target and the predicted position of the key point of the target to be tracked, and updates the target to be tracked according to the matching relationship and the key points of the target to be tracked. Therefore, the present disclosure can directly track targets based on key points, improve the stability of target tracking, and at the same time reduce computational overhead, thereby reducing computational costs.
下面将结合说明书附图,对本公开实施例的实施方式进行详细描述。The implementation of the embodiments of the present disclosure will be described in detail below with reference to the accompanying drawings.
图1为根据一些实施例提供的一种目标跟踪系统10的架构图,如图1所示,该目标跟踪系统10包括:目标跟踪装置101与图像采集装置102。目标跟踪装置101与图像采集装置102通过通信链路连接。该通信链路可以为有线通信链路,也可以为无线通信链路,本公开对此不予限制。Figure 1 is an architectural diagram of a target tracking system 10 according to some embodiments. As shown in Figure 1, the target tracking system 10 includes: a target tracking device 101 and an image acquisition device 102. The target tracking device 101 and the image acquisition device 102 are connected through a communication link. The communication link may be a wired communication link or a wireless communication link, which is not limited by this disclosure.
需要说明的是,本公开中的目标跟踪装置101以及图像采集装置102可以为一个,也可以为多个。为方便理解,图1中仅示出了一个目标跟踪装置101和图像采集装置102。It should be noted that the target tracking device 101 and the image acquisition device 102 in this disclosure may be one or multiple. For ease of understanding, only one target tracking device 101 and image acquisition device 102 are shown in FIG. 1 .
其中,图像采集装置102被配置为获取目标区域的待检测图像,并向目标跟踪装置101发送该待检测图像。相应的,目标跟踪装置101接收图像采集装置102发送的待检测图像。The image acquisition device 102 is configured to acquire an image to be detected of the target area and send the image to be detected to the target tracking device 101 . Correspondingly, the target tracking device 101 receives the image to be detected sent by the image acquisition device 102.
一种可能的实现方式中,图像采集装置102可以实时获取目标区域的待检测图像,并向目标跟踪装置101发送该待检测图像。图像采集装置102还可以按照预设频率获取目标区域的待检测图像,并向目标跟踪装置101发送包括待检测图像的视频流数据。In a possible implementation, the image acquisition device 102 can acquire an image to be detected of the target area in real time, and send the image to be detected to the target tracking device 101 . The image acquisition device 102 can also acquire the image to be detected of the target area at a preset frequency, and send the video stream data including the image to be detected to the target tracking device 101 .
本公开实施例中的图像采集装置102为通过感光器将图像数据转换为模拟信号或者数字信号的装置,可以部署在陆地上,包括室内或室外、手持或车载。也可以部署在水面上(如轮船等)。还可以部署在空中(例如飞机、气球和卫星上等)。例如,图像采集装置102包括摄像头、摄像机、相机。图像采集装置102也可以是具有摄像功能的设备,例如,图像采集装置102可以为具有摄像功能的手机、平板电脑、笔记本电脑、掌上电脑、可穿戴设备(例如智能手表、智能手环、计步器等),车载设备飞行设备(例如,智能机器人、热气球、无人机、飞机)等。The image acquisition device 102 in the embodiment of the present disclosure is a device that converts image data into analog signals or digital signals through a photoreceptor, and can be deployed on land, including indoors or outdoors, handheld or vehicle-mounted. It can also be deployed on water (such as ships, etc.). It can also be deployed in the air (such as on airplanes, balloons, satellites, etc.). For example, the image capture device 102 includes a camera, a video camera, and a still camera. The image acquisition device 102 may also be a device with a camera function. For example, the image acquisition device 102 may be a mobile phone, a tablet computer, a notebook computer, a handheld computer, or a wearable device (such as a smart watch, a smart bracelet, or a pedometer) with a camera function. machines, etc.), vehicle-mounted equipment and flight equipment (such as intelligent robots, hot air balloons, drones, airplanes), etc.
示例性的,本公开实施例中的图像采集装置102还可以是红外成像仪或者夜视仪,用于获取黑暗区域的图像数据。Exemplarily, the image acquisition device 102 in the embodiment of the present disclosure may also be an infrared imager or a night vision device, used to acquire image data in dark areas.
其中,目标跟踪装置101被配置为获取第一时刻的待检测图像,并根据待检测图像确定检测目标的关键点的检测位置。Wherein, the target tracking device 101 is configured to obtain an image to be detected at the first moment, and determine the detection position of a key point of the detection target based on the image to be detected.
目标跟踪装置101还被配置为确定待跟踪目标的关键点在第一时刻的预测位置,并根据检测位置和预测位置,对待跟踪目标和待跟踪目标的关键点进行跟踪。The target tracking device 101 is further configured to determine the predicted position of the key point of the target to be tracked at the first moment, and to track the target to be tracked and the key points of the target to be tracked based on the detected position and the predicted position.
其中,检测目标为目标跟踪装置101从待检测图像中检测到的目标,待跟踪目标为目标跟踪装置101进行跟踪的目标。关键点为目标(检测目标和/或待跟踪目标)对应的特定部位的结点。本公开中的目标可以为自然界客观存在的具有形体的物质,例如人员、动物、植物、车辆、商品等。The detection target is a target detected by the target tracking device 101 from the image to be detected, and the target to be tracked is a target tracked by the target tracking device 101 . Key points are nodes at specific parts corresponding to the target (detection target and/or target to be tracked). The targets in this disclosure may be physical substances that exist objectively in nature, such as people, animals, plants, vehicles, commodities, etc.
以目标为人员为例,图2为根据一些实施例提供的一种目标与关键点的关系图。如图2所示,目标201可以为本公开中的检测目标或者待跟踪目标,实心点202为该目标102对应的关键点。关键点的数量以及位置可以根据实际情况设置,本公开对此不作限定。Taking the target as a person as an example, Figure 2 is a relationship diagram between targets and key points provided according to some embodiments. As shown in FIG. 2 , the target 201 may be a detection target or a target to be tracked in this disclosure, and the solid point 202 is the key point corresponding to the target 102 . The number and location of key points can be set according to actual conditions, and this disclosure does not limit this.
需要说明的是,第一时刻的检测目标与待跟踪目标的数量可以为0个,也可以为一个或多个。It should be noted that the number of detected targets and targets to be tracked at the first moment may be 0, or may be one or more.
示例性的,当第一时刻为初始时刻(例如当前待检测图像为第1帧图像)时,此时待跟踪目标的数量为0。当目标跟踪装置101检测到待检测图像中不存在检测目标以及检测目标的关键点时,检测目标的数量为0。当目标跟踪装置101检测到待检测图像中存在检测目标以及检测目标的关键点时,检测目 标的数量为一个或多个。For example, when the first time is the initial time (for example, the current image to be detected is the first frame image), the number of targets to be tracked at this time is 0. When the target tracking device 101 detects that there are no detection targets and key points of the detection targets in the image to be detected, the number of detection targets is 0. When the target tracking device 101 detects that there are detection targets and key points of the detection targets in the image to be detected, the number of detection targets is one or more.
本公开中的关键点的位置可以为待检测图像中关键点相对于待检测图像的相对位置,也可以为基于待检测图像的相对位置与待检测图像对应的区域确定的实际位置。The position of the key point in this disclosure may be the relative position of the key point in the image to be detected relative to the image to be detected, or it may be the actual position determined based on the relative position of the image to be detected and the area corresponding to the image to be detected.
本公开中的目标跟踪装置101可以执行实时跟踪目标的操作,即持续获取当前时刻的待检测图像,并对待跟踪目标进行跟踪。目标跟踪装置101也可以执行非实时跟踪目标的操作,即根据过去一段时间内的图像数据流对待跟踪目标进行跟踪。The target tracking device 101 in the present disclosure can perform the operation of tracking the target in real time, that is, continuously acquiring the image to be detected at the current moment, and tracking the target to be tracked. The target tracking device 101 can also perform non-real-time tracking of the target, that is, track the target to be tracked based on the image data stream in the past period of time.
本公开实施例中的目标跟踪装置101可以为服务器,包括:The target tracking device 101 in the embodiment of the present disclosure may be a server, including:
处理器,处理器可以是一个通用中央处理器(central processing unit,CPU),微处理器,特定应用集成电路(application-specific integrated circuit,ASIC),或一个或多个用于控制本公开方案程序执行的集成电路。Processor, the processor can be a general central processing unit (CPU), a microprocessor, an application-specific integrated circuit (ASIC), or one or more programs for controlling the disclosed solution implemented integrated circuit.
收发器,收发器可以是使用任何收发器一类的装置,用于与其他设备或通信网络通信,如以太网,无线接入网(radio access network,RAN),无线局域网(wireless local area networks,WLAN)等。Transceiver, a transceiver can be any device such as a transceiver used to communicate with other devices or communication networks, such as Ethernet, radio access network (RAN), wireless local area networks, WLAN) etc.
存储器,存储器可以是只读存储器(read-only memory,ROM)或可存储静态信息和指令的其他类型的静态存储设备,随机存取存储器(random access memory,RAM)或者可存储信息和指令的其他类型的动态存储设备,也可以是电可擦可编程只读存储器(electrically erasable programmable read-only memory,EEPROM)、只读光盘(compact disc read-only memory,CD-ROM)或其他光盘存储、光碟存储(包括压缩光碟、激光碟、光碟、数字通用光碟、蓝光光碟等)、磁盘存储介质或者其他磁存储设备、或者能够用于携带或存储具有指令或数据结构形式的期望的程序代码并能够由计算机存取的任何其他介质,但不限于此。存储器可以是独立存在,通过通信线路与处理器相连接。存储器也可以和处理器集成在一起。Memory, memory can be read-only memory (ROM) or other types of static storage devices that can store static information and instructions, random access memory (random access memory, RAM) or other types that can store information and instructions. Type of dynamic storage device, it can also be electrically erasable programmable read-only memory (EEPROM), compact disc read-only memory (CD-ROM) or other optical disk storage, optical disc Storage (including compact discs, laser discs, optical discs, digital versatile discs, Blu-ray discs, etc.), magnetic disk storage media or other magnetic storage devices, or can be used to carry or store desired program code in the form of instructions or data structures and can be used by Any other media accessible by a computer, but not limited to this. The memory can exist independently and be connected to the processor through communication lines. Memory can also be integrated with the processor.
目标跟踪装置101也可以为该服务器安装的提供目标跟踪功能的应用程序,或者,目标跟踪装置101可以为服务器中的中央处理器,又或者,目标跟踪装置101可以为该服务器中被配置为执行目标跟踪方法的控制模块。目标跟踪装置101也可以与图像采集装置102耦合为同一个装置。The target tracking device 101 can also be an application program installed on the server that provides a target tracking function, or the target tracking device 101 can be a central processing unit in the server, or the target tracking device 101 can be configured to execute in the server. Control module of target tracking method. The target tracking device 101 may also be coupled to the image acquisition device 102 as the same device.
需要指出的是,本公开各实施例之间可以相互借鉴或参考,例如,相同或相似的步骤,方法实施例、系统实施例和装置实施例之间,均可以相互参考,不予限制。It should be noted that the various embodiments of the present disclosure can be used for reference or reference to each other. For example, the same or similar steps, method embodiments, system embodiments and device embodiments can be referred to each other without limitation.
图3为根据一些实施例提供的一种目标跟踪方法的流程图。如图3所示, 该方法包括以下步骤:Figure 3 is a flow chart of a target tracking method provided according to some embodiments. As shown in Figure 3, the method includes the following steps:
步骤301、目标跟踪装置获取第一时刻的待检测图像。Step 301: The target tracking device acquires the image to be detected at the first moment.
其中,待检测图像为针对目标区域采集的图像。Among them, the image to be detected is an image collected for the target area.
示例性的,目标区域可以为机场候车区、道路、景区、建筑楼梯通道等区域。For example, the target area can be an airport waiting area, a road, a scenic spot, a building stair passage, etc.
其中,第一时刻可以为目标跟踪装置获取待检测图像的当前时刻。The first time may be the current time when the target tracking device obtains the image to be detected.
一种可能的实现方式中,目标跟踪装置可以从图像采集装置中实时获取待检测图像,并将当前时刻作为第一时刻。In a possible implementation, the target tracking device can acquire the image to be detected from the image acquisition device in real time, and use the current moment as the first moment.
或者,第一时刻可以为待检测图像的采集时刻。其中,采集时刻为图像采集装置采集该待检测图像的时刻。Alternatively, the first moment may be the acquisition moment of the image to be detected. The collection time is the time when the image collection device collects the image to be detected.
又一种可能的实现方式中,目标跟踪装置可以按照预设频率从图像采集装置中获取包括待检测图像的视频流数据,并将所检测的待检测图像的图像帧的采集时刻作为第一时刻。In yet another possible implementation, the target tracking device may obtain video stream data including the image to be detected from the image acquisition device at a preset frequency, and use the acquisition time of the image frame of the image to be detected as the first time. .
步骤302、目标跟踪装置确定待检测图像中检测目标的关键点的检测位置。Step 302: The target tracking device determines the detection position of the key point of the detection target in the image to be detected.
其中,检测目标的数量可以为0个,也可以为一个或多个。检测目标的关键点的检测位置可以为待检测图像中关键点相对于待检测图像的相对位置,也可以为基于待检测图像的相对位置与待检测图像对应的区域确定的实际位置。Among them, the number of detection targets can be 0, or one or more. The detection position of the key point of the detection target may be the relative position of the key point in the image to be detected relative to the image to be detected, or it may be the actual position determined based on the relative position of the image to be detected and the area corresponding to the image to be detected.
一种可能的实现方式中,目标跟踪装置可以根据检测目标的部位确定检测目标的关键点的标识。也即是说,本公开中的每个检测目标中相同部位的关键点的标识相同。因此,目标跟踪装置可以根据标识确定不同目标的关键点的对应关系。In a possible implementation, the target tracking device may determine the identification of key points of the detected target based on the location of the detected target. That is to say, the identification of key points of the same part in each detection target in this disclosure is the same. Therefore, the target tracking device can determine the corresponding relationship between the key points of different targets based on the identification.
需要说明的是,本公开中的关键点的数量可以根据实际情况设置。但是目标跟踪装置在确定检测目标的关键点的位置信息时,可能存在部分关键点由于遮挡等因素未被检测出来,此时目标跟踪装置可以将未被检测到的关键点的位置信息设置为预设位置数值(例如(-1,-1))。该预设位置数值用于表示该关键点未被检测到。It should be noted that the number of key points in this disclosure can be set according to actual conditions. However, when the target tracking device determines the position information of the key points of the detected target, some key points may not be detected due to factors such as occlusion. In this case, the target tracking device can set the position information of the undetected key points as preset values. Set the position value (for example (-1, -1)). This preset position value is used to indicate that the key point has not been detected.
一种可能的实现方式中,目标跟踪装置将待检测图像输入关键点检测模型中,得到关键点检测结果。In one possible implementation, the target tracking device inputs the image to be detected into the key point detection model to obtain the key point detection result.
其中,关键点检测结果包括检测目标以及检测目标对应的关键点。Among them, the key point detection results include the detection target and the key points corresponding to the detection target.
示例性的,关键点检测结果可以为数据大小为N*K*A的数据向量。其中,N表示检测目标的数量,K表示关键点的数量,A表示关键点的位置信息。当位置信息为二维坐标时,位置信息可以表示为(x,y)。对于未被检测到的关 键点,目标跟踪装置可以将未被检测到的关键点的位置信息设置为(-1,-1)。关键点检测模型可以为自上而下的关键点检测模型,例如HRnet模型,关键点检测模型也可以为自下而上的关键点检测模型,例如OpenPose模型。For example, the key point detection result may be a data vector with a data size of N*K*A. Among them, N represents the number of detection targets, K represents the number of key points, and A represents the location information of the key points. When the position information is two-dimensional coordinates, the position information can be expressed as (x, y). For undetected key points, the target tracking device may set the location information of the undetected key points to (-1, -1). The key point detection model can be a top-down key point detection model, such as the HRnet model, and the key point detection model can also be a bottom-up key point detection model, such as the OpenPose model.
步骤303、目标跟踪装置获取待跟踪目标的关键点在第二时刻的位置。Step 303: The target tracking device obtains the position of the key point of the target to be tracked at the second moment.
其中,第二时刻为第一时刻之前的时刻。Among them, the second moment is the moment before the first moment.
需要说明的是,待跟踪目标为本公开中需要跟踪的目标。每个待跟踪目标具有唯一标识。It should be noted that the target to be tracked is the target that needs to be tracked in this disclosure. Each target to be tracked has a unique identifier.
待跟踪目标的数量可以为0个,也可以为一个或多个。待跟踪目标的关键点的数量、位置、对应关系等相关内容可参考上述步骤302中检测目标的关键点的表述,此处不再赘述。The number of targets to be tracked can be 0, one or more. For the number, location, correspondence relationship and other relevant contents of the key points of the target to be tracked, please refer to the description of the key points of the target detected in the above step 302, which will not be described again here.
一种可能的实现方式中,本公开中目标跟踪装置可以在第二时刻执行目标跟踪操作,从而获取待跟踪目标的关键点在第二时刻的位置。In a possible implementation, the target tracking device in the present disclosure can perform a target tracking operation at the second moment, thereby obtaining the position of the key point of the target to be tracked at the second moment.
需要说明的是,本公开中的目标跟踪方法不仅需要对待跟踪目标以及待跟踪目标的关键点进行识别,还需要确定连续图像(即连续采集的多个图像)中待跟踪目标与检测目标以及待跟踪目标与检测目标的关键点的关联关系,从而实现对待跟踪目标进行跟踪的效果。It should be noted that the target tracking method in the present disclosure not only needs to identify the target to be tracked and the key points of the target to be tracked, but also needs to determine the target to be tracked and the detected target and the target to be tracked in continuous images (that is, multiple images collected continuously). The relationship between the tracking target and the key points of the detection target is achieved, thereby achieving the effect of tracking the target to be tracked.
然而,在第一时刻为初始时刻的情况下,此时不存在第二时刻,目标跟踪装置获取的待跟踪目标的关键点在第二时刻的数量为0。目标跟踪装置后续的目标跟踪操作相当于对待跟踪目标执行初始化的更新操作。例如目标跟踪装置将初始时刻确定的检测目标作为待跟踪目标。具体内容参考后续描述,此处不再赘述。However, when the first time is the initial time, there is no second time at this time, and the number of key points of the target to be tracked obtained by the target tracking device at the second time is 0. The subsequent target tracking operation of the target tracking device is equivalent to performing an initial update operation on the target to be tracked. For example, the target tracking device uses the detection target determined at the initial time as the target to be tracked. Please refer to the subsequent description for specific content and will not be repeated here.
步骤304、目标跟踪装置根据待跟踪目标的关键点在第二时刻的位置,预测待跟踪目标的关键点在第一时刻的预测位置。Step 304: The target tracking device predicts the predicted position of the key point of the target to be tracked at the first time based on the position of the key point of the target to be tracked at the second time.
一种可能的实现方式中,目标跟踪装置可以确定待跟踪目标的关键点的运动状态。In one possible implementation, the target tracking device can determine the motion state of key points of the target to be tracked.
目标跟踪装置可以根据待跟踪目标的关键点在第二时刻的位置以及运动状态,预测待跟踪目标的关键点在第一时刻的预测位置。The target tracking device can predict the predicted position of the key point of the target to be tracked at the first time based on the position and motion state of the key point of the target to be tracked at the second time.
其中,运动状态可以包括关键点的速度,或者,运动状态可以包括关键点的速度以及加速度,再或者,运动状态可以包括关键点的速率以及方向。The motion state may include the velocity of the key point, or the motion state may include the velocity and acceleration of the key point, or the motion state may include the velocity and direction of the key point.
与上述确定待跟踪目标的关键点在第二时刻的位置的过程相类似,目标跟踪装置可以在第二时刻执行目标跟踪操作,从而确定待跟踪目标的关键点的运动状态。具体内容可参考后续描述,此处不再赘述。Similar to the above process of determining the position of the key point of the target to be tracked at the second moment, the target tracking device may perform a target tracking operation at the second moment to determine the motion state of the key point of the target to be tracked. For specific content, please refer to the subsequent description and will not be repeated here.
需要说明的是,目标跟踪装置可以将待检测目标中未检测到的关键点的 预测位置设置为预设位置数值,从而表示该关键点未被检测到。It should be noted that the target tracking device can set the predicted position of an undetected key point in the target to be detected as a preset position value, thereby indicating that the key point has not been detected.
步骤305、目标跟踪装置根据检测位置和预测位置,确定检测目标和待跟踪目标之间的匹配关系。Step 305: The target tracking device determines the matching relationship between the detected target and the target to be tracked based on the detected position and the predicted position.
其中,匹配关系用于匹配检测目标和待跟踪目标中相同的目标。Among them, the matching relationship is used to match the same target among the detected target and the target to be tracked.
示例性的,待跟踪目标包括目标A和目标B。检测目标中包括目标C、目标D与目标E。其中,目标A与目标C为同一个目标,则说明目标A与目标C相匹配。目标B与目标D不为同一个目标,则说明目标B与目标D不匹配。For example, the targets to be tracked include target A and target B. The detection targets include target C, target D and target E. Among them, target A and target C are the same target, which means that target A and target C match. If target B and target D are not the same target, it means that target B and target D do not match.
需要说明的是,待检测目标的关键点的检测位置能够表征对应待检测目标在第一时刻的检测位置状态。待跟踪目标的关键点的预测位置能够表征对应待跟踪目标在第一时刻的预测位置状态。因此,目标跟踪装置能够基于关键点的检测位置状态以及预测位置状态两种状态确定检测目标和待跟踪目标之间的匹配关系。It should be noted that the detection position of the key point of the target to be detected can represent the detection position state of the corresponding target to be detected at the first moment. The predicted position of the key point of the target to be tracked can represent the predicted position state of the target to be tracked at the first moment. Therefore, the target tracking device can determine the matching relationship between the detected target and the target to be tracked based on the detected position state and the predicted position state of the key point.
其中,匹配关系包括如下中的至少一项:存在至少一个待跟踪目标与检测目标匹配、存在至少一个待跟踪目标与检测目标不匹配、以及存在至少一个检测目标与待跟踪目标不匹配。The matching relationship includes at least one of the following: at least one target to be tracked matches the target to be tracked, at least one target to be tracked does not match the target to be tracked, and at least one target to be tracked does not match the target to be tracked.
示例性的,图4为根据一些实施例提供的一种检测目标与待跟踪目标的匹配关系图。如图4所示,待跟踪目标4011与检测目标4021匹配,待跟踪目标4013与检测目标4022匹配,待跟踪目标4014与检测目标4023匹配,待跟踪目标4012与检测目标中的任一个目标都不匹配,待跟踪目标4015与检测目标中的任一个目标都不匹配,检测目标4024与待跟踪目标中的任一个目标都不匹配。Exemplarily, FIG. 4 is a matching relationship diagram between a detected target and a target to be tracked according to some embodiments. As shown in Figure 4, the target 4011 to be tracked matches the detection target 4021, the target 4013 to be tracked matches the detection target 4022, the target 4014 to be tracked matches the detection target 4023, and the target 4012 to be tracked does not match any of the detection targets. Matching, the target to be tracked 4015 does not match any of the detected targets, and the detected target 4024 does not match any of the targets to be tracked.
步骤306、目标跟踪装置根据匹配关系,跟踪待跟踪目标。Step 306: The target tracking device tracks the target to be tracked according to the matching relationship.
一种可能的实现方式中,目标跟踪装置可以更新待跟踪目标在第一时刻的目标标识以及关键点的位置。In a possible implementation, the target tracking device can update the target identifier and the location of the key point of the target to be tracked at the first moment.
对于存在与之匹配的检测目标的待跟踪目标,目标跟踪装置可以根据待跟踪目标的关键点的预测位置以及对应匹配的检测目标的关键点的检测位置,确定待跟踪目标的关键点在第一时刻的位置。For a target to be tracked that has a matching detection target, the target tracking device may determine that the key point of the target to be tracked is at the first location based on the predicted position of the key point of the target to be tracked and the detection position of the key point of the corresponding matching detection target. moment position.
对于不存在与之匹配的待跟踪目标的检测目标,目标跟踪装置可以将该检测目标增加至待跟踪目标中。For a detected target that does not have a matching target to be tracked, the target tracking device can add the detected target to the target to be tracked.
需要说明的是,在第一时刻为初始时刻的情况下,此时待跟踪目标的数量为0,目标跟踪装置可以确定每个检测目标均不存在匹配的待跟踪目标。因此,目标跟踪装置可以将检测目标中的每个目标添加至待跟踪目标中。It should be noted that when the first time is the initial time, the number of targets to be tracked at this time is 0, and the target tracking device can determine that there is no matching target to be tracked for each detected target. Therefore, the target tracking device can add each of the detected targets to the targets to be tracked.
一种可能的实现方式中,在第一时刻为初始时刻的情况下,目标跟踪装置将更新后的待跟踪目标的关键点的运动状态设置为初始运动状态。In one possible implementation, when the first moment is the initial moment, the target tracking device sets the updated motion state of the key points of the target to be tracked as the initial motion state.
示例性的,初始运动状态的速度、加速度可以为0。For example, the speed and acceleration of the initial motion state can be 0.
对于不存在与之匹配的检测目标的待跟踪目标,目标跟踪装置可以根据该目标在一定时间段内的匹配情况是否满足第一预设条件,确定是否从待跟踪目标中删除该目标。For a target to be tracked that does not have a matching detection target, the target tracking device may determine whether to delete the target from the targets to be tracked based on whether the matching situation of the target within a certain period of time satisfies the first preset condition.
示例性的,第一预设条件可以为不匹配次数小于或等于预设跟踪阈值。不匹配次数为待跟踪目标连续不存在匹配的检测目标的次数。For example, the first preset condition may be that the number of mismatches is less than or equal to the preset tracking threshold. The number of mismatches is the number of consecutive times that the target to be tracked does not have a matching detection target.
一种可能的实现方式中,在检测目标的数量为0的情况下,目标跟踪装置确定每个待跟踪目标均不存在匹配的检测目标。In one possible implementation, when the number of detection targets is 0, the target tracking device determines that there is no matching detection target for each target to be tracked.
结合上述步骤305中的示例,如图4所示,对于待跟踪目标4011、待跟踪目标4013以及待跟踪目标4014,目标跟踪装置可以根据待跟踪目标4011的关键点的预测位置以及检测目标4021的关键点的检测位置,确定待跟踪目标4011的关键点在第一时刻的位置。目标跟踪装置根据待跟踪目标4013的关键点的预测位置以及检测目标4022的关键点的检测位置,确定待跟踪目标4013的关键点在第一时刻的位置。目标跟踪装置根据待跟踪目标4014的关键点的预测位置以及检测目标4023的关键点的检测位置,确定待跟踪目标4014的关键点在第一时刻的位置。Combined with the example in step 305 above, as shown in Figure 4, for the target to be tracked 4011, the target to be tracked 4013, and the target to be tracked 4014, the target tracking device can be based on the predicted position of the key point of the target to be tracked 4011 and the detected target 4021. The detection position of the key point determines the position of the key point of the target 4011 to be tracked at the first moment. The target tracking device determines the position of the key point of the target 4013 to be tracked at the first moment based on the predicted position of the key point of the target 4013 to be tracked and the detected position of the key point of the detection target 4022 . The target tracking device determines the position of the key point of the target 4014 to be tracked at the first moment based on the predicted position of the key point of the target 4014 to be tracked and the detected position of the key point of the detection target 4023 .
对于待跟踪目标4012、待跟踪目标4015,目标跟踪装置确定待跟踪目标4012的匹配情况满足第一预设条件,并保留待跟踪目标4012。目标跟踪装置确定待跟踪目标4015的匹配情况不满足第一预设条件,即未匹配次数大于预设跟踪阈值,删除待跟踪目标4012。For the target to be tracked 4012 and the target to be tracked 4015, the target tracking device determines that the matching situation of the target to be tracked 4012 satisfies the first preset condition, and retains the target to be tracked 4012. The target tracking device determines that the matching situation of the target to be tracked 4015 does not meet the first preset condition, that is, the number of unmatched times is greater than the preset tracking threshold, and deletes the target to be tracked 4012.
对于检测目标4024,目标跟踪装置将检测目标4024添加至待跟踪目标中。For the detected target 4024, the target tracking device adds the detected target 4024 to the targets to be tracked.
一种可能的实现方式中,目标跟踪装置还可以向目标设备发送更新后的待跟踪目标的跟踪序列,以使得目标设备根据跟踪序列执行相关的识别检测。In a possible implementation, the target tracking device can also send an updated tracking sequence of the target to be tracked to the target device, so that the target device performs relevant identification detection based on the tracking sequence.
其中,跟踪序列包括待跟踪目标以及待跟踪目标的关键点信息。例如待跟踪目标的标识以及待跟踪目标的关键点在不同时刻的位置。The tracking sequence includes the target to be tracked and the key point information of the target to be tracked. For example, the identification of the target to be tracked and the locations of key points of the target to be tracked at different times.
示例性的,目标设备可以根据跟踪序列执行路人动作检测、车间机器状态检测等相关方案。For example, the target device can perform passerby action detection, workshop machine status detection and other related solutions based on the tracking sequence.
一种可能的实现方式中,目标跟踪装置可以根据待跟踪目标的关键点在第一时刻的位置以及在第二时刻的位置,确定待跟踪目标的关键点的运动状态。In a possible implementation, the target tracking device may determine the motion state of the key points of the target to be tracked based on the position of the key points of the target to be tracked at the first time and the position at the second time.
基于上述技术方案,本公开中的目标跟踪装置能够根据第一时刻的待检 测图像确定检测目标的关键点的检测位置,并根据待跟踪目标的关键点在第二时刻的位置预测该跟踪目标的关键点在第一时刻的预测位置。之后,目标跟踪装置便可以根据待检测目标的关键点的检测位置以及待跟踪目标的关键点的预测位置确定检测目标和待跟踪目标之间的匹配关系,并根据匹配关系更新待跟踪目标以及待跟踪目标的关键点的位置,从而实现目标跟踪。因此,本公开中目标跟踪装置可以基于目标的关键点的位置信息实现检测目标与待跟踪目标的匹配,进而更新待跟踪目标以及待跟踪目标的关键点,以使得不同时刻中的待跟踪目标以及待跟踪目标的关键点相互关联。相比于相关技术中基于目标检测确定的目标外包框图像对目标进行跟踪的技术方案,本公开中的技术方案首先对待跟踪目标的关键点在第一时刻的位置进行预测,进而根据预测位置与检测目标的关键点的检测位置进行目标跟踪,不受外包框图像的变化影响,提高了目标跟踪的稳定性与准确度。同时,本公开中的技术方案直接基于关键点对目标进行跟踪,无需额外对目标进行检测,计算开销低,降低了计算成本。Based on the above technical solution, the target tracking device in the present disclosure can determine the detection position of the key point of the detection target based on the image to be detected at the first time, and predict the tracking target based on the position of the key point of the target to be tracked at the second time. The predicted position of the key point at the first moment. After that, the target tracking device can determine the matching relationship between the detection target and the target to be tracked based on the detection position of the key point of the target to be detected and the predicted position of the key point of the target to be tracked, and update the target to be tracked and the target to be tracked based on the matching relationship. Track the location of key points of the target to achieve target tracking. Therefore, the target tracking device in the present disclosure can match the detected target and the target to be tracked based on the location information of the key points of the target, and then update the target to be tracked and the key points of the target to be tracked, so that the target to be tracked at different times and The key points of the target to be tracked are related to each other. Compared with the technical solution in the related art that tracks a target based on the target outer frame image determined by target detection, the technical solution in this disclosure first predicts the position of the key point of the target to be tracked at the first moment, and then based on the predicted position and The detection position of the key points of the target is detected for target tracking, which is not affected by changes in the outer frame image, improving the stability and accuracy of target tracking. At the same time, the technical solution in this disclosure directly tracks the target based on key points, without the need for additional detection of the target, and has low computational overhead, reducing the computational cost.
需要说明的是,上述实施例中的步骤301-步骤302与步骤303-步骤304之间相互独立。步骤301-步骤302可以在步骤303-步骤304之前执行,也可以在步骤303-步骤304之后执行,还可以与步骤303-步骤304并行执行。图3中仅以步骤301-步骤302在步骤303-步骤304之前执行为例对本公开提供的目标跟踪算法进行说明。本公开对上述步骤的执行顺序并不作限定。It should be noted that steps 301 to 302 and steps 303 to 304 in the above embodiment are independent of each other. Steps 301 to 302 may be executed before steps 303 to 304, or may be executed after steps 303 to 304, or may be executed in parallel with steps 303 to 304. In FIG. 3 , the target tracking algorithm provided by the present disclosure is only explained by taking step 301 to step 302 before step 303 to step 304 as an example. This disclosure does not limit the execution order of the above steps.
以下,对目标跟踪装置确定检测目标和待跟踪目标之间的匹配关系的过程进行介绍。Below, the process of determining the matching relationship between the detection target and the target to be tracked by the target tracking device is introduced.
作为本公开的一种可能的实施例,结合图3,如图5所示,上述步骤305还可以通过以下步骤501-步骤502实现。As a possible embodiment of the present disclosure, as shown in Figure 5 in conjunction with Figure 3, the above step 305 can also be implemented through the following steps 501 to 502.
步骤501、目标跟踪装置对每个检测目标和每个待跟踪目标执行第一目标操作,确定每个检测目标与每个待跟踪目标之间的距离。Step 501: The target tracking device performs a first target operation on each detected target and each target to be tracked, and determines the distance between each detected target and each target to be tracked.
其中,检测目标的数量为N个,待跟踪目标的数量为M个。M、N为正整数。Among them, the number of detection targets is N, and the number of targets to be tracked is M. M and N are positive integers.
在一种可能的实现方式中,第一目标操作包括:In a possible implementation, the first target operation includes:
步骤5011、目标跟踪装置根据第i个检测目标中的关键点的检测位置,和第j个待跟踪目标的关键点的预测位置之间的距离,确定第i个检测目标和第j个待跟踪目标之间的距离。Step 5011: The target tracking device determines the i-th detected target and the j-th target to be tracked based on the distance between the detected position of the key point in the i-th detected target and the predicted position of the key point of the j-th target to be tracked. The distance between targets.
其中,i为小于或等于N的正整数;j为小于或等于M的正整数。Among them, i is a positive integer less than or equal to N; j is a positive integer less than or equal to M.
进一步的,目标跟踪装置确定第i个检测目标和第j个待跟踪目标之间的 距离的过程可以通过以下步骤501a-步骤501b实现:Further, the process of the target tracking device determining the distance between the i-th detection target and the j-th target to be tracked can be implemented through the following steps 501a-step 501b:
步骤501a、目标跟踪装置可以对第i个检测目标与第j个待跟踪目标的每个对应关键点执行第二目标操作,确定每个对应关键点之间的距离。Step 501a: The target tracking device may perform a second target operation on each corresponding key point of the i-th detected target and the j-th target to be tracked, and determine the distance between each corresponding key point.
其中,第i个检测目标与第j个待跟踪目标的对应关键点的标识相同。Among them, the identification of the corresponding key points of the i-th detection target and the j-th target to be tracked is the same.
在一种可能的实现方式中,第二目标操作包括以下步骤5012-步骤5013:In a possible implementation, the second target operation includes the following steps 5012 to 5013:
步骤5012、目标跟踪装置确定第一关键点与第二关键点。Step 5012: The target tracking device determines the first key point and the second key point.
其中,第一关键点为第i个检测目标中的任一个关键点。第二关键点为第j个待跟踪目标中与第一关键点对应的关键点。Among them, the first key point is any key point in the i-th detection target. The second key point is the key point corresponding to the first key point in the j-th target to be tracked.
步骤5013、目标跟踪装置根据第一关键点的检测位置和第二关键点的预测位置确定第一关键点与第二关键点之间的距离。Step 5013: The target tracking device determines the distance between the first key point and the second key point based on the detected position of the first key point and the predicted position of the second key point.
示例性的,第一关键点与第二关键点之间的距离通过以下公式1来计算:For example, the distance between the first key point and the second key point is calculated by the following formula 1:
Figure PCTCN2022083887-appb-000003
Figure PCTCN2022083887-appb-000003
其中,p为第一关键点,p′为第二关键点,d(p,p′)表示第一关键点与第二关键点之间的距离,x、y为第一关键点的位置坐标,x′、y′为第二关键点的位置坐标。Among them, p is the first key point, p′ is the second key point, d(p, p′) represents the distance between the first key point and the second key point, x and y are the position coordinates of the first key point , x′, y′ are the position coordinates of the second key point.
需要说明的是,检测目标与待跟踪目标的关键点中可能存在未被检测到的关键点。此时无法确定未被检测到的关键点之间的距离,因此目标跟踪装置可以将未被检测到的关键点之间的距离设置为预设距离数值。该预设距离数值用于表示对应的两个关键点中存在至少一个关键点未被检测到。It should be noted that there may be undetected key points among the key points of the detection target and the target to be tracked. At this time, the distance between the undetected key points cannot be determined, so the target tracking device can set the distance between the undetected key points to a preset distance value. The preset distance value is used to indicate that at least one key point among the two corresponding key points has not been detected.
示例性的,预设距离数值可以为-1。For example, the preset distance value may be -1.
步骤501b、目标跟踪装置根据每个对应关键点之间的距离,确定第i个检测目标和第j个待跟踪目标之间的距离。Step 501b: The target tracking device determines the distance between the i-th detection target and the j-th target to be tracked based on the distance between each corresponding key point.
示例性的,第i个检测目标和第j个待跟踪目标之间的距离通过以下公式2来计算:For example, the distance between the i-th detection target and the j-th target to be tracked is calculated by the following formula 2:
Figure PCTCN2022083887-appb-000004
Figure PCTCN2022083887-appb-000004
其中,D(i,j)表示第i个检测目标和第j个待跟踪目标之间的距离,p ik表示第i个检测目标的第k个关键点的检测位置,p′ jk表示第j个待跟踪目标的第k个关键点的预测位置,d(p ik,p′ jk)表示第i个检测目标的第k个关键点与第j个待跟踪目标的第k个关键点之间的距离,s表示目标的尺寸信息,v ik表示第i个检测目标的第k个关键点是否被检测到,v′ jk表示第j个待跟踪目标的第k个关键点是否是否被检测到,δ(v ik,v′ jk)表征第i个检测目标的第k个 关键点与第j个待跟踪目标的第k个关键点的检测情况。 Among them, D(i,j) represents the distance between the i-th detection target and the j-th target to be tracked, p ik represents the detection position of the k-th key point of the i-th detection target, and p′ jk represents the j-th The predicted position of the k-th key point of the target to be tracked, d(p ik , p′ jk ) represents the distance between the k-th key point of the i-th detection target and the k-th key point of the j-th target to be tracked The distance of , δ(v ik ,v′ jk ) represents the detection situation of the k-th key point of the i-th detection target and the k-th key point of the j-th target to be tracked.
需要说明的是,其中的s既可以表示第i个检测目标的尺寸信息,也可以表示第j个待跟踪目标的尺寸信息,还可以由第i个检测目标的尺寸信息和第j个待跟踪的尺寸信息确定。例如s为第i个检测目标的尺寸信息和第j个待跟踪的尺寸信息的平均值。It should be noted that s can represent either the size information of the i-th detected target or the size information of the j-th target to be tracked, or it can also be composed of the size information of the i-th detected target and the j-th target to be tracked. The size information is determined. For example, s is the average value of the size information of the i-th detected target and the j-th size information to be tracked.
尺寸信息可以通过目标的图像面积、目标的图像面积的正平方根或者目标占用的像素点的数量表示。The size information can be expressed by the image area of the target, the positive square root of the image area of the target, or the number of pixels occupied by the target.
示例性的,在第i个检测目标的第k个关键点与第j个待跟踪目标的第k个关键点中的至少一个关键点未被检测到的情况下,δ(v ik,v′ jk)的取值可以为0。在第i个检测目标的第k个关键点与第j个待跟踪目标的第k个关键点均被检测到的情况下,δ(v ik,v′ jk)的取值可以为1。 For example, when at least one of the k-th key point of the i-th detection target and the k-th key point of the j-th target to be tracked is not detected, δ(v ik ,v′ The value of jk ) can be 0. In the case where both the k-th key point of the i-th detection target and the k-th key point of the j-th target to be tracked are detected, the value of δ(v ik ,v′ jk ) can be 1.
步骤502、目标跟踪装置根据每个检测目标与每个待跟踪目标之间的距离,确定匹配关系。Step 502: The target tracking device determines a matching relationship based on the distance between each detected target and each target to be tracked.
需要说明的是,目标跟踪装置可以基于每个检测目标与每个待跟踪目标之间的距离,从整体的角度确定待跟踪目标与检测目标的匹配关系。目标跟踪装置还可以基于任一个待跟踪目标分别与每个检测目标的距离,从待跟踪目标个体的角度确定待跟踪目标与检测目标的匹配关系。具体实现方式可参考后续描述,此处不再赘述。It should be noted that the target tracking device can determine the matching relationship between the target to be tracked and the detected target from an overall perspective based on the distance between each detected target and each target to be tracked. The target tracking device can also determine the matching relationship between the target to be tracked and the detection target from the perspective of the individual target to be tracked based on the distance between any target to be tracked and each detected target. For specific implementation methods, please refer to the subsequent description and will not be repeated here.
一种可能的实现方式中,目标跟踪装置可以根据预设匹配算法,以及每个检测目标与每个待跟踪目标之间的距离,确定每个待跟踪目标是否与检测目标匹配。In one possible implementation, the target tracking device can determine whether each target to be tracked matches the detection target based on a preset matching algorithm and the distance between each detection target and each target to be tracked.
示例性的,预设匹配算法可以为KM算法。For example, the preset matching algorithm may be the KM algorithm.
其中,对于相匹配的检测目标与待跟踪目标,目标跟踪装置还可以判断检测目标与待跟踪目标之间的距离是否满足第二预设条件。在检测目标与待跟踪目标之间的距离不满足第二预设条件的情况下,确定该检测目标与该待跟踪目标不匹配。通过上述技术方案,目标跟踪装置可以进一步过滤相匹配的待跟踪目标与检测目标,排除掉实际上并不匹配的待跟踪目标与检测目标,从而提高目标跟踪的准确性。Wherein, for the matching detection target and the target to be tracked, the target tracking device can also determine whether the distance between the detection target and the target to be tracked satisfies the second preset condition. When the distance between the detected target and the target to be tracked does not meet the second preset condition, it is determined that the detected target and the target to be tracked do not match. Through the above technical solution, the target tracking device can further filter the matching targets to be tracked and the detection targets, and exclude the targets to be tracked and the detection targets that do not actually match, thereby improving the accuracy of target tracking.
其中,第二预设条件可以为检测目标与待跟踪目标之间的距离小于或等于目标距离阈值。The second preset condition may be that the distance between the detection target and the target to be tracked is less than or equal to the target distance threshold.
示例性的,目标距离阈值为3.5,待跟踪目标包括A1、A2、A3、A4,检测目标包括B1、B2、B3、B4。A1与B1匹配,A1与B1的距离为3。A2与B2匹配,A2与B2的距离为4。A3与B4匹配,A3与B4的距离为3。A4 与B3匹配,A4与B3的距离为2。For example, the target distance threshold is 3.5, the targets to be tracked include A1, A2, A3, and A4, and the detected targets include B1, B2, B3, and B4. A1 matches B1, and the distance between A1 and B1 is 3. A2 matches B2, and the distance between A2 and B2 is 4. A3 matches B4, and the distance between A3 and B4 is 3. A4 matches B3, and the distance between A4 and B3 is 2.
其中,A2与B2的距离不满足第二预设条件,因此,目标跟踪装置确定A2与B2不匹配。The distance between A2 and B2 does not meet the second preset condition. Therefore, the target tracking device determines that A2 and B2 do not match.
图6为根据一些实施例提供的一种目标跟踪的场景图。为便于理解,图6中仅示出了一个目标,本公开中的技术方案适用于一个或多个目标的目标跟踪场景。目标601正在进行跳跃运动。在第二时刻,待检测图像a中目标601处于准备动作。在第一时刻,待检测图像b中的目标601处于跳跃过程中。Figure 6 is a scene diagram of target tracking provided according to some embodiments. For ease of understanding, only one target is shown in FIG. 6 , and the technical solutions in this disclosure are applicable to target tracking scenarios of one or more targets. Target 601 is in jumping motion. At the second moment, the target 601 in the image a to be detected is in a preparatory action. At the first moment, the target 601 in the image b to be detected is in the process of jumping.
图7为相关技术中的一种目标跟踪的原理图。如图7所示,相关技术中根据图6中第二时刻的待检测图像a确定出目标601在第二时刻的外包框图像701,根据图6中第一时刻的待检测图像b确定出目标601在第一时刻的外包框图像702。计算外包框图像701与外包框图像702的IoU,并根据IoU确定两个外包框图像对应的目标是否为同一目标。然而由于目标601的跳跃动作导致外包框图像的位置、大小变化较大,因此相关技术中难以准确地对目标601进行跟踪。Figure 7 is a schematic diagram of a target tracking in the related art. As shown in Figure 7, in the related art, the outer frame image 701 of the target 601 at the second time is determined based on the image a to be detected at the second time in Figure 6, and the target is determined based on the image b to be detected at the first time in Figure 6 601 The outer box image 702 at the first moment. Calculate the IoU of the outer box image 701 and the outer box image 702, and determine whether the targets corresponding to the two outer box images are the same target based on the IoU. However, since the jumping action of the target 601 causes large changes in the position and size of the outer frame image, it is difficult to accurately track the target 601 in the related technology.
图8为根据本公开一些实施例提供的一种目标跟踪的原理图。如图8所示,本公开中目标跟踪装置根据图6中第二时刻确定的目标601的关键点的位置,预测该目标601的关键点在第一时刻的预测位置(即图8中的空心点),并根据图6中第一时刻的待检测图像b确定目标601的关键点的检测位置(即图8中的实心点)。之后,目标跟踪装置可以基于检测位置以及预测位置确定目标的匹配关系。另外,即使得到的关键点中存在部分未检测到的关键点(例如图8中右腿关节处的关键点的预测位置未被检测到),本公开中的目标跟踪方法仍然可以基于其他关键点的位置信息对目标进行跟踪,不会对本公开的目标跟踪造成过多影响。Figure 8 is a schematic diagram of a target tracking provided according to some embodiments of the present disclosure. As shown in Figure 8, the target tracking device in the present disclosure predicts the predicted position of the key point of the target 601 at the first time based on the position of the key point of the target 601 determined at the second time in Figure 6 (i.e., the hollow in Figure 8 point), and determine the detection position of the key point of the target 601 (ie, the solid point in Figure 8) based on the image b to be detected at the first moment in Figure 6. Afterwards, the target tracking device can determine the matching relationship of the target based on the detected position and the predicted position. In addition, even if there are some undetected key points among the obtained key points (for example, the predicted position of the key point at the right leg joint in Figure 8 is not detected), the target tracking method in the present disclosure can still be based on other key points The location information is used to track the target, which will not have too much impact on the target tracking of the disclosure.
相比于相关技术中的目标跟踪的方式,本公开中的技术方案不受外包框图像的变化影响,提高了目标跟踪的稳定性与准确度。同时,本公开中的技术方案直接基于关键点对目标进行跟踪,无需额外对目标进行检测,计算开销低,降低了计算成本。Compared with the target tracking methods in the related art, the technical solution in the present disclosure is not affected by changes in the outer frame image, and improves the stability and accuracy of target tracking. At the same time, the technical solution in this disclosure directly tracks the target based on key points, without the need for additional detection of the target, and has low computational overhead, reducing the computational cost.
需要说明的是,图6仅以单个目标为例对本公开中的跟踪原理以及相关技术中的跟踪原理的区别进行阐述,本公开中的技术方案同样适用于多目标跟踪,具体可参考相关实施例,图6中的场景并不对本公开的方案造成限定。It should be noted that Figure 6 only takes a single target as an example to illustrate the differences between the tracking principles in this disclosure and those in related technologies. The technical solutions in this disclosure are also applicable to multi-target tracking. For details, please refer to the relevant embodiments. , the scene in Figure 6 does not limit the solution of the present disclosure.
以下,对目标跟踪装置根据每个检测目标与每个待跟踪目标之间的距离,确定匹配关系的过程进行介绍。The following describes the process by which the target tracking device determines the matching relationship based on the distance between each detected target and each target to be tracked.
作为本公开的一种可能的实施例,结合图5,如图9所示,上述步骤502 还可以通过以下步骤实现。As a possible embodiment of the present disclosure, as shown in Figure 9 in conjunction with Figure 5, the above step 502 can also be implemented through the following steps.
步骤901、目标跟踪装置确定每个待跟踪目标的权重值与每个检测目标的权重值。Step 901: The target tracking device determines the weight value of each target to be tracked and the weight value of each detected target.
其中,任一待跟踪目标的权重值为该任一待跟踪目标分别与每个检测目标的距离中最小距离的值。每个检测目标的权重值为预设权重值。Among them, the weight value of any target to be tracked is the value of the minimum distance between any target to be tracked and each detected target. The weight value of each detection target is a preset weight value.
需要说明的是,待跟踪目标的权重值用于表征待跟踪目标对距离的期待值,检测目标的权重值用于表征检测目标对距离的期待值。It should be noted that the weight value of the target to be tracked is used to represent the expected value of the distance of the target to be tracked, and the weight value of the detection target is used to represent the expected value of the distance of the detection target.
权重值越低,则说明待跟踪目标或者检测目标对距离的要求越高。反之,权重值越高,则说明待跟踪目标或者检测目标对距离的要求越低。The lower the weight value, the higher the distance requirements of the target to be tracked or the target to be detected. On the contrary, the higher the weight value, the lower the distance requirements of the target to be tracked or detected.
示例性的,预设权重值为0,具体可根据实际情况设置,本公开对此不作限定。For example, the default weight value is 0, which can be set according to the actual situation, and this disclosure does not limit this.
步骤902、目标跟踪装置对每个待跟踪目标执行第三目标操作,确定与每个待跟踪目标匹配的检测目标。Step 902: The target tracking device performs a third target operation on each target to be tracked, and determines a detection target matching each target to be tracked.
如图10所示,第三目标操作包括以下步骤1001-步骤1002。As shown in Figure 10, the third target operation includes the following steps 1001-1002.
步骤1001、目标跟踪装置确定与第m个待跟踪目标距离最短的第一检测目标。Step 1001: The target tracking device determines the first detected target with the shortest distance from the mth target to be tracked.
其中,第一检测目标与第m个待跟踪目标的权重值之和大于或等于第一检测目标与第m个待跟踪目标的距离。m为正整数。Wherein, the sum of the weight values of the first detection target and the m-th target to be tracked is greater than or equal to the distance between the first detection target and the m-th target to be tracked. m is a positive integer.
需要说明的是,若待跟踪目标与检测目标的权重值之和大于或等于该待跟踪目标与检测目标的距离,则说明两者的距离满足两者对距离的要求。在第一检测目标包括多个检测目标的情况下,目标跟踪装置从中任选一个检测目标。It should be noted that if the sum of the weight values of the target to be tracked and the target to be detected is greater than or equal to the distance between the target to be tracked and the target to be detected, it means that the distance between the two meets the distance requirements of the two. In the case where the first detection target includes multiple detection targets, the target tracking device selects any one of the detection targets.
示例性的,待跟踪目标A的权重值为4,检测目标B的权重值为-1,待跟踪目标A与检测目标B的距离为2。由于待跟踪目标A与检测目标B的权重值之和为3,大于待跟踪目标A与检测目标B的距离2。因此,该距离满足待跟踪目标A与检测目标B对距离的要求,即待跟踪目标A与检测目标B满足距离上的匹配条件。之后,目标跟踪装置还需要进一步判断该距离是否为符合匹配条件的距离中值最小的,以及执行后续操作。For example, the weight value of target A to be tracked is 4, the weight value of target B to be detected is -1, and the distance between target A to be tracked and target B to be detected is 2. Since the sum of the weight values of target A to be tracked and target B to be detected is 3, it is greater than the distance 2 between target A to be tracked and target B to be detected. Therefore, the distance meets the distance requirements between the target A to be tracked and the target B to be detected, that is, the target A to be tracked and the target B to be detected meet the matching conditions in distance. Afterwards, the target tracking device needs to further determine whether the distance is the smallest among the distances that meet the matching conditions, and perform subsequent operations.
一种可能的实现方式中,在检测目标中不存在第一检测目标的情况下,目标跟踪装置将第二检测目标作为第一检测目标,并更新第m个待跟踪目标的权重值。In a possible implementation, when the first detection target does not exist among the detection targets, the target tracking device uses the second detection target as the first detection target, and updates the weight value of the mth target to be tracked.
其中,第二检测目标与第m个待跟踪目标的距离与权重值之和的差值最小。Among them, the difference between the distance and the sum of weight values between the second detected target and the m-th target to be tracked is the smallest.
需要说明的是,在检测目标中包括多个第二检测目标的情况下,目标跟踪装置可以从中任选一个第二检测目标作为第一检测目标。由于检测目标中不存在与第m个待跟踪目标的权重值之和大于或等于距离的检测目标,即每个检测目标与第m个待跟踪目标均未满足距离上的匹配条件,因此,第m个待跟踪目标需要降低其对距离的期待值,以便于为第m个待跟踪目标匹配检测目标。为了保障待跟踪目标整体上实现最优匹配,目标跟踪装置将第二检测目标作为第一检测目标,并更新第m个待跟踪目标的权重值。It should be noted that, in the case where the detection targets include multiple second detection targets, the target tracking device may select any one of the second detection targets as the first detection target. Since there is no detection target whose weight value sum to the mth target to be tracked is greater than or equal to the distance, that is, each detection target and the mth target to be tracked do not meet the matching condition in distance, therefore, the The m target to be tracked needs to reduce its expected distance value in order to match the detection target for the m target to be tracked. In order to ensure that the target to be tracked achieves optimal matching as a whole, the target tracking device uses the second detection target as the first detection target and updates the weight value of the mth target to be tracked.
示例性的,目标跟踪装置通过以下方式更新第m个待跟踪目标的权重值:目标跟踪装置将第m个待跟踪目标的权重值增加第二检测目标与第m个待跟踪目标的距离与权重值之和的差值。Exemplarily, the target tracking device updates the weight value of the mth target to be tracked in the following manner: the target tracking device increases the weight value of the mth target to be tracked by the distance and weight between the second detected target and the mth target to be tracked. The difference between the sum of values.
步骤1002、目标跟踪装置对第m个待跟踪目标与第一检测目标执行第四目标操作,确定与第m个待跟踪目标匹配的检测目标。Step 1002: The target tracking device performs a fourth target operation on the mth target to be tracked and the first detection target, and determines the detection target matching the mth target to be tracked.
如图11所示,第四目标操作包括以下步骤1101-步骤1104。As shown in Figure 11, the fourth target operation includes the following steps 1101-1104.
步骤1101、目标跟踪装置确定是否存在第一待跟踪目标。Step 1101: The target tracking device determines whether there is a first target to be tracked.
其中,第一待跟踪目标为根据第三目标操作确定的与第一检测目标匹配的待跟踪目标。Wherein, the first target to be tracked is a target to be tracked that matches the first detected target and is determined according to the third target operation.
在不存在第一待跟踪目标的情况下,说明第一检测目标当前不存在匹配的待跟踪目标,因此目标跟踪装置可以执行步骤1102。If there is no first target to be tracked, it means that there is currently no matching target to be tracked for the first detected target, so the target tracking device can perform step 1102.
步骤1102、目标跟踪装置确定第m个待跟踪目标与第一检测目标匹配。Step 1102: The target tracking device determines that the mth target to be tracked matches the first detected target.
在存在第一待跟踪目标的情况下,说明第m个待跟踪目标与第一待跟踪目标的最优匹配均为第一检测目标,也即是说,目标跟踪装置需要重新确定第m个待跟踪目标与第一待跟踪目标中的其中一个与除第一检测目标之外的检测目标的匹配关系,以使得待跟踪目标与检测目标的匹配关系从整体上实现最优匹配。因此,目标跟踪装置可以执行步骤1103。When there is a first target to be tracked, it means that the optimal matching between the mth target to be tracked and the first target to be tracked is the first detection target. That is to say, the target tracking device needs to re-determine the mth target to be tracked. The matching relationship between the tracking target and one of the first targets to be tracked and the detection targets other than the first detection target is such that the matching relationship between the target to be tracked and the detection target achieves optimal matching as a whole. Therefore, the target tracking device can perform step 1103.
步骤1103、目标跟踪装置确定第m个待跟踪目标的第一影响值,以及第一待跟踪目标的第二影响值。Step 1103: The target tracking device determines the first influence value of the mth target to be tracked and the second influence value of the first target to be tracked.
其中,第一影响值为根据第m个待跟踪目标与第二检测目标确定的差值。该差值为一个待跟踪目标与一个检测目标的距离与一个待跟踪目标与一个检测目标的权重之和之间的差值。第二检测目标为除第一检测目标外与第m个待跟踪目标确定的差值最小的检测目标。第二影响值为根据第一待跟踪目标与第三检测目标确定的差值。第三检测目标为除第一检测目标外与第一待跟踪目标确定的差值最小的检测目标。The first influence value is the difference determined based on the mth target to be tracked and the second detected target. The difference is the difference between the distance between a target to be tracked and a detected target and the sum of the weights of a target to be tracked and a detected target. The second detection target is the detection target that has the smallest difference from the mth target to be tracked, except the first detection target. The second influence value is the difference determined based on the first target to be tracked and the third detected target. The third detection target is the detection target that has the smallest difference from the first target to be tracked except the first detection target.
因此,第一影响值用于表征目标跟踪装置重新确定与第m个待跟踪目标 匹配的检测目标的最小影响程度;第二影响值用于表征目标跟踪装置重新确定与第一待跟踪目标匹配的检测目标的最小影响程度。Therefore, the first influence value is used to characterize the minimum degree of influence of the target tracking device in re-determining the detection target that matches the m-th target to be tracked; the second influence value is used to characterize the target tracking device in re-determining the detection target that matches the first target to be tracked. Minimum impact on detection target.
需要说明的是,在包括多个检测目标与第m个待跟踪目标的距离与权重值之和的差值均最小的情况下,目标跟踪装置从中任选一个检测目标作为第二检测目标。在包括多个检测目标与第一待跟踪目标的距离与权重值之和的差值均最小的情况下,目标跟踪装置从中任选一个检测目标作为第三检测目标。It should be noted that, when the difference between the sum of distances and weight values between multiple detection targets and the m-th target to be tracked is the smallest, the target tracking device selects any one of the detection targets as the second detection target. In the case where the difference between the sum of distances and weight values between multiple detection targets and the first target to be tracked is the smallest, the target tracking device selects any one of the detection targets as the third detection target.
步骤1104、目标跟踪装置根据第一影响值和第二影响值,确定与第m个待跟踪目标匹配的检测目标。Step 1104: The target tracking device determines the detection target matching the mth target to be tracked based on the first influence value and the second influence value.
在第一影响值小于第二影响值的情况下,目标跟踪装置执行步骤1105。If the first influence value is less than the second influence value, the target tracking device performs step 1105.
步骤1105、目标跟踪装置对第m个待跟踪目标与第二检测目标执行第四目标操作,确定与第m个待跟踪目标匹配的检测目标。Step 1105: The target tracking device performs a fourth target operation on the mth target to be tracked and the second detection target, and determines the detection target matching the mth target to be tracked.
需要说明的是,由于第一影响值小于第二影响值,因此,目标跟踪装置重新确定第m个待跟踪目标与第二检测目标的匹配关系对整体的匹配关系所造成的影响,比重新确定第一待跟踪目标与第三检测目标的匹配关系对整体的匹配关系的影响更小。为保障待跟踪目标与检测目标从整体上实现最优匹配,目标跟踪装置可以重新确定与第m个待跟踪目标匹配的检测目标。It should be noted that, since the first influence value is smaller than the second influence value, the influence of the target tracking device on the overall matching relationship caused by redetermining the matching relationship between the mth target to be tracked and the second detected target is smaller than that of redetermining the matching relationship. The matching relationship between the first target to be tracked and the third detected target has less impact on the overall matching relationship. In order to ensure that the target to be tracked and the detection target achieve optimal matching as a whole, the target tracking device can re-determine the detection target that matches the mth target to be tracked.
一种可能的实现方式中,目标跟踪装置还可以根据第一影响值更新第m个待跟踪目标、第一待跟踪目标以及第一检测目标的权重值。In a possible implementation, the target tracking device can also update the weight values of the mth target to be tracked, the first target to be tracked, and the first detected target according to the first influence value.
示例性的,目标跟踪装置将第m个待跟踪目标的权重值增加第一影响值,将第一待跟踪目标的权重值增加第一影响值,将第一检测目标的权重值降低第一影响值。Exemplarily, the target tracking device increases the weight value of the mth target to be tracked by the first influence value, increases the weight value of the first target to be tracked by the first influence value, and reduces the weight value of the first detected target by the first influence value. value.
在第一影响值大于第二影响值的情况下,目标跟踪装置执行步骤1106。If the first influence value is greater than the second influence value, the target tracking device performs step 1106.
步骤1106、目标跟踪装置确定第m个待跟踪目标与第一检测目标匹配。Step 1106: The target tracking device determines that the mth target to be tracked matches the first detected target.
一种可能的实现方式中,目标跟踪装置还可以对第一待跟踪目标与第三检测目标执行第四目标操作,确定与第一待跟踪目标匹配的检测目标。In a possible implementation, the target tracking device may also perform a fourth target operation on the first target to be tracked and the third target to be detected, and determine the detection target that matches the first target to be tracked.
同样的,由于第一影响值大于第二影响值,因此,目标跟踪装置重新确定第m个待跟踪目标与第二检测目标的匹配关系对整体的匹配关系所造成的影响,比重新确定第一待跟踪目标与第二检测目标的匹配关系对整体的匹配关系的影响更大。为保障待跟踪目标与检测目标从整体上实现最优匹配,目标跟踪装置可以重新确定与第一待跟踪目标匹配的检测目标。Similarly, since the first influence value is greater than the second influence value, the target tracking device re-determines the matching relationship between the m-th target to be tracked and the second detected target, which has a greater impact on the overall matching relationship than re-determining the first The matching relationship between the target to be tracked and the second detected target has a greater impact on the overall matching relationship. In order to ensure that the target to be tracked and the detection target achieve optimal matching as a whole, the target tracking device can re-determine the detection target that matches the first target to be tracked.
一种可能的实现方式中,目标跟踪装置还可以根据第二影响值更新第m个待跟踪目标、第一待跟踪目标以及第一检测目标的权重值。In a possible implementation, the target tracking device can also update the weight values of the mth target to be tracked, the first target to be tracked, and the first detected target according to the second influence value.
示例性的,目标跟踪装置将第m个待跟踪目标的权重值增加第二影响值,将第一待跟踪目标的权重值增加第二影响值,将第一检测目标的权重值降低第二影响值。Exemplarily, the target tracking device increases the weight value of the mth target to be tracked by the second influence value, increases the weight value of the first target to be tracked by the second influence value, and reduces the weight value of the first detected target by the second influence value. value.
在第一影响值等于第二影响值的情况下,目标跟踪装置执行步骤1105,或者目标跟踪装置执行步骤1106。In the case where the first influence value is equal to the second influence value, the target tracking device performs step 1105, or the target tracking device performs step 1106.
需要说明的是,上述方案中目标跟踪装置通过根据每个检测目标与每个待跟踪目标之间的距离,能够从整体上确定待跟踪目标与检测目标的一对一的匹配关系。在实际执行过程中,待跟踪目标与检测目标的数量存在不对等的情况,为了得到一对一的匹配关系,可以在数量较少的目标中补充一些目标,以使得待跟踪目标与检测目标的数量对等。It should be noted that the target tracking device in the above solution can determine a one-to-one matching relationship between the target to be tracked and the detected target as a whole based on the distance between each detected target and each target to be tracked. In the actual execution process, there is an unequal number of targets to be tracked and detected targets. In order to obtain a one-to-one matching relationship, some targets can be added to a smaller number of targets to make the number of targets to be tracked and detected targets Quantities are equal.
例如,检测目标的数量少于待跟踪目标的数量,目标跟踪装置增加检测目标,以使得检测目标的数量与待跟踪目标的数量相同。其中,增加的检测目标与每个待跟踪目标的距离可以设置为较大的预设距离,以避免对匹配关系造成影响。For example, if the number of detected targets is less than the number of targets to be tracked, the target tracking device increases the number of detected targets so that the number of detected targets is the same as the number of targets to be tracked. Among them, the increased distance between the detection target and each target to be tracked can be set to a larger preset distance to avoid affecting the matching relationship.
预设距离的值理论上可以为无穷大。示例性的,预设距离可以为1000000。The value of the preset distance can theoretically be infinite. For example, the preset distance may be 1,000,000.
此外,上述技术方案以目标跟踪装置确定与待跟踪目标匹配的检测目标为例,对本公开中目标跟踪装置确定匹配关系的过程进行了说明。目标跟踪在还可以通过上述技术方案确定与检测目标匹配的待跟踪目标,从而确定匹配关系,即将上述技术方案中的待跟踪目标与检测目标的执行客体互换,具体实施方式与上述技术方案相同,此处不再赘述。In addition, the above technical solution takes the target tracking device to determine the detection target that matches the target to be tracked as an example to illustrate the process of the target tracking device determining the matching relationship in the present disclosure. Target tracking can also determine the target to be tracked that matches the detection target through the above technical solution, thereby determining the matching relationship, that is, exchanging the execution object of the target to be tracked with the detection target in the above technical solution. The specific implementation method is the same as the above technical solution. , which will not be described again here.
基于上述技术方案,本公开中的目标跟踪装置可以在确定待跟踪目标与检测目标的匹配关系时,同时考虑该检测目标是否已经与其他待跟踪目标相匹配,并根据当前的待跟踪目标重新确定与检测目标的匹配关系对整体的匹配所造成的影响程度以及已经匹配的待跟踪目标重新确定与检测目标的匹配关系对整体的匹配所造成的影响程度调整此时的待跟踪目标与检测目标的匹配关系,以使得待跟踪目标与检测目标之间的匹配关系实现整体的最优匹配。因此,目标跟踪装置能够从整体的角度确定待跟踪目标与检测目标的最优匹配关系,提高了目标跟踪的稳定性与准确度。Based on the above technical solution, the target tracking device in the present disclosure can, when determining the matching relationship between the target to be tracked and the detection target, consider whether the detection target has matched other targets to be tracked, and re-determine based on the current target to be tracked. The degree of impact that the matching relationship with the detection target has on the overall matching, and the degree of impact that the matched target to be tracked has on the overall matching by redetermining the matching relationship with the detection target. Adjust the relationship between the target to be tracked and the detection target at this time. Matching relationship, so that the matching relationship between the target to be tracked and the target to be detected achieves the overall optimal matching. Therefore, the target tracking device can determine the optimal matching relationship between the target to be tracked and the detected target from an overall perspective, thereby improving the stability and accuracy of target tracking.
示例性的,待跟踪目标与检测目标的距离如下表一所示:For example, the distance between the target to be tracked and the detected target is as shown in Table 1 below:
表一 待跟踪目标与检测目标的距离Table 1 The distance between the target to be tracked and the target to be detected
Figure PCTCN2022083887-appb-000005
Figure PCTCN2022083887-appb-000005
其中,待跟踪目标包括A1、A2、A3、A4,检测目标包括B1、B2、B3、B4。A1与B1的距离为3,A1与B2的距离为4,A1与B3的距离为6,A1与B4的距离为4,以此类推。Among them, the targets to be tracked include A1, A2, A3, and A4, and the detection targets include B1, B2, B3, and B4. The distance between A1 and B1 is 3, the distance between A1 and B2 is 4, the distance between A1 and B3 is 6, the distance between A1 and B4 is 4, and so on.
以上述方案为例,目标跟踪装置确定待跟踪目标的权重值,如下表二所示:Taking the above solution as an example, the target tracking device determines the weight value of the target to be tracked, as shown in Table 2 below:
表二 待跟踪目标的权重值Table 2 Weight values of targets to be tracked
Figure PCTCN2022083887-appb-000006
Figure PCTCN2022083887-appb-000006
检测目标的权重值如下表三所示:The weight value of the detection target is shown in Table 3 below:
表三 检测目标的权重值Table 3 Weight values of detection targets
Figure PCTCN2022083887-appb-000007
Figure PCTCN2022083887-appb-000007
1、目标跟踪装置确定A1与检测目标的匹配关系。1. The target tracking device determines the matching relationship between A1 and the detection target.
A1与B1的权重值之和为3,等于A1与B1的距离,且A1与B1的距离最短。因此,目标跟踪装置将B1作为第一检测目标。同时,B1未与其他待跟踪目标匹配,因此,目标跟踪装置确定A1与B1匹配。The sum of the weight values of A1 and B1 is 3, which is equal to the distance between A1 and B1, and the distance between A1 and B1 is the shortest. Therefore, the target tracking device takes B1 as the first detection target. At the same time, B1 does not match other targets to be tracked. Therefore, the target tracking device determines that A1 matches B1.
此时的匹配关系为:A1与B1匹配。The matching relationship at this time is: A1 matches B1.
2、目标跟踪装置确定A2与检测目标的匹配关系。2. The target tracking device determines the matching relationship between A2 and the detection target.
A2与B4的权重值之和为3,等于A2与B4的距离,且A2与B4的距离最短。因此,目标跟踪装置将B4作为第一检测目标。同时,B4未与其他待跟踪目标匹配,因此,目标跟踪装置确定A2与B4匹配。The sum of the weight values of A2 and B4 is 3, which is equal to the distance between A2 and B4, and the distance between A2 and B4 is the shortest. Therefore, the target tracking device takes B4 as the first detection target. At the same time, B4 does not match other targets to be tracked. Therefore, the target tracking device determines that A2 matches B4.
此时的匹配关系为:A1与B1匹配、A2与B4匹配。The matching relationships at this time are: A1 matches B1, and A2 matches B4.
3、目标跟踪装置确定A3与检测目标的匹配关系。3. The target tracking device determines the matching relationship between A3 and the detection target.
A3与B4的权重值之和为3,等于A3与B4的距离,且A3与B4的距离最短。因此,目标跟踪装置将B4作为第一检测目标。然而,由于A2与B4 已经匹配,目标跟踪装置需要分别确定A3与B1的权重值之和与距离的差值,A3与B2的权重值之和与距离的差值,A3与B3的权重值之和与距离的差值,以及分别确定A2与B1的权重值之和与距离的差值,A2与B2的权重值之和与距离的差值,A2与B3的权重值之和与距离的差值。The sum of the weight values of A3 and B4 is 3, which is equal to the distance between A3 and B4, and the distance between A3 and B4 is the shortest. Therefore, the target tracking device takes B4 as the first detection target. However, since A2 and B4 have been matched, the target tracking device needs to determine the difference between the sum of the weight values of A3 and B1 and the distance, the difference between the sum of the weight values of A3 and B2 and the distance, and the difference between the sum of the weight values of A3 and B3. The difference between the sum and the distance, and the difference between the sum of the weight values of A2 and B1 and the distance, the difference between the sum of the weight values of A2 and B2 and the distance, and the difference between the sum of the weight values of A2 and B3 and the distance. value.
结果如下表四所示:The results are shown in Table 4 below:
表四 A2、A3与检测目标的权重值之和与距离的差值Table 4: The difference between the sum of weight values and the distance between A2, A3 and the detection target
Figure PCTCN2022083887-appb-000008
Figure PCTCN2022083887-appb-000008
其中,第一影响值与第二影响值均为1,第二检测目标为B3,第三检测目标为B2。目标跟踪装置既可以执行步骤9027,也可以执行步骤9028,此处以目标跟踪装置执行步骤9028为例。Among them, the first influence value and the second influence value are both 1, the second detection target is B3, and the third detection target is B2. The target tracking device may execute step 9027 or step 9028. Here, the target tracking device executes step 9028 as an example.
目标跟踪装置确定A3与B4匹配,并对A2与B2执行第四目标操作。The target tracking device determines that A3 and B4 match, and performs a fourth target operation on A2 and B2.
此外,目标跟踪装置还可以根据第二影响值更新A2、A3与B4的权重值。In addition, the target tracking device can also update the weight values of A2, A3 and B4 according to the second influence value.
更新后的待跟踪目标的权重值如下表五所示:The updated weight values of the targets to be tracked are shown in Table 5 below:
表五 更新后的待跟踪目标的权重值Table 5: Updated weight values of targets to be tracked
Figure PCTCN2022083887-appb-000009
Figure PCTCN2022083887-appb-000009
更新后的检测目标的权重值如下表六所示:The updated weight values of the detection targets are shown in Table 6 below:
表六 更新后的检测目标的权重值Table 6: Updated weight values of detection targets
Figure PCTCN2022083887-appb-000010
Figure PCTCN2022083887-appb-000010
由于B2未与其他待跟踪目标临时匹配,因此,目标跟踪装置确定A2与B2匹配。Since B2 does not temporarily match other targets to be tracked, the target tracking device determines that A2 matches B2.
此时的匹配关系为:A1与B1匹配,A2与B2匹配,A3与B4匹配。The matching relationships at this time are: A1 matches B1, A2 matches B2, and A3 matches B4.
4、目标跟踪装置确定A4与检测目标的匹配关系。4. The target tracking device determines the matching relationship between A4 and the detection target.
A4与B3的权重值之和等于A4与B3的距离,且A4与B3的距离最短。同时,B3未与其他待跟踪目标匹配,因此,目标跟踪装置确定A4与B3匹配。The sum of the weight values of A4 and B3 is equal to the distance between A4 and B3, and the distance between A4 and B3 is the shortest. At the same time, B3 does not match other targets to be tracked, so the target tracking device determines that A4 matches B3.
此时的匹配关系为:A1与B1匹配,A2与B2匹配,A3与B4匹配、A4与B3匹配。The matching relationships at this time are: A1 matches B1, A2 matches B2, A3 matches B4, and A4 matches B3.
至此,目标跟踪装置确定了与每个待跟踪目标匹配的检测目标。At this point, the target tracking device determines the detection target matching each target to be tracked.
以下,对目标跟踪装置根据每个检测目标与每个待跟踪目标之间的距离, 确定匹配关系的过程进行介绍。The following describes the process by which the target tracking device determines the matching relationship based on the distance between each detected target and each target to be tracked.
作为本公开的又一种可能的实施例,结合图5,如图12所示,上述步骤502还可以通过以下步骤实现。As another possible embodiment of the present disclosure, as shown in Figure 12 in conjunction with Figure 5, the above step 502 can also be implemented through the following steps.
步骤1201、目标跟踪装置确定待跟踪目标列表与检测目标列表。Step 1201: The target tracking device determines a list of targets to be tracked and a list of detected targets.
其中,待跟踪目标列表包括每个待跟踪目标,检测目标列表包括每个检测目标。The list of targets to be tracked includes each target to be tracked, and the list of detected targets includes each target to be detected.
步骤1202、目标跟踪装置对待跟踪目标列表与检测目标列表中的待跟踪目标与检测目标执行第五目标操作,直至待跟踪目标列表中不存在待跟踪目标或者检测目标列表中不存在检测目标,确定与每个待跟踪目标匹配的检测目标。Step 1202: The target tracking device performs the fifth target operation on the targets to be tracked and the detected targets in the target to be tracked list and the target to be detected list, until there is no target to be tracked in the target list to be tracked or there is no detection target in the target target list to be detected, determine Detected targets that match each target to be tracked.
需要说明的是,在实际执行过程中,待跟踪目标与检测目标的数量存在不对等的情况,因此最后会存在部分待跟踪目标或者存在部分检测目标。目标跟踪装置可以确定该部分待跟踪目标不存在匹配的检测目标,或者确定该部分检测目标不存在匹配的待跟踪目标。It should be noted that during the actual execution process, the number of targets to be tracked and detected targets is not equal, so in the end there will be some targets to be tracked or some targets to be detected. The target tracking device may determine that there is no matching detection target for the part of the target to be tracked, or determine that there is no matching target to be tracked for the part of the detection target.
如图13所示,第五目标操作包括以下步骤1301-步骤1304。As shown in Figure 13, the fifth target operation includes the following steps 1301-1304.
步骤1301、目标跟踪装置确定当前待跟踪目标列表中的每个待跟踪目标与当前检测目标列表中的每个待跟踪目标之间的目标距离。Step 1301: The target tracking device determines the target distance between each target to be tracked in the current target list to be tracked and each target to be tracked in the current detected target list.
步骤1302、目标跟踪装置确定目标距离中的最小距离,以及最小距离对应的第二待跟踪目标和第四检测目标。Step 1302: The target tracking device determines the minimum distance among the target distances, and the second target to be tracked and the fourth detection target corresponding to the minimum distance.
其中,第二待跟踪目标和第四检测目标之间的距离为最小距离。Wherein, the distance between the second target to be tracked and the fourth detection target is the minimum distance.
需要说明的是,在存在多个距离的值同为最小值的情况下,目标跟踪装置可以从中任选一个距离作为最小距离,并将与最小距离对应的待跟踪目标作为第二待跟踪目标,对应的检测目标作为第四检测目标。It should be noted that when there are multiple distances with the same minimum value, the target tracking device can select any one of the distances as the minimum distance, and use the target to be tracked corresponding to the minimum distance as the second target to be tracked. The corresponding detection target is used as the fourth detection target.
步骤1303、目标跟踪装置确定第二待跟踪目标与第四检测目标的匹配关系。Step 1303: The target tracking device determines the matching relationship between the second target to be tracked and the fourth detected target.
由于第二待跟踪目标与第四检测目标之间的距离为最小距离,因此,目标跟踪装置可以优先确定第二待跟踪目标与第四检测目标相匹配,从而得到该第二待跟踪目标的最优匹配关系。Since the distance between the second target to be tracked and the fourth detected target is the minimum distance, the target tracking device can first determine that the second target to be tracked matches the fourth detected target, thereby obtaining the best value of the second target to be tracked. Excellent matching relationship.
步骤1304、目标跟踪装置从当前待跟踪目标列表中删除第二待跟踪目标,从当前检测目标列表中删除第四检测目标。Step 1304: The target tracking device deletes the second target to be tracked from the current list of targets to be tracked, and deletes the fourth detected target from the current list of detected targets.
也即是说,目标跟踪装置在确定后续待跟踪目标与检测目标的匹配关系时,不需要考虑已经确定好匹配关系的待跟踪目标与其他检测目标的距离,也不需要考虑已经确定好匹配关系的检测目标与其他待跟踪目标的距离,因 此减少了目标跟踪装置在确定匹配关系时的计算量。That is to say, when the target tracking device determines the matching relationship between the subsequent target to be tracked and the detection target, it does not need to consider the distance between the target to be tracked and other detection targets that have already determined the matching relationship, nor does it need to consider the already determined matching relationship. The distance between the detection target and other targets to be tracked is reduced, thereby reducing the calculation amount of the target tracking device when determining the matching relationship.
同样的,上述技术方案以目标跟踪装置确定与待跟踪目标匹配的检测目标为例,对本公开中目标跟踪装置确定匹配关系的过程进行了说明。目标跟踪在还可以通过上述技术方案确定与检测目标匹配的待跟踪目标,从而确定匹配关系,即将上述技术方案中的待跟踪目标与检测目标的执行客体互换,具体实施方式与上述技术方案相同,此处不再赘述。Similarly, the above technical solution takes the target tracking device to determine the detection target that matches the target to be tracked as an example to explain the process of the target tracking device determining the matching relationship in the present disclosure. Target tracking can also determine the target to be tracked that matches the detection target through the above technical solution, thereby determining the matching relationship, that is, exchanging the execution object of the target to be tracked with the detection target in the above technical solution. The specific implementation method is the same as the above technical solution. , which will not be described again here.
基于上述技术方案,本公开中的目标跟踪装置在确定出待跟踪目标列表与检测目标列表中距离最小的第二待跟踪目标与第四检测目标相匹配之后,可以将第二待跟踪目标与第四检测目标从列表中移除,从而确定剩下的待跟踪目标与检测目标的匹配关系。因此,目标跟踪装置能够从待跟踪目标个体的角度出发,确定每个待跟踪目标是否与检测目标匹配,进一步降低了目标跟踪装置确定匹配关系的计算成本,从而提高了目标跟踪效率。Based on the above technical solution, after determining that the second target to be tracked and the fourth detected target with the smallest distance in the target list to be tracked and the list of detected targets match, the target tracking device in the present disclosure can match the second target to be tracked with the third target to be tracked. Four detected targets are removed from the list to determine the matching relationship between the remaining targets to be tracked and the detected targets. Therefore, the target tracking device can determine whether each target to be tracked matches the detection target from the perspective of the target individual to be tracked, further reducing the computational cost of determining the matching relationship by the target tracking device, thereby improving the target tracking efficiency.
结合上述表一中的示例,目标跟踪装置确定待跟踪目标列表包括:A1、A2、A3、A4,检测目标列表包括:B1、B2、B3、B4。其中,A4与B3的距离以及A4与B4的距离为2,均为最小值。因此,目标跟踪装置可以选择A4与B3相匹配,并从待跟踪目标列表与检测目标列表删除A4与B3。此时,目标跟踪装置确定待跟踪目标列表包括:A1、A2、A3,检测目标列表包括:B1、B2、B4。Combined with the example in Table 1 above, the target tracking device determines that the list of targets to be tracked includes: A1, A2, A3, and A4, and the list of detected targets includes: B1, B2, B3, and B4. Among them, the distance between A4 and B3 and the distance between A4 and B4 are 2, which are both minimum values. Therefore, the target tracking device can select A4 and B3 to match, and delete A4 and B3 from the to-be-tracked target list and the detected target list. At this time, the target tracking device determines that the list of targets to be tracked includes: A1, A2, and A3, and the list of detected targets includes: B1, B2, and B4.
删除后的待跟踪目标列表与检测目标列表中,A1与B1,A2与B4的距离以及A3与B4的距离为3,均为最小值。因此,目标跟踪装置可以选择A2与B4相匹配,并从待跟踪目标列表与检测目标列表删除A2与B4。此时,目标跟踪装置确定待跟踪目标列表包括:A1、A3,检测目标列表包括:B1、B2。In the deleted target list to be tracked and the detected target list, the distances between A1 and B1, A2 and B4, and the distance between A3 and B4 are 3, which are all minimum values. Therefore, the target tracking device can select A2 and B4 to match, and delete A2 and B4 from the to-be-tracked target list and the detected target list. At this time, the target tracking device determines that the list of targets to be tracked includes: A1 and A3, and the list of detected targets includes: B1 and B2.
删除后的待跟踪目标列表与检测目标列表中,A1与B1的距离为最小值3。因此,目标跟踪装置可以选择A1与B1相匹配,并从待跟踪目标列表与检测目标列表删除A1与B1。此时,目标跟踪装置确定待跟踪目标列表包括:A3,检测目标列表包括:B2。In the deleted target list to be tracked and the detected target list, the distance between A1 and B1 is the minimum value 3. Therefore, the target tracking device can select A1 and B1 to match, and delete A1 and B1 from the to-be-tracked target list and the detected target list. At this time, the target tracking device determines that the list of targets to be tracked includes: A3, and the list of detected targets includes: B2.
删除后的待跟踪目标列表与检测目标列表中,A3与B2的距离为最小值5。因此,目标跟踪装置可以选择A3与B2相匹配,并从待跟踪目标列表与检测目标列表删除A3与B2。此时,目标跟踪装置确定待跟踪目标列表中不存在待跟踪目标,检测目标列表中不存在检测目标。In the deleted target list and detection target list, the distance between A3 and B2 is the minimum value 5. Therefore, the target tracking device can select A3 and B2 to match, and delete A3 and B2 from the to-be-tracked target list and the detected target list. At this time, the target tracking device determines that there is no target to be tracked in the list of targets to be tracked, and there is no detection target in the list of detection targets.
最终,目标跟踪装置确定的匹配关系为:A1与B1匹配,A2与B4匹配,A3与B2匹配,A4与B3匹配。Finally, the matching relationships determined by the target tracking device are: A1 matches B1, A2 matches B4, A3 matches B2, and A4 matches B3.
以下,对目标跟踪装置根据匹配关系,更新待跟踪目标和待跟踪目标的 关键点的位置的过程进行介绍。Below, the process of the target tracking device updating the positions of the target to be tracked and the key points of the target to be tracked based on the matching relationship is introduced.
作为本公开的一种可能的实施例,结合图3,如图14所示,上述步骤306还可以通过以下步骤实现。As a possible embodiment of the present disclosure, as shown in Figure 14 in conjunction with Figure 3, the above step 306 can also be implemented through the following steps.
其中,对于存在与之匹配的检测目标的待跟踪目标,上述步骤306可以通过以下步骤1401-步骤1402实现:Among them, for the target to be tracked that has a matching detection target, the above step 306 can be implemented through the following steps 1401 to 1402:
步骤1401、目标跟踪装置确定第三待跟踪目标。Step 1401: The target tracking device determines the third target to be tracked.
其中,第三待跟踪目标中的每个待跟踪目标存在匹配的检测目标。Wherein, each of the third targets to be tracked has a matching detection target.
需要说明的是,第三待跟踪目标为待跟踪目标中与检测目标匹配成功的目标。因此,对于第三待跟踪目标,目标跟踪装置可以将第三待跟踪目标与匹配的检测目标相关联,从而达到目标跟踪的技术效果。It should be noted that the third target to be tracked is a target that successfully matches the detected target among the targets to be tracked. Therefore, for the third target to be tracked, the target tracking device can associate the third target to be tracked with the matching detection target, thereby achieving the technical effect of target tracking.
步骤1402、目标跟踪装置根据与第三待跟踪目标匹配的检测目标的关键点的检测位置以及第三待跟踪目标的关键点的预测位置,更新第三待跟踪目标的关键点的位置。Step 1402: The target tracking device updates the position of the key point of the third target to be tracked based on the detected position of the key point of the detected target that matches the third target to be tracked and the predicted position of the key point of the third target to be tracked.
示例性的,目标跟踪装置可以根据卡尔曼滤波(Kalman filtering)算法对预测位置和检测位置进行校正,确定第三待跟踪目标的关键点在第一时刻的位置。For example, the target tracking device can correct the predicted position and the detected position according to the Kalman filtering algorithm to determine the position of the key point of the third target to be tracked at the first moment.
需要说明的是,第三待跟踪目标可能存在未被检测到的关键点,与之匹配的检测目标也可能存在未被检测到的关键点。如图15所示,左侧为第三待跟踪目标,右侧为与之匹配的检测目标。其中,关键点1501、关键点1504为第三待跟踪目标的被检测到的关键点(即图15中的实心点)。关键点1502、关键点1503为第三待跟踪目标的未被检测到的关键点(即图15中的空心点)。关键点1505、关键点1506为检测目标的检测到的关键点。关键点1507、关键点1508为检测目标的未被检测到的关键点。为便于理解,图15中仅示出一个待跟踪目标。It should be noted that the third target to be tracked may have undetected key points, and the matching detection target may also have undetected key points. As shown in Figure 15, the left side is the third target to be tracked, and the right side is the matching detection target. Among them, key points 1501 and 1504 are detected key points of the third target to be tracked (ie, the solid points in Figure 15). Key points 1502 and 1503 are undetected key points of the third target to be tracked (ie, hollow points in Figure 15). Key points 1505 and 1506 are detected key points of the detection target. Key points 1507 and 1508 are undetected key points of the detection target. For ease of understanding, only one target to be tracked is shown in Figure 15 .
在第三待跟踪目标的关键点已被检测到,且与之匹配的检测目标的对应关键点已被检测到的情况下(例如图15中的关键点1501与关键点1505),目标跟踪装置可以根据与第三待跟踪目标匹配的检测目标的关键点的检测位置以及第三待跟踪目标的关键点的预测位置,更新第三待跟踪目标的关键点的位置。When the key point of the third target to be tracked has been detected, and the corresponding key point of the matching detection target has been detected (for example, key point 1501 and key point 1505 in Figure 15), the target tracking device The position of the key point of the third target to be tracked may be updated based on the detected position of the key point of the detected target that matches the third target to be tracked and the predicted position of the key point of the third target to be tracked.
在第三待跟踪目标的关键点已被检测到,且与之匹配的检测目标的对应关键点未被检测到的情况下(例如图15中的关键点1504与关键点1508),目标跟踪装置可以将第三待跟踪目标的关键点的预测位置或者在第二时刻的位置作为该关键点在第一时刻的位置。When the key point of the third target to be tracked has been detected, and the corresponding key point of the matching detection target has not been detected (for example, key point 1504 and key point 1508 in Figure 15), the target tracking device The predicted position of the key point of the third target to be tracked or the position at the second time can be used as the position of the key point at the first time.
在第三待跟踪目标的关键点未被检测到,且与之匹配的检测目标的对应关键点已被检测到的情况下(例如图15中的关键点1502与关键点1506),目标跟踪装置可以将匹配的检测目标的对应关键点的检测位置作为该未被检测到的关键点在第一时刻的位置。In the case where the key point of the third target to be tracked has not been detected and the corresponding key point of the matching detection target has been detected (for example, key point 1502 and key point 1506 in Figure 15), the target tracking device The detection position of the corresponding key point of the matching detection target may be used as the position of the undetected key point at the first moment.
在第三待跟踪目标的关键点未被检测到,且与之匹配的检测目标的对应关键点未被检测到的情况下(例如图15中的关键点1503与关键点1507),目标跟踪装置可以将未被检测到的关键点的位置信息设置为预设位置数值,用于表示该关键点未被检测到。When the key point of the third target to be tracked has not been detected, and the corresponding key point of the matching detection target has not been detected (for example, key point 1503 and key point 1507 in Figure 15), the target tracking device The position information of an undetected key point can be set to a preset position value to indicate that the key point has not been detected.
对于不存在与之匹配的待跟踪目标的检测目标,上述步骤306可以通过以下步骤1403-步骤1404实现:For a detected target that does not have a matching target to be tracked, the above step 306 can be implemented through the following steps 1403 to 1404:
步骤1403、目标跟踪装置确定第五检测目标。Step 1403: The target tracking device determines the fifth detection target.
其中,第五检测目标中的每个检测目标不存在匹配的待跟踪目标。Wherein, each detection target in the fifth detection target does not have a matching target to be tracked.
步骤1404、目标跟踪装置在待跟踪目标中增加第五检测目标。Step 1404: The target tracking device adds a fifth detection target to the targets to be tracked.
需要说明的是,对于不存在与之匹配的待跟踪目标的检测目标,可能是在第一时刻目标区域内新出现的目标。因此,目标跟踪装置需要将其增加至待跟踪目标中,并对其进行后续跟踪。It should be noted that a detected target for which there is no matching target to be tracked may be a new target that appears in the target area at the first moment. Therefore, the target tracking device needs to add it to the target to be tracked and subsequently track it.
一种可能的实现方式中,步骤1404包括:目标跟踪装置将第五检测目标作为第一时刻新增加的待跟踪目标,将第五检测目标的关键点作为新增加的待跟踪目标的关键点。In one possible implementation, step 1404 includes: the target tracking device uses the fifth detected target as a newly added target to be tracked at the first moment, and uses the key points of the fifth detected target as the key points of the newly added target to be tracked.
对于不存在与之匹配的检测目标的待跟踪目标,上述步骤306可以通过以下步骤1405-步骤1408实现:For a target to be tracked that does not have a matching detection target, the above step 306 can be implemented through the following steps 1405 to 1408:
步骤1405、目标跟踪装置确定第四待跟踪目标以及第四待跟踪目标的不匹配次数。Step 1405: The target tracking device determines the fourth target to be tracked and the number of mismatches between the fourth target to be tracked.
其中,第四待跟踪目标中的每个待跟踪目标不存在匹配的检测目标,不匹配次数为待跟踪目标连续不存在匹配的检测目标的次数。Wherein, each of the fourth targets to be tracked does not have a matching detection target, and the number of mismatches is the number of consecutive times that the target to be tracked does not have a matching detection target.
在该待跟踪目标不存在匹配的检测目标的情况下,目标跟踪装置设置该待跟踪目标的不匹配次数加一。When there is no matching detection target for the target to be tracked, the target tracking device sets the number of mismatches for the target to be tracked plus one.
在该待跟踪目标存在匹配的检测目标的情况下,目标跟踪装置清空待跟踪目标的不匹配次数。When the target to be tracked has a matching detection target, the target tracking device clears the number of mismatches of the target to be tracked.
示例性的,目标跟踪装置可以为每个待跟踪目标设置匹配计数器。匹配计数器用于计算待跟踪目标的不匹配次数。For example, the target tracking device may set a matching counter for each target to be tracked. The match counter is used to count the number of mismatches for the target to be tracked.
步骤1406、目标跟踪装置判断不匹配次数是否大于预设跟踪阈值。Step 1406: The target tracking device determines whether the number of mismatches is greater than the preset tracking threshold.
其中,预设跟踪阈值可以根据实际情况设置,本公开对此不作限定。The preset tracking threshold can be set according to actual conditions, and this disclosure does not limit this.
需要说明的是,在不匹配次数大于预设跟踪阈值的情况下,说明该第四待跟踪目标多次跟踪失败,目标跟踪装置确定第四待跟踪目标已经从目标区域中消失。目标跟踪装置可以执行步骤1407。It should be noted that when the number of mismatches is greater than the preset tracking threshold, it means that the fourth target to be tracked has failed to track multiple times, and the target tracking device determines that the fourth target to be tracked has disappeared from the target area. The target tracking device may perform step 1407.
步骤1407、目标跟踪装置在待跟踪目标中删除第四待跟踪目标。Step 1407: The target tracking device deletes the fourth target to be tracked from the targets to be tracked.
在不匹配次数小于或等于预设跟踪阈值的情况下,说明该第四待跟踪目标可能由于其他因素导致匹配失败。目标跟踪装置可以执行步骤1408。If the number of mismatches is less than or equal to the preset tracking threshold, it means that the fourth target to be tracked may fail to match due to other factors. The target tracking device may perform step 1408.
步骤1408、目标跟踪装置将第四待跟踪目标的关键点的预测位置或者第四待跟踪目标的关键点在第二时刻的位置作为更新后的第四待跟踪目标的关键点的位置。Step 1408: The target tracking device uses the predicted position of the key point of the fourth target to be tracked or the position of the key point of the fourth target to be tracked at the second time as the updated position of the key point of the fourth target to be tracked.
需要说明的是,对于第四待跟踪目标中未被检测到的关键点,目标跟踪装置可以将未被检测到的关键点的位置信息设置为预设位置数值,用于表示该关键点未被检测到。It should be noted that for the undetected key points in the fourth target to be tracked, the target tracking device can set the position information of the undetected key points as a preset position value to indicate that the key points have not been detected. detected.
基于上述技术方案,本公开中的目标跟踪装置能够根据匹配关系,将待跟踪目标与检测目标分为三类,即存在与之匹配的检测目标的待跟踪目标、不存在与之匹配的待跟踪目标的检测目标以及不存在与之匹配的检测目标的待跟踪目标。同时,目标跟踪装置基于上述三类目标,执行相应的更新操作,有效提高了目标跟踪的稳定性与准确度。Based on the above technical solution, the target tracking device in the present disclosure can divide the target to be tracked and the detection target into three categories according to the matching relationship, that is, the target to be tracked has a matching detection target and the target to be tracked does not have a matching detection target. The detection target of the target and the target to be tracked for which there is no matching detection target. At the same time, the target tracking device performs corresponding update operations based on the above three types of targets, effectively improving the stability and accuracy of target tracking.
需要说明的是,上述实施例中的步骤1401-步骤1402、步骤1403-步骤1404以及步骤1405-步骤1408之间相互独立。步骤1401-步骤1402、步骤1403-步骤1404以及步骤1405-步骤1408可以按照任意组合的执行顺序执行,也可以并行执行。本公开对上述步骤的执行顺序并不作限定。It should be noted that in the above embodiment, steps 1401 to 1402, steps 1403 to 1404, and steps 1405 to 1408 are independent of each other. Steps 1401 to 1402, steps 1403 to 1404, and steps 1405 to 1408 may be executed in any combination of execution order, or may be executed in parallel. This disclosure does not limit the execution order of the above steps.
以下,对目标跟踪装置根据匹配关系,更新待跟踪目标和待跟踪目标的关键点的位置的过程进行介绍。The following is an introduction to the process in which the target tracking device updates the positions of the target to be tracked and the key points of the target to be tracked based on the matching relationship.
作为本公开的又一种可能的实施例,结合图3,如图16所示,除上述步骤1401-步骤1408以外,上述步骤306还可以通过以下步骤实现。As another possible embodiment of the present disclosure, as shown in Figure 16 in conjunction with Figure 3, in addition to the above steps 1401 to 1408, the above step 306 can also be implemented through the following steps.
步骤1601、目标跟踪装置判断第五待跟踪目标是否存在匹配的检测目标。Step 1601: The target tracking device determines whether there is a matching detection target for the fifth target to be tracked.
其中,第五待跟踪目标为待跟踪目标中的任一个目标。Wherein, the fifth target to be tracked is any target among the targets to be tracked.
在第五待跟踪目标存在匹配的检测目标的情况下,目标跟踪装置执行步骤1602。If there is a matching detection target for the fifth target to be tracked, the target tracking device executes step 1602.
步骤1602、目标跟踪装置根据匹配的检测目标的关键点的检测位置与第五待跟踪目标的关键点的预测位置更新第五待跟踪目标的关键点的位置。Step 1602: The target tracking device updates the position of the key point of the fifth target to be tracked based on the matching detected position of the key point of the detected target and the predicted position of the key point of the fifth target to be tracked.
相关实现方式可参考步骤902中的描述,此处不再赘述。For relevant implementation methods, please refer to the description in step 902, which will not be described again here.
在第五待跟踪目标不存在匹配的检测目标的情况下,目标跟踪装置执行 步骤1603。In the case where there is no matching detected target for the fifth target to be tracked, the target tracking device executes step 1603.
步骤1603、目标跟踪装置判断第五待跟踪目标的不匹配次数是否大于预设跟踪阈值。Step 1603: The target tracking device determines whether the number of mismatches of the fifth target to be tracked is greater than a preset tracking threshold.
其中,不匹配次数为待跟踪目标连续不存在匹配的检测目标的次数。Among them, the number of mismatches is the number of consecutive times that the target to be tracked does not have a matching detection target.
在第五待跟踪目标的不匹配次数大于预设跟踪阈值的情况下,目标跟踪装置可以执行步骤1604。In the case where the number of mismatches of the fifth target to be tracked is greater than the preset tracking threshold, the target tracking device may perform step 1604.
步骤1604、目标跟踪装置在待跟踪目标中删除第五待跟踪目标。Step 1604: The target tracking device deletes the fifth target to be tracked from the targets to be tracked.
在第五待跟踪目标的不匹配次数小于或等于预设跟踪阈值的情况下,目标跟踪装置可以执行步骤1605。In the case where the number of mismatches of the fifth target to be tracked is less than or equal to the preset tracking threshold, the target tracking device may perform step 1605.
步骤1605、目标跟踪装置将第五待跟踪目标的关键点的预测位置或者第五待跟踪目标的关键点在第二时刻的位置作为更新后的第五待跟踪目标的关键点的位置。Step 1605: The target tracking device uses the predicted position of the key point of the fifth target to be tracked or the position of the key point of the fifth target to be tracked at the second time as the updated position of the key point of the fifth target to be tracked.
需要说明的是,对于第五待跟踪目标中未被检测到的关键点,目标跟踪装置可以将未被检测到的关键点的位置信息设置为预设位置数值,用于表示该关键点未被检测到。It should be noted that for the undetected key points in the fifth target to be tracked, the target tracking device can set the position information of the undetected key points as a preset position value to indicate that the key points have not been detected. detected.
步骤1606、目标跟踪装置判断第六检测目标是否存在匹配的待跟踪目标。Step 1606: The target tracking device determines whether there is a matching target to be tracked for the sixth detected target.
其中,第六检测目标为检测目标中的任一个目标。Wherein, the sixth detection target is any one of the detection targets.
在第六检测目标不存在匹配的待跟踪目标的情况下,目标跟踪装置可以执行步骤1607。In the case where the sixth detected target does not have a matching target to be tracked, the target tracking device may perform step 1607.
步骤1607、目标跟踪装置在待跟踪目标中增加第六检测目标。Step 1607: The target tracking device adds a sixth detection target to the targets to be tracked.
相关实现方式可参考步骤1404中的描述,此处不再赘述。For relevant implementation methods, please refer to the description in step 1404, which will not be described again here.
基于上述技术方案,本公开中的目标跟踪装置能够分别确定每个待跟踪目标和每个检测目标的匹配关系,并根据该匹配关系对每个待跟踪目标和每个检测目标执行相应的更新操作,提高了目标跟踪的稳定性与准确度。Based on the above technical solution, the target tracking device in the present disclosure can determine the matching relationship between each target to be tracked and each detected target, and perform corresponding update operations for each target to be tracked and each detected target based on the matching relationship. , improving the stability and accuracy of target tracking.
需要说明的是,上述实施例中的步骤1601与步骤1606之间相互独立。本公开对上述步骤的执行顺序并不作限定。It should be noted that step 1601 and step 1606 in the above embodiment are independent of each other. This disclosure does not limit the execution order of the above steps.
本公开实施例可以根据上述方法示例对目标跟踪装置进行功能模块或者功能单元的划分,例如,可以对应各个功能划分各个功能模块或者功能单元,也可以将两个或两个以上的功能集成在一个处理模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块或者功能单元的形式实现。其中,本公开实施例中对模块或者单元的划分是示意性的,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。Embodiments of the present disclosure can divide the target tracking device into functional modules or functional units according to the above method examples. For example, each functional module or functional unit can be divided corresponding to each function, or two or more functions can be integrated into one in the processing module. The above-mentioned integrated modules can be implemented in the form of hardware or in the form of software function modules or functional units. Among them, the division of modules or units in the embodiments of the present disclosure is schematic and is only a logical function division. In actual implementation, there may be other division methods.
如图17所示,为根据一些实施例提供的一种目标跟踪装置170的结构图, 该装置包括:处理单元1701和获取单元1702。As shown in Figure 17, it is a structural diagram of a target tracking device 170 provided according to some embodiments. The device includes: a processing unit 1701 and an acquisition unit 1702.
获取单元1702,被配置为获取第一时刻的待检测图像。The acquisition unit 1702 is configured to acquire the image to be detected at the first moment.
处理单元1701,被配置为确定待检测图像中检测目标的关键点的检测位置。The processing unit 1701 is configured to determine the detection position of the key point of the detection target in the image to be detected.
获取单元1702,还被配置为获取待跟踪目标的关键点在第二时刻的位置。第二时刻为第一时刻之前的时刻。The obtaining unit 1702 is also configured to obtain the position of the key point of the target to be tracked at the second moment. The second moment is the moment before the first moment.
处理单元1701,还被配置为根据待跟踪目标的关键点在第二时刻的位置,预测待跟踪目标的关键点在第一时刻的预测位置。The processing unit 1701 is also configured to predict the predicted position of the key point of the target to be tracked at the first time based on the position of the key point of the target to be tracked at the second time.
处理单元1701,还被配置为根据检测位置和预测位置,确定检测目标和待跟踪目标之间的匹配关系。匹配关系用于匹配检测目标和待跟踪目标中相同的目标。The processing unit 1701 is also configured to determine the matching relationship between the detected target and the target to be tracked based on the detected position and the predicted position. The matching relationship is used to match the same target among the detected target and the target to be tracked.
处理单元1701,还被配置为根据匹配关系,跟踪待跟踪目标。The processing unit 1701 is also configured to track the target to be tracked according to the matching relationship.
在一些实施例中,处理单元1701,被配置为对每个检测目标和每个待跟踪目标执行第一目标操作,确定每个检测目标与每个待跟踪目标之间的距离;第一目标操作包括:根据第i个检测目标中的关键点的检测位置,和第j个待跟踪目标的关键点的预测位置之间的距离,确定第i个检测目标和第j个待跟踪目标之间的距离;其中,i为小于或等于N的正整数;j为小于或等于M的正整数;处理单元1701,还被配置为根据每个检测目标与每个待跟踪目标之间的距离,确定匹配关系。In some embodiments, the processing unit 1701 is configured to perform a first target operation on each detected target and each target to be tracked, and determine the distance between each detected target and each target to be tracked; the first target operation It includes: determining the distance between the i-th detection target and the j-th target to be tracked based on the distance between the detection position of the key point in the i-th detection target and the predicted position of the key point of the j-th target to be tracked. distance; where i is a positive integer less than or equal to N; j is a positive integer less than or equal to M; the processing unit 1701 is also configured to determine a match based on the distance between each detected target and each target to be tracked relation.
在一些实施例中,处理单元1701,被配置为对第i个检测目标与第j个待跟踪目标的每个对应关键点执行第二目标操作,确定每个对应关键点之间的距离;第二目标操作包括:确定第一关键点与第二关键点;根据第一关键点的检测位置和第二关键点的预测位置确定第一关键点与第二关键点之间的距离;第一关键点为第i个检测目标中的任一个关键点;第二关键点为第j个待跟踪目标中与第一关键点对应的关键点;处理单元1701,还被配置为根据每个对应关键点之间的距离,确定第i个检测目标和第j个待跟踪目标之间的距离。In some embodiments, the processing unit 1701 is configured to perform a second target operation on each corresponding key point of the i-th detected target and the j-th target to be tracked, and determine the distance between each corresponding key point; The second target operation includes: determining the first key point and the second key point; determining the distance between the first key point and the second key point based on the detected position of the first key point and the predicted position of the second key point; The point is any key point in the i-th detected target; the second key point is the key point corresponding to the first key point in the j-th target to be tracked; the processing unit 1701 is also configured to determine the key point according to each corresponding key point. The distance between them determines the distance between the i-th detection target and the j-th target to be tracked.
在一些实施例中,第i个检测目标和第j个待跟踪目标之间的距离通过以下公式来计算:In some embodiments, the distance between the i-th detected target and the j-th target to be tracked is calculated by the following formula:
Figure PCTCN2022083887-appb-000011
Figure PCTCN2022083887-appb-000011
其中,D(i,j)表示第i个检测目标和第j个待跟踪目标之间的距离,p ik表 示第i个检测目标的第k个关键点的检测位置,p′ jk表示第j个待跟踪目标的第k个关键点的预测位置,d(p ik,p′ jk)表示第i个检测目标的第k个关键点与第j个待跟踪目标的第k个关键点之间的距离,s表示目标的尺寸信息,v ik表示第i个检测目标的第k个关键点是否被检测到,v′ jk表示第j个待跟踪目标的第k个关键点是否被检测到,δ(v ik,v′ jk)表征第i个检测目标的第k个关键点与第j个待跟踪目标的第k个关键点的检测情况。 Among them, D(i,j) represents the distance between the i-th detection target and the j-th target to be tracked, p ik represents the detection position of the k-th key point of the i-th detection target, and p′ jk represents the j-th The predicted position of the k-th key point of the target to be tracked, d(p ik , p′ jk ) represents the distance between the k-th key point of the i-th detection target and the k-th key point of the j-th target to be tracked The distance of δ(v ik ,v′ jk ) represents the detection situation of the k-th key point of the i-th detection target and the k-th key point of the j-th target to be tracked.
在一些实施例中,匹配关系包括如下中的至少一项:存在至少一个待跟踪目标与检测目标匹配、存在至少一个待跟踪目标与检测目标不匹配、以及存在至少一个检测目标与待跟踪目标不匹配中的至少一项。In some embodiments, the matching relationship includes at least one of the following: at least one target to be tracked matches the detected target, at least one target to be tracked does not match the detected target, and at least one detected target does not match the target to be tracked. At least one of the matches.
在一些实施例中,处理单元1701,被配置为确定每个待跟踪目标的权重值与每个检测目标的权重值;其中,任一待跟踪目标的权重值为任一待跟踪目标分别与每个检测目标的距离中最小距离的值;每个检测目标的权重值为预设权重值;对每个待跟踪目标执行第三目标操作,确定与每个待跟踪目标匹配的检测目标;第三目标操作包括:确定与第m个待跟踪目标距离最短的第一检测目标;其中,第一检测目标与第m个待跟踪目标的权重值之和大于或等于第一检测目标与第m个待跟踪目标的距离;m为正整数;对第m个待跟踪目标与第一检测目标执行第四目标操作,确定与第m个待跟踪目标匹配的检测目标;第四目标操作包括:确定是否存在第一待跟踪目标;第一待跟踪目标为根据第三目标操作确定的与第一检测目标匹配的待跟踪目标;在不存在第一待跟踪目标的情况下,确定第m个待跟踪目标与第一检测目标匹配;在存在第一待跟踪目标的情况下,确定第m个待跟踪目标的第一影响值,以及第一待跟踪目标的第二影响值;其中,第一影响值为根据第m个待跟踪目标与第二检测目标确定的差值;差值为一个待跟踪目标与一个检测目标的距离与一个待跟踪目标与一个检测目标的权重之和之间的差值;第二检测目标为除第一检测目标外与第m个待跟踪目标确定的差值最小的检测目标;第二影响值为根据第一待跟踪目标与第三检测目标确定的差值;第三检测目标为除第一检测目标外与第一待跟踪目标确定的差值最小的检测目标;根据第一影响值和第二影响值,确定与第m个待跟踪目标匹配的检测目标。In some embodiments, the processing unit 1701 is configured to determine the weight value of each target to be tracked and the weight value of each detected target; wherein the weight value of any target to be tracked is the weight value of any target to be tracked and each target, respectively. The value of the minimum distance among the distances of the detection targets; the weight value of each detection target is the preset weight value; perform the third target operation on each target to be tracked, and determine the detection target matching each target to be tracked; third The target operation includes: determining the first detected target with the shortest distance from the mth target to be tracked; wherein the sum of the weight values of the first detected target and the mth target to be tracked is greater than or equal to the first detected target and the mth target to be tracked. The distance of the tracking target; m is a positive integer; perform the fourth target operation on the mth target to be tracked and the first detection target to determine the detection target that matches the mth target to be tracked; the fourth target operation includes: determining whether there is The first target to be tracked; the first target to be tracked is the target to be tracked that matches the first detected target determined according to the third target operation; in the absence of the first target to be tracked, determine the mth target to be tracked and the The first detected target matches; in the case where the first target to be tracked exists, determine the first influence value of the mth target to be tracked, and the second influence value of the first target to be tracked; wherein the first influence value is based on The difference between the mth target to be tracked and the second detection target; the difference is the difference between the distance between a target to be tracked and a detection target and the sum of the weights of a target to be tracked and a detection target; the second The detection target is the detection target that has the smallest difference with the mth target to be tracked except for the first detection target; the second influence value is the difference determined based on the first target to be tracked and the third detection target; the third detection target Except for the first detection target, it is the detection target with the smallest difference determined from the first target to be tracked; based on the first influence value and the second influence value, the detection target matching the mth target to be tracked is determined.
在一些实施例中,处理单元1701,被配置为在第一影响值小于第二影响值的情况下,对第m个待跟踪目标与第二检测目标执行第四目标操作,确定与第m个待跟踪目标匹配的检测目标;在第一影响值大于第二影响值的情况下,确定第m个待跟踪目标与第一检测目标匹配。In some embodiments, the processing unit 1701 is configured to perform a fourth target operation on the m-th target to be tracked and the second detected target when the first influence value is less than the second influence value, and determine the relationship between the m-th target and the second detected target. The target to be tracked matches the detected target; when the first influence value is greater than the second influence value, it is determined that the mth target to be tracked matches the first detected target.
在一些实施例中,处理单元1701,被配置为在第一影响值大于第二影响 值的情况下,对第一待跟踪目标与第三检测目标执行第四目标操作,确定与第一待跟踪目标匹配的检测目标。In some embodiments, the processing unit 1701 is configured to perform a fourth target operation on the first target to be tracked and the third detected target when the first influence value is greater than the second influence value, and determine the relationship between the first target to be tracked and the third target to be tracked. Target matching detection target.
在一些实施例中,处理单元1701,被配置为在第一影响值小于第二影响值的情况下,根据第一影响值更新第m个待跟踪目标、第一待跟踪目标以及第一检测目标的权重值;在第一影响值大于第二影响值的情况下,根据第二影响值更新第m个待跟踪目标、第一待跟踪目标以及第一检测目标的权重值。In some embodiments, the processing unit 1701 is configured to update the mth target to be tracked, the first target to be tracked, and the first detection target according to the first influence value when the first influence value is less than the second influence value. weight value; when the first influence value is greater than the second influence value, the weight values of the mth target to be tracked, the first target to be tracked and the first detected target are updated according to the second influence value.
在一些实施例中,处理单元1701,被配置为将第m个待跟踪目标的权重值增加第一影响值,将第一待跟踪目标的权重值增加第一影响值,将第一检测目标的权重值降低第一影响值;处理单元1701,还被配置为将第m个待跟踪目标的权重值增加第二影响值,将第一待跟踪目标的权重值增加第二影响值,将第一检测目标的权重值降低第二影响值。In some embodiments, the processing unit 1701 is configured to increase the weight value of the m-th target to be tracked by a first influence value, increase the weight value of the first target to be tracked by a first influence value, and increase the weight value of the first detected target by a first influence value. The weight value is reduced by the first influence value; the processing unit 1701 is also configured to increase the weight value of the m-th target to be tracked by the second influence value, increase the weight value of the first target to be tracked by the second influence value, and increase the weight value of the first target to be tracked by the second influence value. The weight value of the detection target is reduced by the second influence value.
在一些实施例中,处理单元1701,被配置为确定待跟踪目标列表与检测目标列表;其中,待跟踪目标列表包括每个待跟踪目标,检测目标列表包括每个检测目标;对待跟踪目标列表与检测目标列表中的待跟踪目标与检测目标迭代执行第五目标操作,直至待跟踪目标列表中不存在待跟踪目标或者检测目标列表中不存在检测目标,根据第五目标操作的执行结果确定匹配关系;第五目标操作包括:确定当前待跟踪目标列表中的每个待跟踪目标与当前检测目标列表中的每个待跟踪目标之间的目标距离;确定目标距离中的最小距离,以及最小距离对应的第二待跟踪目标和第四检测目标;第二待跟踪目标和第四检测目标之间的距离为最小距离;确定第二待跟踪目标与第四检测目标的匹配关系;从当前待跟踪目标列表中删除第二待跟踪目标,从当前检测目标列表中删除第四检测目标。In some embodiments, the processing unit 1701 is configured to determine a list of targets to be tracked and a list of detected targets; wherein the list of targets to be tracked includes each target to be tracked, and the list of detected targets includes each detected target; and the list of targets to be tracked and The target to be tracked and the detection target in the detection target list iteratively perform the fifth target operation until there is no target to be tracked in the target list to be tracked or there is no detection target in the detection target list, and the matching relationship is determined based on the execution result of the fifth target operation. ; The fifth target operation includes: determining the target distance between each target to be tracked in the current target list to be tracked and each target to be tracked in the current detected target list; determining the minimum distance in the target distance, and the minimum distance corresponding The second target to be tracked and the fourth target to be detected; the distance between the second target to be tracked and the fourth target to be detected is the minimum distance; determine the matching relationship between the second target to be tracked and the fourth target to be detected; from the current target to be tracked The second target to be tracked is deleted from the list, and the fourth detection target is deleted from the current detection target list.
在一些实施例中,处理单元1701,被配置为确定第三待跟踪目标;第三待跟踪目标中的每个待跟踪目标存在匹配的检测目标;处理单元1701,还被配置为根据与第三待跟踪目标匹配的检测目标的关键点的检测位置以及第三待跟踪目标的关键点的预测位置,更新第三待跟踪目标的关键点的位置。In some embodiments, the processing unit 1701 is configured to determine a third target to be tracked; each of the third targets to be tracked has a matching detected target; the processing unit 1701 is further configured to determine the third target to be tracked according to the The detected position of the key point of the detected target to be tracked matches the predicted position of the key point of the third target to be tracked, and the position of the key point of the third target to be tracked is updated.
在一些实施例中,处理单元1701,被配置为确定第五检测目标;第五检测目标中的每个检测目标不存在匹配的待跟踪目标;处理单元1701,还被配置为在待跟踪目标中增加第五检测目标。In some embodiments, the processing unit 1701 is configured to determine the fifth detection target; each detection target in the fifth detection target does not have a matching target to be tracked; the processing unit 1701 is also configured to determine among the targets to be tracked Added fifth detection target.
在一些实施例中,处理单元1701,被配置为确定第四待跟踪目标以及第四待跟踪目标的不匹配次数;第四待跟踪目标中的每个待跟踪目标不存在匹配的检测目标;不匹配次数为待跟踪目标连续不存在匹配的检测目标的次数;处理单元1701,还被配置为在不匹配次数大于预设跟踪阈值的情况下,在待 跟踪目标中删除第四待跟踪目标。In some embodiments, the processing unit 1701 is configured to determine the fourth target to be tracked and the number of mismatches for the fourth target to be tracked; there is no matching detection target for each target to be tracked in the fourth target to be tracked; no The number of matches is the number of times that the target to be tracked has no matching detection target continuously; the processing unit 1701 is also configured to delete the fourth target to be tracked from the targets to be tracked when the number of mismatches is greater than the preset tracking threshold.
在一些实施例中,处理单元1701,被配置为在不匹配次数小于或等于预设跟踪阈值的情况下,将第四待跟踪目标的关键点的预测位置或者第四待跟踪目标的关键点在第二时刻的位置作为更新后的第四待跟踪目标的关键点的位置。In some embodiments, the processing unit 1701 is configured to, when the number of mismatches is less than or equal to the preset tracking threshold, change the predicted position of the key point of the fourth target to be tracked or the key point of the fourth target to be tracked in The position at the second moment is used as the updated position of the key point of the fourth target to be tracked.
在一些实施例中,处理单元1701,被配置为在第五待跟踪目标存在匹配的检测目标的情况下,根据匹配的检测目标的关键点的检测位置与第五待跟踪目标的关键点的预测位置更新第五待跟踪目标的关键点的位置;第五待跟踪目标为待跟踪目标中的任一个目标;处理单元1701,还被配置为在第五待跟踪目标不存在匹配的检测目标,且第五待跟踪目标的不匹配次数大于预设跟踪阈值的情况下,在待跟踪目标中删除第五待跟踪目标;不匹配次数为待跟踪目标连续不存在匹配的检测目标的次数;处理单元1701,还被配置为在第六检测目标不存在匹配的待跟踪目标的情况下,在待跟踪目标中增加第六检测目标;第六检测目标为检测目标中的任一个目标。In some embodiments, the processing unit 1701 is configured to, in the case where a matching detection target exists for the fifth target to be tracked, based on the detection position of the key point of the matching detection target and the prediction of the key point of the fifth target to be tracked. The position updates the position of the key point of the fifth target to be tracked; the fifth target to be tracked is any one of the targets to be tracked; the processing unit 1701 is also configured to have no matching detection target in the fifth target to be tracked, and If the number of mismatches for the fifth target to be tracked is greater than the preset tracking threshold, the fifth target to be tracked is deleted from the targets to be tracked; the number of mismatches is the number of consecutive times that the target to be tracked does not have a matching detection target; the processing unit 1701 , is also configured to add a sixth detection target to the target to be tracked when the sixth detection target does not have a matching target to be tracked; the sixth detection target is any target among the detection targets.
在一些实施例中,处理单元1701,被配置为在第五待跟踪目标不存在匹配的检测目标,且第五待跟踪目标的不匹配次数小于或等于预设跟踪阈值的情况下,将第五待跟踪目标的关键点的预测位置或者第五待跟踪目标在第二时刻的位置作为更新后的第五待跟踪目标的关键点的位置。In some embodiments, the processing unit 1701 is configured to, when the fifth target to be tracked does not have a matching detection target, and the number of mismatches of the fifth target to be tracked is less than or equal to the preset tracking threshold, The predicted position of the key point of the target to be tracked or the position of the fifth target to be tracked at the second moment is used as the updated position of the key point of the fifth target to be tracked.
在一些实施例中,处理单元1701,被配置为确定待跟踪目标的关键点的运动状态;处理单元1701,还被配置为根据待跟踪目标的关键点在第二时刻的位置以及运动状态,预测待跟踪目标的关键点在第一时刻的预测位置。In some embodiments, the processing unit 1701 is configured to determine the motion state of the key points of the target to be tracked; the processing unit 1701 is also configured to predict based on the position and motion state of the key points of the target to be tracked at the second moment. The predicted position of the key point of the target to be tracked at the first moment.
在一些实施例中,处理单元1701,被配置为在检测目标的数量为0的情况下,确定每个待跟踪目标不存在匹配的检测目标。In some embodiments, the processing unit 1701 is configured to determine that there is no matching detection target for each target to be tracked when the number of detection targets is 0.
在一些实施例中,处理单元1701,被配置为在待跟踪目标的数量为0的情况下,确定每个检测目标不存在匹配的待跟踪目标。In some embodiments, the processing unit 1701 is configured to determine that there is no matching target to be tracked for each detected target when the number of targets to be tracked is 0.
在通过硬件实现时,本公开实施例中的获取单元1702可以集成在通信接口上,处理单元1701可以集成在处理器上。具体实现方式如图18所示。When implemented by hardware, the acquisition unit 1702 in the embodiment of the present disclosure can be integrated on the communication interface, and the processing unit 1701 can be integrated on the processor. The specific implementation is shown in Figure 18.
图18示出了上述实施例中所涉及的目标跟踪装置的又一种可能的结构示意图。该目标跟踪装置180包括:处理器1802和通信接口1803。处理器1802被配置为对目标跟踪装置180的动作进行控制管理,例如,执行上述处理单元1701执行的步骤,和/或被配置为执行本文所描述的技术的其它过程。通信接口1803被配置为支持目标跟踪装置180与其他网络实体的通信,例如,执行上述获取单元1702执行的步骤。目标跟踪装置180还可以包括存储器1801 和总线1804,存储器1801被配置为存储目标跟踪装置180的程序代码和数据。Figure 18 shows another possible structural diagram of the target tracking device involved in the above embodiment. The target tracking device 180 includes: a processor 1802 and a communication interface 1803. The processor 1802 is configured to control and manage the actions of the target tracking device 180, for example, perform the steps performed by the processing unit 1701 described above, and/or be configured to perform other processes of the technology described herein. The communication interface 1803 is configured to support communication between the target tracking device 180 and other network entities, for example, performing the steps performed by the acquisition unit 1702 described above. Target tracking device 180 may also include memory 1801 and bus 1804 , memory 1801 configured to store program code and data for target tracking device 180 .
其中,存储器1801可以是目标跟踪装置180中的存储器等,该存储器可以包括易失性存储器,例如随机存取存储器;该存储器也可以包括非易失性存储器,例如只读存储器,快闪存储器,硬盘或固态硬盘;该存储器还可以包括上述种类的存储器的组合。Among them, the memory 1801 can be the memory in the target tracking device 180, etc. The memory can include volatile memory, such as random access memory; the memory can also include non-volatile memory, such as read-only memory, flash memory, Hard disk or solid state drive; the memory may also include a combination of the above types of memory.
上述处理器1802可以是实现或执行结合本公开公开内容所描述的各种示例性的逻辑方框,模块和电路。该处理器可以是中央处理器,通用处理器,数字信号处理器,专用集成电路,现场可编程门阵列或者其他可编程逻辑器件、晶体管逻辑器件、硬件部件或者其任意组合。其可以实现或执行结合本公开公开内容所描述的各种示例性的逻辑方框,模块和电路。该处理器也可以是实现计算功能的组合,例如包含一个或多个微处理器组合,DSP和微处理器的组合等。The processor 1802 described above may implement or execute various exemplary logical blocks, modules and circuits described in conjunction with the present disclosure. The processor may be a central processing unit, a general-purpose processor, a digital signal processor, an application-specific integrated circuit, a field-programmable gate array or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. It may implement or execute the various illustrative logical blocks, modules and circuits described in connection with this disclosure. The processor may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, etc.
总线1804可以是扩展工业标准结构(Extended Industry Standard Architecture,EISA)总线等。总线1804可以分为地址总线、数据总线、控制总线等。为便于表示,图18中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。The bus 1804 may be an Extended Industry Standard Architecture (EISA) bus or the like. Bus 1804 can be divided into address bus, data bus, control bus, etc. For ease of presentation, only one thick line is used in Figure 18, but it does not mean that there is only one bus or one type of bus.
图18中的目标跟踪装置180还可以为芯片。该芯片包括一个或两个以上(包括两个)处理器1802和通信接口1803。The target tracking device 180 in Figure 18 can also be a chip. The chip includes one or more (including two) processors 1802 and communication interfaces 1803.
在一些实施例中,该芯片还包括存储器1801,存储器1801可以包括只读存储器和随机存取存储器,并向处理器1802提供操作指令和数据。存储器1801的一部分还可以包括非易失性随机存取存储器(non-volatile random access memory,NVRAM)。In some embodiments, the chip also includes memory 1801, which may include read-only memory and random access memory, and provides operating instructions and data to the processor 1802. Part of memory 1801 may also include non-volatile random access memory (NVRAM).
在一些实施方式中,存储器1801存储了如下的元素,执行模块或者数据结构,或者他们的子集,或者他们的扩展集。In some embodiments, memory 1801 stores elements, execution modules, or data structures, or subsets thereof, or extended sets thereof.
在本公开实施例中,通过调用存储器1801存储的操作指令(该操作指令可存储在操作系统中),执行相应的操作。In the embodiment of the present disclosure, the corresponding operation is performed by calling the operation instructions stored in the memory 1801 (the operation instructions may be stored in the operating system).
通过以上的实施方式的描述,所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将装置的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。上述描述的系统,装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Through the above description of the embodiments, those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above functional modules is used as an example. In actual applications, the above functions can be allocated as needed. It is completed by different functional modules, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. For the specific working processes of the systems, devices and units described above, reference can be made to the corresponding processes in the foregoing method embodiments, which will not be described again here.
本公开的一些实施例提供了一种计算机可读存储介质(例如,非暂态计 算机可读存储介质),该计算机可读存储介质中存储有计算机程序指令,计算机程序指令在计算机(例如,目标跟踪装置)上运行时,使得计算机执行如上述实施例中任一实施例所述的目标跟踪方法。Some embodiments of the present disclosure provide a computer-readable storage medium (e.g., a non-transitory computer-readable storage medium) having computer program instructions stored therein, and the computer program instructions are stored in a computer (e.g., a target When running on the tracking device), the computer is caused to execute the target tracking method as described in any of the above embodiments.
示例性的,上述计算机可读存储介质可以包括,但不限于:磁存储器件(例如,硬盘、软盘或磁带等),光盘(例如,CD(Compact Disk,压缩盘)、DVD(Digital Versatile Disk,数字通用盘)等),智能卡和闪存器件(例如,EPROM(Erasable Programmable Read-Only Memory,可擦写可编程只读存储器)、卡、棒或钥匙驱动器等)。本公开描述的各种计算机可读存储介质可代表用于存储信息的一个或多个设备和/或其它机器可读存储介质。术语“机器可读存储介质”可包括但不限于,无线信道和能够存储、包含和/或承载指令和/或数据的各种其它介质。Exemplarily, the above-mentioned computer-readable storage media may include, but are not limited to: magnetic storage devices (such as hard disks, floppy disks or tapes, etc.), optical disks (such as CD (Compact Disk, compressed disk), DVD (Digital Versatile Disk, etc.) Digital versatile disk), etc.), smart cards and flash memory devices (e.g., EPROM (Erasable Programmable Read-Only Memory, Erasable Programmable Read-Only Memory), cards, sticks or key drives, etc.). The various computer-readable storage media described in this disclosure may represent one or more devices and/or other machine-readable storage media for storing information. The term "machine-readable storage medium" may include, but is not limited to, wireless channels and various other media capable of storing, containing and/or carrying instructions and/or data.
本公开的一些实施例还提供了一种计算机程序产品,例如该计算机程序产品存储在非瞬时性的计算机可读存储介质上。该计算机程序产品包括计算机程序指令,在计算机(例如,目标跟踪装置)上执行该计算机程序指令时,该计算机程序指令使计算机执行如上述实施例所述的目标跟踪方法。Some embodiments of the present disclosure also provide a computer program product, for example, the computer program product is stored on a non-transitory computer-readable storage medium. The computer program product includes computer program instructions. When the computer program instructions are executed on a computer (eg, a target tracking device), the computer program instructions cause the computer to perform the target tracking method as described in the above embodiments.
本公开的一些实施例还提供了一种计算机程序。当该计算机程序在计算机(例如,目标跟踪装置)上执行时,该计算机程序使计算机执行如上述实施例所述的目标跟踪方法。Some embodiments of the present disclosure also provide a computer program. When the computer program is executed on a computer (eg, a target tracking device), the computer program causes the computer to perform the target tracking method as described in the above embodiments.
上述计算机可读存储介质、计算机程序产品及计算机程序的有益效果和上述一些实施例所述的目标跟踪方法的有益效果相同,此处不再赘述。The beneficial effects of the above computer-readable storage medium, computer program product and computer program are the same as the beneficial effects of the target tracking method described in some of the above embodiments, and will not be described again here.
在本公开所提供的几个实施例中,应该理解到,所揭露的系统、设备和方法,可以通过其它的方式实现。例如,以上所描述的设备实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,设备或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided in this disclosure, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only illustrative. For example, the division of the units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components may be combined or can be integrated into another system, or some features can be ignored, or not implemented. On the other hand, the coupling or direct coupling or communication connection between each other shown or discussed may be through some interfaces, and the indirect coupling or communication connection of the devices or units may be in electrical, mechanical or other forms.
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place, or they may be distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
另外,在本公开各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单 元中。In addition, each functional unit in various embodiments of the present disclosure may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit.
以上所述,仅为本公开的具体实施方式,但本公开的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本公开揭露的技术范围内,想到变化或替换,都应涵盖在本公开的保护范围之内。因此,本公开的保护范围应以所述权利要求的保护范围为准。The above are only specific embodiments of the present disclosure, but the protection scope of the present disclosure is not limited thereto. Any changes or substitutions that come to mind within the technical scope disclosed by the present disclosure by any person familiar with the technical field should be covered. within the scope of this disclosure. Therefore, the protection scope of the present disclosure should be subject to the protection scope of the claims.

Claims (20)

  1. 一种目标跟踪方法,包括:A target tracking method including:
    获取第一时刻的待检测图像;Obtain the image to be detected at the first moment;
    确定所述待检测图像中检测目标的关键点的检测位置;Determine the detection position of the key point of the detection target in the image to be detected;
    获取待跟踪目标的关键点在第二时刻的位置;所述第二时刻为所述第一时刻之前的时刻;Obtain the position of the key point of the target to be tracked at a second moment; the second moment is a moment before the first moment;
    根据所述待跟踪目标的关键点在第二时刻的位置,预测所述待跟踪目标的关键点在所述第一时刻的预测位置;Predict the predicted position of the key point of the target to be tracked at the first time according to the position of the key point of the target to be tracked at the second time;
    根据所述检测位置和所述预测位置,确定所述检测目标和所述待跟踪目标之间的匹配关系;所述匹配关系用于匹配所述检测目标和所述待跟踪目标中相同的目标;According to the detected position and the predicted position, a matching relationship between the detected target and the target to be tracked is determined; the matching relationship is used to match the same target among the detected target and the target to be tracked;
    根据所述匹配关系,跟踪所述待跟踪目标。According to the matching relationship, the target to be tracked is tracked.
  2. 根据权利要求1所述的方法,其中,所述检测目标的数量为N个,所述待跟踪目标的数量为M个;M、N为正整数;所述根据所述检测位置和所述预测位置,确定所述检测目标和所述待跟踪目标之间的匹配关系,包括:The method according to claim 1, wherein the number of detected targets is N, and the number of targets to be tracked is M; M and N are positive integers; Position, determine the matching relationship between the detected target and the target to be tracked, including:
    对每个检测目标和每个待跟踪目标执行第一目标操作,确定所述每个检测目标与所述每个待跟踪目标之间的距离;所述第一目标操作包括:根据第i个检测目标中的关键点的检测位置,和第j个待跟踪目标的关键点的预测位置之间的距离,确定所述第i个检测目标和第j个待跟踪目标之间的距离;其中,i为小于或等于N的正整数;j为小于或等于M的正整数;Perform a first target operation on each detected target and each target to be tracked, and determine the distance between each detected target and each target to be tracked; the first target operation includes: according to the i-th detection The distance between the detected position of the key point in the target and the predicted position of the key point of the j-th target to be tracked determines the distance between the i-th detected target and the j-th target to be tracked; where, i is a positive integer less than or equal to N; j is a positive integer less than or equal to M;
    根据所述每个检测目标与所述每个待跟踪目标之间的距离,确定所述匹配关系。The matching relationship is determined based on the distance between each detected target and each target to be tracked.
  3. 根据权利要求2所述的方法,其中,所述根据第i个检测目标中的关键点的检测位置,和第j个待跟踪目标的关键点的预测位置之间的距离,确定所述第i个检测目标和第j个待跟踪目标之间的距离,包括:The method according to claim 2, wherein the i-th is determined based on the distance between the detected position of the key point in the i-th detected target and the predicted position of the key point of the j-th target to be tracked. The distance between the detected target and the jth target to be tracked includes:
    对所述第i个检测目标与所述第j个待跟踪目标的每个对应关键点执行第二目标操作,确定所述每个对应关键点之间的距离;所述第二目标操作包括:确定第一关键点与第二关键点;根据所述第一关键点的检测位置和所述第二关键点的预测位置确定所述第一关键点与所述第二关键点之间的距离;所述第一关键点为所述第i个检测目标中的任一个关键点;所述第二关键点为所述第j个待跟踪目标中与所述第一关键点对应的关键点;Perform a second target operation on each corresponding key point of the i-th detection target and the j-th target to be tracked to determine the distance between each corresponding key point; the second target operation includes: Determine the first key point and the second key point; determine the distance between the first key point and the second key point according to the detected position of the first key point and the predicted position of the second key point; The first key point is any key point in the i-th detection target; the second key point is the key point corresponding to the first key point in the j-th target to be tracked;
    根据所述每个对应关键点之间的距离,确定所述第i个检测目标和第j个待跟踪目标之间的距离。According to the distance between each corresponding key point, the distance between the i-th detection target and the j-th target to be tracked is determined.
  4. 根据权利要求2或3所述的方法,其中,所述第i个检测目标和第j个待跟踪目标之间的距离通过以下公式来计算:The method according to claim 2 or 3, wherein the distance between the i-th detection target and the j-th target to be tracked is calculated by the following formula:
    Figure PCTCN2022083887-appb-100001
    Figure PCTCN2022083887-appb-100001
    其中,D(i,j)表示所述第i个检测目标和第j个待跟踪目标之间的距离,p ik表示所述第i个检测目标的第k个关键点的检测位置,p′ jk表示所述第j个待跟踪目标的第k个关键点的预测位置,d(p ik,p′ jk)表示第i个检测目标的第k个关键点与第j个待跟踪目标的第k个关键点之间的距离,s表示目标的尺寸信息,v ik表示第i个检测目标的第k个关键点是否被检测到,v′ jk表示第j个待跟踪目标的第k个关键点是否被检测到,δ(v ik,v′ jk)表征第i个检测目标的第k个关键点与第j个待跟踪目标的第k个关键点的检测情况。 Among them, D(i,j) represents the distance between the i-th detection target and the j-th target to be tracked, p ik represents the detection position of the k-th key point of the i-th detection target, p′ jk represents the predicted position of the k-th key point of the j-th target to be tracked, and d(p ik , p′ jk ) represents the k-th key point of the i-th detection target and the j-th key point of the j-th target to be tracked. The distance between k key points, s represents the size information of the target, v ik represents whether the k-th key point of the i-th detection target has been detected, v′ jk represents the k-th key of the j-th target to be tracked Whether the point is detected, δ(v ik ,v′ jk ) represents the detection situation of the k-th key point of the i-th detection target and the k-th key point of the j-th target to be tracked.
  5. 根据权利要求2-4任一项所述的方法,其中,所述匹配关系包括如下中的至少一项:存在至少一个待跟踪目标与检测目标匹配、存在至少一个待跟踪目标与检测目标不匹配、以及存在至少一个检测目标与待跟踪目标不匹配。The method according to any one of claims 2 to 4, wherein the matching relationship includes at least one of the following: at least one target to be tracked matches the detection target, and at least one target to be tracked does not match the detection target. , and there is at least one detection target that does not match the target to be tracked.
  6. 根据权利要求2-5任一项所述的方法,所述根据所述每个检测目标与所述每个待跟踪目标之间的距离,确定所述匹配关系,包括:The method according to any one of claims 2 to 5, wherein determining the matching relationship based on the distance between each detected target and each to-be-tracked target includes:
    确定所述每个待跟踪目标的权重值与所述每个检测目标的权重值;其中,任一待跟踪目标的权重值为所述任一待跟踪目标分别与所述每个检测目标的距离中最小距离的值;所述每个检测目标的权重值为预设权重值;Determine the weight value of each target to be tracked and the weight value of each detection target; wherein the weight value of any target to be tracked is the distance between any target to be tracked and each detection target. The value of the minimum distance in; the weight value of each detection target is a preset weight value;
    对所述每个待跟踪目标执行第三目标操作,确定与所述每个待跟踪目标匹配的检测目标;Perform a third target operation on each target to be tracked, and determine a detection target matching each target to be tracked;
    所述第三目标操作包括:确定与第m个待跟踪目标距离最短的第一检测目标;其中,所述第一检测目标与所述第m个待跟踪目标的权重值之和大于或等于所述第一检测目标与所述第m个待跟踪目标的距离;m为正整数;The third target operation includes: determining the first detection target with the shortest distance from the mth target to be tracked; wherein the sum of the weight values of the first detection target and the mth target to be tracked is greater than or equal to The distance between the first detection target and the m-th target to be tracked; m is a positive integer;
    对所述第m个待跟踪目标与所述第一检测目标执行第四目标操作,确定与所述第m个待跟踪目标匹配的检测目标;Perform a fourth target operation on the mth target to be tracked and the first detection target to determine a detection target matching the mth target to be tracked;
    所述第四目标操作包括:确定是否存在第一待跟踪目标;所述第一待跟踪目标为根据所述第三目标操作确定的与所述第一检测目标匹配的待跟踪目标;The fourth target operation includes: determining whether there is a first target to be tracked; the first target to be tracked is a target to be tracked that matches the first detected target determined according to the third target operation;
    在不存在所述第一待跟踪目标的情况下,确定所述第m个待跟踪目标与所述第一检测目标匹配;In the absence of the first target to be tracked, determine that the mth target to be tracked matches the first detected target;
    在存在所述第一待跟踪目标的情况下,确定所述第m个待跟踪目标的第一影响值,以及所述第一待跟踪目标的第二影响值;其中,所述第一影响值为根据所述第m个待跟踪目标与第二检测目标确定的差值;所述差值为一个待跟踪目标与一个检测目标的距离与所述一个待跟踪目标与所述一个检测目标的权重之和之间的差值;所述第二检测目标为除所述第一检测目标外与所述第m个待跟踪目标确定的所述差值最小的检测目标;所述第二影响值为根据所述第一待跟踪目标与第三检测目标确定的差值;所述第三检测目标为除所述第一检测目标外与所述第一待跟踪目标确定的所述差值最小的检测目标;In the case where the first target to be tracked exists, determine the first influence value of the mth target to be tracked, and the second influence value of the first target to be tracked; wherein, the first influence value is the difference determined based on the mth target to be tracked and the second detected target; the difference is the distance between a target to be tracked and a detected target and the weight of the target to be tracked and the detected target The difference between the sum of The difference value determined according to the first target to be tracked and the third detection target; the third detection target is the detection with the smallest difference value determined from the first target to be tracked except the first detection target. Target;
    根据所述第一影响值和所述第二影响值,确定与所述第m个待跟踪目标匹配的检测目标。According to the first influence value and the second influence value, a detection target matching the mth target to be tracked is determined.
  7. 根据权利要求6所述的方法,其中,所述根据所述第一影响值和所述第二影响值,确定与所述第m个待跟踪目标匹配的检测目标,包括:The method according to claim 6, wherein determining, according to the first influence value and the second influence value, a detection target matching the mth target to be tracked includes:
    在所述第一影响值小于所述第二影响值的情况下,对所述第m个待跟踪目标与所述第二检测目标执行所述第四目标操作,确定与所述第m个待跟踪目标匹配的检测目标;In the case where the first influence value is less than the second influence value, perform the fourth target operation on the mth target to be tracked and the second detected target, and determine the relationship with the mth target to be tracked. The tracking target matches the detection target;
    在所述第一影响值大于所述第二影响值的情况下,确定所述第m个待跟踪目标与所述第一检测目标匹配。If the first influence value is greater than the second influence value, it is determined that the mth target to be tracked matches the first detected target.
  8. 根据权利要求7所述的方法,其中,所述方法还包括:The method of claim 7, further comprising:
    在所述第一影响值大于所述第二影响值的情况下,对所述第一待跟踪目标与所述第三检测目标执行所述第四目标操作,确定与所述第一待跟踪目标匹配的检测目标。In the case where the first influence value is greater than the second influence value, the fourth target operation is performed on the first target to be tracked and the third detection target, and it is determined that the relationship between the first target to be tracked and the first target to be tracked is Matching detection targets.
  9. 根据权利要求7或8所述的方法,其中,所述方法还包括:The method according to claim 7 or 8, wherein the method further includes:
    在所述第一影响值小于所述第二影响值的情况下,根据所述第一影响值更新所述第m个待跟踪目标、所述第一待跟踪目标以及所述第一检测目标的权重值;When the first influence value is less than the second influence value, the mth target to be tracked, the first target to be tracked and the first detection target are updated according to the first influence value. Weights;
    在所述第一影响值大于所述第二影响值的情况下,根据所述第二影响值更新所述第m个待跟踪目标、所述第一待跟踪目标以及所述第一检测目标的权重值。When the first influence value is greater than the second influence value, the mth target to be tracked, the first target to be tracked and the first detection target are updated according to the second influence value. Weights.
  10. 根据权利要求9所述的方法,其中,所述根据所述第一影响值更新所述第m个待跟踪目标、所述第一待跟踪目标以及所述第一检测目标的权重值,包括:The method according to claim 9, wherein updating the weight values of the m-th target to be tracked, the first target to be tracked and the first detected target according to the first influence value includes:
    将所述第m个待跟踪目标的权重值增加所述第一影响值,将所述第一待跟踪目标的权重值增加所述第一影响值,将所述第一检测目标的权重值降低 所述第一影响值;The weight value of the mth target to be tracked is increased by the first influence value, the weight value of the first target to be tracked is increased by the first influence value, and the weight value of the first detection target is reduced. The first influence value;
    所述根据所述第二影响值更新所述第m个待跟踪目标、所述第一待跟踪目标以及所述第一检测目标的权重值,包括:The updating of the weight values of the mth target to be tracked, the first target to be tracked and the first detected target according to the second influence value includes:
    将所述第m个待跟踪目标的权重值增加所述第二影响值,将所述第一待跟踪目标的权重值增加所述第二影响值,将所述第一检测目标的权重值降低所述第二影响值。The weight value of the mth target to be tracked is increased by the second influence value, the weight value of the first target to be tracked is increased by the second influence value, and the weight value of the first detection target is reduced. The second influence value.
  11. 根据权利要求2-5任一项所述的方法,所述根据所述每个检测目标与所述每个待跟踪目标之间的距离,确定所述匹配关系,包括:The method according to any one of claims 2 to 5, wherein determining the matching relationship based on the distance between each detected target and each to-be-tracked target includes:
    确定待跟踪目标列表与检测目标列表;其中,所述待跟踪目标列表包括所述每个待跟踪目标,所述检测目标列表包括所述每个检测目标;Determine a list of targets to be tracked and a list of detected targets; wherein the list of targets to be tracked includes each of the targets to be tracked, and the list of detected targets includes each of the detected targets;
    对所述待跟踪目标列表与所述检测目标列表中的待跟踪目标与检测目标迭代执行第五目标操作,直至所述待跟踪目标列表中不存在待跟踪目标或者所述检测目标列表中不存在检测目标,根据所述第五目标操作的执行结果确定所述匹配关系;Iteratively perform the fifth target operation on the targets to be tracked and the detected targets in the target to be tracked list and the detected target list, until there is no target to be tracked in the target to be tracked list or there is no target in the detected target list. Detect the target and determine the matching relationship according to the execution result of the fifth target operation;
    所述第五目标操作包括:确定当前待跟踪目标列表中的每个待跟踪目标与当前检测目标列表中的每个待跟踪目标之间的目标距离;The fifth target operation includes: determining a target distance between each target to be tracked in the current target list to be tracked and each target to be tracked in the current detected target list;
    确定所述目标距离中的最小距离,以及所述最小距离对应的第二待跟踪目标和第四检测目标;所述第二待跟踪目标和所述第四检测目标之间的距离为所述最小距离;Determine the minimum distance among the target distances, and the second target to be tracked and the fourth detection target corresponding to the minimum distance; the distance between the second target to be tracked and the fourth detection target is the minimum distance distance;
    确定所述第二待跟踪目标与所述第四检测目标的匹配关系;Determine the matching relationship between the second target to be tracked and the fourth detected target;
    从所述当前待跟踪目标列表中删除所述第二待跟踪目标,从所述当前检测目标列表中删除所述第四检测目标。The second target to be tracked is deleted from the current target list to be tracked, and the fourth detected target is deleted from the current detected target list.
  12. 根据权利要求1-11任一项所述的方法,其中,所述根据所述匹配关系,跟踪所述待跟踪目标,包括:The method according to any one of claims 1-11, wherein tracking the target to be tracked according to the matching relationship includes:
    确定第三待跟踪目标;所述第三待跟踪目标中的每个待跟踪目标存在匹配的检测目标;Determine a third target to be tracked; each target to be tracked in the third target to be tracked has a matching detection target;
    根据与所述第三待跟踪目标匹配的检测目标的关键点的检测位置以及所述第三待跟踪目标的关键点的预测位置,更新所述第三待跟踪目标的关键点的位置。The position of the key point of the third target to be tracked is updated according to the detected position of the key point of the detected target that matches the third target to be tracked and the predicted position of the key point of the third target to be tracked.
  13. 根据权利要求1-12任一项所述的方法,其中,所述根据所述匹配关系,跟踪所述待跟踪目标,包括:The method according to any one of claims 1-12, wherein tracking the target to be tracked according to the matching relationship includes:
    确定第五检测目标;所述第五检测目标中的每个检测目标不存在匹配的待跟踪目标;Determine a fifth detection target; each detection target in the fifth detection target does not have a matching target to be tracked;
    在所述待跟踪目标中增加所述第五检测目标。The fifth detection target is added to the targets to be tracked.
  14. 根据权利要求1-13任一项所述的方法,其中,所述根据所述匹配关系,跟踪所述待跟踪目标,包括:The method according to any one of claims 1-13, wherein tracking the target to be tracked according to the matching relationship includes:
    确定第四待跟踪目标以及所述第四待跟踪目标的不匹配次数;所述第四待跟踪目标中的每个待跟踪目标不存在匹配的检测目标;所述不匹配次数为所述待跟踪目标连续不存在匹配的检测目标的次数;Determine the number of mismatches between the fourth target to be tracked and the fourth target to be tracked; there is no matching detection target for each target to be tracked in the fourth target to be tracked; the number of mismatches is the number of mismatches for the target to be tracked. The number of times the target has no matching detection target in a row;
    在所述不匹配次数大于预设跟踪阈值的情况下,在所述待跟踪目标中删除所述第四待跟踪目标。If the number of mismatches is greater than the preset tracking threshold, the fourth target to be tracked is deleted from the targets to be tracked.
  15. 根据权利要求1-14任一项所述的方法,其中,所述根据所述待跟踪目标的关键点在第二时刻的位置,预测所述待跟踪目标的关键点在所述第一时刻的预测位置,包括:The method according to any one of claims 1 to 14, wherein the position of the key point of the target to be tracked at the first time is predicted based on the position of the key point of the target to be tracked at the second time. Predicted locations, including:
    确定所述待跟踪目标的关键点的运动状态;Determine the motion status of the key points of the target to be tracked;
    根据所述待跟踪目标的关键点在第二时刻的位置以及运动状态,预测所述待跟踪目标的关键点在所述第一时刻的预测位置。According to the position and motion state of the key point of the target to be tracked at the second time, the predicted position of the key point of the target to be tracked at the first time is predicted.
  16. 一种目标跟踪装置,包括:A target tracking device including:
    获取单元,被配置为获取第一时刻的待检测图像;an acquisition unit configured to acquire the image to be detected at the first moment;
    处理单元,被配置为确定所述待检测图像中检测目标的关键点的检测位置;a processing unit configured to determine the detection position of the key point of the detection target in the image to be detected;
    所述获取单元,还被配置为获取待跟踪目标的关键点在第二时刻的位置;所述第二时刻为所述第一时刻之前的时刻;The acquisition unit is further configured to acquire the position of the key point of the target to be tracked at a second moment; the second moment is a moment before the first moment;
    所述处理单元,还被配置为根据所述待跟踪目标的关键点在第二时刻的位置,预测所述待跟踪目标的关键点在所述第一时刻的预测位置;The processing unit is further configured to predict the predicted position of the key point of the target to be tracked at the first time based on the position of the key point of the target to be tracked at the second time;
    所述处理单元,还被配置为根据所述检测位置和所述预测位置,确定所述检测目标和所述待跟踪目标之间的匹配关系;所述匹配关系用于匹配所述检测目标和所述待跟踪目标中相同的目标;The processing unit is further configured to determine a matching relationship between the detected target and the target to be tracked based on the detected position and the predicted position; the matching relationship is used to match the detected target and the target. Describe the same target among the targets to be tracked;
    所述处理单元,还被配置为根据所述匹配关系,跟踪所述待跟踪目标。The processing unit is further configured to track the target to be tracked according to the matching relationship.
  17. 一种目标跟踪装置,包括:处理器和存储器;所述存储器用于存储计算机程序或指令,所述处理器用于运行计算机程序或指令,以实现如权利要求1-15任一项中所述的目标跟踪方法。A target tracking device, including: a processor and a memory; the memory is used to store computer programs or instructions, and the processor is used to run computer programs or instructions to implement the method described in any one of claims 1-15 Target tracking method.
  18. 一种目标跟踪系统,包括目标跟踪装置和图像采集装置,所述图像采集装置用于采集待检测图像,所述目标跟踪装置用于执行如权利要求1-15任一项中所述的目标跟踪方法。A target tracking system, including a target tracking device and an image acquisition device, the image acquisition device is used to collect images to be detected, the target tracking device is used to perform target tracking as described in any one of claims 1-15 method.
  19. 一种非暂态计算机可读存储介质,其中,所述非暂态计算机可读存 储介质中存储有指令,当计算机执行所述指令时,所述计算机执行上述权利要求1-15任一项中所述的目标跟踪方法。A non-transitory computer-readable storage medium, wherein instructions are stored in the non-transitory computer-readable storage medium. When the computer executes the instructions, the computer executes any one of the above claims 1-15. The target tracking method.
  20. 一种计算机程序产品,所述计算机程序产品包括计算机程序指令,在计算机上执行所述计算机程序指令时,所述计算机程序指令使计算机执行如权利要求1-15任一项中所述的目标跟踪方法。A computer program product, the computer program product includes computer program instructions. When the computer program instructions are executed on a computer, the computer program instructions cause the computer to perform target tracking as described in any one of claims 1-15. method.
PCT/CN2022/083887 2022-03-30 2022-03-30 Target tracking method and apparatus, system, and storage medium WO2023184197A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202280000596.8A CN117178292A (en) 2022-03-30 2022-03-30 Target tracking method, device, system and storage medium
PCT/CN2022/083887 WO2023184197A1 (en) 2022-03-30 2022-03-30 Target tracking method and apparatus, system, and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2022/083887 WO2023184197A1 (en) 2022-03-30 2022-03-30 Target tracking method and apparatus, system, and storage medium

Publications (1)

Publication Number Publication Date
WO2023184197A1 true WO2023184197A1 (en) 2023-10-05

Family

ID=88198390

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/083887 WO2023184197A1 (en) 2022-03-30 2022-03-30 Target tracking method and apparatus, system, and storage medium

Country Status (2)

Country Link
CN (1) CN117178292A (en)
WO (1) WO2023184197A1 (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130070105A1 (en) * 2011-09-15 2013-03-21 Kabushiki Kaisha Toshiba Tracking device, tracking method, and computer program product
CN105374050A (en) * 2015-10-12 2016-03-02 浙江宇视科技有限公司 Moving target tracking recovery method and device
CN107122751A (en) * 2017-05-03 2017-09-01 电子科技大学 A kind of face tracking and facial image catching method alignd based on face
CN109118523A (en) * 2018-09-20 2019-01-01 电子科技大学 A kind of tracking image target method based on YOLO
CN109829436A (en) * 2019-02-02 2019-05-31 福州大学 Multi-face tracking method based on depth appearance characteristics and self-adaptive aggregation network
CN110276783A (en) * 2019-04-23 2019-09-24 上海高重信息科技有限公司 A kind of multi-object tracking method, device and computer system
CN110378264A (en) * 2019-07-08 2019-10-25 Oppo广东移动通信有限公司 Method for tracking target and device
CN111563490A (en) * 2020-07-14 2020-08-21 北京搜狐新媒体信息技术有限公司 Face key point tracking method and device and electronic equipment
CN112883819A (en) * 2021-01-26 2021-06-01 恒睿(重庆)人工智能技术研究院有限公司 Multi-target tracking method, device, system and computer readable storage medium

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130070105A1 (en) * 2011-09-15 2013-03-21 Kabushiki Kaisha Toshiba Tracking device, tracking method, and computer program product
CN105374050A (en) * 2015-10-12 2016-03-02 浙江宇视科技有限公司 Moving target tracking recovery method and device
CN107122751A (en) * 2017-05-03 2017-09-01 电子科技大学 A kind of face tracking and facial image catching method alignd based on face
CN109118523A (en) * 2018-09-20 2019-01-01 电子科技大学 A kind of tracking image target method based on YOLO
CN109829436A (en) * 2019-02-02 2019-05-31 福州大学 Multi-face tracking method based on depth appearance characteristics and self-adaptive aggregation network
CN110276783A (en) * 2019-04-23 2019-09-24 上海高重信息科技有限公司 A kind of multi-object tracking method, device and computer system
CN110378264A (en) * 2019-07-08 2019-10-25 Oppo广东移动通信有限公司 Method for tracking target and device
CN111563490A (en) * 2020-07-14 2020-08-21 北京搜狐新媒体信息技术有限公司 Face key point tracking method and device and electronic equipment
CN112883819A (en) * 2021-01-26 2021-06-01 恒睿(重庆)人工智能技术研究院有限公司 Multi-target tracking method, device, system and computer readable storage medium

Also Published As

Publication number Publication date
CN117178292A (en) 2023-12-05

Similar Documents

Publication Publication Date Title
WO2020151166A1 (en) Multi-target tracking method and device, computer device and readable storage medium
CN109087510B (en) Traffic monitoring method and device
CN112750150B (en) Vehicle flow statistical method based on vehicle detection and multi-target tracking
CN113269098A (en) Multi-target tracking positioning and motion state estimation method based on unmanned aerial vehicle
WO2020042419A1 (en) Gait-based identity recognition method and apparatus, and electronic device
JP2019087229A (en) Information processing device, control method of information processing device and program
WO2023082882A1 (en) Pose estimation-based pedestrian fall action recognition method and device
CN112050821B (en) Lane line polymerization method
WO2011013281A1 (en) Mobile body detection method and mobile body detection apparatus
CN114023062A (en) Traffic flow information monitoring method based on deep learning and edge calculation
Liu et al. Vehicle detection and ranging using two different focal length cameras
WO2022048572A1 (en) Target identification method and apparatus, and electronic device
CN113168520A (en) Method of tracking objects in a scene
CN114639032A (en) Vehicle detection tracking method, device and equipment for quasi-real-time digital twin display
CN114283355A (en) Multi-target endangered animal tracking method based on small sample learning
CN111260696A (en) Method for edge-end-oriented pedestrian tracking and accurate people counting
WO2020213099A1 (en) Object detection/tracking device, method, and program recording medium
CN114169425A (en) Training target tracking model and target tracking method and device
Notz et al. Extraction and assessment of naturalistic human driving trajectories from infrastructure camera and radar sensors
CN117269952A (en) Method and device for semi-automatically labeling moving target point cloud of 4D imaging millimeter wave radar
WO2023184197A1 (en) Target tracking method and apparatus, system, and storage medium
CN106598856A (en) Path detection method and path detection device
CN111291785A (en) Target detection method, device, equipment and storage medium
CN116964588A (en) Target detection method, target detection model training method and device
WO2022126668A1 (en) Method for pedestrian identification in public places and human flow statistics system