Handlebar-off riding behavior identification method and device, electronic equipment and storage medium
The target distance between the handlebar and the forearm is identified by image recognition method, and the problem of high cost and low reliability of detection of riding riding in the prior art is solved, thereby achieving more efficient and reliable riding riding riding detection.
Patent Information
- Application Number
- CN202411202078.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-29
- Publication Date
- 2024-12-17
AI Technical Summary
In the prior art, it is necessary to configure sensing equipment for each vehicle, which is costly and has low reliability.
Through the image recognition method, the image to be identified is received, whether it contains the characteristics of a person riding, the target distance between the handlebar and the forearm is determined, and the handlebar riding behavior is determined according to the distance threshold, without setting a sensing device on each vehicle.
The cost of detecting riding a bicycle is reduced, and the reliability of the detection results is improved. By accurately identifying the degree of riding a bicycle with handlebar and forearm, the accuracy of the identification results is improved.
Smart Images

Figure CN119152543A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the technical field of image recognition, for example, to a method, device, electronic device and storage medium for identifying handlebar-off riding behavior. Background Art
[0002] Riding a bicycle without handlebars can cause safety hazards to the rider and other traffic participants. In order to ensure traffic safety, it is very important to detect the rider's riding behavior without handlebars in a timely manner. In the related art, a sensor device is usually set on the vehicle (such as the handlebars) to detect whether there is riding behavior without handlebars. However, this method of detecting riding behavior without handlebars requires each vehicle to be equipped with a sensor device, resulting in high cost and low reliability of the detection result. Summary of the invention
[0003] In order to provide a basic understanding of some aspects of the disclosed embodiments, a brief summary is given below. The summary is not an extensive review, nor is it intended to identify key / critical components or delineate the scope of protection of these embodiments, but rather serves as a prelude to the detailed description that follows.
[0004] The embodiments of the present disclosure provide a method, device, electronic device and storage medium for identifying off-handlebar riding behavior, which can reduce the cost of detecting off-handlebar riding behavior and improve the reliability of detection results.
[0005] According to a first aspect of the present disclosure, a method for identifying off-handlebar riding behavior is provided, comprising:
[0006] receiving an image to be identified, and identifying whether the image contains features of a person riding a bicycle;
[0007] When determining that the image contains features of a person riding a bicycle, identifying a handlebar and a forearm in the image;
[0008] Determine the target distance between the handlebar and your forearm;
[0009] The recognition result of the off-handlebar riding behavior is determined based on the comparison result of the target distance and the distance threshold.
[0010] In some embodiments, the handlebar includes two handlebar halves; and determining a target distance between the handlebar and the forearm includes:
[0011] For each half handlebar, determine a reference distance between the half handlebar and the forearm;
[0012] Based on the reference distances corresponding to the two half-handlebars, the target distance between the handlebar and the forearm is determined.
[0013] In some embodiments, the forearm includes a left forearm and a right forearm; for each half-handlebar, determining a reference distance between the half-handlebar and the forearm comprises:
[0014] For each handlebar half, determining whether the handlebar half intersects each forearm;
[0015] When the half handlebar intersects the left forearm or the right forearm, the reference distance between the half handlebar and the forearm is determined to be zero;
[0016] When the half handlebar does not intersect with the left forearm and the right forearm, a characteristic distance between the half handlebar and each forearm is determined, and based on the characteristic distance between the half handlebar and each forearm, a reference distance between the half handlebar and the forearm is determined.
[0017] In some embodiments, determining a reference distance between the half handlebar and the forearm based on a characteristic distance between the half handlebar and each forearm includes:
[0018] Among the characteristic distances between the half handlebar and each forearm, determine the minimum characteristic distance;
[0019] The minimum characteristic distance is taken as the reference distance between the half handlebar and the forearm.
[0020] In some embodiments, the half-handlebar includes two endpoints; and determining a characteristic distance between the half-handlebar and each forearm includes:
[0021] For each forearm, determine the effective distance between each end point of the half handlebar and the forearm;
[0022] Based on the effective distance between each end point of the half handlebar and the forearm, a characteristic distance between the half handlebar and the forearm is determined.
[0023] In some embodiments, determining a characteristic distance between the half handlebar and the forearm based on an effective distance between each end point of the half handlebar and the forearm includes:
[0024] Among the effective distances between each end point of the half handlebar and the forearm, determine the minimum effective distance;
[0025] The minimum effective distance is taken as the characteristic distance between the half handlebar and the forearm.
[0026] In some embodiments, each forearm includes an elbow key point and a hand key point, and the effective distance between an end point of the half-handlebar and a forearm is the minimum value among the first distance, the second distance and the third distance;
[0027] The first distance is the distance between the endpoint of the half handlebar and the elbow key point of the forearm, the second distance is the distance between the endpoint of the half handlebar and the hand key point of the forearm, and the third distance is the vertical distance between the endpoint of the half handlebar and the forearm.
[0028] In some embodiments, determining the recognition result of the off-handlebar riding behavior according to the comparison result of the target distance and the distance threshold includes:
[0029] When the target distance is greater than the distance threshold, it is determined that there is a riding behavior of taking the handlebars off;
[0030] When the target distance is not greater than the distance threshold, it is determined that there is no off-handlebar riding behavior.
[0031] In some embodiments, identifying whether an image contains features of a person riding a bicycle includes: inputting the image into a first object detection model, and using the first object detection model to identify whether the image contains features of a person riding a bicycle, wherein the first object detection model is trained using images containing pedestrians, images containing vehicles, and images containing people riding bicycles.
[0032] In some embodiments, identifying handlebars and forearms in an image includes: inputting the image into a second object detection model, and using the second object detection model to identify handlebars and forearms in the image, wherein the second object detection model is trained using images of people riding bicycles with the skeletal structures of the people and the bicycles marked.
[0033] According to a second aspect of the present disclosure, a device for identifying off-handlebar riding behavior is provided, comprising:
[0034] A first image recognition module is configured to receive an image to be recognized and recognize whether the image contains features of a person riding a bicycle;
[0035] A second image recognition module is configured to recognize a handlebar and a forearm in the image when determining that the image contains features of a person riding a bicycle;
[0036] a target distance determination module configured to determine a target distance between the handlebar and the forearm;
[0037] The behavior result determination module is configured to determine the recognition result of the off-handlebar riding behavior according to the comparison result between the target distance and the distance threshold.
[0038] According to a third aspect of the present disclosure, an electronic device is provided, including a processor and a memory storing program instructions, wherein the processor can execute the method for identifying off-handlebar riding behavior provided in the first aspect of the present disclosure.
[0039] According to a fourth aspect of the present disclosure, a storage medium is provided, in which computer program instructions are stored. When the computer program instructions are executed by a processor, the method for identifying off-handlebar riding behavior provided in the first aspect of the present disclosure is executed.
[0040] The method, device, electronic device and storage medium for identifying off-handlebar riding behavior provided by the embodiments of the present disclosure can achieve the following technical effects:
[0041] The method for identifying the off-handlebar riding behavior provided by the embodiment of the present disclosure can detect whether there is off-handlebar riding behavior by means of image recognition, without the need to set up a sensor device on each vehicle, which helps to reduce the cost of detecting off-handlebar riding behavior. Moreover, after accurately identifying the handlebars and forearms, the degree of off-handlebar riding behavior is quantified by determining the target distance between the handlebars and the forearms, and the target distance is compared with the distance threshold to finally determine the identification result of the off-handlebar riding behavior, thereby improving the reliability of the detection result.
[0042] The foregoing general description and the following description are exemplary and explanatory only and are not intended to limit the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] One or more embodiments are exemplarily described by corresponding drawings, which do not limit the embodiments. Elements with the same reference numerals in the drawings are shown as similar elements, and the drawings do not constitute a scale limitation, and wherein:
[0044] Figure 1 is a schematic diagram of a method for identifying off-handlebar riding behavior provided by an embodiment of the present disclosure;
[0045] Figure 2 is an image containing only pedestrians provided by an embodiment of the present disclosure;
[0046] Figure 3 is an image containing only a car provided by an embodiment of the present disclosure;
[0047] Figure 4 An image including a person riding a bicycle provided by an embodiment of the present disclosure;
[0048] Figure 5 is an equivalent schematic diagram of the positional relationship between a forearm and a handlebar provided by an embodiment of the present disclosure;
[0049] Figure 6 is a schematic diagram of another method for identifying off-handlebar riding behavior provided by an embodiment of the present disclosure;
[0050] Figure 7 is a schematic diagram of another method for identifying off-handlebar riding behavior provided by an embodiment of the present disclosure;
[0051] Figure 8 is a schematic diagram of a device for identifying off-handlebar riding behavior provided by an embodiment of the present disclosure;
[0052] Fig. 9 It is a schematic diagram of an electronic device provided by an embodiment of the present disclosure. DETAILED DESCRIPTION
[0053] In order to be able to understand the features and technical contents of the embodiments of the present disclosure in more detail, the implementation of the embodiments of the present disclosure is described in detail below in conjunction with the accompanying drawings. The attached drawings are for reference only and are not used to limit the embodiments of the present disclosure. In the following technical description, for the convenience of explanation, a full understanding of the disclosed embodiments is provided through multiple details. However, one or more embodiments can still be implemented without these details. In other cases, to simplify the drawings, well-known structures and devices can be simplified for display.
[0054] The terms "first", "second", etc. in the specification and claims of the embodiments of the present disclosure and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the terms used in this way can be interchanged where appropriate, so that the embodiments of the embodiments of the present disclosure described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions.
[0055] Unless otherwise stated, the term "plurality" means two or more.
[0056] In the embodiment of the present disclosure, the character " / " indicates that the preceding and following objects are in an "or" relationship. For example, A / B indicates: A or B.
[0057] The term "and / or" is a description of the association relationship between objects, indicating that three relationships can exist. For example, A and / or B means: A or B, or, A and B.
[0058] The term "correspondence" may refer to an association relationship or a binding relationship. The correspondence between A and B means that there is an association relationship or a binding relationship between A and B.
[0059] The present disclosure provides an electronic device (hereinafter referred to as the device), and in combination with the electronic device provided by the present disclosure, the present disclosure provides a method for identifying a bicycle riding behavior with handlebars off. Figure 1 As shown, the method for identifying the off-handlebar riding behavior includes the following steps:
[0060] S101, a device receives an image to be identified, and identifies whether the image contains features of a person riding a bicycle.
[0061] In some embodiments, the device is configured with a camera or is connected to a camera. After the camera captures an image, the captured image is sent to the device as an image to be recognized.
[0062] In the disclosed embodiment, an image can be input into a first object detection model, and the first object detection model is used to identify whether the image contains features of a person riding a bicycle. The first object detection model is trained using images containing pedestrians, images containing vehicles, and images containing people riding bicycles. Here, the vehicle can be a vehicle with handlebars, such as a bicycle, an electric bicycle, and a motorcycle.
[0063] Figures 2 to 4 They are images containing only pedestrians, images containing only cars, and images containing people riding bicycles. The images containing only pedestrians, the images containing only cars, and the images containing people riding bicycles can all be calibrated in YOLO format. The first target detection model can be a YOLOV10 target detection network model, Faster RCNN (Faster Region-based Convolutional Neural Network), etc.
[0064] S102: When the device determines that the image contains features of a person riding a bicycle, the device identifies the handlebars and forearms in the image.
[0065] In the disclosed embodiment, the image may be input into a second target detection model, and the handlebars and forearms may be identified in the image using the second target detection model, wherein the second target detection model is trained using images of people riding bicycles with the skeleton structures of the people and the bicycles marked.
[0066] exist Figure 3 In the figure, the lines between points A, B, C and D are the skeleton structure of the car. Line segment AC represents the handlebar, point B represents the center point of the handlebar, and point D represents the center point of the front wheel of the car. Figure 4 In the figure, the lines between points E, F, G, H, M, L and N are the skeleton structure of a person. Point E represents the key point of the head, point F represents the key point of the neck, point G represents the key point of the hip, points H and L represent the key points of the elbow, points M and N represent the two key points of the hand, line segment HM represents the right forearm, and line segment LN represents the left forearm.
[0067] Figure 5 An equivalent schematic diagram of the positional relationship between the forearm and the handlebar is shown. As mentioned above, AC represents the handlebar, points H and L represent elbow key points, points M and N represent two hand key points, line segment HM represents the right forearm, and line segment LN represents the left forearm.
[0068] S103, the device determines a target distance between the handlebar and the forearm.
[0069] S104: The device determines a recognition result of the off-handlebar riding behavior based on a comparison result between the target distance and the distance threshold.
[0070] In the disclosed embodiments, both the one-handed off-handlebar riding behavior and the two-handed off-handlebar riding behavior are off-handlebar riding behaviors. Among them, the one-handed off-handlebar riding behavior means that the rider only has one hand holding the handlebar, and the other hand does not hold the handlebar; the two-handed off-handlebar riding behavior means that the rider does not hold the handlebar with both hands.
[0071] The method for identifying the off-handlebar riding behavior provided by the embodiment of the present disclosure can detect whether there is off-handlebar riding behavior by means of image recognition, without the need to set up a sensor device on each vehicle, which helps to reduce the cost of detecting off-handlebar riding behavior. Moreover, after accurately identifying the handlebars and forearms, the degree of off-handlebar riding behavior is quantified by determining the target distance between the handlebars and the forearms, and the target distance is compared with the distance threshold to finally determine the identification result of the off-handlebar riding behavior, thereby improving the reliability of the detection result.
[0072] In some embodiments, the handlebar includes two half handlebars, the two half handlebars being a right half handlebar and a left half handlebar. Figure 3 and Figure 5 For example, line segment AC represents the handlebar, point B represents the center point of the handlebar, line segment AB represents the right half of the handlebar, and line segment CB represents the left half of the handlebar.
[0073] In some embodiments, determining the target distance between the handlebar and the forearm includes: determining a reference distance between the half handlebar and the forearm for each half handlebar; and determining the target distance between the handlebar and the forearm based on the reference distances corresponding to the two half handlebars respectively.
[0074] Combination Figure 6 As shown, the embodiment of the present disclosure provides another method for identifying the behavior of riding a bicycle with handlebars off, and the method for identifying the behavior of riding a bicycle with handlebars off includes the following steps:
[0075] S601, a device receives an image to be identified, and identifies whether the image contains features of a person riding a bicycle.
[0076] S602: When the device determines that the image contains features of a person riding a bicycle, the device identifies a handlebar and a forearm in the image.
[0077] S603: The device determines a reference distance between each half handlebar and the forearm.
[0078] The handlebar includes two half handlebars, which are respectively a right half handlebar and a left half handlebar. Here, a reference distance between the right half handlebar and the forearm and a reference distance between the left half handlebar and the forearm are determined respectively.
[0079] S604: The device determines a target distance between the handlebar and the forearm based on the reference distances corresponding to the two half-handlebars.
[0080] Here, the target distance between the handlebar and the forearm may be determined based on a reference distance between the right half of the handlebar and the forearm and a reference distance between the left half of the handlebar and the forearm.
[0081] Optionally, the sum of the reference distances corresponding to the two half-handlebars may be used as the target distance between the handlebar and the forearm.
[0082] In the embodiment of the present disclosure, the forearm includes a left forearm and a right forearm. Figure 4 and Figure 5 For example, line segment HM represents the right forearm, and line segment LN represents the left forearm.
[0083] Here, the target distance between the handlebar and the forearm can be expressed as d((AB, CB), (HM, LN)), the reference distance between the right half of the handlebar and the forearm can be expressed as f(AB, (HM, LN)), and the reference distance between the left half of the handlebar and the forearm can be expressed as f(CB, (HM, LN)). The target distance can be calculated by the following formula: d((AB, CB), (HM, LN)) = f(AB, (HM, LN)) + f(CB, (HM, LN)).
[0084] Optionally, the average value of the reference distances corresponding to the two half-handlebars may be used as the target distance between the handlebar and the forearm.
[0085] Optionally, a maximum reference distance is determined among the reference distances corresponding to the two half-handlebars, and the maximum reference distance is used as the target distance between the handlebar and the forearm.
[0086] S605: The device determines a recognition result of the off-handlebar riding behavior based on a comparison result of the target distance and the distance threshold.
[0087] In some embodiments, for each half handlebar, a reference distance between the half handlebar and the forearm is determined, including: for each half handlebar, determining whether the half handlebar intersects with each forearm; when the half handlebar intersects with the left forearm or the right forearm, determining the reference distance between the half handlebar and the forearm to be zero; when the half handlebar does not intersect with both the left forearm and the right forearm, determining a characteristic distance between the half handlebar and each forearm, and determining a reference distance between the half handlebar and the forearm based on the characteristic distance between the half handlebar and each forearm.
[0088] by Figure 5 For example, if the right half handlebar AB intersects with the right forearm HM or the right half handlebar AB intersects with the left forearm LN, the reference distance between the right half handlebar and the forearm is determined to be zero, that is, f(AB,(HM,LN)) = 0. Similarly, if the left half handlebar CB intersects with the right forearm HM or the left half handlebar CB intersects with the left forearm LN, the reference distance between the left half handlebar and the forearm is determined to be zero, that is, f(CB,(HM,LN) = 0.
[0089] If the right half handlebar AB does not intersect with the right forearm HM and the left forearm LN, determine the characteristic distance between the right half handlebar AB and the right forearm HM, and determine the characteristic distance between the right half handlebar AB and the left forearm LN. Based on the characteristic distance between the right half handlebar AB and the right forearm HM and the characteristic distance between the right half handlebar AB and the left forearm LN, determine the reference distance between the right half handlebar and the forearm. If the left half handlebar CB does not intersect with the right forearm HM and the left forearm LN, determine the characteristic distance between the left half handlebar CB and the right forearm HM, and determine the characteristic distance between the left half handlebar CB and the left forearm LN. Based on the characteristic distance between the left half handlebar CB and the right forearm HM and the characteristic distance between the left half handlebar CB and the left forearm LN, determine the reference distance between the left half handlebar and the forearm.
[0090] In some embodiments, based on the characteristic distance between the half handlebar and each forearm, a reference distance between the half handlebar and the forearm is determined, including: determining the minimum characteristic distance among the characteristic distances between the half handlebar and each forearm; and using the minimum characteristic distance as the reference distance between the half handlebar and the forearm.
[0091] by Figure 5 For example, for the right handlebar AB, the characteristic distance between the right handlebar AB and the right forearm HM is expressed as g(AB,HM), and the characteristic distance between the right handlebar AB and the left forearm LN is expressed as g(AB,LN). The reference distance between the right handlebar and the forearm can be calculated by the following formula: f(AB,(HM,LN))=min{g(AB,HM),g(AB,LN)}, where min{g(AB,HM),g(AB,LN)} means taking the minimum value between g(AB,HM) and g(AB,LN).
[0092] by Figure 5 For example, for the left handlebar CB, the characteristic distance between the left handlebar CB and the right forearm HM is expressed as g(CB,HM), and the characteristic distance between the left handlebar CB and the left forearm LN is expressed as g(CB,LN). The reference distance between the left handlebar and the forearm can be calculated by the following formula: f(CB,(HM,LN))=min{g(CB,HM),g(CB,LN)}, where min{g(CB,HM),g(CB,LN)} means taking the minimum value between g(CB,HM) and g(CB,LN).
[0093] In some embodiments, based on the characteristic distance between the half handlebar and each forearm, a reference distance between the half handlebar and the forearm is determined, including: calculating an average value of the characteristic distances between the half handlebar and each forearm, and using the average value as the reference distance between the half handlebar and the forearm.
[0094] In some embodiments, based on the characteristic distance between the half handlebar and each forearm, a reference distance between the half handlebar and the forearm is determined, including: calculating the sum of the characteristic distances between the half handlebar and each forearm, and using the sum as the reference distance between the half handlebar and the forearm.
[0095] In some embodiments, the half handlebar includes two end points. Figure 5 For example, the two endpoints of the right handlebar AB are point A and point B, and the two endpoints of the left handlebar CB are point C and point B.
[0096] In some embodiments, determining a characteristic distance between the half handlebar and each forearm includes: for each forearm, determining an effective distance between each endpoint of the half handlebar and the forearm; and determining a characteristic distance between the half handlebar and the forearm based on the effective distance between each endpoint of the half handlebar and the forearm.
[0097] by Figure 5 For example, for the right half handlebar AB and the right forearm HM, the effective distance between the endpoint A of the right half handlebar AB and the right forearm HM is determined, and the effective distance between the endpoint B of the right half handlebar AB and the right forearm HM is determined; based on the effective distance between the endpoint A of the right half handlebar AB and the right forearm HM, and the effective distance between the endpoint B of the right half handlebar AB and the right forearm HM, the characteristic distance between the right half handlebar AB and the right forearm HM is determined. For the right half handlebar AB and the left forearm LN, the effective distance between the endpoint A of the right half handlebar AB and the left forearm LN is determined, and the effective distance between the endpoint B of the right half handlebar AB and the left forearm LN is determined; based on the effective distance between the endpoint A of the right half handlebar AB and the left forearm LN, and the effective distance between the endpoint B of the right half handlebar AB and the left forearm LN, the characteristic distance between the right half handlebar AB and the left forearm LN is determined.
[0098] by Figure 5 For example, for the left half of the bike CB handlebar and the right forearm HM, determine the effective distance between the endpoint C of the left half of the bike CB and the right forearm HM, and determine the effective distance between the endpoint B of the left half of the bike CB and the right forearm HM; based on the effective distance between the endpoint C of the left half of the bike CB and the right forearm HM, and the effective distance between the endpoint B of the left half of the bike CB and the right forearm HM, determine the characteristic distance between the left half of the bike CB and the right forearm HM. For the left half of the bike CB handlebar and the left forearm LN, determine the effective distance between the endpoint C of the left half of the bike CB and the left forearm LN, and determine the effective distance between the endpoint B of the right half of the bike AB and the left forearm LN; based on the effective distance between the endpoint C of the left half of the bike CB and the left forearm LN, and the effective distance between the endpoint B of the left half of the bike CB and the left forearm LN, determine the characteristic distance between the left half of the bike CB and the left forearm LN.
[0099] In some embodiments, based on the effective distance between each endpoint of the half handlebar and the forearm, a characteristic distance between the half handlebar and the forearm is determined, including: determining the minimum effective distance among the effective distances between each endpoint of the half handlebar and the forearm; and using the minimum effective distance as the characteristic distance between the half handlebar and the forearm.
[0100] For the right half handlebar AB and the right forearm HM, the effective distance between the endpoint A of the right half handlebar AB and the right forearm HM is expressed as h(A, HM), and the effective distance between the endpoint B of the right half handlebar AB and the right forearm HM is expressed as h(B, HM). The characteristic distance between the right half handlebar AB and the right forearm HM can be calculated by the following formula: g(AB, HM) = min{h(A, HM), h(B, HM)}. It can be understood that min{h(A, HM), h(B, HM)} represents the minimum value between h(A, HM) and h(B, HM).
[0101] For the right handlebar AB and the left forearm LN, the effective distance between the endpoint A of the right handlebar AB and the left forearm LN is expressed as h(A, LN), and the effective distance between the endpoint B of the right handlebar AB and the left forearm LN is expressed as h(B, LN). The characteristic distance between the right handlebar AB and the left forearm LN can be calculated by the following formula: g(AB, LN) = min{h(A, LN), h(B, LN)}. It can be understood that min{h(A, LN), h(B, LN)} represents the minimum value between h(A, LN) and h(B, LN).
[0102] For the left half of the bike CB handlebar and the right forearm HM, the effective distance between the endpoint C of the left half of the bike CB and the right forearm HM is expressed as h(C, HM), and the effective distance between the endpoint B of the left half of the bike CB and the right forearm HM is expressed as h(B, HM). The characteristic distance between the left half of the bike CB and the right forearm HM can be calculated by the following formula: g(CB, HM) = min{h(C, HM), h(B, HM)}. It can be understood that min{h(C, HM), h(B, HM)} means taking the minimum value between h(C, HM) and h(B, HM).
[0103] For the left half-bike CB handlebar and the left forearm LN, the effective distance between the endpoint C of the left half-bike CB and the left forearm LN is expressed as h(C, LN), and the effective distance between the endpoint B of the left half-bike CB and the left forearm LN is expressed as h(B, LN). The characteristic distance between the left half-bike CB and the left forearm LN can be calculated by the following formula: g(CB, LN) = min{h(C, LN), h(B, LN)}. It can be understood that min{h(C, LN), h(B, LN)} means taking the minimum value between h(C, LN) and h(B, LN).
[0104] In some embodiments, each forearm includes an elbow key point and a hand key point, and the effective distance between an endpoint of the half-handlebar and a forearm is the minimum value of the first distance, the second distance, and the third distance. The first distance is the distance between the endpoint of the half-handlebar and the elbow key point of the forearm, the second distance is the distance between the endpoint of the half-handlebar and the hand key point of the forearm, and the third distance is the vertical distance between the endpoint of the half-handlebar and the forearm.
[0105] Take the effective distance h(A, HM) between the endpoint A of the right half handlebar AB and the right forearm HM as an example, where H is the elbow key point of the right forearm HM, M is the hand key point of the right forearm HM, the distance between the endpoint A of the right half handlebar AB and the elbow key point H of the right forearm HM is expressed as k(A, H) (i.e., the first distance), the distance between the endpoint A of the right half handlebar AB and the hand key point M of the right forearm HM is expressed as k(A, M) (i.e., the second distance), and the vertical distance between the endpoint A of the right half handlebar AB and the right forearm HM is expressed as j(A, HM) (i.e., the third distance).
[0106] In this case, the effective distance h(A, HM) can be calculated by the following formula: h(A, HM) = min{k(A, H), k(A, M), j(A, HM)}, where min{k(A, H), k(A, M), j(A, HM)} represents the minimum value among k(A, H), k(A, M) and j(A, HM).
[0107] In some embodiments, a distance threshold may be preset, and the specific value of the distance threshold may be determined according to actual design requirements. When the target distance is greater than the distance threshold, it is determined that there is a handlebar-off riding behavior; when the target distance is not greater than the distance threshold, it is determined that there is no handlebar-off riding behavior.
[0108] In some embodiments, an effective distance between an end point of the half-handlebar and a forearm is an average of the first distance, the second distance, and the third distance.
[0109] Combination Figure 7 As shown, the embodiment of the present disclosure provides another method for identifying the behavior of riding a bicycle with handlebars off, and the method for identifying the behavior of riding a bicycle with handlebars off includes the following steps:
[0110] S701, a device receives an image to be identified, and identifies whether the image contains features of a person riding a bicycle.
[0111] S702: When the device determines that the image contains features of a person riding a bicycle, the device identifies the handlebars and forearms in the image.
[0112] S703, the device determines a target distance between the handlebar and the forearm.
[0113] S704: When the target distance is greater than the distance threshold, the device determines that there is an off-handlebar riding behavior.
[0114] S705: When the target distance is not greater than the distance threshold, the device determines that there is no off-handlebar riding behavior.
[0115] In some embodiments, the device is configured with a human body detection sensor or with a human body detection sensor, and the human body detection sensor can detect the distance between the cyclist and the camera. When the device determines that the image contains features of a person riding a bicycle, the device obtains the distance between the cyclist and the camera through the human body detection sensor. The device can determine a distance threshold based on the distance between the cyclist and the camera, wherein the distance threshold is negatively correlated with the distance, that is, the greater the distance between the cyclist and the camera, the smaller the distance threshold.
[0116] In the disclosed embodiment, the distance threshold can be determined according to actual design needs. Specifically, the distance threshold is not less than 1. Optionally, the lower limit of the value range of the distance threshold is 1, and the upper limit of the value range of the distance threshold is determined according to the forearm length. A specific value can be determined in the value range as the distance threshold. For example, the average length of the two forearms can be calculated, and the average length can be used as the upper limit of the distance threshold. Alternatively, the smaller forearm length can be determined from the two forearm lengths, and the smaller forearm length can be used as the upper limit of the distance threshold. Taking the distance threshold of 1 as an example, when the target distance is greater than 1, it is determined that there is a behavior of riding with the handlebars off; when the target distance is not greater than 1, it is determined that there is no behavior of riding with the handlebars off.
[0117] The following takes the distance threshold of 1 as an example and introduces the method for identifying off-handlebar riding behavior provided by the embodiment of the present disclosure in combination with a specific scenario when a person rides a bicycle.
[0118] Scenario 1: The cyclist rides with one hand holding the handlebar and the other hand not holding the handlebar.
[0119] In scenario 1, for example, the rider holds the left handlebar with his left hand and does not hold the handlebar with his right hand. The device recognizes that the left half handlebar CB intersects with the left forearm LN, and the right half handlebar AB does not intersect with the left forearm LN and the right forearm HM. At this time, the reference distance f(CB,(HM,LN)) corresponding to the left half handlebar LN is determined to be zero.
[0120] For the right handlebar AB and the right forearm HM, calculate the effective distance h(A, HM) between the endpoint A of the right handlebar AB and the right forearm HM. Specifically, calculate the distance k(A, H) between the endpoint A of the right handlebar AB and the elbow key point H of the right forearm HM, the distance k(A, M) between the endpoint A of the right handlebar AB and the hand key point M of the right forearm HM, and the vertical distance j(A, HM) between the endpoint A of the right handlebar AB and the right forearm HM, and take the minimum value among k(A, H), k(A, M) and j(A, HM) as the effective distance h(A, HM) between the endpoint A of the right handlebar AB and the right forearm HM. Similarly, calculate the effective distance h(B, HM) between the endpoint B of the right handlebar AB and the right forearm HM. Specifically, calculate the distance k(B,H) between the endpoint B of the right half handlebar AB and the elbow key point H of the right forearm HM, the distance k(B,M) between the endpoint B of the right half handlebar AB and the hand key point M of the right forearm HM, and the vertical distance j(B,HM) between the endpoint B of the right half handlebar AB and the right forearm HM, and take the minimum value among k(B,H), k(B,M) and j(B,HM) as the effective distance h(B,HM) between the endpoint B of the right half handlebar AB and the right forearm HM. Take the minimum value among h(B,HM) and h(B,HM) as the characteristic distance g(AB,HM) between the right half handlebar AB and the right forearm HM.
[0121] For the right handlebar AB and the left forearm LN, calculate the effective distance L(A, LN) between the endpoint A of the right handlebar AB and the left forearm LN. Specifically, calculate the distance k(A, L) between the endpoint A of the right handlebar AB and the elbow key point L of the left forearm LN, the distance k(A, N) between the endpoint A of the right handlebar AB and the hand key point N of the left forearm LN, and the vertical distance j(A, LN) between the endpoint A of the right handlebar AB and the left forearm LN, and take the minimum value among k(A, L), k(A, N) and j(A, LN) as the effective distance L(A, LN) between the endpoint A of the right handlebar AB and the left forearm LN. Similarly, calculate the effective distance L(B, LN) between the endpoint B of the right handlebar AB and the left forearm LN. Specifically, calculate the distance k(B, L) between the endpoint B of the right half handlebar AB and the elbow key point L of the left forearm LN, the distance k(B, N) between the endpoint B of the right half handlebar AB and the hand key point N of the left forearm LN, and the vertical distance j(B, LN) between the endpoint B of the right half handlebar AB and the left forearm LN, and take the minimum value among k(B, L), k(B, N) and j(B, LN) as the effective distance L(B, LN) between the endpoint B of the right half handlebar AB and the left forearm LN. Take the minimum value among L(B, LN) and L(B, LN) as the characteristic distance g(AB, LN) between the right half handlebar AB and the left forearm LN.
[0122] After obtaining the characteristic distance g(AB, HM) between the right half handlebar AB and the right forearm HM, and the characteristic distance g(AB, LN) between the right half handlebar AB and the left forearm LN, the minimum value of g(AB, HM) and g(AB, LN) is used as the reference distance f(AB, (HM, LN)) corresponding to the right half handlebar AB.
[0123] After obtaining the reference distance f(CB,(HM,LN)) corresponding to the left half of the handlebar LN and the reference distance f(AB,(HM,LN)) corresponding to the right half of the handlebar AB, the sum of f(CB,(HM,LN)) and f(AB,(HM,LN)) is calculated as the target distance d((AB,CB),(HM,LN)) corresponding to the handlebar AB. It can be understood that f(CB,(HM,LN)) is zero. Since the right half of the handlebar AB does not intersect with the left forearm LN and the right forearm HM, the value of f(AB,(HM,LN)) will be relatively large, and then with a high probability, d((AB,CB),(HM,LN)) is not less than 1, thereby determining that there is an off-handlebar riding behavior.
[0124] Scenario 2: The rider does not have both hands on the handlebars.
[0125] In scenario 2, the device recognizes that the left half of the handlebar CB does not intersect with the left forearm LN and the right forearm HM, and the right half of the handlebar AB does not intersect with the left forearm LN and the right forearm HM.
[0126] For the left handlebar CB and the right forearm HM, calculate the effective distance h(C, HM) between the endpoint C of the left handlebar CB and the right forearm HM. Specifically, calculate the distance k(C, H) between the endpoint C of the left handlebar CB and the elbow key point H of the right forearm HM, the distance k(C, M) between the endpoint C of the left handlebar CB and the hand key point M of the right forearm HM, and the vertical distance j(C, HM) between the endpoint C of the left handlebar CB and the right forearm HM, and take the minimum value among k(C, H), k(C, M) and j(C, HM) as the effective distance h(C, HM) between the endpoint C of the left handlebar CB and the right forearm HM. Similarly, calculate the effective distance h(B, HM) between the endpoint B of the left handlebar CB and the right forearm HM. Specifically, calculate the distance k(B,H) between the endpoint B of the left half handlebar CB and the elbow key point H of the right forearm HM, the distance k(B,M) between the endpoint B of the left half handlebar CB and the hand key point M of the right forearm HM, and the vertical distance j(B,HM) between the endpoint B of the left half handlebar CB and the right forearm HM, and take the minimum value among k(B,H), k(B,M) and j(B,HM) as the effective distance h(B,HM) between the endpoint B of the left half handlebar CB and the right forearm HM. Take the minimum value among h(B,HM) and h(B,HM) as the characteristic distance g(CB,HM) between the left half handlebar CB and the right forearm HM.
[0127] For the left handlebar CB and the left forearm LN, the effective distance L(C, LN) between the endpoint C of the left handlebar CB and the left forearm LN is calculated. Specifically, the distance k(C, L) between the endpoint C of the left handlebar CB and the elbow key point L of the left forearm LN, the distance k(C, N) between the endpoint C of the left handlebar CB and the hand key point N of the left forearm LN, and the vertical distance j(C, LN) between the endpoint C of the left handlebar CB and the left forearm LN are calculated, and the minimum value among k(C, L), k(C, N) and j(C, LN) is taken as the effective distance L(C, LN) between the endpoint C of the left handlebar CB and the left forearm LN. Similarly, the effective distance L(B, LN) between the endpoint B of the left handlebar CB and the left forearm LN is calculated. Specifically, the distance k(B, L) between the endpoint B of the left half handlebar CB and the elbow key point L of the left forearm LN, the distance k(B, N) between the endpoint B of the left half handlebar CB and the hand key point N of the left forearm LN, and the vertical distance j(B, LN) between the endpoint B of the left half handlebar CB and the left forearm LN are calculated, and the minimum value among k(B, L), k(B, N) and j(B, LN) is taken as the effective distance L(B, LN) between the endpoint B of the left half handlebar CB and the left forearm LN. The minimum value among L(B, LN) and L(B, LN) is taken as the characteristic distance g(CB, LN) between the left half handlebar CB and the left forearm LN.
[0128] After obtaining the characteristic distance g(CB,HM) between the left half handlebar CB and the right forearm HM, and the characteristic distance g(CB,LN) between the left half handlebar CB and the left forearm LN, the minimum value of g(CB,HM) and g(CB,LN) is used as the reference distance f(CB,(HM,LN)) corresponding to the left half handlebar CB.
[0129] For the right handlebar AB and the right forearm HM, calculate the effective distance h(A, HM) between the endpoint A of the right handlebar AB and the right forearm HM. Specifically, calculate the distance k(A, H) between the endpoint A of the right handlebar AB and the elbow key point H of the right forearm HM, the distance k(A, M) between the endpoint A of the right handlebar AB and the hand key point M of the right forearm HM, and the vertical distance j(A, HM) between the endpoint A of the right handlebar AB and the right forearm HM, and take the minimum value among k(A, H), k(A, M) and j(A, HM) as the effective distance h(A, HM) between the endpoint A of the right handlebar AB and the right forearm HM. Similarly, calculate the effective distance h(B, HM) between the endpoint B of the right handlebar AB and the right forearm HM. Specifically, calculate the distance k(B,H) between the endpoint B of the right half handlebar AB and the elbow key point H of the right forearm HM, the distance k(B,M) between the endpoint B of the right half handlebar AB and the hand key point M of the right forearm HM, and the vertical distance j(B,HM) between the endpoint B of the right half handlebar AB and the right forearm HM, and take the minimum value among k(B,H), k(B,M) and j(B,HM) as the effective distance h(B,HM) between the endpoint B of the right half handlebar AB and the right forearm HM. Take the minimum value among h(B,HM) and h(B,HM) as the characteristic distance g(AB,HM) between the right half handlebar AB and the right forearm HM.
[0130] For the right handlebar AB and the left forearm LN, calculate the effective distance L(A, LN) between the endpoint A of the right handlebar AB and the left forearm LN. Specifically, calculate the distance k(A, L) between the endpoint A of the right handlebar AB and the elbow key point L of the left forearm LN, the distance k(A, N) between the endpoint A of the right handlebar AB and the hand key point N of the left forearm LN, and the vertical distance j(A, LN) between the endpoint A of the right handlebar AB and the left forearm LN, and take the minimum value among k(A, L), k(A, N) and j(A, LN) as the effective distance L(A, LN) between the endpoint A of the right handlebar AB and the left forearm LN. Similarly, calculate the effective distance L(B, LN) between the endpoint B of the right handlebar AB and the left forearm LN. Specifically, calculate the distance k(B, L) between the endpoint B of the right half handlebar AB and the elbow key point L of the left forearm LN, the distance k(B, N) between the endpoint B of the right half handlebar AB and the hand key point N of the left forearm LN, and the vertical distance j(B, LN) between the endpoint B of the right half handlebar AB and the left forearm LN, and take the minimum value among k(B, L), k(B, N) and j(B, LN) as the effective distance L(B, LN) between the endpoint B of the right half handlebar AB and the left forearm LN. Take the minimum value among L(B, LN) and L(B, LN) as the characteristic distance g(AB, LN) between the right half handlebar AB and the left forearm LN.
[0131] After obtaining the characteristic distance g(AB, HM) between the right half handlebar AB and the right forearm HM, and the characteristic distance g(AB, LN) between the right half handlebar AB and the left forearm LN, the minimum value of g(AB, HM) and g(AB, LN) is used as the reference distance f(AB, (HM, LN)) corresponding to the right half handlebar AB.
[0132] After obtaining the reference distance f(CB,(HM,LN)) corresponding to the left half of the handlebar LN and the reference distance f(AB,(HM,LN)) corresponding to the right half of the handlebar AB, the sum of f(CB,(HM,LN)) and f(AB,(HM,LN)) is calculated as the target distance d((AB,CB),(HM,LN)) corresponding to the handlebar AB. It can be understood that since the left half of the handlebar CB does not intersect with the left forearm LN and the right forearm HM, and the right half of the handlebar AB does not intersect with the left forearm LN and the right forearm HM, the values of f(CB,(HM,LN)) and f(AB,(HM,LN)) will be relatively large, and thus d((AB,CB),(HM,LN)) is not less than 1 with a high probability, thereby determining that there is an off-handlebar riding behavior.
[0133] Scene 3: The cyclist rides the bicycle holding the handlebars with both hands.
[0134] In scenario 3, under normal circumstances, the device recognizes that the left half of the handlebar CB intersects with at least one of the left forearm LN and the right forearm HM, and the right half of the handlebar AB intersects with at least one of the left forearm LN and the right forearm HM. At this time, it can be determined that the reference distance f(CB,(HM,LN)) corresponding to the left half of the handlebar CB is zero, and the reference distance f(AB,(HM,LN)) corresponding to the right half of the handlebar HM is zero, and then the target distance d((AB,CB),(HM,LN)) corresponding to the handlebar AC is zero. Since d((AB,CB),(HM,LN)) is less than 1, it can be determined that there is no off-handlebar riding behavior.
[0135] In scenario 3, under abnormal circumstances, although the rider actually holds the handlebars with both hands, the device may recognize that a certain half handlebar (such as the left half handlebar CB) does not intersect with the left forearm LN and the right forearm HM, and may even recognize that the left half handlebar CB does not intersect with the left forearm LN and the right forearm HM, and the right half handlebar AB does not intersect with the left forearm LN and the right forearm HM. In this case, for the half handlebar that does not intersect with the left forearm LN and the right forearm HM, the calculation process of the effective distance, the characteristic distance and the reference distance needs to be performed in sequence. Since the rider actually holds the handlebars with both hands, even if the half handlebar is recognized as not intersecting with the left forearm LN and the right forearm HM, the reference distance corresponding to the half handlebar will be relatively small, and then the target distance d((AB, CB), (HM, LN)) corresponding to the handlebar AB is less than 1 with a high probability, so it can be determined that there is no off-handlebar riding behavior.
[0136] Combination Figure 8 As shown, an embodiment of the present disclosure provides a handlebar-off riding behavior recognition device 800 , which includes a first image recognition module 801 , a second image recognition module 802 , a target distance determination module 803 and a behavior result determination module 804 .
[0137] The first image recognition module 801 is configured to receive an image to be recognized and recognize whether the image contains features of a person riding a bicycle.
[0138] The second image recognition module 802 is configured to recognize the handlebars and forearms in the image when determining that the image contains features of a person riding a bicycle.
[0139] The target distance determination module 803 is configured to determine a target distance between the handlebar and the forearm.
[0140] The behavior result determination module 804 is configured to determine the recognition result of the off-handlebar riding behavior according to the comparison result between the target distance and the distance threshold.
[0141] The handlebar-off riding behavior recognition device provided by the embodiment of the present disclosure can detect whether there is handlebar-off riding behavior by means of image recognition, without setting up sensing equipment on each vehicle, which helps to reduce the cost of detecting handlebar-off riding behavior. Moreover, after accurately identifying the handlebars and forearms, the degree of handlebar-off riding behavior is quantified by determining the target distance between the handlebars and the forearms, and the target distance is compared with the distance threshold to finally determine the recognition result of the handlebar-off riding behavior, thereby improving the reliability of the detection result.
[0142] In some embodiments, the handlebar includes two half-handlebars; the target distance determination module 803 is configured to: determine a reference distance between the half-handlebar and the forearm for each half-handlebar; and determine a target distance between the handlebar and the forearm based on the reference distances corresponding to the two half-handlebars respectively.
[0143] In some embodiments, the forearm includes a left forearm and a right forearm; the target distance determination module 803 is configured to: for each half-handlebar, determine whether the half-handlebar intersects with each forearm; when the half-handlebar intersects with the left forearm or the right forearm, determine the reference distance between the half-handlebar and the forearm to be zero; when the half-handlebar does not intersect with both the left forearm and the right forearm, determine the characteristic distance between the half-handlebar and each forearm, and based on the characteristic distance between the half-handlebar and each forearm, determine the reference distance between the half-handlebar and the forearm.
[0144] In some embodiments, the target distance determination module 803 is configured to:
[0145] Among the characteristic distances between the half handlebar and each forearm, determine the minimum characteristic distance;
[0146] The minimum characteristic distance is taken as the reference distance between the half handlebar and the forearm.
[0147] In some embodiments, the target distance determination module 803 is configured to:
[0148] For each forearm, determine the effective distance between each end point of the half handlebar and the forearm;
[0149] Based on the effective distance between each end point of the half handlebar and the forearm, a characteristic distance between the half handlebar and the forearm is determined.
[0150] In some embodiments, the target distance determination module 803 is configured to:
[0151] Among the effective distances between each end point of the half handlebar and the forearm, determine the minimum effective distance;
[0152] The minimum effective distance is taken as the characteristic distance between the half handlebar and the forearm.
[0153] In some embodiments, each forearm includes an elbow key point and a hand key point, and the effective distance between an end point of the half-handlebar and a forearm is the minimum value among the first distance, the second distance and the third distance;
[0154] The first distance is the distance between the endpoint of the half handlebar and the elbow key point of the forearm, the second distance is the distance between the endpoint of the half handlebar and the hand key point of the forearm, and the third distance is the vertical distance between the endpoint of the half handlebar and the forearm.
[0155] In some embodiments, the behavior outcome determination module 804 is configured to:
[0156] When the target distance is greater than the distance threshold, it is determined that there is a riding behavior of taking the handlebars off;
[0157] When the target distance is not greater than the distance threshold, it is determined that there is no off-handlebar riding behavior.
[0158] In some embodiments, the first image recognition module 801 is configured to: input the image into a first target detection model, and use the first target detection model to identify whether the image contains features of a person riding a bicycle, wherein the first target detection model is trained using images containing pedestrians, images containing vehicles, and images containing people riding bicycles.
[0159] In some embodiments, the second image recognition module 802 is configured to: input the image into a second target detection model, and use the second target detection model to identify the handlebars and forearms in the image, wherein the second target detection model is trained using images of people riding bicycles with the skeletal structures of the people and the bicycles marked.
[0160] Combination Fig. 9 As shown, an embodiment of the present disclosure provides an electronic device 900, and the electronic device 900 includes a processor (processor) 901 and a memory (memory) 902. Optionally, the device 900 may also include a communication interface (Communication Interface) 903 and a bus 904. Among them, the processor 901, the communication interface 903, and the memory 902 can communicate with each other through the bus 904. The communication interface 903 can be used for information transmission. The processor 901 can call the logic instructions in the memory 902 to execute the off-handlebar riding behavior recognition method of the above embodiment.
[0161] In addition, the logic instructions in the memory 902 described above may be implemented in the form of software functional units and when sold or used as independent products, may be stored in a computer-readable storage medium.
[0162] The memory 902 is a computer-readable storage medium that can be used to store software programs and computer executable programs, such as program instructions / modules corresponding to the method in the embodiment of the present disclosure. The processor 901 executes the function application and data processing by running the program instructions / modules stored in the memory 902, that is, the method for identifying the off-handlebar riding behavior in the above embodiment is implemented.
[0163] The memory 902 may include a program storage area and a data storage area, wherein the program storage area may store an operating system and an application required for at least one function; the data storage area may store data created according to the use of the terminal device, etc. In addition, the memory 902 may include a high-speed random access memory and may also include a non-volatile memory.
[0164] An embodiment of the present disclosure provides a computer-readable storage medium storing computer-executable instructions, wherein the computer-executable instructions are configured to execute the above-mentioned method for identifying the off-handlebar riding behavior.
[0165] The technical solution of the embodiment of the present disclosure can be embodied in the form of a software product, which is stored in a storage medium and includes one or more instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method described in the embodiment of the present disclosure. The aforementioned storage medium may be a non-transient storage medium, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk, and other media that can store program codes.
[0166] The above description and the accompanying drawings fully illustrate the embodiments of the present disclosure so that those skilled in the art can practice them. Other embodiments may include structural, logical, electrical, process and other changes. The embodiments represent only possible changes. Unless explicitly required, separate components and functions are optional, and the order of operation may vary. The parts and features of some embodiments may be included in or replace the parts and features of other embodiments. Moreover, the words used in this application are only used to describe the embodiments and are not used to limit the claims. As used in the description of the embodiments and the claims, unless the context clearly indicates, the singular forms of "a", "an" and "the" are intended to include plural forms as well. Similarly, the term "and / or" as used in this application refers to any and all possible combinations of listings containing one or more associated ones. In addition, when used in the present application, the term "comprise" and its variants "comprises" and / or comprising refer to the presence of stated features, wholes, steps, operations, elements, and / or components, but do not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or groups thereof. In the absence of further restrictions, the elements defined by the sentence "comprising a ..." do not exclude the presence of other identical elements in the process, method or device comprising the elements. In this article, each embodiment may focus on the differences from other embodiments, and the same and similar parts between the various embodiments may refer to each other. For the methods, products, etc. disclosed in the embodiments, if they correspond to the method part disclosed in the embodiments, then the relevant parts can refer to the description of the method part.
[0167] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software may depend on the specific application and design constraints of the technical solution. The technicians may use different methods for each specific application to implement the described functions, but such implementations should not be considered to exceed the scope of the embodiments of the present disclosure. The technicians may clearly understand that, for the convenience and simplicity of description, the specific working processes of the systems, devices and units described above may refer to the corresponding processes in the aforementioned method embodiments, and will not be repeated here.
[0168] In the embodiments disclosed herein, the disclosed methods and products (including but not limited to devices, equipment, etc.) can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units can be only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between each other shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms. The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to implement this embodiment. In addition, each functional unit in the embodiment of the present disclosure may be integrated in a processing unit, or each unit may exist physically alone, or two or more units may be integrated in one unit.
[0169] The flowchart and block diagram in the accompanying drawings show the possible architecture, function and operation of the system, method and computer program product according to the embodiment of the present disclosure. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of the code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. In some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, which can depend on the functions involved. In the description corresponding to the flowchart and the block diagram in the accompanying drawings, the operations or steps corresponding to different boxes can also occur in a different order from the order disclosed in the description, and sometimes there is no specific order between different operations or steps. For example, two consecutive operations or steps can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, which can depend on the functions involved. Each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented by a dedicated hardware-based system that performs the specified functions or actions, or may be implemented by a combination of dedicated hardware and computer instructions.
Claims
1. A method for identifying off-handlebar riding behavior, characterized in that: include: receiving an image to be identified, and identifying whether the image contains features of a person riding a bicycle; When determining that the image contains features of a person riding a bicycle, identifying a handlebar and a forearm in the image; Determine the target distance between the handlebar and forearm; The recognition result of the off-handlebar riding behavior is determined based on the comparison result of the target distance and the distance threshold.
2. The method according to claim 1, characterized in that The handlebars include two half-width handlebars; Determine your target handlebar-to-forearm distance, including: For each half handlebar, determine a reference distance between the half handlebar and the forearm; Based on the reference distances corresponding to the two half-handlebars, the target distance between the handlebar and the forearm is determined.
3. The method according to claim 2, characterized in that The forearm includes a left forearm and a right forearm; for each half handlebar, a reference distance between the half handlebar and the forearm is determined, including: For each handlebar half, determining whether the handlebar half intersects each forearm; When the half handlebar intersects the left forearm or the right forearm, the reference distance between the half handlebar and the forearm is determined to be zero; When the half handlebar does not intersect with the left forearm and the right forearm, a characteristic distance between the half handlebar and each forearm is determined, and based on the characteristic distance between the half handlebar and each forearm, a reference distance between the half handlebar and the forearm is determined.
4. The method according to claim 3, characterized in that: Based on the characteristic distance between the half handlebar and each forearm, a reference distance between the half handlebar and the forearm is determined, including: Among the characteristic distances between the half handlebar and each forearm, determine the minimum characteristic distance; The minimum characteristic distance is taken as the reference distance between the half handlebar and the forearm.
5. The method according to claim 3, characterized in that: The half handlebar includes two end points; determining the characteristic distance between the half handlebar and each forearm includes: For each forearm, determine the effective distance between each end point of the half handlebar and the forearm; Based on the effective distance between each end point of the half handlebar and the forearm, a characteristic distance between the half handlebar and the forearm is determined.
6. The method according to claim 5, characterized in that Based on the effective distance between each end point of the half handlebar and the forearm, the characteristic distance between the half handlebar and the forearm is determined, including: Among the effective distances between each end point of the half handlebar and the forearm, determine the minimum effective distance; The minimum effective distance is taken as the characteristic distance between the half handlebar and the forearm.
7. The method according to claim 5, characterized in that Each forearm includes an elbow key point and a hand key point, and the effective distance between an end point of the half handlebar and a forearm is the minimum value among the first distance, the second distance and the third distance; The first distance is the distance between the endpoint of the half handlebar and the elbow key point of the forearm, the second distance is the distance between the endpoint of the half handlebar and the hand key point of the forearm, and the third distance is the vertical distance between the endpoint of the half handlebar and the forearm.
8. The method according to any one of claims 1 to 7, characterized in that: According to the comparison result between the target distance and the distance threshold, the recognition result of the off-handlebar riding behavior is determined, including: When the target distance is greater than the distance threshold, it is determined that there is a riding behavior of taking the handlebars off; When the target distance is not greater than the distance threshold, it is determined that there is no off-handlebar riding behavior.
9. The method according to any one of claims 1 to 7, characterized in that: Identifying whether an image contains a feature of a person riding a bicycle includes: inputting the image into a first target detection model, and using the first target detection model to identify whether the image contains the feature of a person riding a bicycle, wherein the first target detection model is trained using images containing pedestrians, images containing vehicles, and images containing people riding bicycles.
10. The method according to any one of claims 1 to 7, characterized in that: Identifying handlebars and forearms in an image includes: inputting the image into a second object detection model, and using the second object detection model to identify handlebars and forearms in the image, wherein the second object detection model is trained using images of people riding bicycles with skeleton structures of the people and the bicycles marked.
11. A device for identifying off-handlebar riding behavior, characterized in that: include: A first image recognition module is configured to receive an image to be recognized and recognize whether the image contains features of a person riding a bicycle; A second image recognition module is configured to recognize a handlebar and a forearm in the image when determining that the image contains features of a person riding a bicycle; a target distance determination module configured to determine a target distance between the handlebar and the forearm; The behavior result determination module is configured to determine the recognition result of the off-handlebar riding behavior according to the comparison result between the target distance and the distance threshold.
12. An electronic device comprising a processor and a memory storing program instructions, characterized in that: The processor can execute the method for identifying off-handlebar riding behavior as described in any one of claims 1 to 10.
13. A storage medium, characterized in that: The storage medium stores computer program instructions, and when the computer program instructions are executed by the processor, the method for identifying off-handlebar riding behavior as described in any one of claims 1 to 10 is executed.
Citation Information
Patent Citations
Vehicle video processing method and device, computer equipment and storage medium
CN112183278A
Perambulator with programmable module
CN1385331A
