Anti-bumping alarm methods, an apparatus, electronic device and storage medium
By subdividing the target area into the obstacle area and the area outside the obstacle, and correcting the alarm probability according to the distance of different areas, the problem of false alarm in the existing technology is solved and higher anti-collision alarm accuracy is achieved.
Patent Information
- Application Number
- PCT/CN2025/085125
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-03-26
- Filing Date
- 2025-03-26
- Publication Date
- 2025-10-02
AI Technical Summary
Existing anti-collision alarm methods only determine the alarm probability based on whether the human head is in the target area, resulting in frequent false alarms and insufficient accuracy.
The target area is divided into the obstacle area and the area outside the obstacle. The correction value is determined according to the distance from the risk position to the human head position in different areas. The correction value is used to correct the original alarm probability to improve the alarm accuracy.
By subdividing the target area into the obstacle area and the area outside the obstacle, and correcting the distances of different areas, the accuracy of the anti-collision alarm is significantly improved and false alarms are reduced.
Smart Images

Figure CN2025085125_02102025_PF_FP_ABST
Abstract
Description
Anti-collision alarm method, device, electronic equipment and storage medium
[0001] CROSS-REFERENCE TO RELATED APPLICATIONS
[0002] This application claims priority to a Chinese patent application filed with the Patent Office of China on March 26, 2024, with application number 202410355245.X and entitled “Method, device, electronic device and storage medium for determining the probability of anti-collision head alarm”, the entire contents of which are incorporated by reference into this application. Technical Field
[0003] The present disclosure relates to the technical field of anti-collision alarms, and in particular to an anti-collision alarm method, device, electronic device, and storage medium. Background Art
[0004] In the relevant risk alarm probability determination scheme, the alarm probability is determined solely based on whether the person's head is within the target area; the target area refers to the risk area where a person's head may be at risk. For example, the risk alarm probability of the target person is determined based on the difference between the distance between the center of the target person's head area and the center of the target area and a preset distance. Specifically, if the distance between the center of the target person's head area and the center of the target area is greater than the preset distance, the alarm probability is determined to be 1, and a risk alarm is issued. If the distance between the center of the target person's head area and the center of the target area is less than the preset distance, the alarm probability is determined to be 0, and no risk alarm is issued.
[0005] However, the alarm probability determined solely based on whether the head position is within the target area is inaccurate and can easily lead to false alarms. Summary of the Invention
[0006] The present disclosure provides an anti-collision alarm method, device, electronic device and storage medium.
[0007] According to a first aspect of the present disclosure, there is provided an anti-collision alarm method, comprising:
[0008] Get user location and target area;
[0009] Target alarm information is determined according to the user location and description information of the target area, where the description information of the target area includes at least one of a center of the target area, a vertex of the target area, and a boundary of the target area.
[0010] According to a second aspect of the present disclosure, there is provided an anti-collision alarm method, comprising:
[0011] Obtaining a user location and a target area; wherein the target area includes an obstacle area and an area outside of obstacles;
[0012] In a case where the user position is located in the obstacle area or the user position is located in the area outside the obstacle, target alarm information is determined.
[0013] According to a third aspect of the present disclosure, a method for determining an anti-collision head alarm probability is provided, comprising:
[0014] Obtain the head position and target area. The target area refers to the risk area where the head may hit an obstacle. The target area includes the obstacle area and the area outside the obstacle. The obstacle area refers to the area where the obstacle is located, and the area outside the obstacle area refers to the area outside the risk area.
[0015] According to the position coordinates of the human head in the target area, it is determined whether the human head is located in the obstacle area or the area outside the obstacle;
[0016] The original alarm probability is corrected using the correction value of the obstacle area or the correction value of the area outside the obstacle to obtain the target alarm probability. The correction values of the obstacle area and the area outside the obstacle are different. The correction value of the obstacle area is determined based on the distance from the center of the obstacle area to the position of the human head, and the distance from the center of the obstacle area to the vertex of the obstacle area. The correction value of the area outside the obstacle is determined based on the distance from the boundary of the target area to the position of the human head, and the distance from the boundary of the target area to the boundary of the obstacle area. The original alarm probability refers to the alarm probability determined based on whether the human head is located in the target area.
[0017] According to a fourth aspect of the present disclosure, a device for determining an anti-collision head alarm probability is provided, comprising:
[0018] A first acquisition unit is configured to acquire a head position and a target area; wherein the target area refers to a risk area where the head may collide with an obstacle, and the target area includes an obstacle area and an area outside the obstacle; the obstacle area refers to an area where the obstacle is located, and the area outside the obstacle area refers to an area within the risk area excluding the obstacle area;
[0019] a first determining unit, configured to determine, based on the position coordinates of the human head in the target area, whether the human head is located in the obstacle area or in the area outside the obstacle;
[0020] The correction unit is used to correct the original alarm probability using the correction value of the obstacle area or the correction value of the area outside the obstacle to obtain the target alarm probability; the correction values of the obstacle area and the area outside the obstacle are different; the correction value of the obstacle area is determined based on the distance from the center of the obstacle area to the position of the human head, and the distance from the center of the obstacle area to the vertex of the obstacle area; the correction value of the area outside the obstacle is determined based on the distance from the boundary of the target area to the position of the human head, and the distance from the boundary of the target area to the boundary of the obstacle area; the original alarm probability refers to the alarm probability determined based on whether the position of the human head is located in the target area.
[0021] According to a fifth aspect of the present disclosure, there is provided an anti-collision alarm device, comprising:
[0022] A second acquiring unit, configured to acquire a user location and a target area;
[0023] The second determining unit is configured to determine target alarm information according to the user location and description information of the target area, where the description information of the target area includes at least one of a center of the target area, a vertex of the target area, and a boundary of the target area.
[0024] According to a sixth aspect of the present disclosure, there is provided an anti-collision alarm device, comprising:
[0025] A third acquisition unit is configured to acquire a user position and a target area; wherein the target area includes an obstacle area and an area outside of obstacles;
[0026] The third determining unit is configured to determine target alarm information when the user position is located in the obstacle area or the user position is located in the area outside the obstacle.
[0027] According to a seventh aspect of the present disclosure, there is provided an electronic device, including:
[0028] at least one processor; and
[0029] a memory communicatively connected to at least one processor; wherein,
[0030] The memory stores instructions that can be executed by at least one processor, and the instructions are executed by at least one processor to enable the at least one processor to perform the method of the first aspect, the second aspect, or the third aspect.
[0031] According to an eighth 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, second aspect, or third aspect.
[0032] According to the solution disclosed in the present invention, by dividing the target area into the obstacle area and the area outside the obstacle, and determining the correction value for the distance from the risk position to the human head position in different areas, and then using the correction value to correct the original probability, the alarm accuracy can be improved.
[0033] 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
[0034] The accompanying drawings are provided to facilitate a better understanding of the present invention and do not constitute a limitation of the present disclosure.
[0035] FIG1 is a flow chart of a method for determining the probability of an anti-collision head alarm provided by an embodiment of the present disclosure;
[0036] FIG2 is a flow chart of a method for determining the probability of an anti-collision head alarm provided by an example application of the present disclosure;
[0037] FIG3 is a schematic structural diagram of a device for determining the probability of an anti-collision head alarm provided by an embodiment of the present disclosure;
[0038] FIG4 is a flow chart of a method for preventing collisions and providing an alarm according to an embodiment of the present disclosure;
[0039] FIG5 is a schematic diagram of a structure of an anti-collision alarm device according to an embodiment of the present disclosure;
[0040] FIG6 is a second flow chart of the anti-collision alarm method provided in an embodiment of the present disclosure;
[0041] FIG7 is a second structural diagram of the anti-collision alarm device provided in an embodiment of the present disclosure;
[0042] FIG8 is a schematic block diagram of an example electronic device provided by an embodiment of the present disclosure. DETAILED DESCRIPTION
[0043] 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.
[0044] A method for determining the probability of an anti-collision head alarm is provided in an embodiment of the present disclosure. The method can be applied to a terminal equipped with an infrared (IR) camera, such as a vehicle equipped with an IR camera. The executor of the method can be the controller of the vehicle's anti-collision head alarm module or the vehicle's entire vehicle controller.
[0045] Example 1
[0046] As shown in FIG1 , the method for determining the probability of an anti-collision head alarm provided by an embodiment of the present disclosure includes the following steps:
[0047] Step 101, obtaining the head position and target area;
[0048] In one embodiment, the target area refers to a risk area where a person's head may hit an obstacle.
[0049] In one embodiment, the target area includes an obstacle area and an area outside of obstacles.
[0050] In one embodiment, the obstacle area refers to an area where the obstacle is located.
[0051] In one embodiment, the non-obstacle area refers to an area in the risk area excluding the obstacle area.
[0052] In one embodiment, the head position and target area may be acquired from the vehicle interior image.
[0053] In one embodiment, an image collector may be used to acquire an image of the interior of the vehicle. The image collector may be an IR camera.
[0054] In one embodiment, the head position refers to the position of the center point of the head.
[0055] In one embodiment, the target area may be a regular graphic area, such as a rectangle or a sector.
[0056] In one embodiment, the target area may also be an irregular graphic area.
[0057] In one embodiment, the target area is an area that is larger than the obstacle area and extends in at least one of the three directions of the obstacle except the top.
[0058] Step 102: determining whether the head position is in an obstacle area or an area outside of obstacles based on the position coordinates of the head position in the target area;
[0059] In one embodiment, when the human head is located in the obstacle area, the distance to the obstacle is closer. Therefore, when the human head is located in the obstacle area, the possibility of a head collision is greater, and when the human head is located in the area outside the obstacle, the possibility of a head collision is smaller.
[0060] Step 103: Using the correction value of the obstacle area or the correction value of the area outside the obstacle, the original alarm probability is corrected to obtain the target alarm probability.
[0061] In one embodiment, the correction values for the obstacle area and the area outside the obstacle are different.
[0062] In one embodiment, the correction value of the obstacle area is determined based on the distance from the center of the obstacle area to the position of the human head, and the distance from the center of the obstacle area to the vertex of the obstacle area.
[0063] In one embodiment, when the human head is located in the obstacle area, the product of the obstacle area correction value and the original alarm probability is determined as the corrected obstacle area alarm probability. The closer the human head is to the center of the obstacle area, the greater the alarm probability can be obtained.
[0064] In one embodiment, the correction value of the area outside the obstacle is determined based on the distance from the boundary of the target area to the position of the human head, and the distance from the boundary of the target area to the boundary of the obstacle area.
[0065] In one embodiment, when the head position is located in the area outside the obstacle, the product of the correction value of the area outside the obstacle and the original alarm probability is determined as the corrected alarm probability of the area outside the obstacle. The closer the head position is to the obstacle area, the greater the alarm probability can be obtained.
[0066] In one embodiment, the original alarm probability refers to the alarm probability determined according to whether the position of the human head is located in the target area.
[0067] In one embodiment, when the head is located in the target area, an anti-head collision alarm is issued, which corresponds to an original alarm probability. When the head is located outside the target area, no anti-head collision alarm is issued, which also corresponds to an original alarm probability.
[0068] In one embodiment, the original alarm probability corresponding to whether the head position is within the target area can be set to 1 and 0, respectively. When the alarm probability is 1, an anti-head collision alarm is issued, and when the alarm probability is 0, no anti-head collision alarm is issued. Optionally, the original alarm probability corresponding to whether the head position is within the target area can be set to 10 and 5, respectively. When the alarm probability is 10, an anti-head collision alarm is issued, and when the alarm probability is 5, no anti-head collision alarm is issued. This is not limited in the present disclosure.
[0069] In one embodiment, since in step 102 the position of the human head is determined to be in the obstacle area or the area outside the obstacle based on the position coordinates of the human head in the target area, that is, the human head must be in the target area, the original alarm probability will not be 0.
[0070] In one embodiment, the original alarm probability refers to the alarm probability before correction.
[0071] In one embodiment, whether to perform an anti-head collision alarm is also determined based on the magnitude relationship between the target alarm probability and the preset alarm probability.
[0072] Specifically,
[0073] In one embodiment, when the target alarm probability is less than the preset alarm probability, it means that the current position of the human head is not within the target area, and no anti-collision head alarm is performed. When the target alarm probability is not less than the preset alarm probability, it means that the current position of the human head is within the target area and there is a risk of colliding with an obstacle, so an anti-collision head alarm is performed.
[0074] In one embodiment, the preset alarm probability is related to the size of the preset correction value of the aforementioned vertex area. For example, when the preset correction value of the vertex area is 2, the preset alarm probability may be 1; when the preset correction value of the vertex area is 5, the preset alarm probability may be 4. This is not limited in the present disclosure.
[0075] The method for determining the anti-collision head alarm probability provided by the embodiment of the present disclosure includes: obtaining a human head position and a target area; wherein the target area refers to a risk area where the human head may collide with an obstacle, and the target area includes an obstacle area and an area outside the obstacle; the obstacle area refers to the area where the obstacle is located, and the area outside the obstacle refers to the area outside the risk area except the obstacle area; based on the position coordinates of the human head position in the target area, determining whether the human head position is located in the obstacle area or the area outside the obstacle; using the correction value of the obstacle area or the correction value of the area outside the obstacle to correct the original alarm probability to obtain the target alarm probability; the correction values of the obstacle area and the area outside the obstacle are different; the correction value of the obstacle area is determined based on the distance from the center of the obstacle area to the human head position, and the distance from the center of the obstacle area to the vertex of the obstacle area; the correction value of the area outside the obstacle is determined based on the distance from the boundary of the obstacle area to the human head position, and the distance from the boundary of the target area to the boundary of the obstacle area; the original alarm probability refers to the alarm probability determined based on whether the human head position is located in the target area.
[0076] According to the solution disclosed in the present invention, by dividing the target area into the obstacle area and the area outside the obstacle, a correction value is determined for the distance from the risk position to the human head position in different areas, and then the original probability is corrected using the correction value, which can improve the alarm accuracy.
[0077] In one embodiment, the area outside the obstacle includes a non-vertex area and at least one vertex area.
[0078] In one embodiment, the vertex area refers to the intersection area of the area outside the obstacle, a circular area with a line connecting the vertex of the obstacle area and the vertex of the nearest target area as its diameter and a midpoint of the line as its center;
[0079] In one embodiment, taking the obstacle area as a rectangle as an example, the vertices refer to the two vertices below the obstacle area.
[0080] In one embodiment, the non-vertex area refers to an area outside the obstacle area except the vertex area.
[0081] In one embodiment, the original alarm probability is corrected using the correction value of the area outside the obstacle, including:
[0082] Determine whether the head is located in the vertex area or the non-vertex area;
[0083] In one embodiment, it is determined whether the head position is located in the vertex area or the non-vertex area based on the position coordinates of the head position in the target area.
[0084] In one embodiment, the position of the head may be represented by the center point of the head circumference frame.
[0085] In one embodiment, it can be determined that the position of the human head is located in the vertex area or the non-vertex area outside the obstacle area according to the center point position of the human head circumscribed frame.
[0086] If the head position is located in the vertex area, the original alarm probability is corrected using the preset correction value of the vertex area.
[0087] In one embodiment, the vertex area is a very dangerous area. The consequences of a person's head hitting an obstacle are quite serious, so it is necessary to increase the probability of anti-head collision alarm.
[0088] Based on this, in one embodiment, the preset correction value of the vertex area is greater than 1; preferably, the preset correction value of the vertex area is 2.
[0089] If the head position is located in the non-vertex area, the original alarm probability is corrected using the correction value of the area outside the obstacle.
[0090] In one embodiment, before correcting the original alarm probability using the correction value of the obstacle area, the method for determining the anti-collision head alarm probability further includes:
[0091] Get the distance from the center of the obstacle area to the position of the human head, and the distance from the center of the obstacle area to the vertex of the obstacle area;
[0092] In one embodiment, when the human head is located in an obstacle area, the closer the distance from the center of the obstacle area to the human head, the greater the possibility that the human head will hit the obstacle; the farther the distance from the center of the obstacle area to the human head, the smaller the possibility that the human head will hit the obstacle.
[0093] The ratio of the distance from the center of the obstacle area to the position of the human head to the distance from the center of the obstacle area to the vertex of the obstacle area is used as the first ratio;
[0094] In one embodiment, taking the obstacle area as a rectangular area as an example, the distance from the center of the obstacle area to the vertex of the obstacle area is a constant value. Therefore, the closer the position of the human head is to the center of the obstacle area, the smaller the first ratio is, and the farther the position of the human head is from the center of the obstacle area, the larger the first ratio is.
[0095] Multiplying the first ratio by the first adjustment coefficient to obtain a first correction coefficient;
[0096] In one embodiment, the first adjustment coefficient is a negative number. Preferably, the first adjustment coefficient may be -0.5.
[0097] In one embodiment, if the distance from the center of the obstacle area to the vertex of the obstacle area is a constant, the closer the human head position is to the center of the obstacle area, the smaller the first ratio and the larger the first correction coefficient; the farther the human head position is from the center of the obstacle area, the larger the first ratio and the smaller the first correction coefficient.
[0098] The first correction coefficient is added to the first preset correction value to obtain a correction value for the obstacle area.
[0099] In one embodiment, the sum of the first adjustment coefficient and the first preset correction value is equal to the preset correction value of the vertex area.
[0100] In one embodiment, when the head is in the vertex region, the distance from the head to the center of the obstacle region is equal to the distance from the center of the obstacle region to the vertex of the obstacle region. At this point, the first ratio is maximum, and the first ratio is 1. Taking a first adjustment coefficient of -0.5 as an example, the minimum value of the first correction coefficient is -0.5. To ensure continuity between the preset correction value for the vertex region and the correction value for the obstacle region when the head is in the vertex region, the first preset correction value is 2.5. Furthermore, as the distance from the head to the center of the obstacle region increases, the first ratio decreases. Since the first adjustment coefficient is a negative number, the correction value for the obstacle region decreases as the distance from the head to the center of the obstacle region increases.
[0101] In one embodiment, before correcting the original alarm probability using the correction value of the area outside the obstacle, the method for determining the anti-collision head alarm probability further includes:
[0102] Get the distance from the boundary of the target area to the position of the human head, and the distance from the boundary of the target area to the boundary of the obstacle area;
[0103] In one embodiment, if the target area is a rectangle and the position of the human head is located in a non-vertex area outside the obstacle area, first obtain the boundary of the target area in the same direction as the human head relative to the obstacle area, and the boundary of the obstacle area closest to the human head. For example, if the human head is on the left side of the obstacle area, the boundary of the target area is obtained as the left boundary of the target area. If the human head is on the right side of the obstacle area, the boundary of the target area is obtained as the right boundary of the target area. Then obtain the distance from the boundary of the obstacle area to the position of the human head, and the distance from the boundary of the target area to the boundary of the obstacle area.
[0104] In one embodiment, if the target area is fan-shaped and the human head is located outside the obstacle area, the boundary of the target area closest to the human head and the boundary of the obstacle area closest to the human head are first obtained, and then the distance from the boundary of the obstacle area to the human head position and the distance from the boundary of the target area to the boundary of the obstacle area are obtained.
[0105] The ratio of the distance from the boundary of the target area to the position of the human head to the distance from the boundary of the target area to the boundary of the obstacle area is used as the second ratio;
[0106] In one embodiment, the target area is a risk area where a person's head may collide with an obstacle. When the distance between the person's head and the center point of the obstacle area is equal, the probability of colliding with the obstacle is equal. Therefore, the obstacle area is usually a regular shape, for example, the obstacle area can be rectangular or fan-shaped.
[0107] In one embodiment, if the target area is a rectangle and the head position is located in a non-vertex area outside the obstacle area, the closer the head position is to the obstacle area, the larger the second ratio is. When the head position is located at the boundary of the obstacle area, the second ratio is the largest, and at this time the second ratio is 1.
[0108] In one embodiment, if the target area is fan-shaped and the head position is located outside the obstacle area, the closer the head position is to the obstacle area, the larger the second ratio is, and the maximum value of the second ratio is 1.
[0109] multiplying the second ratio by the second adjustment coefficient to obtain a second correction coefficient;
[0110] In one embodiment, the second adjustment coefficient is a positive number. Preferably, the second adjustment coefficient may be 1.
[0111] The second correction coefficient is added to the second preset correction value to obtain a correction value for the area outside the obstacle.
[0112] In one embodiment, the sum of the second adjustment coefficient and the second preset correction value is equal to the preset correction value of the vertex area.
[0113] In one embodiment, when the human head is located at the boundary of the obstacle area, the second ratio is 1; taking the position of the human head in the vertex area as an example, when the second adjustment coefficient is 1, the maximum first correction coefficient is 1. In order to ensure the continuity of the preset correction value of the vertex area and the correction value of the area outside the obstacle, the second preset correction value is 1.
[0114] In one embodiment, the second adjustment coefficient and the second preset correction value may also be other values, as long as the sum of the second adjustment coefficient and the second preset correction value is equal to the preset correction value of the vertex area.
[0115] In one embodiment, obtaining the distance from the boundary of the target area to the position of the human head, and the distance from the boundary of the target area to the boundary of the obstacle area includes:
[0116] Determine a first boundary of a target area closest to the position of the human head and a second boundary of an obstacle area closest to the position of the human head;
[0117] In one embodiment, if the target area is a rectangle and the head position is located in a non-vertex area outside the obstacle area, the first boundary of the target area in the same direction as the head position relative to the obstacle area and the second boundary of the obstacle area closest to the head position are obtained. If the head position is on the left side of the obstacle area, the first boundary is the left boundary of the target area. If the head position is on the right side of the obstacle area, the first boundary is the right boundary of the target area.
[0118] In one embodiment, if the target area is fan-shaped and the head position is located outside the obstacle area, a first boundary of the target area closest to the head position and a second boundary of the obstacle area closest to the head position are obtained.
[0119] The distance between the first boundary and the position of the human head is used as the distance from the boundary of the target area to the position of the human head, and the distance between the first boundary and the second boundary is used as the distance from the boundary of the target area to the boundary of the obstacle area.
[0120] In one embodiment, taking the target area as a rectangle as an example, the position of the human head is on the left side of the obstacle area, that is, the first boundary is the left boundary of the target area, then the distance between the left boundary of the target area and the position of the human head is used as the distance from the boundary of the target area to the position of the human head, and the distance between the left boundary of the target area and the second boundary of the obstacle area is used as the distance from the boundary of the target area to the boundary of the obstacle area.
[0121] In one embodiment, acquiring the target area includes:
[0122] Acquire multiple training images, where the training images refer to images of a human head at the boundary of a risk area;
[0123] In one embodiment, only three or more head positions can constitute a closed area. Therefore, the plurality of can be three, four or more, which is not limited in this disclosure.
[0124] In one embodiment, the boundaries of the risk area are typically defined by product managers.
[0125] In one embodiment, a product manager can designate relevant personnel to sit in the front or second-row seats for target area calibration. For example, in the front row, personnel can sit in both seats simultaneously, or just one of the front seats, and lean back to the boundary of the risk area while the in-vehicle IR camera captures training images.
[0126] 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.
[0127] In one embodiment, the boundary position of the risk area refers to the position where the anti-collision head alarm is triggered.
[0128] Recognize the human heads in the training image to obtain multiple head bounding boxes in the training image; wherein each head corresponds to a head bounding box;
[0129] In one embodiment, a human head detection and classification 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.
[0130] Determine the center point position of each head bounding box, and obtain the center point positions of multiple head bounding boxes;
[0131] In one embodiment, the center point position is used to indicate the center coordinate point of the circumscribed frame of the head.
[0132] In one embodiment, the center point position of the head circumference frame may be obtained through the position of the head circumference frame.
[0133] The closed area formed by the lines connecting multiple center points is determined as the target area.
[0134] 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.
[0135] In one embodiment, before determining the center point position of each head circumscribed frame, the method for determining the anti-collision head alarm probability provided by the present disclosure further includes:
[0136] Multiply the length and width of each head's circumscribed frame to get the area of each head's circumscribed frame;
[0137] In one embodiment, the human head circumference frame generally refers to the minimum circumference frame of the human head.
[0138] In one embodiment, the circumscribed frame of the human head may be a rectangular frame or an elliptical frame.
[0139] In one embodiment, if the circumference of the human head is an elliptical frame, the area of the circumference of the human head is obtained by multiplying the major semi-axis and the minor semi-axis of the elliptical frame with pi.
[0140] Compare the area of each head bounding box with the area of a preset standard head bounding box to obtain the confidence level of each head bounding box;
[0141] In one embodiment, the area of the preset standard human head circumference frame refers to the area of the preset human head circumference frame.
[0142] In one embodiment, the area of the preset standard head circumference frame may be an average of the areas of multiple head circumference frames.
[0143] 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.
[0144] Selecting a credible head bounding box with a confidence level greater than a preset confidence level from multiple head bounding boxes;
[0145] In one embodiment, the preset confidence level refers to a confidence level that is just sufficient to determine that the bounding box of the human head is credible.
[0146] 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.
[0147] Accordingly,
[0148] Determine the center point of each head bounding box, including:
[0149] Determine the center point of each credible head bounding box.
[0150] In one embodiment, by obtaining the center point position of the credible head bounding box, the number of heads involved in the calculation of the anti-collision head alarm probability determination can be reduced.
[0151] According to the solution of this disclosure:
[0152] First, by dividing the target area into the obstacle area and the area outside the obstacle, the correction value is determined for the distance from the risk position to the human head position in different areas, and then the correction value is used to correct the original probability, which can improve the alarm accuracy.
[0153] Secondly, by obtaining the center point position of the credible head bounding box, the number of heads involved in the calculation of the anti-collision head alarm probability can be reduced.
[0154] Again, by determining that the sum of the first adjustment coefficient and the first preset correction value is equal to the preset correction value of the vertex area and determining that the sum of the second adjustment coefficient and the second preset correction value is equal to the preset correction value of the vertex area, it can be ensured that the obstacle area correction value and the outside-obstacle area correction value are continuous at the vertex of the obstacle.
[0155] The method for determining the probability of an anti-collision head alarm provided by the present disclosure is further described below with reference to specific application examples.
[0156] FIG2 is a flow chart of a method for determining the probability of a head collision warning provided by an example application of the present disclosure. As shown in FIG2 , the method for determining the probability of a head collision warning provided by an example application of the present disclosure includes the following steps:
[0157] Step 201: Acquire at least three training images including the boundary position of a human head in a risk area;
[0158] Step 202: Recognize the human head in the training image and obtain a bounding box of the human head in the training image;
[0159] Step 203: multiply the length and width of the head frame to obtain the area of the head frame.
[0160] Step 204: Compare the area of the head bounding box with the area of a preset standard head bounding box to obtain a confidence level of the head bounding box.
[0161] Step 205: Filter out credible head bounding boxes with a confidence level greater than a preset confidence level from the head bounding boxes.
[0162] Step 206: Obtain the center point position of the credible head bounding box;
[0163] Step 207, determining the closed area formed by the line connecting the center points as the target area;
[0164] Step 208: Acquire the head position and target area; wherein the target area refers to the risk area where the head may hit an obstacle, and the target area includes the obstacle area and the area outside the obstacle;
[0165] Step 209, determining whether the head position is located in an obstacle area;
[0166] If the judgment result is yes, then go to step 210;
[0167] If the judgment result is no, then go to step 215;
[0168] Step 210: Obtain the distance from the center of the obstacle area to the position of the human head, and the distance from the center of the obstacle area to the vertex of the obstacle area;
[0169] Step 211: taking the ratio of the distance from the center of the obstacle area to the position of the human head to the distance from the center of the obstacle area to the vertex of the obstacle area as a first ratio;
[0170] Step 212: multiply the first ratio by the first adjustment coefficient to obtain a first correction coefficient;
[0171] Step 213, adding the first correction coefficient to the first preset correction value to obtain a correction value for the obstacle area;
[0172] Step 214, using the correction value of the obstacle area, correct the original alarm probability;
[0173] Step 215, determining whether the head position is located in the vertex area;
[0174] If the judgment result is yes, then go to step 216;
[0175] If the judgment result is no, then go to step 217;
[0176] Step 216, using the preset correction value of the vertex area, correct the original alarm probability;
[0177] Step 217: Obtain the distance from the boundary of the target area to the position of the human head, and the distance from the boundary of the target area to the boundary of the obstacle area;
[0178] Step 218: taking the ratio of the distance from the boundary of the target area to the position of the human head to the distance from the boundary of the target area to the boundary of the obstacle area as the second ratio;
[0179] Step 219: multiply the second ratio by the second adjustment coefficient to obtain a second correction coefficient;
[0180] Step 220, adding the second correction coefficient to the second preset correction value to obtain a correction value for the area outside the obstacle;
[0181] Step 221: Use the correction value of the area outside the obstacle to correct the original alarm probability.
[0182] Example 2
[0183] Corresponding to the method for determining the probability of a head collision warning in the first embodiment, the present invention further provides a device for determining the probability of a head collision warning. Since the device embodiment of the present invention corresponds to the method embodiment of the first embodiment, details not disclosed in the device embodiment can be referred to the method embodiment of the first embodiment, and will not be further described in this invention.
[0184] FIG3 is a schematic diagram of the structure of a device for determining the probability of a head collision warning provided by an embodiment of the present disclosure. As shown in FIG3 , the device 300 for determining the probability of a head collision warning includes:
[0185] The first acquisition unit 301 is configured to acquire the position of the human head and the target area. The target area refers to the risk area where the human head may collide with an obstacle. The target area includes the obstacle area and the area outside the obstacle area. The obstacle area refers to the area where the obstacle is located, and the area outside the obstacle area refers to the area within the risk area excluding the obstacle area.
[0186] The first determining unit 302 is configured to determine whether the position of the human head is in the obstacle area or the area outside the obstacle based on the position coordinates of the human head in the target area;
[0187] The correction unit 303 is used to correct the original alarm probability using the correction value of the obstacle area or the correction value of the area outside the obstacle to obtain the target alarm probability. The correction values of the obstacle area and the area outside the obstacle are different. The correction value of the obstacle area is determined based on the distance from the center of the obstacle area to the position of the human head, and the distance from the center of the obstacle area to the vertex of the obstacle area. The correction value of the area outside the obstacle is determined based on the distance from the boundary of the target area to the position of the human head, and the distance from the boundary of the target area to the boundary of the obstacle area. The original alarm probability refers to the alarm probability determined based on whether the human head is located in the target area.
[0188] In one embodiment, the area outside the obstacle includes a non-vertex area and at least one vertex area; the vertex area refers to the intersection area of the area outside the obstacle, with the line connecting the vertex of the obstacle area and the vertex of the nearest target area as the diameter and the midpoint of the line as the center;
[0189] In one embodiment, the correction unit 303 is specifically configured to:
[0190] Determine whether the head is located in the vertex area or the non-vertex area;
[0191] If the head position is in the vertex area, the original alarm probability is corrected using the preset correction value of the vertex area; the preset correction value of the vertex area is greater than 1;
[0192] If the head position is located in the non-vertex area, the original alarm probability is corrected using the correction value of the area outside the obstacle.
[0193] In one embodiment, the anti-collision head alarm probability determination device 300 further includes an obstacle area correction value determination unit, which is configured to:
[0194] Get the distance from the center of the obstacle area to the position of the human head, and the distance from the center of the obstacle area to the vertex of the obstacle area;
[0195] The ratio of the distance from the center of the obstacle area to the position of the human head to the distance from the center of the obstacle area to the vertex of the obstacle area is used as the first ratio;
[0196] Multiplying the first ratio by the first adjustment coefficient to obtain a first correction coefficient;
[0197] The first correction coefficient is added to the first preset correction value to obtain a correction value for the obstacle area; wherein the sum of the first adjustment coefficient and the first preset correction value is equal to the preset correction value for the vertex area, and the first adjustment coefficient is a negative number.
[0198] In one embodiment, the anti-collision head alarm probability determination device 300 further includes an out-of-obstacle area correction value determination unit, which is configured to:
[0199] Get the distance from the boundary of the target area to the position of the human head, and the distance from the boundary of the target area to the boundary of the obstacle area;
[0200] The ratio of the distance from the boundary of the obstacle area to the position of the human head to the distance from the boundary of the target area to the boundary of the obstacle area is used as the second ratio;
[0201] multiplying the second ratio by the second adjustment coefficient to obtain a second correction coefficient;
[0202] The second correction coefficient is added to the second preset correction value to obtain the correction value of the area outside the obstacle; wherein the sum of the second adjustment coefficient and the second preset correction value is equal to the preset correction value of the vertex area, and the second adjustment coefficient is a positive number.
[0203] In one embodiment, the outside-obstacle area correction value determination unit is further configured to:
[0204] Determine a first boundary of a target area closest to the position of the human head and a second boundary of an obstacle area closest to the position of the human head;
[0205] The distance between the first boundary and the position of the human head is used as the distance from the boundary of the target area to the position of the human head, and the distance between the first boundary and the second boundary is used as the distance from the boundary of the target area to the boundary of the obstacle area.
[0206] In one embodiment, the first acquiring unit 301 is specifically configured to:
[0207] Acquire multiple training images, where the training images refer to images of a human head at the boundary of a risk area;
[0208] Recognize the human heads in the training image to obtain multiple head bounding boxes in the training image; wherein each head corresponds to a head bounding box;
[0209] Determine the center point position of each head bounding box, and obtain the center point positions of multiple head bounding boxes;
[0210] The closed area formed by the lines connecting multiple center points is determined as the target area.
[0211] In one embodiment, the anti-collision head alarm probability determination device 300 further includes a screening unit, which is configured to:
[0212] Multiply the length and width of each head's circumscribed frame to get the area of each head's circumscribed frame;
[0213] Compare the area of each head bounding box with the area of a preset standard head bounding box to obtain the confidence level of each head bounding box;
[0214] Filtering out a credible head bounding box having a confidence level greater than a preset confidence level from a plurality of head bounding boxes;
[0215] Accordingly,
[0216] Determine the center point of each head bounding box, including:
[0217] Determine the center point of each credible head bounding box.
[0218] It should be noted that the above explanation of the method embodiment of the first embodiment is also applicable to the device of the second embodiment. The principle is the same and is not limited in the second embodiment.
[0219] Example 3
[0220] The anti-collision alarm method provided by the embodiment of the present disclosure can be an anti-collision alarm method in a vehicle scenario or an anti-collision alarm method in a bedroom scenario, and is not specifically limited here.
[0221] The following embodiments are described using a vehicle scenario as an example. The processes of the anti-collision alarm method in other scenarios refer to the anti-collision alarm method in the vehicle scenario:
[0222] As shown in FIG4 , the anti-collision alarm method provided by the embodiment of the present disclosure includes the following steps:
[0223] Step 41, obtaining the user location and target area;
[0224] In one embodiment, an image collector may be used to acquire an image of the interior of the vehicle. The image collector may be an IR camera, etc., to acquire the user position and target area from the image of the interior of the vehicle.
[0225] The target area refers to a risk area where the user may collide with an obstacle, and can be a regular graphic area, such as a rectangle or a sector. The target area can also be an irregular graphic area.
[0226] The user position includes the position of the head or other body parts (such as the knees, elbows, etc.). When the user position includes the position of the head, the head position refers to the position of the center point of the head.
[0227] In one embodiment, obtaining the target area specifically includes:
[0228] Acquire a plurality of training images, wherein the training images are images of a human head at a boundary position of the risk area;
[0229] 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;
[0230] Determine the center point position of each of the head circumference frames to obtain the center point positions of multiple head circumference frames;
[0231] A closed area formed by connecting lines of multiple center points is determined as a target area.
[0232] In one embodiment, before the step of determining the center point position of each head circumscribed frame, the method further includes:
[0233] Multiplying the length and width of each of the head circumference frames to obtain the area of each of the head circumference frames;
[0234] Comparing the area of each head circumference frame with the area of a preset standard head circumference frame to obtain the confidence level of each head circumference frame;
[0235] Filtering out a credible head bounding box having a confidence level greater than a preset confidence level from the plurality of head bounding boxes;
[0236] Determining the center point position of each head circumscribed frame includes:
[0237] Determine the center point position of each credible human head bounding box.
[0238] Step 42: determining target alarm information according to the user location and the description information of the target area, wherein the description information of the target area includes at least one of the center of the target area, the vertices of the target area, and the boundary of the target area.
[0239] Based on the user's position and at least one of the center of the target area, the vertex of the target area, and the boundary of the target area, target warning information is determined and output to prompt the user of the collision risk.
[0240] In the above embodiments of the present application, the user position and the target area where the user may collide with an obstacle are determined, and the target alarm information is determined based on the user position and at least one of the center, vertex and boundary of the target area. Determining the target alarm information from multiple aspects can improve the alarm accuracy.
[0241] In an optional specific embodiment, the step 42 determines the target alarm information according to the user location and the description information of the target area, including:
[0242] Obtaining, based on the user location and the description information of the target area, at least one of a distance from the center of the target area to the user location, a distance from the center of the target to a vertex of the target area, a distance from a boundary of the target area to the user location, and a distance from the boundary of the target area to an obstacle;
[0243] The target alarm information is determined based on at least one of the distance from the center of the target area to the user position, the distance from the center of the target to the vertex of the target area, the distance from the boundary of the target area to the user position, and the distance between the boundary of the target area and the obstacle, as well as the user position.
[0244] According to the user location and the description information of the target area, determine at least one of the distance between each boundary of the target area and the obstacle, the distance between the boundary of the target area and the user location, the distance between the center of the target area and the user location, and the distance between the center of the target area and the vertex of the target area, and determine the target alarm information based on at least one of the distance between each boundary of the target area and the obstacle, the distance between the boundary of the target area and the user location, the distance between the center of the target area and the user location, and the distance between the center of the target area and the vertex of the target area.
[0245] In an optional specific embodiment, the target area includes an obstacle area, and step 42 determines target alarm information according to the user location and the description information of the target area, including:
[0246] When the user position is located in the obstacle area, the target alarm information is determined according to the distance from the center of the obstacle area to the user position and the distance from the center of the obstacle area to the vertex of the obstacle area.
[0247] Specifically, the target area includes the obstacle area, which is the area where obstacles are located. When the user is located in the obstacle area, they are closer to the obstacle, so the likelihood of a collision is greater. Therefore, when the user is located in the obstacle area, target alarm information is determined from multiple perspectives based on the center of the obstacle area and the relationship between its vertices, improving alarm accuracy.
[0248] In an optional specific embodiment, the step of determining the target alarm information based on the distance from the center of the obstacle area to the user position and the distance from the center of the obstacle area to the vertex of the obstacle area specifically includes:
[0249] Obtaining the distance from the center of the obstacle area to the user's position, and the distance from the center of the obstacle area to the vertex of the obstacle area;
[0250] determining a target alarm probability based on a distance from the center of the obstacle area to the user's location, a distance from the center of the obstacle area to a vertex of the obstacle area, and an original alarm probability, where the original alarm probability refers to an alarm probability determined based on whether the user's location is within the target area;
[0251] The target alarm information is determined according to the target alarm probability.
[0252] When the user is located in an obstacle area, the distance from the center of the obstacle area to the user's location is obtained, the distance from the center of the obstacle area to the vertex of the obstacle area is obtained, and the original alarm probability is obtained. Based on the distance from the center of the obstacle area to the user's location, the distance from the center of the obstacle area to the vertex of the obstacle area, and the original alarm probability, the target alarm probability can be determined. Target alarm information can be determined based on the target alarm probability.
[0253] The target alarm information may include the target alarm probability, or the target alarm information is information generated based on the target alarm probability to prompt the user to warn about collision avoidance.
[0254] It is understandable that, since the user position is located in the obstacle area, the closer the user position is to the center of the obstacle area, the greater the target alarm probability can be obtained, and the greater the possibility of collision.
[0255] Among them, the original alarm probability refers to the alarm probability determined based on whether the user location is in the target area. When the user location is in the target area, an anti-collision alarm is issued, which corresponds to one original alarm probability; when the user location is outside the target area, no anti-collision alarm is issued, which also corresponds to one original alarm probability.
[0256] In one embodiment, the original alarm probability corresponding to whether the user's location is within the target area can be set to 1 and 0, respectively. When the original alarm probability is 1, an anti-collision alarm is issued, and when the original alarm probability is 0, no anti-collision alarm is issued. Optionally, the original alarm probability corresponding to whether the user's location is within the target area can be set to 10 and 5, respectively. When the original alarm probability is 10, an anti-collision alarm is issued, and when the original alarm probability is 5, no anti-collision alarm is issued. This is not limited in the present disclosure.
[0257] In one embodiment, it is also necessary to determine whether to perform an anti-collision alarm based on the magnitude relationship between the target alarm probability and the preset alarm probability.
[0258] Specifically, when the target alarm probability is less than the preset alarm probability, it means that the current user position is not within the target area and no anti-collision alarm is performed. When the target alarm probability is not less than the preset alarm probability, it means that the current user position is within the target area and there is a risk of colliding with obstacles, so an anti-collision alarm is performed.
[0259] In an optional specific embodiment, the step of determining the target alarm probability based on the distance from the center of the obstacle area to the user position, the distance from the center of the obstacle area to the vertex of the obstacle area, and the original alarm probability specifically includes:
[0260] Taking the ratio of the distance from the center of the obstacle area to the user position to the distance from the center of the obstacle area to the vertex of the obstacle area as the first ratio;
[0261] Obtaining a first correction coefficient according to the product of the first ratio and a first adjustment coefficient;
[0262] Obtaining a correction value for the obstacle area according to the sum of the first correction coefficient and a first preset correction value;
[0263] The target alarm probability is obtained according to the product of the correction value of the obstacle area and the original alarm probability.
[0264] When the head is located in the obstacle area, the closer the distance from the center of the obstacle area to the user's position is, the greater the possibility that the user will hit the obstacle; the farther the distance from the center of the obstacle area to the user's position is, the smaller the possibility that the user will hit the obstacle.
[0265] The first ratio is the ratio of the distance from the center of the obstacle area to the user's location to the distance from the center of the obstacle area to the vertex of the obstacle area. For example, if the obstacle area is a rectangle, the distance from the center of the obstacle area to the vertex of the obstacle area is a constant. Therefore, the closer the user's location is to the center of the obstacle area, the smaller the first ratio, and the farther the user's location is from the center of the obstacle area, the larger the first ratio.
[0266] The first adjustment coefficient is a negative number. Preferably, the first adjustment coefficient may be -0.5.
[0267] If the distance from the center of the obstacle area to the vertex of the obstacle area is a constant, the closer the user position is to the center of the obstacle area, the smaller the first ratio and the larger the first correction coefficient; the farther the user position is from the center of the obstacle area, the larger the first ratio and the smaller the first correction coefficient.
[0268] As the distance from the user position to the center of the obstacle area increases, the first ratio decreases. Since the first adjustment coefficient is a negative number, the correction value of the obstacle area decreases as the distance from the user position to the center of the obstacle area increases.
[0269] In an optional specific embodiment, the target area includes an obstacle area and an area outside of obstacles. Step 42 determines target alarm information based on the user location and description information of the target area, including:
[0270] When the user position is located in the area outside the obstacle, the target alarm information is determined according to the distance from the boundary of the target area to the user position and the distance from the boundary of the target area to the boundary of the obstacle area.
[0271] Specifically, the target area is an area larger than the obstacle area and extending in at least one of the three directions of the obstacle, excluding the top. Therefore, the target area includes the obstacle area and the area beyond the obstacle. The area beyond the obstacle refers to the area within the risk area excluding the obstacle area. When the user is located in the area beyond the obstacle, the distance from the obstacle is greater, but there is still a possibility of collision. Based on the relationship between the user's location, the boundary of the obstacle area, and the boundary of the target area, target alarm information is determined from multiple perspectives, improving alarm accuracy.
[0272] The boundary of the target area refers to the boundary of the area that does not distinguish between the obstacle area and the area outside the obstacle.
[0273] In an optional specific embodiment, the step of determining target alarm information based on the distance from the boundary of the target area to the user location and the distance from the boundary of the target area to the boundary of the obstacle area specifically includes:
[0274] Obtaining the distance from the boundary of the target area to the user location, and the distance from the boundary of the target area to the boundary of the obstacle area;
[0275] determining a target alarm probability based on a distance from a boundary of the target area to the user location, a distance from a boundary of the target area to a boundary of the obstacle area, and an original alarm probability, where the original alarm probability refers to an alarm probability determined based on whether the user location is within the target area;
[0276] The target alarm information is determined according to the target alarm probability.
[0277] If the target area is fan-shaped and the user is outside the obstacle area, the boundary of the obstacle area closest to the user is obtained, as well as the boundary of the target area closest to the user. The distance from the boundary of the target area to the user's location is then obtained, along with the original alarm probability. The target alarm probability is determined based on the distance from the boundary of the target area to the user's location, the distance from the boundary of the target area to the boundary of the obstacle area, and the original alarm probability. Target alarm information is then determined based on the target alarm probability.
[0278] The target alarm information may include the target alarm probability, or the target alarm information is information generated based on the target alarm probability to prompt the user to warn about collision avoidance.
[0279] Among them, the original alarm probability refers to the alarm probability determined based on whether the user location is in the target area. When the user location is in the target area, an anti-collision alarm is issued, which corresponds to one original alarm probability; when the user location is outside the target area, no anti-collision alarm is issued, which also corresponds to one original alarm probability.
[0280] In one embodiment, the original alarm probability corresponding to whether the user's location is within the target area can be set to 1 and 0, respectively. When the original alarm probability is 1, an anti-collision alarm is issued, and when the original alarm probability is 0, no anti-collision alarm is issued. Optionally, the original alarm probability corresponding to whether the user's location is within the target area can be set to 10 and 5, respectively. When the original alarm probability is 10, an anti-collision alarm is issued, and when the original alarm probability is 5, no anti-collision alarm is issued. This is not limited in the present disclosure.
[0281] In one embodiment, it is also necessary to determine whether to perform an anti-collision alarm based on the magnitude relationship between the target alarm probability and the preset alarm probability.
[0282] Specifically, when the target alarm probability is less than the preset alarm probability, it means that the current user position is not within the target area and no anti-collision alarm is performed. When the target alarm probability is not less than the preset alarm probability, it means that the current user position is within the target area and there is a risk of colliding with obstacles, so an anti-collision alarm is performed.
[0283] In an optional specific embodiment, the step of determining the target alarm probability based on the distance from the boundary of the target area to the user location, the distance from the boundary of the target area to the boundary of the obstacle area, and the original alarm probability specifically includes:
[0284] taking a ratio of a distance from a boundary of the target area to the user position to a distance from a boundary of the target area to a boundary of the obstacle area as a second ratio;
[0285] Obtaining a second correction coefficient according to the product of the second ratio and a second adjustment coefficient;
[0286] Obtaining a correction value for the area outside the obstacle according to the sum of the second correction coefficient and a second preset correction value;
[0287] The target alarm probability is obtained according to the product of the correction value of the area outside the obstacle and the original alarm probability.
[0288] The ratio of the distance from the boundary of the target area to the user's position to the distance from the boundary of the target area to the boundary of the obstacle area is used as the second ratio. When the distance between the user's position and the center point of the obstacle area is equal, the probability of colliding with the obstacle is equal. Therefore, the obstacle area is usually a regular shape, such as a rectangle or a sector.
[0289] If the target area is a rectangle and the user is located in a non-vertex area outside the obstacle area, the closer the user is to the obstacle area, the larger the second ratio. When the user is located at the boundary of the obstacle area, the second ratio is the largest, and at this time the second ratio is 1.
[0290] The second adjustment coefficient is a positive number. Preferably, the second adjustment coefficient may be 1.
[0291] In an optional specific embodiment, the step of obtaining the distance from the boundary of the target area to the user position, and the distance from the boundary of the target area to the boundary of the obstacle area, specifically includes:
[0292] Determine a first boundary of the target area closest to the user location, and a second boundary of the obstacle area closest to the user location;
[0293] The distance between the first boundary and the user position is used as the distance from the boundary of the target area to the user position, and the distance between the first boundary and the second boundary is used as the distance from the boundary of the target area to the boundary of the obstacle area.
[0294] If the target area is rectangular and the user is located in a non-vertex area outside the obstacle area, obtain the first boundary of the target area in the same direction as the user's position relative to the obstacle area, and the second boundary of the obstacle area closest to the user's position. If the user is on the left side of the obstacle area, the first boundary is the left boundary of the outside obstacle area. If the user is on the right side of the obstacle area, the first boundary is the right boundary of the outside obstacle area.
[0295] If the target area is fan-shaped and the user is located outside the obstacle area, a first boundary of the target area closest to the user's location and a second boundary of the obstacle area closest to the user's location are obtained.
[0296] The distance between the first boundary and the user position is used as the distance from the boundary of the target area to the user position, and the distance between the first boundary and the second boundary is used as the distance from the boundary of the target area to the boundary of the obstacle area.
[0297] In one embodiment, taking the target area as a rectangle as an example, the user position is on the left side of the obstacle area, that is, the first boundary is the left boundary of the area outside the obstacle, then the distance between the left boundary of the area outside the obstacle and the user position is used as the distance from the boundary of the target area to the position of the human head, and the distance between the left boundary of the target area and the second boundary of the obstacle area is used as the distance from the boundary of the target area to the boundary of the obstacle area.
[0298] In an optional specific embodiment, the area outside the obstacle includes a non-vertex area and at least one vertex area; the vertex area refers to an intersection area between the area outside the obstacle and a circular area having a line connecting a vertex of the obstacle area and a vertex of the nearest target area as a diameter and a midpoint of the line as a center;
[0299] The step of obtaining the target alarm probability based on the product of the correction value of the area outside the obstacle and the original alarm probability specifically includes:
[0300] If the user position is located in the non-vertex area, the target alarm probability is obtained according to the product of the correction value of the area outside the obstacle and the original alarm probability.
[0301] Based on the user's coordinates within the target area, determine whether the user is located in the vertex area or the non-vertex area. For example, if the obstacle area is a rectangle, the vertices refer to the two vertices below the obstacle area. The non-vertex area refers to the area outside the obstacle area excluding the vertex areas.
[0302] When the user position is the head position, the center point position of the head bounding box can be used to represent the head position, and the head position can be determined to be in the vertex area or non-vertex area outside the obstacle area based on the center point position of the head bounding box.
[0303] If the user position is located in a non-vertex area, the target alarm probability is obtained according to the product of the correction value of the area outside the obstacle and the original alarm probability.
[0304] In an optional specific embodiment, the method further includes:
[0305] If the user position is located in the vertex area, the target alarm probability is obtained based on the product of the preset correction value of the vertex area and the original alarm probability; the sum of the second adjustment coefficient and the second preset correction value is equal to the preset correction value of the vertex area, and the preset correction value of the vertex area is greater than 1.
[0306] The vertex area is a very dangerous area. If the user hits an obstacle, the consequences are very serious. Therefore, the alarm probability needs to be increased.
[0307] Based on this, in one embodiment, the preset correction value of the vertex area is greater than 1; preferably, the preset correction value of the vertex area is 2.
[0308] In one embodiment, the sum of the second adjustment coefficient and the second preset correction value equals the preset correction value for the vertex region. When the user is at the boundary of the obstacle region, the second ratio is 1. For example, when the user is located in the vertex region, when the second adjustment coefficient is 1, the maximum first correction coefficient is 1. To ensure continuity between the preset correction value for the vertex region and the correction value for the area outside the obstacle, the second preset correction value is 1.
[0309] In one embodiment, the sum of the first adjustment coefficient and the first preset correction value is equal to the preset correction value of the vertex area.
[0310] When the user is in the vertex area, the distance from the user to the center of the obstacle area is equal to the distance from the center of the obstacle area to the vertex of the obstacle area. In this case, the first ratio is maximum, and the first ratio is 1. Taking the first adjustment coefficient of -0.5 as an example, the minimum value of the first correction coefficient is -0.5. To ensure continuity between the preset correction values for the vertex area and the correction values for the obstacle area when the head is in the vertex area, the first preset correction value is 2.5.
[0311] In one embodiment, the aforementioned preset alarm probability is related to the size of the preset correction value of the vertex area. For example, when the preset correction value of the vertex area is 2, the preset alarm probability can be 1. When the preset correction value of the vertex area is 5, the preset alarm probability can be 4. This is not limited in the present disclosure. The embodiment of the method of the above-mentioned embodiment 3 corresponds to the embodiment of the method of the first embodiment. For details not disclosed in the embodiment of the method of the third embodiment, refer to the embodiment of the method of the first embodiment and will not be repeated in this embodiment 3.
[0312] Example 4
[0313] Corresponding to the anti-collision alarm method of the third embodiment, the present invention further provides an anti-collision alarm device. Since the device embodiment of the present invention corresponds to the method embodiment of the third embodiment, details not disclosed in the device embodiment can be referred to the method embodiment of the third embodiment, and will not be further described in the present invention.
[0314] FIG5 is a schematic structural diagram of an anti-collision alarm device provided by an embodiment of the present disclosure. As shown in FIG5 , the anti-collision alarm device 500 includes:
[0315] A second acquiring unit 51 is used to acquire a user location and a target area;
[0316] The second determining unit 52 is configured to determine target alarm information according to the user location and description information of the target area, where the description information of the target area includes at least one of the center of the target area, the vertices of the target area, and the boundary of the target area.
[0317] In one embodiment, the second determining unit 52 is specifically configured to:
[0318] Obtaining, based on the user location and the description information of the target area, at least one of a distance from the center of the target area to the user location, a distance from the center of the target area to a vertex of the target area, a distance from a boundary of the target area to the user location, and a distance from the boundary of the target area to an obstacle;
[0319] The target alarm information is determined based on at least one of the distance from the center of the target area to the user position, the distance from the center of the target area to the vertex of the target area, the distance from the boundary of the target area to the user position, and the distance between the boundary of the target area and an obstacle, as well as the user position.
[0320] In one embodiment, the target area includes an obstacle area, and the second determining unit 52 is specifically configured to:
[0321] When the user position is located in the obstacle area, the target alarm information is determined according to the distance from the center of the obstacle area to the user position and the distance from the center of the obstacle area to the vertex of the obstacle area.
[0322] In one embodiment, when determining the target alarm information based on the distance from the center of the obstacle area to the user position and the distance from the center of the obstacle area to the vertex of the obstacle area, the second determining unit 52 is specifically configured to:
[0323] Obtaining the distance from the center of the obstacle area to the user's position, and the distance from the center of the obstacle area to the vertex of the obstacle area;
[0324] determining a target alarm probability based on a distance from the center of the obstacle area to the user's location, a distance from the center of the obstacle area to a vertex of the obstacle area, and an original alarm probability, where the original alarm probability refers to an alarm probability determined based on whether the user's location is within the target area;
[0325] The target alarm information is determined according to the target alarm probability.
[0326] In one embodiment, when determining the target alarm probability based on the distance from the center of the obstacle area to the user position, the distance from the center of the obstacle area to the vertex of the obstacle area, and the original alarm probability, the second determining unit 52 is specifically configured to:
[0327] Taking the ratio of the distance from the center of the obstacle area to the user position to the distance from the center of the obstacle area to the vertex of the obstacle area as the first ratio;
[0328] Obtaining a first correction coefficient according to the product of the first ratio and a first adjustment coefficient;
[0329] Obtaining a correction value for the obstacle area according to the sum of the first correction coefficient and a first preset correction value;
[0330] The target alarm probability is obtained according to the product of the correction value of the obstacle area and the original alarm probability.
[0331] In one embodiment, the target area includes an obstacle area and an area outside of obstacles, and the second determining unit 52 is specifically configured to:
[0332] When the user position is located in the area outside the obstacle, the target alarm information is determined according to the distance from the boundary of the target area to the user position and the distance from the boundary of the target area to the boundary of the obstacle area.
[0333] In one embodiment, when determining the target alarm information based on the distance from the boundary of the target area to the user location and the distance from the boundary of the target area to the boundary of the obstacle area, the second determining unit 52 is specifically configured to:
[0334] Obtaining the distance from the boundary of the target area to the user location, and the distance from the boundary of the target area to the boundary of the obstacle area;
[0335] determining a target alarm probability based on a distance from a boundary of the target area to the user location, a distance from a boundary of the target area to a boundary of the obstacle area, and an original alarm probability, where the original alarm probability refers to an alarm probability determined based on whether the user location is within the target area;
[0336] The target alarm information is determined according to the target alarm probability.
[0337] In one embodiment, when determining the target alarm probability based on the distance from the boundary of the target area to the user location, the distance from the boundary of the target area to the boundary of the obstacle area, and the original alarm probability, the second determining unit 52 is specifically configured to:
[0338] taking a ratio of a distance from a boundary of the target area to the user position to a distance from a boundary of the target area to a boundary of the obstacle area as a second ratio;
[0339] Obtaining a second correction coefficient according to the product of the second ratio and a second adjustment coefficient;
[0340] Obtaining a correction value for the area outside the obstacle according to the sum of the second correction coefficient and a second preset correction value;
[0341] The target alarm probability is obtained according to the product of the correction value of the area outside the obstacle and the original alarm probability.
[0342] In one embodiment, when acquiring the distance from the boundary of the target area to the user position and the distance from the boundary of the target area to the boundary of the obstacle area, the second determining unit 52 is specifically configured to:
[0343] Determine a first boundary of the target area closest to the user location, and a second boundary of the obstacle area closest to the user location;
[0344] The distance between the first boundary and the user position is used as the distance from the boundary of the target area to the user position, and the distance between the first boundary and the second boundary is used as the distance from the boundary of the target area to the boundary of the obstacle area.
[0345] In one embodiment, the area outside the obstacle includes a non-vertex area and at least one vertex area; the vertex area refers to an intersection area between the area outside the obstacle and a circular area having a line connecting a vertex of the obstacle area and a vertex of the nearest target area as its diameter and a midpoint of the line as its center;
[0346] When the second determining unit 52 obtains the target alarm probability according to the product of the corrected value of the area outside the obstacle and the original alarm probability, it is specifically configured to:
[0347] If the user position is located in the non-vertex area, the target alarm probability is obtained according to the product of the correction value of the area outside the obstacle and the original alarm probability.
[0348] In one embodiment, the apparatus further comprises:
[0349] The first calculation module is used to obtain the target alarm probability based on the product of the preset correction value of the vertex area and the original alarm probability if the user position is located in the vertex area; the sum of the second adjustment coefficient and the second preset correction value is equal to the preset correction value of the vertex area, and the preset correction value of the vertex area is greater than 1.
[0350] It should be noted that the above explanation of the method embodiment of the third embodiment is also applicable to the device of the fourth embodiment. The principles are the same and are no longer limited in the fourth embodiment.
[0351] Example 5
[0352] An anti-collision alarm method provided by the embodiment of the present disclosure,
[0353] It can be an anti-collision alarm method in a vehicle scenario or an anti-collision alarm method in a bedroom scenario, and is not specifically limited here.
[0354] The following embodiments are described using a vehicle scenario as an example. The processes of the anti-collision alarm method in other scenarios refer to the anti-collision alarm method in the vehicle scenario:
[0355] As shown in FIG6 , the anti-collision alarm method provided by the embodiment of the present disclosure includes the following steps:
[0356] Step 61: Acquire the user location and target area; wherein the target area includes an obstacle area and an area outside of obstacles;
[0357] In one embodiment, an image collector may be used to acquire an image of the interior of the vehicle. The image collector may be an IR camera, etc., to acquire the user position and target area from the image of the interior of the vehicle.
[0358] The target area refers to a risk area where the user may collide with an obstacle, and can be a regular graphic area, such as a rectangle or a sector. The target area can also be an irregular graphic area.
[0359] The user position includes the position of the head or other body parts (such as the knees, elbows, etc.). When the user position includes the position of the head, the head position refers to the position of the center point of the head.
[0360] The target area is an area that is larger than the obstacle area and extends in at least one of the three directions of the obstacle except the top. Therefore, the target area includes the obstacle area and the area outside the obstacle.
[0361] In one embodiment, obtaining the target area specifically includes:
[0362] Acquire a plurality of training images, wherein the training images are images of a human head at a boundary position of the risk area;
[0363] 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;
[0364] Determine the center point position of each of the head circumference frames to obtain the center point positions of multiple head circumference frames;
[0365] A closed area formed by connecting lines of multiple center points is determined as a target area.
[0366] In one embodiment, before the step of determining the center point position of each head circumscribed frame, the method further includes:
[0367] Multiplying the length and width of each of the head circumference frames to obtain the area of each of the head circumference frames;
[0368] Comparing the area of each head circumference frame with the area of a preset standard head circumference frame to obtain the confidence level of each head circumference frame;
[0369] Filtering out a credible head bounding box having a confidence level greater than a preset confidence level from the plurality of head bounding boxes;
[0370] Determining the center point position of each head circumscribed frame includes:
[0371] Determine the center point position of each credible human head bounding box.
[0372] Step 62: When the user is located in the obstacle area or the user is located in the area outside the obstacle, target alarm information is determined.
[0373] The obstacle zone refers to the area where obstacles are located. When the user is located in the obstacle zone, the distance to the obstacle is closer, so the possibility of a collision is higher when the user is located in the obstacle zone. The non-obstacle zone refers to the area outside the risk zone excluding the obstacle zone. When the user is located in the non-obstacle zone, the distance to the obstacle is farther, so the possibility of a collision is lower when the user is located in the non-obstacle zone.
[0374] When the user is located in an obstacle area, target alarm information for the obstacle area is determined; when the user is located in an area outside of obstacles, target alarm information for the area outside of obstacles is determined. Target alarm information is output to inform the user of collision risks.
[0375] In an optional specific implementation, step 62, when the user position is located in the obstacle area or the user position is located in the area outside the obstacle, determines the target alarm information, including:
[0376] When the user position is located in the obstacle area, the target warning information is determined according to the distance from the center of the obstacle area to the user position and the distance from the center of the obstacle area to the vertex of the obstacle area; or
[0377] When the user position is located in the area outside the obstacle, the target alarm information is determined according to the distance from the boundary of the target area to the user position and the distance from the boundary of the target area to the boundary of the obstacle area.
[0378] When the user is located in the obstacle area, target alarm information is determined based on the distance from the center of the obstacle area to the user's location and the distance from the center of the obstacle area to each vertex of the obstacle area.
[0379] When the user is located in an area outside the obstacle, the target alarm information is determined based on the distance from the boundary of the target area to the user's location and the distance from the boundary of the target area to the boundary of the obstacle area.
[0380] The boundary of the target area refers to the boundary of the area that does not distinguish between the obstacle area and the area outside the obstacle.
[0381] In an optional specific embodiment, the step of determining target alarm information based on the distance from the center of the obstacle area to the user position and the distance from the center of the obstacle area to the vertex of the obstacle area specifically includes:
[0382] Obtaining the distance from the center of the obstacle area to the user's position, and the distance from the center of the obstacle area to the vertex of the obstacle area;
[0383] determining a target alarm probability based on a distance from the center of the obstacle area to the user's location, a distance from the center of the obstacle area to a vertex of the obstacle area, and an original alarm probability, where the original alarm probability refers to an alarm probability determined based on whether the user's location is within the target area;
[0384] The target alarm information is determined according to the target alarm probability.
[0385] When the user is located in an obstacle area, the distance from the center of the obstacle area to the user's location is obtained, the distance from the center of the obstacle area to the vertex of the obstacle area is obtained, and the original alarm probability is obtained. Based on the distance from the center of the obstacle area to the user's location, the distance from the center of the obstacle area to the vertex of the obstacle area, and the original alarm probability, the target alarm probability can be determined. Target alarm information can be determined based on the target alarm probability.
[0386] The target alarm information may include the target alarm probability, or the target alarm information is information generated based on the target alarm probability to prompt the user to warn about collision avoidance.
[0387] Among them, the original alarm probability refers to the alarm probability determined based on whether the user location is in the target area. When the user location is in the target area, an anti-collision alarm is issued, which corresponds to one original alarm probability; when the user location is outside the target area, no anti-collision alarm is issued, which also corresponds to one original alarm probability.
[0388] In one embodiment, the original alarm probability corresponding to whether the user's location is within the target area can be set to 1 and 0, respectively. When the original alarm probability is 1, an anti-collision alarm is issued, and when the original alarm probability is 0, no anti-collision alarm is issued. Optionally, the original alarm probability corresponding to whether the user's location is within the target area can be set to 10 and 5, respectively. When the original alarm probability is 10, an anti-collision alarm is issued, and when the original alarm probability is 5, no anti-collision alarm is issued. This is not limited in the present disclosure.
[0389] In one embodiment, it is also necessary to determine whether to perform an anti-collision alarm based on the magnitude relationship between the target alarm probability and the preset alarm probability.
[0390] Specifically, when the target alarm probability is less than the preset alarm probability, it means that the current user position is not within the target area and no anti-collision alarm is performed. When the target alarm probability is not less than the preset alarm probability, it means that the current user position is within the target area and there is a risk of colliding with obstacles, so an anti-collision alarm is performed.
[0391] In an optional specific embodiment, the step of determining the target alarm probability based on the distance from the center of the obstacle area to the user position, the distance from the center of the obstacle area to the vertex of the obstacle area, and the original alarm probability is specifically:
[0392] Taking the ratio of the distance from the center of the obstacle area to the user position to the distance from the center of the obstacle area to the vertex of the obstacle area as the first ratio;
[0393] Obtaining a first correction coefficient according to the product of the first ratio and a first adjustment coefficient;
[0394] Obtaining a correction value for the obstacle area according to the sum of the first correction coefficient and a first preset correction value;
[0395] The target alarm probability is obtained according to the product of the correction value of the obstacle area and the original alarm probability.
[0396] When the head is located in the obstacle area, the closer the distance from the center of the obstacle area to the user's position is, the greater the possibility that the user will hit the obstacle; the farther the distance from the center of the obstacle area to the user's position is, the smaller the possibility that the user will hit the obstacle.
[0397] The first ratio is the ratio of the distance from the center of the obstacle area to the user's location to the distance from the center of the obstacle area to the vertex of the obstacle area. For example, if the obstacle area is a rectangle, the distance from the center of the obstacle area to the vertex of the obstacle area is a constant. Therefore, the closer the user's location is to the center of the obstacle area, the smaller the first ratio, and the farther the user's location is from the center of the obstacle area, the larger the first ratio.
[0398] The first adjustment coefficient is a negative number. Preferably, the first adjustment coefficient may be -0.5.
[0399] If the distance from the center of the obstacle area to the vertex of the obstacle area is a constant, the closer the user position is to the center of the obstacle area, the smaller the first ratio and the larger the first correction coefficient; the farther the user position is from the center of the obstacle area, the larger the first ratio and the smaller the first correction coefficient.
[0400] As the distance from the user position to the center of the obstacle area increases, the first ratio decreases. Since the first adjustment coefficient is a negative number, the correction value of the obstacle area decreases as the distance from the user position to the center of the obstacle area increases.
[0401] In an optional specific implementation, the step of determining the target alarm information based on the distance from the boundary of the target area to the user location and the distance from the boundary of the target area to the boundary of the obstacle area specifically includes:
[0402] Obtaining the distance from the boundary of the target area to the user location, and the distance from the boundary of the target area to the boundary of the obstacle area;
[0403] determining a target alarm probability based on a distance from a boundary of the target area to the user location, a distance from a boundary of the target area to a boundary of the obstacle area, and an original alarm probability, where the original alarm probability refers to an alarm probability determined based on whether the user location is within the target area;
[0404] The target alarm information is determined according to the target alarm probability.
[0405] If the target area is fan-shaped and the user is outside the obstacle area, the boundary of the obstacle area closest to the user is obtained, as well as the boundary of the target area closest to the user. The distance from the boundary of the target area to the user's location is then obtained, along with the original alarm probability. The target alarm probability is determined based on the distance from the boundary of the target area to the user's location, the distance from the boundary of the target area to the boundary of the obstacle area, and the original alarm probability. Target alarm information is then determined based on the target alarm probability.
[0406] The target alarm information may include the target alarm probability, or the target alarm information is information generated based on the target alarm probability to prompt the user to warn about collision avoidance.
[0407] Among them, the original alarm probability refers to the alarm probability determined based on whether the user location is in the target area. When the user location is in the target area, an anti-collision alarm is issued, which corresponds to one original alarm probability; when the user location is outside the target area, no anti-collision alarm is issued, which also corresponds to one original alarm probability.
[0408] In one embodiment, the original alarm probability corresponding to whether the user's location is within the target area can be set to 1 and 0, respectively. When the original alarm probability is 1, an anti-collision alarm is issued, and when the original alarm probability is 0, no anti-collision alarm is issued. Optionally, the original alarm probability corresponding to whether the user's location is within the target area can be set to 10 and 5, respectively. When the original alarm probability is 10, an anti-collision alarm is issued, and when the original alarm probability is 5, no anti-collision alarm is issued. This is not limited in the present disclosure.
[0409] In one embodiment, it is also necessary to determine whether to perform an anti-collision alarm based on the magnitude relationship between the target alarm probability and the preset alarm probability.
[0410] Specifically, when the target alarm probability is less than the preset alarm probability, it means that the current user position is not within the target area and no anti-collision alarm is performed. When the target alarm probability is not less than the preset alarm probability, it means that the current user position is within the target area and there is a risk of colliding with obstacles, so an anti-collision alarm is performed.
[0411] In an optional specific embodiment, the step of determining the target alarm probability based on the distance from the boundary of the target area to the user location, the distance from the boundary of the target area to the boundary of the obstacle area, and the original alarm probability specifically includes:
[0412] taking a ratio of a distance from a boundary of the target area to the user position to a distance from a boundary of the target area to a boundary of the obstacle area as a second ratio;
[0413] Obtaining a second correction coefficient according to the product of the second ratio and a second adjustment coefficient;
[0414] Obtaining a correction value for the area outside the obstacle according to the sum of the second correction coefficient and a second preset correction value;
[0415] The target alarm probability is obtained according to the product of the correction value of the area outside the obstacle and the original alarm probability.
[0416] The ratio of the distance from the boundary of the target area to the user's position to the distance from the boundary of the target area to the boundary of the obstacle area is used as the second ratio. When the distance between the user's position and the center point of the obstacle area is equal, the probability of colliding with the obstacle is equal. Therefore, the obstacle area is usually a regular shape, such as a rectangle or a sector.
[0417] If the target area is a rectangle and the user is located in a non-vertex area outside the obstacle area, the closer the user is to the obstacle area, the larger the second ratio. When the user is located at the boundary of the obstacle area, the second ratio is the largest, and at this time the second ratio is 1.
[0418] The second adjustment coefficient is a positive number. Preferably, the second adjustment coefficient may be 1.
[0419] In an optional specific embodiment, the step of obtaining the distance from the boundary of the target area to the user position, and the distance from the boundary of the target area to the boundary of the obstacle area, specifically includes:
[0420] Determine a first boundary of the target area closest to the user location, and a second boundary of the obstacle area closest to the user location;
[0421] The distance between the first boundary and the user position is used as the distance from the boundary of the target area to the user position, and the distance between the first boundary and the second boundary is used as the distance from the boundary of the target area to the boundary of the obstacle area.
[0422] If the target area is rectangular and the user is located in a non-vertex area outside the obstacle area, obtain the first boundary of the target area in the same direction as the user's position relative to the obstacle area, and the second boundary of the obstacle area closest to the user's position. If the user is on the left side of the obstacle area, the first boundary is the left boundary of the outside obstacle area. If the user is on the right side of the obstacle area, the first boundary is the right boundary of the outside obstacle area.
[0423] If the target area is fan-shaped and the user is located outside the obstacle area, a first boundary of the target area closest to the user's location and a second boundary of the obstacle area closest to the user's location are obtained.
[0424] The distance between the first boundary and the user position is used as the distance from the boundary of the target area to the user position, and the distance between the first boundary and the second boundary is used as the distance from the boundary of the target area to the boundary of the obstacle area.
[0425] In one embodiment, taking the target area as a rectangle as an example, the user position is on the left side of the obstacle area, that is, the first boundary is the left boundary of the area outside the obstacle, then the distance between the left boundary of the area outside the obstacle and the user position is used as the distance from the boundary of the target area to the position of the human head, and the distance between the left boundary of the target area and the second boundary of the obstacle area is used as the distance from the boundary of the target area to the boundary of the obstacle area.
[0426] In an optional specific embodiment, the area outside the obstacle includes a non-vertex area and at least one vertex area; the vertex area refers to an intersection area between the area outside the obstacle and a circular area having a line connecting a vertex of the obstacle area and a vertex of the nearest target area as a diameter and a midpoint of the line as a center;
[0427] The step of obtaining the target alarm probability based on the product of the correction value of the area outside the obstacle and the original alarm probability specifically includes:
[0428] If the user position is located in the non-vertex area, the target alarm probability is obtained according to the product of the correction value of the area outside the obstacle and the original alarm probability.
[0429] Based on the user's coordinates within the target area, determine whether the user is located in the vertex area or the non-vertex area. For example, if the obstacle area is a rectangle, the vertices refer to the two vertices below the obstacle area. The non-vertex area refers to the area outside the obstacle area excluding the vertex areas.
[0430] When the user position is the head position, the center point position of the head bounding box can be used to represent the head position, and the head position can be determined to be in the vertex area or non-vertex area outside the obstacle area based on the center point position of the head bounding box.
[0431] If the user position is located in a non-vertex area, the target alarm probability is obtained according to the product of the correction value of the area outside the obstacle and the original alarm probability.
[0432] In an optional specific embodiment, the method may further include:
[0433] If the user position is located in the vertex area, the target alarm probability is obtained based on the product of the preset correction value of the vertex area and the original alarm probability; the sum of the second adjustment coefficient and the second preset correction value is equal to the preset correction value of the vertex area, and the preset correction value of the vertex area is greater than 1.
[0434] The vertex area is a very dangerous area. If the user hits an obstacle, the consequences are very serious. Therefore, the alarm probability needs to be increased.
[0435] Based on this, in one embodiment, the preset correction value of the vertex area is greater than 1; preferably, the preset correction value of the vertex area is 2.
[0436] In one embodiment, the sum of the second adjustment coefficient and the second preset correction value equals the preset correction value for the vertex region. When the user is at the boundary of the obstacle region, the second ratio is 1. For example, when the user is located in the vertex region, when the second adjustment coefficient is 1, the maximum first correction coefficient is 1. To ensure continuity between the preset correction value for the vertex region and the correction value for the area outside the obstacle, the second preset correction value is 1.
[0437] In one embodiment, the sum of the first adjustment coefficient and the first preset correction value is equal to the preset correction value of the vertex area.
[0438] When the user is in the vertex area, the distance from the user to the center of the obstacle area is equal to the distance from the center of the obstacle area to the vertex of the obstacle area. In this case, the first ratio is maximum, and the first ratio is 1. Taking the first adjustment coefficient of -0.5 as an example, the minimum value of the first correction coefficient is -0.5. To ensure continuity between the preset correction values for the vertex area and the correction values for the obstacle area when the head is in the vertex area, the first preset correction value is 2.5.
[0439] In one embodiment, the aforementioned preset alarm probability is related to the size of the preset correction value of the vertex area. For example, when the preset correction value of the vertex area is 2, the preset alarm probability may be 1; when the preset correction value of the vertex area is 5, the preset alarm probability may be 4. This is not limited in the present disclosure.
[0440] The embodiment content of the method in the above-mentioned embodiment 5 corresponds to the embodiment content of the method in the embodiment 1. For details not disclosed in the embodiment of the method in the embodiment 5, reference can be made to the embodiment content of the method in the embodiment 1, and they will not be repeated in this embodiment 5.
[0441] Example 6
[0442] Corresponding to the anti-collision alarm method of the fifth embodiment, the present invention further provides an anti-collision alarm device. Since the device embodiment of the present invention corresponds to the method embodiment of the fifth embodiment, details not disclosed in the device embodiment can be referred to the method embodiment of the fifth embodiment, and will not be further described in the present invention.
[0443] FIG7 is a schematic structural diagram of an anti-collision alarm device provided by an embodiment of the present disclosure. As shown in FIG7 , the anti-collision alarm device 700 includes:
[0444] The third acquisition unit 71 is used to acquire the user position and the target area; wherein the target area includes the obstacle area and the area outside the obstacle;
[0445] The third determining unit 72 is configured to determine target alarm information when the user position is located in the obstacle area or the user position is located in the area outside the obstacle.
[0446] In one embodiment, the third determining unit 72 is specifically configured to:
[0447] When the user position is located in the obstacle area, the target warning information is determined according to the distance from the center of the obstacle area to the user position and the distance from the center of the obstacle area to the vertex of the obstacle area; or
[0448] When the user position is located in the area outside the obstacle, the target alarm information is determined according to the distance from the boundary of the target area to the user position and the distance from the boundary of the target area to the boundary of the obstacle area.
[0449] In one embodiment, when determining the target warning information based on the distance from the center of the obstacle area to the user position and the distance from the center of the obstacle area to the vertex of the obstacle area, the third determining unit 72 is specifically configured to:
[0450] Obtaining the distance from the center of the obstacle area to the user's position, and the distance from the center of the obstacle area to the vertex of the obstacle area;
[0451] determining a target alarm probability based on a distance from the center of the obstacle area to the user's location, a distance from the center of the obstacle area to a vertex of the obstacle area, and an original alarm probability, where the original alarm probability refers to an alarm probability determined based on whether the user's location is within the target area;
[0452] The target alarm information is determined according to the target alarm probability.
[0453] In one embodiment, when determining the target alarm information based on the distance from the boundary of the target area to the user location and the distance from the boundary of the target area to the boundary of the obstacle area, the third determining unit 72 is specifically configured to:
[0454] Obtaining the distance from the boundary of the target area to the user location, and the distance from the boundary of the target area to the boundary of the obstacle area;
[0455] determining a target alarm probability based on a distance from a boundary of the target area to the user location, a distance from a boundary of the target area to a boundary of the obstacle area, and an original alarm probability, where the original alarm probability refers to an alarm probability determined based on whether the user location is within the target area;
[0456] The target alarm information is determined according to the target alarm probability.
[0457] In one embodiment, when acquiring the distance from the boundary of the target area to the user position and the distance from the boundary of the target area to the boundary of the obstacle area, the third determining unit 72 is specifically configured to:
[0458] Determine a first boundary of the target area closest to the user location, and a second boundary of the obstacle area closest to the user location;
[0459] The distance between the first boundary and the user position is used as the distance from the boundary of the target area to the user position, and the distance between the first boundary and the second boundary is used as the distance from the boundary of the target area to the boundary of the obstacle area.
[0460] It should be noted that the above explanation of the method embodiment of Example 5 is also applicable to the device of Example 6, and the principles are the same, and are not limited in Example 6. According to the embodiments of the present disclosure, the present disclosure also provides an electronic device and a non-transitory computer-readable storage medium storing computer instructions.
[0461] Specifically, an embodiment of the present disclosure provides an electronic device, including:
[0462] at least one processor; and
[0463] a memory communicatively connected to at least one processor; wherein,
[0464] The memory stores instructions that can be executed by at least one processor. The instructions are executed by at least one processor so that the at least one processor can perform the steps of the method of the aforementioned embodiment one, embodiment three, or embodiment five.
[0465] 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 method of the aforementioned embodiment 1, embodiment 3, or embodiment 5.
[0466] FIG8 shows a schematic block diagram of an example electronic device 400 that can be used to implement an embodiment of the present disclosure. 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, smart phones, wearable devices, vehicle-mounted devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or required herein.
[0467] As shown in Figure 8, electronic device 400 includes a computing unit 401, which can perform various appropriate actions and processes according to a computer program stored in ROM (Read-Only Memory) 402 or a computer program loaded from storage unit 408 into RAM (Random Access Memory) 403. In RAM 403, various programs and data required for the operation of device 400 can also be stored. Computing unit 401, ROM 402 and RAM 403 are connected to each other via bus 404. I / O (Input / Output) interface 405 is also connected to bus 404.
[0468] Various components in device 400 are connected to I / O interface 405, including an input unit 406, such as a keyboard, mouse, etc.; an output unit 407, such as various types of displays, speakers, etc.; a storage unit 408, such as a magnetic disk, optical disk, etc.; and a communication unit 409, such as a network card, modem, wireless communication transceiver, etc. Communication unit 409 allows device 400 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.
[0469] Computing unit 401 can be any general-purpose and / or specialized processing component with processing and computing capabilities. Some examples of computing unit 401 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. Computing unit 401 performs the various methods and processes described above, such as the head collision avoidance alarm probability determination method. For example, in some embodiments, the head collision avoidance alarm probability determination method can be implemented as a computer software program tangibly embodied in a machine-readable medium, such as storage unit 408. In some embodiments, part or all of the computer program can be loaded and / or installed onto device 400 via ROM 402 and / or communication unit 409. When the computer program is loaded into RAM 403 and executed by computing unit 401, one or more steps of the method described above can be performed. Alternatively, in other embodiments, the computing unit 401 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).
[0470] 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.
[0471] 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 collision avoidance alarm method, comprising: Get user location and target area; Target alarm information is determined according to the user location and description information of the target area, where the description information of the target area includes at least one of a center of the target area, a vertex of the target area, and a boundary of the target area.
2. The method according to claim 1, wherein The determining target alarm information according to the user location and the description information of the target area includes: Obtaining, based on the user location and the description information of the target area, at least one of a distance from the center of the target area to the user location, a distance from the center of the target area to a vertex of the target area, a distance from a boundary of the target area to the user location, and a distance from the boundary of the target area to an obstacle; The target alarm information is determined based on at least one of the distance from the center of the target area to the user position, the distance from the center of the target area to the vertex of the target area, the distance from the boundary of the target area to the user position, and the distance between the boundary of the target area and an obstacle, as well as the user position.
3. The method according to claim 1 or 2, wherein: The target area includes an obstacle area, and determining target alarm information according to the user location and description information of the target area includes: When the user position is located in the obstacle area, the target alarm information is determined according to the distance from the center of the obstacle area to the user position and the distance from the center of the obstacle area to the vertex of the obstacle area.
4. The method according to claim 3, wherein: The determining the target alarm information according to the distance from the center of the obstacle area to the user position and the distance from the center of the obstacle area to the vertex of the obstacle area includes: Obtaining the distance from the center of the obstacle area to the user's position, and the distance from the center of the obstacle area to the vertex of the obstacle area; determining a target alarm probability based on a distance from the center of the obstacle area to the user's location, a distance from the center of the obstacle area to a vertex of the obstacle area, and an original alarm probability, where the original alarm probability refers to an alarm probability determined based on whether the user's location is within the target area; The target alarm information is determined according to the target alarm probability.
5. The method according to claim 4, wherein The determining of the target alarm probability according to the distance from the center of the obstacle area to the user position, the distance from the center of the obstacle area to the vertex of the obstacle area, and the original alarm probability includes: Taking the ratio of the distance from the center of the obstacle area to the user position to the distance from the center of the obstacle area to the vertex of the obstacle area as the first ratio; Obtaining a first correction coefficient according to the product of the first ratio and a first adjustment coefficient; Obtaining a correction value for the obstacle area according to the sum of the first correction coefficient and a first preset correction value; The target alarm probability is obtained according to the product of the correction value of the obstacle area and the original alarm probability.
6. The method according to any one of claims 1 to 5, wherein: The target area includes an obstacle area and an area outside of obstacles, and determining target alarm information according to the user location and description information of the target area includes: When the user position is located in the area outside the obstacle, the target alarm information is determined according to the distance from the boundary of the target area to the user position and the distance from the boundary of the target area to the boundary of the obstacle area.
7. The method according to claim 6, wherein: The determining the target alarm information according to the distance from the boundary of the target area to the user position and the distance from the boundary of the target area to the boundary of the obstacle area includes: Obtaining the distance from the boundary of the target area to the user location, and the distance from the boundary of the target area to the boundary of the obstacle area; determining a target alarm probability based on a distance from a boundary of the target area to the user location, a distance from a boundary of the target area to a boundary of the obstacle area, and an original alarm probability, where the original alarm probability refers to an alarm probability determined based on whether the user location is within the target area; The target alarm information is determined according to the target alarm probability.
8. The method according to claim 7, wherein: The determining of the target alarm probability according to the distance from the boundary of the target area to the user position, the distance from the boundary of the target area to the boundary of the obstacle area, and the original alarm probability includes: taking a ratio of a distance from a boundary of the target area to the user position to a distance from a boundary of the target area to a boundary of the obstacle area as a second ratio; Obtaining a second correction coefficient according to the product of the second ratio and a second adjustment coefficient; Obtaining a correction value for the area outside the obstacle according to the sum of the second correction coefficient and a second preset correction value; The target alarm probability is obtained according to the product of the correction value of the area outside the obstacle and the original alarm probability.
9. The method according to claim 7 or 8, wherein The obtaining of the distance from the boundary of the target area to the user location, and the distance from the boundary of the target area to the boundary of the obstacle area, includes: Determine a first boundary of the target area closest to the user location, and a second boundary of the obstacle area closest to the user location; The distance between the first boundary and the user position is used as the distance from the boundary of the target area to the user position, and the distance between the first boundary and the second boundary is used as the distance from the boundary of the target area to the boundary of the obstacle area.
10. The method according to claim 8, wherein The area outside the obstacle includes a non-vertex area and at least one vertex area; the vertex area refers to the intersection area of the area outside the obstacle, with the line connecting the vertex of the obstacle area and the vertex of the nearest target area as the diameter and the midpoint of the line as the center; The step of obtaining the target alarm probability based on the product of the correction value of the area outside the obstacle and the original alarm probability includes: If the user position is located in the non-vertex area, the target alarm probability is obtained according to the product of the correction value of the area outside the obstacle and the original alarm probability.
11. The method according to claim 10, wherein: The method further comprises: If the user position is located in the vertex area, the target alarm probability is obtained based on the product of the preset correction value of the vertex area and the original alarm probability; the sum of the second adjustment coefficient and the second preset correction value is equal to the preset correction value of the vertex area, and the preset correction value of the vertex area is greater than 1.
12. An anti-collision alarm method, comprising: Obtaining a user location and a target area; wherein the target area includes an obstacle area and an area outside of obstacles; In a case where the user position is located in the obstacle area or the user position is located in the area outside the obstacle, target alarm information is determined.
13. The method according to claim 12, wherein: The determining of target alarm information when the user position is located in the obstacle area or the user position is located in the area outside the obstacle includes: When the user position is located in the obstacle area, the target warning information is determined according to the distance from the center of the obstacle area to the user position and the distance from the center of the obstacle area to the vertex of the obstacle area; or When the user position is located in the area outside the obstacle, the target alarm information is determined according to the distance from the boundary of the target area to the user position and the distance from the boundary of the target area to the boundary of the obstacle area.
14. The method according to claim 13, wherein The determining target alarm information according to the distance from the center of the obstacle area to the user position and the distance from the center of the obstacle area to the vertex of the obstacle area includes: Obtaining the distance from the center of the obstacle area to the user's position, and the distance from the center of the obstacle area to the vertex of the obstacle area; determining a target alarm probability based on a distance from the center of the obstacle area to the user's location, a distance from the center of the obstacle area to a vertex of the obstacle area, and an original alarm probability, where the original alarm probability refers to an alarm probability determined based on whether the user's location is within the target area; The target alarm information is determined according to the target alarm probability.
15. The method according to claim 13, wherein The determining of target alarm information according to the distance from the boundary of the target area to the user location and the distance from the boundary of the target area to the boundary of the obstacle area includes: Obtaining the distance from the boundary of the target area to the user location, and the distance from the boundary of the target area to the boundary of the obstacle area; determining a target alarm probability based on a distance from a boundary of the target area to the user location, a distance from a boundary of the target area to a boundary of the obstacle area, and an original alarm probability, where the original alarm probability refers to an alarm probability determined based on whether the user location is within the target area; The target alarm information is determined according to the target alarm probability.
16. The method according to claim 15, wherein The obtaining of the distance from the boundary of the target area to the user location, and the distance from the boundary of the target area to the boundary of the obstacle area, includes: Determine a first boundary of the target area closest to the user location, and a second boundary of the obstacle area closest to the user location; The distance between the first boundary and the user position is used as the distance from the boundary of the target area to the user position, and the distance between the first boundary and the second boundary is used as the distance from the boundary of the target area to the boundary of the obstacle area.
17. A method for determining the probability of an anti-collision head alarm, comprising: Obtaining the position of the human head and the target area; wherein the target area refers to the risk area where the human head may hit an obstacle, and the target area includes the obstacle area and the area outside the obstacle; the obstacle area refers to the area where the obstacle is located, and the area outside the obstacle area refers to the area within the risk area excluding the obstacle area; determining, according to the position coordinates of the human head position in the target area, whether the human head position is located in the obstacle area or the area outside the obstacle; The original alarm probability is corrected using the correction value of the obstacle area or the correction value of the area outside the obstacle to obtain the target alarm probability; the correction values of the obstacle area and the area outside the obstacle are different; the correction value of the obstacle area is determined based on the distance from the center of the obstacle area to the position of the human head, and the distance from the center of the obstacle area to the vertex of the obstacle area; the correction value of the area outside the obstacle is determined based on the distance from the boundary of the target area to the position of the human head, and the distance from the boundary of the target area to the boundary of the obstacle area; the original alarm probability refers to the alarm probability determined based on whether the position of the human head is located in the target area.
18. A device for determining the probability of an anti-collision head alarm, comprising: A first acquisition unit is configured to acquire a head position and a target area; wherein the target area refers to a risk area where the head may collide with an obstacle, and the target area includes an obstacle area and an area outside the obstacle; the obstacle area refers to an area where the obstacle is located, and the area outside the obstacle area refers to an area within the risk area excluding the obstacle area; a first determining unit, configured to determine, based on the position coordinates of the human head position in the target area, whether the human head position is located in the obstacle area or the area outside the obstacle; A correction unit is used to correct the original alarm probability using the correction value of the obstacle area or the correction value of the area outside the obstacle to obtain a target alarm probability; the correction values of the obstacle area and the area outside the obstacle are different; the correction value of the obstacle area is determined based on the distance from the center of the obstacle area to the position of the human head, and the distance from the center of the obstacle area to the vertex of the obstacle area; the correction value of the area outside the obstacle is determined based on the distance from the boundary of the target area to the position of the human head, and the distance from the boundary of the target area to the boundary of the obstacle area; the original alarm probability refers to the alarm probability determined based on whether the position of the human head is located in the target area.
19. An anti-collision alarm device, comprising: A second acquiring unit, configured to acquire a user location and a target area; The second determining unit is configured to determine target alarm information according to the user location and description information of the target area, where the description information of the target area includes at least one of a center of the target area, a vertex of the target area, and a boundary of the target area.
20. An anti-collision alarm device, comprising: A third acquisition unit is configured to acquire a user position and a target area; wherein the target area includes an obstacle area and an area outside of obstacles; The third determining unit is configured to determine target alarm information when the user position is located in the obstacle area or the user position is located in the area outside the obstacle.
21. An electronic device comprising: 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 17.
22. A non-transitory computer-readable storage medium storing computer instructions for causing the computer to execute the method according to any one of claims 1 to 17.
Citation Information
Patent Citations
Boundary intrusion detection method, device and system
CN109426798A
Control method, related equipment and computer readable storage medium
CN112703144A
Detection method, electronic equipment, detection equipment and storage medium
CN113473074A
Monitoring model training and monitoring method and device, electronic equipment and storage medium
CN116563668A
Personnel safety monitoring method and system based on transformer substation cross area detection algorithm
CN116959201A