Image-based object tracking method and device, electronic equipment and storage medium

By using image segmentation and occlusion detection methods, the problems of interference from non-target parts in the image and the inability to track occluded targets are solved, thus achieving more accurate and continuous target tracking.

CN115496779BActive Publication Date: 2025-11-21SHENZHEN QIYANG SPECIAL EQUIP TECH ENG CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202211314130.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-10-25
Publication Date
2025-11-21
Estimated Expiration
2042-10-25

AI Technical Summary

Technical Problem

In existing target tracking technologies, non-target parts in the image interfere with the tracking results, leading to larger errors. Furthermore, occluded targets cannot be effectively tracked, reducing tracking accuracy.

Method used

By performing target detection and segmentation on the image to remove interference from non-target parts, and performing occlusion judgment and position prediction when no target is matched, the tracking results are updated to ensure the tracking continuity of occluded targets.

Benefits of technology

It improves the tracking performance of occluded targets, ensures the accuracy and continuity of target tracking, and reduces interference from non-target parts on the tracking.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115496779B_ABST
    Figure CN115496779B_ABST
Patent Text Reader

Abstract

The application discloses an image-based object tracking method and device, electronic equipment and storage medium, wherein the non-target part in the image is removed before target tracking, so as to avoid the interference of the non-target part in the image on the target tracking; meanwhile, when the target tracking is performed, if there is a target that is not matched out, the occlusion judgment is performed on the target that is not matched out, and when it is judged that the target is occluded, the position prediction is performed in the next frame of image, so as to update the result by using the predicted position, and update the detection target class of the next frame of image by using the updated result, so as to ensure the continuity of the occluded target tracking in subsequent tracking, thereby, the target tracking of the occluded target can be realized, the tracking effect of the occluded target is improved, and the accuracy of the target tracking is ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of object tracking technology, specifically relating to an image-based object tracking method, device, electronic device, and storage medium. Background Technology

[0002] Computer vision has always been a focus of attention and a hot research topic. As a part of computer vision, target tracking has become a key research area for scholars at home and abroad due to its wide range of applications. At present, target tracking has been widely used in the field of traffic violations. It can track pedestrians, non-motorized vehicles and motorized vehicles to obtain the motion trajectory of the aforementioned objects for traffic prediction and traffic violation detection. However, target tracking has the following shortcomings in the application of the aforementioned fields: (1) It tracks the target in the image based on the whole image, and the non-target parts in the image will interfere with the target tracking, resulting in a large error in the tracking result; (2) When performing target tracking, if no object corresponding to any target is matched in the next frame of the image, it will be discarded. In this way, occluded targets cannot be effectively tracked, thereby reducing the accuracy of tracking. Therefore, it is urgent to provide a tracking method with high accuracy. Summary of the Invention

[0003] The purpose of this invention is to provide an image-based object tracking method, apparatus, electronic device, and storage medium to solve the problems in the prior art where non-target parts of the image interfere with tracking, resulting in large tracking errors, and the inability to track occluded targets.

[0004] To achieve the above objectives, the present invention adopts the following technical solution:

[0005] Firstly, an image-based object tracking method is provided, including:

[0006] Multiple images to be detected are acquired at preset intervals, and target detection is performed on each image to obtain the image region where each target object is located in each image.

[0007] For any image region of each target object in any image to be detected, the image region of each target object in any image to be detected is segmented to obtain multiple segmented images. Each segmented image contains only one target object, and the outline of the target object in any segmented image is used as the boundary of that segmented image.

[0008] The detection target class of any image to be detected is formed by using the multiple segmented images, and the detection target class of each image to be detected is obtained after the image regions of each target object in all images to be detected are segmented.

[0009] Based on the target class detected in the i-th image and the target class detected in the (i+1)-th image, the Deepsort tracking algorithm is used to track each target object in the i-th image to obtain the tracking result. The tracking result includes the position of the matching target pair and / or the first position of the unmatched target. The matching target pair is the target object that belongs to the same object in the i-th image and the (i+1)-th image. The unmatched target is the target object that is in the i-th image and has not been successfully matched with any target object in the (i+1)-th image.

[0010] If there is an unmatched target in the tracking result, it is determined whether the unmatched target is occluded in the (i+1)th image to be detected;

[0011] If so, then based on the first position of the unmatched target, predict the second position of the unmatched target in the (i+1)th image to be detected;

[0012] The unmatched target is added to the second position in the (i+1)th image to be detected to obtain the updated tracking result, and the updated tracking result is output. The target class of the (i+1)th image to be detected is updated using the updated tracking result, so that the updated target class is used as the target class of the (i+1)th image to be detected.

[0013] Increment i by 1 to re-detect the target class of the i-th image to be detected and the target class of the (i+1)-th image to be detected, and use the Deepsort tracking algorithm to track each target object in the i-th image to be detected until i is greater than n-1, at which point target tracking stops, so as to obtain multiple updated tracking results, where i starts from 1, n is the total number of images to be detected, and i and n are positive integers;

[0014] By utilizing the positions of each matching target pair, the first position of each unmatched target, and the second position of each unmatched target in multiple updated tracking results, the motion trajectory of each target object is generated.

[0015] Based on the above disclosure, after performing target detection and obtaining the image regions of each target object in each image to be detected, this invention performs image segmentation. That is, for any target object's image region, only the region containing that target object is segmented as a segmented image. After segmenting all target object's image regions, multiple segmented images can be used to form the detection target class of the corresponding image to be detected. In this way, this step can remove non-target parts in the image, thereby avoiding interference from non-target parts in the image to target tracking. Then, when performing target tracking, if there are unmatched targets in the obtained target tracking results (that is, the target object in the previous frame was not successfully matched in the image of the next frame), it will determine whether the unmatched target is in the next frame. If an image (i+1) to be detected is occluded, then the position of the unmatched target in the next frame is predicted based on the position of the unmatched target in the previous frame (i.e., the i-th image to be detected). The tracking results are updated accordingly, and the detected target class in the next frame is updated using the updated tracking results. In this way, target tracking of occluded targets can be achieved, thereby improving the tracking effect of occluded targets. Finally, the above method is executed in a loop until all images to be detected are tracked, and multiple updated tracking results are obtained. Based on the positions of the matching target pairs and the first and second positions of the unmatched targets in the multiple updated tracking results, the motion trajectory of each target object can be generated.

