Image processing method and device, electronic equipment and computer readable storage medium

By calculating the intersection-union ratio and combining historical matching results, the problem of low accuracy in multi-target association is solved, realizing an image processing method that can correctly identify association relationships in complex scenes, and improving robustness and accuracy.

CN114299315BActive Publication Date: 2026-01-13SHANGHAI SENSETIME INTELLIGENT TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202111614453.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-27
Publication Date
2026-01-13
Estimated Expiration
2041-12-27

AI Technical Summary

Technical Problem

Existing technologies have low accuracy in multi-target association, especially after deep learning and neural networks output detection and tracking results. They only associate two types of targets in a single frame, which limits their application scenarios and reduces their practicality.

Method used

The association relationship is determined by calculating the intersection-over-union (IoU) ratio of the target objects, and the association relationship of multiple target objects is judged by combining historical matching results and the IoU threshold of the current image, using the number of associations and similarity to improve accuracy.

Benefits of technology

It improves the accuracy of multi-target association, ensures the correct identification of association relationships in complex scenes, and enhances the robustness and accuracy of image processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114299315B_ABST
    Figure CN114299315B_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide an image processing method and device, electronic equipment and computer readable storage medium, wherein the method comprises: obtaining a historical matching result of a first target object and a first image, the first image comprising the first target object; in the case that the historical matching result comprises at least one second target object having an association relationship with the first target object, and there is a third target object in the at least one second target object, determining that there is an association relationship between the first target object and any one of the at least one third target object; the third target object is a target object in the first image, and the intersection over union between the third target object and the first target object is greater than or equal to a first threshold value.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer vision technology, and in particular to an image processing method and apparatus, an electronic device, and a computer-readable storage medium. Background Technology

[0002] Multi-target association plays a crucial role in target detection and tracking. For example, when detecting and tracking human bodies, electric vehicles, and faces, multi-target matching can map these three detected targets as a whole.

[0003] Multi-target association is a crucial step after deep learning and neural networks output detection and tracking results. However, current methods primarily focus on associating two types of targets within a single frame when detection and tracking are inaccurate, significantly limiting their application scenarios and practicality. Summary of the Invention

[0004] This application provides an image processing method and apparatus, an electronic device, and a computer-readable storage medium.

[0005] This application provides an image processing method, the method comprising:

[0006] Obtain historical matching results of the first target object and a first image, wherein the first image includes the first target object;

[0007] If the historical matching results include at least one second target object that is associated with the first target object, and a third target object exists among the at least one second target object, the association between the first target object and the third target object is determined; wherein the third target object is a target object in the first image, and the intersection-union ratio between the third target object and the first target object is greater than or equal to a first threshold.

[0008] In any embodiment of this application, the historical matching result further includes a first association count between any of the third target objects and the first target object, and determining the association between the first target object and the third target object includes:

[0009] When there are at least two third target objects, determine the association relationship between the target object with the most first association times among the at least two third target objects and the first target object.

[0010] In conjunction with any embodiment of this application, the method further includes:

[0011] If the historical matching results include at least one second target object that is associated with the first target object, and a fourth target object exists among the at least one second target object, then a fifth target object is determined to be associated with the first target object; wherein the fifth target object is the target object in the first image with the largest intersection-over-union ratio (IoU) with the first target object; the fourth target object is a target object in the first image, and the IoU between the fourth target object and the first target object is less than the first threshold.

[0012] In conjunction with any embodiment of this application, the method further includes:

[0013] If the historical matching results include at least one second target object that is associated with the first target object, and the first image does not include the second target object, then the association between the fifth target object and the first target object is determined.

[0014] In conjunction with any embodiment of this application, the method further includes:

[0015] If the historical matching results do not include target objects that are associated with the first target object, it is determined that there is an association between the fifth target object and the first target object.

[0016] In any embodiment of this application, the historical matching result further includes a second number of associations between the second target object and the first target object, and a total number of times the first target object has been associated; wherein the ratio between the second number of associations and the total number of associations is greater than or equal to a second threshold.

[0017] In any embodiment of this application, when the historical matching results include at least one second target object that has an association with the first target object, and when the number of second target objects is at least two, the at least one second target object includes a sixth target object and a seventh target object; the method further includes:

[0018] Calculate the similarity between the sixth target object and the seventh target object;

[0019] If the similarity is greater than or equal to the third threshold, the sixth target object and the seventh target object are determined to be the same target object.

[0020] In any embodiment of this application, obtaining the historical matching results and the first image includes:

[0021] Obtain the first video to be processed;

[0022] The historical matching result is obtained by processing at least one second image in the first video to be processed; the second image includes the first target object;

[0023] The first image is the image in the first video to be processed whose acquisition time is after the latest acquisition time of the at least one second image.

[0024] This application embodiment also provides an image processing apparatus, the apparatus comprising:

[0025] An acquisition unit is used to acquire historical matching results of a first target object and a first image, wherein the first image includes the first target object;

[0026] The determining unit is configured to determine the association between the first target object and the third target object when the historical matching results include at least one second target object that has an association with the first target object, and a third target object exists among the at least one second target object; wherein the third target object is a target object in the first image, and the intersection-union ratio between the third target object and the first target object is greater than or equal to a first threshold.

[0027] In any embodiment of this application, the historical matching result further includes a first association count between any of the third target objects and the first target object, and the determining unit is further configured to:

[0028] When there are at least two third target objects, determine the association relationship between the target object with the most first association times among the at least two third target objects and the first target object.

[0029] In conjunction with any embodiment of this application, the determining unit is further configured to:

[0030] If the historical matching results include at least one second target object that is associated with the first target object, and a fourth target object exists among the at least one second target object, then a fifth target object is determined to be associated with the first target object; wherein the fifth target object is the target object in the first image with the largest intersection-over-union ratio (IoU) with the first target object; the fourth target object is a target object in the first image, and the IoU between the fourth target object and the first target object is less than the first threshold.

[0031] In conjunction with any embodiment of this application, the determining unit is further configured to:

[0032] If the historical matching results include at least one second target object that is associated with the first target object, and the first image does not include the second target object, then the association between the fifth target object and the first target object is determined.

