CN112990069A - Abnormal driving behavior detection method, device, terminal and medium - Google Patents

Abnormal driving behavior detection method, device, terminal and medium Download PDF

Info

Publication number
CN112990069A
CN112990069A CN202110349516.7A CN202110349516A CN112990069A CN 112990069 A CN112990069 A CN 112990069A CN 202110349516 A CN202110349516 A CN 202110349516A CN 112990069 A CN112990069 A CN 112990069A
Authority
CN
China
Prior art keywords
key points
hand
abnormal driving
image
driving behavior
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110349516.7A
Other languages
Chinese (zh)
Inventor
盛鹏
周有喜
乔国坤
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Xinjiang Aiwinn Information Technology Co Ltd
Original Assignee
Xinjiang Aiwinn Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Xinjiang Aiwinn Information Technology Co Ltd filed Critical Xinjiang Aiwinn Information Technology Co Ltd
Priority to CN202110349516.7A priority Critical patent/CN112990069A/en
Publication of CN112990069A publication Critical patent/CN112990069A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/50Context or environment of the image
    • G06V20/59Context or environment of the image inside of a vehicle, e.g. relating to seat occupancy, driver state or inner lighting conditions
    • G06V20/597Recognising the driver's state or behaviour, e.g. attention or drowsiness
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Biophysics (AREA)
  • Evolutionary Computation (AREA)
  • Health & Medical Sciences (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Biomedical Technology (AREA)
  • Software Systems (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Multimedia (AREA)
  • General Health & Medical Sciences (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Mathematical Physics (AREA)
  • Human Computer Interaction (AREA)
  • Traffic Control Systems (AREA)

Abstract

The invention provides a method, a device, a terminal and a medium for detecting abnormal driving behaviors. The problem that only depending on the attention of the driver or the fellow passenger on the continuity, the occurrence of the abnormal driving behavior can be found, the reliability is limited, the timeliness is poor, the abnormal driving behavior is difficult to detect when the driver only has one person is solved, the detection speed and the accuracy of the abnormal driving behavior are improved, and the driving safety can be effectively improved.

Description

Abnormal driving behavior detection method, device, terminal and medium
Technical Field
The invention relates to the technical field of image processing, in particular to a method, a device, a terminal and a medium for detecting abnormal driving behaviors.
Background
With the development of economic society, the quantity of motor vehicles kept is more and more huge, and the convenience of the motor vehicles brings great convenience for the traveling and transportation of people, but certain traffic risks also exist. Generally speaking, the driving motor vehicle that is absorbed in more can effectual reduction traffic risk, but because the driver's cabin is comparatively private, many drivers all can carry out the unusual driving behaviors such as smoking, watching TV, watching novel, receiving and making a telephone call in the vehicle driving process in the actual life, cause certain risk hidden danger.
In the related art, the abnormal driving behavior is often discovered or continued by means of the self-awareness of the driver and the observation of the passengers in the same vehicle, and the reliability is limited, so a method capable of automatically detecting the abnormal driving behavior is urgently needed to accurately detect the abnormal driving behavior and improve the driving safety.
Disclosure of Invention
In view of the above-mentioned drawbacks of the prior art, an object of the present invention is to provide a method, an apparatus, a terminal, and a medium for detecting abnormal driving behavior, which solve the technical problem of limited reliability in detecting the occurrence or continuation of abnormal driving behavior by means of the driver's own consciousness, the observation of fellow passengers, and the like.
In view of the above problems, the present invention provides an abnormal driving behavior detection method, including:
acquiring an image of a driver;
identifying human body key points of a driver in the driver image and position information of the human body key points based on a human body key point model;
and if the identified human key point set comprises target human key points, acquiring the position relation among the target human key points, and detecting abnormal driving behaviors, wherein the target human key points comprise at least two human key points at preset positions.
Optionally, the target human key points include hand key points and ear key points, the position relationship between the target human key points is obtained, and the detection of abnormal driving behavior includes:
determining the distance between the hand key point and the ear key point according to the position information of the hand key point and the position information of the ear key point;
if the distance between the hands and the ears is smaller than the preset distance between the hands and the ears, selecting a local image of the hands and the ears from the image of the driver, wherein the local image of the hands and the ears comprises images of positions of key points of the hands and the ears;
and carrying out image recognition on the partial images of the hand and the ear, and determining that abnormal driving behaviors exist if a mobile phone is recognized.
Optionally, the target human body key points include hand key points and lip key points, the obtaining of the position relationship between the target human body key points and the detecting of the abnormal driving behavior include:
determining a hand-lip distance between a hand key point and a lip key point according to the position information of the hand key point and the position information of the lip key point;
if the hand-lip distance is smaller than the preset hand-lip distance, selecting a hand-lip local image from the driver image, wherein the hand-lip local image comprises hand key points and an image of the position of the lip key points;
and performing image recognition on the partial hand lip image, and determining that abnormal driving behaviors exist if a long and thin object is recognized.
Optionally, determining that there is abnormal driving behavior comprises:
respectively acquiring a first pixel average value of one end of the elongated object, which is far away from the lip part, and a second pixel average value of the hand lip local image;
and if the first pixel average value is larger than the second pixel average value, determining that abnormal driving behaviors exist.
Optionally, the method further includes:
acquiring position information of a current human body key point on the face, and selecting a local face image;
identifying face key points in the face local image and position information of the face key points on the basis of a face key point model;
determining a yaw angle according to the position information of the face key point, wherein the yaw angle comprises at least one of a pitch angle, a roll angle and a yaw angle;
and if the deflection angle is larger than a preset deflection angle threshold value, determining that abnormal driving behaviors exist.
Optionally, the yaw angle is obtained by:
θx=atan2(-ryz,rzz);
the roll angle is obtained by:
Figure BDA0003001960220000021
the pitch angle is obtained by:
θz=atan2(-rxy,rxx);
wherein, thetaxIs yaw angle, θyIs the roll angle, thetazIs a pitch angle.
Optionally, the training mode of the human body keypoint model includes:
obtaining M human body key points in a human body key point image, wherein each human body key point is converted into a maximum activation point in an N x N matrix through Gaussian distribution;
acquiring a backbone network, inputting the human body key point image into the backbone network, and generating an output result;
and determining L2 loss as a loss function according to the maximum activation point and the output result, and training the backbone network.
The invention also provides an abnormal driving behavior detection device, comprising:
the acquisition module is used for acquiring an image of a driver;
the identification module is used for identifying human key points of the driver in the driver image and position information of the human key points based on a human key point model;
and the detection module is used for acquiring the position relation among the target human key points and detecting abnormal driving behaviors if the identified human key point set comprises the target human key points, wherein the target human key points comprise at least two human key points at preset positions.
The invention also provides a terminal, which comprises a processor, a memory and a communication bus;
the communication bus is used for connecting the processor and the memory;
the processor is configured to execute a computer program stored in the memory to implement the abnormal driving behavior detection method according to any one of the above embodiments.
The present invention also provides a computer-readable storage medium, having stored thereon a computer program,
the computer program is for causing the computer to execute the abnormal driving behavior detection method according to any one of the embodiments described above.
As described above, the abnormal driving behavior detection method, the abnormal driving behavior detection device, the abnormal driving behavior detection terminal, and the abnormal driving behavior detection medium provided by the present invention have the following beneficial effects:
according to the method, the image of the driver is obtained, the human body key points of the driver in the image of the driver and the position information of the human body key points are identified according to a human body key point model, if the identified human body key point set comprises target human body key points, the position relation between the target human body key points is obtained, and abnormal driving behavior detection is carried out. The problem that only depending on the attention of the driver or the fellow passenger on the continuity, the occurrence of the abnormal driving behavior can be found, the reliability is limited, the timeliness is poor, the abnormal driving behavior is difficult to detect when the driver only has one person is solved, the detection speed and the accuracy of the abnormal driving behavior are improved, and the driving safety can be effectively improved.
Drawings
Fig. 1 is a schematic flow chart of a method for detecting abnormal driving behavior according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of a human body key point determined from human body skeletal joint points;
FIG. 3 is a schematic diagram of a human body keypoint image;
FIG. 4 is a schematic diagram of a partial image of a hand and ear;
FIG. 5 is a schematic view of a partial image of a hand lip;
FIG. 6 is a schematic diagram of a recognition result of face keypoint recognition performed on a face partial image;
fig. 7 is a schematic structural diagram of an abnormal driving behavior detection apparatus according to a second embodiment of the present invention;
fig. 8 is a schematic structural diagram of a terminal according to a second embodiment of the present invention.
Detailed Description
The embodiments of the present invention are described below with reference to specific embodiments, and other advantages and effects of the present invention will be easily understood by those skilled in the art from the disclosure of the present specification. The invention is capable of other and different embodiments and of being practiced or of being carried out in various ways, and its several details are capable of modification in various respects, all without departing from the spirit and scope of the present invention. It is to be noted that the features in the following embodiments and examples may be combined with each other without conflict.
It should be noted that the drawings provided in the following embodiments are only for illustrating the basic idea of the present invention, and the components related to the present invention are only shown in the drawings rather than drawn according to the number, shape and size of the components in actual implementation, and the type, quantity and proportion of the components in actual implementation may be changed freely, and the layout of the components may be more complicated.
Example one
Referring to fig. 1, a method for detecting abnormal driving behavior according to an embodiment of the present invention includes:
s101: an image of a driver is acquired.
The pilot includes, but is not limited to, a pilot who drives a vehicle such as a motor vehicle, a non-motor vehicle, a ship, an aircraft, etc.
The images of the driver can be shot and acquired by shooting equipment (such as in-vehicle monitoring equipment installed in a cab) arranged on the driving tool, and can also be shot and acquired by outdoor shooting equipment such as a road monitoring camera, a crossing capturing equipment and the like.
When the driver image is a video frame extracted based on the driver video, the video frame with good light in a certain time range can be selected as the driver image.
The driver image may be acquired based on an external instruction, or may be automatically acquired at intervals.
Optionally, in order to make the detection of the abnormal driving behavior more accurate, the shooting angle of the image of the driver may shoot the front image of the driver as much as possible.
In some embodiments, before acquiring the driver image, the method further includes:
the method comprises the steps of obtaining the current driving state of the driving tool, obtaining images of a driver if the current driving state includes driving, and therefore resource waste caused by continuous shooting of the driver when the driving tool is in a stop state can be avoided, and misdetection caused by shooting of reasonable actions of the driver when the driving tool is in a braking state can be avoided.
S102: and identifying the human body key points of the driver in the driver image and the position information of the human body key points based on the human body key point model.
The human body key point model can be a pre-trained recognition model, and the human body key point model can adopt a recognition model in the prior related technology.
Optionally, the human body key point model may also be obtained by training in the following manner:
obtaining M human body key points in a human body key point image, wherein each human body key point is converted into a maximum activation point in an N x N matrix through Gaussian distribution;
acquiring a backbone network, inputting the human body key point image into the backbone network, and generating an output result;
and determining L2 loss as a loss function according to the maximum activation point and the output result, and training the backbone network.
The human body key point image is an image with human body key points labeled in advance, the positions of the human body key points can be determined according to the positions of human body bones, see fig. 2 and 3, fig. 3 is a schematic diagram of the human body key point image, and fig. 2 is a schematic diagram of the human body key points determined according to human body bone joint points.
It should be noted that the serial number in fig. 2 is only an example, and a person skilled in the art may change the identification manner of the serial number as needed, including but not limited to identification by using letters, words, and the like.
The identification manner of the human body key points in fig. 2 is also only an example, and those skilled in the art may add and define other feature points as the human body key points or delete part of the human body key points as needed.
Optionally, the backbone network includes, but is not limited to, a network of mobilenetv2, taking the human body key points shown in fig. 3 as an example, 21 human body key points of a human body are converted into maximum activation points in a 64 x 64 matrix through gaussian distribution to obtain gt heatmaps of 21 x 64, the human body key point images are input into the network of mobilenetv2 to obtain output results of 21 x 64, L2 loss is determined as a loss function according to the output results and the gt heatmaps of 21 x 64, and the network of mobilenetv2 is optimized through the loss function.
Alternatively, the loss function may be determined based on the distance of the maximum activation point to the corresponding point mapped on the output result.
By the method of the characteristic diagram, the fact that the human body characteristic points have the characteristics which are mutually related is considered, the human body key point model obtained after training can learn the context semantic information in the image, overfitting can be effectively prevented, and more accurate human body key points can be obtained through prediction.
The human key points of the driver in the image of the driver and the position information of the human key points can be accurately identified based on the human key point model.
S103: and if the identified human body key point set comprises target human body key points, acquiring the position relation among the target human body key points, and detecting abnormal driving behaviors.
It should be noted that the target human body key points include at least two human body key points of the preset portion.
Optionally, the determination manner of whether the human body key points include the target human body key points may be determined by identification information of the human body key points, where the identification information includes, but is not limited to, the serial numbers shown in fig. 2.
In some embodiments, if the identified human body key point set does not include the target human body key point, it indicates that a part of the human body part of the driver may be outside the shooting area, for example, the head of the driver is extended out of the window, the two hands of the driver are placed outside the shooting area, the driver lowers the head, the driver explores the hands of the driver to search for the object falling in the vehicle, and the like. At this time, the actions of the driver are all abnormal driving actions, and the detection result of the abnormal driving behavior detection is that abnormal driving behaviors exist.
Alternatively, the determination of the target human body key point may be determined by those skilled in the art according to the actual application scenario of the detection method.
In some embodiments, the target human body key points include hand key points and ear key points, the obtaining of the position relationship between the target human body key points includes:
determining the distance between the hand key point and the ear key point according to the position information of the hand key point and the position information of the ear key point;
if the distance between the hands and the ears is smaller than the preset distance between the hands and the ears, selecting a local image of the hands and the ears from the image of the driver, wherein the local image of the hands and the ears comprises images of positions of key points of the hands and the ears;
and carrying out image recognition on the partial images of the ears, and determining that abnormal driving behaviors exist if the target object is recognized.
The hand keypoints comprise at least one of left-hand keypoints and right-hand keypoints, and the ear keypoints comprise at least one of left-ear keypoints and right-ear keypoints.
Optionally, the distance between the ears includes, but is not limited to, at least one of:
a first hand-ear distance from the left ear to the left hand, a second hand-ear distance from the left ear to the right hand, a third hand-ear distance from the right ear to the left hand, and a fourth hand-ear distance from the right ear to the right hand.
In some embodiments, the local image of the ear may be image-recognized by a related art image recognition method to identify the target object.
Alternatively, the target item includes, but is not limited to, a cell phone, etc.
When the distance between the hands and the ears is small, the driver is likely to use the mobile phone to communicate, and the mobile phone communication has great influence on the driving safety, so the abnormal driving behavior can be accurately detected by the method.
It should be noted that the preset distance between the ears can be set according to the needs of those skilled in the art, and is not limited herein.
In some embodiments, the preset hand-ear distance can be different from person to person according to the physical condition of the driver, and the unreasonable hand-ear distance is determined as the preset hand-ear distance by acquiring images of various normal driving actions of the driver in advance, so that system misjudgment caused by the adoption of the preset value of the rough handle is avoided, and the detection accuracy and reliability are improved.
In some embodiments, the identification of the target object may be determined by determining whether an object is present in the hand of the driver close to the ear, and if the object is present, the object is regarded as the target object regardless of whether the object is identified as a mobile phone or cannot be identified. In some cases, the driver may perform an operation such as wearing an earring, and the behavior is still dangerous driving behavior although the driver cannot recognize the mobile phone.
In some embodiments, the partial hand-ear image is a hand and an ear corresponding to a hand-ear distance smaller than the preset hand-ear distance, but not the whole face image, for example, if it is detected that the distance between the left hand and the left ear is smaller than the preset hand-ear distance, the partial hand-ear image only needs to include the left hand and the left ear, and at least one of the right ear and the right hand may not be included.
In some embodiments, referring to fig. 3, although the distance between the hands and the ears in fig. 3 is smaller than the preset distance between the hands and the ears, there is no abnormal driving behavior because the hands of the driver have no articles, so that the false detection caused by normal operations of raising the hands, smoothing out the hair and the like of the driver can be effectively avoided, and the detection accuracy is further improved.
Referring to fig. 4, fig. 4 is an example of a partial image of a hand ear, where when a key point of a left hand is detected to be near a key point of a left ear, that is, when a first distance from the left hand to the left ear is detected to be smaller than a preset distance, an area where the left hand and the left ear are located is intercepted, and after the partial image of the hand ear is normalized, for example, the size of the partial image of the hand ear is reset to 224x224, a detection method of ssd (single shot multiple detector) is continuously used to detect whether a mobile phone is included therein, and if the mobile phone is detected, it is determined that a call-making behavior exists, that is, an abnormal driving behavior exists.
In some embodiments, the target human body key points include hand key points and lip key points, the obtaining of the position relationship between the target human body key points includes:
determining a hand-lip distance between the hand key point and the lip key point according to the position information of the hand key point and the position information of the lip key point;
if the hand-lip distance is smaller than the preset hand-lip distance, selecting a hand-lip local image from the driver image, wherein the hand-lip local image comprises hand key points and an image of the position of the lip key points;
and carrying out image recognition on the partial image of the hand lip, and determining that abnormal driving behaviors exist if the slender object is recognized.
The hand keypoints comprise at least one of left-hand keypoints and right-hand keypoints.
Optionally, the distance between the ears includes, but is not limited to, at least one of:
the first hand-lip distance from the lips to the left hand and the second hand-lip distance from the lips to the right hand.
In some embodiments, the image recognition of the partial hand lip image may adopt the image recognition method in the related art to recognize the elongated article.
Alternatively, the elongated items include, but are not limited to, cigarettes, e-cigarettes, and the like.
When the distance between the lips of the hands is small, the driver is likely to smoke, and the smoking has a large influence on the driving safety, so that the abnormal behavior can be accurately detected by the method.
The preset hand-lip distance may be set according to the needs of those skilled in the art, and is not limited herein.
In some embodiments, the preset hand-lip distance can be different from person to person according to the physical condition of the driver, and the unreasonable hand-lip distance is determined as the preset hand-lip distance by acquiring images of various normal driving actions of the driver in advance, so that system misjudgment caused by rough adoption of the preset value is avoided, and the detection accuracy and reliability are improved.
In some embodiments, the identification of the elongated object may be determined by determining whether an object is present in the hand of the driver closer to the lip, and if so, whether the object is identified as an elongated object or not, the object is considered to be an elongated object. In some cases, the driver may eat or the like, and although the elongated article cannot be recognized, the behavior is still dangerous driving behavior, and therefore, the elongated article may be defined as being an elongated article as long as the presence of the elongated article is detected by the hand.
In some embodiments, the hand-lip partial image is a hand and a lip corresponding to a hand-lip distance smaller than a preset hand-lip distance, but not an entire face image, for example, if it is detected that the distance between the left hand and the lip is smaller than the preset hand-lip distance, the hand-lip partial image only needs to include the left hand and the lip, and may not include the right hand.
In some embodiments, determining that abnormal driving behavior exists includes:
respectively acquiring a first pixel average value of one end of the elongated object, which is far away from the lip part, and a second pixel average value of the hand lip local image;
and if the first pixel average value is larger than the second pixel average value, determining that abnormal driving behaviors exist.
When the distance between the hands and the lips of the driver is too small, the driver may drink water or eat, the driver may send a voice message or smoke, and the like, and in comparison, the smoking process is longer in duration and more dangerous. In the electronic cigarette or the cigarette, the end far away from the lip part may be in a light-emitting state in the smoking process, so that the first pixel average value of the area where the elongated object is far away from the end of the lip part can be compared with the second pixel average value of the whole longevity spring local image, if the first pixel average value is larger than the second pixel average value, the end of the elongated object is in the light-emitting state, and the driver is likely to be smoking at the moment, so that the abnormal driving behavior is determined.
Certainly, the cigarette may also have a state that the driver spits out smoke, in order to further determine whether the driver smokes, a partial image of the lip of the driver may be further acquired, whether smoke exists is identified through an image identification mode, and if smoke exists, abnormal driving behaviors may be further determined.
Referring to fig. 5, fig. 5 is an example of a hand lip local image, when a left-hand key point is detected to be near a lip key point, that is, when a distance from the left hand to a first hand lip of the lip is detected to be smaller than a preset hand lip distance, an area where the left hand and the lip are located is intercepted, and after the hand lip local image is normalized, for example, the size of the hand lip local image resize is 224x224, a detection method of ssd (single shot multi box detector) is continuously used to detect whether the hand lip local image contains a cigarette, and if the cigarette is detected, it is determined that there is a smoking behavior, that is, there is an abnormal driving behavior.
In some embodiments, to improve the accuracy of detecting the abnormal driving behavior, at least one image of a preset time before or after the current driver image may be further obtained on the basis of determining that the abnormal driving behavior exists based on the current driver image, and further at least one abnormal driving behavior detection may be performed, and if the detection results exceeding a certain ratio are consistent, it is determined that the abnormal driving behavior does exist. For example, the driver image currently acquired is 10: 00: 00, detecting the presence of abnormal driving behavior based on the image, then respectively obtaining 10: 00: 03 and 9:59:58, and detecting that the driver has abnormal driving behavior in at least one of the images, the driver can further determine that the abnormal driving behavior exists.
In some embodiments, the abnormal driving behavior detection method further includes:
the target key points comprise hand key points, and the hand key points comprise left hand key points and right hand key points;
and acquiring a hand distance between the left-hand key point and the right-hand key point, acquiring a hand local image and identifying the hand local image if the hand distance is not within a preset hand distance range threshold, determining that the abnormal behavior is normal if the hand key point is identified to be positioned on a steering wheel, and determining that the abnormal driving behavior exists if the hand key point is not identified to be positioned on the steering wheel.
When the driving tool is an automatic transmission vehicle, gear shifting is often not needed in the driving process, therefore, the driving tool is generally required to enable a driver to hold the steering wheel by both hands in the driving process of the vehicle, and when the vehicle is close to straight line driving at a constant speed, bad habit that both hands leave the steering wheel can exist in some drivers, therefore, the distance between the hands can be detected, if the key points of the hands cannot be detected, or the distance between the key points of the hands is too large or too small, it is indicated that the driver may not place both hands on the steering wheel, danger can be caused to driving at the moment, whether the hands are placed on the steering wheel is determined through image recognition, and the abnormal driving behavior that both hands leave the steering wheel can be effectively detected.
In some embodiments, the target key points include a left-hand key point and a right-hand key point, the obtaining of the position relationship between the target human body key points, and the detecting of the abnormal driving behavior includes:
determining the hand distance between two hands according to the position information of the left-hand key point and the position information of the right-hand key point;
acquiring a hand local image, identifying a steering wheel in the hand local image, and determining the diameter of the steering wheel;
and if the distance between hands is smaller than the diameter, determining that abnormal driving behaviors exist.
In life, some people's driving habits are very bad, are used to hold both hands in the lower half of steering wheel, often may not come to time to adjust the direction when emergency appears, so can in time detect dangerous action through such mode, and then can in time remind relevant personnel, avoid the emergence of accident.
In some embodiments, if two hands are not successfully detected in the steering wheel region, a hand-ear distance between the hand key point and the ear key point is further determined according to the position information of the hand key point and the position information of the ear key point, and/or a hand-lip distance between the hand key point and the lip key point is determined according to the position information of the hand key point and the position information of the lip key point, and then the corresponding detection step is correspondingly performed.
In some embodiments, the abnormal driving behavior detection method further includes:
acquiring position information of a current human body key point on the face, and selecting a local face image;
identifying face key points in the face local image and position information of the face key points on the basis of the face key point model;
determining a deflection angle according to the position information of the face key points;
and if the deflection angle is larger than a preset deflection angle threshold value, determining that abnormal driving behaviors exist.
In some embodiments, after the face partial image is selected, before the identifying the face key points and the position information of the face key points in the face partial image based on the face key point model, the method further includes:
and carrying out normalization processing on the local face image.
Optionally, the local face image and the image with resize of 112 × 112 are input into the face key point model, so as to obtain coordinate information of the face key points.
In some embodiments, the face keypoint model may be an existing correlation model, and one possible recognition result may be shown in fig. 6. And a plurality of identification points are arranged according to the positions of the facial features and the outline.
In some embodiments, the number of face keypoints output by the face keypoint model is 68, and the distribution thereof can be seen in fig. 6.
In some embodiments, the yaw angle comprises at least one of a pitch angle, a roll angle, and a yaw angle. When the yaw angle comprises at least two of a pitch angle, a roll angle and a yaw angle, when one angle is larger than a preset yaw angle threshold value, the driver can be judged to have a behavior of realizing deviation, and then the driver can be determined to have an abnormal driving behavior.
Optionally, the yaw angle is obtained by:
θx=atan2(-ryz,rzz) Equation (1).
Optionally, the roll angle is obtained by:
Figure BDA0003001960220000101
optionally, the pitch angle is obtained by:
θz=atan2(-rxy,rxx) Equation (3).
Wherein, thetaxIs yaw angle, θyIs the roll angle, thetazIs a pitch angle.
Wherein r isyz、rzz、rrz、rxy、rxxCan be determined according to the following ways:
the Yaw angle Yaw is the angle of rotation around the Y axis, the pitch angle pitch is the angle of rotation around the x axis, and the roll angle roll is the angle of rotation around the z axis, then there are:
Figure BDA0003001960220000111
Figure BDA0003001960220000112
Figure BDA0003001960220000113
rotating in turn by means of a raw-pitch-roll, the matrix is described as:
Figure BDA0003001960220000114
r can be determined according to the position information of each face key pointyz、rzz、rrz、rxy、rxxAnd thus the deflection angle.
In some embodiments, the abnormal driving behavior detection method further includes:
and if the abnormal driving behavior is determined to exist, sending an alarm message.
Optionally, the alarm message may be displayed in a manner of an alarm bell or an alarm lamp provided in the driving tool, or may be transmitted to a corresponding message receiving terminal in a wired or wireless communication manner, where the message receiving terminal includes, but is not limited to, a mobile terminal (e.g., a mobile phone) carried by the driver, a third-party platform (e.g., a traffic police monitoring platform, a driver management platform), and the like.
In some embodiments, the abnormal driving behavior detection method further includes:
and acquiring abnormal driving behavior information, and determining the danger degree of abnormal driving according to a preset rule.
The abnormal driving behavior information includes, but is not limited to, the abnormal driving duration, the geographical location information of the place where the abnormal driving behavior occurs, the driving speed of the current driving tool, the state of the road section where the current driving tool is located, the specific type of the abnormal behavior, and the like.
The current road section state of the driving tool includes but is not limited to at least one of long straight road, multi-turn, one-way road, downhill slope, uphill slope and the like.
Specific types of abnormal behavior include, but are not limited to, at least one of smoking, making a call, eating a snack, being distracted, etc.
The preset rule can be that various abnormal driving behavior information is preset with a certain weight score, so that a comprehensive score is determined, and the danger degree of the abnormal driving behavior is determined according to the level of the comprehensive score. The degree of risk includes, but is not limited to: very dangerous, comparatively dangerous, generally dangerous, etc.
For example, the current abnormal driving behavior information comprises turning, long downhill, vague and vague duration for 3 seconds, the comprehensive score is determined to be 80 points according to the preset weight score, and it is very dangerous to preset the comprehensive score to exceed 70 points. The degree of risk of the abnormal driving at this time is very dangerous.
Alternatively, the warning frequency and the warning manner may be determined according to the degree of risk of abnormal driving.
The embodiment of the invention provides a method for detecting abnormal driving behaviors, which comprises the steps of acquiring images of drivers, identifying human key points of the drivers in the images of the drivers and position information of the human key points according to a human key point model, and acquiring the position relation among target human key points if a set of identified human key points comprises the target human key points so as to detect the abnormal driving behaviors. The problem that only depending on the attention of the driver or the fellow passenger on the continuity, the occurrence of the abnormal driving behavior can be found, the reliability is limited, the timeliness is poor, the abnormal driving behavior is difficult to detect when the driver only has one person is solved, the detection speed and the accuracy of the abnormal driving behavior are improved, and the driving safety can be effectively improved.
Example two
Referring to fig. 7, an abnormal driving behavior detection apparatus 1000 includes:
an acquisition module 1001 for acquiring an image of a driver;
the identification module 1002 is configured to identify human key points of a driver in a driver image and position information of the human key points based on a human key point model;
the detecting module 1003 is configured to, if the identified human key point set includes target human key points, obtain a position relationship between the target human key points, and perform abnormal driving behavior detection, where the target human key points include at least two human key points at preset positions.
In this embodiment, the abnormal driving behavior detection apparatus is substantially provided with a plurality of modules for executing the abnormal driving behavior detection method in the above embodiments, and specific functions and technical effects are as described in the first embodiment, which is not described herein again.
Referring to fig. 8, an embodiment of the present invention further provides a terminal 1100, including a processor 1101, a memory 1102, and a communication bus 1103;
a communication bus 1103 is used to connect the processor 1101 with the memory 1102;
the processor 1101 is configured to execute a computer program stored in the memory 1102 to implement the abnormal driving behavior detection method according to any one of the above-described embodiments.
An embodiment of the present invention also provides a computer-readable storage medium, characterized in that, a computer program is stored thereon,
the computer program is for causing a computer to execute the abnormal driving behavior detection method according to any one of the above-described first embodiment.
Embodiments of the present application also provide a non-transitory readable storage medium, where one or more modules (programs) are stored in the storage medium, and when the one or more modules are applied to a device, the device may execute instructions (instructions) included in an embodiment of the present application.
It should be noted that the computer readable medium in the present disclosure can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In contrast, in the present disclosure, a computer readable signal medium may comprise a propagated data signal with computer readable program code embodied therein, either in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, optical cables, RF (radio frequency), etc., or any suitable combination of the foregoing.
The computer readable medium may be embodied in the electronic device; or may exist separately without being assembled into the electronic device.
Computer program code for carrying out operations for aspects of the present disclosure may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + +, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The foregoing embodiments are merely illustrative of the principles and utilities of the present invention and are not intended to limit the invention. Any person skilled in the art can modify or change the above-mentioned embodiments without departing from the spirit and scope of the present invention. Accordingly, it is intended that all equivalent modifications or changes which can be made by those skilled in the art without departing from the spirit and technical spirit of the present invention be covered by the claims of the present invention.

Claims (10)

1. An abnormal driving behavior detection method characterized by comprising:
acquiring an image of a driver;
identifying human body key points of a driver in the driver image and position information of the human body key points based on a human body key point model;
and if the identified human key point set comprises target human key points, acquiring the position relation among the target human key points, and detecting abnormal driving behaviors, wherein the target human key points comprise at least two human key points at preset positions.
2. The abnormal driving behavior detection method according to claim 1, wherein the target human body key points include hand key points and ear key points, and the obtaining of the position relationship between the target human body key points and the abnormal driving behavior detection include:
determining the distance between the hand key point and the ear key point according to the position information of the hand key point and the position information of the ear key point;
if the distance between the hands and the ears is smaller than the preset distance between the hands and the ears, selecting a local image of the hands and the ears from the image of the driver, wherein the local image of the hands and the ears comprises images of positions of key points of the hands and the ears;
and carrying out image recognition on the partial images of the hand and the ear, and determining that abnormal driving behaviors exist if a mobile phone is recognized.
3. The abnormal driving behavior detection method according to claim 1, wherein the target human body key points include hand key points and lip key points, and the acquiring of the position relationship between the target human body key points and the abnormal driving behavior detection include:
determining a hand-lip distance between a hand key point and a lip key point according to the position information of the hand key point and the position information of the lip key point;
if the hand-lip distance is smaller than the preset hand-lip distance, selecting a hand-lip local image from the driver image, wherein the hand-lip local image comprises hand key points and an image of the position of the lip key points;
and performing image recognition on the partial hand lip image, and determining that abnormal driving behaviors exist if a long and thin object is recognized.
4. The abnormal driving behavior detection method according to claim 3, wherein determining that the abnormal driving behavior exists includes:
respectively acquiring a first pixel average value of one end of the elongated object, which is far away from the lip part, and a second pixel average value of the hand lip local image;
and if the first pixel average value is larger than the second pixel average value, determining that abnormal driving behaviors exist.
5. The abnormal driving behavior detection method according to claim 1, characterized by further comprising:
acquiring position information of a current human body key point on the face, and selecting a local face image;
identifying face key points in the face local image and position information of the face key points on the basis of a face key point model;
determining a yaw angle according to the position information of the face key point, wherein the yaw angle comprises at least one of a pitch angle, a roll angle and a yaw angle;
and if the deflection angle is larger than a preset deflection angle threshold value, determining that abnormal driving behaviors exist.
6. The abnormal driving behavior detection method according to claim 5,
the yaw angle is obtained by:
θx=atan2(-ryz,rzz);
the roll angle is obtained by:
Figure FDA0003001960210000021
the pitch angle is obtained by:
θz=atan2(-rxy,rxx);
wherein, thetaxIs yaw angle, θyIs the roll angle, thetazIs a pitch angle.
7. The abnormal driving behavior detection method according to any one of claims 1 to 6, wherein the training mode of the human body keypoint model comprises:
obtaining M human body key points in a human body key point image, wherein each human body key point is converted into a maximum activation point in an N x N matrix through Gaussian distribution;
acquiring a backbone network, inputting the human body key point image into the backbone network, and generating an output result;
and determining L2 loss as a loss function according to the maximum activation point and the output result, and training the backbone network.
8. An abnormal driving behavior detection device characterized by comprising:
the acquisition module is used for acquiring an image of a driver;
the identification module is used for identifying human key points of the driver in the driver image and position information of the human key points based on a human key point model;
and the detection module is used for acquiring the position relation among the target human key points and detecting abnormal driving behaviors if the identified human key point set comprises the target human key points, wherein the target human key points comprise at least two human key points at preset positions.
9. A terminal comprising a processor, a memory, and a communication bus;
the communication bus is used for connecting the processor and the memory;
the processor is configured to execute a computer program stored in the memory to implement the abnormal driving behavior detection method according to any one of claims 1 to 7.
10. A computer-readable storage medium, having stored thereon a computer program,
the computer program is for causing the computer to execute the abnormal driving behavior detection method according to any one of claims 1 to 7.
CN202110349516.7A 2021-03-31 2021-03-31 Abnormal driving behavior detection method, device, terminal and medium Pending CN112990069A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110349516.7A CN112990069A (en) 2021-03-31 2021-03-31 Abnormal driving behavior detection method, device, terminal and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110349516.7A CN112990069A (en) 2021-03-31 2021-03-31 Abnormal driving behavior detection method, device, terminal and medium

Publications (1)

Publication Number Publication Date
CN112990069A true CN112990069A (en) 2021-06-18

Family

ID=76338713

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110349516.7A Pending CN112990069A (en) 2021-03-31 2021-03-31 Abnormal driving behavior detection method, device, terminal and medium

Country Status (1)

Country Link
CN (1) CN112990069A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113470080A (en) * 2021-07-20 2021-10-01 浙江大华技术股份有限公司 Illegal behavior identification method
CN113591661A (en) * 2021-07-24 2021-11-02 深圳市铁越电气有限公司 Call-making behavior prediction method and system
CN114241589A (en) * 2022-02-28 2022-03-25 深圳市城市交通规划设计研究中心股份有限公司 Bus driver violation judgment method and device based on vehicle-mounted video
CN114663863A (en) * 2022-02-24 2022-06-24 北京百度网讯科技有限公司 Image processing method, image processing device, electronic equipment and computer storage medium

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110837815A (en) * 2019-11-15 2020-02-25 济宁学院 Driver state monitoring method based on convolutional neural network
CN110956061A (en) * 2018-09-27 2020-04-03 北京市商汤科技开发有限公司 Action recognition method and device, and driver state analysis method and device
CN111301280A (en) * 2018-12-11 2020-06-19 北京嘀嘀无限科技发展有限公司 Dangerous state identification method and device
CN111368696A (en) * 2020-02-28 2020-07-03 淮阴工学院 Dangerous chemical transport vehicle illegal driving behavior detection method and system based on visual cooperation
CN111488855A (en) * 2020-04-24 2020-08-04 上海眼控科技股份有限公司 Fatigue driving detection method, device, computer equipment and storage medium
CN112016457A (en) * 2020-08-27 2020-12-01 青岛慕容信息科技有限公司 Driver distraction and dangerous driving behavior recognition method, device and storage medium
CN112069988A (en) * 2020-09-04 2020-12-11 徐尔灵 Gun-ball linkage-based driver safe driving behavior detection method
CN112084719A (en) * 2020-09-17 2020-12-15 招商局重庆交通科研设计院有限公司 Road traffic intelligent design platform based on computer aided design and auxiliary simulation
CN112183482A (en) * 2020-10-29 2021-01-05 苏州市职业大学 Dangerous driving behavior recognition method, device and system and readable storage medium
CN112270283A (en) * 2020-11-04 2021-01-26 北京百度网讯科技有限公司 Abnormal driving behavior determination method, device, equipment, vehicle and medium
CN112287795A (en) * 2020-10-22 2021-01-29 北京百度网讯科技有限公司 Abnormal driving posture detection method, device, equipment, vehicle and medium
WO2021036828A1 (en) * 2019-08-29 2021-03-04 腾讯科技(深圳)有限公司 Object tracking method and apparatus, storage medium, and electronic device

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110956061A (en) * 2018-09-27 2020-04-03 北京市商汤科技开发有限公司 Action recognition method and device, and driver state analysis method and device
CN111301280A (en) * 2018-12-11 2020-06-19 北京嘀嘀无限科技发展有限公司 Dangerous state identification method and device
WO2021036828A1 (en) * 2019-08-29 2021-03-04 腾讯科技(深圳)有限公司 Object tracking method and apparatus, storage medium, and electronic device
CN110837815A (en) * 2019-11-15 2020-02-25 济宁学院 Driver state monitoring method based on convolutional neural network
CN111368696A (en) * 2020-02-28 2020-07-03 淮阴工学院 Dangerous chemical transport vehicle illegal driving behavior detection method and system based on visual cooperation
CN111488855A (en) * 2020-04-24 2020-08-04 上海眼控科技股份有限公司 Fatigue driving detection method, device, computer equipment and storage medium
CN112016457A (en) * 2020-08-27 2020-12-01 青岛慕容信息科技有限公司 Driver distraction and dangerous driving behavior recognition method, device and storage medium
CN112069988A (en) * 2020-09-04 2020-12-11 徐尔灵 Gun-ball linkage-based driver safe driving behavior detection method
CN112084719A (en) * 2020-09-17 2020-12-15 招商局重庆交通科研设计院有限公司 Road traffic intelligent design platform based on computer aided design and auxiliary simulation
CN112287795A (en) * 2020-10-22 2021-01-29 北京百度网讯科技有限公司 Abnormal driving posture detection method, device, equipment, vehicle and medium
CN112183482A (en) * 2020-10-29 2021-01-05 苏州市职业大学 Dangerous driving behavior recognition method, device and system and readable storage medium
CN112270283A (en) * 2020-11-04 2021-01-26 北京百度网讯科技有限公司 Abnormal driving behavior determination method, device, equipment, vehicle and medium

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
姚巍巍;张洁;: "融合目标检测和人体关键点检测的铁路司机行为识别", 计算机测量与控制, no. 06, 25 June 2020 (2020-06-25), pages 2 *
姚巍巍;张洁;: "融合目标检测和人体关键点检测的铁路司机行为识别", 计算机测量与控制, no. 06, pages 2 *
汪旭;陈仁文;黄斌;: "基于Android系统的司机驾驶安全监测系统的实现", 电子测量技术, no. 08 *
黄家才;旷文腾;毛宽诚;: "基于人脸关键点的疲劳驾驶检测研究", 南京工程学院学报(自然科学版), no. 04 *

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113470080A (en) * 2021-07-20 2021-10-01 浙江大华技术股份有限公司 Illegal behavior identification method
CN113470080B (en) * 2021-07-20 2024-05-14 浙江大华技术股份有限公司 Illegal behavior recognition method
CN113591661A (en) * 2021-07-24 2021-11-02 深圳市铁越电气有限公司 Call-making behavior prediction method and system
CN114663863A (en) * 2022-02-24 2022-06-24 北京百度网讯科技有限公司 Image processing method, image processing device, electronic equipment and computer storage medium
CN114241589A (en) * 2022-02-28 2022-03-25 深圳市城市交通规划设计研究中心股份有限公司 Bus driver violation judgment method and device based on vehicle-mounted video
CN114241589B (en) * 2022-02-28 2022-08-23 深圳市城市交通规划设计研究中心股份有限公司 Bus driver violation behavior determination method and device based on vehicle-mounted video

Similar Documents

Publication Publication Date Title
CN112990069A (en) Abnormal driving behavior detection method, device, terminal and medium
US20200151479A1 (en) Method and apparatus for providing driver information via audio and video metadata extraction
US20200057487A1 (en) Methods and systems for using artificial intelligence to evaluate, correct, and monitor user attentiveness
JP6827712B2 (en) Control devices, in-vehicle devices, video distribution methods, and programs
TWI627084B (en) A computing platform for development and deployment of sensor-driven vehicle telemetry applications and services
US10284317B1 (en) Systems and methods for assessing sound within a vehicle using machine learning techniques
CN111210620B (en) Method, device and equipment for generating driver portrait and storage medium
US10363866B2 (en) Contextual priority signal in autonomous environment
CN110728218A (en) Dangerous driving behavior early warning method and device, electronic equipment and storage medium
WO2023051322A1 (en) Travel management method, and related apparatus and system
CN111002981A (en) Prompting method, prompting device, automatic driving vehicle and storage medium
CN205281786U (en) Alarm system
CN106274900A (en) A kind of method and apparatus limiting overspeed of vehicle
WO2021067380A1 (en) Methods and systems for using artificial intelligence to evaluate, correct, and monitor user attentiveness
CN115923832A (en) Handover assistant for machine-to-driver transition
CN111002998A (en) State prompting method and device, automatic driving vehicle and storage medium
CN112633387A (en) Safety reminding method, device, equipment, system and storage medium
CN113352989B (en) Intelligent driving safety auxiliary method, product, equipment and medium
CN110648494A (en) Multi-device reminding method and device
Kashevnik et al. Context-based driver support system development: Methodology and case study
CN111028531A (en) Prompting method, prompting device, automatic driving vehicle and storage medium
JP7470967B2 (en) Systems, programs, machine learning methods, and machine learning models
CN111660927A (en) Whistling method and system
WO2020221023A1 (en) Message sending control method and apparatus in sensing base station
CN115384541A (en) Method and system for driving risk detection

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination