Human-vehicle association method, device, electronic equipment and storage medium

By determining the intersection area between the matching area and the non-motor vehicle identification box in the human body recognition box and determining a more accurate image area, the problem of low correlation accuracy of human-vehicles in the prior art is solved, and a higher correlation accuracy is achieved.

CN119741516APending Publication Date: 2025-04-01SHENZHEN INTELLIFUSION TECHNOLOGIES CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411613498.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-12
Publication Date
2025-04-01

AI Technical Summary

Technical Problem

The existing human-vehicle association method has low accuracy in human-vehicle association, which is mainly due to different riding directions and angles, resulting in wrong position matching.

Method used

By determining the matching area in the human body recognition box, a more accurate second image area is determined based on the matching area and the non-motor vehicle recognition box, and then the smaller one in the first image area and the target non-motor vehicle recognition box is used as the target image area, the human-vehicle relationship is determined.

Benefits of technology

It effectively improves the accuracy of human-vehicle relationships and reduces incorrect matching caused by different riding directions and angles.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119741516A_ABST
    Figure CN119741516A_ABST
Patent Text Reader

Abstract

The embodiment of the present invention provides a method for associating a person with a vehicle, the method comprising: acquiring a target image; determining a matching area and a first image area of ​​the matching area in a target human recognition frame, one target human recognition frame corresponding to one matching area; determining a second image area of ​​the intersection area between the matching area and the target non-motor vehicle recognition frame; determining the smaller image area between the first image area and the image area of ​​the target non-motor vehicle recognition frame as the target image area; and determining the association relationship between the target human recognition frame and the target non-motor vehicle recognition frame based on the second image area and the target image area. Since the target image area is the smaller one of the first image area and the target non-motor vehicle recognition frame, the influence caused by different riding directions and angles can be avoided, thereby effectively improving the accuracy of associating a person with a vehicle.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of non-motor vehicle management, and in particular to a person-vehicle association method, device, electronic equipment and storage medium. Background Art

[0002] The current penetration rate of electric vehicles is very high. According to statistics, there is an average of one non-motor vehicle for every four people in China. While non-motor vehicles bring convenience to people, they also introduce many risks related to riding, such as riding without a helmet, riding overloaded, etc. For this reason, various systems for supervising safe riding are being implemented. Among them, the association between the human body and non-motor vehicles during riding is particularly important. Based on the association between the human body and non-motor vehicles, big data statistics can be used to analyze the number of violations, identity recognition, and community non-motor vehicle-related risk index. The traditional human-vehicle association method often matches and analyzes the human position and non-motor vehicle position, but its disadvantage is that due to factors such as the direction and angle of riding, a single position match is prone to cause more false matches, and its human-vehicle association accuracy is low. Therefore, how to provide a human-vehicle association method that can improve the accuracy of human-vehicle association has become an urgent problem to be solved. Summary of the invention

[0003] The embodiment of the present invention provides a method for associating a person with a vehicle, aiming to solve the problem of low accuracy of associating a person with a vehicle in the existing method for associating a person with a vehicle. By determining a matching area in a human body recognition frame, a more accurate second image area can be determined based on the matching area and the non-motor vehicle recognition frame, and then after taking the smaller area of ​​the first image area and the target non-motor vehicle recognition frame as the target image area, the association relationship between the target non-motor vehicle recognition frame and the target human body recognition frame can be determined based on the target image area and the second image area. Since the target image area is the smaller area of ​​the first image area and the target non-motor vehicle recognition frame, the influence caused by different riding directions and angles can be avoided, so the accuracy of associating a person with a vehicle can be effectively improved.

[0004] In a first aspect, an embodiment of the present invention provides a method for associating a person with a vehicle, the method comprising the following steps:

[0005] Acquire a target image, wherein the target image includes at least one human body recognition frame and at least one non-motor vehicle recognition frame;

[0006] Determine a matching area and a first image area of ​​the matching area in a target human body recognition frame, wherein one target human body recognition frame corresponds to one matching area, and the target human body recognition frame is one of at least one of the human body recognition frames;

[0007] Determine a second image area of ​​an intersection area between the matching area and a target non-motor vehicle identification frame, the target non-motor vehicle identification frame being one of at least one of the non-motor vehicle identification frames;

[0008] Determine the smaller image area between the first image area and the image area of ​​the target non-motor vehicle identification frame as the target image area;

[0009] Based on the second image area and the target image area, an association relationship between the target human recognition frame and the target non-motor vehicle recognition frame is determined.

[0010] Optionally, the target human body recognition frame corresponds to a first vertex coordinate, a first width side length, and a first height side length, and determining a matching area and a first image area of ​​the matching area in the target human body recognition frame includes:

[0011] Determine the shorter side length of the first width side length and the first height side length as the target side length;

[0012] Determine the second vertex coordinates of the matching area based on the target side length and the first vertex coordinates;

[0013] Based on the target side length, determining a second height side length and a second width side length of the matching area;

[0014] Based on the second vertex coordinates, the second height side length, and the second width side length of the matching area, a matching area and a first image area of ​​the matching area are determined.

[0015] Optionally, the target non-motor vehicle identification frame corresponds to a third vertex coordinate, a third height side length, and a third width side length, the third vertex coordinate includes a third vertex horizontal coordinate and a third vertex vertical coordinate, the second vertex coordinate includes a second vertex horizontal coordinate and a second vertex vertical coordinate, and the determining of the second image area of ​​the intersection area between the matching area and the target non-motor vehicle identification frame includes:

[0016] Based on the second vertex horizontal coordinate, the second width side length, the third vertex horizontal coordinate, and the third width side length, calculate and obtain the fourth width side length of the intersection area;

[0017] Based on the second vertex ordinate, the second height side length and the third vertex ordinate, the third height side length, calculate and obtain the fourth height side length of the intersection area;

[0018] Based on the fourth width side length and the fourth height side length, a second image area of ​​the intersection region is calculated.

[0019] Optionally, determining the association relationship between the target human recognition frame and the target non-motor vehicle recognition frame based on the second image area and the target image area includes:

[0020] Calculating an area ratio of the second image area to the target image area;

[0021] Based on the area ratio and a preset area ratio threshold, an association relationship between the target human body recognition frame and the target non-motor vehicle recognition frame is determined.

[0022] Optionally, the target human body recognition frame corresponds to a first vertex ordinate and a first height side length, and the target non-motor vehicle recognition frame corresponds to a third vertex ordinate and a third height side length, and the determining of the association relationship between the target human body recognition frame and the target non-motor vehicle recognition frame based on the area ratio and a preset area ratio threshold includes:

[0023] When the area ratio is greater than the preset area ratio threshold, the excess length of the bottom edge of the target human body recognition frame beyond the target non-motor vehicle recognition frame is calculated based on the first vertex ordinate, the first height side length, the third vertex ordinate, and the third height side length;

[0024] Based on the excess length and the first height side length, the excess ratio corresponding to the excess length is calculated;

[0025] Based on the excess ratio and a preset excess ratio threshold, an association relationship between the target human body recognition frame and the target non-motor vehicle recognition frame is determined.