[0016] Through the above design, this invention removes non-target parts from the image before target tracking, thereby avoiding interference from non-target parts in the image to target tracking. Simultaneously, during target tracking, if an unmatched target is detected, occlusion is assessed for the unmatched target. Upon detection of occlusion, position prediction is performed in the next frame image. The predicted position is used to update the result, and the updated result is used to update the detected target class in the next frame image. This ensures the continuity of occluded target tracking in subsequent tracking, thereby enabling target tracking of occluded targets, improving the tracking effect of occluded targets, and ultimately ensuring the accuracy of target tracking.

[0017] In one possible design, determining whether the unmatched target is occluded in the (i+1)th image to be detected includes:

[0018] Obtain the position of the unmatched target in each target image, wherein each target image is the image to be detected that is located before the (i+1)th image to be detected among all images to be detected;

[0019] Based on the position of the unmatched target in each target image, the initial motion trajectory of the unmatched target before the target time is determined, wherein the target time is the acquisition time corresponding to the (i+1)th image to be detected;

[0020] Based on the initial motion trajectory of the unmatched target, the distance between the unmatched target and the image boundary of any image to be detected is determined;

[0021] Determine whether the distance between the unmatched target and the image boundary of any image to be detected is greater than 0;

[0022] If so, it is determined that the unmatched target is occluded in the (i+1)th image to be detected.

[0023] Based on the above disclosure, this invention discloses a method for determining whether an unmatched target is occluded. Specifically, the method uses the position of the unmatched target in the previous image to obtain its initial motion trajectory. Then, it calculates the distance between the unmatched target and the image boundary of any image to be detected using the initial motion trajectory. Finally, it uses the calculated distance to determine whether the unmatched target is occluded. If the distance is greater than 0, it indicates that the target is occluded; otherwise, it indicates that the target has moved out of the image boundary, i.e., it has left the camera's field of view.

[0024] In one possible design, based on the initial motion trajectory of the unmatched target, the distance between the unmatched target and the image boundary of any image to be detected is determined, including:

[0025] Based on the initial motion trajectory, the motion direction of the unmatched target is determined;

[0026] Based on the motion direction of the unmatched target, the boundary line that intersects with the initial motion trajectory in the motion direction in the image boundary of any image to be detected is determined as the calibration boundary;

[0027] Based on the calibration boundary and the initial motion trajectory, the coordinates of the intersection point between the calibration boundary and the initial motion trajectory are obtained;

[0028] Based on the first position of the unmatched target and the coordinates of the intersection point, the distance between the unmatched target and the image boundary of any image to be detected is calculated.

[0029] Based on the above disclosure, this invention discloses a method for calculating the distance between an unmatched target and an image boundary. First, the direction of motion of the unmatched target is determined based on its initial motion trajectory. Then, a boundary is identified from the image boundary that intersects with the initial motion trajectory along the motion direction. Next, the coordinates of the intersection point are calculated based on the initial motion trajectory and the identified boundary. Finally, the distance between the unmatched target and the image boundary of any image to be detected is calculated based on the intersection coordinates and the first position of the unmatched target.

[0030] In one possible design, when i is 1, determining whether the unmatched target is occluded in the (i+1)th image to be detected includes:

[0031] Calculate the vertical distance between the first position of the unmatched target and each image boundary of any image to be detected;

[0032] Determine if the minimum vertical distance among all vertical distances is greater than 0;

[0033] If so, it is determined that the unmatched target is occluded in the (i+1)th image to be detected.

[0034] In one possible design, after segmenting the image regions of each target object in any image to be detected to obtain multiple segmented images, the method further includes:

[0035] According to the preset size, each segmented image in the multiple segmented images is filled to obtain multiple filled images;

[0036] The detection target class of any image to be detected is composed of multiple filled images.

[0037] In one possible design, the position of the matching target pair in any updated tracking result includes: the coordinates of the center point of the detection box of the target object corresponding to the matching target pair in the i-th image to be detected, and the coordinates of the center point of the detection box of the target object corresponding to the matching target pair in the (i+1)-th image to be detected;

[0038] Specifically, by utilizing the positions of each matching target pair, the first position of each unmatched target, and the second position of each unmatched target from multiple updated tracking results, the motion trajectory of each target object is generated, including:

[0039] By using the positions of each matching target pair in multiple updated tracking results, the center point of the detection box of the target object corresponding to each matching target pair in each image to be detected is determined. By using the first and second positions of each unmatched target in multiple updated tracking results, the center point of the detection box of the target object corresponding to each unmatched target in each image to be detected is determined.

[0040] For the first tracking object, following the target tracking order, the center points of the detection boxes of the first tracking object in each image to be detected are connected to obtain the motion trajectory of the first tracking object; wherein, the first tracking object is the target object corresponding to any matching target pair; and

[0041] For the second tracking object, in accordance with the target tracking order, the center points of the detection boxes of the second tracking object in each image to be detected are connected to obtain the motion trajectory of the second tracking object after the connection; wherein, the second tracking object is the target object corresponding to any unmatched target.

[0042] Based on the above disclosure, this invention discloses a specific method for generating a trajectory based on the updated tracking results. First, based on each matching target pair in multiple updated tracking results, the target object representing the same object is determined. Then, for the target object corresponding to any matching target pair, the center points of the detection boxes in different images to be detected are connected according to the tracking order (since the detection box of the target object is its image region, this is equivalent to connecting the center points of the detection boxes of the target object in each segmented image in different images to be detected), and the corresponding motion trajectory can be obtained.

[0043] In one possible design, predicting the second position of the unmatched target in the (i+1)th image to be detected based on the first position of the unmatched target includes: using a Kalman filter algorithm to predict the second position of the unmatched target in the (i+1)th image to be detected based on the first position of the unmatched target.

[0044] Secondly, an image-based object tracking device is provided, comprising:

[0045] The target detection unit is used to acquire multiple images to be detected at preset intervals, and to perform target detection on each image to obtain the image region where each target object is located in each image.

[0046] The image segmentation unit is used to segment the image regions of each target object in any image to be detected, and obtain multiple segmented images. Each segmented image contains only one target object, and the outline of the target object in any segmented image is used as the boundary of the segmented image.

[0047] The target tracking unit is used to form a detection target class for any image to be detected using the multiple segmented images, and to obtain the detection target class for each image to be detected after the image regions of each target object in all images to be detected are segmented.

[0048] The target tracking unit is used to detect target classes in the i-th image to be detected and the (i+1)-th image to be detected, and to track each target object in the i-th image to be detected using the Deepsort tracking algorithm to obtain tracking results. The tracking results include the positions of matching target pairs and / or the first positions of unmatched targets. The matching target pairs are target objects belonging to the same object in the i-th image to be detected and the (i+1)-th image to be detected. The unmatched targets are target objects in the i-th image to be detected that have not been successfully matched with any target object in the (i+1)-th image to be detected.