[0033] In conjunction with any embodiment of this application, the determining unit is further configured to:

[0034] If the historical matching results do not include target objects that are associated with the first target object, it is determined that there is an association between the fifth target object and the first target object.

[0035] In any embodiment of this application, the historical matching result further includes a second number of associations between the second target object and the first target object, and a total number of times the first target object has been associated; wherein the ratio between the second number of associations and the total number of associations is greater than or equal to a second threshold.

[0036] In any embodiment of this application, when the historical matching results include at least one second target object that is associated with the first target object, and when the number of second target objects is at least two, the at least one second target object includes a sixth target object and a seventh target object; the device further includes a calculation unit for calculating the similarity between the sixth target object and the seventh target object;

[0037] The determining unit is further configured to determine that the sixth target object and the seventh target object are the same target object if the similarity is greater than or equal to the third threshold.

[0038] In any embodiment of this application, the acquisition unit is further configured to acquire a first video to be processed;

[0039] The device further includes a processing unit for processing at least one second image in the first video to be processed to obtain the historical matching result; the second image includes the first target object;

[0040] The determining unit is further configured to use an image in the first video to be processed whose acquisition time is after the latest acquisition time of the at least one second image as the first image.

[0041] This application also discloses an electronic device, including a processor and a memory, wherein the memory stores a computer program, and the processor calls the computer program stored in the memory to perform the image processing method described above or any embodiment of the image processing method.

[0042] This application also provides another electronic device, including: a processor, a transmitting device, an input device, an output device, and a memory, wherein the memory is used to store computer program code, the computer program code including computer instructions, and when the processor executes the computer instructions, the electronic device performs the above-described image processing method or any embodiment of the image processing method.

[0043] This application also provides a computer-readable storage medium storing a computer program that, when run on one or more processors, causes the image processing method described above or any embodiment of the image processing method to be executed.

[0044] This application also provides a computer program product, which includes program instructions that, when executed by a processor, cause the processor to perform the image processing method described above or any of the embodiments of the image processing method.

[0045] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this application. Attached Figure Description

[0046] To more clearly illustrate the technical solutions in the embodiments of this application or the background art, the accompanying drawings used in the embodiments of this application or the background art will be briefly introduced below.

[0047] Figure 1 This is a schematic diagram illustrating the calculation of the intersection-union ratio provided in an embodiment of this application;

[0048] Figure 2 This is a schematic flowchart of an image processing method provided in an embodiment of this application;

[0049] Figure 3 This is a schematic flowchart of another image processing method provided in the embodiments of this application;

[0050] Figure 4 This is a schematic diagram of the structure of an image processing apparatus provided in an embodiment of this application;

[0051] Figure 5 This is a schematic diagram of the hardware structure of an image processing device provided in an embodiment of this application. Detailed Implementation

[0052] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of the present application.

[0053] The terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish different objects, not to describe a specific order. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or apparatus that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products, or apparatuses.

[0054] It should be understood that in this application, "at least one (item)" refers to one or more, "more than one" refers to two or more, "at least two (items)" refers to two or three or more, and "and / or" is used to describe the relationship between related objects, indicating that there can be three relationships. For example, "A and / or B" can indicate three cases: only A exists, only B exists, and both A and B exist simultaneously, where A and B can be singular or plural. The character " / " can indicate that the related objects before and after are in an "or" relationship, referring to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, or c can be: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, and c can be single or multiple. The character " / " can also represent the division sign in mathematical operations, for example, a / b = a divided by b; 6 / 3 = 2. "At least one of the following" or similar expressions.

[0055] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.

[0056] With the continuous development of computer science and technology, object detection and object tracking technologies have become increasingly mature. In this embodiment, object detection can be understood as a technique for detecting objects from a frame of an image. It should be understood that object detection technology can determine the category of the detected object and the position of the object in the frame of the image. For example, object detection technology can determine that the category of the detected object is an animal, and further, it can determine that the object is a cat, dog, bird, etc.

[0057] In this embodiment, target tracking can be understood as a technique of associating the same target in two adjacent frames and assigning it a unique identifier (trackID). For example, if the target detection algorithm detects M targets in frame T and N targets in frame T+1, the target tracking algorithm needs to associate the M targets and the N targets and assign them a unique identifier (trackID).

[0058] It should be understood that after the object detection algorithm detects the target and the object tracking algorithm assigns the same trackID to the same target in different frames, it is often necessary to determine which targets are related. In other words, determining which targets are related is a very important step after the deep learning and neural network models output the detection and tracking results.

[0059] In this embodiment, the association relationship can be understood as a control and being controlled relationship. For example, if the target is a person, in a scenario where a person is riding a bicycle or pushing a bicycle, there may be an association relationship between the bicycle and the person; in a scenario where a person is carrying a pet, there may be an association relationship between the pet and the person; in a scenario where a person is pushing a shopping cart, there may be an association relationship between the shopping cart or the items in the shopping cart and the person, and so on. This association relationship can also be understood as a physical contact relationship between people. For example, in a shopping mall or pedestrian street, two people who have physical contact in the form of holding hands, linking arms, or putting their arms around each other can be target objects with an association relationship.

[0060] In some embodiments, two types of target objects can be associated using the intersection over union (IoU) method. It should be understood that each target object detected by the object detection technique can correspond to a detection box. For a detection box detected in a frame of an image, the IoU between that detection box and detection boxes of other different categories can be calculated to determine the detection boxes with which it is associated, thereby identifying another target object with which it is associated. In some embodiments, after determining that there is an association between two target objects, the association between the two target objects can be represented using a binary mapping table. For example, [human A, vehicle B] indicates that there is an association between human A and vehicle B. It should be understood that if it is determined that there is an association between three target objects, the association between the three target objects can be represented using a ternary mapping table. For example, [human A, vehicle B, face C] indicates that there is an association between human A, vehicle B, and face C, and other cases can be deduced similarly.

[0061] The intersection-union ratio (IUR) is a concept derived from sets in mathematics, used to describe the relationship between set A and set B. The IUR equals the number of elements in the intersection of the two sets divided by the number of elements in their union. Using this concept to describe the overlap between two bounding boxes, for example, two bounding boxes can be viewed as sets of two elements, and their IUR equals the area of ​​the overlapping portion of the two boxes divided by the area of ​​their combined portion.