[0026] Optionally, the determining the association relationship between the target human body recognition frame and the target non-motor vehicle recognition frame based on the excess ratio and a preset excess ratio threshold includes:

[0027] When the excess ratio is not greater than the preset excess ratio threshold, a pre-association relationship is established between the target human body recognition frame and the target non-motor vehicle recognition frame;

[0028] Counting the number of pre-associated human body recognition frames in the target image that have the pre-associated relationship with the target non-motor vehicle recognition frame;

[0029] Based on the pre-association quantity, an association relationship between the target human body recognition frame and the target non-motor vehicle recognition frame is determined.

[0030] Optionally, determining the association relationship between the target human body recognition frame and the target non-motor vehicle recognition frame based on the pre-association quantity includes:

[0031] When the pre-association quantity corresponding to the target non-motor vehicle recognition frame is one, determining the association relationship between the target non-motor vehicle recognition frame and the target human body recognition frame as association;

[0032] When the number of pre-associations corresponding to the target non-motor vehicle identification frame is multiple, calculating the longitudinal intersection ratio and the lateral distance between the target non-motor vehicle identification frame and each of the human body identification frames having a pre-association relationship;

[0033] Based on the longitudinal intersection ratio and the lateral distance, an association relationship between the target human body recognition frame and the target non-motor vehicle recognition frame is determined.

[0034] In a second aspect, an embodiment of the present invention further provides a person-vehicle association device, the person-vehicle association device comprising:

[0035] A first acquisition module, used to acquire a target image, wherein the target image includes at least one human body recognition frame and at least one non-motor vehicle recognition frame;

[0036] A first determination module is used to determine a matching area and a first image area of ​​the matching area in a target human recognition frame, wherein one target human recognition frame corresponds to one matching area, and the target human recognition frame is one of at least one human recognition frame;

[0037] A second determination module is used to determine a second image area of ​​an intersection area between the matching area and a target non-motor vehicle identification frame, wherein the target non-motor vehicle identification frame is one of at least one of the non-motor vehicle identification frames;

[0038] A third determination module is used to determine the smaller image area between the first image area and the image area of ​​the target non-motor vehicle identification frame as the target image area;

[0039] The fourth determination module is used to determine the association relationship between the target human recognition frame and the target non-motor vehicle recognition frame based on the second image area and the target image area.

[0040] In a third aspect, an embodiment of the present invention provides an electronic device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the human-vehicle association method provided in an embodiment of the present invention when executing the computer program.

[0041] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps in the human-vehicle association method provided in the embodiment of the invention are implemented.

[0042] In an embodiment of the present invention, a target image is acquired, wherein the target image includes at least one human body recognition frame and at least one non-motor vehicle recognition frame; a matching area and a first image area of ​​the matching area are determined in the target human body recognition frame, wherein one target human body recognition frame corresponds to one matching area, and the target human body recognition frame is one of at least one of the human body recognition frames; a second image area of ​​an intersection area between the matching area and the target non-motor vehicle recognition frame is determined, and the target non-motor vehicle recognition frame is one of at least one of the non-motor vehicle recognition frames; a smaller image area between the first image area and the image area of ​​the target non-motor vehicle recognition frame is determined as a target image area; and an association relationship between the target human body recognition frame and the target non-motor vehicle recognition frame is determined based on the second image area and the target image area. By determining the matching area in the human body recognition frame, a more accurate second image area can be determined based on the matching area and the non-motor vehicle recognition frame. After taking the smaller of the first image area and the target non-motor vehicle recognition frame as the target image area, the association relationship between the target non-motor vehicle recognition frame and the target human body recognition frame can be determined based on the target image area and the second image area. Since the target image area is the smaller of the first image area and the target non-motor vehicle recognition frame, the influence caused by different riding directions and angles can be avoided, so the accuracy of human-vehicle association can be effectively improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0044] Figure 1 is a flow chart of a method for associating a person with a vehicle provided by an embodiment of the present invention;

[0045] Figure 2 is a flow chart of a second method for associating a person with a vehicle provided by an embodiment of the present invention;

[0046] Figure 3 is a flow chart of area calculation in a person-vehicle association process provided by an embodiment of the present invention;

[0047] Figure 4 is a schematic diagram of calculating an excess length provided by an embodiment of the present invention;

[0048] Figure 5is a schematic diagram of calculating a longitudinal intersection ratio and a transverse distance provided by an embodiment of the present invention;

[0049] Figure 6 is a flow chart of a third method for associating a person with a vehicle provided by an embodiment of the present invention;

[0050] Figure 7 is a structural schematic diagram of a person-vehicle association device provided in an embodiment of the present invention;

[0051] Figure 8 It is a structural schematic diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0052] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0053] like Figure 1 As shown, Figure 1 : is a flow chart of a method for associating a person with a vehicle provided by an embodiment of the present invention, including:

[0054] 101. Acquire a target image.

[0055] In an embodiment of the present invention, the above-mentioned human-vehicle association method can be applied to a human-vehicle association platform. The above-mentioned human-vehicle association platform can be constructed by a server or a server cluster. The above-mentioned server or server cluster can be any electronic device with functions such as target detection, data analysis, data storage, and data transmission.

[0056] The above-mentioned target image includes at least one human recognition frame and at least one non-motor vehicle recognition frame. The above-mentioned human-vehicle association platform can obtain the image to be detected containing people and non-motor vehicles through the above-mentioned data transmission function. By performing target detection processing on any image to be detected, the above-mentioned target image (that is, the image to be detected containing a human recognition frame and a vehicle recognition frame) can be obtained.

[0057] Specifically, the above-mentioned target detection processing can be implemented by any target detector. The above-mentioned target detector can be a target detector constructed by algorithms such as the YOLO (You Only Look Once) series, Faster R-CNN, and RetinaNet. By deploying the above-mentioned target detector on the above-mentioned human-vehicle association platform, after the above-mentioned image to be detected is obtained on the human-vehicle association platform, the above-mentioned target detection processing can be implemented on the above-mentioned image to be detected by the above-mentioned target detector. It can be understood that after the above-mentioned target detector performs target detection processing on the image to be detected, it will output the recognition frame data corresponding to the above-mentioned image to be detected. The above-mentioned recognition frame data includes the type of the recognition frame and the image coordinates of the recognition frame. The above-mentioned type can be a human body type or a non-motor vehicle type. The above-mentioned image coordinates can be (x, y, width, hight), where the above-mentioned x represents the horizontal coordinate of the vertex of the recognition frame, the above-mentioned y represents the vertical coordinate of the vertex of the recognition frame, the above-mentioned width represents the width side length of the image recognition frame, and the above-mentioned hight represents the height side length of the image recognition frame.