[0049] The target tracking unit is used to determine whether the unmatched target is occluded in the (i+1)th image to be detected when there is an unmatched target in the tracking result.

[0050] The target tracking unit is used to predict the second position of the unmatched target in the (i+1)th image to be detected based on the first position of the unmatched target when it is determined that the unmatched target is occluded in the (i+1)th image to be detected.

[0051] The target tracking unit is used to add the second position of the unmatched target in the (i+1)th image to be detected to the tracking result, obtain the updated tracking result, and output the updated tracking result, and use the updated tracking result to update the detection target class of the (i+1)th image to be detected, so as to use the updated detection target class as the detection target class of the (i+1)th image to be detected.

[0052] The target tracking unit increments i by 1 to re-track the target objects in the i-th image to be detected and the target objects in the (i+1)-th image to be detected, and uses the Deepsort tracking algorithm to track each target object in the i-th image to be detected until i is greater than n-1, at which point the target tracking stops, so as to obtain multiple updated tracking results. Here, i starts from 1, n is the total number of images to be detected, and i and n are positive integers.

[0053] The trajectory generation unit is used to generate the motion trajectory of each target object by utilizing the positions of each matching target pair, the first position of each unmatched target, and the second position of each unmatched target in multiple updated tracking results.

[0054] Thirdly, another image-based object tracking device is provided. Taking the device as an electronic device as an example, it includes a memory, a processor, and a transceiver that are connected in sequence. The memory is used to store a computer program, the transceiver is used to send and receive messages, and the processor is used to read the computer program and execute the image-based object tracking method as described in the first aspect or any possible design of the first aspect.

[0055] Fourthly, a storage medium is provided, on which instructions are stored, which, when executed on a computer, perform the image-based object tracking method as described in the first aspect or any possible design of the first aspect.

[0056] Fifthly, a computer program product containing instructions is provided that, when executed on a computer, causes the computer to perform the image-based object tracking method as described in the first aspect or any possible design of the first aspect.

[0057] Beneficial effects:

[0058] (1) Before performing target tracking, the present invention removes non-target parts in the image, thereby avoiding interference from non-target parts in the image to target tracking; at the same time, when performing target tracking, if there is an unmatched target, the unmatched target will be occluded, and when it is determined that it is occluded, the position will be predicted in the next frame image, so as to use the predicted position to update the result, and use the updated result to update the detected target class in the next frame image, so as to ensure the continuity of occluded target tracking in subsequent tracking. Thus, target tracking of occluded targets can be realized, thereby improving the tracking effect of occluded targets and ensuring the accuracy of target tracking. Attached Figure Description

[0059] Figure 1 A schematic flowchart illustrating the steps of an image-based object tracking method provided in an embodiment of the present invention;

[0060] Figure 2 This is a schematic diagram of the effect of the image to be detected provided in an embodiment of the present invention;

[0061] Figure 3 This is a schematic diagram illustrating the effect of segmenting a target object in an image to be detected, provided in an embodiment of the present invention.

[0062] Figure 4 This is a schematic diagram illustrating the effect of filling a target object in an image to be detected according to an embodiment of the present invention.

[0063] Figure 5 A schematic diagram of the structure of an image-based object tracking device provided in an embodiment of the present invention;

[0064] Figure 6 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation

[0065] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the present invention will be briefly introduced below in conjunction with the accompanying drawings and descriptions of the embodiments or the prior art. Obviously, the following description of the structure of the accompanying drawings is only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort. It should be noted that the description of these embodiments is for the purpose of helping to understand the present invention, but does not constitute a limitation of the present invention.

[0066] It should be understood that although the terms first, second, etc., may be used herein to describe various units, these units should not be limited by these terms. These terms are only used to distinguish one unit from another. For example, a first unit may be referred to as a second unit, and similarly, a second unit may be referred to as a first unit, without departing from the scope of the exemplary embodiments of the invention.

[0067] It should be understood that the term "and / or" that may appear in this document is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can mean: A exists alone, B exists alone, and A and B exist simultaneously. The term " / and" that may appear in this document describes another relationship between related objects, indicating that two relationships can exist. For example, A / and B can mean: A exists alone, and A and B exist alone. In addition, the character " / " that may appear in this document generally indicates that the related objects before and after it are in an "or" relationship.

[0068] Example:

[0069] See Figure 1As shown, the image-based object tracking method provided in this embodiment performs image segmentation on each frame of the image before target tracking, segmenting the image into a segmented image containing only the target object. This reduces the interference of non-target parts in the image on target tracking, thereby improving tracking accuracy. Simultaneously, during target tracking, if a target in the previous frame fails to match in the next frame, an occlusion judgment is made on the unmatched target. Upon determining that the target is occluded in the next frame, its position is predicted, and the tracking result and the next frame image are updated based on the predicted position. Thus, tracking and recognition of occluded targets can be achieved, further improving the tracking effect. Through the aforementioned design, this method is applicable to various target tracking and recognition fields and has broad application prospects. In this embodiment, the method can be, but is not limited to, running on the AI ​​(Artificial Intelligence) camera side or server side. It is understood that the aforementioned execution entity does not constitute a limitation on the embodiments of this application. Accordingly, the operation steps of this method can be, but are not limited to, as shown in steps S1 to S9 below.

[0070] S1. Acquire multiple images to be detected at preset intervals, and perform target detection on each image to obtain the image region where each target object is located in each image. In specific applications, an AI camera can capture images of the target to be tracked and identified at preset intervals (e.g., 1s, 2s, etc.) to obtain the images to be detected. Alternatively, a video stream can be captured and processed frame by frame to obtain each frame as the image to be detected. In this embodiment, the target object can be, but is not limited to, pedestrians, non-motorized vehicles, and / or motorized vehicles. For example, but is not limited to, using the YOLOv4 (You Only Look Once, a deep neural network-based object recognition and localization algorithm, characterized by its fast running speed and real-time detection capabilities; YOLOv4 is its fourth version) neural network model to perform target detection on each image to obtain the image region of each target object in each image. Furthermore, the image region obtained by target detection for any target object is the detection box of that target object in the corresponding image to be detected. Figure 2 As shown, Figure 2 For an image to be detected, target detection is performed on it. The image region of the human figure in the image is the detection box region of the human figure in the image. Of course, the target recognition of other images to be detected yields the same region as the example above, and will not be repeated here.