[0062] For example, please refer to Figure 1 , Figure 1 This is a schematic diagram illustrating the calculation of the intersection-union ratio (IUR) provided in an embodiment of this application. For example... Figure 1 As shown, part 101 can be understood as one detection box, and part 102 as another. Taking the intersection of detection boxes 101 and 102 yields part 103, which can be called intersection 103; taking the union of detection boxes 101 and 102 yields part 104, which can be called union 104. Dividing the area of ​​intersection 103 by the area of ​​union 104 gives the intersection-union ratio (IUR). It should be understood that the IUR can be calculated simply by obtaining the areas of the two regions and their intersection area. Specifically, the numerator of the IUR equals the intersection area, and the denominator equals the total area of ​​the two regions minus the intersection area.

[0063] It should be understood that in determining whether there is a relationship between target objects, a larger calculated IoU indicates a larger area of ​​intersection of the two target objects compared to the union of their areas, which largely suggests a relationship between them. However, in reality, a large IoU between two target objects does not necessarily mean they are related. For example, in the typical scenario of person A pushing vehicle B on the street, the person may pass by vehicle C parked on the side of the road at certain times. In this case, due to misalignment, the IoU between person A and vehicle C in the image may be greater than the IoU between person A and vehicle B. If we still rely on IoU, we would conclude that person A and vehicle C are related, but this result is clearly incorrect. Therefore, determining the relationship between target objects based on the IoU between them has low accuracy.

[0064] To address the above problems, this application provides an image processing method and related apparatus. Through some embodiments of this application, the accuracy of identifying target objects with associated relationships can be improved. The image processing method provided in this application can be executed by an image processing apparatus, which can be any electronic device capable of executing the technical solutions disclosed in the method embodiments of this application. For example, the image processing apparatus can be a mobile phone, computer, tablet computer, or wearable smart device, etc.

[0065] It should be understood that the method embodiments provided in this application can also be implemented by a processor executing computer program code. The embodiments of this application are described below with reference to the accompanying drawings. Please refer to... Figure 2 , Figure 2 This is a flowchart illustrating an image processing method provided in an embodiment of this application.

[0066] 201. Obtain the historical matching results of the first target object and the first image, wherein the first image includes the first target object.

[0067] In this embodiment, the first image can be an image from an online video, an image from an offline video, or an image from one or more images. For example, if the first image is an image from an online video, it can be an image from the online video corresponding to the current moment or an image captured before the current moment.

[0068] It should be understood that online video can be video captured in real time by a camera. Offline video, one or more images, can be stored locally on the image processing device or on other electronic devices.

[0069] In one implementation of acquiring the first image, the image processing device may receive a video input by a user through an input device and use one image from the video as the first image. Alternatively, the image processing device may receive one or more images input by a user through an input device and use one of the one or more images as the first image. The input device may include a keyboard, mouse, touchscreen, touchpad, and audio input device.

[0070] In another implementation of acquiring the first image, the image processing device receives a video sent by an electronic device and uses one image from the video as the first image. Alternatively, the image processing device receives one or more images sent by the electronic device and uses one of those images as the first image. The aforementioned electronic device can be any of the following: a mobile phone, a computer, a tablet computer, or a server.

[0071] In this embodiment of the application, the first image includes the first target object. It should be understood that this application does not limit the category of the first target object, and the first target object can be determined according to different scenarios and needs. For example, the first target object can be a person, bicycle, electric vehicle, skateboard, etc.

[0072] In one implementation of determining the first target object, the image processing device may receive a target object input by a user through an input device, or the image processing device may receive a target object sent by an electronic device as the first target object.

[0073] In another implementation of determining the first target object, where the first image has already been processed by a target object detection algorithm and a target object tracking algorithm, the image processing device can receive a category input by the user through an input device, or the image processing device can receive a category sent by an electronic device, and use a target object in the first image belonging to that category as the first target object. For example, if the category can be input as "car" through an input device, and the first image contains three cars with trackIDs of 2, 5, and 8, the image processing device can use the car with trackID 2 as the first target object, or the car with trackID 5 as the first target object, or the car with trackID 8 as the first target object.

[0074] In this embodiment of the application, the historical matching result of the first target object can be understood as a target object that has an association with the first target object by processing at least one image whose acquisition time is before the first image.

[0075] In one implementation of obtaining historical matching results of the first target object, the image processing device may receive historical matching results of the first target object input by a user through an input device, or the image processing device may receive historical matching results of the first target object sent by an electronic device.

[0076] In another implementation of obtaining the historical matching results of the first target object, the image processing device can process the acquired online video, or offline video, or at least one image whose acquisition time is before the first image to obtain the historical matching results of the first target object.

[0077] For example, the historical matching results can be stored in the form of a mapping table. For instance, the trackID corresponding to the first target object is 2, and the first target object has been matched with target object 5, target object 8, and target object 12. Among them, the trackID of target object 5 is 5, the trackID of target object 8 is 8, and the trackID of target object 12 is 12. In some implementations, the historical matching results can be stored as [1,5], [1,8], [1,12]; or, they can also be stored as [1,5,8,12]. This application does not limit this.

[0078] It should be understood that, in the embodiments of this application, obtaining the historical matching results of the first target object and obtaining the first image can be performed separately or simultaneously.

[0079] 202. If the historical matching result includes at least one second target object that has an association with the first target object, and there is a third target object among the at least one second target object, determine the association between the first target object and the third target object; wherein the third target object is a target object in the first image, and the cross-over ratio between the third target object and the first target object is greater than or equal to a first threshold.

[0080] It should be understood that in the embodiments of this application, the target object (e.g., the first target object and the second target object) can be determined according to the actual situation, and this application does not limit the category of the target object. For example, if the first target object is a person, the second target object can be a bicycle, in which case it is necessary to determine the relationship between the person and the bicycle; or, the second target object can be a skateboard, in which case it is necessary to determine the relationship between the person and the skateboard; or, the second target object can be a pet, in which case it is necessary to determine the relationship between the person and the pet.