[0058] More specifically, the target detection process can be performed as follows: Figure 2 The flowchart of the second method of human-vehicle association shown is further explained. Figure 2 The first step is included, the image input part, which can be understood as inputting the image to be detected into the target detector. The second step is that the target detector performs non-motor vehicle target detection and human body detection on the image to be detected, and obtains a non-motor vehicle target set (A) and a human body target set (B) corresponding to the non-motor vehicle. It can be understood that the set (A) stores the recognition frame data corresponding to the non-motor vehicle, and the above set (B) stores the recognition frame data corresponding to the human body. Based on any one of the human-vehicle association methods provided in the embodiments of the present invention, the non-motor vehicle recognition frame data in the above set (A) and the human body recognition frame data in the set (B) are associated and calculated to obtain the association relationship between the human body recognition frame and the non-motor vehicle recognition frame, and the human body recognition frame and the non-motor vehicle recognition frame with an associated association relationship are stored in the set (Z), the human body recognition frame with an unassociated association relationship is stored in the set (Y), and the non-motor vehicle recognition frame with an unassociated association relationship is stored in the set (X).

[0059] 102. Determine a matching area and a first image area of ​​the matching area in the target human body recognition frame.

[0060] In an embodiment of the present invention, one of the above-mentioned target human body recognition frames corresponds to one matching area, and the above-mentioned target human body recognition frame is one of at least one human body recognition frame. It is understandable that the above-mentioned matching area can be the lower half of the frame of the above-mentioned target human body recognition frame. Usually, during riding, the parts that interact with non-motor vehicles are the lower body of the human body. Therefore, only the area of ​​the lower body of the human body can be considered in the calculation process. However, the image is often taken from the front, that is, the ground is located near the bottom of the image, and the sky is located near the top of the image. Therefore, if only the area of ​​the lower body of the human body needs to be considered, the lower half of the frame of the target human body recognition frame can be calculated as the above-mentioned matching area, and the first image area of ​​the above-mentioned matching area can be calculated.

[0061] It should be noted that the above-mentioned target human recognition frame corresponds to the above-mentioned image coordinates, and the above-mentioned matching area and the above-mentioned first image area can be calculated through the above-mentioned image coordinates. If there are multiple human recognition frames in the target image, one human recognition frame can be selected each time as the above-mentioned target human recognition frame, and the matching area corresponding to the above-mentioned target human recognition frame and the above-mentioned first image area can be calculated. It can be understood that the image coordinates corresponding to the above-mentioned human recognition frame can be used to calculate the image coordinates of the lower half of the human recognition frame (i.e., the image coordinates of the matching area), the image coordinates of the above-mentioned matching area represent the above-mentioned matching area, and the above-mentioned first image area is calculated through the image coordinates of the above-mentioned matching area.

[0062] 103. Determine a second image area of ​​an intersection region between the matching region and the target non-motor vehicle identification frame.

[0063] In an embodiment of the present invention, the above-mentioned target non-motor vehicle identification frame is one of at least one non-motor vehicle identification frame. After the image coordinates of the above-mentioned matching area are calculated through the image coordinates corresponding to the above-mentioned target human body recognition frame, the second image area of ​​the above-mentioned intersection area can be calculated through the image coordinates of the above-mentioned matching area and the image coordinates corresponding to the above-mentioned target non-motor vehicle identification frame.

[0064] 104. Determine a smaller image area between the first image area and the image area of ​​the target non-motor vehicle identification frame as the target image area.

[0065] In the embodiment of the present invention, if the acquisition angle of the target image is the side of the target non-motor vehicle, the image area of ​​the target non-motor vehicle identification frame is often larger than the first image area, and if the acquisition angle of the target image is the front or back of the target non-motor vehicle, the image area of ​​the target non-motor vehicle identification frame is often smaller than the first image area. Therefore, in order to avoid the change of the acquisition angle, which leads to a decrease in the accuracy of the human-vehicle association, the smaller image area between the first image area and the image area of ​​the target non-motor vehicle identification frame can be determined as the target image area. And the association relationship between the target human body recognition and the target non-motor vehicle identification frame is determined by the above target image area.

[0066] 105. Determine an association relationship between a target human recognition frame and a target non-motor vehicle recognition frame based on the second image area and the target image area.

[0067] In an embodiment of the present invention, an area ratio of the second image area to the target image area may be calculated, and the area ratio may be compared with a preset area ratio threshold. When the area ratio is greater than the area ratio threshold, the association relationship between the target human body recognition frame and the target non-motor vehicle recognition frame is associated. When the area ratio is less than or equal to the area ratio threshold, the association relationship between the target human body recognition frame and the target non-motor vehicle recognition frame is unassociated.

[0068] It should be noted that the above-mentioned preset area ratio threshold can be set based on historical human-vehicle association experience, or obtained through a limited number of tests.

[0069] In an embodiment of the present invention, a target image is acquired, wherein the target image includes at least one human body recognition frame and at least one non-motor vehicle recognition frame; a matching area and a first image area of ​​the matching area are determined in the target human body recognition frame, wherein one target human body recognition frame corresponds to one matching area, and the target human body recognition frame is one of at least one of the human body recognition frames; a second image area of ​​an intersection area between the matching area and the target non-motor vehicle recognition frame is determined, and the target non-motor vehicle recognition frame is one of at least one of the non-motor vehicle recognition frames; a smaller image area between the first image area and the image area of ​​the target non-motor vehicle recognition frame is determined as a target image area; and an association relationship between the target human body recognition frame and the target non-motor vehicle recognition frame is determined based on the second image area and the target image area. By determining the matching area in the human body recognition frame, a more accurate second image area can be determined based on the matching area and the non-motor vehicle recognition frame. After taking the smaller of the first image area and the target non-motor vehicle recognition frame as the target image area, the association relationship between the target non-motor vehicle recognition frame and the target human body recognition frame can be determined based on the target image area and the second image area. Since the target image area is the smaller of the first image area and the target non-motor vehicle recognition frame, the influence caused by different riding directions and angles can be avoided, so the accuracy of human-vehicle association can be effectively improved.

[0070] It is understandable that in the specific implementation of the present application, data related to target images, human recognition frames, non-motor vehicle recognition frames, etc., when the embodiments in the present application are applied to specific products or technologies, user permission or consent is required, and the collection, use and processing of relevant data and the construction, training and use of related models need to comply with relevant laws, regulations and standards of relevant countries and regions.

[0071] It should be noted that the person-vehicle association method provided in the embodiment of the present invention can be applied to devices such as computers and servers that can perform person-vehicle association.

[0072] Optionally, in the step of determining the matching area and the first image area of ​​the matching area in the target human body recognition frame, the shorter side length between the first width side length and the first height side length can also be determined as the target side length; based on the target side length and the first vertex coordinates, the second vertex coordinates of the matching area are determined; based on the target side length, the second height side length and the second width side length of the matching area are determined; based on the second vertex coordinates, the second height side length and the second width side length of the matching area, the matching area and the first image area of ​​the matching area are determined.

[0073] In the embodiment of the present invention, the target human body recognition frame corresponds to a first vertex coordinate, a first width side length and a first height side length, and the first vertex coordinate includes a first vertex horizontal coordinate and a first vertex vertical coordinate.

