Target Tracking Methods
By using the attributes and position information of associated parts for matching in target tracking, and adjusting the information selection based on the moving speed of the target to be matched, the problem of lost or incorrect tracking of the object to be tracked is solved and the accuracy of target tracking is improved.
Patent Information
- Application Number
- CN202111017395.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-08-31
- Publication Date
- 2024-09-20
- Estimated Expiration
- 2041-08-31
AI Technical Summary
During the target tracking process, due to factors such as low image clarity, changes in the shape of pedestrians, changes in scale, obstruction by obstructions, and the disappearance of objects to be tracked, the objects to be tracked are easy to be lost or followed incorrectly. Existing technologies have not been able to effectively solve this problem. these questions.
By obtaining the associated part of the target to be matched in the current frame, the target to be matched is matched with the target in the next frame according to the attribute information or position information of the associated part, and the attribute information or the target is determined based on the moving speed of the target to be matched. The location information is matched to ensure the success or failure of the match, and then determine the existence or non-existence of the object to be tracked.
It improves the tracking accuracy of objects to be tracked, reduces lost and incorrect tracking, and enhances the stability and reliability of target tracking.
Smart Images

Figure CN113723311B
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of target tracking, and in particular to a target tracking method. Background Art
[0002] Target tracking is one of the hot topics in the field of computer vision research and is currently widely used in sports event broadcasting, security monitoring, drone control, unmanned vehicle control, robot control and other fields.
[0003] It should be noted that target tracking is to establish the position relationship of the object to be tracked in a continuous video sequence. Specifically, given the coordinate position of the object to be tracked in the first frame of the image, the coordinate position of the object to be tracked in the next frame of the image is calculated to obtain the complete motion trajectory of the object to be tracked.
[0004] However, in the target tracking process, due to the influence of factors such as low image clarity, changes in pedestrian shape and scale, occlusion by obstacles, and disappearance of the object to be tracked, problems such as losing or tracking the wrong object may occur in the target tracking process.
[0005] With regard to the problem that the object to be tracked is easily lost or mistracked during the target tracking process in related technologies, no effective solution has been proposed so far. Summary of the invention
[0006] The present application provides a target tracking method to solve the problem in the related art that the object to be tracked is easily lost or tracked incorrectly during the target tracking process.
[0007] According to one aspect of the present application, a target tracking method is provided. The method includes: obtaining an associated part of a target to be matched in a current frame; matching the target to be matched with a target in a next frame according to first information of the associated part to obtain a first matching result, wherein the first information is attribute information or position information; when the first matching result indicates a matching failure, matching the target to be matched with a target in the next frame according to second information of the target to be matched to obtain a second matching result, wherein when the first information is attribute information, the second information is position information, and when the first information is position information, the second information is attribute information; when the second matching result indicates a matching failure, determining that the target to be matched does not exist in the next frame; when the second matching result indicates a matching success, determining that the target to be matched exists in the next frame.
[0008] Optionally, before matching the target to be matched with the target in the next frame according to the first information of the associated part to obtain the first matching result, the method also includes: when the moving speed of the target to be matched is greater than a preset speed, determining the attribute information as the first information, and determining the position information as the second information; when the moving speed of the target to be matched is less than or equal to the preset speed, determining the position information as the first information, and determining the attribute information as the second information.
[0009] Optionally, matching the target to be matched with the target in the next frame according to the first information of the associated parts to obtain the first matching result includes: when the first part exists in the associated parts, matching the target to be matched with the target in the next frame according to the first information of the first part to obtain a first sub-matching result, wherein the first part is a face part or a body part; when the first part does not exist in the associated parts, or the first sub-matching result indicates that the matching fails, if the second part exists in the associated parts, matching the target to be matched with the target in the next frame according to the first information of the second part to obtain a second sub-matching result, wherein when the first part is a face part, the second part is a body part, and when the first part is a body part, the second part is a face part; when the second part does not exist in the associated parts, or the second sub-matching result indicates that the matching fails, if the third part exists in the associated parts, matching the target to be matched with the target in the next frame according to the first information of the third part to obtain a third sub-matching result, wherein the third part is a head and shoulder part. The first matching result is determined according to the three sub-matching results.
[0010] Optionally, when the first matching result indicates a matching failure, the target to be matched is matched with the target in the next frame according to the second information of the target to be matched, and the second matching result includes: when the first part exists in the associated parts, the target to be matched is matched with the target in the next frame according to the second information of the first part, to obtain a fourth sub-matching result, wherein the first part is a facial part or a torso part; when the first part does not exist in the associated parts, or the fourth sub-matching result indicates a matching failure, if the second part exists in the associated parts, the target to be matched is matched with the target in the next frame according to the second information of the second part, to obtain a fifth sub-matching result, wherein when the first part is a facial part, the second part is a torso part, and when the first part is a torso part, the second part is a facial part; when the second part does not exist in the associated parts, or the fifth sub-matching result indicates a matching failure, if the third part exists in the associated parts, the target to be matched is matched with the target in the next frame according to the second information of the third part, to obtain a sixth sub-matching result; and the second matching result is determined based on the six sub-matching results.
[0011] Optionally, when the clarity of the facial area in the current frame is greater than a clarity threshold, the facial part is determined as the first part and the torso part is determined as the second part; when the clarity of the facial area in the current frame is less than or equal to the clarity threshold and the current frame contains a torso part, the torso part is determined as the first part and the facial part is determined as the second part.
[0012] Optionally, matching the target to be matched with the target in the next frame according to the first information of the first part to obtain a first sub-matching result includes: when the area of the first part is less than or equal to a first area threshold, determining that the match fails; when the area of the first part is greater than the first area threshold, obtaining multiple first parts in the next frame that fall in a first preset area to obtain a first part set, wherein the first preset area is determined by the position and size of the first part; calculating the similarity between the first part of the target to be matched and the first information of each first part in the first part set, and determining that the match is successful when the maximum similarity is greater than the first similarity threshold, and determining that the match fails when the maximum similarity is less than or equal to the first similarity threshold; matching the target to be matched with the target in the next frame according to the first information of the second part to obtain a second sub-matching result includes: obtaining multiple first parts in the next frame that fall in corresponding position areas of the first preset area. The method comprises the steps of: calculating the similarity between the second part of the target to be matched and each second part in the second part set, and determining that the match is successful when the maximum similarity is greater than the second similarity threshold, and determining that the match fails when the maximum similarity is less than or equal to the second similarity threshold; matching the target to be matched with the target in the next frame according to the first information of the third part, and obtaining a third sub-matching result, including: obtaining multiple first parts in the corresponding position area of the next frame falling in the third preset area, and obtaining a third part set, and calculating the similarity between the third part of the target to be matched and each third part in the third part set, wherein the third preset area is determined by the position and size of the third part; determining that the match is successful when the maximum similarity is greater than the third similarity threshold, and determining that the match fails when the maximum similarity is less than or equal to the third similarity threshold.
[0013] Optionally, before obtaining the associated parts of the target to be matched in the current frame, the method also includes: in the case that the head and shoulders parts in the current frame have both associated facial parts and associated torso parts, generating a first target, wherein the associated parts of the first target include the head and shoulders parts, the facial parts and the torso parts; in the case that the head and shoulders parts have associated facial parts or associated torso parts, or the head and shoulders parts do not have associated facial parts and torso parts, but the facial parts have associated torso parts, generating a second target, wherein the associated parts of the second target include one of the following combinations: the head and shoulders parts and the facial parts, the head and shoulders parts and the torso parts, and the facial parts and the torso parts; in the case that the target parts do not have associated parts, generating a third target, wherein the associated parts of the third target are the target parts, and the target parts are one of the following: the head and shoulders parts, the facial parts and the torso parts; obtaining the associated parts of the target to be matched in the current frame includes: determining the target to be matched from the first target, the second target and the third target, and obtaining the associated parts of the target to be matched.
[0014] Optionally, when the head and shoulder parts in the previous frame have both associated facial parts and associated torso parts, before generating the first target, the method also includes: calculating the intersection and union ratios of each head and shoulder part in the current frame and all intersecting facial parts to obtain multiple first intersection and union ratios, and when the maximum first intersection and union ratio is greater than a first threshold, determining the facial part corresponding to the maximum first intersection and union ratio as the facial part associated with the head and shoulder part; calculating the intersection and union ratios of each head and shoulder part and all intersecting torso parts to obtain multiple second intersection and union ratios, and when the maximum second intersection and union ratio is greater than a second threshold, determining the torso part corresponding to the maximum second intersection and union ratio as the torso part associated with the head and shoulder part; when the facial part does not have an associated head and shoulder part, calculating the intersection and union ratios of the facial part and all intersecting torso parts to obtain multiple third intersection and union ratios, and when the maximum third intersection and union ratio is greater than a third threshold, determining the torso part corresponding to the maximum third intersection and union ratio as the torso part associated with the facial part.
[0015] Optionally, the method further includes: if there is a target to be matched in the next frame, updating the next frame to the current frame; and determining whether there is a matching target in the next frame of the updated current frame based on the target to be matched in the updated current frame.
[0016] Optionally, the method also includes: when there is no target to be matched in the next frame, determining whether there is a target to be matched in a frame after the next frame; and when there is no target to be matched in any preset frame after the next frame, determining that the target to be matched has been removed from the next frame.
[0017] Through the present application, the following steps are adopted: obtaining the associated parts of the target to be matched in the current frame; matching the target to be matched with the target in the next frame according to the first information of the associated parts to obtain a first matching result, wherein the first information is attribute information or position information; in the case where the first matching result indicates a matching failure, matching the target to be matched with the target in the next frame according to the second information of the target to be matched to obtain a second matching result, wherein, in the case where the first information is attribute information, the second information is position information, and in the case where the first information is position information, the second information is attribute information; in the case where the second matching result indicates a matching failure, determining that there is no target to be matched in the next frame; in the case where the second matching result indicates a matching success, determining that there is a target to be matched in the next frame, solving the problem of the object to be tracked being easily lost or followed incorrectly in the target tracking process in the related technology. Combined with the attribute information and position information of the associated parts of the target to be matched, the target to be matched is matched with the target in the next frame, thereby achieving the effect of improving the tracking accuracy of the object to be tracked. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] The drawings constituting a part of the present application are used to provide a further understanding of the present application. The illustrative embodiments and descriptions of the present application are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0019] Figure 1 is a flow chart of a target tracking method provided according to an embodiment of the present application;
[0020] Figure 2 is a flowchart of an optional target tracking method provided according to an embodiment of the present application;
[0021] Figure 3 It is a three-component intra-frame association flow chart provided according to an embodiment of the present application;
[0022] Figure 4 It is a cross-frame matching flow chart based on Re-ID features provided according to an embodiment of the present application;
[0023] Figure 5 It is a cross-frame matching flow chart based on IOU of the detection frame provided in an embodiment of the present application;
[0024] Figure 6 It is a schematic diagram of a target tracking device provided according to an embodiment of the present application. DETAILED DESCRIPTION
[0025] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0026] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.
[0027] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequential order. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present application described here. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0028] In order to solve the problem that the object to be tracked is easily lost or mistracked during target tracking in the related art, the following methods have appeared in the related art:
[0029] Method 1. Using the YOLOv3 target detection model, the output of the three scales of the original model is downsampled and feature fusion is performed to detect specific targets, and the target position and scale information are obtained; the improved kernel correlation filter (KCF) algorithm is used to track the specific target and obtain the predicted position; with the current frame target position as the center, an area with 2.5 times the target scale is obtained as the sample area; the sample area image is extracted in the current frame, and the area image is used as the input image of the YOLOv3 target detection model to perform specific target retrieval, and the accurate target detection position and scale information are obtained through image stitching; the intersection and union ratio of the detection position and the predicted position of the specific target in the current frame image is calculated. If the intersection and union ratio is less than the preset threshold, the target detection position is used as the current frame target position, otherwise the predicted position is used as the current frame target position.
[0030] This method has the following disadvantages: the tracking effect of this method depends largely on the accuracy of the kernel correlation filter algorithm in predicting the target. However, the movement of pedestrians in the scene is variable, and the prediction algorithm often cannot achieve good results, resulting in target loss or mistracking.
[0031] Method 2: By crawling pedestrian pictures on the Internet and intercepting pictures containing pedestrians in surveillance videos, the pedestrian heads and shoulders in the pictures are marked and cleaned to establish a head and shoulder dataset; the deep learning algorithm YOLOv3 is used to train and adjust the parameters of the established head and shoulder dataset to obtain a head and shoulder model, detect the surveillance video, and return the pedestrian heads and shoulders detected in the video screen; the Iou-net tracking algorithm is used to track the pedestrian heads and shoulders for multiple targets, and the trajectory of the tracked targets is processed and calculated; the motion trajectory path of the tracked target is drawn in the video surveillance, and the motion trajectory calculation result is compared with the set threshold; if the motion trajectory of the tracked target is greater than the set threshold, it is considered that the target has a wandering behavior in the current screen, and the system calculates the target position information and marks the target in the video screen; if the motion trajectory of the tracked target is less than the set threshold, it is considered that the target does not have a wandering behavior in the current screen and no processing is performed.
[0032] This method has the following disadvantages: Since this method only uses the detection frame IOU to track the target, when there is a fast-moving target in the scene, the target detection frames with the same ID in two adjacent frames will have a large position difference, resulting in a decrease in IOU, causing the target to be lost during the tracking process.
[0033] Method 3: using a face detector to determine a face to be captured from an initial image frame; based on the face to be captured, determining a capture trajectory from a plurality of consecutive image frames adjacent to the initial image frame; using a first tracker to extract image features of each image frame on the capture trajectory; tracking the capture trajectory by performing feature matching on the current image frame; repeating the steps of tracking the capture trajectory for subsequent image frames, and if the capture trajectory is not tracked, determining whether the image quality of the current image frame meets the standard; if the image quality of the current image frame meets the standard, determining at least one face detection frame from the current image frame using a face detector, and determining whether the determined face detection frame overlaps with the capture trajectory; if there is overlap, confirming the capture trajectory using a second tracker.
[0034] This method has the following disadvantages: when tracking the target by performing feature matching on the faces detected in two adjacent frames, when the resolution of the target face in the scene is small or the two targets to be matched are front and side faces, the similarity of the Re-ID features of the two targets is low. If only facial information is used to match the target, such targets will be lost during the tracking process.
[0035] Based on this, the present application hopes to provide a solution that can solve the above-mentioned technical problems, the details of which will be described in the subsequent embodiments.
[0036] According to an embodiment of the present application, a target tracking method is provided.
[0037] Figure 1 is a flow chart of a target tracking method according to an embodiment of the present application. Figure 1 As shown, the method comprises the following steps:
[0038] Step S101, obtaining the associated parts of the target to be matched in the current frame.
[0039] Specifically, the target to be matched in the current frame is a target pedestrian that needs to be identified and tracked in the picture, and the associated parts may be one or more of the face, head and shoulders, and torso. The associated part information is compared between the current frame and the next frame to determine whether the match of the target to be matched is successful.
[0040] Step S102, matching the target to be matched with the target in the next frame according to the first information of the associated part to obtain a first matching result, wherein the first information is attribute information or position information.
[0041] Specifically, the attribute information may be a Re-ID feature, that is, a pedestrian re-identification ID feature, and the position information may be the coordinate information of the detection frame where the part is located. The target in the next frame may be a pedestrian identified in the next frame. The first matching result is the result of matching the target to be matched with the target in the next frame through the first information.
[0042] Step S103, when the first matching result indicates a matching failure, the target to be matched is matched with the target in the next frame according to the second information of the target to be matched to obtain a second matching result, wherein when the first information is attribute information, the second information is position information, and when the first information is position information, the second information is attribute information.
[0043] It should be noted that the selection of the first information and the second information can be determined by the movement speed of the target to be matched. When the movement speed of the target to be matched is too fast, the tracking target may be lost if the position information is used as the first information. Therefore, when the movement speed of the target to be matched is fast, the attribute information can be used as the first information and the second information as the position information; and when the movement speed of the target to be matched is slow, in order to improve the matching efficiency, the position information can be used as the first information and the second information as the attribute information.
[0044] Step S104, when the second matching result indicates a matching failure, determining that there is no target to be matched in the next frame; when the second matching result indicates a matching success, determining that there is a target to be matched in the next frame.
[0045] Specifically, when the second matching result indicates that the match fails, step S102 is executed again in the picture after the next frame, and the information to be matched in the current frame is used to match the target in the picture after the next frame. If the target fails to match in multiple consecutive frames, it is determined that the target has walked out of the tracking picture area. When the second matching result indicates that the match is successful, the target in the next frame and the picture after the next frame is continuously iterated to match, thereby achieving real-time tracking of the target to be matched.
[0046] The target tracking method provided by the embodiment of the present application adopts the following steps: obtaining the associated part of the target to be matched in the current frame; matching the target to be matched with the target in the next frame according to the first information of the associated part to obtain a first matching result, wherein the first information is attribute information or position information; when the first matching result indicates that the matching fails, matching the target to be matched with the target in the next frame according to the second information of the target to be matched to obtain a second matching result, wherein when the first information is attribute information, the second information is position information, and when the first information is position information, the second information is attribute information; when the second matching result indicates that the matching fails, determining that there is no target to be matched in the next frame; when the second matching result indicates that the matching is successful, determining that there is a target to be matched in the next frame, solves the problem that the target to be tracked is easily lost or mistracked in the target tracking process in the related technology. Combined with the attribute information and position information of the associated part of the target to be matched, the target to be matched is matched with the target in the next frame, thereby achieving the effect of improving the tracking accuracy of the target to be tracked.
[0047] Optionally, determination of the first information and the second information affects the accuracy and efficiency of target tracking. In the target tracking method provided in this embodiment, before matching the target to be matched with the target in the next frame according to the first information of the associated part to obtain the first matching result, the method also includes: when the moving speed of the target to be matched is greater than a preset speed, determining the attribute information as the first information, and determining the position information as the second information; when the moving speed of the target to be matched is less than or equal to the preset speed, determining the position information as the first information, and determining the attribute information as the second information.
[0048] Specifically, the attribute information may be a Re-ID feature, and the position information may be coordinate information of a detection box where the part is located.
[0049] It should be noted that, when the target to be matched moves at a fast speed, there will be a large positional difference between the detection frames of the same target in two adjacent frames, resulting in a reduction in the IOU of the two detection frames. If the coordinate information of the detection frame is used to track the target, the target will be lost during the tracking process. The Re-ID feature can be used as the first information, and the coordinate information of the detection frame can be used as the second information. The Re-ID feature can be used for target matching first. If the target matching using the Re-ID feature fails, the coordinate information of the detection frame can be used to track the target. Therefore, a moving speed of the target to be matched can be preset. When the actual moving speed of the target to be matched is greater than the preset speed, in order to improve the matching accuracy, the attribute information is determined as the first information, and the position information is determined as the second information.
[0050] In addition, the speed of calculating the IOU of the two detection frames is greater than the speed of matching the Re-ID features in the two detection frames. In order to improve the matching speed while ensuring the matching efficiency, when the actual moving speed of the target to be matched is less than or equal to the preset speed, the position information is determined as the first information and the attribute information is determined as the second information.
[0051] The associated parts of each target need to be determined before target matching. Optionally, in the target tracking method provided in this embodiment, before obtaining the associated parts of the target to be matched in the current frame, the method further includes: generating a first target when there are both associated facial parts and associated torso parts in the head and shoulder parts in the current frame, wherein the associated parts of the first target include the head and shoulder parts, the facial parts and the torso parts; generating a first target when there are associated facial parts or associated torso parts in the head and shoulder parts, or when there are no associated facial parts and torso parts in the head and shoulder parts, but the facial parts When there is an associated torso part, a second target is generated, wherein the associated parts of the second target include one of the following combinations: head and shoulder parts and face parts, head and shoulder parts and torso parts, face parts and torso parts; when there is no associated part with the target part, a third target is generated, wherein the associated part of the third target is the target part, and the target part is one of the following: head and shoulder parts, face parts and torso parts; obtaining the associated parts of the target to be matched in the current frame includes: determining the target to be matched from the first target, the second target and the third target, and obtaining the associated parts of the target to be matched.
[0052] Specifically, each part can be represented by a detection frame, specifically by the coordinate information of the detection frame and the attribute information in the detection frame. The first target can be a target that is successfully associated with the three parts of the face frame, head and shoulder frame, and torso frame, and is stored in the successfully associated target library; the second target can be a target that can be successfully associated with only any two parts of the face frame, head and shoulder frame, and torso frame, and is stored in the partially associated target library; the third target is a target composed of each part of the face frame, head and shoulder frame, and torso frame, without any associated parts, and is stored in the unassociated target library.
[0053] By classifying the targets in this embodiment, the information in the current frame is integrated, so that the components can be matched in sequence during the target matching process. For example, when the face associated with the pedestrian to be matched is not detected or the matching fails using the face information, the matching is performed using the body information; when the body is not detected or the matching fails using the body information, the matching is performed using the head and shoulder information. This can solve the problems of target loss or wrong tracking due to changeable target posture, occlusion, etc., and improve the accuracy of target tracking.
[0054] The parts can be associated with each other by calculating the intersection-and-union ratio between the detection frames where the parts are located. Optionally, in the target tracking method provided in the present embodiment, when there are both associated facial parts and associated torso parts in the head and shoulder parts in the previous frame, before generating the first target, the method further includes: calculating the intersection-and-union ratio between each head and shoulder part in the current frame and all intersecting facial parts to obtain multiple first intersection-and-union ratios, and when the maximum first intersection-and-union ratio is greater than a first threshold, determining the facial part corresponding to the maximum first intersection-and-union ratio as the facial part associated with the head and shoulder part; calculating the intersection-and-union ratio between each head and shoulder part and all intersecting torso parts to obtain multiple second intersection-and-union ratios, and when the maximum second intersection-and-union ratio is greater than a second threshold, determining the torso part corresponding to the maximum second intersection-and-union ratio as the torso part associated with the head and shoulder part; when there is no associated head and shoulder part with the facial part, calculating the intersection-and-union ratio between the facial part and all intersecting torso parts to obtain multiple third intersection-and-union ratios, and when the maximum third intersection-and-union ratio is greater than a third threshold, determining the torso part corresponding to the maximum third intersection-and-union ratio as the torso part associated with the facial part.
[0055] Specifically, the intersection-over-union (IOU) is the value obtained by dividing the intersection area of two image regions by the overall area of the two images. The first threshold can represent the minimum intersection-over-union value of the positional association relationship between the two parts. When the IOU of the detection boxes where the two parts are located is greater than the first threshold, the association can be performed.
[0056] For example, when the target to be matched is a pedestrian, the IOU of all head-shoulder frames and all intersecting face frames in the current frame is calculated respectively, and the face frame with the largest value in the IOU corresponding to each head-shoulder frame is taken as the associated object of the head-shoulder frame, and each selected IOU is compared with the first threshold. If the IOU is greater than the threshold, it is determined that the face part and the head-shoulder part are successfully associated; otherwise, the association fails. Similarly, the head-shoulder part and the torso part, and the face part and the torso part are also associated in the same way.
[0057] Optionally, in the target tracking method provided in the present embodiment, matching the target to be matched with the target in the next frame according to the first information of the associated parts to obtain the first matching result includes: when the first part exists in the associated parts, matching the target to be matched with the target in the next frame according to the first information of the first part to obtain a first sub-matching result, wherein the first part is a face part or a body part; when the first part does not exist in the associated parts, or the first sub-matching result indicates that the matching fails, if the second part exists in the associated parts, matching the target to be matched with the target in the next frame according to the first information of the second part to obtain a second sub-matching result, wherein when the first part is a face part, the second part is a body part, and when the first part is a body part, the second part is a face part; when the second part does not exist in the associated parts, or the second sub-matching result indicates that the matching fails, if the third part exists in the associated parts, matching the target to be matched with the target in the next frame according to the first information of the third part to obtain a third sub-matching result, wherein; the third part is a head and shoulder part. The first matching result is determined according to the three sub-matching results.
[0058] Specifically, when the target to be matched is a partially associated target associated with a facial part and a torso part, the first part can be set as the facial part, the second part as the torso part, the first information as the Re-ID feature, and the second information as the coordinate information of the detection frame. The Re-ID feature of the facial part is matched with the facial Re-ID feature of the target in the next frame to obtain a first sub-matching result. If the first sub-matching result fails, the Re-ID feature of the torso part is matched with the facial Re-ID feature of the target in the next frame to obtain a second sub-matching result, and the second sub-matching result is determined as the first matching result.
[0059] Optionally, in the target tracking method provided in the present embodiment, when the first matching result indicates a matching failure, the target to be matched is matched with the target in the next frame according to the second information of the target to be matched, and obtaining the second matching result includes: when the first part exists in the associated parts, the target to be matched is matched with the target in the next frame according to the second information of the first part, to obtain a fourth sub-matching result, wherein the first part is a facial part or a torso part; when the first part does not exist in the associated parts, or the fourth sub-matching result indicates a matching failure, if the second part exists in the associated parts, the target to be matched is matched with the target in the next frame according to the second information of the second part, to obtain a fifth sub-matching result, wherein when the first part is a facial part, the second part is a torso part, and when the first part is a torso part, the second part is a facial part; when the second part does not exist in the associated parts, or the fifth sub-matching result indicates a matching failure, if the third part exists in the associated parts, the target to be matched is matched with the target in the next frame according to the second information of the third part, to obtain a sixth sub-matching result; and the second matching result is determined based on the six sub-matching results.
[0060] Specifically, when the target to be matched is a partially associated target associated with a facial part and a torso part, the first part can be set as the facial part, the second part as the torso part, the first information as the Re-ID attribute information, and the second information as the coordinate information of the calculated detection frame. If the first matching result fails, the second information is used for matching. The coordinate information of the detection frame calculated based on the facial part is matched with the coordinate information of the facial detection frame of the target in the next frame to obtain a fourth sub-matching result; if the fourth sub-matching result fails, the coordinate information of the torso detection frame is matched with the coordinate information of the facial detection frame of the target in the next frame to obtain a fifth sub-matching result. If the match fails, the second matching result fails to match.
[0061] In order to improve the accuracy and efficiency of target matching, optionally, in the target tracking method provided in the present embodiment, when the clarity of the facial area in the current frame is greater than a clarity threshold, the facial part is determined as the first part and the torso part is determined as the second part; when the clarity of the facial area in the current frame is less than or equal to the clarity threshold and the current frame contains a torso part, the torso part is determined as the first part and the facial part is determined as the second part.
[0062] Specifically, the clarity threshold is used to determine whether the clarity of the face area meets the minimum requirement for extracting Re-ID features. For example, the Re-ID features extracted from a face with low clarity are inaccurate, affecting the accuracy of matching. Therefore, when the face clarity is less than or equal to the threshold and the current frame contains the torso, the torso can be determined as the first part. When the face clarity is greater than the threshold, the face is determined as the first part, thereby improving the accuracy of matching.
[0063] Optionally, in the target tracking method provided in the present embodiment, the target to be matched is matched with the target in the next frame according to the first information of the first part, and obtaining a first sub-matching result includes: when the area of the first part is less than or equal to the first area threshold, determining that the matching fails; when the area of the first part is greater than the first area threshold, obtaining multiple first parts in the next frame that fall in a first preset area to obtain a first part set, wherein the first preset area is determined by the position and size of the first part; calculating the similarity between the first part of the target to be matched and the first information of each first part in the first part set, and determining that the matching is successful when the maximum similarity is greater than the first similarity threshold, and determining that the matching fails when the maximum similarity is less than or equal to the first similarity threshold; matching the target to be matched with the target in the next frame according to the first information of the second part to obtain a second sub-matching result includes: obtaining the corresponding information in the next frame that falls in the second preset area The method comprises the following steps: obtaining a plurality of second parts of a position area corresponding to a third preset area in the next frame of the picture, obtaining a second part set, and calculating the similarity between the second part of the target to be matched and each second part in the second part set, and determining that the match is successful when the maximum similarity is greater than the second similarity threshold, and determining that the match fails when the maximum similarity is less than or equal to the second similarity threshold; matching the target to be matched with the target in the next frame of the picture according to the first information of the third part, and obtaining a third sub-matching result, including: obtaining a plurality of first parts of a corresponding position area in the next frame of the picture falling in the third preset area, obtaining a third part set, and calculating the similarity between the third part of the target to be matched and each third part in the third part set, wherein the third preset area is determined by the position and size of the third part; determining that the match is successful when the maximum similarity is greater than the third similarity threshold, and determining that the match fails when the maximum similarity is less than or equal to the third similarity threshold.
[0064] Specifically, the first part area is the area size of the first part of the target to be matched, and the first area threshold is the preset minimum identifiable first area value. Since the first information extracted from the first part with a smaller resolution is inaccurate, it often affects the accuracy of matching, so no matching is performed when the area is smaller than the first area threshold. The first part set is composed of multiple first parts in a first preset area, and the first preset area is a target determination area preset in the next frame, which is determined according to the size and position of the first part. The method for calculating the similarity between the parts can be to calculate the cosine similarity and sort the similarity. The first similarity threshold is the calculated minimum available similarity value. After the calculated similarities of the multiple first parts are sorted, if the maximum value is greater than the threshold, the corresponding target is matched with the target to be matched using the maximum value. When the maximum similarity is less than or equal to the first similarity threshold, it is determined that the first sub-matching fails.
[0065] For example, when the first part is a face and the first information is a Re-ID feature, first determine whether the target has a face frame. If so, calculate the area of the face frame, and filter out the face frames with an area less than a threshold. According to the length and width of the face frame, expand the face frame with an area greater than the threshold by two times to form a first preset area, and put the face frame in the first preset area in the next frame into the face frame set. Calculate the cosine similarity between the Re-ID feature of the face frame of the target to be matched and the Re-ID features of all face frames in the face frame set, and sort the cosine similarities from large to small. If the maximum cosine similarity is greater than the threshold, the target to be matched is matched with the target to which the face frame belongs, and the match is successful; when the target to be matched does not have a face frame or the area of the face frame is less than the threshold or the maximum cosine similarity is less than the threshold, the first sub-match fails.
[0066] It should be noted that the method of matching the target to be matched with the target in the next frame through the second part and the third part through the first information is the same as the method of matching the target to be matched with the target in the next frame through the first part through the first information. The method of matching the target to be matched with the target in the next frame through the second information is the same as the method of matching the target to be matched with the target in the next frame through the first information.
[0067] In addition, it should be noted that when the maximum cosine similarity of the first information of the first part is less than the threshold, the first sub-match fails, and the first information of the second part is used to match the target to be matched with the target in the next frame. When the second sub-match is obtained, since the three parts are already associated in the frame, the second part set can be replaced by the first part set, and the similarity of the first information of the second part is calculated and matched in the order of the first part set, which can more quickly match the target to be matched with the target in the next frame. For example, when the first part is a face, the second part is a torso, and the first information is a Re-ID feature, if after calculating the cosine similarity between the target face frame Re-ID feature and all face frame Re-ID features in the face frame set, the maximum cosine similarity is less than the threshold, and the first sub-matching fails, the torso frame Re-ID feature needs to be used for matching. Since the three parts are already associated, the sorting information of the previous face frame Re-ID feature similarity can be used at this time to generate a torso frame set of corresponding order. According to the order of the torso frames in the set, the cosine similarities of the target torso frame Re-ID feature to be matched and the torso frame Re-ID features in the set are calculated in sequence, thereby saving time and allowing the second sub-matching process to be performed more quickly and effectively.
[0068] An optional implementation scheme is provided below to further explain the target tracking method provided by the present application, wherein the first part is the face part, the second part is the torso part, the third part is the head and shoulder part, the first information is the Re-ID feature, and the second information is the coordinate information of the detection frame.
[0069] Figure 2 is a flowchart of an optional target tracking method of this embodiment, such as Figure 2 As shown:
[0070] First, the face, head and shoulders, and torso are detected and features are extracted. After this step, the coordinate information of the detection frames of the three target parts and the corresponding Re-ID features can be obtained.
[0071] Secondly, the face, head and shoulders, and torso are associated within the frame. After obtaining the three-part target detection frame, the parts belonging to the same target need to be associated.
[0072] Specifically, Figure 3 It is a three-component intra-frame association flow chart, such as Figure 3As shown, first associate the head and shoulders with the face, calculate the IOU of the head and shoulders frame and all intersecting face frames respectively, and take the face frame with the largest IOU as the associated object of the head and shoulders frame. If the IOU is greater than the threshold, the association is successful; otherwise, the association fails. Similarly, the association between the head and shoulders and the torso and the face and the torso is as described above. According to the association results of the three components, the targets with successful three-component association are added to the successful association target library. For targets with only successful head and shoulders and face association, or successful head and shoulders and torso association, or successful face and torso association, they are added to the partially associated target library. For targets with failed three-component association, they are added to the unassociated target library.
[0073] Furthermore, the three-component Re-ID feature is used to associate the target across frames. After the intra-frame association is completed, the three-component Re-ID feature needs to be used to perform cross-frame matching on the target to be matched.
[0074] Specifically, Figure 4 This is the cross-frame matching flowchart based on Re-ID features, as shown Figure 4 As shown, first, determine whether the target to be matched has a face frame. If so, then calculate the area of the face frame. Since the Re-ID features extracted from faces with smaller resolutions are inaccurate, they often affect the accuracy of matching, so it is necessary to screen the face frames whose area is less than the threshold. According to the length and width of the face frame, the face frame with an area greater than the threshold is expanded twice to form a matching area, and the face frame in the matching frame that is in the matching area is placed in the face frame set. Calculate the cosine similarity between the Re-ID feature of the face frame of the target to be matched and the Re-ID features of all face frames in the face frame set, and sort the cosine similarities from large to small. If the TOP1 cosine similarity is greater than the threshold, the target to be matched is matched with the target to which the face frame belongs. When the target to be matched does not have a face frame or the area of the face frame is less than the threshold or the TOP1 cosine similarity is less than the threshold, it is necessary to use the torso frame Re-ID feature for matching. First, determine whether the target to be matched has a torso frame. If there is, a torso frame set of the corresponding order is generated according to the sorting information of the previous face frame Re-ID feature similarity. According to the order of the torso frames in the set, the cosine similarity of the torso frame Re-ID feature of the target to be matched and the torso frame Re-ID feature in the set is calculated in sequence. If the calculated cosine similarity is greater than the threshold, the target to be matched is matched with the target to which the torso frame belongs. When the target to be matched does not have a torso frame or the calculated cosine similarity is less than the threshold, the head and shoulder frame Re-ID feature needs to be used for matching, and the matching process is the same as the torso frame.
[0075] Furthermore, the IOU of the three-component detection boxes is used to associate the targets across frames. Figure 5 This is a cross-frame matching flowchart based on detection box IOU, such as Figure 5As shown in the figure, for targets that fail to match using the Re-ID feature, it is necessary to use the three-component detection box IOU for cross-frame matching. The matching process is the same as the process of using the three-component Re-ID feature to match targets across frames, except that the step of calculating feature similarity is changed to calculating the detection box IOU.
[0076] Finally, iterative tracking and tracking cancellation are performed. Specifically, for successfully matched targets, they need to be iteratively matched to achieve real-time tracking. For unmatched targets, if the target fails to match in 20 consecutive frames, it is likely that the target has walked out of the tracking screen, and the target matching is terminated.
[0077] It should be noted that the steps shown in the flowcharts of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and that, although a logical order is shown in the flowcharts, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0078] The embodiment of the present application also provides a target tracking device. It should be noted that the target tracking device of the embodiment of the present application can be used to execute the target tracking method provided by the embodiment of the present application. The target tracking device provided by the embodiment of the present application is introduced below.
[0079] Figure 6 Schematic diagram of a target tracking device according to an embodiment of the present application. Figure 6 As shown, the device includes: an acquisition unit 10, a first matching unit 20, a second matching unit 30 and a first determination unit 40.
[0080] Specifically, the acquisition unit 10 is used to acquire the associated part of the target to be matched in the current frame.
[0081] The first matching unit 20 is used to match the target to be matched with the target in the next frame according to the first information of the associated part to obtain a first matching result, wherein the first information is attribute information or position information.
[0082] The second matching unit 30 is used to match the target to be matched with the target in the next frame according to the second information of the target to be matched to obtain a second matching result when the first matching result indicates a matching failure, wherein when the first information is attribute information, the second information is position information, and when the first information is position information, the second information is attribute information.
[0083] The first determination unit 40 is used to determine that there is no target to be matched in the next frame if the second matching result indicates a matching failure; and to determine that there is a target to be matched in the next frame if the second matching result indicates a matching success.
[0084] The target tracking device provided by the embodiment of the present application obtains the associated parts of the target to be matched in the current frame through the acquisition unit 10; the first matching unit 20 matches the target to be matched with the target in the next frame according to the first information of the associated parts to obtain a first matching result, wherein the first information is attribute information or position information; the second matching unit 30 matches the target to be matched with the target in the next frame according to the second information of the target to be matched when the first matching result indicates that the matching fails, and obtains a second matching result, wherein when the first information is attribute information, the second information is position information, and when the first information is position information, the second information is attribute information; the first determination unit 40 determines that there is no target to be matched in the next frame when the second matching result indicates that the matching fails; and determines that there is a target to be matched in the next frame when the second matching result indicates that the matching is successful, which solves the problem that the target to be matched is easily lost or mistracked in the target tracking process in the related art, and matches the target to be matched with the target in the next frame in combination with the attribute information and position information of the associated parts of the target to be matched, thereby achieving the effect of improving the tracking accuracy of the target to be tracked.
[0085] Optionally, in the target tracking device provided in the embodiment of the present application, the device also includes: a second determination unit, which is used to match the target to be matched with the target in the next frame according to the first information of the associated part, and before obtaining the first matching result, when the moving speed of the target to be matched is greater than a preset speed, determine the attribute information as the first information and determine the position information as the second information; when the moving speed of the target to be matched is less than or equal to the preset speed, determine the position information as the first information and determine the attribute information as the second information.
[0086] Optionally, in the target tracking device provided by the embodiment of the present application, the first matching unit 20 includes: a first matching module, which is used to match the target to be matched with the target in the next frame according to the first information of the first part when the first part exists in the associated parts, and obtain a first sub-matching result, wherein the first part is a face part or a body part; a second matching module, which is used to match the target to be matched with the target in the next frame according to the first information of the second part when the first part does not exist in the associated parts or the first sub-matching result indicates that the matching fails, and if the second part exists in the associated parts, and obtain a second sub-matching result, wherein the second part is a body part when the first part is a face part, and the second part is a face part when the first part is a body part; a third matching module, which is used to match the target to be matched with the target in the next frame according to the first information of the third part when the second part does not exist in the associated parts or the second sub-matching result indicates that the matching fails, and if the third part exists in the associated parts, and obtain a third sub-matching result, wherein the third part is a head and shoulder part. The first matching result is determined according to the three sub-matching results.
[0087] Optionally, in the target tracking device provided in the embodiment of the present application, the second matching unit 30 includes: a fourth matching module, which is used to match the target to be matched with the target in the next frame according to the second information of the first part when the first part exists in the associated parts, to obtain a fourth sub-matching result, wherein the first part is a facial part or a torso part; a fifth matching module, which is used to match the target to be matched with the target in the next frame according to the second information of the second part when the first part does not exist in the associated parts or the fourth sub-matching result indicates that the matching fails, and if the second part exists in the associated parts, to obtain a fifth sub-matching result, wherein when the first part is a facial part, the second part is a torso part, and when the first part is a torso part, the second part is a facial part; a sixth matching module, which is used to match the target to be matched with the target in the next frame according to the second information of the third part when the second part does not exist in the associated parts or the fifth sub-matching result indicates that the matching fails, and if the third part exists in the associated parts, to obtain a sixth sub-matching result; and determine the second matching result based on the six sub-matching results.
[0088] Optionally, in the target tracking device provided in the embodiment of the present application, the device also includes: a third determination unit, which is used to determine the facial part as the first part and the torso part as the second part when the clarity of the facial area in the current frame is greater than the clarity threshold; when the clarity of the facial area in the current frame is less than or equal to the clarity threshold and the current frame contains the torso part, determine the torso part as the first part and the facial part as the second part.
[0089] Optionally, in the target tracking device provided in the embodiment of the present application, the first sub-matching module includes: a first determination sub-module, which is used to determine that the matching fails when the area of the first part is less than or equal to the first area threshold; a first acquisition sub-module, which is used to acquire multiple first parts that fall in the first preset area in the next frame of the picture when the area of the first part is greater than the first area threshold, and obtain a first part set, wherein the first preset area is determined by the position and size of the first part; a second determination sub-module, which is used to calculate the similarity between the first part of the target to be matched and the first information of each first part in the first part set, and determine that the matching is successful when the maximum similarity is greater than the first similarity threshold, and determine that the matching fails when the maximum similarity is less than or equal to the first similarity threshold; the second sub-matching module includes: a second acquisition sub-module, which is used to acquire multiple second parts in the corresponding position area of the second preset area in the next frame of the picture , obtaining a second part set, wherein the second preset area is determined by the position and size of the second part; a third determination submodule, used to calculate the similarity between the second part of the target to be matched and each second part in the second part set, and determine that the match is successful when the maximum similarity is greater than the second similarity threshold, and determine that the match fails when the maximum similarity is less than or equal to the second similarity threshold; the third sub-matching module includes: a third acquisition submodule, used to acquire multiple first parts in the corresponding position area of the next frame image that fall in the third preset area, obtain a third part set, and calculate the similarity between the third part of the target to be matched and each third part in the third part set, wherein the third preset area is determined by the position and size of the third part; a fourth determination submodule, used to determine that the match is successful when the maximum similarity is greater than the third similarity threshold, and determine that the match fails when the maximum similarity is less than or equal to the third similarity threshold.
[0090] Optionally, in the target tracking device provided in the embodiment of the present application, the device further includes: a first generating unit, used to generate a first target before obtaining the associated parts of the target to be matched in the current frame picture, when there are both associated facial parts and associated torso parts in the head and shoulder parts in the current frame picture, wherein the associated parts of the first target include the head and shoulder parts, the facial parts and the torso parts; a second generating unit, used to generate a first target when there are associated facial parts or associated torso parts in the head and shoulder parts, or when there are no associated facial parts and torso parts in the head and shoulder parts, but the facial parts When there is an associated torso part with the target part, a second target is generated, wherein the associated parts of the second target include one of the following combinations: head and shoulder part and face part, head and shoulder part and torso part, face part and torso part; a third generating unit is used to generate a third target when there is no associated part with the target part, wherein the associated part of the third target is the target part, and the target part is one of the following: head and shoulder part, face part and torso part; the acquiring unit 10 is also used to determine the target to be matched from the first target, the second target and the third target, and acquire the associated parts of the target to be matched.
[0091] Optionally, in the target tracking device provided in the embodiment of the present application, the device also includes: a first calculation unit, which is used to calculate the intersection and union ratios of each head and shoulder part in the current frame picture with all intersecting facial parts before generating the first target when there are both associated facial parts and associated torso parts in the head and shoulder parts in the previous frame picture, to obtain multiple first intersection and union ratios, and when the maximum first intersection and union ratio is greater than a first threshold, determine the facial part corresponding to the maximum first intersection and union ratio as the facial part associated with the head and shoulder part; a second calculation unit, which is used to calculate the intersection and union ratios of each head and shoulder part with all intersecting torso parts, to obtain multiple second intersection and union ratios, and when the maximum second intersection and union ratio is greater than a second threshold, determine the torso part corresponding to the maximum second intersection and union ratio as the torso part associated with the head and shoulder part; and a third calculation unit, which is used to calculate the intersection and union ratios of the facial part with all intersecting torso parts when there is no associated head and shoulder part, to obtain multiple third intersection and union ratios, and when the maximum third intersection and union ratio is greater than a third threshold, determine the torso part corresponding to the maximum third intersection and union ratio as the torso part associated with the facial part.
[0092] Optionally, in the target tracking device provided in the embodiment of the present application, the device also includes: an updating unit, used to update the next frame picture to the current frame picture when there is a target to be matched in the next frame picture; a fourth determination unit, used to determine whether there is a matching target in the next frame picture of the updated current frame picture based on the target to be matched in the updated current frame picture.
[0093] Optionally, in the target tracking device provided in the embodiment of the present application, the device also includes: a judgment unit, used to judge whether there is a target to be matched in a frame after the next frame when there is no target to be matched in the next frame; and a fourth determination unit, used to determine that the target to be matched has been moved out of the next frame when there is no target to be matched in any preset frame after the next frame.
[0094] The target tracking device includes a processor and a memory. The acquisition unit 10, the first matching unit 20, the second matching unit 30 and the first determination unit 40 are all stored in the memory as program units, and the processor executes the program units stored in the memory to implement corresponding functions.
[0095] The processor includes a kernel, which retrieves the corresponding program unit from the memory. One or more kernels can be set, and the tracking accuracy of the object to be tracked can be improved by adjusting the kernel parameters.
[0096] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip.
[0097] An embodiment of the present application further provides a non-volatile storage medium, the non-volatile storage medium including a stored program, wherein when the program is executed, the device where the non-volatile storage medium is located is controlled to execute a target tracking method.
[0098] The embodiment of the present application also provides an electronic device, comprising a processor and a memory; the memory stores computer-readable instructions, and the processor is used to execute the computer-readable instructions, wherein a target tracking method is executed when the computer-readable instructions are executed. The electronic device in this article can be a server, a PC, a PAD, a mobile phone, etc.
[0099] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.
[0100] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0101] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0102] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0103] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0104] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0105] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0106] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0107] The above are only embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included within the scope of the claims of the present application.
Claims
1. A target tracking method, It is characterized in that include: Obtain the associated parts of the target to be matched in the current frame; Matching the target to be matched with the target in the next frame according to the first information of the associated part to obtain a first matching result, wherein the first information is attribute information or position information; In the case where the first matching result indicates a matching failure, matching the target to be matched with the target in the next frame according to the second information of the target to be matched to obtain a second matching result, wherein, in the case where the first information is the attribute information, the second information is the position information, and in the case where the first information is the position information, the second information is the attribute information, and the selection of the first information and the second information is determined by the movement speed of the target to be matched; If the second matching result indicates that the matching fails, determining that the target to be matched does not exist in the next frame, and if the second matching result indicates that the matching succeeds, determining that the target to be matched exists in the next frame; Before matching the target to be matched with the target in the next frame according to the first information of the associated part to obtain the first matching result, the method further includes: When the moving speed of the target to be matched is greater than a preset speed, the attribute information is determined as the first information, and the position information is determined as the second information; When the moving speed of the target to be matched is less than or equal to the preset speed, the position information is determined as the first information, and the attribute information is determined as the second information.
2. The method according to claim 1, It is characterized in that The step of matching the target to be matched with the target in the next frame according to the first information of the associated part to obtain a first matching result includes: In the case where there is a first part in the associated parts, matching the target to be matched with the target in the next frame according to the first information of the first part to obtain a first sub-matching result, wherein the first part is a face part or a torso part; In the case where the first part does not exist in the associated parts, or the first sub-matching result indicates that the match fails, if a second part exists in the associated parts, the target to be matched is matched with the target in the next frame according to the first information of the second part to obtain a second sub-matching result, wherein, in the case where the first part is a face part, the second part is a torso part, and in the case where the first part is a torso part, the second part is a face part; In the case that the second part does not exist in the associated parts, or the second sub-matching result indicates that the matching fails, if a third part exists in the associated parts, the target to be matched is matched with the target in the next frame according to the first information of the third part to obtain a third sub-matching result, wherein the third part is a head and shoulder part; The first matching result is determined according to the first sub-matching result, the second sub-matching result, and the third sub-matching result.
3. The method according to claim 1, It is characterized in that In the case where the first matching result indicates a matching failure, matching the target to be matched with the target in the next frame according to the second information of the target to be matched to obtain a second matching result includes: In the case where there is a first part in the associated parts, matching the target to be matched with the target in the next frame according to the second information of the first part to obtain a fourth sub-matching result, wherein the first part is a face part or a torso part; In the case where the first part does not exist in the associated parts, or the fourth sub-matching result indicates that the matching fails, if the second part exists in the associated parts, the target to be matched is matched with the target in the next frame according to the second information of the second part to obtain a fifth sub-matching result, wherein, in the case where the first part is a face part, the second part is a torso part, and in the case where the first part is a torso part, the second part is a face part; When the second part does not exist in the associated parts, or the fifth sub-matching result indicates that the matching fails, if a third part exists in the associated parts, the target to be matched is matched with the target in the next frame according to the second information of the third part to obtain a sixth sub-matching result, wherein the third part is a head and shoulder part; The second matching result is determined according to the fourth sub-matching result, the fifth sub-matching result, and the sixth sub-matching result.
4. The method according to claim 2 or 3, It is characterized in that The method further comprises: When the clarity of the face area in the current frame is greater than a clarity threshold, the face part is determined as the first part, and the torso part is determined as the second part; When the clarity of the face area in the current frame is less than or equal to the clarity threshold and the current frame includes a torso part, the torso part is determined as the first part and the face part is determined as the second part.
5. The method according to claim 2, It is characterized in that The step of matching the target to be matched with the target in the next frame according to the first information of the first part to obtain a first sub-matching result includes: if the area of the first part is less than or equal to a first area threshold, determining that the matching fails; if the area of the first part is greater than the first area threshold, obtaining multiple first parts in the next frame that fall in a first preset area to obtain a first part set, wherein the first preset area is determined by the position and size of the first part; calculating the similarity between the first part of the target to be matched and the first information of each first part in the first part set, and determining that the matching is successful if the maximum similarity is greater than a first similarity threshold, and determining that the matching fails if the maximum similarity is less than or equal to the first similarity threshold; According to the first information of the second part, the target to be matched is matched with the target in the next frame to obtain the second sub-matching result, which includes: obtaining multiple second parts in the next frame that fall in the corresponding position area of the second preset area to obtain a second part set, wherein the second preset area is determined by the position and size of the second part; calculating the similarity between the second part of the target to be matched and each second part in the second part set, and determining that the match is successful when the maximum similarity is greater than a second similarity threshold, and determining that the match fails when the maximum similarity is less than or equal to the second similarity threshold; The target to be matched is matched with the target in the next frame according to the first information of the third part to obtain a third sub-matching result, including: obtaining multiple first parts in the next frame that fall in corresponding position areas of a third preset area to obtain a third part set, and calculating the similarity between the third part of the target to be matched and each third part in the third part set, wherein the third preset area is determined by the position and size of the third part; when the maximum similarity is greater than a third similarity threshold, it is determined that the match is successful, and when the maximum similarity is less than or equal to the third similarity threshold, it is determined that the match fails.
6. The method according to claim 1, It is characterized in that Before obtaining the associated part of the target to be matched in the current frame, the method further includes: In the case that the head and shoulders in the current frame have both an associated face part and an associated body part, generating a first target, wherein the associated parts of the first target include the head and shoulders, the face, and the body part; In the case where the head and shoulder part has an associated face part or an associated torso part, or in the case where the head and shoulder part has no associated face part and torso part, but the face part has an associated torso part, a second target is generated, wherein the associated parts of the second target include one of the following combinations: the head and shoulder part and the face part, the head and shoulder part and the torso part, and the face part and the torso part; In the case that the target part does not have an associated part, a third target is generated, wherein the associated part of the third target is the target part, and the target part is one of the following: head and shoulder part, face part and trunk part; The acquiring the associated part of the target to be matched in the current frame includes: determining the target to be matched from the first target, the second target and the third target, and acquiring the associated part of the target to be matched.
7. The method according to claim 6, It is characterized in that In the case that the head and shoulder parts in the previous frame simultaneously have an associated face part and an associated torso part, before generating the first target, the method further includes: Calculating an intersection-and-union ratio between each head-and-shoulder part and all intersecting facial parts in the current frame to obtain a plurality of first intersection-and-union ratios, and when a maximum first intersection-and-union ratio is greater than a first threshold, determining the facial part corresponding to the maximum first intersection-and-union ratio as the facial part associated with the head-and-shoulder part; Calculating an intersection-and-union ratio between each of the head-shoulder parts and all intersecting torso parts to obtain a plurality of second intersection-and-union ratios, and when a maximum second intersection-and-union ratio is greater than a second threshold, determining the torso part corresponding to the maximum second intersection-and-union ratio as the torso part associated with the head-shoulder part; When there is no associated head and shoulder part with the facial part, an intersection-and-union ratio (IOR) of the facial part with all intersecting torso parts is calculated to obtain multiple third IORs, and when a maximum third IOR is greater than a third threshold, a torso part corresponding to the maximum third IOR is determined as the torso part associated with the facial part.
8. The method according to claim 1, It is characterized in that The method further comprises: When the target to be matched exists in the next frame, updating the next frame to the current frame; Based on the to-be-matched target in the updated current frame picture, it is determined whether there is a matching target in a frame picture next to the updated current frame picture.
9. The method according to claim 1, It is characterized in that The method further comprises: When the target to be matched does not exist in the next frame, determine whether the target to be matched exists in a frame after the next frame. When the target to be matched does not exist in any preset frame after the next frame, determine that the target to be matched has been removed from the next frame.