[0081] The historical matching results include at least one second target object that is associated with the first target object. This can be understood as the first target object already having an association with at least one second target object in the historical matching results. In some implementations, the image processing device can retrieve the historical matching results to determine the second target object. For example, as in the example in step 201, if the trackID of the first target object is 1 and the historical matching results are stored as [1,5], [1,8], and [1,12], the image processing device can determine [1,5], [1,8], and [1,12] by retrieving mapping relationships containing 1, thereby determining that the first target object already has mapping relationships with three target objects, and the trackIDs of the three target objects are 5, 8, and 12, respectively.

[0082] The third target object is a target object in the first image whose intersection-over-union (IoU) ratio with the first target object is greater than a first threshold. This can be understood as the third target object belonging to at least one second target object, appearing in the first image, and having an IoU ratio greater than or equal to the first threshold. The first threshold can be determined based on actual conditions; for example, it can be 0.3, 0.4, or 0.5, and this application does not limit its application to this value.

[0083] In one implementation, the image processing device may first determine the second target object through the historical matching result, and then compare it with the target objects existing in the first image to determine the target object belonging to the first image among the at least one second target object.

[0084] In another implementation, the image processing device may first determine the target object present in the first image, and then determine the target object belonging to the first image from the at least one second target object in the historical matching result.

[0085] Subsequently, the image processing device calculates the intersection-over-union ratio (IoU) between the target object belonging to the first image among the at least one second target object and the first target object. It should be understood that the calculation of the IoU between two target objects has already been explained in the background section above and will not be repeated here.

[0086] For ease of understanding, taking the first threshold of 0.3, the trackID of the first target object as 1, and the first target object having associations with target objects with trackIDs of 5, 8, and 12 respectively as an example, firstly, the image processing device determines that the first target object has associations with target object 5 (trackID 5 can be called target object 5, and so on), target object 8, and target object 12, and determines that the first image includes the first target object, target object 5, and target object 12; then, the image processing device calculates the intersection-over-union ratio A between the first target object and target object 5 as 0.45, and calculates the intersection-over-union ratio B between the first target object and target object 12 as 0.8; finally, since both intersection-over-union ratio A and intersection-over-union ratio B are greater than the first threshold, target object 5 and target object 12 can both be understood as the third target object.

[0087] After identifying the third target object, the image processing device determines the association between the first target object and the third target object. This can be understood as the image processing device determining that an association exists between the first target object and the third target object. For example, after determining that both target object 5 and target object 12 belong to the third target object, for the first image, the image processing device determines that there is an association between the first target object and target object 5, and an association between the first target object and target object 12. Optionally, the image processing device can also determine that the first target object has associations with both target object 5 and target object 12.

[0088] In this embodiment, when the image processing device determines a third target object in the first image that is associated with the first target object, the third target object not only belongs to at least one second target object, but also has an intersection-union ratio (IUU) with the first target object that is greater than a first threshold. Since the association between the same target object in different images is not sudden, the accuracy is higher when the target object associated with the first target object is determined by taking into account both historical matching results and the actual IUU results in the first image.

[0089] It should be understood that during the execution of step 202 by the image processing device, the number of third target objects may be multiple. For example, in the example in step 202, both target object 5 and target object 12 can be understood as third target objects.

[0090] As an optional implementation, the historical matching result also includes the first association count between any third target object and the first target object. During step 202, the image processing device performs the following steps:

[0091] 1. When there are at least two third target objects, determine the association relationship between the first target object with the most first associations among the at least two third target objects and the first target object.

[0092] In this embodiment, it should be understood that the third target object belongs to at least one of the above-mentioned second target objects, that is, the third target object has established an association relationship with the first target object at least once, and the historical matching results of the first target object also include the number of times that any third target object has established an association relationship with the first target object, that is, the first association count.

[0093] For example, the historical matching results may include the first association count, or they may include indication information indicating the first association count. For instance, [1,5,512] in the mapping table indicates that target object 1 and target object 5 have established an association 512 times.

[0094] In this embodiment, if two or more third target objects belong to the first image among the at least two second target objects, and the cross-union ratio between them and the first target object is greater than or equal to the first threshold, the image processing device determines that there is an association relationship between the target object with the most first association times among the at least two third target objects and the first target object.

[0095] For ease of understanding, let's take step 202 as an example where the first target object has associations with target objects with trackIDs 5, 8, and 12, and target objects 5 and 12 both belong to the third target object. For instance, the first association count between the first target object and target object 5 is 512, and the first association count between the first target object and target object 12 is 56. Therefore, the image processing device determines that there is an association between the first target object and target object 5.

[0096] In this embodiment, when the image processing device determines a target object that has a relationship with the first target object, in addition to taking into account the historical matching results and the actual cross-union ratio results in the first image, it also considers the first association number of times the third target object has established a relationship with the first target object in history, thereby further improving the accuracy.

[0097] As an optional implementation, the image processing apparatus further performs the following steps:

[0098] 2. If the historical matching result includes at least one second target object that is associated with the first target object, and there is a fourth target object among the at least one second target object, then it is determined that there is an association between the fifth target object and the first target object; wherein the fifth target object is the target object in the first image with the largest intersection-union ratio (IUU) with the first target object; the fourth target object is a target object in the first image, and the IUU between the fourth target object and the first target object is less than the first threshold.

[0099] In this embodiment, after the image processing device obtains the historical matching results of the first target object and the first image, the image processing device determines that the historical matching results include at least one second target object that has an association with the first target object. For a description of the above part, please refer to step 202, which will not be repeated here.

[0100] The fourth target object is a target object in the first image, and the cross-over ratio between the fourth target object and the first target object is less than the first threshold. This can be understood as the fourth target object belonging to the at least one second target object, and the fourth target object appearing in the first image, and the cross-over ratio between the fourth target object and the first target object in the first image being less than the first threshold.

[0101] In the above situation, it is determined that there is a correlation between the fifth target object and the first target object. In this embodiment, the fifth target object is the target object in the first image with the largest intersection-over-union ratio (IoU) with the first target object. For example, the image processing device can first determine the target objects present in the first image, and then calculate the IoU between each of the other target objects and the first target object to determine the fifth target object.

[0102] For example, taking a first threshold of 0.3 as an example, the first target object is associated with target objects with trackIDs 6, 9, and 13, respectively. First, the image processing device determines that the first target object is associated with target objects 6, 9, and 13, and determines that the first image includes the first target object, target object 6, and target object 9; that is, the fourth target object can be target object 6 or target object 9. Then, the image processing device calculates the intersection-over-union ratio (C) between the first target object and target object 6 as 0.15 and the intersection-over-union ratio (D) between the first target object and target object 9 as 0.2. Finally, both the intersection-over-union ratios C and D are less than the first threshold of 0.3, meaning the intersection-over-union ratio between the fourth target object and the first target object is less than the first threshold. In this case, the image processing device determines the fifth target object and determines that the first target object is associated with the fifth target object.

[0103] It should be understood that, in this embodiment, although the fourth target object exists in the first image, the cross-over ratio (CUP) between the fourth target object and the first target object is less than the first threshold. Therefore, the historical matching results are considered to have little reference value, and the target object that has an association with the first target object should be determined by the actual CUP in the first image.

[0104] In this embodiment, when the image processing device determines a target object that is associated with the first target object, it first determines that the at least one second target object belongs to the fourth target object of the first image, and then determines that the intersection-union ratio between the fourth target object and the first image is less than the first threshold before determining the target object in the first image that has an intersection-union ratio with the first target object as a target object that is associated with it. Compared with directly determining that the fifth target object is associated with the first target object, the accuracy can be improved.

[0105] As an optional implementation, the image processing apparatus further performs the following steps:

[0106] 3. If the historical matching result includes at least one second target object that is associated with the first target object, and the first image does not include the second target object, then it is determined that the fifth target object is associated with the first target object.

[0107] In this embodiment, after the image processing device obtains the historical matching results of the first target object and the first image, the image processing device determines that the historical matching results include at least one second target object that has an association with the first target object. For a description of the above part, please refer to step 202, which will not be repeated here.

[0108] In this embodiment, the image processing device determines that the second target object is not included in the first image, which can be understood as the second target object not appearing in the first image. In one implementation, the image processing device can determine the at least one second target object and the target object actually existing in the first image, take the intersection of the two, and if the intersection is empty, it can be considered that the second target object is not included in the first image.

[0109] It should be understood that in this embodiment, the first image does not include the second target object, that is, the first image does not contain any historical matching results of the first target object. Therefore, the target object that has an association with the first target object should be determined by the actual crossover ratio in the first image.

[0110] In this embodiment, when the image processing device determines a target object that is associated with the first target object, it first determines the at least one second target object in the historical matching results, and then determines that the first image does not include the second target object, that is, the second target object does not appear in the first image. Only then does it determine the target object in the first image that has an intersection-union ratio with the first target object as the target object that is associated with it. Compared with directly determining that the fifth target object is associated with the first target object, the accuracy can be improved.

[0111] As an optional implementation, the image processing apparatus further performs the following steps:

[0112] 4. If the historical matching results do not include target objects that are related to the first target object, it is determined that there is a relationship between the fifth target object and the first target object.

[0113] In this embodiment, the historical matching results do not include target objects that are associated with the first target object. This can be understood as the first target object not having established any association with other target objects historically. It should be understood that if the first image is the first image in which the first target object appears, the historical matching results may not include target objects that are associated with the first target object; or, if the first target object appeared in a previous image but exhibited a skipped trackID in that first image, the historical matching results may not include target objects that are associated with the first target object.

[0114] In this embodiment, when the image processing device determines a target object that is associated with the first target object, it first needs to determine the historical matching results of the first target object, and then determine that the historical matching results do not include target objects that are associated with the first target object. Only then will the target object in the first image that has an intersection-union ratio with the first target object be determined as the target object that is associated with it. Compared with directly determining that there is an association between the fifth target object and the first target object, the accuracy can be improved.

[0115] It should be understood that step 4 above can also be related to the preceding text. Figure 2 The corresponding embodiments, or combinations thereof with step 1 above.

[0116] As an optional implementation, the historical matching result also includes a second association count between the second target object and the first target object, and a total number of times the first target object has been associated; wherein the ratio between the second association count and the total number of times is greater than or equal to a second threshold.

[0117] In this embodiment, the second association count is the number of times an association relationship is established between the second target object and the first target object. In one implementation of determining the second association count, the image processing device can record the second association count each time a second target object with an association relationship with the first target object is obtained when the historical matching result is obtained through historical images.

[0118] Therefore, the total number of times the first target object is associated can be obtained by summing the second association counts of each target object in at least one second target object; or, if a target object is determined to have an association with the first target object in each image, the total number is equal to the number of historical images containing the first target object.

[0119] In this embodiment, the second threshold can be determined according to the actual situation. For example, the second threshold can be a value such as 0.01, 0.012, or 0.05. This application does not limit this value.

[0120] It should be understood that in the historical matching results of the first target object, the second target object with fewer associations with the first target object can be considered as an individual error caused by the detection model or other factors. In this embodiment, filtering the second target object with fewer associations can improve the efficiency, accuracy and robustness in determining the target object that has an association with the first target object.

[0121] In one possible implementation, the image processing device may sort the second target objects in the historical matching results in descending order according to the number of times the second association occurs, and prioritize the second target objects that appear more frequently in the second association, while filtering out the second target objects that appear less frequently in the second association.

[0122] As an optional implementation, if the historical matching results include at least one second target object that is associated with the first target object, and if the number of second target objects is at least two, then the at least one second target object includes a sixth target object and a seventh target object; the image processing device further performs the following steps:

[0123] 5. Calculate the similarity between the sixth target object and the seventh target object;

[0124] In this embodiment, the historical matching result includes at least one second target object that has an association with the first target object, and the number of the second target objects is at least two. It can be understood that the first target object has an association with at least two second target objects. The sixth target object and the seventh target object belong to the at least two second target objects, that is, the sixth target object and the seventh target object have an association with the first target object respectively.