[0074] It should be noted that since the recognition frame and the matching area determined by the recognition frame (i.e., the lower half of the human body recognition frame) are both rectangles, their corresponding vertices include the upper left vertex, the upper right vertex, the lower left vertex, and the lower right vertex, and the vertex coordinates mentioned in the embodiment of the present invention can be any one of the above-mentioned upper left vertex, upper right vertex, lower left vertex, and lower right vertex.

[0075] Specifically, the first image area can be obtained by Figure 3 The flowchart of area calculation in the process of human-vehicle association shown further illustrates that: Figure 3 The non-motor vehicle position includes a recognition frame corresponding to the non-motor vehicle position (that is, it can be a target non-motor vehicle recognition frame), a recognition frame corresponding to the human body position (that is, it can be a target human body recognition frame), and Figure 3 In the second example figure from left to right, Area(body) (that is, it can be the above-mentioned matching area) and Area(intersection) (that is, it can be the intersection area of ​​the intersection area between the matching area and the non-motor vehicle identification box).

[0076] Assume that the coordinates of the target human body rectangular frame are: Rect1(x, y, width, hight), width can be abbreviated as W, hight can be abbreviated as H, that is, the first width side length of the target human body recognition frame is W, and the first height side length is H. Calculate the shortest side of the first height side length (H) and the first width side length (W) as the target side length, that is, L = min (H, W). With the target side length L, recalculate an area in the lower half of the human body as the matching area Rect2 (x, y, width, hight), and the calculation formula is:

[0077] Rect2.x=Rect1.x-(Rect1.width-L) / 2;

[0078] Rect2.y=Rect1.y+Rect1.hight–L;

[0079] Rect2.width = L;

[0080] Rect2.hight = L;

[0081] The second vertex coordinates of the matching area include the second vertex horizontal coordinate and the second vertex vertical coordinate, and the first vertex coordinates also include the first vertex horizontal coordinate and the first vertex vertical coordinate. Rect2.x represents the second vertex horizontal coordinate, Rect2.y represents the second vertex vertical coordinate, Rect1.x represents the first vertex horizontal coordinate, Rect1.y represents the first vertex vertical coordinate, Rect1.width represents the first width side length, Rect1.hight represents the first height side length, Rect2.width represents the second width side length, and Rect2.hight represents the second height side length.

[0082] After determining the second vertex coordinates, the second height side length and the second width side length, the second height side length and the second width side length can be multiplied to obtain the first image area. At the same time, the position and range of the matching area in the target image are determined according to the second vertex coordinates, the second height side length and the second width side length, which are used to represent the matching area.

[0083] Optionally, in the step of determining the second image area of ​​the intersection area between the matching area and the target non-motor vehicle identification frame, the fourth width side length of the intersection area can also be calculated based on the second vertex horizontal coordinate, the second width side length and the third vertex horizontal coordinate, the third width side length; the fourth height side length of the intersection area can be calculated based on the second vertex vertical coordinate, the second height side length and the third vertex vertical coordinate, the third height side length; and the second image area of ​​the intersection area can be calculated based on the fourth width side length and the fourth height side length.

[0084] In an embodiment of the present invention, the above-mentioned target non-motor vehicle identification frame corresponds to a third vertex coordinate, a third height side length and a third width side length, the third vertex coordinate includes a third vertex horizontal coordinate and a third vertex vertical coordinate, and the second vertex coordinate includes a second vertex horizontal coordinate and a second vertex vertical coordinate.

[0085] The second image area can also be obtained by Figure 3 The flowchart of area calculation in the process of human-vehicle association shown in FIG. further illustrates that the area of ​​the second image can be understood as Figure 3 Area(intersection) in the third example from left to right.

[0086] Assume that the image coordinates of the target non-motor vehicle identification frame are Rect3 (x, y, width, hight); the image coordinates of the matching area are Rect2 (x, y, width, hight), and the second image area of ​​the above-mentioned intersection area is calculated by the image coordinates of the above-mentioned target non-motor vehicle identification frame and the image coordinates of the above-mentioned matching area.

[0087] The specific calculation process is as follows:

[0088] Rect4.x=min(Rect3.x,Rect2.x);

[0089] Rect4.y=min(Rect3.y,Rect2.y);

[0090] Rect4.width=min(Rect3.x+Rect3.width,Rect2.x+Rect2.width)-Rect4.x;

[0091] Rect4.hight=min(Rect3.y+Rect3.hight,Rect2.y+Rect2.hight)-Rect4.y;

[0092] Among them, the above Rect3.x represents the abscissa of the third vertex, the above Rect2.x represents the abscissa of the second vertex, the above Rect4.x represents the abscissa of the fourth vertex (which can be understood as the abscissa of the vertex in the intersection area), the above Rect3.y represents the ordinate of the third vertex, the above Rect2.y represents the ordinate of the second vertex, and the above Rect4.y represents the ordinate of the fourth vertex (which can be understood as the ordinate of the vertex in the intersection area). Rect3.width represents the third width side length, the above Rect3.hight represents the third height side length, the above Rect2.width represents the second width side length, the above Rect2.hight represents the second height side length, the above Rect4.width represents the fourth width side length, and the above Rect4.hight represents the fourth height side length.

[0093] After obtaining the fourth width side length and the fourth height side length, since the matching area and the target non-motor vehicle identification frame are both rectangles, the second image area of ​​the intersection area can be calculated by the rectangular area calculation formula, that is, multiplying the fourth width side length and the fourth height side length to obtain the second image area.

[0094] Optionally, in the step of determining the association relationship between the target human recognition frame and the target non-motor vehicle recognition frame based on the second image area and the target image area, the area ratio of the second image area to the target image area can also be calculated; based on the area ratio and a preset area ratio threshold, the association relationship between the target human recognition frame and the target non-motor vehicle recognition frame is determined.

[0095] In the embodiment of the present invention, the above area ratio can be described by the following formula:

[0096] f(a)=Area(Rect4) / min(Area(Rect2),Area(Rect3));

[0097] Wherein, the above f(a) represents the above area ratio, the above Area(Rect4) represents the above second image area, and the above min(Area(Rect2), Area(Rect3)) represents the above target image area (i.e., the smaller one of the first image area and the image area of ​​the non-motor vehicle identification frame). It should be noted that Area(Rect)=Rect.width*Rect.height, that is, the image area is obtained by multiplying the width side length and the height side length.

[0098] After the area ratio is calculated, the area ratio can be compared with the preset area ratio threshold. When the area ratio is greater than the area ratio threshold, the association relationship between the target human recognition frame and the target non-motor vehicle recognition frame is associated. When the area ratio is less than or equal to the area ratio threshold, the association relationship between the target human recognition frame and the target non-motor vehicle recognition frame is not associated. The preset area ratio threshold can also be set by historical human-vehicle association experience or obtained by a limited number of tests.

[0099] Optionally, in the step of determining the association relationship between the target human recognition frame and the target non-motor vehicle recognition frame based on the area ratio and a preset area ratio threshold, when the area ratio is greater than the preset area ratio threshold, the excess length of the bottom edge of the target human recognition frame exceeding the target non-motor vehicle recognition frame can be calculated based on the first vertex ordinate, the first height side length and the third vertex ordinate, the third height side length; the excess ratio corresponding to the above-mentioned excess length can be calculated based on the excess length and the first height side length; and the association relationship between the target human recognition frame and the target non-motor vehicle recognition frame can be determined based on the excess ratio and the preset excess ratio threshold.