[0071] After obtaining the image region of each target object in each image to be detected, since the image region of each target object contains not only the image of the corresponding target object, but also the background part of the original image, this embodiment also sets up an image segmentation step to prevent the non-target parts in the image region of each target object from interfering with tracking and recognition. This step is to segment out the image that contains only the target object, thereby avoiding the problem of non-target parts in the image region interfering with tracking and recognition. The image segmentation process is shown in step S2 below.

[0072] S2. For any image region of a target object in any image to be detected, the image region of each target object in any image to be detected is segmented to obtain multiple segmented images. Each segmented image contains only one target object, and the contour of the target object in any segmented image is used as the boundary of that segmented image. In specific applications, a segmentation algorithm based on an active contour model can be used to segment the image region of each target object. The principle is: a method to detect targets in a given image using curve evolution. Based on this, accurate edge information can be obtained. The basic steps of the aforementioned segmentation algorithm are: first, define an initial curve, then obtain an energy function based on the image data, and induce curve changes by minimizing the energy function, so that it gradually approaches the target edge (i.e., the target object in the image region), and finally finds the target edge. The edge curve obtained by this dynamic approximation method has advantages such as closure and smoothness. Furthermore, for example, but not limited to, a simplified active contour model (CV model) based on the Mumford-Shah model proposed by Chan and Vese can be used for image segmentation. See [link to relevant documentation]. Figure 3 As shown, Figure 3 That is to Figure 2 The image obtained by segmenting the image region of the detected human face, from Figure 3 As can be seen, after image segmentation, it is equivalent to segmenting the outline of the target object (human image) to obtain an image containing only the human image, and the outline of the human image is the boundary of the segmented image; of course, the segmentation process of other image regions of different target objects is based on the same principle as the example above, and will not be repeated here.

[0073] After image segmentation of the image regions of each target object in any image to be detected, the segmented images of each target object in any image to be detected can be used to form the detection target class of any image to be detected, that is, to form the Detection (a class of detection targets) of any image to be detected. The detection target class is a data structure that contains the segmented images of each target object in any image to be detected; the process of forming the detection target class is as shown in step S3 below.

[0074] S3. The detection target class of any image to be detected is formed by using the multiple segmented images. After the image regions of each target object in all images to be detected are segmented, the detection target class of each image to be detected is obtained. In specific applications, after the image regions of each target object in each image to be detected are segmented according to the method disclosed in step S2 above, the segmented image corresponding to each image to be detected can be obtained. Then, the detection class of each image to be detected can be formed by using the corresponding segmented images.

[0075] In addition, in this embodiment, in order to facilitate the adaptation to the input standard corresponding to the target tracking algorithm model during target tracking, the segmented images of each target object can be filled. The image filling step may include, but is not limited to, the following: (1) Filling each segmented image in multiple segmented images according to a preset size to obtain multiple filled images. Optionally, the preset size may be, but is not limited to, 24*24, and after filling to the preset size, the pixels in the image other than the target object may be, but is not limited to, set to (255,255,255). See [reference missing]. Figure 4 As shown, Figure 4 That is to Figure 3 The image obtained after image filling, from Figure 4 As can be seen, it is a standard rectangular image, and after filling, the non-target object part of the image does not have a background image. Therefore, it will not interfere with target tracking after filling. Then, for any image to be detected, the image filled with the corresponding target object can be used to form the detection class of any image to be detected.

[0076] After obtaining the detection class of each image to be detected, target tracking can be performed according to the image acquisition order. The target tracking process is shown in step S4 below.

[0077] S4. Based on the target class detected in the i-th image and the (i+1)-th image to be detected, and using the Deepsort tracking algorithm, target tracking is performed on each target object in the i-th image to be detected, and tracking results are obtained. The tracking results include the positions of matched target pairs and / or the first positions of unmatched targets. The matched target pairs are target objects belonging to the same object in the i-th and (i+1)-th images to be detected. The unmatched targets are target objects in the i-th image to be detected that have not been successfully matched with any target object in the (i+1)-th image to be detected. In specific applications, the position of a matched target pair is the coordinates of the center point of the detection box of its corresponding target object in different images to be detected. (As explained in step S1 above, the detection box of a target object is essentially the image region of the target object; therefore, after segmentation and filling, the center point of its image region remains unchanged.) The coordinates of the center point of the detection box of the target object in different images to be detected are essentially the coordinates of the center point of the detection box of the target object in its corresponding segmented image. At the same time, the Deepsort tracking algorithm can detect the center point coordinates of the detection box of each target object in its respective image during tracking and recognition. Therefore, after target tracking, the position of the matching target pair can be directly output. Similarly, the position of the unmatched target is also output. In addition, the Deepsort algorithm can track the same target on different images and assign a unique ID to identify it, thereby completing the tracking and recognition of the same target in different images. This algorithm is an improvement on Sort target tracking. It introduces a deep learning model and extracts the appearance features of the target for nearest neighbor matching during real-time target tracking. It also uses cascade matching and IOU matching to realize the recognition and tracking of the same target in consecutive frames. It is a commonly used target tracking algorithm, and its principle will not be elaborated here.

[0078] In this embodiment, taking i as 1 as an example, assuming that the segmented images in the target class of the first image to be detected are 3, that is, there are 3 target objects (A1, A2, and A3 respectively), among which, after tracking and identifying the target class corresponding to the second image to be detected (which has 2 target objects, B1, B2, and B3), A1 and B1 are tracked and identified as the same target, A2 and B2 are tracked and identified as the same target, and no target object that is the same as A3 is matched in the target class of the second image to be detected (in fact, B3 and A3 are the same object, but because B3 is occluded, it cannot be tracked and matched successfully). Therefore, A1 and B1 are a matching target pair, A2 and B2 are a matching target pair, and A3 is not a matching target pair. If there is no matching target, in the traditional target tracking algorithm, A3 would be discarded, thus losing the tracking of target object A3. In reality, such targets may be occluded in the image. Therefore, in order to improve the tracking and recognition of such targets, this embodiment also sets up an occlusion judgment step. When it is determined that the unmatched target is occluded, the target position is predicted, which is used to update the Detection of the corresponding image (i.e., the (i+1)th image to be detected) so that it can be matched and recognized with the target object in the subsequent image to be detected during subsequent target tracking, so as to finally achieve the tracking and recognition of the occluded target. Optionally, the occlusion judgment and position prediction of the unmatched target can be, but are not limited to, as shown in steps S5 and S6 below.

[0079] S5. If there is an unmatched target in the tracking result, determine whether the unmatched target is occluded in the (i+1)th image to be detected. In specific applications, the distance between the motion trajectory of the unmatched target and the image boundary of any image to be detected can be used to determine whether the unmatched target is occluded. The determination process can be, but is not limited to, as shown in steps S51 to S55 below.