[0125] For example, the image processing device can extract the sixth detection box corresponding to the sixth target object and the seventh detection box corresponding to the seventh target object. Then, the pixel images corresponding to the sixth and seventh detection boxes are used as inputs to a trained re-identification (reID) deep learning neural network, outputting feature maps. Finally, the feature maps corresponding to the sixth and seventh target objects are calculated separately, and the similarity between the feature maps is calculated using cosine similarity. For example, this similarity can be cosine similarity.

[0126] 6. If the similarity is greater than or equal to the third threshold, the sixth target object and the seventh target object are determined to be the same target object.

[0127] In this embodiment, the third threshold can be determined according to the actual situation. For example, the third threshold can be 0.5, 0.6, etc., and this application does not limit it.

[0128] If the similarity is greater than or equal to the third threshold, the image processing device determines that the sixth target object and the seventh target object are the same target object. This can be understood as the image processing device merging the sixth and seventh target objects into one target object. For example, the image processing device may retain the sixth target object and merge the number of times the first target object and the seventh target object have established associations to date into the sixth target object; or, the image processing device may retain the seventh target object and merge the number of times the first target object and the seventh target object have established associations to date into the seventh target object. Optionally, the image processing device may delete the unretained target objects.

[0129] It should be understood that currently, when target object tracking algorithms determine that objects in two adjacent frames are the same target object, they generally do so based on the area intersection-over-union ratio (IoU). However, in practice, occlusion by obstacles or other obstructions often leads to ID skipping, meaning the same target object may have different IDs in different images.

[0130] In this embodiment, when there is already a relationship between the first target object and at least two second target objects, the similarity between the sixth target object and the seventh target object is calculated. If the similarity is greater than the third threshold, the sixth target object and the seventh target object are determined to be the same target object. This can improve the efficiency, accuracy and robustness in determining the target object that has a relationship with the first target object.

[0131] As an optional implementation, the image processing device acquires historical matching results and a first image by performing the following steps:

[0132] 7. Obtain the first video to be processed;

[0133] 8. Process at least one second image from the first video to be processed to obtain the historical matching result; the second image includes the first target object;

[0134] 9. In the first video to be processed, the image whose acquisition time is after the latest acquisition time of at least one second image shall be taken as the first image.

[0135] In this embodiment, the first video to be processed can be understood as an online video or an offline video. The first video to be processed is captured by the first camera, and the image processing device can acquire the first video to be processed through the first camera. For example, the image processing device can have a communication connection with the first camera, enabling the image processing device to acquire the first video to be processed through the first camera.

[0136] In one implementation of acquiring the first video to be processed, the image processing device can acquire the first video to be processed in real time from the first camera through the communication connection.

[0137] In another implementation of acquiring the first video to be processed, the image processing device can acquire the first video to be processed from the first camera through the communication connection after the first camera has completed capturing the first video to be processed.

[0138] Optionally, the first camera can also serve as an input device to the image processing apparatus, sending the first video to be processed thereto. Alternatively, after the first camera captures the first video to be processed, the first video to be processed can be stored locally on the image processing apparatus, so that the image processing apparatus can retrieve the first video to be processed from its local storage.

[0139] In this embodiment, the first camera can be deployed on streets, parking lots, or shopping malls. It should be understood that the first camera can also be deployed in various scenarios such as pedestrian streets, schools, hospitals, and parks, and this application does not limit it in this regard.

[0140] For example, in a scenario where the first camera is deployed on a street or in a parking lot, the first target object can be a person, and the second target object can be a vehicle, such as a bicycle, electric vehicle, or motorcycle. In this scenario, determining which vehicles are associated with people can be used to determine if a vehicle has been stolen. In a scenario where the first camera is deployed in a shopping mall, both the first and second target objects can be people. For example, the first target object can be person A. In this scenario, after identifying person B who is associated with person A, products can be recommended to person B based on person A's preferences.

[0141] After acquiring the first video to be processed, the image processing device determines at least one second image from the first video to be processed that includes the first target object. For example, the image processing device can determine whether each image includes the first target object using target object detection technology; or, if the first video to be processed has already been processed by a target object detection algorithm and a target object tracking algorithm, the image processing device can select at least one second image including the first target object using the trackID corresponding to the first target object and the trackID corresponding to each image.

[0142] For example, the image processing device may select 1000 images from the first video to be processed as the at least one second image. It should be understood that the 1000 images may be consecutive images from the first video to be processed, or they may be non-consecutive images.

[0143] Subsequently, the image processing device can identify the target object in each second image that has a relationship with the first target object, and integrate the results of each second image to obtain the historical matching result.

[0144] It should be understood that the first video to be processed is captured by the first camera, and the at least one second image is selected from the first video to be processed. Therefore, each second image corresponds to a capture time. In this embodiment of the application, the image processing device determines an image from the first video to be processed whose capture time is after the latest capture time of the at least one second image, as the first image, that is, the capture time of the first image is later than the capture time of all the second images.

[0145] Please see Figure 3 , Figure 3 This is a flowchart illustrating another image processing method provided in an embodiment of this application, as shown below. Figure 3 As shown, the method includes:

[0146] 301. Obtain the video stream input from the camera.

[0147] It should be understood that the image processing device may have a communication connection with the camera, enabling the image processing device to acquire video streams through the camera. For example, the image processing device may acquire video streams from the camera in real time through this communication connection; or, the image processing device may acquire video streams from the camera after the camera has finished capturing video.

[0148] 302. For a certain frame of image, calculate the IoU between target object A and other target objects.

[0149] In this step, the frame image can be understood as an image in the video stream, or as the first image in the previous embodiment, and the target object A can be understood as the first target object in the previous embodiment.

[0150] For example, the image processing device can first determine the target objects present in the image, and then calculate the IoU between target object A and other target objects. The calculation of IoU can be referred to the background section above, and will not be repeated here.

[0151] 303. Obtain the historical association records of the target object A.

[0152] In this step, the historical association record can be understood as the historical matching result in the previous embodiment, that is, the target object that has historically had an association with the target object A.

[0153] 304. Determine whether the current frame image contains the target object that has the most associations with target object A in the historical association records.

[0154] In this step, the current frame image can be understood as a certain frame image in step 302. For example, the image processing device can sort the target objects in descending order according to the number of times the relationship between the target objects and the target object A has been established, and then the image processing device determines whether the target object ranked first appears in the current frame image.