[0100] In the embodiment of the present invention, the target human identification frame corresponds to a first vertex ordinate and a first height side length, and the target non-motor vehicle identification frame corresponds to a third vertex ordinate and a third height side length.

[0101] The above method of comparing the area ratio with the preset area ratio threshold can optimize the non-motor vehicle and the human body at different grip angles and has good robustness. However, when the distance between the roadside pedestrian and the non-motor vehicle is relatively close, the calculation method cannot effectively separate them. For this reason, additional supplementary judgment conditions can be added. f(a) (i.e., area ratio)>F(a) (i.e., area ratio threshold). Under the premise of intersection, additional judgment is required on whether the human body is in a sitting posture. If the human body is in a riding state, the bottom edge of the human body should not deviate too far from the bottom edge of the non-motor vehicle.

[0102] Specifically, the above-mentioned excess length can be obtained by Figure 4 The following is a schematic diagram of the excess length calculation: Figure 4 It includes a target human body recognition frame corresponding to the human body position, a target non-motor vehicle recognition frame corresponding to the non-motor vehicle position, and an intersection area (ie, Area (intersection)) between the matching area and the target non-motor vehicle recognition frame.

[0103] The above excess length can be calculated by the following formula:

[0104] h'=(Rect1.y+Rect1.hight)-(Rect3.y+Rect3.hight);

[0105] Among them, the above h' represents the above excess length, the above Rect1.y represents the ordinate of the above first vertex, the above Rect1.hight represents the side length of the above first height, the above Rect3.y represents the ordinate of the above third vertex, and the above Rect3.hight represents the side length of the above third height.

[0106] After calculating the above-mentioned excess length, the excess ratio can be further calculated according to the above-mentioned excess length and the above-mentioned first height side length, that is, f(h)=h' / Rect1.hight. The above-mentioned f(h) represents the above-mentioned excess ratio, the above-mentioned h' represents the above-mentioned excess length, and the above-mentioned Rect1.hight represents the above-mentioned first height side length. It can be understood that the above-mentioned excess ratio is the ratio of the above-mentioned excess length to the above-mentioned first height side length.

[0107] After the above-mentioned excess ratio is calculated, the above-mentioned excess ratio is compared with the above-mentioned preset excess ratio threshold. When the above-mentioned excess ratio is greater than the above-mentioned preset excess ratio threshold, the association relationship between the above-mentioned target human recognition frame and the above-mentioned target non-motor vehicle recognition frame is unassociated. When the above-mentioned excess ratio is less than or equal to the above-mentioned preset excess ratio threshold, the association relationship between the above-mentioned target human recognition frame and the above-mentioned target non-motor vehicle recognition frame is associated. The above-mentioned preset excess ratio threshold can also be set through historical human-vehicle association experience or obtained through a limited number of tests.

[0108] In a possible embodiment, when a human body recognition frame simultaneously meets the association condition with multiple non-motor vehicle recognition frames (that is, the above-mentioned area ratio is greater than the above-mentioned area ratio threshold and the above-mentioned excess proportion is less than or equal to the above-mentioned preset excess proportion threshold), at this time, the excess proportion is less than or equal to the above-mentioned preset excess proportion threshold, and the association relationship between the human body recognition frame and the non-motor vehicle recognition frame corresponding to the largest area ratio can be determined as an association.

[0109] Optionally, in the step of determining the association relationship between the target human recognition frame and the target non-motor vehicle recognition frame based on the excess ratio and a preset excess ratio threshold, it is also possible to establish a pre-association relationship between the target human recognition frame and the target non-motor vehicle recognition frame when the excess ratio is not greater than the preset excess ratio threshold; count the pre-association number of human recognition frames in the target image that have a pre-association relationship with the target non-motor vehicle recognition frame; and determine the association relationship between the target human recognition frame and the target non-motor vehicle recognition frame based on the pre-association number.

[0110] In an embodiment of the present invention, when the excess ratio is less than or equal to the preset excess ratio threshold, a pre-association relationship is established between the target human identification frame and the target non-motor vehicle identification frame. Specifically, it can be understood that the target human identification frame and the target non-motor vehicle identification frame meet the above association condition (that is, when the above area ratio is greater than the above area ratio threshold and the above excess ratio is less than or equal to the above preset excess ratio threshold).

[0111] After completing the pre-association judgment between all human recognition frames and all non-motor vehicle recognition frames, the pre-association number of human recognition frames in the target image that have a pre-association relationship with the target non-motor vehicle recognition frame can be obtained by counting.

[0112] When the number of pre-associations corresponding to the target non-motor vehicle identification frame is one, it means that there is no dispute over the human body identification frame, and there is only one target human body identification frame, so the association relationship between the target human body identification frame and the target non-motor vehicle identification frame can be determined as an association. When the number of pre-associations is multiple, the longitudinal intersection ratio and the lateral distance between the target non-motor vehicle identification frame and each human body identification frame with a pre-association relationship can be calculated, and based on the longitudinal intersection ratio and the lateral distance, the association relationship between the target human body identification frame and the target non-motor vehicle identification frame can be determined.

[0113] Optionally, in the step of determining the association relationship between the target human recognition frame and the target non-motor vehicle recognition frame based on the pre-association quantity, when the pre-association quantity corresponding to the target non-motor vehicle recognition frame is one, the association relationship between the target non-motor vehicle recognition frame and the target human recognition frame can be determined as an association; when the pre-association quantity corresponding to the target non-motor vehicle recognition frame is multiple, the longitudinal intersection ratio and the lateral distance between the target non-motor vehicle recognition frame and each human recognition frame with which there is a pre-association relationship are calculated; based on the longitudinal intersection ratio and the lateral distance, the association relationship between the target human recognition frame and the target non-motor vehicle recognition frame is determined.

[0114] In the embodiment of the present invention, considering that there are adults and children on board, and individuals are also of different heights, weights and body types, there will be a longitudinal intersection with non-motor vehicles when riding non-motor vehicles. Therefore, the longitudinal intersection ratio between each human body recognition frame and the target non-motor vehicle recognition frame can be calculated. And considering the maximum limit on the number of passengers on a single non-motor vehicle, the lateral distance can be introduced as one of the bases for judging the association relationship. Thereby determining the association relationship between the target human body recognition frame and the target non-motor vehicle recognition frame. It can be understood that the above lateral distance can be the distance between the center point of the human body recognition frame and the center point of the non-motor vehicle recognition frame.

[0115] Specifically, the longitudinal intersection ratio and the transverse distance can be obtained by Figure 5 A schematic diagram of calculating the longitudinal intersection ratio and the lateral distance is shown for further explanation. Figure 5 In the figure, the example figure on the left is a schematic diagram for calculating the longitudinal intersection ratio, and the example figure on the right is a schematic diagram for calculating the lateral distance (or can be understood as the lateral center distance).

