A target association method, electronic device and computer readable storage medium
By calculating the target distance and correlation confidence and determining the target correlation results, the problem of target correlation accuracy and insufficient consumption of computing resources in the prior art is solved, and efficient and accurate target correlation is achieved.
Patent Information
- Application Number
- CN202411427431.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-14
- Publication Date
- 2025-02-18
- Estimated Expiration
- 2044-10-14
AI Technical Summary
The existing target association methods have shortcomings in accuracy and computing resource consumption, making it difficult to achieve target association efficiently.
By obtaining the three-dimensional coordinates of the first target object and the second target object in the target scene, calculating the target distance, and calculating the correlation confidence in combination with the preset reference distribution conditions, the target correlation result is determined.
Improves the accuracy of target associations while reducing the consumption of computing resources.
Smart Images

Figure CN118939435B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and in particular to a target association method, an electronic device and a computer-readable storage medium. Background Art
[0002] With the continuous development of intelligent detection technology, target association has significant application value in many fields such as security monitoring, medical image analysis, and retail industry. This technology identifies relevant visual elements in image data and establishes associations between them. The current target association method is mainly achieved through manual annotation or by training corresponding association models. Manual annotation requires a lot of human resources, while training corresponding association models requires a large number of training samples and consumes a lot of computing resources.
[0003] In view of this, how to propose a target association method with high accuracy and efficiency has become an urgent problem to be solved. Summary of the invention
[0004] The main technical problem solved by the present application is to provide a target association method, an electronic device and a computer-readable storage medium, which can improve the accuracy of association between different targets.
[0005] To solve the above technical problems, a technical solution adopted in the present application is: to provide a target association method, including: obtaining a first target object and a second target object in a target scene; wherein the first target object and the second target object match different detection categories; based on a first target point corresponding to the current first target object and a second target point corresponding to the second target object, obtaining a target distance between the current first target object and each of the second target objects; obtaining a preset reference distribution condition, and based on the reference distribution condition and the target distance, obtaining an association confidence between the current first target object and each of the second target objects; and based on the association confidence, determining an association result between the current first target object and the second target object.
[0006] To solve the above technical problems, another technical solution adopted in the present application is: to provide an electronic device, comprising: a memory and a processor coupled to each other, the memory storing program instructions, and the processor executing the program instructions to implement the target association method mentioned in the above technical solution.
[0007] In order to solve the above technical problems, another technical solution adopted in the present application is: providing a computer-readable storage medium on which program instructions are stored, and when the program instructions are executed by a processor, the target association method mentioned in the above technical solution is implemented.
[0008] The beneficial effects of the present application are as follows: Different from the prior art, the target association method proposed in the present application determines the first target point corresponding to the current first target object and the second target point corresponding to the second target object in the target scene. According to the three-dimensional coordinates corresponding to the first target point and the second target point, respectively, the target distance between the current first target object and the second target object is determined. Thus, the corresponding association confidence is calculated by combining the target distance with the preset reference distribution condition. The association result between the current first target object and the second target object is determined based on the association confidence, which helps to improve the association accuracy while reducing the computing resources consumed by the target association. BRIEF DESCRIPTION OF THE DRAWINGS
[0009] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work. Among them:
[0010] Figure 1 It is a flowchart of an implementation method of the target association method of the present application;
[0011] Figure 2 is a schematic diagram of an implementation method corresponding to step S101;
[0012] Figure 3 yes Figure 1 Step S102 corresponds to a flow chart of another implementation method;
[0013] Figure 4 yes Figure 3 A flow chart of an implementation method corresponding to step S203;
[0014] Figure 5 yes Figure 3 Step S203 corresponds to a flow chart of another implementation method;
[0015] Figure 6 is a flowchart of a reference distribution condition acquisition method corresponding to an implementation method;
[0016] Figure 7 It is a structural schematic diagram of an embodiment of the electronic device of the present application;
[0017] Figure 8 It is a structural schematic diagram of an implementation method of a computer-readable storage medium of the present application. DETAILED DESCRIPTION
[0018] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments, and different embodiments can be adaptively combined. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0019] See also Figure 1 , Figure 1 : is a flowchart of an implementation method of the target association method of the present application, the method comprising:
[0020] S101: Acquire a first target object and a second target object in a target scene; wherein the first target object and the second target object match different detection categories.
[0021] Specifically, the target scene is collected using the collection component, and the collected data is analyzed to determine all target objects contained in the target scene, and each target object is matched with a corresponding detection category. The target object corresponding to the first detection category is used as the first target object; and the target object corresponding to the second detection category is used as the second target object.
[0022] In one embodiment, the acquisition component includes an image acquisition component and a radar acquisition component. The target scene is acquired by using the image acquisition component and the radar acquisition component to acquire image data and radar data matching the target scene. Based on the image data and the radar data, a first target object and a second target object in the target scene are acquired. The image data includes a first area corresponding to the first target object and a second area corresponding to the second target object.
[0023] In one implementation scenario, after acquiring image data corresponding to the target scene, the image data is input into a trained image detection model so that the image detection model identifies a first target object and a second target object in the image data, and marks a first region corresponding to the first target object and a second region corresponding to the second target object in the image data. The structure and training method of the above-mentioned image detection model may refer to the structure and training method of an existing neural network model, or the above-mentioned image detection model may utilize an open source algorithm.
[0024] In addition, the first area and the second area correspond to a plurality of vertices, respectively, and the vertices are used to determine the position corresponding to the first target object or the second target object. Based on the position of each vertex in the image data, its two-dimensional coordinates in the image coordinate system are determined. Further, according to the position conversion relationship between the image acquisition component and the radar acquisition component and the radar data, the two-dimensional coordinates corresponding to each vertex are converted into three-dimensional coordinates in the radar coordinate system. Among them, for any vertex, its corresponding three-dimensional coordinates include a vertical coordinate corresponding to the first direction, a horizontal coordinate corresponding to the second direction, and a vertical coordinate corresponding to the third direction. The first direction, the second direction and the third direction are perpendicular to each other, the first direction is perpendicular to the horizontal plane, and the plane where the second direction and the third direction are located is parallel to the horizontal plane. By determining the three-dimensional coordinates, the calculation of subsequent steps is facilitated and it helps to improve the accuracy of target association.
[0025] In a specific application scenario, the first target object is an umbrella, and the second target object is the user of the umbrella. In the image data, since different first target objects have significant differences in shape and size, in order to improve the accuracy of target association, the first area is determined according to the actual shape of the first target object in the image data. And, in order to improve the efficiency of target association, the second area corresponding to each second target object is determined by selecting a rectangular frame.
[0026] Specifically, the above-mentioned umbrellas are used by pedestrians. In rainy scenes, in order to avoid safety hazards caused by excessive flow of people in the target scene, it is necessary to count the number of pedestrians in the target scene. In the counting process, the first area corresponding to the umbrella and the second area corresponding to the pedestrian are first determined from the collected image data. Since the umbrella and the pedestrian are easily overlapped in the image data, or the installation position of the collection component causes the umbrella to block the pedestrian, the umbrella and the pedestrian are associated by executing subsequent steps, thereby improving the accuracy of the flow of people statistics. For an example, please refer to Figure 2 , Figure 2 is a schematic diagram of an implementation method corresponding to step S101, Figure 2 The image data shown includes pedestrian A, pedestrian B and umbrella C, and pedestrian A and pedestrian B overlap; and, Figure 2 The image also includes pedestrians E, pedestrian F and umbrella G, and pedestrian F and umbrella G both block pedestrian E.
[0027] In another specific application scenario, the first target object may also be a commodity, such as an umbrella, and the second target object may be a load-bearing object, such as a shelf or a table. The corresponding first area is determined in combination with the shape feature of the first target object. And the second area corresponding to each second target object is determined by selecting a rectangular frame.
[0028] In another embodiment, the data collected by the acquisition component is analyzed to determine all target objects included in the target scene. In response to all target objects matching different detection categories, target objects matching different detection categories are preferentially preliminarily associated. After the preliminary association is completed, the first target object and the second target object are determined based on the remaining target objects and the first detection category matched by the remaining target objects.
[0029] Specifically, in response to obtaining multiple target objects corresponding to two different detection categories. According to the image data and the radar data, a preliminary target association is performed on the target objects to determine a target combination from all the target objects, each target combination including a target object that matches two different detection categories. For a certain detection category, the remaining unassociated target objects are used as the first target object; and, for another detection category, the remaining unassociated target objects are used as the second target object. Among them, the above-mentioned preliminary target association process can be implemented using a trained association model, that is, the image data and the radar data are input into the association model to obtain the association confidence between the target objects of two different detection categories; in response to the association confidence being greater than the confidence threshold, the two target objects corresponding to the association confidence threshold are associated.
[0030] In a specific application scenario, in response to the data collected by the collection component including image data and radar data, umbrella targets and pedestrian targets in the target scene are obtained based on the image data and radar data. A target combination is determined from all umbrella targets and all pedestrian targets, each target combination including an umbrella target and its associated pedestrian target. The remaining unassociated umbrella targets are used as the first target object, and the remaining unassociated pedestrian targets are used as the second target object.
[0031] S102: Acquire a target distance between the current first target object and each second target object based on a first target point corresponding to the current first target object and a second target point corresponding to the second target object.
[0032] In one embodiment, any first target object that is not associated in the target scene is used as the current first target object. According to the position of the current first target object in the target scene, the first target point corresponding to the current first target object is determined. And, for each second target object that is not associated in the target scene, according to the position of the second target object in the target scene, the second target point corresponding to the second target object is determined.
[0033] Furthermore, a target distance between the current first target object and the corresponding second target object is determined according to the first target point of the current first target object and the second target point of the second target object.
[0034] S103: Obtain a preset reference distribution condition, and based on the reference distribution condition and the target distance, obtain an association confidence between the current first target object and each second target object.
[0035] In one embodiment, a preset reference distribution condition is obtained, where the reference distribution condition is determined based on a plurality of annotated reference data.
[0036] Furthermore, the association confidence between the current first target object and the corresponding second target object is calculated based on the acquired reference distribution condition and target distance, wherein the higher the association confidence, the higher the probability of association between the current first target object and the corresponding second target object.
[0037] S104: Determine the association result between the current first target object and the second target object based on the association confidence.
[0038] In one embodiment, in response to acquiring the association confidence between the current first target object and each second target object, the second target object associated with the current first target object is determined based on each association confidence.
[0039] Specifically, the second target object corresponding to the maximum association confidence is associated with the current first target object. Also, the current first target object and the associated second target object are used as a target combination, and the first target object and the second target object corresponding to the target combination are assigned the same target identifier.
[0040] Further, other first target objects are selected from the target scene as the current first target object, and the process returns to the above step S101 to sequentially execute subsequent steps until the traversal of all first target objects in the target scene is completed. It should be noted that after the first target object and the second target object are associated, the first target object and the second target object no longer participate in the association of other target objects in the target scene.
[0041] In another embodiment, to further improve the accuracy of the association, after obtaining the association confidence between the current first target object and each second target object, the maximum value of the association confidences corresponding to the current first target object and each second target object is used as the target confidence. In response to the target confidence being greater than or equal to the confidence threshold, the current first target object is associated with the second target object corresponding to the target confidence. The above confidence threshold may be obtained by estimation, or may be obtained by reverse deduction by relevant technicians after multiple experiments.
[0042] Alternatively, in response to the target confidence being less than the confidence threshold, a prompt message is generated to prompt a relevant technician to perform manual calibration to determine a second target object associated with the current first target object.
[0043] The target association method proposed in the present application determines the first target point corresponding to the current first target object and the second target point corresponding to the second target object in the target scene. According to the three-dimensional coordinates corresponding to the first target point and the second target point, respectively, the target distance between the current first target object and the second target object is determined. Thus, the corresponding association confidence is calculated by combining the target distance with the preset reference distribution condition. The association result between the current first target object and the second target object is determined based on the association confidence, which helps to improve the association accuracy while reducing the computing resources consumed by the target association.
[0044] See also Figure 3 , Figure 3 yes Figure 1 Step S102 in the flowchart corresponds to another embodiment. Specifically, the implementation process of step S102 includes:
[0045] S201: For a current first target object, obtain a first target point corresponding to a first area.
[0046] In one embodiment, in response to the first region having an irregular shape, the first region is divided into a plurality of reference regions.
[0047] Specifically, the first area is divided into a plurality of non-overlapping triangular areas, and each triangular area is used as a reference area.
[0048] Furthermore, a reference centroid of each reference area is obtained, and a first target point is obtained based on all reference centroids corresponding to the first area.
[0049] Specifically, according to the three-dimensional coordinates corresponding to the three vertices of each reference area, the reference center of gravity and the reference area of the reference area are calculated. According to the reference center of gravity and the reference area of all reference areas corresponding to the first area, the first target point is determined, and the first target point includes the corresponding three-dimensional coordinates.
[0050] In a specific application scenario, in response to the first area including k+2 vertices, k reference areas are obtained by dividing the first area according to the above method. When the three vertices P1, P2 and P3 of the kth reference area correspond to the three-dimensional coordinates respectively , and , then the specific calculation formula of the reference centroid coordinates corresponding to the kth reference area is as follows:
[0051]
[0052]
[0053]
[0054] in, Represents the three-dimensional coordinates of the reference centroid corresponding to the kth reference area.
[0055] And, the specific calculation formula of the reference area corresponding to the kth reference area is as follows:
[0056]
[0057] in, Represents the reference area corresponding to the kth reference area.
[0058] Furthermore, after the reference center of gravity and the reference area corresponding to each reference area are calculated, the specific calculation formula of the first target point corresponding to the first area is as follows:
[0059]
[0060]
[0061]
[0062] in, Indicates the three-dimensional coordinates corresponding to the first target point.
[0063] In another embodiment, in order to save computing resources, a circumscribed rectangle corresponding to the first area is determined, and the center of gravity of the circumscribed rectangle is used as the first target point corresponding to the first target object.
[0064] S202: For each second target object, use a plurality of vertices corresponding to the second area as second target points.
[0065] In one embodiment, for each second target object, a plurality of vertices of the second area are used as second target points.
[0066] In a specific application scenario, in response to the second area corresponding to the second target object being an area selected by a rectangular box, four vertices of the rectangular box are used as second target points.
[0067] S203: In response to the current first target object and the second target object satisfying an initial matching condition, acquiring a target distance based on the first target point and the plurality of second target points.
[0068] In one embodiment, a second target object that satisfies the initial matching condition with the current first target object is screened. According to each second target point corresponding to the first target point and the screened second target object, the target distance between the current first target object and the corresponding second target object is determined, and the specific implementation process is described in the subsequent embodiments. The above initial matching condition is highly correlated with different target objects.
[0069] The above solution uses the initial matching condition to screen the second target object in the target scene, thereby reducing the consumption of subsequent computing resources and improving the efficiency of target association.
[0070] See also Figure 4 , Figure 4 yes Figure 3 The process flow diagram before step S203 corresponds to an implementation method. Specifically, the step of judging whether the current first target object and each second target object meet the initial matching condition before step S203 includes:
[0071] S301: Acquire a first vertical coordinate of a first target point in a first direction, and second vertical coordinates of a plurality of second target points in the first direction, respectively, wherein the first direction is perpendicular to a horizontal plane.
[0072] In one embodiment, for the current first target point, its first vertical coordinate in the first direction is obtained. And for each second target point, its second vertical coordinate in the first direction is obtained. The first direction is perpendicular to the horizontal plane.
[0073] S302: Obtain a vertical difference based on a first average value and the first vertical coordinate corresponding to a plurality of second vertical coordinates.
[0074] In one embodiment, the second vertical coordinates corresponding to the plurality of second target points are averaged to obtain a first mean. The difference between the first vertical coordinate and the first mean is used as a vertical difference. The vertical difference is used to characterize the difference between the center height of the current first target object and the center height of the corresponding second target object. By calculating the vertical difference, it is used to screen out and remove unreasonable second target objects, thereby reducing the consumption of subsequent computing resources.
[0075] S303: In response to the vertical difference being within a preset range, determining that the current first target object and the corresponding second target object satisfy an initial matching condition.
[0076] In one embodiment, a preset range is determined, and the preset range includes a minimum threshold and a maximum threshold. After obtaining the vertical difference between the current first target object and the corresponding second target object, the vertical difference is compared with the minimum threshold and the maximum threshold. In response to the vertical difference being within the preset range, that is, the vertical difference is greater than the above-mentioned minimum threshold and less than the above-mentioned maximum threshold, it is determined that the current first target object and the corresponding second target object meet the initial matching condition. Otherwise, it is considered that there is no possibility of association between the current first target object and the second target object, that is, it is determined that the current first target object and the corresponding second target object do not meet the initial matching condition.
[0077] In a specific application scenario, in response to the current first target object being an umbrella and the second target object being the user of the umbrella, the minimum threshold and maximum threshold corresponding to the above preset range are determined according to the usage relationship between the umbrella and the user in the actual scenario. For example, the minimum threshold is set to -0.2 meters and the maximum threshold is set to 2 meters. If the vertical difference between the current first target object and the corresponding second target object is -0.3 meters, it is considered that the two do not meet the initial matching condition.
[0078] See also Figure 5 , Figure 5 yes Figure 3 Step S203 in the flowchart corresponds to another implementation. Specifically, the implementation process of step S203 includes:
[0079] S401: Obtain a first horizontal coordinate of a first target point in the second direction and second means corresponding to the second horizontal coordinates of a plurality of second target points in the second direction, and determine a first difference based on the first horizontal coordinate and the second means.
[0080] In one embodiment, a first horizontal coordinate of a first target point in the second direction is obtained, and second horizontal coordinates of a plurality of second target points in the second direction are obtained respectively, and the second horizontal coordinates corresponding to the plurality of second target points are averaged to obtain a second mean value.
[0081] Furthermore, the difference between the second mean and the first horizontal coordinate is taken as the first difference. The specific calculation formula of the first difference is as follows:
[0082]
[0083]
[0084] in, Indicates the first The second horizontal coordinate of the second target point, represents the second mean, represents the first horizontal coordinate corresponding to the first target point, Represents the first difference.
[0085] S402: Obtain a first vertical coordinate of the first target point in the third direction, and a third mean corresponding to the second vertical coordinates of multiple second target points in the third direction, and determine a second difference based on the first vertical coordinate and the third mean; wherein the second direction is perpendicular to the third direction, and a plane where the second direction and the third direction are located is parallel to a horizontal plane.
[0086] In one embodiment, a first ordinate of a first target point in a third direction is obtained. Also, second ordinates of a plurality of second target points in the third direction are obtained, and the second ordinates corresponding to the plurality of second target points are averaged to obtain a third mean. It should be noted that the second direction is perpendicular to the third direction, and the plane where the second direction and the third direction are located is parallel to the horizontal plane.
[0087] Furthermore, the difference between the third mean and the first ordinate is taken as the second difference. The specific calculation formula of the second difference is as follows:
[0088]
[0089]
[0090] in, Indicates the first The second ordinate of the second target point, represents the third mean, represents the first ordinate corresponding to the first target point, Represents the second difference.
[0091] S403: Acquire the target distance based on the first difference and the second difference.
[0092] In one embodiment, the horizontal distance between the current first target object and the corresponding second target object is determined based on the calculated first difference and second difference, and the horizontal distance is used as the target distance. The specific calculation formula of the target distance is as follows:
[0093]
[0094] in, Indicates the target distance.
[0095] See also Figure 6 , Figure 6 1 is a flow chart of a reference distribution condition acquisition method corresponding to an implementation method. Specifically, the reference distribution condition is obtained based on the following steps:
[0096] S501: Acquire a plurality of reference data; wherein each reference data includes a plurality of reference combinations, and each reference combination includes a first reference object and a second reference object that are related to each other.
[0097] In one embodiment, a plurality of pre-annotated reference data are obtained, each of which includes a plurality of reference combinations, and each of which includes a first reference object and a second reference object that are related to each other. The specific category of the first reference object is consistent with the category of the first target object mentioned in the above corresponding embodiment, and the specific category of the second reference object is consistent with the category of the second target object mentioned in the above corresponding embodiment.
[0098] In one implementation scenario, each reference data is collected by using a collection component for a corresponding scene, and by analyzing the collected data, all reference objects contained in the reference data and the detection category corresponding to each reference object are determined. Relevant technicians mark the reference objects, determine the first reference object and the second reference object that are related to each other, and use the first reference object and the second reference object that are related to each other as a reference combination. The process of determining the reference object and the detection category can refer to the corresponding implementation method described above, and will not be elaborated in detail here.
[0099] In another embodiment, the reference data may be continuous data collected by the collection component. Alternatively, the reference data may be selected from the data collected by the collection component, for example, the collected data includes images, and data including clear images are selected as reference data.
[0100] S502: For each reference combination, obtain a reference distance between a first reference object and a second reference object.
[0101] In one embodiment, for each reference combination in the reference data, a reference distance between the corresponding first reference object and the corresponding second reference object is determined. The reference distance in this embodiment can be obtained by referring to the target distance in the above corresponding embodiment, and the specific implementation process will not be elaborated in detail here.
[0102] In a specific application scenario, in response to the first target object mentioned in the above corresponding implementation being an umbrella and the second reference object being a pedestrian. In response to the current reference data including the mutually associated umbrella a and pedestrian b, and the related associated umbrella c and pedestrian d, the reference distance D1 between umbrella a and pedestrian b, and the reference distance D2 between umbrella c and pedestrian d are obtained. In response to traversing all reference data, a set of all reference distances is obtained. ,in, Represents the total number of reference combinations in all reference data.
[0103] S503: Obtain reference distribution conditions based on the expectation and variance of the reference distance corresponding to the reference data.
[0104] In one embodiment, after obtaining a set of reference distances corresponding to each reference data, the corresponding expectation and variance are calculated based on the set. The multiple reference distances are considered to obey a normal distribution, and a normal distribution function is calculated based on the above expectation and variance, and the normal distribution function is used as a reference distribution condition.
[0105] In a specific implementation scenario, the specific calculation formula of the reference distribution condition is as follows:
[0106]
[0107] in, represents the normal distribution function, i.e., the reference distribution condition; represents the expectation corresponding to multiple reference distances, Represents the variance corresponding to multiple reference distances.
[0108] Further, in response to obtaining the reference distribution condition, Figure 1 The specific process of obtaining the association confidence in step S103 includes: determining the target interval according to the current target distance between the first target object and the second target object, taking the reference distribution condition as the integrand, calculating the area of the region enclosed by the integrand and the corresponding coordinate axis in the target interval, and taking the area as the association confidence.
[0109] Specifically, the specific calculation formula of the association confidence is as follows:
[0110]
[0111] in, represents the association confidence, Indicates that the target distance Determine the target range.
[0112] The above scheme calculates the corresponding area according to the target interval and the reference distribution conditions, and uses the area as the association confidence to efficiently and intuitively characterize the similarity between the target distance between the current first target object and the second target object and the reference distribution conditions, thereby reducing the difficulty of target association.
[0113] In yet another embodiment, Figure 1The implementation process of step S102 may also include: dividing the first area corresponding to the current first target object into multiple reference areas, determining the first target point according to the reference center of gravity of each reference area, and averaging the three-dimensional coordinates of multiple vertices in the second area corresponding to the second target object to obtain a second target point corresponding to the second target object.
[0114] Further, according to the vertical difference between the first vertical coordinate of the first target point and the second vertical coordinate of the second target point, it is determined whether the current first target object and the second target object meet the initial matching condition. In response to meeting the initial matching condition, the target distance is determined according to the first target point and the second target point. Thus, the association confidence is determined according to the target distance and the reference distribution condition. The specific implementation process can refer to the above corresponding implementation method.
[0115] In yet another embodiment, Figure 1 In step S101, a corresponding second area is determined according to the actual shape of the second target object in the image data.
[0116] Furthermore, the first area corresponding to the first target object is divided into a plurality of first reference areas, the reference center of gravity of each first reference area is obtained, and the first target point is obtained based on all the first reference centers of gravity corresponding to the first area. Also, the second area corresponding to the second target object is divided into a plurality of second reference areas, the reference center of gravity of each second reference area is obtained, and the second target point is obtained based on all the second reference centers of gravity corresponding to the second area. The specific implementation process can refer to the corresponding implementation method described above, and will not be elaborated on in detail here.
[0117] Further, after the first target point and the second target point are determined, the steps mentioned in the above corresponding implementation manners are sequentially performed to obtain the association result between the current first target object and the second target object.
[0118] See also Figure 7 , Figure 71 is a schematic diagram of the structure of an embodiment of an electronic device of the present application. The electronic device comprises: a memory 10 and a processor 20 coupled to each other. The memory 10 stores program instructions, and the processor 20 is used to execute the program instructions to implement the target association method mentioned in any of the above embodiments. Specifically, the electronic device includes but is not limited to: a desktop computer, a laptop computer, a tablet computer, a server, etc., which are not limited here. In addition, the processor 20 can also be called a CPU (Center Processing Unit). The processor 20 may be an integrated circuit chip with signal processing capabilities. The processor 20 may also be a general-purpose processor, a digital signal processor (Digital Signal Processor, DSP), an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), a field-programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc. In addition, the processor 20 may be implemented by an integrated circuit chip.
[0119] See also Figure 8 , Figure 8 The storage medium 30 stores program instructions 40 that can be executed by a processor, and when the program instructions 40 are executed by the processor, the target association method mentioned in any of the above embodiments is implemented.
[0120] In the several embodiments provided in the present application, it should be understood that the disclosed methods and devices can be implemented in other ways. For example, the device implementation described above is only schematic. For example, the division of modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, and the indirect coupling or communication connection of devices or units can be electrical, mechanical or other forms.
[0121] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0122] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0123] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) or a processor to execute all or part of the steps of each implementation method of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program code.
[0124] The above description is only an implementation method of the present application, and does not limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly used in other related technical fields, are also included in the patent protection scope of the present application.
Claims
1. A target association method, characterized in that: include: Acquire a first target object and a second target object in a target scene; wherein the first target object and the second target object match different detection categories; Based on a first target point corresponding to the current first target object and a second target point corresponding to the current second target object, acquiring a target distance between the current first target object and each of the second target objects; Acquire a preset reference distribution condition, and acquire, based on the reference distribution condition and the target distance, an association confidence between the current first target object and each of the second target objects; Based on the association confidence, determining a current association result between the first target object and the second target object; The reference distribution condition is obtained based on the following steps: obtaining multiple reference data; each of the reference data includes multiple reference combinations, each of the reference combinations includes a first reference object and a second reference object that are mutually related; for each of the reference combinations, obtaining a reference distance between the first reference object and the second reference object; and obtaining the reference distribution condition based on the expectation and variance of the reference distance corresponding to the reference data.
2. The method according to claim 1, characterized in that: The step of acquiring the first target object and the second target object in the target scene includes: Acquire image data and radar data matching the target scene; Based on the image data and the radar data, the first target object and the second target object in the target scene are acquired; wherein the image data includes a first area corresponding to the first target object and a second area corresponding to the second target object.
3. The method according to claim 2, characterized in that The acquiring the target distance between the current first target object and each of the second target objects based on the current first target point corresponding to the first target object and the current second target point corresponding to the second target object includes: For the current first target object, obtaining a first target point corresponding to the first area; and, For each of the second target objects, taking a plurality of vertices corresponding to the second area as second target points; In response to the current first target object and the second target object satisfying an initial matching condition, the target distance is acquired based on the first target point and a plurality of the second target points.
4. The method according to claim 3, characterized in that: The acquiring, for the current first target object, a first target point corresponding to the first area includes: dividing the first area into a plurality of reference areas; A reference centroid of each reference area is obtained, and the first target point is obtained based on all the reference centroids corresponding to the first area.
5. The method according to claim 3, characterized in that: In response to the first target object and the second target object currently satisfying an initial matching condition, before acquiring the target distance based on the first target point and the plurality of second target points, the method includes: Acquire a first vertical coordinate of the first target point in a first direction, and second vertical coordinates of a plurality of second target points in the first direction, respectively; wherein the first direction is perpendicular to a horizontal plane; Acquire a vertical difference based on a first average value corresponding to a plurality of the second vertical coordinates and the first vertical coordinate; In response to the vertical difference being within a preset range, it is determined that the current first target object and the corresponding second target object satisfy the initial matching condition.
6. The method according to claim 3, characterized in that: In response to the first target object and the second target object currently satisfying an initial matching condition, acquiring the target distance based on the first target point and a plurality of the second target points includes: Obtaining a first horizontal coordinate of the first target point in the second direction and a second mean value corresponding to the second horizontal coordinates of a plurality of second target points in the second direction, and determining a first difference based on the first horizontal coordinate and the second mean value; and Obtaining a first ordinate of the first target point in a third direction and a third mean of the second ordinates of the second target points in the third direction, and determining a second difference based on the first ordinate and the third mean; wherein the second direction is perpendicular to the third direction, and a plane where the second direction and the third direction are located is parallel to a horizontal plane; The target distance is acquired based on the first difference and the second difference.
7. The method according to claim 1, characterized in that The determining, based on the association confidence, a current association result between the first target object and the second target object includes: Taking the maximum value of the associated confidences corresponding to the current first target object and each of the second target objects as the target confidence; In response to the target confidence being greater than a confidence threshold, the current first target object is associated with a second target object corresponding to the target confidence.
8. The method according to claim 2, characterized in that: The acquiring the first target object and the second target object in the target scene based on the image data and the radar data includes: Based on the image data and the radar data, acquiring an umbrella target and a pedestrian target in the target scene; Determine a target combination from all umbrella targets and all pedestrian targets; wherein the target combination includes an umbrella target and its associated pedestrian target; The remaining umbrella targets are taken as the first target objects, and the remaining pedestrian targets are taken as the second target objects.
9. An electronic device, characterized in that: include: A memory and a processor coupled to each other, wherein the memory stores program instructions, and the processor executes the program instructions to implement the target association method as described in any one of claims 1-8.
10. A computer-readable storage medium having program instructions stored thereon, characterized in that: When the program instructions are executed by a processor, a target association method according to any one of claims 1 to 8 is implemented.
Citation Information
Patent Citations
Video image target association method and device, and terminal device
CN111695429A