[0080] S51. Obtain the position of the unmatched target in each target image, wherein each target image is the image to be detected that is located before the (i+1)th image to be detected among all images to be detected.

[0081] S52. Based on the position of the unmatched target in each target image, determine the initial motion trajectory of the unmatched target before the target time, where the target time is the acquisition time corresponding to the (i+1)th image to be detected. In a specific application, let's illustrate steps S51 and S52 with an example. Assuming i is 3, it means the unmatched target (let's say C3) was not identified in the 4th image to be detected. That is, no target object matching the same as C3 was found in the 4th image to be detected. In this case, it indicates that the target object C3 was tracked and identified in the 1st, 2nd, and 3rd images to be detected. In this scenario, we assume that A3 in the first image to be detected and B3 in the second image to be detected are a matching target pair, and B3 in the second image to be detected and C3 in the third image to be detected are a matching target pair. Therefore, A3, B3, and C3 all represent the same target object. As previously explained, the image region is the detection box for each target object, and the center point of the detection box is the position of the target object. Thus, the center points of the detection boxes of A3, B3, and C3 in their respective images can be connected to form the initial motion trajectory of the unmatched target. Of course, the generation process of the initial motion trajectory of the other unmatched targets is the same as the previous example, and will not be repeated here.

[0082] After obtaining the initial motion trajectory of the unmatched target, the distance between the unmatched target and the image boundary of any image to be detected can be calculated based on the initial motion trajectory. The distance is then used to determine whether the unmatched target is occluded. The distance calculation process is shown in steps S53 and S54 below.

[0083] S53. Based on the initial motion trajectory of the unmatched target, determine the distance between the unmatched target and the image boundary of any image to be detected; in specific applications, the motion direction of the unmatched target can be determined based on its initial motion trajectory, thereby obtaining the boundary in the motion direction of any image boundary to be detected, so as to calculate the distance between the unmatched target and the determined boundary; optionally, the process of calculating the distance between the unmatched target and its image boundary in the motion direction is as shown in steps S53a to S53d below.

[0084] S53a. Determine the direction of motion of the unmatched target based on the initial motion trajectory.

[0085] S53b. Based on the motion direction of the unmatched target, determine the boundary line in the image boundary of any image to be detected that intersects with the initial motion trajectory in the motion direction, and use it as the calibration boundary.

[0086] S53c. Based on the calibration boundary and the initial motion trajectory, the coordinates of the intersection point between the calibration boundary and the initial motion trajectory are obtained. In specific applications, since the initial motion trajectory is generated based on the center point of the detection box of the unmatched target in its corresponding image to be detected, the trajectory equation of the initial motion trajectory can be calculated based on the coordinates of the center point of the corresponding detection box of the unmatched target. At the same time, the calibration boundary is equivalent to a line segment, so a coordinate system can be established in any image to be detected to calculate its corresponding straight line equation. Then, the intersection point coordinates can be calculated using the two equations. After calculating the intersection point coordinates, the distance between the unmatched target and the calibration boundary can be calculated based on the intersection point coordinates, as shown in step S53d below.

[0087] S53d. Based on the first position of the unmatched target and the coordinates of the intersection point, the distance between the unmatched target and the image boundary of any image to be detected is calculated. In specific applications, the first position of the unmatched target is the coordinates of the center point of the detection box in the i-th image to be detected (that is, the coordinates of the center point of the detection box of the segmented image corresponding to the unmatched target in the i-th image to be detected). Therefore, after obtaining the first position and the coordinates of the intersection point of the unmatched target, a perpendicular line can be drawn from the unmatched target to the calibration boundary, and then the unmatched target and the intersection point can be connected to form a right triangle (the two legs of the right triangle can be obtained from the coordinates of the first position and the intersection point). Finally, based on the Pythagorean theorem, the distance between the unmatched target and the intersection point can be calculated, which is the distance between the unmatched target and the image boundary of any image to be detected.

[0088] In this embodiment, when i is 1, determining whether the unmatched target is occluded in the (i+1)th image to be detected includes: First step: Calculating the vertical distance between the first position of the unmatched target and each image boundary of any image to be detected; Second step: Determining whether the minimum vertical distance among the vertical distances is greater than 0; Third step: If yes, then determining that the unmatched target is occluded in the (i+1)th image to be detected; that is, when an unmatched target object is identified in the second image to be detected that is not in the first image to be detected, since the unmatched target only exists in the first image to be detected and has only one coordinate, the distance from this coordinate to the four image boundaries can be calculated, and then the minimum distance is selected to determine whether it is greater than 0. If yes, it means that the unmatched target is occluded in the second image to be detected.

[0089] After calculating the distance between the unmatched target and the image boundary, it can be determined whether the unmatched target is occluded based on the calculated distance. The determination process is shown in steps S54 and S55 below.

[0090] S54. Determine whether the distance between the unmatched target and the image boundary of any image to be detected is greater than 0.

[0091] S55. If yes, then it is determined that the unmatched target is occluded in the (i+1)th image to be detected. In specific applications, if the calculated distance is greater than 0, it means that the unmatched target is in the (i+1)th image to be detected, and the reason for not being detected can be determined as being occluded. If it is less than or equal to 0, it means that the unmatched target has left the camera range of the AI ​​camera. At this time, the tracking of the unmatched target can be stopped.

[0092] When it is determined that the unmatched target is occluded in the (i+1)th image to be detected, the position of the unmatched target in the (i+1)th image to be detected can be predicted so that the predicted position can be used to update the corresponding target class in the (i+1)th image to be detected. The position prediction process is as shown in step S6 below.

[0093] S6. If so, then based on the first position of the unmatched target, predict the second position of the unmatched target in the (i+1)th image to be detected; in specific applications, the Kalman filter algorithm can be used, but is not limited to, and the second position of the unmatched target in the (i+1)th image to be detected can be predicted based on the first position of the unmatched target; in this embodiment, the Kalman filter is an algorithm that uses the state equation of a linear system to make the optimal estimation of the system state through the system input and output observation data. Its principle is: to predict the coordinate position of the object from a set of noisy observation sequences (i.e., known positions) of the object position. It is a commonly used technique for position prediction, and will not be elaborated here.

[0094] After obtaining the second position of the unmatched target in the (i+1)th image to be detected, it can be added to the tracking result to obtain the updated tracking result, and the updated tracking result is used to update the detection target class of the (i+1)th image to be detected. The update process is as shown in step S7 below.