[0116] The above longitudinal intersection ratio can be calculated by the following formula:

[0117] f(h2)=((Rect1.y+Rect1.hight)-(Rect3.y)) / Rect1.hight;

[0118] Among them, the above f(h2) represents the above longitudinal intersection ratio, the above Rect1.y represents the vertical coordinate of the above first vertex, the above Rect1.hight represents the side length of the first height, and the above Rect3.y represents the vertical coordinate of the above third vertex.

[0119] When f(h2) is lower than F(h2) (longitudinal intersection ratio threshold), the association relationship between the target non-motor vehicle identification frame and the target human identification frame is unassociated; conversely, when f(h2) is not lower than F(h2) (longitudinal intersection ratio threshold), the association relationship between the target non-motor vehicle identification frame and the target human identification frame is associated.

[0120] If the target non-motor vehicle identification frame and the target human body identification frame have a pre-association relationship (i.e., the area ratio is greater than the area ratio threshold and the excess ratio is less than or equal to the excess ratio threshold), and the longitudinal intersection ratio is not lower than the longitudinal intersection ratio threshold, the lateral distance between the target human body identification frame and the target non-motor vehicle identification frame in the target image, as well as the lateral distance between other human body identification frames and the target non-motor vehicle identification frame can be calculated. It should be noted that the other human body identification frames also have a pre-association relationship with the target non-motor vehicle identification frame, and the longitudinal intersection ratio is not lower than the longitudinal intersection ratio threshold.

[0121] After calculating the above lateral distance, the target human body recognition frame and other human body recognition frames can be sorted according to the above lateral distance to obtain a lateral distance sorting table. In the above lateral distance sorting table, take the human body recognition frame corresponding to Top(N)=list(w1,w2,...) with the closest lateral distance, and determine the association relationship between the above Top(N) and the above target non-motor vehicle recognition frame as association. At this time, if the above target human body recognition frame is in the above Top(N), then its corresponding association relationship is association, otherwise, if it is not in the above Top(N), then its corresponding association relationship is no relationship.

[0122] It is understandable that the above Top(N) can be set based on historical human-vehicle association experience or can be obtained based on a limited number of tests. For example, under normal circumstances, a non-motor vehicle can often accommodate a driver and two passengers. In this case, the above Top(N) can be Top(3).

[0123] It can be seen that Figure 5, the longitudinal intersection ratio corresponding to the human body position 01 (i.e., the first human body recognition frame) is the ratio between 01h' and 01h, the longitudinal intersection ratio corresponding to the human body position 02 (i.e., the second human body recognition frame) is the ratio between 02h' and 02h, the lateral distance between the human body position 01 and the target non-motor vehicle recognition frame is 01W, and the lateral distance between the human body position 02 and the target non-motor vehicle recognition frame is 02W.

[0124] It can be understood that when the number of pre-associations is multiple, introducing the longitudinal intersection ratio and the lateral distance as the basis for judging between the target non-motor vehicle recognition frame and the target human recognition frame can reduce the probability of false association when the target density is large.

[0125] like Figure 6 As shown, the embodiment of the present invention also provides a flowchart of a third method for associating a person with a vehicle. Figure 6 In the figure, the human body set B includes all human body recognition frames in the target image (i.e., the type of recognition frames and image coordinates), and the non-motor vehicle set A includes all non-motor vehicle recognition frames in the target image (i.e., the type of recognition frames and image coordinates).

[0126] The association calculation process is to extract the target non-motor vehicle identification frames one by one from the non-motor vehicle set A (i.e., extract non-motor vehicle 01, non-motor vehicle 02 to non-motor vehicle n), and extract the human body identification frames one by one from the human body set as the target human body identification frames, and use any of the human-vehicle association methods provided in the embodiment of the present invention to calculate the association relationship between the two, and obtain an unassociated non-motor vehicle set and an unassociated human body set, as well as a non-motor vehicle identification frame and a human body identification frame with a pre-association relationship. The above-mentioned association filtering is performed by the longitudinal intersection ratio and the lateral distance provided in the embodiment of the present invention, so as to determine the association relationship between the non-motor vehicle identification frame and the human body identification frame, and establish a corresponding relationship between the human body identification frame and the non-motor vehicle identification frame with an associated relationship, and store them in the association set. The non-motor vehicle identification frame corresponding to the association relationship that is not associated with the human body identification frame is stored in the unassociated non-motor vehicle set, and the human body identification frame corresponding to the association relationship that is not associated with the non-motor vehicle identification frame is stored in the unassociated human body set. Finally, an unassociated non-motor vehicle target set, an unassociated human body target set, and an associated human body and non-motor vehicle target set can be obtained.

[0127] like Figure 7 As shown, an embodiment of the present invention further provides a person-vehicle association device, comprising:

[0128] A first acquisition module 701 is used to acquire a target image, wherein the target image includes at least one human body recognition frame and at least one non-motor vehicle recognition frame;

[0129] A first determination module 702 is used to determine a matching area and a first image area of ​​the matching area in a target human recognition frame, wherein one target human recognition frame corresponds to one matching area, and the target human recognition frame is one of at least one human recognition frame;

[0130] A second determination module 703 is used to determine a second image area of ​​an intersection area between the matching area and a target non-motor vehicle identification frame, wherein the target non-motor vehicle identification frame is one of the at least one non-motor vehicle identification frame;

[0131] A third determination module 704 is used to determine the smaller image area between the first image area and the image area of ​​the target non-motor vehicle identification frame as the target image area;

[0132] The fourth determination module 705 is used to determine the association relationship between the target human recognition frame and the target non-motor vehicle recognition frame based on the second image area and the target image area.

[0133] Optionally, the target human body recognition frame corresponds to a first vertex coordinate, a first width side length, and a first height side length, and the first determination module 702 includes:

[0134] A first determining submodule, configured to determine the shorter side length of the first width side length and the first height side length as a target side length;

[0135] A second determination submodule, configured to determine the second vertex coordinates of the matching area based on the target side length and the first vertex coordinates;

[0136] A third determination submodule, configured to determine a second height side length and a second width side length of the matching area based on the target side length;

[0137] The fourth determination submodule is used to determine the matching area and the first image area of ​​the matching area based on the second vertex coordinates, the second height side length and the second width side length of the matching area.

[0138] Optionally, the target non-motor vehicle identification frame corresponds to a third vertex coordinate, a third height side length, and a third width side length, the third vertex coordinate includes a third vertex horizontal coordinate and a third vertex vertical coordinate, the second vertex coordinate includes a second vertex horizontal coordinate and a second vertex vertical coordinate, and the second ground determination module 703 includes:

[0139] A first calculation submodule, configured to calculate a fourth width side length of the intersection area based on the second vertex horizontal coordinate, the second width side length, the third vertex horizontal coordinate, and the third width side length;

[0140] A second calculation submodule, configured to calculate a fourth height side length of the intersection area based on the second vertex ordinate, the second height side length, the third vertex ordinate, and the third height side length;

[0141] The third calculation submodule is used to calculate the second image area of ​​the intersection region based on the fourth width side length and the fourth height side length.