[0155] On the one hand, if the judgment result in step 304 is "yes", the image processing device executes 3051: determining whether the IoU between the target object and the target object A is greater than or equal to the threshold.

[0156] If the target object that has established the most associations with target object A appears in the current frame image, the image processing device calculates the IoU between the target object (i.e., the target object that has established the most associations with target object A) and target object A. Then, it determines whether the IoU between the target object and target object A is greater than or equal to a threshold. In this step, the threshold can be understood as the first threshold in the previous embodiment.

[0157] If the judgment result in step 3051 is "no", the image processing device executes 306: determine the next target object in the historical associated record, and then re-execute step 3051.

[0158] If the target object that has established the most associations with target object A does not appear in the current frame image, the image processing device determines the next target object in the historical association record. This can be understood as the image processing device determining the target object ranked second in step 304, then calculating the IoU between the target object (i.e., the next target object) and target object A, and then determining whether the IoU between the target object and target object A is greater than or equal to a threshold.

[0159] If the judgment result in step 3051 is "yes", the image processing device executes 307: establishes an association between the target object and target object A.

[0160] In this step, since it is executed after step 3051, the target object can be understood as the target object in step 3051.

[0161] It should be understood that if steps 3051 and 306 are repeated and the IoU between the target object and target object A in the historical association records is less than the threshold, the image processing device executes step 3052.

[0162] On the other hand, if the judgment result in step 304 is "no", the image processing device executes 3052: determine the target object with the largest IoU with the target object A in the current frame.

[0163] In this step, the image processing device can first determine the target objects present in the current frame image, and then calculate the IoU between each target object and target object A, and determine the target object with the largest IoU with target object A.

[0164] After executing 3052, the image processing device executes 307: establish an association between the target object and target object A.

[0165] In this step, since it is executed after step 3052, the target object can be understood as the target object in step 3052.

[0166] Finally, execute 308: Match complete.

[0167] Optionally, the image processing device may also output pairwise mapping tables or visualization outputs. For example, [target object A, target object 5], [target object A, target object 8], and [target object A, target object 12] can be understood as target object A having a relationship with target object 5, target object 8, and target object 12, respectively.

[0168] Optionally, the image processing device may also provide a query interface to allow users to query matching results for a specific target object.

[0169] Optionally, after the image processing device determines the association between two target objects, it can further combine them to determine the association between more than two target objects. For example, if the image processing device determines the association between [human body A, vehicle B] and [human body A, face C], it can determine [human body A, vehicle B, face C], that is, there is an association between human body A, vehicle B, and face C.

[0170] Those skilled in the art will understand that, in the above-described method of the specific implementation, the order in which each step is written does not imply a strict execution order and does not constitute any limitation on the implementation process. The specific execution order of each step should be determined by its function and possible internal logic.

[0171] The methods of the embodiments of this application have been described in detail above, and the apparatus of the embodiments of this application is provided below.

[0172] Please see Figure 4 , Figure 4 This is a schematic diagram of an image processing device provided in an embodiment of this application. The image processing device 40 includes: an acquisition unit 41 and a determination unit 42. Optionally, the image processing device 40 further includes a calculation unit 43 and a processing unit 44. Wherein:

[0173] Acquisition unit 41 is used to acquire historical matching results of the first target object and a first image, wherein the first image includes the first target object;

[0174] The determining unit 42 is configured to determine the association between the first target object and the third target object when the historical matching results include at least one second target object that has an association with the first target object, and there is a third target object among the at least one second target object; wherein the third target object is a target object in the first image, and the intersection-union ratio between the third target object and the first target object is greater than or equal to a first threshold.

[0175] In any embodiment of this application, the historical matching result further includes the first association count between any of the third target objects and the first target object, and the determining unit 42 is further configured to:

[0176] When there are at least two third target objects, determine the association relationship between the target object with the most first association times among the at least two third target objects and the first target object.

[0177] In conjunction with any embodiment of this application, the determining unit 42 is further configured to:

[0178] If the historical matching results include at least one second target object that is associated with the first target object, and a fourth target object exists among the at least one second target object, then a fifth target object is determined to be associated with the first target object; wherein the fifth target object is the target object in the first image with the largest intersection-over-union ratio (IoU) with the first target object; the fourth target object is a target object in the first image, and the IoU between the fourth target object and the first target object is less than the first threshold.

[0179] In conjunction with any embodiment of this application, the determining unit 42 is further configured to:

[0180] If the historical matching results include at least one second target object that is associated with the first target object, and the first image does not include the second target object, then the association between the fifth target object and the first target object is determined.

[0181] In conjunction with any embodiment of this application, the determining unit 42 is further configured to:

[0182] If the historical matching results do not include target objects that are associated with the first target object, it is determined that there is an association between the fifth target object and the first target object.

[0183] In any embodiment of this application, the historical matching result further includes a second number of associations between the second target object and the first target object, and a total number of times the first target object has been associated; wherein the ratio between the second number of associations and the total number of associations is greater than or equal to a second threshold.

[0184] In any embodiment of this application, when the historical matching results include at least one second target object that is associated with the first target object, and when the number of second target objects is at least two, the at least one second target object includes a sixth target object and a seventh target object; the device further includes a calculation unit 43 for calculating the similarity between the sixth target object and the seventh target object;

[0185] The determining unit 42 is further configured to determine that the sixth target object and the seventh target object are the same target object if the similarity is greater than or equal to the third threshold.

[0186] In any embodiment of this application, the acquisition unit 41 is further configured to acquire a first video to be processed;

[0187] The device further includes a processing unit 44, configured to process at least one second image in the first video to be processed to obtain the historical matching result; the second image includes the first target object;

[0188] The determining unit 42 is further configured to use an image in the first video to be processed whose acquisition time is after the latest acquisition time of the at least one second image as the first image.

[0189] In some embodiments, the functions or modules of the apparatus provided in this application can be used to perform the methods described in the above method embodiments. The specific implementation can be referred to the description of the above method embodiments, and for the sake of brevity, it will not be repeated here.