[0095] S7. Add the second position of the unmatched target in the (i+1)th image to be detected to the tracking result to obtain the updated tracking result, and output the updated tracking result. Also, update the detection target class of the (i+1)th image to be detected using the updated tracking result, so that the updated detection target class is used as the detection target class of the (i+1)th image to be detected. In specific applications, updating the detection target class using the updated tracking result means determining the target object corresponding to the unmatched target in the detection target class (e.g., based on the example in step S4 above, B3 in the detection target class corresponding to the (i+1)th image to be detected is used as the matching object of the unmatched target A3. Thus, when tracking the (i+2)th image to be detected, B3 can be used as the initial state, and then the matching of the target object corresponding to B3 can be performed in the (i+2)th image to be detected). Therefore, through the aforementioned design, this embodiment can achieve target tracking of occluded targets, thereby improving the tracking effect of occluded targets.

[0096] Finally, by repeating steps S4 to S7 for each tracking and identification, the tracking and identification of occluded targets in all images can be completed, as shown in step S8 below.

[0097] S8. Increment i by 1 to re-detect the target class of the i-th image to be detected and the target class of the (i+1)-th image to be detected, and use the Deepsort tracking algorithm to track each target object in the i-th image to be detected until i is greater than n-1, then stop the target tracking to obtain multiple updated tracking results, where i starts from 1, n is the total number of images to be detected, and i and n are positive integers; in specific applications, each tracking and recognition will output an updated tracking result. Therefore, after all images to be detected have been tracked, n-1 updated tracking results can be obtained. In this way, it is equivalent to knowing the target objects that are successfully matched in the next frame of the previous frame of the image during each tracking and recognition. Thus, it is possible to know the target objects that represent the same object in all images to be detected. Finally, based on the position of the target object, the motion trajectory can be generated; in this embodiment, the process of generating the motion trajectory can be, but is not limited to, the following step S9.

[0098] S9. Using the positions of each matching target pair, the first position of each unmatched target, and the second position of each unmatched target in multiple updated tracking results, generate the motion trajectory of each target object. In specific applications, as previously explained, the position of the matching target pair is the coordinates of the center point of the detection box of its corresponding target object in different images to be detected. That is, the position of the matching target pair in any updated tracking result includes: the coordinates of the center point of the detection box of the target object corresponding to the matching target pair in the i-th image to be detected, and the coordinates of the center point of the detection box of the target object corresponding to the matching target pair in the (i+1)-th image to be detected. Therefore, the motion trajectory of each target object can be generated based on the position of its corresponding target object, as shown in steps S91 to S93 below.

[0099] S91. Using the positions of each matching target pair in multiple updated tracking results, determine the center point of the detection box of the target object corresponding to each matching target pair in each image to be detected. Using the first and second positions of each unmatched target in multiple updated tracking results, determine the center point of the detection box of the target object corresponding to each unmatched target in each image to be detected.

[0100] S92. For the first tracking object, in accordance with the target tracking order, the center points of the detection boxes of the first tracking object in each image to be detected are connected to obtain the motion trajectory of the first tracking object after the connection; wherein, the first tracking object is the target object corresponding to any matching target pair.

[0101] S93. For the second tracking object, in accordance with the target tracking order, the center points of the detection boxes of the second tracking object in each image to be detected are connected to obtain the motion trajectory of the second tracking object after the connection; wherein, the second tracking object is the target object corresponding to any unmatched target.

[0102] The principle of the aforementioned steps S91 to S93 is as follows: based on each matching target pair in multiple updated tracking results, the target object representing the same object is determined. Then, for the target object corresponding to any matching target pair, the center points of the detection boxes in different images to be detected are connected according to the tracking order. After the connection is completed, the corresponding motion trajectory can be obtained.

[0103] For example, suppose there are three images to be detected. The updated tracking results of the first and second images are as follows: target object A1 in the first image and target object B1 in the second image are a matched pair; target object B1 in the second image and target object C1 in the third image are a matched pair. Target object A2 in the first image and target object B2 in the second image are a matched pair; target object B2 in the second image and target object C2 in the third image are a matched pair. Target object A3 in the first image is not matched. After the target is predicted by the method provided in this embodiment, it is determined that target object B3 and A3 in the second image to be detected are the same object, and target object B3 in the second image to be detected and target object C3 in the third image to be detected are a matching target pair; therefore, A1, B1 and C1 are the same target object, A2, B2 and C2 are the same target object, and A3, B3 and C3 are the same target object. At this time, the line connecting the center points of the corresponding detection boxes of A1, B1 and C1 can be used as the motion trajectory of the corresponding target objects of A1, B1 and C1. Similarly, the motion trajectories of the other two target objects can also be obtained according to the aforementioned method.

[0104] Therefore, through the image-based object tracking method described in detail in steps S1 to S9 above, the present invention removes non-target parts from the image before target tracking, thereby avoiding interference from non-target parts in the image to target tracking. At the same time, during target tracking, if there is an unmatched target, an occlusion judgment is made for the unmatched target, and when it is determined that it is occluded, the position is predicted in the next frame of the image so as to update the result using the predicted position, and to update the detected target class of the next frame of the image using the updated result, so as to ensure the continuity of occluded target tracking in subsequent tracking. Thus, target tracking of occluded targets can be realized, thereby improving the tracking effect of occluded targets and ensuring the accuracy of target tracking.

[0105] like Figure 5 As shown, the second aspect of this embodiment provides a hardware device for implementing the image-based object tracking method described in the first aspect of the embodiment, comprising:

[0106] The target detection unit is used to acquire multiple images to be detected at preset intervals, and to perform target detection on each image to obtain the image region where each target object is located in each image.

[0107] The image segmentation unit is used to segment the image regions of each target object in any image to be detected, thereby obtaining multiple segmented images. Each segmented image contains only one target object, and the outline of the target object in any segmented image serves as the boundary of that segmented image.

[0108] The target tracking unit is used to form a detection target class for any image to be detected using the multiple segmented images, and to obtain the detection target class for each image to be detected after the image regions of each target object in all images to be detected are segmented.

[0109] The target tracking unit is used to detect target classes in the i-th image and the (i+1)-th image, and to track each target object in the i-th image using the Deepsort tracking algorithm to obtain tracking results. The tracking results include the positions of matched target pairs and / or the first positions of unmatched targets. The matched target pairs are target objects belonging to the same object in the i-th and (i+1)-th images. The unmatched targets are target objects in the i-th image that have not been successfully matched with any target object in the (i+1)-th image.