[0142] Optionally, the fourth determining module 705 includes:

[0143] a fourth determination submodule, configured to calculate an area ratio between the second image area and the target image area;

[0144] The fifth determination submodule is used to determine the association relationship between the target human recognition frame and the target non-motor vehicle recognition frame based on the area ratio and a preset area ratio threshold.

[0145] Optionally, the target human body recognition frame corresponds to a first vertex ordinate and a first height side length, the target non-motor vehicle recognition frame corresponds to a third vertex ordinate and a third height side length, and the fifth determination submodule includes:

[0146] A first calculation unit is used for calculating, when the area ratio is greater than the preset area ratio threshold, based on the first vertex ordinate, the first height side length, the third vertex ordinate, and the third height side length, to obtain an excess length of the bottom edge of the target human body recognition frame beyond the target non-motor vehicle recognition frame;

[0147] A second calculation unit, configured to calculate an excess ratio corresponding to the excess length based on the excess length and the first height side length;

[0148] The first determination unit is used to determine the association relationship between the target human recognition frame and the target non-motor vehicle recognition frame based on the excess ratio and a preset excess ratio threshold.

[0149] Optionally, the first determining unit includes:

[0150] A first establishing subunit is used to establish a pre-association relationship between the target human body recognition frame and the target non-motor vehicle recognition frame when the excess ratio is not greater than the preset excess ratio threshold;

[0151] A first counting subunit is used to count the pre-associated number of human body recognition frames in the target image that have the pre-associated relationship with the target non-motor vehicle recognition frame;

[0152] The first determining subunit is used to determine the association relationship between the target human body recognition frame and the target non-motor vehicle recognition frame based on the pre-association quantity.

[0153] Optionally, the first determining subunit includes:

[0154] A first processing subunit is configured to determine the association relationship between the target non-motor vehicle recognition frame and the target human body recognition frame as an association when the pre-association quantity corresponding to the target non-motor vehicle recognition frame is one;

[0155] A second processing subunit is configured to calculate a longitudinal intersection ratio and a lateral distance between the target non-motor vehicle identification frame and each of the human body identification frames having a pre-association relationship when the target non-motor vehicle identification frame corresponds to a plurality of pre-association quantities;

[0156] The second determining subunit is used to determine the association relationship between the target human body recognition frame and the target non-motor vehicle recognition frame based on the longitudinal intersection ratio and the lateral distance.

[0157] like Figure 8 As shown, an embodiment of the present invention further provides an electronic device, characterized in that it includes a processor, and the processor can execute any one of the above-mentioned human-vehicle association methods.

[0158] Specifically, it includes a processor 801 and a memory 802, and a computer program for executing the person-vehicle association method stored in the memory 802 and capable of running on the processor 801, wherein:

[0159] The processor 801 runs the computer program of the person-vehicle association method stored in the memory 802 and performs the following steps:

[0160] Acquire a target image, wherein the target image includes at least one human body recognition frame and at least one non-motor vehicle recognition frame;

[0161] Determine a matching area and a first image area of ​​the matching area in a target human body recognition frame, wherein one target human body recognition frame corresponds to one matching area, and the target human body recognition frame is one of at least one of the human body recognition frames;

[0162] Determine a second image area of ​​an intersection area between the matching area and a target non-motor vehicle identification frame, the target non-motor vehicle identification frame being one of at least one of the non-motor vehicle identification frames;

[0163] Determine the smaller image area between the first image area and the image area of ​​the target non-motor vehicle identification frame as the target image area;

[0164] Based on the second image area and the target image area, an association relationship between the target human recognition frame and the target non-motor vehicle recognition frame is determined.

[0165] Optionally, the target human body recognition frame corresponds to a first vertex coordinate, a first width side length, and a first height side length, and the processor 801 determines the matching area and the first image area of ​​the matching area in the target human body recognition frame, including:

[0166] Determine the shorter side length of the first width side length and the first height side length as the target side length;

[0167] Determine the second vertex coordinates of the matching area based on the target side length and the first vertex coordinates;

[0168] Based on the target side length, determining a second height side length and a second width side length of the matching area;

[0169] Based on the second vertex coordinates, the second height side length, and the second width side length of the matching area, a matching area and a first image area of ​​the matching area are determined.

[0170] Optionally, the target non-motor vehicle identification frame corresponds to a third vertex coordinate, a third height side length, and a third width side length, the third vertex coordinate includes a third vertex horizontal coordinate and a third vertex vertical coordinate, the second vertex coordinate includes a second vertex horizontal coordinate and a second vertex vertical coordinate, and the processor 801 performs the step of determining a second image area of ​​an intersection area between the matching area and the target non-motor vehicle identification frame, including:

[0171] Based on the second vertex horizontal coordinate, the second width side length, the third vertex horizontal coordinate, and the third width side length, calculate and obtain the fourth width side length of the intersection area;

[0172] Based on the second vertex ordinate, the second height side length, the third vertex ordinate, and the third height side length, calculate and obtain the fourth height side length of the intersection area;

[0173] Based on the fourth width side length and the fourth height side length, a second image area of ​​the intersection region is calculated.

[0174] Optionally, the determining of the association relationship between the target human body recognition frame and the target non-motor vehicle recognition frame based on the second image area and the target image area performed by the processor 801 includes:

[0175] Calculating an area ratio of the second image area to the target image area;

[0176] Based on the area ratio and a preset area ratio threshold, an association relationship between the target human body recognition frame and the target non-motor vehicle recognition frame is determined.

[0177] Optionally, the target human body recognition frame corresponds to a first vertex ordinate and a first height side length, and the target non-motor vehicle recognition frame corresponds to a third vertex ordinate and a third height side length, and the processor 801 determines the association relationship between the target human body recognition frame and the target non-motor vehicle recognition frame based on the area ratio and a preset area ratio threshold, including:

[0178] When the area ratio is greater than the preset area ratio threshold, the excess length of the bottom edge of the target human body recognition frame beyond the target non-motor vehicle recognition frame is calculated based on the first vertex ordinate, the first height side length, the third vertex ordinate, and the third height side length;

[0179] Based on the excess length and the first height side length, the excess ratio corresponding to the excess length is calculated;

[0180] Based on the excess ratio and a preset excess ratio threshold, an association relationship between the target human body recognition frame and the target non-motor vehicle recognition frame is determined.

[0181] Optionally, the processor 801 determines the association relationship between the target human body recognition frame and the target non-motor vehicle recognition frame based on the excess ratio and a preset excess ratio threshold, including:

[0182] When the excess ratio is not greater than the preset excess ratio threshold, a pre-association relationship is established between the target human body recognition frame and the target non-motor vehicle recognition frame;

[0183] Counting the number of pre-associated human body recognition frames in the target image that have the pre-associated relationship with the target non-motor vehicle recognition frame;

[0184] Based on the pre-association quantity, an association relationship between the target human body recognition frame and the target non-motor vehicle recognition frame is determined.

[0185] Optionally, the determining of the association relationship between the target human body recognition frame and the target non-motor vehicle recognition frame based on the pre-association quantity performed by the processor 801 includes:

[0186] When the pre-association quantity corresponding to the target non-motor vehicle recognition frame is one, determining the association relationship between the target non-motor vehicle recognition frame and the target human body recognition frame as association;

[0187] When the number of pre-associations corresponding to the target non-motor vehicle identification frame is multiple, calculating the longitudinal intersection ratio and the lateral distance between the target non-motor vehicle identification frame and each of the human body identification frames having a pre-association relationship;

[0188] Based on the longitudinal intersection ratio and the lateral distance, an association relationship between the target human body recognition frame and the target non-motor vehicle recognition frame is determined.

[0189] An embodiment of the present invention also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the computer program implements the various processes of the human-vehicle association method or the application-side human-vehicle association method provided in the embodiment of the present invention, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.

[0190] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program, and the above-mentioned computer program can be stored in a computer-readable storage medium, and when the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, the above-mentioned computer-readable storage medium can be a disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM), etc.

[0191] The above disclosure is only the preferred embodiment of the present invention, which certainly cannot be used to limit the scope of the present invention. Therefore, equivalent changes made according to the claims of the present invention are still within the scope of the present invention.

Claims

1. A method for associating a person with a vehicle, characterized in that: The method comprises the following steps: Acquire a target image, wherein the target image includes at least one human body recognition frame and at least one non-motor vehicle recognition frame; Determine a matching area and a first image area of ​​the matching area in a target human body recognition frame, wherein one target human body recognition frame corresponds to one matching area, and the target human body recognition frame is one of at least one of the human body recognition frames; Determine a second image area of ​​an intersection area between the matching area and a target non-motor vehicle identification frame, the target non-motor vehicle identification frame being one of at least one of the non-motor vehicle identification frames; Determine the smaller image area between the first image area and the image area of ​​the target non-motor vehicle identification frame as the target image area; Based on the second image area and the target image area, an association relationship between the target human recognition frame and the target non-motor vehicle recognition frame is determined.

2. The method for associating a person with a vehicle according to claim 1, characterized in that: The target human body recognition frame corresponds to a first vertex coordinate, a first width side length, and a first height side length, and determining a matching area and a first image area of ​​the matching area in the target human body recognition frame includes: Determine the shorter side length of the first width side length and the first height side length as the target side length; Determine the second vertex coordinates of the matching area based on the target side length and the first vertex coordinates; Based on the target side length, determining a second height side length and a second width side length of the matching area; Based on the second vertex coordinates, the second height side length, and the second width side length of the matching area, a matching area and a first image area of ​​the matching area are determined.

3. The method for associating a person with a vehicle according to claim 2, characterized in that: The target non-motor vehicle identification frame corresponds to a third vertex coordinate, a third height side length, and a third width side length, the third vertex coordinate includes a third vertex horizontal coordinate and a third vertex vertical coordinate, the second vertex coordinate includes a second vertex horizontal coordinate and a second vertex vertical coordinate, and the second image area of ​​the intersection area between the matching area and the target non-motor vehicle identification frame is determined, including: Based on the second vertex horizontal coordinate, the second width side length, the third vertex horizontal coordinate, and the third width side length, calculate and obtain the fourth width side length of the intersection area; Based on the second vertex ordinate, the second height side length and the third vertex ordinate, the third height side length, calculate and obtain the fourth height side length of the intersection area; Based on the fourth width side length and the fourth height side length, a second image area of ​​the intersection region is calculated.

4. The method for associating a person with a vehicle according to claim 1, characterized in that: The determining, based on the second image area and the target image area, the association relationship between the target human body recognition frame and the target non-motor vehicle recognition frame includes: Calculating an area ratio of the second image area to the target image area; Based on the area ratio and a preset area ratio threshold, an association relationship between the target human body recognition frame and the target non-motor vehicle recognition frame is determined.

5. The method for associating a person with a vehicle according to claim 4, characterized in that: The target human body recognition frame corresponds to a first vertex ordinate and a first height side length, the target non-motor vehicle recognition frame corresponds to a third vertex ordinate and a third height side length, and the determining of the association relationship between the target human body recognition frame and the target non-motor vehicle recognition frame based on the area ratio and a preset area ratio threshold value includes: When the area ratio is greater than the preset area ratio threshold, the excess length of the bottom edge of the target human body recognition frame beyond the target non-motor vehicle recognition frame is calculated based on the first vertex ordinate, the first height side length, the third vertex ordinate, and the third height side length; Based on the excess length and the first height side length, the excess ratio corresponding to the excess length is calculated; Based on the excess ratio and a preset excess ratio threshold, an association relationship between the target human body recognition frame and the target non-motor vehicle recognition frame is determined.

6. The method for associating a person with a vehicle according to claim 5, characterized in that: The determining, based on the excess ratio and a preset excess ratio threshold, an association relationship between the target human body recognition frame and the target non-motor vehicle recognition frame includes: When the excess ratio is not greater than the preset excess ratio threshold, a pre-association relationship is established between the target human body recognition frame and the target non-motor vehicle recognition frame; Counting the number of pre-associated human body recognition frames in the target image that have the pre-associated relationship with the target non-motor vehicle recognition frame; Based on the pre-association quantity, an association relationship between the target human body recognition frame and the target non-motor vehicle recognition frame is determined.

7. The method for associating a person with a vehicle according to claim 6, characterized in that: The determining, based on the pre-association quantity, an association relationship between the target human body recognition frame and the target non-motor vehicle recognition frame includes: When the pre-association quantity corresponding to the target non-motor vehicle recognition frame is one, determining the association relationship between the target non-motor vehicle recognition frame and the target human body recognition frame as association; When the number of pre-associations corresponding to the target non-motor vehicle identification frame is multiple, calculating the longitudinal intersection ratio and the lateral distance between the target non-motor vehicle identification frame and each of the human body identification frames having a pre-association relationship; Based on the longitudinal intersection ratio and the lateral distance, an association relationship between the target human body recognition frame and the target non-motor vehicle recognition frame is determined.

8. A human-vehicle association device, characterized in that: The human-vehicle association device comprises: A first acquisition module, used to acquire a target image, wherein the target image includes at least one human body recognition frame and at least one non-motor vehicle recognition frame; A first determination module is used to determine a matching area and a first image area of ​​the matching area in a target human recognition frame, wherein one target human recognition frame corresponds to one matching area, and the target human recognition frame is one of at least one human recognition frame; A second determination module is used to determine a second image area of ​​an intersection area between the matching area and a target non-motor vehicle identification frame, wherein the target non-motor vehicle identification frame is one of at least one of the non-motor vehicle identification frames; A third determination module is used to determine the smaller image area between the first image area and the image area of ​​the target non-motor vehicle identification frame as the target image area; The fourth determination module is used to determine the association relationship between the target human recognition frame and the target non-motor vehicle recognition frame based on the second image area and the target image area.

9. An electronic device, characterized in that: include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps in the human-vehicle association method as described in any one of claims 1 to 7 when executing the computer program.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in the human-vehicle association method according to any one of claims 1 to 7 are implemented.