Head collision prevention alarm probability determination method and device, electronic equipment and storage medium
By setting up an image collector in front of the front seat to identify and correct the alarm probability, the problem of the TOF camera being unable to capture depth images of the front seats was solved, and accurate alarms were achieved when the front seat user stretched his head backward.
Patent Information
- Application Number
- CN202410355235.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-26
- Publication Date
- 2025-09-26
AI Technical Summary
In the prior art, the TOF camera is unable to capture depth images of the front seats, resulting in an inability to determine the probability of a head collision alarm when the front seat user stretches his head backward.
By setting a front image collector in front of the front seats, the front image of the vehicle is obtained, the external frame of the human head in the target area is identified, and the original alarm probability is determined by comparing the absolute head area with the preset threshold. The alarm probability is then corrected by comparing the relative head area with the preset threshold to obtain an accurate alarm probability.
It achieves accurate alarm probability determination for scenarios where the front seat user stretches their head backward, solves the problem that the TOF camera cannot capture depth images of the front seats, and improves the accuracy of anti-head collision alarms.
Smart Images

Figure CN120708195A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the technical field of anti-collision head technology, and in particular to a method, device, electronic device, and storage medium for determining an anti-collision head alarm probability. Background Art
[0002] In related anti-head collision technology, taking the scenario of preventing a person's head from colliding with an obstacle (entertainment screen) in a vehicle as an example: a Time of Flight (TOF) camera is usually used to obtain depth information between the person's head and the camera. The distance between the person's head and the camera indicated by the depth information is used to determine whether the person's head has entered the target area where there is a risk of head collision, and then the probability of an anti-head collision alarm is determined based on the judgment result.
[0003] However, the entertainment screen is usually set between the front seats and the second row of seats, and the TOF camera is usually set twenty centimeters behind the entertainment screen; therefore, the TOF camera cannot capture the depth image of the front seats, resulting in the anti-collision head technology using the TOF camera being unable to determine the anti-collision head alarm probability of the user in the front seat, resulting in the alarm probability corresponding to the scenario where the user in the front seat stretches his head backward. Summary of the Invention
[0004] The present disclosure provides a method, device, electronic device and storage medium for determining an anti-collision head alarm probability.
[0005] According to a first aspect of the present disclosure, a method for determining an anti-collision head alarm probability is provided, comprising:
[0006] Acquire a front row image of the vehicle; the front row image of the vehicle refers to an image acquired by a front row image collector arranged in front of the front row seat;
[0007] Identifying a human head located in a target area in the front row image of the vehicle and a matching human head located in the front seat, and obtaining a target head circumscribed frame; the target area refers to a risk area where the human head may collide with an obstacle;
[0008] Determining an original alarm probability based on a comparison between the absolute head area of the target head bounding box and a preset head area threshold;
[0009] Comparing the absolute head area with the standard head area to obtain the relative head area;
[0010] determining an alarm probability correction value based on a comparison between the relative head area and a preset relative head area threshold;
[0011] The original alarm probability is corrected using the alarm probability correction value to obtain a target alarm probability.
[0012] In one embodiment, the step of identifying a human head located in a target area in the front row image of the vehicle and matching the human head located in the front seat to obtain a target head bounding box includes:
[0013] Identify human bodies and human heads in the image of the front row of the vehicle, and obtain a human body circumference frame of each human body and a human head circumference frame of each head in the image of the front row of the vehicle;
[0014] Determining an intersection-and-union (IoU) ratio between each of the human body circumference frames and each of the head circumference frames, and matching the human body circumference frames and the head circumference frames whose IoU ratios are not less than a preset IoU threshold to obtain a matching result;
[0015] Determining the position coordinates of the human body external frame in the front seat according to the position coordinates of the human body external frame in the vehicle;
[0016] Filtering out the head external bounding box that matches the human body external bounding box of the front seat from the human head external bounding box of the matching result to obtain a preselected human head external bounding box;
[0017] According to the position coordinates of the preselected head circumscribed frame, a target head circumscribed frame with the position coordinates in the target area is determined.
[0018] In one embodiment, the preset head area threshold includes a first preset head area threshold and a second preset head area threshold, and the first preset head area threshold is greater than the second preset head area threshold;
[0019] The determining of the original alarm probability based on a comparison between the absolute head area of the target head circumference frame and a preset head area threshold includes:
[0020] Multiplying the length and width of the head circumference frame to obtain the absolute head area of the head circumference frame;
[0021] determining whether the absolute head area is greater than the first preset head area threshold;
[0022] If the judgment result is no, then
[0023] Subtracting the first preset head area threshold from the absolute head area to obtain a first difference;
[0024] Subtracting the first preset head area threshold from the second preset head area threshold to obtain a second difference;
[0025] using a ratio of the first difference to the second difference as a first ratio;
[0026] Adding the first ratio and a preset alarm probability correction coefficient to obtain an initial alarm probability;
[0027] The initial alarm probability is compared with the preset alarm probability, and the original alarm probability is determined to be the smaller value between the initial alarm probability and the preset alarm probability.
[0028] In one embodiment, determining the alarm probability correction value based on a comparison between the relative head area and a preset relative head area threshold includes:
[0029] Subtracting the preset standard value from the relative head area to obtain a third difference value;
[0030] Subtracting the preset standard value from the preset relative head area threshold to obtain a fourth difference value;
[0031] using a ratio of the third difference to the fourth difference as a second ratio;
[0032] The second ratio is compared with a preset alarm probability, and the alarm probability correction value is determined to be the smaller value between the second ratio and the preset alarm probability.
[0033] In one embodiment, determining the position coordinates of the human body external bounding box in the front seat according to the position coordinates of the human body external bounding box in the vehicle includes:
[0034] According to the position coordinates of the human body external bounding box in the vehicle, intercepting the area selected by each human body external bounding box from the front row image of the vehicle to obtain at least one human body image;
[0035] Identifying key points of the human body in each of the human body images to obtain position coordinates of the key points of each human body image;
[0036] According to the position coordinates of the key points of each human body image, the human body external bounding box of the position coordinates in the front seat is determined.
[0037] In one embodiment, before identifying a human head located in a target area in the front row image of the vehicle and matching a human head located in the front seat and obtaining a bounding box of the target head, the method for determining the probability of an anti-collision head alarm includes:
[0038] Acquire a plurality of training images, wherein the training images are images of a human head at a boundary position of the risk area;
[0039] Recognize the human heads in the training image to obtain a plurality of human head bounding boxes in the training image; wherein one human head corresponds to one human head bounding box;
[0040] Determine the center point position of each of the head circumference frames to obtain the center point positions of multiple head circumference frames;
[0041] A closed area formed by connecting lines of multiple center points is determined as a target area.
[0042] In one embodiment, before determining the center point position of each of the head circumscribed frames, the method includes:
[0043] Multiplying the length and width of each of the head circumference frames to obtain the absolute head area of each of the head circumference frames;
[0044] Comparing the absolute head area of each of the head circumference frames with the area of a standard head circumference frame to obtain a confidence level of each of the head circumference frames;
[0045] Filtering out a credible head bounding box having a confidence level greater than a preset confidence level from the plurality of head bounding boxes;
[0046] Determining the center point position of each head circumscribed frame includes:
[0047] Determine the center point position of each credible human head bounding box.
[0048] According to a second aspect of the present disclosure, a device for determining an anti-collision head alarm probability is provided, comprising:
[0049] An acquisition unit, configured to acquire a front-row image of the vehicle; the front-row image of the vehicle refers to an image acquired by a front-row image collector disposed in front of the front seat;
[0050] a recognition unit, configured to recognize a human head located in a target area in the front row image of the vehicle and a matching human head located in the front seat, and obtain a target head circumscribed frame; the target area is a risk area where the human head may collide with an obstacle;
[0051] A first determining unit is configured to determine an original alarm probability based on a comparison between an absolute head area of the target head circumscribed frame and a preset head area threshold;
[0052] a second determining unit, configured to compare the absolute head area with a standard head area to obtain a relative head area;
[0053] a third determining unit, configured to determine an alarm probability correction value based on a comparison between the relative head area and a preset relative head area threshold;
[0054] The fourth determining unit is configured to correct the original alarm probability using the alarm probability correction value to obtain a target alarm probability.
[0055] According to a third aspect of the present disclosure, there is provided an electronic device, including:
[0056] at least one processor; and
[0057] a memory communicatively connected to at least one processor; wherein,
[0058] The memory stores instructions that can be executed by at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method of the first aspect.
[0059] According to a fourth aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to enable a computer to execute the method of the aforementioned first aspect.
[0060] The present disclosure provides a method, device, electronic device, and storage medium for determining the probability of a head collision warning. The method comprises: acquiring a front-row image of a vehicle; the front-row image of the vehicle refers to an image acquired by a front-row image collector disposed in front of the front seat; identifying a human head located in a target area in the front-row image of the vehicle, and a matching human head located in the front seat, to obtain a target head bounding box; the target area refers to a risk area where a human head may collide with an obstacle; determining an original alarm probability based on a comparison between the absolute head area of the target head bounding box and a preset head area threshold; comparing the absolute head area with a standard head area to obtain a relative head area; determining an alarm probability correction value based on a comparison between the relative head area and a preset relative head area threshold; and correcting the original alarm probability using the alarm probability correction value to obtain a target alarm probability.
[0061] According to the solution disclosed in the present invention, by identifying the human head located in the target area in the front row image of the vehicle and the matching human body located in the front seat, the target head external frame method is obtained, the front row image of the vehicle can be collected, and the original alarm probability can be obtained; further, the alarm probability correction value is determined by comparing the relative head area with the preset relative head area threshold, and then the original probability is corrected using the correction value, so as to accurately determine the alarm probability corresponding to the scenario where the user in the front seat stretches his head backward.
[0062] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present application, nor is it intended to limit the scope of the present application. Other features of the present application will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0063] The accompanying drawings are provided to facilitate a better understanding of the present invention and do not constitute a limitation of the present disclosure.
[0064] Figure 1 A flowchart of a method for determining the probability of an anti-collision head alarm provided by an embodiment of the present disclosure;
[0065] Figure 2 A schematic diagram of the seat distribution in the vehicle cabin provided by an embodiment of the present disclosure;
[0066] Figure 3 A flowchart of a method for determining a target head circumscribed frame provided by an embodiment of the present disclosure;
[0067] Figure 4 A flowchart of a method for determining an original alarm probability provided by an embodiment of the present disclosure;
[0068] Figure 5 A flowchart of a method for determining an alarm probability correction value provided by an embodiment of the present disclosure;
[0069] Figure 6 A schematic diagram of the structure of key points of the human body provided by an embodiment of the present disclosure;
[0070] Figure 7 A flowchart of a method for determining a target area provided by an embodiment of the present disclosure;
[0071] Figure 8 A schematic diagram of the structure of a device for determining the probability of an anti-collision head alarm provided by an embodiment of the present disclosure;
[0072] Figure 9 A schematic block diagram of an exemplary electronic device provided for an embodiment of the present disclosure. DETAILED DESCRIPTION
[0073] The following description of exemplary embodiments of the present disclosure is made in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding. These details should be considered as merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.
[0074] A method for determining the probability of an anti-collision head alarm provided in an embodiment of the present disclosure can be applied to a vehicle equipped with an IR camera. The executor of the method can be a processor set on the vehicle side or in the cloud, such as the processor of the anti-collision head alarm module in the vehicle, or the vehicle controller.
[0075] like Figure 1 As shown, the method for determining the anti-collision head alarm probability provided by the embodiment of the present disclosure includes the following steps:
[0076] Step 101, obtaining a front row image of a vehicle;
[0077] In one embodiment, the vehicle front row image refers to an image acquired by a front row image collector disposed in front of the front row seats.
[0078] In one embodiment, the front-row image collector is a non-depth image collector. Compared with a non-depth image collector, when processing the depth image collected by the depth image collector, it is usually necessary to convert the depth information in the depth image into the distance information between the target (human body, human head) in the depth image and the depth image collector, which consumes a lot of computing resources.
[0079] In one embodiment, the front row image collector is used to collect vehicle front row images, which include images of the front seats, second row seats and other areas. Therefore, the front row image collector can be set in front of or behind the rearview mirror inside the vehicle, or in an upper position of the vehicle.
[0080] In one embodiment, the seat distribution diagram in the vehicle cabin is as follows: Figure 2 As shown, the front row seats refer to seats 0 and 1, the second row seats refer to seats 2 and 3, the third row seats refer to seats 4 and 5, and the aisle seat refers to seat 7.
[0081] In one embodiment, since the front row image collector can be set in front of or behind the rearview mirror inside the vehicle, or in an upper position of the vehicle, the camera of the front row image collector is at a top-down angle. If the user in the front row seat stretches his head back to the obstacle (entertainment screen), the head corresponding to the user in the front row seat will be captured by the front row image collector.
[0082] Step 102: Identify a human head located in a target area in the front row image of the vehicle and a matching human head located in the front seat, and obtain a target head bounding box; the target area is a risk area where the human head may collide with an obstacle;
[0083] In one embodiment, a human head classification detection network can be used to identify the human body position and head position in the front row image of the vehicle, and match the human body and head; further, based on the human body position and head position, the head of the matched human body located in the target area in the front row image of the vehicle is determined, and the target head external frame is obtained.
[0084] In one embodiment, since the anti-head collision alarm probability determined by the present disclosure is the anti-head collision alarm probability when the user in the front seat stretches his head backward, the target area is the risk area where the user in the front seat may hit an obstacle when stretching his head backward.
[0085] In one embodiment, the obstruction is typically an entertainment screen disposed between the front row of seats and the second row of seats.
[0086] Step 103: determining an original alarm probability based on a comparison between the absolute head area of the target head bounding box and a preset head area threshold;
[0087] In one embodiment, the absolute head area of the target person's head circumference frame refers to the area of the target person's head circumference frame.
[0088] In one embodiment, the target head circumference frame may be a rectangle, and the absolute head area of the target head circumference frame refers to the product of the length and width of the target head circumference frame.
[0089] In one embodiment, the target head circumference frame may be an ellipse, and the absolute head area of the target head circumference frame refers to the product of the major semi-axis, the minor semi-axis and pi of the target head circumference frame.
[0090] In one embodiment, because the front-row image of the vehicle is not captured by a depth image collector, the size of the head bounding box corresponding to the head in the front-row image of the vehicle is highly correlated with the distance between the head and the obstacle. Specifically, the larger the head bounding box, the smaller the distance between the head and the front-row image collector, and the greater the distance between the head and the obstacle. Conversely, the smaller the head bounding box, the larger the distance between the head and the front-row image collector, and the smaller the distance between the head and the obstacle.
[0091] In one embodiment, the preset head area threshold refers to the area value of the corresponding head circumscribed frame on the front row image of the vehicle when the head is at the boundary of the risk area.
[0092] In one embodiment, the preset head area threshold may also refer to the area value of the head circumscribed frame corresponding to the front row image of the vehicle when the head contacts an obstacle.
[0093] In one embodiment, the area value of the external bounding box of the human head corresponding to the image in the front row of the vehicle when the human head is at the boundary of the risk area and the area value of the external bounding box of the human head corresponding to the image in the front row of the vehicle when the human head contacts an obstacle can also be used simultaneously to jointly determine the original alarm probability.
[0094] Step 104, comparing the absolute head area with the standard head area to obtain a relative head area;
[0095] In one embodiment, the standard head area refers to the area value of the head circumscribed frame corresponding to the human head in the front row image of the vehicle when the human body is sitting in the standard sitting posture in the front seat (without stretching the head forward or backward).
[0096] In one embodiment, multiple vehicle front-seat images of a person sitting in a standard sitting posture in the front seat may be collected, and then the area value of the circumscribed frame of the head in each vehicle front-seat image may be calculated. Finally, the area values of the circumscribed frames of the multiple heads may be averaged to obtain the standard head area.
[0097] Step 105, determining an alarm probability correction value based on a comparison between the relative head area and a preset relative head area threshold;
[0098] In one embodiment, the relative head area refers to the degree of scaling of the absolute head area compared to the standard head area. Therefore, the relative head area is highly correlated with the distance between the human head and the head corresponding to the standard sitting posture, that is, the distance between the human head and the obstacle.
[0099] In one embodiment, the larger the relative head area is, the lower the degree of scaling of the absolute head area is, that is, the closer the distance between the human head and the head corresponding to the standard sitting posture is; when the relative head area is 1, that is, the preset standard value, it indicates that the sitting posture of the user in the front seat is the standard sitting posture, and there is no situation of stretching the head backward; when the relative head area is less than 1, and the smaller the relative head area is, the greater the distance the head of the user in the front seat stretches backward; at this time, the alarm probability should be increased.
[0100] Step 106: Use the alarm probability correction value to correct the original alarm probability to obtain a target alarm probability.
[0101] In one embodiment, the original alarm probability is corrected using the alarm probability correction value to obtain a target alarm probability, including:
[0102] The target alarm probability is obtained by summing the alarm probability correction value and the original alarm probability.
[0103] The method for determining the anti-collision head alarm probability provided by the present disclosure includes: acquiring a front-row image of a vehicle; the front-row image of the vehicle refers to an image acquired by a front-row image collector arranged in front of the front seat; identifying a human head located in a target area in the front-row image of the vehicle and a matching human body located in the front seat to obtain a target head external frame; the target area refers to a risk area where the human head may collide with an obstacle; determining the original alarm probability based on a comparison relationship between the absolute head area of the target head external frame and a preset head area threshold; comparing the absolute head area with the standard head area to obtain a relative head area; determining an alarm probability correction value based on a comparison relationship between the relative head area and the preset relative head area threshold; and correcting the original alarm probability using the alarm probability correction value to obtain a target alarm probability.
[0104] According to the solution disclosed in the present invention, by identifying the human head located in the target area in the front row image of the vehicle and the matching human body located in the front seat, the target head external frame method is obtained, the front row image of the vehicle can be collected, and the original alarm probability can be obtained; further, the alarm probability correction value is determined by comparing the relative head area with the preset relative head area threshold, and then the original probability is corrected using the correction value, so as to accurately determine the alarm probability corresponding to the scenario where the user in the front seat stretches his head backward.
[0105] In one embodiment, if Figure 3 As shown, step 102 includes:
[0106] Step 301, identifying human bodies and human heads in the vehicle front row image, and obtaining a human body circumference frame of each human body and a head circumference frame of each head in the vehicle front row image;
[0107] In one embodiment, a human head classification detection network may be used to identify human bodies and heads in the vehicle front row image to obtain a human body circumference frame of each human body and a head circumference frame of each head in the vehicle front row image.
[0108] In one embodiment, the human body circumference frame and the head circumference frame are usually represented by their corresponding position coordinates. Taking the human body circumference frame as a rectangle as an example, the position coordinates of the upper left vertex and the lower right vertex of the rectangle are usually used to represent the corresponding human body circumference frame.
[0109] In one embodiment, the human head classification detection network can also determine the confidence level of each human body bounding box and each head bounding box. The confidence level indicates the credibility of the human body bounding box or the head bounding box.
[0110] In one embodiment, a confidence threshold may be preset, and the human body circumference frames and human head circumference frames with confidence lower than the preset confidence threshold are deleted, and only credible human body circumference frames and human head circumference frames remain.
[0111] Step 302: determining an IoU between each of the human body bounding boxes and each of the head bounding boxes, and matching the human body bounding boxes and the head bounding boxes whose IoU ratios are not less than a preset IoU threshold to obtain a matching result.
[0112] In one embodiment, no matter the user's posture is sitting, standing or other postures (bending over, lowering the head, turning the head, etc.), the human body external bounding box and the human head external bounding box usually have an overlapping area.
[0113] In one embodiment, the overlapping area of the human body circumference frame and the head circumference frame is defined as the intersection area, and the total area occupied by the human body circumference frame and the head circumference frame is defined as the union area; the intersection-to-union ratio refers to the ratio of the intersection area to the union area.
[0114] In one embodiment, a larger IoU indicates greater overlap between the body's bounding box and the head's bounding box, i.e., a greater probability that the body and head belong to the same user. Therefore, based on a large number of calibrations, the IoU of the body's bounding box and the head's bounding box in different poses of the same user can be determined and used as a preset IoU threshold.
[0115] In one embodiment, in the matching results, the human body and the human head corresponding to the matching human body external bounding box and the human head external bounding box belong to the same user.
[0116] Step 303, determining the position coordinates of the human body external bounding box in the front seat according to the position coordinates of the human body external bounding box in the vehicle;
[0117] In one embodiment, the position coordinates of the human body's external bounding box in the vehicle refer to the position coordinates of the center point of the human body's external bounding box in the vehicle.
[0118] In one embodiment, if the center point of the human body's external bounding box is at the front seat in the vehicle, it is determined that the human body's external bounding box is at the front seat.
[0119] Step 304: Filter out the head bounding box of the matching result and the head bounding box that matches the position coordinate of the person in the front row seat to obtain a pre-selected head bounding box;
[0120] In one embodiment, the preselected head bounding box refers to the head bounding box of the user in the front seat.
[0121] Step 305 : Determine a target head bounding box whose position coordinates are in the target area according to the position coordinates of the pre-selected head bounding box.
[0122] In one embodiment, it is necessary to determine whether to issue an anti-head collision alarm only when the external frame of the human head is located in the target area.
[0123] In one embodiment, when the head frame is not located in the target area, the probability of the head collision prevention alarm is 0.
[0124] In one embodiment, the preset head area threshold includes a first preset head area threshold and a second preset head area threshold, and the first preset head area threshold is greater than the second preset head area threshold.
[0125] In one embodiment, the first preset head area threshold refers to the area value of the corresponding head circumscribed frame on the front row image of the vehicle when the head is at the boundary of the risk area.
[0126] In one embodiment, the second preset head area threshold refers to the area value of the head circumscribed frame corresponding to the image of the front row of the vehicle when the head contacts an obstacle.
[0127] In one embodiment, because the front-row image of the vehicle is not captured by a depth image collector, the size of the head bounding box corresponding to the head in the front-row image of the vehicle is highly correlated with the distance between the head and the obstacle. Specifically, the larger the head bounding box, the smaller the distance between the head and the front-row image collector, and the greater the distance between the head and the obstacle. Conversely, the smaller the head bounding box, the larger the distance between the head and the front-row image collector, and the smaller the distance between the head and the obstacle.
[0128] Based on this, in one embodiment, if Figure 4As shown, step 103 includes:
[0129] Step 401: multiply the length and width of the human head circumference frame to obtain the absolute head area of the human head circumference frame;
[0130] In one embodiment, the target head circumference frame may be a rectangle, and the absolute head area of the target head circumference frame refers to the product of the length and width of the target head circumference frame.
[0131] In one embodiment, the target head circumference frame may be an ellipse, and the absolute head area of the target head circumference frame refers to the product of the major semi-axis, the minor semi-axis and pi of the target head circumference frame.
[0132] Step 402, determining whether the absolute head area is greater than the first preset head area threshold;
[0133] In one embodiment, if the judgment result is yes, that is, when the absolute head area is greater than the first preset head area threshold, it means that the distance between the target person's head and the obstacle is relatively far, and there is no need to issue an anti-head collision alarm. In this case, the original alarm probability is 0.
[0134] Step 403: If the judgment result is negative, subtract the first preset head area threshold from the absolute head area to obtain a first difference value;
[0135] In one embodiment, if the judgment result is no, that is, when the absolute head area is not greater than the first preset head area threshold, it means that the distance between the target person's head and the obstacle is relatively close, and it is necessary to further determine the original alarm probability by combining the size comparison relationship between the absolute head area and the first preset head area threshold and the second preset head area threshold.
[0136] Step 404: Subtract the first preset head area threshold from the second preset head area threshold to obtain a second difference;
[0137] In one embodiment, the difference between the first preset head area threshold and the second preset head area threshold is used to indicate a distance interval within which a human head may collide with an obstacle.
[0138] Step 405: taking the ratio of the first difference to the second difference as a first ratio;
[0139] Step 406: Add the first ratio and the preset alarm probability correction coefficient to obtain the initial alarm probability;
[0140] In one embodiment, the preset alarm probability correction coefficient refers to the alarm probability when the anti-collision alarm is issued. Generally, the alarm probability when the anti-collision alarm is not issued is 0, and the alarm probability when the anti-collision alarm is issued is 1.
[0141] In the embodiment, a proportional coefficient of the first ratio may also be preset, correspondingly:
[0142] The first ratio is added to a preset alarm probability correction coefficient to obtain an initial alarm probability, including:
[0143] multiplying the first ratio by a proportional coefficient to obtain a first product;
[0144] The first product is summed with the preset alarm probability correction coefficient to obtain the initial alarm probability; wherein the sum of the proportional coefficient and the preset alarm probability correction coefficient is equal to the alarm probability when the anti-collision head alarm is issued, that is, equal to 1.
[0145] Step 407 : Compare the initial alarm probability with the preset alarm probability, and determine that the original alarm probability is the smaller value between the initial alarm probability and the preset alarm probability.
[0146] In one embodiment, the preset alarm probability refers to the alarm probability when the anti-collision alarm is issued. Generally, the alarm probability when the anti-collision alarm is not issued is 0, and the alarm probability when the anti-collision alarm is issued is 1.
[0147] Accordingly,
[0148] Determining the original alarm probability as the smaller value between the initial alarm probability and the preset alarm probability includes:
[0149] The original alarm probability is determined to be the smaller value of the initial alarm probability and 1.
[0150] In one embodiment, if Figure 5 As shown, step 105 includes:
[0151] Step 501, subtracting a preset standard value from the relative head area to obtain a third difference value;
[0152] In one embodiment, as described above, the preset standard value is usually 1.
[0153] In one embodiment, the preset standard value may also be other values greater than 1, which is not limited in the present disclosure.
[0154] Step 502: Subtract the preset standard value from the preset relative head area threshold to obtain a fourth difference value;
[0155] Step 503: taking the ratio of the third difference to the fourth difference as a second ratio;
[0156] In one embodiment, the ratio of the third difference to the fourth difference is highly correlated with the distance between the user's head and the obstacle. Specifically, the further the front-seat user's head is extended backward, the smaller the absolute head area, the smaller the relative head area, the larger the third difference, and the larger the second ratio. In this case, the greater the alarm probability correction value.
[0157] Step 504 : Compare the second ratio with a preset alarm probability, and determine that the alarm probability correction value is the smaller value between the second ratio and the preset alarm probability.
[0158] In one embodiment, the preset alarm probability refers to the alarm probability when the anti-collision alarm is issued. Generally, the alarm probability when the anti-collision alarm is not issued is 0, and the alarm probability when the anti-collision alarm is issued is 1.
[0159] Accordingly,
[0160] Determining the alarm probability correction value as the smaller value between the second ratio and the preset alarm probability includes:
[0161] The alarm probability correction value is determined to be the smaller value of the second ratio and 1.
[0162] In one embodiment, step 303 includes:
[0163] According to the position coordinates of the human body external bounding box in the vehicle, intercepting the area selected by each human body external bounding box from the front row image of the vehicle to obtain at least one human body image;
[0164] Identifying key points of the human body in each of the human body images to obtain position coordinates of the key points of each human body image;
[0165] In one embodiment, a human key point detection network may be used to identify human key points in each of the human images to obtain the position coordinates of the key points in each human image.
[0166] In one embodiment, the key point position coordinates may include the coordinates of the corresponding human body's hip and waist key points, such as Figure 6 As shown, the key point position coordinates may include position coordinates corresponding to 15, 16, 17, and 18.
[0167] According to the position coordinates of the key points of each human body image, the human body external bounding box of the position coordinates in the front seat is determined.
[0168] In one embodiment, if the position coordinates corresponding to 15, 16, 17, and 18 are located in the area of the front seats, the corresponding human body external bounding box is determined to be the human body external bounding box with position coordinates in the front seats.
[0169] In one embodiment, if Figure 7As shown, before step 102, the method for determining the anti-collision head alarm probability provided by the present disclosure includes:
[0170] Step 701: Acquire multiple training images, where the training images are images of a human head at a boundary position of the risk area;
[0171] In one embodiment, the boundaries of the risk area are typically defined by product managers.
[0172] In one embodiment, the product manager can designate a person to sit in the front seats to perform target area calibration. The person can sit in both front seats, or just one of the front seats, and lean back to the boundary of the risk area while the front image collector in the vehicle captures training images.
[0173] Based on this, in one embodiment, a training image may contain one head or two heads. If a training image contains two heads, the area formed by the head positions of each head in the training image is determined as the target area.
[0174] In one embodiment, the boundary position of the risk area refers to the position where the anti-collision head alarm is triggered.
[0175] Step 702: Recognize the human head in the training image to obtain multiple human head bounding boxes in the training image; wherein each human head corresponds to a human head bounding box;
[0176] In one embodiment, a human head classification detection network is used to identify the human head in each training image to obtain a bounding box of the human head in each training image.
[0177] Step 703: Determine the center point position of each of the head circumference frames to obtain the center point positions of multiple head circumference frames;
[0178] In one embodiment, the center point position is used to indicate the center coordinate point of the circumscribed frame of the head.
[0179] In one embodiment, the center point position of the head circumference frame may be obtained through the position of the head circumference frame.
[0180] Step 704: Determine a closed area formed by connecting lines of multiple center points as a target area.
[0181] In one embodiment, the size of the target area is determined by the size of the area enclosed by all head positions at the boundary positions of the risk area in all training images.
[0182] In one embodiment, before step 704, the method for determining the anti-collision head alarm probability provided by the present disclosure includes:
[0183] Multiplying the length and width of each of the head circumference frames to obtain the absolute head area of each of the head circumference frames;
[0184] In one embodiment, the human head circumference frame generally refers to the minimum circumference frame of the human head.
[0185] In one embodiment, the circumscribed frame of the human head may be a rectangular frame or an elliptical frame.
[0186] In one embodiment, if the circumscribed frame of the human head is an elliptical frame, the semi-major axis and the semi-minor axis of the elliptical frame are multiplied by pi to obtain the absolute head area of the circumscribed frame of the human head.
[0187] Comparing the absolute head area of each of the head circumference frames with the area of a standard head circumference frame to obtain a confidence level of each of the head circumference frames;
[0188] In one embodiment, the standard head area refers to the area value of the head circumscribed frame corresponding to the human head in the front row image of the vehicle when the human body is sitting in the standard sitting posture in the front seat (without stretching the head forward or backward).
[0189] In one embodiment, multiple vehicle front-seat images of a person sitting in a standard sitting posture in the front seat may be collected, and then the area value of the circumscribed frame of the head in each vehicle front-seat image may be calculated. Finally, the area values of the circumscribed frames of the multiple heads may be averaged to obtain the standard head area.
[0190] In one embodiment, the confidence level of the head bounding box is used to indicate the credibility of the head bounding box, that is, the credibility level of the current head being a real head.
[0191] Filtering out a credible head bounding box having a confidence level greater than a preset confidence level from the plurality of head bounding boxes;
[0192] In one embodiment, the preset confidence level refers to the confidence level at which the bounding box around the human head can be determined to be credible.
[0193] In one embodiment, the preset confidence level can be obtained by searching for literature related to human head confidence level, or by conducting multiple human head related experiments.
[0194] Determining the center point position of each head circumscribed frame includes:
[0195] Determine the center point position of each credible human head bounding box.
[0196] Corresponding to the aforementioned method for determining the probability of a head collision warning, the present invention further provides a device for determining the probability of a head collision warning. Since the device embodiments of the present invention correspond to the aforementioned method embodiments, details not disclosed in the device embodiments may be referred to the aforementioned method embodiments and will not be further elaborated in this invention.
[0197] Figure 8 This is a schematic diagram of a device for determining the probability of an anti-collision head alarm provided by an embodiment of the present disclosure, as shown in FIG. Figure 8 As shown, the anti-collision head alarm probability determination device 800 includes:
[0198] The acquisition unit 801 is used to acquire a front row image of the vehicle; the front row image of the vehicle refers to an image acquired by a front row image collector arranged in front of the front row seat;
[0199] The recognition unit 802 is configured to recognize a human head located in a target area in the front row image of the vehicle and a matching human head located in the front seat, and obtain a target head bounding box; the target area is a risk area where the human head may collide with an obstacle;
[0200] The first determining unit 803 is configured to determine an original alarm probability based on a comparison between the absolute head area of the target head bounding box and a preset head area threshold;
[0201] A second determining unit 804 is configured to compare the absolute head area with a standard head area to obtain a relative head area;
[0202] The third determining unit 805 is configured to determine an alarm probability correction value based on a comparison between the relative head area and a preset relative head area threshold;
[0203] The fourth determining unit 806 is configured to modify the original alarm probability using the alarm probability correction value to obtain a target alarm probability.
[0204] In one embodiment, the identification unit 802 is specifically configured to:
[0205] Identify human bodies and human heads in the image of the front row of the vehicle, and obtain a human body circumference frame of each human body and a human head circumference frame of each head in the image of the front row of the vehicle;
[0206] Determining an intersection-and-union (IoU) ratio between each of the human body circumference frames and each of the head circumference frames, and matching the human body circumference frames and the head circumference frames whose IoU ratios are not less than a preset IoU threshold to obtain a matching result;
[0207] Determining the position coordinates of the human body external frame in the front seat according to the position coordinates of the human body external frame in the vehicle;
[0208] Filtering out the head external bounding box that matches the human body external bounding box of the front seat from the human head external bounding box of the matching result to obtain a preselected human head external bounding box;
[0209] According to the position coordinates of the preselected head circumscribed frame, a target head circumscribed frame with the position coordinates in the target area is determined.
[0210] In one embodiment, the preset head area threshold includes a first preset head area threshold and a second preset head area threshold, and the first preset head area threshold is greater than the second preset head area threshold.
[0211] Accordingly,
[0212] In one embodiment, the first determining unit 803 is specifically configured to:
[0213] Multiplying the length and width of the head circumference frame to obtain the absolute head area of the head circumference frame;
[0214] determining whether the absolute head area is greater than the first preset head area threshold;
[0215] If the judgment result is no, then
[0216] Subtracting the first preset head area threshold from the absolute head area to obtain a first difference;
[0217] Subtracting the first preset head area threshold from the second preset head area threshold to obtain a second difference;
[0218] using a ratio of the first difference to the second difference as a first ratio;
[0219] Adding the first ratio and a preset alarm probability correction coefficient to obtain an initial alarm probability;
[0220] The initial alarm probability is compared with the preset alarm probability, and the original alarm probability is determined to be the smaller value between the initial alarm probability and the preset alarm probability.
[0221] In one embodiment, the third determining unit 805 is specifically configured to:
[0222] Subtracting the preset standard value from the relative head area to obtain a third difference value;
[0223] Subtracting the preset standard value from the preset relative head area threshold to obtain a fourth difference value;
[0224] using a ratio of the third difference to the fourth difference as a second ratio;
[0225] The second ratio is compared with a preset alarm probability, and the alarm probability correction value is determined to be the smaller value between the second ratio and the preset alarm probability.
[0226] In one embodiment, the identification unit 802 is further specifically configured to:
[0227] According to the position coordinates of the human body external bounding box in the vehicle, intercepting the area selected by each human body external bounding box from the front row image of the vehicle to obtain at least one human body image;
[0228] Identifying key points of the human body in each of the human body images to obtain position coordinates of the key points of each human body image;
[0229] According to the position coordinates of the key points of each human body image, the human body external bounding box of the position coordinates in the front seat is determined.
[0230] In one embodiment, the anti-collision head alarm probability determination device 800 further includes a target area acquisition unit, which is configured to:
[0231] Acquire a plurality of training images, wherein the training images are images of a human head at a boundary position of the risk area;
[0232] Recognize the human heads in the training image to obtain a plurality of human head bounding boxes in the training image; wherein one human head corresponds to one human head bounding box;
[0233] Determine the center point position of each of the head circumference frames to obtain the center point positions of multiple head circumference frames;
[0234] A closed area formed by connecting lines of multiple center points is determined as a target area.
[0235] In one embodiment, the target area acquisition unit is further configured to:
[0236] Multiplying the length and width of each of the head circumference frames to obtain the absolute head area of each of the head circumference frames;
[0237] Comparing the absolute head area of each of the head circumference frames with the area of a standard head circumference frame to obtain a confidence level of each of the head circumference frames;
[0238] Filtering out a credible head bounding box having a confidence level greater than a preset confidence level from the plurality of head bounding boxes;
[0239] Accordingly,
[0240] Determining the center point position of each head circumscribed frame includes:
[0241] Determine the center point position of each credible human head bounding box.
[0242] It should be noted that the above explanation of the method embodiment is also applicable to the device of this embodiment, and the principles are the same, which is not limited in this embodiment.
[0243] According to an embodiment of the present disclosure, the present disclosure further provides an electronic device and a non-transitory computer-readable storage medium storing computer instructions.
[0244] Specifically, an embodiment of the present disclosure provides an electronic device, including:
[0245] at least one processor; and
[0246] a memory communicatively connected to at least one processor; wherein,
[0247] The memory stores instructions that can be executed by at least one processor. The instructions are executed by the at least one processor to enable the at least one processor to perform the steps of the aforementioned method for determining the probability of anti-collision head alarm.
[0248] An embodiment of the present disclosure provides a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to enable a computer to execute the steps of the aforementioned method for determining the probability of an anti-collision head alarm.
[0249] Figure 9 A schematic block diagram of an example electronic device 900 that can be used to implement embodiments of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smartphones, wearable devices, in-vehicle devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are provided as examples only and are not intended to limit the implementation of the present disclosure described and / or claimed herein.
[0250] like Figure 9 As shown, the electronic device 900 includes a computing unit 901, which can perform various appropriate actions and processes according to a computer program stored in a ROM (Read-Only Memory) 902 or a computer program loaded from a storage unit 908 into a RAM (Random Access Memory) 903. In the RAM 903, various programs and data required for the operation of the device 900 can also be stored. The computing unit 901, ROM 902, and RAM 903 are connected to each other via a bus 904. An I / O (Input / Output) interface 905 is also connected to the bus 904.
[0251] Various components in the device 900 are connected to the I / O interface 905, including an input unit 906, such as a keyboard, a mouse, etc.; an output unit 907, such as various types of displays, speakers, etc.; a storage unit 908, such as a magnetic disk, an optical disk, etc.; and a communication unit 909, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 909 allows the device 900 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.
[0252] The computing unit 901 can be any general-purpose and / or specialized processing component with processing and computing capabilities. Some examples of the computing unit 901 include, but are not limited to, a CPU (Central Processing Unit), a GPU (Graphic Processing Unit), various specialized AI (Artificial Intelligence) computing chips, various computing units that run machine learning model algorithms, a DSP (Digital Signal Processor), and any suitable processor, controller, microcontroller, etc. The computing unit 901 performs the various methods and processes described above, such as the method for determining the probability of a head collision warning. For example, in some embodiments, the method for determining the probability of a head collision warning warning can be implemented as a computer software program tangibly embodied in a machine-readable medium, such as the storage unit 908. In some embodiments, part or all of the computer program can be loaded and / or installed on the device 900 via the ROM 902 and / or the communication unit 909. When the computer program is loaded into the RAM 903 and executed by the computing unit 901, one or more steps of the method described above can be performed. Alternatively, in other embodiments, the computing unit 901 may be configured to execute the aforementioned anti-collision head alarm probability determination method in any other appropriate manner (for example, by means of firmware).
[0253] Various embodiments of the systems and techniques described herein can be implemented in digital electronic circuit systems, integrated circuit systems, FPGAs (Field Programmable Gate Arrays), ASICs (Application-Specific Integrated Circuits), ASSPs (Application-Specific Standard Products), SOCs (System on Chips), CPLDs (Complex Programmable Logic Devices), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include being implemented in one or more computer programs that are executable and / or interpreted on a programmable system that includes at least one programmable processor, which can be a special-purpose or general-purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0254] The program code for implementing the method of the present disclosure can be written in any combination of one or more programming languages. These program codes can be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device so that when the program code is executed by the processor or controller, the functions / operations specified in the flow chart and / or block diagram are implemented. The program code can be executed entirely on the machine, partially on the machine, as a stand-alone software package, partially on the machine and partially on a remote machine, or entirely on a remote machine or server.
[0255] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or apparatus. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or apparatus, or any suitable combination of the foregoing. More specific examples of machine-readable storage media may include an electrical connection based on one or more wires, a portable computer disk, a hard disk, RAM, ROM, EPROM (Electrically Programmable Read-Only-Memory) or flash memory, optical fiber, CD-ROM (Compact Disc Read-Only Memory), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0256] It should be understood that the various forms of the processes shown above can be used to reorder, add, or delete steps. For example, the steps described in this disclosure can be performed in parallel, sequentially, or in a different order, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved. This is not a limitation herein.
[0257] The above specific embodiments do not constitute a limitation on the scope of protection of this disclosure. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions may be made based on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this disclosure shall be included within the scope of protection of this disclosure.
Claims
1. A method for determining the probability of an anti-collision head alarm, characterized in that: include: Acquire the front image of the vehicle; The vehicle front row image refers to an image acquired by a front row image collector arranged in front of the front row seat; Identifying a human head located in a target area in the front row image of the vehicle and a matching human head located in the front seat, and obtaining a target head circumscribed frame; the target area refers to a risk area where the human head may collide with an obstacle; Determining an original alarm probability based on a comparison between the absolute head area of the target head bounding box and a preset head area threshold; Comparing the absolute head area with the standard head area to obtain the relative head area; determining an alarm probability correction value based on a comparison between the relative head area and a preset relative head area threshold; The original alarm probability is corrected using the alarm probability correction value to obtain a target alarm probability.
2. The method according to claim 1, characterized in that The step of identifying a human head located in a target area in the front row image of the vehicle and a matched human head located in the front seat to obtain a target human head external frame includes: Identify human bodies and human heads in the image of the front row of the vehicle, and obtain a human body circumference frame of each human body and a human head circumference frame of each head in the image of the front row of the vehicle; Determining an intersection-and-union (IoU) ratio between each of the human body circumference frames and each of the head circumference frames, and matching the human body circumference frames and the head circumference frames whose IoU ratios are not less than a preset IoU threshold to obtain a matching result; Determining the position coordinates of the human body external frame in the front seat according to the position coordinates of the human body external frame in the vehicle; Filtering out the head external bounding box that matches the human body external bounding box of the front seat from the human head external bounding box of the matching result to obtain a preselected human head external bounding box; According to the position coordinates of the preselected head circumscribed frame, a target head circumscribed frame with the position coordinates in the target area is determined.
3. The method according to claim 1, characterized in that The preset head area threshold includes a first preset head area threshold and a second preset head area threshold, the first preset head area threshold being greater than the second preset head area threshold; The determining of the original alarm probability based on a comparison between the absolute head area of the target head circumference frame and a preset head area threshold includes: Multiplying the length and width of the head circumference frame to obtain the absolute head area of the head circumference frame; determining whether the absolute head area is greater than the first preset head area threshold; If the judgment result is no, then Subtracting the first preset head area threshold from the absolute head area to obtain a first difference; Subtracting the first preset head area threshold from the second preset head area threshold to obtain a second difference; using a ratio of the first difference to the second difference as a first ratio; Adding the first ratio and a preset alarm probability correction coefficient to obtain an initial alarm probability; The initial alarm probability is compared with the preset alarm probability, and the original alarm probability is determined to be the smaller value between the initial alarm probability and the preset alarm probability.
4. The method according to claim 1, wherein The determining of the alarm probability correction value according to the comparison relationship between the relative head area and a preset relative head area threshold includes: Subtracting the preset standard value from the relative head area to obtain a third difference value; Subtracting the preset standard value from the preset relative head area threshold to obtain a fourth difference value; using a ratio of the third difference to the fourth difference as a second ratio; The second ratio is compared with a preset alarm probability, and the alarm probability correction value is determined to be the smaller value between the second ratio and the preset alarm probability.
5. The method according to claim 2, characterized in that The determining, based on the position coordinates of the human body external bounding box in the vehicle, the position coordinates of the human body external bounding box in the front seat includes: According to the position coordinates of the human body external bounding box in the vehicle, intercepting the area selected by each human body external bounding box from the front row image of the vehicle to obtain at least one human body image; Identifying key points of the human body in each of the human body images to obtain position coordinates of the key points of each human body image; According to the position coordinates of the key points of each human body image, the human body external bounding box of the position coordinates in the front seat is determined.
6. The method according to claim 1, characterized in that Before identifying a human head located in a target area in the front row image of the vehicle and matching the human head located in the front seat and obtaining a target head external frame, the method includes: Acquire a plurality of training images, wherein the training images are images of a human head at a boundary position of the risk area; Recognize the human heads in the training image to obtain a plurality of human head bounding boxes in the training image; wherein one human head corresponds to one human head bounding box; Determine the center point position of each of the head circumference frames to obtain the center point positions of multiple head circumference frames; A closed area formed by connecting lines of multiple center points is determined as a target area.
7. The method according to claim 6, characterized in that Before determining the center point position of each head circumscribed frame, the method includes: Multiplying the length and width of each of the head circumference frames to obtain the absolute head area of each of the head circumference frames; Comparing the absolute head area of each of the head circumference frames with the area of a standard head circumference frame to obtain a confidence level of each of the head circumference frames; Filtering out a credible head bounding box having a confidence level greater than a preset confidence level from the plurality of head bounding boxes; Determining the center point position of each head circumscribed frame includes: Determine the center point position of each credible human head bounding box.
8. A device for determining the probability of an anti-collision head alarm, characterized in that: include: An acquisition unit, configured to acquire an image of the front row of the vehicle; The vehicle front row image refers to an image acquired by a front row image collector arranged in front of the front row seat; a recognition unit, configured to recognize a human head located in a target area in the front row image of the vehicle and a matching human head located in the front seat, and obtain a target head circumscribed frame; The target area refers to a risk area where a person's head may hit an obstacle; A first determining unit is configured to determine an original alarm probability based on a comparison between an absolute head area of the target head circumscribed frame and a preset head area threshold; a second determining unit, configured to compare the absolute head area with a standard head area to obtain a relative head area; a third determining unit, configured to determine an alarm probability correction value based on a comparison between the relative head area and a preset relative head area threshold; The fourth determining unit is configured to correct the original alarm probability using the alarm probability correction value to obtain a target alarm probability.
9. An electronic device, characterized in that: include: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 7.
10. A non-transitory computer-readable storage medium storing computer instructions, characterized in that: The computer instructions are used to cause the computer to execute the method according to any one of claims 1 to 7.