[0110] The target tracking unit is used to determine whether the unmatched target is occluded in the (i+1)th image to be detected when there is an unmatched target in the tracking result.

[0111] The target tracking unit is used to predict the second position of the unmatched target in the (i+1)th image to be detected based on the first position of the unmatched target when it is determined that the unmatched target is occluded in the (i+1)th image to be detected.

[0112] The target tracking unit is used to add the second position of the unmatched target in the (i+1)th image to be detected to the tracking result, obtain the updated tracking result, output the updated tracking result, and update the detection target class of the (i+1)th image to be detected using the updated tracking result, so as to use the updated detection target class as the detection target class of the (i+1)th image to be detected.

[0113] The target tracking unit increments i by 1 to re-track the target objects in the i-th image to be detected based on the target class of the i-th image to be detected and the target class of the (i+1)-th image to be detected, and uses the Deepsort tracking algorithm to track each target object in the i-th image to be detected until i is greater than n-1, at which point the target tracking stops, so as to obtain multiple updated tracking results, where i starts from 1, n is the total number of images to be detected, and i and n are positive integers.

[0114] The trajectory generation unit is used to generate the motion trajectory of each target object by utilizing the positions of each matching target pair, the first position of each unmatched target, and the second position of each unmatched target in multiple updated tracking results.

[0115] The working process, working details and technical effects of the device provided in this embodiment can be found in the first aspect of the embodiment, and will not be repeated here.

[0116] like Figure 6 As shown, the third aspect of this embodiment provides another image-based object tracking device. Taking the device as an electronic device as an example, it includes: a memory, a processor, and a transceiver that are connected in sequence. The memory is used to store a computer program, the transceiver is used to send and receive messages, and the processor is used to read the computer program and execute the image-based object tracking method as described in the first aspect of the embodiment.

[0117] For specific examples, the memory may include, but is not limited to, random access memory (RAM), read-only memory (ROM), flash memory, first-in-first-out (FIFO) memory, and / or first-in-last-out (FILO) memory, etc.; specifically, the processor may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor may be implemented using at least one hardware form of DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), PLA (Programmable Logic Array). The processor may also include a main processor and a coprocessor. The main processor, also known as the CPU (Central Processing Unit), is used to process data in the wake-up state; the coprocessor is a low-power processor used to process data in the standby state.

[0118] In some embodiments, the processor may integrate a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the screen. For example, the processor may not be limited to microprocessors of the STM32F105 series, reduced instruction set computer (RISC) microprocessors, x86 architecture processors, or processors with integrated neural network processing units (NPUs). The transceiver may be, but is not limited to, a Wi-Fi transceiver, a Bluetooth transceiver, a General Packet Radio Service (GPRS) transceiver, a ZigBee (a low-power LAN protocol based on the IEEE 802.15.4 standard) transceiver, a 3G transceiver, a 4G transceiver, and / or a 5G transceiver. Furthermore, the device may also include, but is not limited to, a power module, a display screen, and other necessary components.

[0119] The working process, working details and technical effects of the electronic device provided in this embodiment can be found in the first aspect of the embodiment, and will not be repeated here.

[0120] The fourth aspect of this embodiment provides a storage medium for storing instructions containing the image-based object tracking method described in the first aspect of the embodiment. That is, the storage medium stores instructions that, when executed on a computer, perform the image-based object tracking method as described in the first aspect.

[0121] The storage medium refers to a carrier for storing data, which may include, but is not limited to, floppy disks, optical disks, hard disks, flash memory, USB flash drives, and / or memory sticks. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices.

[0122] The working process, working details and technical effects of the storage medium provided in this embodiment can be found in the first aspect of the embodiment, and will not be repeated here.

[0123] The fifth aspect of this embodiment provides a computer program product containing instructions that, when executed on a computer, cause the computer to perform the image-based object tracking method as described in the first aspect of the embodiment, wherein the computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device.

[0124] Finally, it should be noted that the above description is merely a preferred embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. An image-based object tracking method, characterized in that, include: Multiple images to be detected are acquired at preset intervals, and target detection is performed on each image to obtain the image region where each target object is located in each image. For any image region of each target object in any image to be detected, the image region of each target object in any image to be detected is segmented to obtain multiple segmented images. Each segmented image contains only one target object, and the outline of the target object in any segmented image is used as the boundary of that segmented image. The detection target class of any image to be detected is formed by using the multiple segmented images, and the detection target class of each image to be detected is obtained after the image regions of each target object in all images to be detected are segmented. Based on the target class detected in the i-th image and the target class detected in the (i+1)-th image, the Deepsort tracking algorithm is used to track each target object in the i-th image to obtain the tracking result. The tracking result includes the position of the matching target pair and / or the first position of the unmatched target. The matching target pair is the target object that belongs to the same object in the i-th image and the (i+1)-th image. The unmatched target is the target object that is in the i-th image and has not been successfully matched with any target object in the (i+1)-th image. If there is an unmatched target in the tracking result, it is determined whether the unmatched target is occluded in the (i+1)th image to be detected; If so, then based on the first position of the unmatched target, predict the second position of the unmatched target in the (i+1)th image to be detected; The unmatched target is added to the second position in the (i+1)th image to be detected to obtain the updated tracking result, and the updated tracking result is output. The target class of the (i+1)th image to be detected is updated using the updated tracking result, so that the updated target class is used as the target class of the (i+1)th image to be detected. Increment i by 1 to re-detect the target class of the i-th image to be detected and the target class of the (i+1)-th image to be detected, and use the Deepsort tracking algorithm to track each target object in the i-th image to be detected until i is greater than n-1, at which point target tracking stops, so as to obtain multiple updated tracking results, where i starts from 1, n is the total number of images to be detected, and i and n are positive integers; Using the positions of each matching target pair, the first position of each unmatched target, and the second position of each unmatched target in multiple updated tracking results, the motion trajectory of each target object is generated. Determining whether the unmatched target is occluded in the (i+1)th image to be detected includes: Obtain the position of the unmatched target in each target image, wherein each target image is the image to be detected that is located before the (i+1)th image to be detected among all images to be detected; Based on the position of the unmatched target in each target image, the initial motion trajectory of the unmatched target before the target time is determined, wherein the target time is the acquisition time corresponding to the (i+1)th image to be detected; Based on the initial motion trajectory of the unmatched target, the motion direction of the unmatched target is determined according to the initial motion trajectory; based on the motion direction of the unmatched target, the boundary line intersecting the initial motion trajectory in the motion direction of the image boundary of any image to be detected is determined as the calibration boundary; based on the calibration boundary and the initial motion trajectory, the coordinates of the intersection point between the calibration boundary and the initial motion trajectory are obtained; based on the first position of the unmatched target and the coordinates of the intersection point, the distance between the unmatched target and the image boundary of any image to be detected is calculated; Determine whether the distance between the unmatched target and the image boundary of any image to be detected is greater than 0; If so, it is determined that the unmatched target is occluded in the (i+1)th image to be detected.