[0190] Figure 5 This is a schematic diagram of the hardware structure of an image processing apparatus provided in an embodiment of this application. The image processing apparatus 50 includes a processor 51, a memory 52, an input device 53, and an output device 54. The processor 51, memory 52, input device 53, and output device 54 are coupled together via connectors, which may include various interfaces, transmission lines, or buses, etc., and are not limited in this embodiment. It should be understood that in the various embodiments of this application, coupling refers to mutual connection through a specific method, including direct connection or indirect connection through other devices, such as through various interfaces, transmission lines, buses, etc.

[0191] The processor 51 can be one or more graphics processing units (GPUs). If the processor 51 is a GPU, the GPU can be a single-core GPU or a multi-core GPU. Optionally, the processor 51 can be a processor group composed of multiple GPUs, with the multiple processors coupled to each other via one or more buses. Optionally, the processor can also be other types of processors, etc., which are not limited in this embodiment.

[0192] The memory 52 can be used to store computer program instructions, as well as various types of computer program code, including program code for executing the scheme of this application. Optionally, the memory includes, but is not limited to, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), or compact disc read-only memory (CD-ROM), which is used for related instructions and data.

[0193] Input device 53 is used to input data and / or signals, and output device 54 is used to output data and / or signals. Input device 53 and output device 54 can be independent devices or an integrated device.

[0194] It is understood that in this embodiment of the application, the memory 52 can be used not only to store related instructions, but also to store related data. For example, the memory 52 can be used to store the historical matching results of the first target object and the first image obtained through the input device 53. This embodiment of the application does not limit the specific data stored in the memory.

[0195] It should be understood that the actions performed by the acquisition unit 401 can be performed by the input device 23, and the actions performed by the determination unit 42, the calculation unit 43 and the processing unit 44 can be performed by the processor 51.

[0196] Understandable Figure 5 This is merely a simplified design of an image processing apparatus. In practical applications, the image processing apparatus may also include other necessary components, including, but not limited to, any number of input / output devices, processors, memories, etc., and all image processing apparatuses that can implement the embodiments of this application are within the protection scope of this application.

[0197] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0198] Those skilled in the art will readily understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here. Those skilled in the art will also readily understand that the various embodiments of this application have different focuses, and for the sake of convenience and brevity, the same or similar parts may not be repeated in different embodiments. Therefore, parts not described or not described in detail in one embodiment can be referred to the descriptions in other embodiments.

[0199] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.

[0200] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0201] In addition, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0202] In the above embodiments, implementation can be achieved entirely or partially through software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented entirely or partially as a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted through the computer-readable storage medium. The computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available media may be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., digital versatile discs (DVDs)), or semiconductor media (e.g., solid-state disks (SSDs)).

[0203] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. This program can be stored in a computer-readable storage medium, and when executed, it can include the processes described in the above method embodiments. The aforementioned storage medium includes various media capable of storing program code, such as read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

Claims

1. An image processing method, characterized in that, The method includes: Obtain historical matching results of the first target object and a first image, wherein the first image includes the first target object; If the historical matching results include at least one second target object that has an association with the first target object, and there is a third target object among the at least one second target object, then the association between the first target object and the third target object is determined. The third target object is the target object in the first image, and the intersection-union ratio of the third target object and the first target object in the first image is greater than or equal to a first threshold.

2. The method according to claim 1, characterized in that, The historical matching results also include the first association count between any of the third target objects and the first target object, and determining the association between the first target object and the third target object includes: When there are at least two third target objects, determine the association relationship between the target object with the most first association times among the at least two third target objects and the first target object.

3. The method according to claim 1 or 2, characterized in that, The method further includes: If the historical matching results include at least one second target object that is associated with the first target object, and there is a fourth target object among the at least one second target object, then it is determined that there is an association between the fifth target object and the first target object. The fifth target object is the target object in the first image with the largest intersection-over-union ratio (IoU) with the first target object; the fourth target object is a target object in the first image, and the IoU between the fourth target object and the first target object is less than the first threshold.

4. The method according to claim 3, characterized in that, The method further includes: If the historical matching results include at least one second target object that is associated with the first target object, and the first image does not include the second target object, then the association between the fifth target object and the first target object is determined.

5. The method according to claim 3 or 4, characterized in that, The method further includes: If the historical matching results do not include target objects that are associated with the first target object, it is determined that there is an association between the fifth target object and the first target object.

6. The method according to any one of claims 1-5, characterized in that, The historical matching results also include the second number of associations established between the second target object and the first target object, and the total number of times the first target object has been associated; wherein the ratio between the second number of associations and the total number of associations is greater than or equal to a second threshold.

7. The method according to any one of claims 1-6, characterized in that, The method further includes: where the historical matching results include at least one second target object that is associated with the first target object, and where the number of second target objects is at least two, the at least one second target object includes a sixth target object and a seventh target object; Calculate the similarity between the sixth target object and the seventh target object; If the similarity is greater than or equal to the third threshold, the sixth target object and the seventh target object are determined to be the same target object.

8. The method according to any one of claims 1-7, characterized in that, The process of obtaining historical matching results and the first image includes: Obtain the first video to be processed; The historical matching result is obtained by processing at least one second image in the first video to be processed; the second image includes the first target object; The target object takes the first image from the first video to be processed, whose acquisition time is after the latest acquisition time of the at least one second image, as the first image.

9. An image processing apparatus, characterized in that, The device includes: An acquisition unit is used to acquire historical matching results of a first target object and a first image, wherein the first image includes the first target object; The processing unit is configured to determine, when the historical matching results include at least one second target object that is associated with the first target object, and a third target object exists among them, that there is an associated third target object; wherein the third target object is a target object in the first image, and the intersection-union ratio of the third target object and the first target object in the first image is greater than or equal to a first threshold.

10. An electronic device, characterized in that, include: A processor and a memory, the memory being used to store computer program code, the computer program code including computer instructions, wherein, when the processor executes the computer instructions, the electronic device performs the method as described in any one of claims 1 to 8.

11. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, the computer program including program instructions that, when executed by a processor, cause the processor to perform the method according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • Target tracking method and device and computer storage medium

    CN112037247A