2. The method according to claim 1, characterized in that, When i is 1, determining whether the unmatched target is occluded in the (i+1)th image to be detected includes: Calculate the vertical distance between the first position of the unmatched target and each image boundary of any image to be detected; Determine if the minimum vertical distance among all vertical distances is greater than 0; If so, it is determined that the unmatched target is occluded in the (i+1)th image to be detected.

3. The method according to claim 1, characterized in that, After segmenting the image regions of each target object in any of the images to be detected to obtain multiple segmented images, the method further includes: According to the preset size, each segmented image in the multiple segmented images is filled to obtain multiple filled images; The detection target class of any image to be detected is composed of multiple filled images.

4. The method according to claim 1, characterized in that, The position of the matching target pair in any updated tracking result includes: the coordinates of the center point of the detection box of the target object corresponding to the matching target pair in the i-th image to be detected, and the coordinates of the center point of the detection box of the target object corresponding to the matching target pair in the (i+1)-th image to be detected; Specifically, by utilizing the positions of each matching target pair, the first position of each unmatched target, and the second position of each unmatched target from multiple updated tracking results, the motion trajectory of each target object is generated, including: By using the positions of each matching target pair in multiple updated tracking results, the center point of the detection box of the target object corresponding to each matching target pair in each image to be detected is determined. By using the first and second positions of each unmatched target in multiple updated tracking results, the center point of the detection box of the target object corresponding to each unmatched target in each image to be detected is determined. For the first tracking object, following the target tracking order, the center points of the detection boxes of the first tracking object in each image to be detected are connected to obtain the motion trajectory of the first tracking object; wherein, the first tracking object is the target object corresponding to any matching target pair; and For the second tracking object, in accordance with the target tracking order, the center points of the detection boxes of the second tracking object in each image to be detected are connected to obtain the motion trajectory of the second tracking object after the connection; wherein, the second tracking object is the target object corresponding to any unmatched target.

5. The method according to claim 1, characterized in that, Predicting the second position of the unmatched target in the (i+1)th image to be detected based on the first position of the unmatched target includes: using a Kalman filter algorithm to predict the second position of the unmatched target in the (i+1)th image to be detected based on the first position of the unmatched target.

6. An image-based object tracking device, characterized in that, include: The target detection unit is used to acquire multiple images to be detected at preset intervals, and to perform target detection on each image to obtain the image region where each target object is located in each image. The image segmentation unit is used to segment the image regions of each target object in any image to be detected, and obtain multiple segmented images. Each segmented image contains only one target object, and the outline of the target object in any segmented image is used as the boundary of the segmented image. The target tracking unit is used to form a detection target class for any image to be detected using the multiple segmented images, and to obtain the detection target class for each image to be detected after the image regions of each target object in all images to be detected are segmented. The target tracking unit is used to detect target classes in the i-th image to be detected and the (i+1)-th image to be detected, and to track each target object in the i-th image to be detected using the Deepsort tracking algorithm to obtain tracking results. The tracking results include the positions of matching target pairs and / or the first positions of unmatched targets. The matching target pairs are target objects belonging to the same object in the i-th image to be detected and the (i+1)-th image to be detected. The unmatched targets are target objects in the i-th image to be detected that have not been successfully matched with any target object in the (i+1)-th image to be detected. A target tracking unit is configured to determine whether an unmatched target is occluded in the (i+1)th image to be detected when an unmatched target is found in the tracking result. This includes: obtaining the position of the unmatched target in each target image, wherein each target image is an image to be detected preceding the (i+1)th image to be detected; determining the initial motion trajectory of the unmatched target before a target time based on its position in each target image, wherein the target time is the acquisition time corresponding to the (i+1)th image to be detected; and determining the initial motion trajectory of the unmatched target based on the initial motion trajectory. The motion direction of the unmatched target is determined; based on the motion direction of the unmatched target, the boundary line intersecting the initial motion trajectory in the motion direction of the image boundary of any image to be detected is determined as the calibration boundary; based on the calibration boundary and the initial motion trajectory, the coordinates of the intersection point between the calibration boundary and the initial motion trajectory are obtained; based on the first position of the unmatched target and the coordinates of the intersection point, the distance between the unmatched target and the image boundary of any image to be detected is calculated; it is determined whether the distance between the unmatched target and the image boundary of any image to be detected is greater than 0; if so, it is determined that the unmatched target is occluded in the (i+1)th image to be detected. The target tracking unit is used to predict the second position of the unmatched target in the (i+1)th image to be detected based on the first position of the unmatched target when it is determined that the unmatched target is occluded in the (i+1)th image to be detected. The target tracking unit is used to add the second position of the unmatched target in the (i+1)th image to be detected to the tracking result, obtain the updated tracking result, and output the updated tracking result, and use the updated tracking result to update the detection target class of the (i+1)th image to be detected, so as to use the updated detection target class as the detection target class of the (i+1)th image to be detected. The target tracking unit increments i by 1 to re-track the target objects in the i-th image to be detected and the target objects in the (i+1)-th image to be detected, and uses the Deepsort tracking algorithm to track each target object in the i-th image to be detected until i is greater than n-1, at which point the target tracking stops, so as to obtain multiple updated tracking results. Here, i starts from 1, n is the total number of images to be detected, and i and n are positive integers. The trajectory generation unit is used to generate the motion trajectory of each target object by utilizing the positions of each matching target pair, the first position of each unmatched target, and the second position of each unmatched target in multiple updated tracking results.

7. An electronic device, characterized in that, include: A memory, a processor, and a transceiver are sequentially connected in communication, wherein the memory is used to store a computer program, the transceiver is used to send and receive messages, and the processor is used to read the computer program and execute the image-based object tracking method as described in any one of claims 1 to 5.

8. A storage medium, characterized in that, The storage medium stores instructions that, when executed on a computer, perform the image-based object tracking method as described in any one of claims 1 to 5.

Citation Information

Patent Citations

  • Method and device for multi-target tracking, storage medium and electronic equipment

    CN114299115A

  • Cross-border specific pedestrian tracking method and device

    CN114639117A

  • Object tracking apparatus and object tracking method

    JP2010102586A