WO2022027894A1 - Driver behavior detection method and apparatus, electronic device, storage medium and program - Google Patents

Driver behavior detection method and apparatus, electronic device, storage medium and program Download PDF

Info

Publication number
WO2022027894A1
WO2022027894A1 PCT/CN2020/135501 CN2020135501W WO2022027894A1 WO 2022027894 A1 WO2022027894 A1 WO 2022027894A1 CN 2020135501 W CN2020135501 W CN 2020135501W WO 2022027894 A1 WO2022027894 A1 WO 2022027894A1
Authority
WO
WIPO (PCT)
Prior art keywords
steering wheel
detection result
human hand
driver
pooling
Prior art date
Application number
PCT/CN2020/135501
Other languages
French (fr)
Chinese (zh)
Inventor
王飞
钱晨
Original Assignee
上海商汤临港智能科技有限公司
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 上海商汤临港智能科技有限公司 filed Critical 上海商汤临港智能科技有限公司
Priority to KR1020227003906A priority Critical patent/KR20220032074A/en
Priority to JP2022523602A priority patent/JP2023500218A/en
Publication of WO2022027894A1 publication Critical patent/WO2022027894A1/en

Links

Images

Classifications

    • BPERFORMING OPERATIONS; TRANSPORTING
    • B60VEHICLES IN GENERAL
    • B60WCONJOINT CONTROL OF VEHICLE SUB-UNITS OF DIFFERENT TYPE OR DIFFERENT FUNCTION; CONTROL SYSTEMS SPECIALLY ADAPTED FOR HYBRID VEHICLES; ROAD VEHICLE DRIVE CONTROL SYSTEMS FOR PURPOSES NOT RELATED TO THE CONTROL OF A PARTICULAR SUB-UNIT
    • B60W40/00Estimation or calculation of non-directly measurable driving parameters for road vehicle drive control systems not related to the control of a particular sub unit, e.g. by using mathematical models
    • B60W40/08Estimation or calculation of non-directly measurable driving parameters for road vehicle drive control systems not related to the control of a particular sub unit, e.g. by using mathematical models related to drivers or passengers
    • B60W40/09Driving style or behaviour
    • BPERFORMING OPERATIONS; TRANSPORTING
    • B60VEHICLES IN GENERAL
    • B60WCONJOINT CONTROL OF VEHICLE SUB-UNITS OF DIFFERENT TYPE OR DIFFERENT FUNCTION; CONTROL SYSTEMS SPECIALLY ADAPTED FOR HYBRID VEHICLES; ROAD VEHICLE DRIVE CONTROL SYSTEMS FOR PURPOSES NOT RELATED TO THE CONTROL OF A PARTICULAR SUB-UNIT
    • B60W30/00Purposes of road vehicle drive control systems not related to the control of a particular sub-unit, e.g. of systems using conjoint control of vehicle sub-units, or advanced driver assistance systems for ensuring comfort, stability and safety or drive control systems for propelling or retarding the vehicle
    • B60W30/08Active safety systems predicting or avoiding probable or impending collision or attempting to minimise its consequences
    • BPERFORMING OPERATIONS; TRANSPORTING
    • B60VEHICLES IN GENERAL
    • B60WCONJOINT CONTROL OF VEHICLE SUB-UNITS OF DIFFERENT TYPE OR DIFFERENT FUNCTION; CONTROL SYSTEMS SPECIALLY ADAPTED FOR HYBRID VEHICLES; ROAD VEHICLE DRIVE CONTROL SYSTEMS FOR PURPOSES NOT RELATED TO THE CONTROL OF A PARTICULAR SUB-UNIT
    • B60W50/00Details of control systems for road vehicle drive control not related to the control of a particular sub-unit, e.g. process diagnostic or vehicle driver interfaces
    • B60W50/08Interaction between the driver and the control system
    • B60W50/14Means for informing the driver, warning the driver or prompting a driver intervention
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • G06F18/241Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • 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
    • 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
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/20Movements or behaviour, e.g. gesture recognition
    • G06V40/28Recognition of hand or arm movements, e.g. recognition of deaf sign language
    • BPERFORMING OPERATIONS; TRANSPORTING
    • B60VEHICLES IN GENERAL
    • B60WCONJOINT CONTROL OF VEHICLE SUB-UNITS OF DIFFERENT TYPE OR DIFFERENT FUNCTION; CONTROL SYSTEMS SPECIALLY ADAPTED FOR HYBRID VEHICLES; ROAD VEHICLE DRIVE CONTROL SYSTEMS FOR PURPOSES NOT RELATED TO THE CONTROL OF A PARTICULAR SUB-UNIT
    • B60W50/00Details of control systems for road vehicle drive control not related to the control of a particular sub-unit, e.g. process diagnostic or vehicle driver interfaces
    • B60W2050/0001Details of the control system
    • B60W2050/0002Automatic control, details of type of controller or control system architecture
    • B60W2050/0004In digital systems, e.g. discrete-time systems involving sampling
    • B60W2050/0005Processor details or data handling, e.g. memory registers or chip architecture
    • BPERFORMING OPERATIONS; TRANSPORTING
    • B60VEHICLES IN GENERAL
    • B60WCONJOINT CONTROL OF VEHICLE SUB-UNITS OF DIFFERENT TYPE OR DIFFERENT FUNCTION; CONTROL SYSTEMS SPECIALLY ADAPTED FOR HYBRID VEHICLES; ROAD VEHICLE DRIVE CONTROL SYSTEMS FOR PURPOSES NOT RELATED TO THE CONTROL OF A PARTICULAR SUB-UNIT
    • B60W50/00Details of control systems for road vehicle drive control not related to the control of a particular sub-unit, e.g. process diagnostic or vehicle driver interfaces
    • B60W50/08Interaction between the driver and the control system
    • B60W50/14Means for informing the driver, warning the driver or prompting a driver intervention
    • B60W2050/143Alarm means

Definitions

  • the present application relates to the technical field of deep learning, and in particular, to a driver behavior detection method, device, electronic device, computer storage medium and computer program.
  • the safe driving of a vehicle is determined by many factors, such as the driver's driving behavior, road conditions, and weather conditions.
  • the embodiments of the present application provide at least one driver behavior detection method, device, electronic device, computer storage medium, and computer program.
  • the embodiment of the present application provides a driver behavior detection method, including:
  • the target detection result is obtained by detecting the to-be-detected image corresponding to the obtained driving position area, and the target detection result includes the steering wheel detection result and the hand detection result, and the driving behavior category of the driver is determined through the target detection result. , and when the driver's driving behavior category is dangerous driving, a warning message is issued to realize the detection of the driver's driving behavior, so as to facilitate the safety reminder to the driver and improve the safety of vehicle driving.
  • the driving behavior category of the driver is determined according to the target detection result, including:
  • the detection result of the steering wheel and the detection result of the human hand determine the positional relationship between the steering wheel and the human hand
  • the driving behavior category of the driver is determined.
  • the driving behavior category of the driver is determined according to the position relationship, including:
  • the driving behavior category of the driver is determined according to the position relationship, including:
  • determining the positional relationship between the steering wheel and the human hand according to the steering wheel detection result and the human hand detection result including:
  • the human hand detection result includes a human hand
  • the detection frame corresponding to the human hand in the human hand detection result and the detection frame corresponding to the steering wheel in the steering wheel detection result have an overlapping area
  • the positional relationship between the human hands is that the driver holds the steering wheel; if there is no overlapping area between the detection frame corresponding to the human hand in the human hand detection result and the detection frame corresponding to the steering wheel in the steering wheel detection result, it is determined that the steering wheel and the The positional relationship between the human hands is that the driver's hands are off the steering wheel.
  • determining the positional relationship between the steering wheel and the human hand according to the steering wheel detection result and the human hand detection result including:
  • the human hand detection result includes two human hands
  • determine the The positional relationship between the steering wheel and the human hand is that the driver's hands are off the steering wheel; if there is an overlapping area between the detection frame corresponding to at least one human hand in the detection result of the human hand and the detection frame corresponding to the steering wheel in the detection result of the steering wheel, determine The positional relationship between the steering wheel and the human hand is that the driver holds the steering wheel.
  • determining the positional relationship between the steering wheel and the human hand according to the steering wheel detection result and the human hand detection result including:
  • each channel feature map in the two-channel classification feature map corresponds to a type of human hand. category;
  • two feature values at the feature positions matching the center point position information are extracted from the classification feature map;
  • the maximum eigenvalue is selected from the value, and the category of the channel feature map corresponding to the maximum eigenvalue in the classification feature map is determined as the category corresponding to the center point position information;
  • the positional relationship between the steering wheel and the human hand is determined.
  • the detection result of the steering wheel is determined, and the classification feature map is generated by performing at least one convolution process on the intermediate feature map, and then combined with the generated center point position information of the driver's hand, the steering wheel and the steering wheel can be more accurately determined.
  • the positional relationship between the hands is determined, and the classification feature map is generated by performing at least one convolution process on the intermediate feature map, and then combined with the generated center point position information of the driver's hand, the steering wheel and the steering wheel can be more accurately determined. The positional relationship between the hands.
  • determining the positional relationship between the steering wheel and the human hand based on the category corresponding to each center point position information indicated by the detection frame information corresponding to the human hand including:
  • the category corresponding to the center point position information is determined as the positional relationship between the steering wheel and the human hand;
  • the detection frame information corresponding to the human hand includes two center point position information
  • the category corresponding to the two center point position information is that the driver's hand is off the steering wheel
  • the positional relationship is that the driver's hands are off the steering wheel; in the categories corresponding to the two center point position information, there is at least one category corresponding to the center point position information is that the driver is holding the steering wheel.
  • the positional relationship between the hands is that the driver holds the steering wheel.
  • the steering wheel detection result includes a steering wheel
  • determining the driving behavior category of the driver according to the target detection result including:
  • the target detection result it is determined that the driving behavior category of the driver is dangerous driving.
  • the image to be detected is detected to obtain a target detection result, including:
  • the converted target channel feature map is subjected to maximum pooling processing to obtain multiple pooling values and the position corresponding to each pooling value in the multiple pooling values. index; the position index is used to identify the position of the pooled value in the converted target channel feature map;
  • target detection frame information based on a plurality of pooling values and a position index corresponding to each of the plurality of pooling values
  • the target detection result is determined according to the target detection frame information.
  • generating the target detection frame information based on multiple pooling values and a position index corresponding to each of the multiple pooling values includes:
  • At least one pooling value is greater than the set pooling threshold value among the plurality of pooling values, based on the plurality of pooling values and the pooling threshold, it is determined from the plurality of pooling values that the The target pooling value of the center point of the target detection frame;
  • the target detection frame information is generated based on the position index corresponding to the target pooling value.
  • the pooling value greater than the pooling threshold among the plurality of pooling values is determined as the target pooling value belonging to the center point of the target detection frame of the steering wheel or the driver's hand, based on the corresponding target pooling value.
  • the position index generates at least one target detection frame information of the steering wheel or the driver's hand more accurately.
  • generating the target detection frame information based on multiple pooling values and a position index corresponding to each of the multiple pooling values includes:
  • the target detection frame information is empty.
  • the embodiment of the present application provides a driver behavior detection device, including:
  • an acquisition module configured to acquire a to-be-detected image of the driving position area in the vehicle cabin
  • a detection module configured to detect the to-be-detected image to obtain a target detection result, where the target detection result includes a steering wheel detection result and a hand detection result;
  • a determining module configured to determine the driving behavior category of the driver according to the target detection result
  • the warning module is configured to issue warning information when the driving behavior category of the driver is dangerous driving.
  • An embodiment of the present application provides an electronic device, including: a processor, a memory, and a bus, where the memory stores machine-readable instructions executable by the processor, and when the electronic device runs, the processor and the memory The machine-readable instructions are executed by the processor to execute the driver behavior detection method according to any one of the above embodiments.
  • An embodiment of the present application provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is run by a processor, the driver behavior detection method described in any of the foregoing embodiments is executed.
  • Embodiments of the present application further provide a computer program, including computer-readable codes.
  • the processor in the electronic device executes the program for implementing the above-mentioned methods in any of the foregoing embodiments.
  • the described driver behavior detection method is not limited to:
  • FIG. 1a shows a schematic diagram of an application scenario of an embodiment of the present application
  • Fig. 1b shows a schematic flowchart of a driver behavior detection method provided by an embodiment of the present application
  • FIG. 2 shows a schematic flowchart of a specific method for detecting an image to be detected and obtaining a target detection result in a driver behavior detection method provided by an embodiment of the present application
  • FIG. 3 shows a schematic structural diagram of a driver behavior detection device provided by an embodiment of the present application
  • FIG. 4 shows a schematic structural diagram of an electronic device provided by an embodiment of the present application.
  • the embodiment of the present application provides a driver behavior detection method.
  • the driver behavior detection method may be performed by a driver behavior detection device, and the driver behavior detection device may be a user equipment (User Equipment, UE), a mobile device, a user terminal, a terminal, a cellular Phone, cordless phone, Personal Digital Assistant (PDA), handheld device, computing device, vehicle-mounted device, wearable device, etc.
  • the method can be implemented by the processor calling the computer-readable instructions stored in the memory .
  • the method can be performed by a server.
  • FIG. 1a is a schematic diagram of an application scenario of the embodiment of the present application, as shown in FIG. 10.
  • Acquire an image to be detected 11 of the driving position area, and the image to be detected 11 includes a steering wheel 110 and a human hand 111; in the driver behavior detection device 10, the steering wheel 110 and the human hand can be obtained by performing processing through the driver behavior detection described in the foregoing embodiment.
  • the driving behavior category of the driver can be determined, and when the driving behavior category of the driver is dangerous driving, the driver behavior detection device 10 issues a warning message, The detection of the driving behavior of the driver is realized, thereby facilitating the safety reminder to the driver and improving the safety of vehicle driving.
  • Fig. 1b is a schematic flowchart of a driver behavior detection method provided by an embodiment of the present application, the method includes S101-S104, wherein:
  • S102 Detect the image to be detected to obtain a target detection result, where the target detection result includes a steering wheel detection result and a human hand detection result.
  • the target detection result is obtained by detecting the acquired image to be detected in the driving position area, and the target detection result includes the steering wheel detection result and the hand detection result, and the driving behavior category of the driver is determined by the target detection result, And when the driver's driving behavior category is dangerous driving, a warning message is issued to realize the detection of the driver's driving behavior, so as to facilitate the safety reminder to the driver and improve the safety of vehicle driving.
  • a camera device may be provided in the vehicle cabin, and an image to be detected of the driving position area may be acquired in real time through the camera device provided in the vehicle cabin.
  • the installation position of the imaging device may be a position where the steering wheel and the driver's seat area in the driving position area can be photographed.
  • the images to be detected may be input into the trained neural network, and the images to be detected are detected respectively to obtain target detection results, wherein the target detection results include steering wheel detection results and human hand detection results.
  • the steering wheel detection result includes the information of whether there is a steering wheel in the image to be detected.
  • the steering wheel detection result includes the detection frame information of the steering wheel
  • the human hand detection result includes the detection frame information of whether there is a human hand in the image to be detected.
  • the hand detection result includes the detection frame information of the hand.
  • the image to be detected is detected to obtain a target detection result, which may include:
  • S202 Perform at least one target convolution process on the intermediate feature map to generate detection feature maps of multiple channels corresponding to the intermediate feature map.
  • S204 perform maximum pooling processing on the converted target channel feature map to obtain multiple pooling values and each pooling value corresponding to the multiple pooling values
  • the position index of ; the position index is used to identify the position of the pooled value in the transformed target channel feature map.
  • the above embodiment obtains multiple pooled values and a position index corresponding to each of the multiple pooled values by performing maximum pooling processing on the target channel feature map, and generates target detection frame information, which is Generating object detection results provides data support.
  • the image to be detected can be input into the trained neural network, and the backbone network in the trained neural network performs multiple convolution processing on the image to be detected to generate an intermediate feature map corresponding to the image to be detected.
  • the structure of the backbone network in the neural network can be set according to actual needs.
  • the intermediate feature map can be input into the steering wheel detection branch network and the hand detection branch network of the neural network respectively, to generate the steering wheel detection result and the human hand detection result.
  • the generation of the steering wheel detection result will be described in detail below.
  • At least one first convolution process may be performed on the intermediate feature map to generate detection feature maps of multiple channels corresponding to the steering wheel, and the number of channels corresponding to the detection feature map may be three channels.
  • the detection feature map includes a first channel feature map representing the position (the first channel feature map is the target channel feature map), a second channel feature map representing the length information of the detection frame, and a feature map representing the width information of the detection frame.
  • the third channel feature map is a first channel feature map representing the position (the first channel feature map is the target channel feature map), a second channel feature map representing the length information of the detection frame, and a feature map representing the width information of the detection frame.
  • the activation function can be used to transform the feature value of the target channel feature map representing the position in the detection feature map of multiple channels to generate the converted target channel feature map.
  • Each feature value in the converted target channel feature map is A numeric value between 0-1.
  • the activation function may be a sigmoid function. For the feature value of any feature point in the converted target channel feature map, if the feature value is closer to 1, the probability that the feature point corresponding to the feature value belongs to the center point of the detection frame of the steering wheel is greater.
  • the maximum pooling process can be performed on the converted target channel feature map to obtain the pooling value corresponding to each feature position in the target channel feature map and each pool.
  • the location index corresponding to the pooled value; the location index can be used to identify the location of the pooled value in the transformed target channel feature map.
  • the same position index in the corresponding position index at each feature position can be merged to obtain the target channel feature map corresponding to multiple pooling values and the position index corresponding to each pooling value in the multiple pooling values.
  • the preset pooling size and pooling step size may be set according to actual needs. For example, the preset pooling size may be 3 ⁇ 3, and the preset pooling step size may be 1.
  • the first detection frame information (ie, target detection frame information) corresponding to the steering wheel may be generated based on the plurality of pooled values and the position index corresponding to each of the plurality of pooled values.
  • a 3 ⁇ 3 maximum pooling process with a step size of 1 may be performed on the target channel feature map; during pooling, for every 3 ⁇ 3 feature points in the target channel feature map
  • the feature value of determine the maximum response value (that is, the pooling value) of the 3 ⁇ 3 feature points and the position index of the maximum response value on the feature map of the target channel.
  • the number of maximum response values is related to the size of the target channel feature map; for example, if the size of the target channel feature map is 80 ⁇ 60 ⁇ 3, the maximum response obtained after the maximum pooling process is performed on the target channel feature map There are 80 ⁇ 60 values in total; and for each maximum response value, there may be at least one other maximum response value with the same position index.
  • the maximum response values with the same position index are combined to obtain M maximum response values and a position index corresponding to each of the M maximum response values.
  • the first detection frame information corresponding to the steering wheel is generated.
  • the process of determining the information of the second detection frame corresponding to the human hand may refer to the process of determining the information of the first detection frame corresponding to the steering wheel, which will not be repeated here.
  • the first detection frame information After obtaining the first detection frame information corresponding to the steering wheel, the first detection frame information may be determined as the steering wheel detection result. When the first detection frame information corresponding to the steering wheel is not obtained, it is determined that the steering wheel detection result does not include the steering wheel. And after obtaining the second detection frame information corresponding to the human hand, the second detection frame information may be determined as the human hand detection result. When the second detection frame information corresponding to the human hand is not obtained, it is determined that the human hand detection result does not include the human hand.
  • generating target detection frame information based on a plurality of pooled values and a position index corresponding to each of the plurality of pooled values may include:
  • Step A1 In the case where at least one pooling value is greater than the set pooling threshold in the multiple pooling values, determine the center of the target detection frame from the multiple pooling values based on the multiple pooling values and the pooling threshold The target pooling value for the point.
  • Step A2 Generate target detection frame information based on the position index corresponding to the target pooling value.
  • a pooling threshold can be set.
  • multiple pooling values are set based on the set pooling threshold.
  • the value is filtered to obtain a target pooling value that is greater than the pooling threshold among the multiple pooling values.
  • there is no target pooling value that is, there is no first detection frame information of the steering wheel.
  • the center point position information of the first detection frame corresponding to the steering wheel may be generated based on the position index corresponding to the target pooling value.
  • the pooling threshold corresponding to the steering wheel and the pooling threshold corresponding to the driver's hand may be the same or different. Specifically, the pooling threshold corresponding to the steering wheel and the pooling threshold corresponding to the driver's hand may be determined according to the actual situation. For example, multi-frame sample images collected by the camera device corresponding to the image to be detected can be obtained, and an adaptive algorithm can be used to generate a pooling threshold corresponding to the steering wheel and a pooling threshold corresponding to the driver's hand according to the collected multi-frame sample images.
  • each of the M maximum response values can be combined with the pooling threshold. Compare; when a certain maximum response value is greater than the pooling threshold, the maximum response value is determined as the target pooling value.
  • the position index corresponding to the target pooling value that is, the position information of the center point of the first detection frame of the steering wheel.
  • a feature matching the center point position information may be selected from the second channel feature map
  • the second feature value at the position, the selected second feature value is determined as the length corresponding to the first detection frame of the steering wheel, and the third channel feature map at the feature position matching the center point position information is selected from the third channel.
  • feature value, and the selected third feature value is determined as the width corresponding to the first detection frame of the steering wheel, and the size information of the first detection frame of the steering wheel is obtained.
  • one or two second detection frame information can be obtained, that is, the second detection frame information corresponding to the left hand and/or the right hand respectively can be obtained.
  • the process of determining the second detection frame information corresponding to the driver's hand reference may be made to the above-mentioned process of determining the first detection frame information of the steering wheel, which will not be repeated here.
  • the pooling value greater than the pooling threshold among the plurality of pooling values is determined as the target pooling value belonging to the center point of the target detection frame of the steering wheel or the driver's hand, based on the corresponding target pooling value.
  • the position index generates at least one target detection frame information of the steering wheel or the driver's hand more accurately.
  • generating target detection frame information based on a plurality of pooling values and a position index corresponding to each of the plurality of pooling values may include: when the plurality of pooling values are less than or When it is equal to the set pooling threshold, it is determined that the target detection frame information is empty.
  • the multiple pooling values corresponding to the steering wheel are less than or equal to the set pooling threshold, it is determined that the first detection frame information of the steering wheel is empty; there is at least one pooling value greater than the set pooling value among the multiple pooling values corresponding to the steering wheel
  • the pooling threshold is , it is determined that the information of the first detection frame of the steering wheel is not empty.
  • the driving behavior category of the driver can be determined based on the steering wheel detection result and the human hand detection result.
  • the driving behavior category of the driver is determined according to the target detection result, which may include:
  • the detection result of the steering wheel and the detection result of the human hand determine the positional relationship between the steering wheel and the human hand
  • the driving behavior category of the driver is determined.
  • the positional relationship between the steering wheel and the human hand can be determined first according to the steering wheel detection result and the human hand detection result, and the driver's driving behavior category can be determined according to the determined positional relationship, that is, whether the driver is driving safely or dangerously.
  • determining the driving behavior category of the driver according to the positional relationship may include: when the positional relationship indicates that the driver is holding the steering wheel, determining that the driving behavior category of the driver is safe drive.
  • the driver's behavior category is safe driving.
  • the case where the driver holds the steering wheel includes the driver holding the steering wheel with the left hand, the driver holding the steering wheel with the right hand, or the driver holding the steering wheel with both hands.
  • determining the driving behavior category of the driver according to the positional relationship may include: when the positional relationship indicates that the driver's hands are off the steering wheel, determining that the driver's driving behavior category is dangerous driving.
  • the category of the driving behavior of the driver is determined to be dangerous driving.
  • determining the driving behavior category of the driver according to the target detection result may include: determining the driver according to the target detection result. is classified as dangerous driving.
  • the driving behavior category of the driver is determined to be abnormal.
  • determining the positional relationship between the steering wheel and the human hand according to the steering wheel detection result and the human hand detection result may include: if the human hand detection result includes a human hand, if the human hand detection result includes a human hand
  • the corresponding detection frame and the detection frame corresponding to the steering wheel in the steering wheel detection result have overlapping areas, and the positional relationship between the steering wheel and the human hand is determined to be that the driver holds the steering wheel; There is no overlapping area in the detection frame corresponding to the steering wheel, and it is determined that the positional relationship between the steering wheel and the human hand is that the driver's hands are off the steering wheel.
  • determining the positional relationship between the steering wheel and the human hand according to the steering wheel detection result and the human hand detection result may include: if the human hand detection result includes two human hands, if two human hands are included in the human hand detection result There is no overlapping area between the detection frame corresponding to only the human hand and the detection frame corresponding to the steering wheel in the steering wheel detection result, and the positional relationship between the steering wheel and the human hand is determined to be that the driver's hands are off the steering wheel; if there is at least one human hand in the human hand detection result. There is an overlapping area between the detection frame and the detection frame corresponding to the steering wheel in the steering wheel detection result, and it is determined that the positional relationship between the steering wheel and the human hand is that the driver holds the steering wheel.
  • the positional relationship between the steering wheel and the human hand can be determined by using the detection frame corresponding to the steering wheel in the steering wheel detection result and the detection frame corresponding to the human hand in the human hand detection result.
  • the positional relationship between the steering wheel and the human hand is determined as holding the steering wheel.
  • a non-overlapping area exists between the detection frame corresponding to the human hand and the detection frame corresponding to the steering wheel, it is determined that the positional relationship between the steering wheel and the human hand is that the hand is disengaged from the steering wheel.
  • the human hand detection result includes two human hands
  • the detection frame corresponding to at least one human hand and the detection frame corresponding to the steering wheel have an overlapping area
  • the positional relationship between the steering wheel and the human hand is determined as holding the steering wheel.
  • the detection frames corresponding to the two hands and the detection frames corresponding to the steering wheel both have non-overlapping regions, it is determined that the positional relationship between the steering wheel and the human hand is that the hand is separated from the steering wheel.
  • determining the positional relationship between the steering wheel and the human hand according to the steering wheel detection result and the human hand detection result may include:
  • an intermediate feature map corresponding to the image to be detected is generated
  • two eigenvalues at the feature positions matching the center point position information are extracted from the classification feature map; the largest eigenvalue is selected from the two eigenvalues , the category of the channel feature map corresponding to the largest feature value in the classification feature map is determined as the category corresponding to the center point position information.
  • the positional relationship between the steering wheel and the human hand is determined.
  • each channel feature map in the two-channel classification feature map corresponds to a category of human hands.
  • the category corresponding to the channel feature map of the 0th channel may be that the driver's hand is off the steering wheel; the category corresponding to the channel feature map of the first channel may be that the driver is holding the steering wheel.
  • two eigenvalues at the feature positions matching the center point position information can be extracted from the classification feature map, and the largest eigenvalue is selected from the two eigenvalues.
  • the category of the channel feature map corresponding to the maximum feature value in the classification feature map is determined as the category corresponding to the center point position information.
  • the detection frame information corresponding to the human hand includes two center point position information (that is, including the center point position information corresponding to the left hand and the center point position information corresponding to the right hand), for each center point position information, determine the center point position information corresponding category.
  • the category corresponding to the channel feature map of the 0th channel can be that the driver's hand is off the steering wheel;
  • the category corresponding to the channel feature map of the first channel can be that the driver is holding the steering wheel, then the center corresponding to the left hand Point position information, two feature values are extracted from the classification feature map, namely 0.8 and 0.2, then the classification feature map, the category of the 0th channel feature map corresponding to 0.8 is determined as the center point position information corresponding to the left hand
  • the category of the center point position information corresponding to the left hand is that the driver's hand is off the steering wheel.
  • the category of the position information of the center point corresponding to the right hand can be obtained.
  • the detection result of the steering wheel is determined, and the classification feature map is generated by performing at least one convolution process on the intermediate feature map, and then combined with the generated center point position information of the driver's hand, the steering wheel and the steering wheel can be more accurately determined.
  • the positional relationship between the hands is determined, and the classification feature map is generated by performing at least one convolution process on the intermediate feature map, and then combined with the generated center point position information of the driver's hand, the steering wheel and the steering wheel can be more accurately determined. The positional relationship between the hands.
  • determining the positional relationship between the steering wheel and the human hand may include:
  • Manner 1 When the detection frame information corresponding to the human hand includes a center point position information, the category corresponding to the center point position information is determined as the positional relationship between the steering wheel and the human hand.
  • Mode 2 When the detection frame information corresponding to the human hand includes two center point position information, and the category corresponding to the two center point position information is that the driver's hand is detached from the steering wheel, it is determined that the positional relationship between the steering wheel and the human hand is driving.
  • the driver's hand is off the steering wheel; in the categories corresponding to the two center point position information, if there is at least one category corresponding to the center point position information is that the driver holds the steering wheel, the positional relationship between the steering wheel and the human hand is determined as the driver's hand. Hold the steering wheel.
  • the position information corresponding to the human hand can be In the detection frame information, the category corresponding to the position information of the center point is determined as the positional relationship between the steering wheel and the human hand.
  • the detection frame information corresponding to the human hand includes the center point position information corresponding to the left hand, and the type of the center point position information corresponding to the left hand is that when the driver holds the steering wheel, the positional relationship between the steering wheel and the human hand is the driver's hand. Hold the steering wheel.
  • the detection frame information corresponding to the human hand includes two center point position information, that is, the detection frame information corresponding to the human hand includes the center point position information corresponding to the left hand and the center point position information corresponding to the right hand, then the two center The categories corresponding to the point position information are all when the driver's hand is off the steering wheel, and the positional relationship between the steering wheel and the human hand is determined to be that the driver's hand is off the steering wheel; the category of the center point position information corresponding to the left hand is that the driver is holding the steering wheel, and/ Or, when the type of the center point position information corresponding to the right hand is when the driver holds the steering wheel, the positional relationship between the steering wheel and the human hand is determined to be that the driver holds the steering wheel.
  • warning information for the driver may be generated based on the driving behavior category of the driver.
  • the warning information can be played in the form of voice.
  • the generated warning message can be "Danger, please hold the steering wheel".
  • the writing order of each step does not mean a strict execution order but constitutes any limitation on the implementation process, and the specific execution order of each step should be based on its function and possible Internal logic is determined.
  • an embodiment of the present application also provides a driver behavior detection device.
  • a schematic structural diagram of a driver behavior detection device provided by an embodiment of the present application includes an acquisition module 301, a detection Module 302, determination module 303, and warning module 304, specifically:
  • the obtaining module 301 is configured to obtain the to-be-detected image corresponding to the driving position area in the vehicle cabin;
  • the detection module 302 is configured to detect the to-be-detected image to obtain a target detection result, where the target detection result includes a steering wheel detection result and a human hand detection result;
  • a determination module 303 configured to determine the driving behavior category of the driver according to the target detection result
  • the warning module 304 is configured to issue warning information when the driving behavior category of the driver is dangerous driving.
  • the determining module 303 determines the driving behavior category of the driver according to the target detection result , the configuration is:
  • the detection result of the steering wheel and the detection result of the human hand determine the positional relationship between the steering wheel and the human hand
  • the driving behavior category of the driver is determined.
  • the determining module 303 when determining the driving behavior category of the driver according to the positional relationship, is configured as follows:
  • the determining module 303 when determining the driving behavior category of the driver according to the positional relationship, is configured as follows:
  • the determining module 303 determines the driving behavior of the driver according to the target detection result category, configure as:
  • the target detection result it is determined that the driving behavior category of the driver is dangerous driving.
  • the detection module 302 when detecting the to-be-detected image to obtain a target detection result, is configured as follows:
  • the converted target channel feature map is subjected to maximum pooling processing to obtain multiple pooling values and the position corresponding to each pooling value in the multiple pooling values. index; the position index is used to identify the position of the pooled value in the converted target channel feature map;
  • target detection frame information based on a plurality of pooling values and a position index corresponding to each of the plurality of pooling values
  • the target detection result is determined according to the target detection frame information.
  • the detection module 302 when generating target detection frame information based on a plurality of pooling values and a position index corresponding to each of the plurality of pooling values, is configured as :
  • determining the pooling value from the plurality of pooling values based on the plurality of pooling values and the pooling threshold The target pooling value of the center point of the target detection frame;
  • the target detection frame information is generated based on the position index corresponding to the target pooling value.
  • the detection module 302 when the detection module 302 generates the target detection frame information based on a plurality of pooling values and a position index corresponding to each pooling value in the plurality of pooling values, Configured as:
  • the target detection frame information is empty.
  • the determining module 303 when determining the positional relationship between the steering wheel and the human hand according to the steering wheel detection result and the human hand detection result, is configured to:
  • the human hand detection result includes a human hand
  • the detection frame corresponding to the human hand in the human hand detection result and the detection frame corresponding to the steering wheel in the steering wheel detection result have an overlapping area
  • the positional relationship between the human hands is that the driver holds the steering wheel; if there is no overlapping area between the detection frame corresponding to the human hand in the human hand detection result and the detection frame corresponding to the steering wheel in the steering wheel detection result, it is determined that the steering wheel and the The positional relationship between the human hands is that the driver's hands are off the steering wheel.
  • the determining module 303 when determining the positional relationship between the steering wheel and the human hand according to the steering wheel detection result and the human hand detection result, is configured to:
  • the human hand detection result includes two human hands
  • determine the The positional relationship between the steering wheel and the human hand is that the driver's hands are off the steering wheel; if there is an overlapping area between the detection frame corresponding to at least one human hand in the detection result of the human hand and the detection frame corresponding to the steering wheel in the detection result of the steering wheel, determine The positional relationship between the steering wheel and the human hand is that the driver holds the steering wheel.
  • the determining module 303 when determining the positional relationship between the steering wheel and the human hand according to the steering wheel detection result and the human hand detection result, is configured to:
  • each channel feature map in the two-channel classification feature map corresponds to a type of human hand. category;
  • two feature values at the feature positions matching the center point position information are extracted from the classification feature map;
  • the maximum eigenvalue is selected from the value, and the category of the channel feature map corresponding to the maximum eigenvalue in the classification feature map is determined as the category corresponding to the center point position information;
  • the positional relationship between the steering wheel and the human hand is determined.
  • the determining module 303 determines the positional relationship between the steering wheel and the human hand based on the category corresponding to each center point position information indicated by the detection frame information corresponding to the human hand, Configured as:
  • the category corresponding to the center point position information is determined as the positional relationship between the steering wheel and the human hand;
  • the detection frame information corresponding to the human hand includes two center point position information
  • the category corresponding to the two center point position information is that the driver's hand is off the steering wheel
  • determine the position between the steering wheel and the human hand The relationship is that the driver's hands are off the steering wheel; in the categories corresponding to the two center point position information, if there is at least one category corresponding to the center point position information is the driver holding the steering wheel, determine the steering wheel and the human hand The positional relationship between them is that the driver holds the steering wheel.
  • the functions or templates included in the apparatuses provided in the embodiments of the present application may be used to execute the methods described in the above method embodiments.
  • a schematic structural diagram of an electronic device provided in an embodiment of the present application includes a processor 401 , a memory 402 , and a bus 403 .
  • the memory 402 is configured to store execution instructions, including the memory 4021 and the external memory 4022; the memory 4021 here is also called internal memory, and is configured to temporarily store the operation data in the processor 401 and the data exchanged with the external memory 4022 such as the hard disk,
  • the processor 401 exchanges data with the external memory 4022 through the memory 4021.
  • the processor 401 communicates with the memory 402 through the bus 403, so that the processor 401 executes the following instructions:
  • the embodiments of the present application also provide a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is run by a processor, the driver behavior detection method described in the above method embodiments is executed A step of.
  • the computer program product of the driver behavior detection method provided by the embodiments of the present application includes a computer-readable storage medium storing program codes, and the instructions included in the program codes can be used to execute the driver behavior described in the above method embodiments.
  • the steps of the detection method reference may be made to the foregoing method embodiments, which will not be repeated here.
  • the units described as separate components may or may not be physically separated, and components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution in this embodiment.
  • each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit.
  • the technical solution of the present application can be embodied in the form of a software product in essence, or the part that contributes to the prior art or the part of the technical solution.
  • the computer software product is stored in a storage medium, including Several instructions are used to cause 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 methods described in the various embodiments of the present application.
  • the aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic disk or optical disk and other media that can store program codes .
  • the embodiment of the present application discloses a driver behavior detection method, device, electronic device, computer storage medium and computer program.
  • the method includes: obtaining a program code for controlling the operation of a first controlled device through a local agent program;
  • the local agent program sends the program code to the first controlled device, so that the first controlled device runs the program code.
  • the program code can be obtained and pushed based on the local agent program, and then the control of the first controlled device can be realized based on the program code, and the program code can be flexibly edited. Control the first controlled device.

Abstract

A driver behavior detection method and apparatus, an electronic device, a computer storage medium and a computer program, the method comprising: acquiring an image to be detected of the driving position area in a vehicle cabin (S101); detecting the image to be detected and obtaining target detection results, which comprise a steering wheel detection result and a human hand detection result (S102); determining a driving behavior type of the driver according to the target detection results (S103); and sending warning information when the driving behavior type of the driver is dangerous driving (S104).

Description

驾驶员行为检测方法、装置、电子设备、存储介质和程序Driver behavior detection method, device, electronic device, storage medium and program
相关申请的交叉引用CROSS-REFERENCE TO RELATED APPLICATIONS
本申请基于申请号为202010790208.3、申请日为2020年08月07日的中国专利申请提出,并要求该中国专利申请的优先权,该中国专利申请的全部内容在此引入本申请作为参考。This application is based on the Chinese patent application with the application number of 202010790208.3 and the filing date of August 7, 2020, and claims the priority of the Chinese patent application. The entire content of the Chinese patent application is incorporated herein by reference.
技术领域technical field
本申请涉及深度学习技术领域,具体而言,涉及一种驾驶员行为检测方法、装置、电子设备、计算机存储介质和计算机程序。The present application relates to the technical field of deep learning, and in particular, to a driver behavior detection method, device, electronic device, computer storage medium and computer program.
背景技术Background technique
随着车辆的快速发展,车辆成为用户出行重要的交通工具,使得车辆安全行驶成为了当前汽车行业的重要课题之一。车辆安全行驶是由多种因素决定,比如,驾驶员的驾驶行为、道路的路况、天气状况等。With the rapid development of vehicles, vehicles have become an important means of transportation for users, making safe driving of vehicles one of the important issues in the current automotive industry. The safe driving of a vehicle is determined by many factors, such as the driver's driving behavior, road conditions, and weather conditions.
一般的,危险的驾驶行为是造成大多数交通事故的主要因素之一。故为了提高行驶的安全性,保障乘客和驾驶员的安全,可以对驾驶员的驾驶行为进行检测。In general, dangerous driving behavior is one of the main factors that cause most traffic accidents. Therefore, in order to improve the driving safety and ensure the safety of the passengers and the driver, the driving behavior of the driver can be detected.
发明内容SUMMARY OF THE INVENTION
本申请实施例至少提供一种驾驶员行为检测方法、装置、电子设备、计算机存储介质和计算机程序。The embodiments of the present application provide at least one driver behavior detection method, device, electronic device, computer storage medium, and computer program.
本申请实施例提供了一种驾驶员行为检测方法,包括:The embodiment of the present application provides a driver behavior detection method, including:
获取车舱内的驾驶位置区域的待检测图像;Obtain the to-be-detected image of the driving position area in the cabin;
对所述待检测图像进行检测,得到目标检测结果,所述目标检测结果包括方向盘检测结果和人手检测结果;Detecting the to-be-detected image to obtain a target detection result, where the target detection result includes a steering wheel detection result and a human hand detection result;
根据所述目标检测结果,确定驾驶员的驾驶行为类别;According to the target detection result, determine the driving behavior category of the driver;
在所述驾驶员的驾驶行为类别为危险驾驶时,发出警示信息。When the driving behavior category of the driver is dangerous driving, a warning message is issued.
采用上述方法,通过对获取的驾驶位置区域对应的待检测图像进行检测,得到目标检测结果,该目标检测结果中包括方向盘检测结果和人手检测结果,通过目标检测结果,确定驾驶员的驾驶行为类别,并在驾驶员的驾驶行为类别为危险驾驶时,发出警示信息, 实现了对驾驶员的驾驶行为的检测,从而方便对驾驶员进行安全提醒,提高车辆驾驶的安全性。Using the above method, the target detection result is obtained by detecting the to-be-detected image corresponding to the obtained driving position area, and the target detection result includes the steering wheel detection result and the hand detection result, and the driving behavior category of the driver is determined through the target detection result. , and when the driver's driving behavior category is dangerous driving, a warning message is issued to realize the detection of the driver's driving behavior, so as to facilitate the safety reminder to the driver and improve the safety of vehicle driving.
在本申请一些实施例中,在所述方向盘检测结果中包括方向盘,所述人手检测结果中包括人手时,根据所述目标检测结果,确定驾驶员的驾驶行为类别,包括:In some embodiments of the present application, when the steering wheel detection result includes a steering wheel, and the human hand detection result includes a human hand, the driving behavior category of the driver is determined according to the target detection result, including:
根据所述方向盘检测结果和所述人手检测结果,确定方向盘与人手之间的位置关系;According to the detection result of the steering wheel and the detection result of the human hand, determine the positional relationship between the steering wheel and the human hand;
根据所述位置关系,确定驾驶员的驾驶行为类别。According to the position relationship, the driving behavior category of the driver is determined.
在本申请一些实施例中,根据位置关系,确定驾驶员的驾驶行为类别,包括:In some embodiments of the present application, the driving behavior category of the driver is determined according to the position relationship, including:
在所述位置关系指示驾驶员手握方向盘的情况下,确定所述驾驶员的驾驶行为类别为安全驾驶。When the positional relationship indicates that the driver is holding the steering wheel, it is determined that the driving behavior category of the driver is safe driving.
在本申请一些实施例中,根据位置关系,确定驾驶员的驾驶行为类别,包括:In some embodiments of the present application, the driving behavior category of the driver is determined according to the position relationship, including:
在所述位置关系指示驾驶员双手脱离方向盘的情况下,确定所述驾驶员的驾驶行为类别为危险驾驶。When the positional relationship indicates that the driver's hands are off the steering wheel, it is determined that the driver's driving behavior is classified as dangerous driving.
在本申请一些实施例中,根据所述方向盘检测结果和所述人手检测结果,确定方向盘与人手之间的位置关系,包括:In some embodiments of the present application, determining the positional relationship between the steering wheel and the human hand according to the steering wheel detection result and the human hand detection result, including:
在所述人手检测结果中包括一只人手的情况下,若所述人手检测结果中人手对应的检测框、与所述方向盘检测结果中方向盘对应的检测框存在重合区域,确定所述方向盘与所述人手之间的位置关系为驾驶员手握方向盘;若所述人手检测结果中人手对应的检测框与所述方向盘检测结果中方向盘对应的检测框不存在重合区域,确定所述方向盘与所述人手之间的位置关系为驾驶员双手脱离方向盘。In the case where the human hand detection result includes a human hand, if the detection frame corresponding to the human hand in the human hand detection result and the detection frame corresponding to the steering wheel in the steering wheel detection result have an overlapping area, it is determined that the steering wheel and the detection frame corresponding to the steering wheel in the steering wheel detection result overlap. The positional relationship between the human hands is that the driver holds the steering wheel; if there is no overlapping area between the detection frame corresponding to the human hand in the human hand detection result and the detection frame corresponding to the steering wheel in the steering wheel detection result, it is determined that the steering wheel and the The positional relationship between the human hands is that the driver's hands are off the steering wheel.
在本申请一些实施例中,根据所述方向盘检测结果和所述人手检测结果,确定方向盘与人手之间的位置关系,包括:In some embodiments of the present application, determining the positional relationship between the steering wheel and the human hand according to the steering wheel detection result and the human hand detection result, including:
在所述人手检测结果中包括两只人手的情况下,若所述人手检测结果中两只人手对应的检测框分别与所述方向盘检测结果中方向盘对应的检测框不存在重合区域,确定所述方向盘与所述人手之间的位置关系为驾驶员双手脱离方向盘;若所述人手检测结果中存在至少一只人手对应的检测框与所述方向盘检测结果中方向盘对应的检测框存在重合区域,确定所述方向盘与所述人手之间的位置关系为驾驶员手握方向盘。In the case where the human hand detection result includes two human hands, if there is no overlapping area between the detection frames corresponding to the two human hands in the human hand detection result and the detection frame corresponding to the steering wheel in the steering wheel detection result, determine the The positional relationship between the steering wheel and the human hand is that the driver's hands are off the steering wheel; if there is an overlapping area between the detection frame corresponding to at least one human hand in the detection result of the human hand and the detection frame corresponding to the steering wheel in the detection result of the steering wheel, determine The positional relationship between the steering wheel and the human hand is that the driver holds the steering wheel.
在本申请一些实施例中,根据所述方向盘检测结果和所述人手检测结果,确定方向盘与人手之间的位置关系,包括:In some embodiments of the present application, determining the positional relationship between the steering wheel and the human hand according to the steering wheel detection result and the human hand detection result, including:
基于所述待检测图像,生成所述待检测图像对应的中间特征图;generating an intermediate feature map corresponding to the to-be-detected image based on the to-be-detected image;
对所述中间特征图进行至少一次卷积处理,生成所述中间特征图对应的二通道的分类特征图;其中,所述二通道的分类特征图中的每个通道特征图对应一种人手的类别;Perform at least one convolution process on the intermediate feature map to generate a two-channel classification feature map corresponding to the intermediate feature map; wherein, each channel feature map in the two-channel classification feature map corresponds to a type of human hand. category;
基于所述人手检测结果中人手对应的检测框信息指示的中心点位置信息,从所述分类特征图中提取与所述中心点位置信息匹配的特征位置处的两个特征值;从两个特征值中选取最大特征值,将所述分类特征图中,与所述最大特征值对应的通道特征图的类别,确定为所述中心点位置信息对应的类别;Based on the center point position information indicated by the detection frame information corresponding to the human hand in the hand detection result, two feature values at the feature positions matching the center point position information are extracted from the classification feature map; The maximum eigenvalue is selected from the value, and the category of the channel feature map corresponding to the maximum eigenvalue in the classification feature map is determined as the category corresponding to the center point position information;
基于所述人手对应的检测框信息指示的每个中心点位置信息对应的类别,确定所述方向盘与人手之间的位置关系。Based on the category corresponding to each center point position information indicated by the detection frame information corresponding to the human hand, the positional relationship between the steering wheel and the human hand is determined.
上述实施方式中,确定了方向盘检测结果,以及通过对中间特征图进行至少一次卷积处理,生成分类特征图,再结合生成的驾驶员手部的中心点位置信息,可以较准确的确定方向盘与人手之间的位置关系。In the above embodiment, the detection result of the steering wheel is determined, and the classification feature map is generated by performing at least one convolution process on the intermediate feature map, and then combined with the generated center point position information of the driver's hand, the steering wheel and the steering wheel can be more accurately determined. The positional relationship between the hands.
在本申请一些实施例中,基于所述人手对应的检测框信息指示的每个中心点位置信息对应的类别,确定所述方向盘与人手之间的位置关系,包括:In some embodiments of the present application, determining the positional relationship between the steering wheel and the human hand based on the category corresponding to each center point position information indicated by the detection frame information corresponding to the human hand, including:
在所述人手对应的检测框信息中包括一个中心点位置信息的情况下,将所述中心点位置信息对应的类别,确定为方向盘与人手之间的位置关系;In the case that the detection frame information corresponding to the human hand includes a center point position information, the category corresponding to the center point position information is determined as the positional relationship between the steering wheel and the human hand;
在所述人手对应的检测框信息中包括两个中心点位置信息、且所述两个中心点位置信息对应的类别为驾驶员手脱离方向盘的情况下,确定所述方向盘与所述人手之间的位置关系为驾驶员双手脱离方向盘;在所述两个中心点位置信息对应的类别中,存在至少一个中心点位置信息对应的类别为驾驶员手握方向盘的情况下,确定所述方向盘与所述人手之间的位置关系为驾驶员手握方向盘。In the case that the detection frame information corresponding to the human hand includes two center point position information, and the category corresponding to the two center point position information is that the driver's hand is off the steering wheel, determine the distance between the steering wheel and the human hand. The positional relationship is that the driver's hands are off the steering wheel; in the categories corresponding to the two center point position information, there is at least one category corresponding to the center point position information is that the driver is holding the steering wheel. The positional relationship between the hands is that the driver holds the steering wheel.
在本申请一些实施例中,在所述方向盘检测结果中包括方向盘,所述人手检测结果中未包括人手时,根据所述目标检测结果,确定驾驶员的驾驶行为类别,包括:In some embodiments of the present application, the steering wheel detection result includes a steering wheel, and when the human hand detection result does not include a human hand, determining the driving behavior category of the driver according to the target detection result, including:
根据所述目标检测结果,确定所述驾驶员的驾驶行为类别为危险驾驶。According to the target detection result, it is determined that the driving behavior category of the driver is dangerous driving.
在本申请一些实施例中,对所述待检测图像进行检测,得到目标检测结果,包括:In some embodiments of the present application, the image to be detected is detected to obtain a target detection result, including:
基于所述待检测图像,生成所述待检测图像对应的中间特征图;generating an intermediate feature map corresponding to the to-be-detected image based on the to-be-detected image;
对所述中间特征图进行至少一次目标卷积处理,生成所述中间特征图对应的多个通道的检测特征图;Perform at least one target convolution process on the intermediate feature map to generate detection feature maps of multiple channels corresponding to the intermediate feature map;
利用激活函数对多个通道的所述检测特征图中表征位置的目标通道特征图的每个特征值进行特征值转换处理,生成转换后的目标通道特征图;Using the activation function to perform feature value conversion processing on each feature value of the target channel feature map representing the position in the detection feature maps of multiple channels, to generate a converted target channel feature map;
按照预设的池化尺寸和池化步长,对转换后的目标通道特征图进行最大池化处理,得到多个池化值以及与多个池化值中的每个池化值对应的位置索引;所述位置索引用于标识所述池化值在所述转换后的目标通道特征图中的位置;According to the preset pooling size and pooling step size, the converted target channel feature map is subjected to maximum pooling processing to obtain multiple pooling values and the position corresponding to each pooling value in the multiple pooling values. index; the position index is used to identify the position of the pooled value in the converted target channel feature map;
基于多个池化值以及与多个池化值中的每个池化值对应的位置索引,生成目标检测框信息;generating target detection frame information based on a plurality of pooling values and a position index corresponding to each of the plurality of pooling values;
根据所述目标检测框信息,确定所述目标检测结果。The target detection result is determined according to the target detection frame information.
上述实施方式下,通过对目标通道特征图进行最大池化处理,得到了多个池化值以及与多个池化值中的每个池化值对应的位置索引,并生成了目标检测框信息,为生成目标检测结果提供了数据支持。In the above embodiment, by performing maximum pooling on the target channel feature map, a plurality of pooled values and a position index corresponding to each of the plurality of pooled values are obtained, and target detection frame information is generated. , which provides data support for generating target detection results.
在本申请一些实施例中,所述基于多个池化值以及与多个池化值中的每个池化值对应的位置索引,生成所述目标检测框信息,包括:In some embodiments of the present application, generating the target detection frame information based on multiple pooling values and a position index corresponding to each of the multiple pooling values includes:
在所述多个池化值中存在至少一个池化值大于设置的池化阈值的情况下,基于所述多个池化值以及池化阈值,从所述多个池化值中确定属于所述目标检测框的中心点的目标池化值;In the case where at least one pooling value is greater than the set pooling threshold value among the plurality of pooling values, based on the plurality of pooling values and the pooling threshold, it is determined from the plurality of pooling values that the The target pooling value of the center point of the target detection frame;
基于所述目标池化值对应的位置索引,生成所述目标检测框信息。The target detection frame information is generated based on the position index corresponding to the target pooling value.
上述实施方式中,将多个池化值中大于池化阈值的池化值,确定为属于方向盘或驾驶员手部的目标检测框的中心点的目标池化值,基于目标池化值对应的位置索引,较准确的生成了方向盘或驾驶员手部的至少一个目标检测框信息。In the above embodiment, the pooling value greater than the pooling threshold among the plurality of pooling values is determined as the target pooling value belonging to the center point of the target detection frame of the steering wheel or the driver's hand, based on the corresponding target pooling value. The position index generates at least one target detection frame information of the steering wheel or the driver's hand more accurately.
在本申请一些实施例中,所述基于多个池化值以及与多个池化值中的每个池化值对应的位置索引,生成所述目标检测框信息,包括:In some embodiments of the present application, generating the target detection frame information based on multiple pooling values and a position index corresponding to each of the multiple pooling values includes:
在所述多个池化值小于或等于设置的池化阈值的情况下,确定所述目标检测框信息为空。In the case that the multiple pooling values are less than or equal to the set pooling threshold, it is determined that the target detection frame information is empty.
以下装置、电子设备等的效果描述参见上述方法的说明,这里不再赘述。For descriptions of the effects of the following apparatuses, electronic devices, etc., reference may be made to the descriptions of the above-mentioned methods, which will not be repeated here.
本申请实施例提供了一种驾驶员行为检测装置,包括:The embodiment of the present application provides a driver behavior detection device, including:
获取模块,配置为获取车舱内的驾驶位置区域的待检测图像;an acquisition module, configured to acquire a to-be-detected image of the driving position area in the vehicle cabin;
检测模块,配置为对所述待检测图像进行检测,得到目标检测结果,所述目标检测 结果包括方向盘检测结果和人手检测结果;a detection module, configured to detect the to-be-detected image to obtain a target detection result, where the target detection result includes a steering wheel detection result and a hand detection result;
确定模块,配置为根据所述目标检测结果,确定驾驶员的驾驶行为类别;a determining module, configured to determine the driving behavior category of the driver according to the target detection result;
警示模块,配置为在所述驾驶员的驾驶行为类别为危险驾驶时,发出警示信息。The warning module is configured to issue warning information when the driving behavior category of the driver is dangerous driving.
本申请实施例提供一种电子设备,包括:处理器、存储器和总线,所述存储器存储有所述处理器可执行的机器可读指令,当电子设备运行时,所述处理器与所述存储器之间通过总线通信,所述机器可读指令被所述处理器执行时执行如上述任一实施方式所述的驾驶员行为检测方法。An embodiment of the present application provides an electronic device, including: a processor, a memory, and a bus, where the memory stores machine-readable instructions executable by the processor, and when the electronic device runs, the processor and the memory The machine-readable instructions are executed by the processor to execute the driver behavior detection method according to any one of the above embodiments.
本申请实施例提供一种计算机可读存储介质,该计算机可读存储介质上存储有计算机程序,该计算机程序被处理器运行时执行如上述任一实施方式所述的驾驶员行为检测方法。An embodiment of the present application provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is run by a processor, the driver behavior detection method described in any of the foregoing embodiments is executed.
本申请实施例还提供了一种计算机程序,包括计算机可读代码,当所述计算机可读代码在电子设备中运行时,所述电子设备中的处理器执行用于实现上述任一实施方式所述的驾驶员行为检测方法。Embodiments of the present application further provide a computer program, including computer-readable codes. When the computer-readable codes are executed in an electronic device, the processor in the electronic device executes the program for implementing the above-mentioned methods in any of the foregoing embodiments. The described driver behavior detection method.
为使本申请的上述目的、特征和优点能更明显易懂,下文特举较佳实施例,并配合所附附图,作详细说明如下。In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, the preferred embodiments are exemplified below, and are described in detail as follows in conjunction with the accompanying drawings.
附图说明Description of drawings
为了更清楚地说明本申请实施例的技术方案,下面将对实施例中所需要使用的附图作简单地介绍,此处的附图被并入说明书中并构成本说明书中的一部分,这些附图示出了符合本申请的实施例,并与说明书一起用于说明本申请的技术方案。应当理解,以下附图仅示出了本申请的某些实施例,因此不应被看作是对范围的限定,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他相关的附图。In order to explain the technical solutions of the embodiments of the present application more clearly, the following briefly introduces the accompanying drawings that need to be used in the embodiments. The drawings here are incorporated into the specification and constitute a part of the specification. The drawings illustrate embodiments consistent with the present application, and together with the description, are used to illustrate the technical solutions of the present application. It should be understood that the following drawings only show some embodiments of the present application, and therefore should not be regarded as a limitation of the scope. Other related figures are obtained from these figures.
图1a示出了本申请实施例的一个应用场景的示意图;FIG. 1a shows a schematic diagram of an application scenario of an embodiment of the present application;
图1b示出了本申请实施例所提供的一种驾驶员行为检测方法的流程示意图;Fig. 1b shows a schematic flowchart of a driver behavior detection method provided by an embodiment of the present application;
图2示出了本申请实施例所提供的一种驾驶员行为检测方法中,对待检测图像进行检测,得到目标检测结果的具体方法的流程示意图;2 shows a schematic flowchart of a specific method for detecting an image to be detected and obtaining a target detection result in a driver behavior detection method provided by an embodiment of the present application;
图3示出了本申请实施例所提供的一种驾驶员行为检测装置的架构示意图;FIG. 3 shows a schematic structural diagram of a driver behavior detection device provided by an embodiment of the present application;
图4示出了本申请实施例所提供的一种电子设备的结构示意图。FIG. 4 shows a schematic structural diagram of an electronic device provided by an embodiment of the present application.
具体实施方式detailed description
为使本申请实施例的目的、技术方案和优点更加清楚,下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。通常在此处附图中描述和示出的本申请实施例的组件可以以各种不同的配置来布置和设计。因此,以下对在附图中提供的本申请的实施例的详细描述并非旨在限制要求保护的本申请的范围,而是仅仅表示本申请的选定实施例。基于本申请的实施例,本领域技术人员在没有做出创造性劳动的前提下所获得的所有其他实施例,都属于本申请保护的范围。In order to make the purposes, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments It is only a part of the embodiments of the present application, but not all of the embodiments. The components of the embodiments of the present application generally described and illustrated in the drawings herein may be arranged and designed in a variety of different configurations. Thus, the following detailed description of the embodiments of the application provided in the accompanying drawings is not intended to limit the scope of the application as claimed, but is merely representative of selected embodiments of the application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without creative work fall within the protection scope of the present application.
考虑到,危险的驾驶行为是造成大多数交通事故的主要因素之一。故为了提高行驶的安全性,保障乘客和驾驶员的安全,可以对驾驶员的驾驶行为进行检测。故为了解决上述问题,本申请实施例提供了一种驾驶员行为检测方法。Consider that risky driving behavior is one of the main factors that cause most traffic accidents. Therefore, in order to improve the driving safety and ensure the safety of the passengers and the driver, the driving behavior of the driver can be detected. Therefore, in order to solve the above problem, the embodiment of the present application provides a driver behavior detection method.
为便于对本申请实施例进行理解,首先对本申请实施例所公开的一种驾驶员行为检测方法进行详细介绍。To facilitate understanding of the embodiments of the present application, a driver behavior detection method disclosed in the embodiments of the present application is first introduced in detail.
在本申请的一些实施例中,所述驾驶员行为检测方法可以由驾驶员行为检测装置执行,驾驶员行为检测装置可以是用户设备(User Equipment,UE)、移动设备、用户终端、终端、蜂窝电话、无绳电话、个人数字处理(Personal Digital Assistant,PDA)、手持设备、计算设备、车载设备、可穿戴设备等,所述方法可以通过处理器调用存储器中存储的计算机可读指令的方式来实现。或者,可通过服务器执行该方法。In some embodiments of the present application, the driver behavior detection method may be performed by a driver behavior detection device, and the driver behavior detection device may be a user equipment (User Equipment, UE), a mobile device, a user terminal, a terminal, a cellular Phone, cordless phone, Personal Digital Assistant (PDA), handheld device, computing device, vehicle-mounted device, wearable device, etc., the method can be implemented by the processor calling the computer-readable instructions stored in the memory . Alternatively, the method can be performed by a server.
下面结合一个应用场景对本申请进行进一步说明。The present application will be further described below with reference to an application scenario.
本申请实施例的驾驶员行为检测方法,能够应用于进行驾驶员行驶等应用场景中;图1a为本申请实施例的一个应用场景的示意图,如图1a所示,可以通过驾驶员行为检测装置10获取驾驶位置区域的待检测图像11,待检测图像11包括方向盘110和人手111;在驾驶员行为检测装置10中,通过前述实施例记载的驾驶员行为检测进行处理,可以得到方向盘110和人手111的检测结果;进一步的,根据方向盘110和人手111的检测结果,可以确定驾驶员的驾驶行为类别,并在驾驶员的驾驶行为类别为危险驾驶时,驾驶员行为检测装置10发出警示信息,实现了对驾驶员的驾驶行为的检测,从而方便 对驾驶员进行安全提醒,提高车辆驾驶的安全性。The driver behavior detection method of the embodiment of the present application can be applied to application scenarios such as driver driving; FIG. 1a is a schematic diagram of an application scenario of the embodiment of the present application, as shown in FIG. 10. Acquire an image to be detected 11 of the driving position area, and the image to be detected 11 includes a steering wheel 110 and a human hand 111; in the driver behavior detection device 10, the steering wheel 110 and the human hand can be obtained by performing processing through the driver behavior detection described in the foregoing embodiment. 111; further, according to the detection results of the steering wheel 110 and the human hand 111, the driving behavior category of the driver can be determined, and when the driving behavior category of the driver is dangerous driving, the driver behavior detection device 10 issues a warning message, The detection of the driving behavior of the driver is realized, thereby facilitating the safety reminder to the driver and improving the safety of vehicle driving.
参见图1b所示,为本申请实施例所提供的一种驾驶员行为检测方法的流程示意图,该方法包括S101-S104,其中:Referring to Fig. 1b, which is a schematic flowchart of a driver behavior detection method provided by an embodiment of the present application, the method includes S101-S104, wherein:
S101,获取车舱内的驾驶位置区域的待检测图像。S101, acquiring an image to be detected of a driving position area in the vehicle cabin.
S102,对待检测图像进行检测,得到目标检测结果,目标检测结果包括方向盘检测结果和人手检测结果。S102: Detect the image to be detected to obtain a target detection result, where the target detection result includes a steering wheel detection result and a human hand detection result.
S103,根据所述目标检测结果,确定驾驶员的驾驶行为类别。S103: Determine the driving behavior category of the driver according to the target detection result.
S104,在驾驶员的驾驶行为类别为危险驾驶时,发出警示信息。S104, when the driving behavior category of the driver is dangerous driving, a warning message is issued.
上述方法中,通过对获取的驾驶位置区域的待检测图像进行检测,得到目标检测结果,该目标检测结果中包括方向盘检测结果和人手检测结果,通过目标检测结果,确定驾驶员的驾驶行为类别,并在驾驶员的驾驶行为类别为危险驾驶时,发出警示信息,实现了对驾驶员的驾驶行为的检测,从而方便对驾驶员进行安全提醒,提高车辆驾驶的安全性。In the above method, the target detection result is obtained by detecting the acquired image to be detected in the driving position area, and the target detection result includes the steering wheel detection result and the hand detection result, and the driving behavior category of the driver is determined by the target detection result, And when the driver's driving behavior category is dangerous driving, a warning message is issued to realize the detection of the driver's driving behavior, so as to facilitate the safety reminder to the driver and improve the safety of vehicle driving.
针对S101:For S101:
这里,可以在车舱内设置摄像设备,通过车舱内设置的摄像设备实时获取驾驶位置区域的待检测图像。其中,该摄像设备的安装位置可以为能够拍摄到驾驶位置区域中方向盘和驾驶员座位区域的位置。Here, a camera device may be provided in the vehicle cabin, and an image to be detected of the driving position area may be acquired in real time through the camera device provided in the vehicle cabin. Wherein, the installation position of the imaging device may be a position where the steering wheel and the driver's seat area in the driving position area can be photographed.
针对S102以及S103:For S102 and S103:
这里,可以将待检测图像输入至训练后的神经网络中,对待检测图像分别进行检测,得到目标检测结果,其中,目标检测结果包括方向盘检测结果和人手检测结果。方向盘检测结果包括待检测图像中是否存在方向盘的信息,在存在方向盘时,方向盘检测结果中包括方向盘的检测框信息;人手检测结果包括待检测图像中是否存在人手的检测框的信息;在存在人手时,人手检测结果中包括人手的检测框信息。Here, the images to be detected may be input into the trained neural network, and the images to be detected are detected respectively to obtain target detection results, wherein the target detection results include steering wheel detection results and human hand detection results. The steering wheel detection result includes the information of whether there is a steering wheel in the image to be detected. When there is a steering wheel, the steering wheel detection result includes the detection frame information of the steering wheel; the human hand detection result includes the detection frame information of whether there is a human hand in the image to be detected. , the hand detection result includes the detection frame information of the hand.
一种可选实施方式中,参见图2所示,对待检测图像进行检测,得到目标检测结果,可以包括:In an optional embodiment, as shown in FIG. 2 , the image to be detected is detected to obtain a target detection result, which may include:
S201,基于待检测图像,生成待检测图像对应的中间特征图。S201 , based on the image to be detected, generate an intermediate feature map corresponding to the image to be detected.
S202,对中间特征图进行至少一次目标卷积处理,生成中间特征图对应的多个通道的检测特征图。S202: Perform at least one target convolution process on the intermediate feature map to generate detection feature maps of multiple channels corresponding to the intermediate feature map.
S203,利用激活函数对多个通道的检测特征图中表征位置的目标通道特征图的每个特征值进行特征值转换处理,生成转换后的目标通道特征图。S203 , using an activation function to perform feature value conversion processing on each feature value of the target channel feature map representing the position in the detection feature maps of the multiple channels, to generate a converted target channel feature map.
S204,按照预设的池化尺寸和池化步长,对转换后的目标通道特征图进行最大池化处理,得到多个池化值以及与多个池化值中的每个池化值对应的位置索引;位置索引用于标识池化值在转换后的目标通道特征图中的位置。S204, according to the preset pooling size and pooling step size, perform maximum pooling processing on the converted target channel feature map to obtain multiple pooling values and each pooling value corresponding to the multiple pooling values The position index of ; the position index is used to identify the position of the pooled value in the transformed target channel feature map.
S205,基于多个池化值以及与多个池化值中的每个池化值对应的位置索引,生成目标检测框信息。S205 , generating target detection frame information based on the plurality of pooling values and a position index corresponding to each of the plurality of pooling values.
S206,根据目标检测框信息,确定目标检测结果。S206: Determine the target detection result according to the target detection frame information.
上述实施方式通过对目标通道特征图进行最大池化处理,得到了多个池化值以及与多个池化值中的每个池化值对应的位置索引,并生成了目标检测框信息,为生成目标检测结果提供了数据支持。The above embodiment obtains multiple pooled values and a position index corresponding to each of the multiple pooled values by performing maximum pooling processing on the target channel feature map, and generates target detection frame information, which is Generating object detection results provides data support.
可以将待检测图像输入至训练后的神经网络中,训练后的神经网络中的骨干网络对待检测图像进行多次卷积处理,生成待检测图像对应的中间特征图。其中,神经网络中骨干网络的结构可以根据实际需要进行设置。The image to be detected can be input into the trained neural network, and the backbone network in the trained neural network performs multiple convolution processing on the image to be detected to generate an intermediate feature map corresponding to the image to be detected. Among them, the structure of the backbone network in the neural network can be set according to actual needs.
这里,可以将中间特征图分别输入至神经网络的方向盘检测分支网络和手部检测分支网络中,生成方向盘检测结果和人手检测结果。下述对生成方向盘检测结果进行详细说明。Here, the intermediate feature map can be input into the steering wheel detection branch network and the hand detection branch network of the neural network respectively, to generate the steering wheel detection result and the human hand detection result. The generation of the steering wheel detection result will be described in detail below.
这里,可以先对中间特征图进行至少一次第一卷积处理(即目标卷积处理),生成方向盘对应的多个通道的检测特征图,该检测特征图对应的通道数可以为三通道。其中,该检测特征图中包括表征位置的第一通道特征图(该第一通道特征图即为目标通道特征图)、表征检测框长度信息的第二通道特征图、以及表征检测框宽度信息的第三通道特征图。Here, at least one first convolution process (ie, target convolution process) may be performed on the intermediate feature map to generate detection feature maps of multiple channels corresponding to the steering wheel, and the number of channels corresponding to the detection feature map may be three channels. The detection feature map includes a first channel feature map representing the position (the first channel feature map is the target channel feature map), a second channel feature map representing the length information of the detection frame, and a feature map representing the width information of the detection frame. The third channel feature map.
再可以利用激活函数对多个通道的检测特征图中表征位置的目标通道特征图进行特征值转换处理,生成转换后的目标通道特征图,转换后的目标通道特征图中每个特征值均为0-1之间的数值。其中,该激活函数可以为sigmoid函数。针对转换后的目标通道特征图中的任一特征点的特征值,若该特征值越趋向于1,则该特征值对应的特征点属于方向盘的检测框的中心点的概率也就越大。Then, the activation function can be used to transform the feature value of the target channel feature map representing the position in the detection feature map of multiple channels to generate the converted target channel feature map. Each feature value in the converted target channel feature map is A numeric value between 0-1. Wherein, the activation function may be a sigmoid function. For the feature value of any feature point in the converted target channel feature map, if the feature value is closer to 1, the probability that the feature point corresponding to the feature value belongs to the center point of the detection frame of the steering wheel is greater.
接着,可以按照预设的池化尺寸和池化步长,对转换后的目标通道特征图进行最大 池化处理,得到目标通道特征图中每个特征位置处对应的池化值和每个池化值对应的位置索引;位置索引可以用于标识池化值在转换后的目标通道特征图中的位置。进而可以将每个特征位置处对应的位置索引中,相同的位置索引进行合并处理,得到该目标通道特征图对应多个池化值和多个池化值中每个池化值对应的位置索引。其中,预设的池化尺寸和池化步长可以根据实际需要进行设置,比如,预设的池化尺寸可以为3×3,预设的池化步长可以为1。Then, according to the preset pooling size and pooling step size, the maximum pooling process can be performed on the converted target channel feature map to obtain the pooling value corresponding to each feature position in the target channel feature map and each pool. The location index corresponding to the pooled value; the location index can be used to identify the location of the pooled value in the transformed target channel feature map. Then, the same position index in the corresponding position index at each feature position can be merged to obtain the target channel feature map corresponding to multiple pooling values and the position index corresponding to each pooling value in the multiple pooling values. . The preset pooling size and pooling step size may be set according to actual needs. For example, the preset pooling size may be 3×3, and the preset pooling step size may be 1.
进而,可以基于多个池化值以及多个池化值中每个池化值对应的位置索引,生成方向盘对应的第一检测框信息(即目标检测框信息)。Furthermore, the first detection frame information (ie, target detection frame information) corresponding to the steering wheel may be generated based on the plurality of pooled values and the position index corresponding to each of the plurality of pooled values.
在本申请的一些实施例中,可以对目标通道特征图进行3×3,且步长为1的最大池化处理;在池化时,针对每3×3个特征点在目标通道特征图中的特征值,确定3×3个特征点的最大响应值(即池化值)及最大响应值在目标通道特征图上的位置索引。此时,最大响应值的数量与目标通道特征图的尺寸相关;例如若目标通道特征图的尺寸为80×60×3,则在对目标通道特征图进行最大池化处理后,得到的最大响应值共80×60个;且对于每个最大响应值,都可能存在至少一个其他最大响应值与其位置索引相同。然后将位置索引相同的最大响应值合并,得到M个最大响应值,以及M个最大响应值中每个最大响应值对应的位置索引。最后,基于M个最大响应值(池化值)以及每个最大响应值对应的位置索引,生成方向盘对应的第一检测框信息。In some embodiments of the present application, a 3×3 maximum pooling process with a step size of 1 may be performed on the target channel feature map; during pooling, for every 3×3 feature points in the target channel feature map The feature value of , determine the maximum response value (that is, the pooling value) of the 3 × 3 feature points and the position index of the maximum response value on the feature map of the target channel. At this time, the number of maximum response values is related to the size of the target channel feature map; for example, if the size of the target channel feature map is 80 × 60 × 3, the maximum response obtained after the maximum pooling process is performed on the target channel feature map There are 80×60 values in total; and for each maximum response value, there may be at least one other maximum response value with the same position index. Then, the maximum response values with the same position index are combined to obtain M maximum response values and a position index corresponding to each of the M maximum response values. Finally, based on the M maximum response values (pooled values) and the position index corresponding to each maximum response value, the first detection frame information corresponding to the steering wheel is generated.
其中,人手对应的第二检测框信息的确定过程可参考方向盘对应的第一检测框信息的确定过程,此处不再赘述。The process of determining the information of the second detection frame corresponding to the human hand may refer to the process of determining the information of the first detection frame corresponding to the steering wheel, which will not be repeated here.
在得到方向盘对应的第一检测框信息之后,可以将第一检测框信息确定为方向盘检测结果。在未得到方向盘对应的第一检测框信息时,确定方向盘检测结果为不包括方向盘。以及在得到人手对应的第二检测框信息之后,可以将第二检测框信息确定为人手检测结果。在未得到人手对应的第二检测框信息时,确定人手检测结果为不包括人手。After obtaining the first detection frame information corresponding to the steering wheel, the first detection frame information may be determined as the steering wheel detection result. When the first detection frame information corresponding to the steering wheel is not obtained, it is determined that the steering wheel detection result does not include the steering wheel. And after obtaining the second detection frame information corresponding to the human hand, the second detection frame information may be determined as the human hand detection result. When the second detection frame information corresponding to the human hand is not obtained, it is determined that the human hand detection result does not include the human hand.
一种可选实施方式中,基于多个池化值以及与多个池化值中的每个池化值对应的位置索引,生成目标检测框信息,可以包括:In an optional embodiment, generating target detection frame information based on a plurality of pooled values and a position index corresponding to each of the plurality of pooled values may include:
步骤A1:在多个池化值中存在至少一个池化值大于设置的池化阈值的情况下,基于多个池化值以及池化阈值,从多个池化值中确定目标检测框的中心点的目标池化值。Step A1: In the case where at least one pooling value is greater than the set pooling threshold in the multiple pooling values, determine the center of the target detection frame from the multiple pooling values based on the multiple pooling values and the pooling threshold The target pooling value for the point.
步骤A2:基于目标池化值对应的位置索引,生成目标检测框信息。Step A2: Generate target detection frame information based on the position index corresponding to the target pooling value.
继续以方向盘为例进行说明,这里,可以设置池化阈值,在多个池化值中存在至少一个池化值大于设置的池化阈值的情况下,基于设置的池化阈值对多个池化值进行筛选,得到多个池化值中大于池化阈值的一个目标池化值。在多个池化值中每个池化值小于或等于设置的池化阈值的情况下,则不存在目标池化值,即不存在方向盘的第一检测框信息。Continue to take the steering wheel as an example. Here, a pooling threshold can be set. In the case where at least one pooling value is greater than the set pooling threshold among the multiple pooling values, multiple pooling values are set based on the set pooling threshold. The value is filtered to obtain a target pooling value that is greater than the pooling threshold among the multiple pooling values. In the case where each of the multiple pooling values is less than or equal to the set pooling threshold, there is no target pooling value, that is, there is no first detection frame information of the steering wheel.
进一步的,可以基于目标池化值对应的位置索引,生成方向盘对应的第一检测框的中心点位置信息。其中,方向盘对应的池化阈值与驾驶员手部对应的池化阈值可以相同,也可以不同。具体的,方向盘对应的池化阈值与驾驶员手部对应的池化阈值,可以根据实际情况进行确定。比如,可以获取待检测图像对应的摄像设备采集到的多帧样本图像,根据采集的多帧样本图像利用自适应算法,分别生成方向盘对应的池化阈值和驾驶员手部对应的池化阈值。Further, the center point position information of the first detection frame corresponding to the steering wheel may be generated based on the position index corresponding to the target pooling value. The pooling threshold corresponding to the steering wheel and the pooling threshold corresponding to the driver's hand may be the same or different. Specifically, the pooling threshold corresponding to the steering wheel and the pooling threshold corresponding to the driver's hand may be determined according to the actual situation. For example, multi-frame sample images collected by the camera device corresponding to the image to be detected can be obtained, and an adaptive algorithm can be used to generate a pooling threshold corresponding to the steering wheel and a pooling threshold corresponding to the driver's hand according to the collected multi-frame sample images.
承接上述示例继续说明,在得到M个最大响应值,以及M个最大响应值中每个最大响应值对应的位置索引之后,可以将M个最大响应值中的每个最大响应值与池化阈值进行比对;在某最大响应值大于该池化阈值时,将该最大响应值确定为目标池化值。目标池化值对应的位置索引,即方向盘的第一检测框的中心点位置信息。Continuing with the above example, after obtaining the M maximum response values and the position index corresponding to each of the M maximum response values, each of the M maximum response values can be combined with the pooling threshold. Compare; when a certain maximum response value is greater than the pooling threshold, the maximum response value is determined as the target pooling value. The position index corresponding to the target pooling value, that is, the position information of the center point of the first detection frame of the steering wheel.
这里,还可以直接对转换之前的目标通道特征图进行最大池化处理,得到方向盘的第一检测框的中心点位置信息。Here, it is also possible to directly perform maximum pooling processing on the feature map of the target channel before conversion to obtain the center point position information of the first detection frame of the steering wheel.
在本申请的一些实施例中,在得到方向盘的第一检测框的中心点位置信息之后,还可以基于该中心点位置信息,从第二通道特征图中选取与该中心点位置信息匹配的特征位置处的第二特征值,将选取的第二特征值确定为方向盘的第一检测框对应的长度,并从第三通道特征图中选取与该中心点位置信息匹配的特征位置处的第三特征值,将选取的第三特征值确定为方向盘的第一检测框对应的宽度,得到了方向盘的第一检测框的尺寸信息。In some embodiments of the present application, after obtaining the center point position information of the first detection frame of the steering wheel, based on the center point position information, a feature matching the center point position information may be selected from the second channel feature map The second feature value at the position, the selected second feature value is determined as the length corresponding to the first detection frame of the steering wheel, and the third channel feature map at the feature position matching the center point position information is selected from the third channel. feature value, and the selected third feature value is determined as the width corresponding to the first detection frame of the steering wheel, and the size information of the first detection frame of the steering wheel is obtained.
其中,针对驾驶员手部时,可以得到一个或两个第二检测框信息,即可以得到左手和/或右手分别对应的第二检测框信息。具体的,确定驾驶员手部对应的第二检测框信息的过程,可参考上述确定方向盘的第一检测框信息的过程,此处不再进行赘述。Wherein, for the driver's hand, one or two second detection frame information can be obtained, that is, the second detection frame information corresponding to the left hand and/or the right hand respectively can be obtained. Specifically, for the process of determining the second detection frame information corresponding to the driver's hand, reference may be made to the above-mentioned process of determining the first detection frame information of the steering wheel, which will not be repeated here.
上述实施方式中,将多个池化值中大于池化阈值的池化值,确定为属于方向盘或驾驶员手部的目标检测框的中心点的目标池化值,基于目标池化值对应的位置索引,较准 确的生成了方向盘或驾驶员手部的至少一个目标检测框信息。In the above embodiment, the pooling value greater than the pooling threshold among the plurality of pooling values is determined as the target pooling value belonging to the center point of the target detection frame of the steering wheel or the driver's hand, based on the corresponding target pooling value. The position index generates at least one target detection frame information of the steering wheel or the driver's hand more accurately.
一种可选实施方式中,基于多个池化值以及与多个池化值中的每个池化值对应的位置索引,生成目标检测框信息,可以包括:在多个池化值小于或等于设置的池化阈值的情况下,确定目标检测框信息为空。In an optional embodiment, generating target detection frame information based on a plurality of pooling values and a position index corresponding to each of the plurality of pooling values may include: when the plurality of pooling values are less than or When it is equal to the set pooling threshold, it is determined that the target detection frame information is empty.
这里,在方向盘对应的多个池化值小于或等于设置的池化阈值时,则确定方向盘的第一检测框信息为空;在方向盘对应的多个池化中存在至少一个池化值大于设置的池化阈值时,确定方向盘的第一检测框信息不为空。Here, when the multiple pooling values corresponding to the steering wheel are less than or equal to the set pooling threshold, it is determined that the first detection frame information of the steering wheel is empty; there is at least one pooling value greater than the set pooling value among the multiple pooling values corresponding to the steering wheel When the pooling threshold is , it is determined that the information of the first detection frame of the steering wheel is not empty.
在得到方向盘检测结果和人手检测结果之后,可以基于方向盘检测结果和人手检测结果,确定驾驶员的驾驶行为类别。After the steering wheel detection result and the human hand detection result are obtained, the driving behavior category of the driver can be determined based on the steering wheel detection result and the human hand detection result.
在本申请的一些实施例中,在方向盘检测结果中包括方向盘,人手检测结果中包括人手时,根据目标检测结果,确定驾驶员的驾驶行为类别,可以包括:In some embodiments of the present application, when the steering wheel detection result includes a steering wheel, and the human hand detection result includes a human hand, the driving behavior category of the driver is determined according to the target detection result, which may include:
根据方向盘检测结果和人手检测结果,确定方向盘与人手之间的位置关系;According to the detection result of the steering wheel and the detection result of the human hand, determine the positional relationship between the steering wheel and the human hand;
根据位置关系,确定驾驶员的驾驶行为类别。According to the position relationship, the driving behavior category of the driver is determined.
这里,可以先根据方向盘检测结果和人手检测结果,确定方向盘和人手之间的位置关系,根据确定的位置关系,确定驾驶员的驾驶行为类别,即确定驾驶员是安全驾驶,还是危险驾驶。Here, the positional relationship between the steering wheel and the human hand can be determined first according to the steering wheel detection result and the human hand detection result, and the driver's driving behavior category can be determined according to the determined positional relationship, that is, whether the driver is driving safely or dangerously.
在本申请的一些实施例中,根据位置关系,确定驾驶员的驾驶行为类别,可以包括:在所述位置关系指示驾驶员手握方向盘的情况下,确定所述驾驶员的驾驶行为类别为安全驾驶。In some embodiments of the present application, determining the driving behavior category of the driver according to the positional relationship may include: when the positional relationship indicates that the driver is holding the steering wheel, determining that the driving behavior category of the driver is safe drive.
这里,在检测到位置关系指示驾驶员手握方向盘时,确定驾驶员的行为类别为安全驾驶。该驾驶员手握方向盘的情况包括驾驶员左手握方向盘、驾驶员右手握方向盘、或者驾驶员双手握方向盘。Here, when it is detected that the positional relationship indicates that the driver is holding the steering wheel, it is determined that the driver's behavior category is safe driving. The case where the driver holds the steering wheel includes the driver holding the steering wheel with the left hand, the driver holding the steering wheel with the right hand, or the driver holding the steering wheel with both hands.
在本申请的一些实施例中,根据位置关系,确定驾驶员的驾驶行为类别,可以包括:在位置关系指示驾驶员双手脱离方向盘的情况下,确定驾驶员的驾驶行为类别为危险驾驶。In some embodiments of the present application, determining the driving behavior category of the driver according to the positional relationship may include: when the positional relationship indicates that the driver's hands are off the steering wheel, determining that the driver's driving behavior category is dangerous driving.
这里,在确定位置关系为驾驶员双手脱离方向盘,则确定该驾驶员的驾驶行为的类别为危险驾驶。Here, when it is determined that the positional relationship is that the driver's hands are off the steering wheel, the category of the driving behavior of the driver is determined to be dangerous driving.
在本申请的一些实施例中,在方向盘检测结果中包括方向盘,人手检测结果中未包 括人手时,根据目标检测结果,确定驾驶员的驾驶行为类别,可以包括:根据目标检测结果,确定驾驶员的驾驶行为类别为危险驾驶。In some embodiments of the present application, when the steering wheel detection result includes a steering wheel and the human hand detection result does not include a human hand, determining the driving behavior category of the driver according to the target detection result may include: determining the driver according to the target detection result. is classified as dangerous driving.
这里,若方向盘检测结果中检测到方向盘,人手检测结果中未检测到人手,则表征该驾驶员的双手脱离了方向盘,确定该驾驶员的驾驶行为类别为危险驾驶。Here, if a steering wheel is detected in the steering wheel detection result, but no human hand is detected in the hand detection result, it means that the driver's hands are off the steering wheel, and the driving behavior category of the driver is determined to be dangerous driving.
在本申请的一些实施例中,若方向盘检测结果中未检测到方向盘,则确定待检测图像为异常图像,故将该驾驶员的驾驶行为类别确定为状态异常。In some embodiments of the present application, if no steering wheel is detected in the steering wheel detection result, it is determined that the image to be detected is an abnormal image, so the driving behavior category of the driver is determined to be abnormal.
在本申请的一些实施例中,根据方向盘检测结果和人手检测结果,确定方向盘与人手之间的位置关系,可以包括:在人手检测结果中包括一只人手的情况下,若人手检测结果中人手对应的检测框、与方向盘检测结果中方向盘对应的检测框存在重合区域,确定方向盘与人手之间的位置关系为驾驶员手握方向盘;若人手检测结果中人手对应的检测框与方向盘检测结果中方向盘对应的检测框不存在重合区域,确定方向盘与人手之间的位置关系为驾驶员双手脱离方向盘。In some embodiments of the present application, determining the positional relationship between the steering wheel and the human hand according to the steering wheel detection result and the human hand detection result may include: if the human hand detection result includes a human hand, if the human hand detection result includes a human hand The corresponding detection frame and the detection frame corresponding to the steering wheel in the steering wheel detection result have overlapping areas, and the positional relationship between the steering wheel and the human hand is determined to be that the driver holds the steering wheel; There is no overlapping area in the detection frame corresponding to the steering wheel, and it is determined that the positional relationship between the steering wheel and the human hand is that the driver's hands are off the steering wheel.
在本申请的一些实施例中,根据方向盘检测结果和人手检测结果,确定方向盘与人手之间的位置关系,可以包括:在人手检测结果中包括两只人手的情况下,若人手检测结果中两只人手对应的检测框分别与方向盘检测结果中方向盘对应的检测框不存在重合区域,确定方向盘与人手之间的位置关系为驾驶员双手脱离方向盘;若人手检测结果中存在至少一只人手对应的检测框与方向盘检测结果中方向盘对应的检测框存在重合区域,确定方向盘与人手之间的位置关系为驾驶员手握方向盘。In some embodiments of the present application, determining the positional relationship between the steering wheel and the human hand according to the steering wheel detection result and the human hand detection result may include: if the human hand detection result includes two human hands, if two human hands are included in the human hand detection result There is no overlapping area between the detection frame corresponding to only the human hand and the detection frame corresponding to the steering wheel in the steering wheel detection result, and the positional relationship between the steering wheel and the human hand is determined to be that the driver's hands are off the steering wheel; if there is at least one human hand in the human hand detection result. There is an overlapping area between the detection frame and the detection frame corresponding to the steering wheel in the steering wheel detection result, and it is determined that the positional relationship between the steering wheel and the human hand is that the driver holds the steering wheel.
这里,可以利用方向盘检测结果中方向盘对应的检测框与人手检测结果中人手对应的检测框,判断方向盘和人手之间的位置关系。Here, the positional relationship between the steering wheel and the human hand can be determined by using the detection frame corresponding to the steering wheel in the steering wheel detection result and the detection frame corresponding to the human hand in the human hand detection result.
在人手检测结果中包括一只人手的情况下,在该人手对应的检测框与方向盘对应的检测框存在重合区域时,确定方向盘与人手之间的位置关系为手握方向盘。在人手对应的检测框与方向盘对应的检测框存在不重合区域时,确定方向盘与人手之间的位置关系为手脱离方向盘。When a human hand is included in the human hand detection result, when there is an overlapping area between the detection frame corresponding to the human hand and the detection frame corresponding to the steering wheel, the positional relationship between the steering wheel and the human hand is determined as holding the steering wheel. When a non-overlapping area exists between the detection frame corresponding to the human hand and the detection frame corresponding to the steering wheel, it is determined that the positional relationship between the steering wheel and the human hand is that the hand is disengaged from the steering wheel.
在人手检测结果中包括两只人手的情况下,在至少一只人手对应的检测框与方向盘对应的检测框存在重合区域时,确定方向盘与人手之间的位置关系为手握方向盘。在两只人手分别对应的检测框与方向盘对应的检测框均存在不重合区域时,确定方向盘与人手之间的位置关系为手脱离方向盘。When the human hand detection result includes two human hands, when the detection frame corresponding to at least one human hand and the detection frame corresponding to the steering wheel have an overlapping area, the positional relationship between the steering wheel and the human hand is determined as holding the steering wheel. When the detection frames corresponding to the two hands and the detection frames corresponding to the steering wheel both have non-overlapping regions, it is determined that the positional relationship between the steering wheel and the human hand is that the hand is separated from the steering wheel.
一种可选实施方式中,根据方向盘检测结果和人手检测结果,确定方向盘与人手之间的位置关系,可以包括:In an optional embodiment, determining the positional relationship between the steering wheel and the human hand according to the steering wheel detection result and the human hand detection result may include:
基于待检测图像,生成待检测图像对应的中间特征图;Based on the image to be detected, an intermediate feature map corresponding to the image to be detected is generated;
对中间特征图进行至少一次卷积处理,生成中间特征图对应的二通道的分类特征图;其中,二通道的分类特征图中的每个通道特征图对应一种人手的类别。Perform at least one convolution process on the intermediate feature map to generate a two-channel classification feature map corresponding to the intermediate feature map; wherein each channel feature map in the two-channel classification feature map corresponds to a category of human hands.
基于人手检测结果中人手对应的检测框信息指示的中心点位置信息,从分类特征图中提取与中心点位置信息匹配的特征位置处的两个特征值;从两个特征值中选取最大特征值,将分类特征图中,与最大特征值对应的通道特征图的类别,确定为中心点位置信息对应的类别。Based on the center point position information indicated by the detection frame information corresponding to the human hand in the hand detection result, two eigenvalues at the feature positions matching the center point position information are extracted from the classification feature map; the largest eigenvalue is selected from the two eigenvalues , the category of the channel feature map corresponding to the largest feature value in the classification feature map is determined as the category corresponding to the center point position information.
基于人手对应的检测框信息指示的每个中心点位置信息对应的类别,确定方向盘与人手之间的位置关系。Based on the category corresponding to each center point position information indicated by the detection frame information corresponding to the human hand, the positional relationship between the steering wheel and the human hand is determined.
这里,在人手检测结果指示的第二检测框信息不为空的情况下,可以对中间特征图进行至少一次卷积处理,生成中间特征图对应的二通道的分类特征图。其中,二通道的分类特征图中的每个通道特征图对应一种人手的类别。比如,分类特征图中,第0通道的通道特征图对应的类别可以为驾驶员手脱离方向盘;第1通道的通道特征图对应的类别可以为驾驶员手握方向盘。Here, when the second detection frame information indicated by the hand detection result is not empty, at least one convolution process may be performed on the intermediate feature map to generate a two-channel classification feature map corresponding to the intermediate feature map. Among them, each channel feature map in the two-channel classification feature map corresponds to a category of human hands. For example, in the classification feature map, the category corresponding to the channel feature map of the 0th channel may be that the driver's hand is off the steering wheel; the category corresponding to the channel feature map of the first channel may be that the driver is holding the steering wheel.
进一步的,可以基于人手对应的检框信息指示的中心点位置信息,从分类特征图中提取与中心点位置信息匹配的特征位置处的两个特征值,从两个特征值中选取最大特征值,将分类特征图中,与该最大特征值对应的通道特征图的类别,确定为中心点位置信息对应的类别。Further, based on the center point position information indicated by the frame detection information corresponding to the human hand, two eigenvalues at the feature positions matching the center point position information can be extracted from the classification feature map, and the largest eigenvalue is selected from the two eigenvalues. , and the category of the channel feature map corresponding to the maximum feature value in the classification feature map is determined as the category corresponding to the center point position information.
在人手对应的检测框信息中包括两个中心点位置信息时(即包括左手对应的中心点位置信息和右手对应的中心点位置信息),针对每个中心点位置信息,确定该中心点位置信息对应的类别。When the detection frame information corresponding to the human hand includes two center point position information (that is, including the center point position information corresponding to the left hand and the center point position information corresponding to the right hand), for each center point position information, determine the center point position information corresponding category.
比如,若分类特征图中,第0通道的通道特征图对应的类别可以为驾驶员手脱离方向盘;第1通道的通道特征图对应的类别可以为驾驶员手握方向盘,则针对左手对应的中心点位置信息,从分类特征图中提取得到两个特征值,即0.8、0.2,则将分类特征图中,将与0.8对应的第0通道特征图的类别,确定为左手对应的中心点位置信息的类别,即左手对应的中心点位置信息的类别为驾驶员手脱离方向盘。同时,可以得到右手对应 的中心点位置信息的类别。For example, if in the classification feature map, the category corresponding to the channel feature map of the 0th channel can be that the driver's hand is off the steering wheel; the category corresponding to the channel feature map of the first channel can be that the driver is holding the steering wheel, then the center corresponding to the left hand Point position information, two feature values are extracted from the classification feature map, namely 0.8 and 0.2, then the classification feature map, the category of the 0th channel feature map corresponding to 0.8 is determined as the center point position information corresponding to the left hand The category of the center point position information corresponding to the left hand is that the driver's hand is off the steering wheel. At the same time, the category of the position information of the center point corresponding to the right hand can be obtained.
上述实施方式中,确定了方向盘检测结果,以及通过对中间特征图进行至少一次卷积处理,生成分类特征图,再结合生成的驾驶员手部的中心点位置信息,可以较准确的确定方向盘与人手之间的位置关系。In the above embodiment, the detection result of the steering wheel is determined, and the classification feature map is generated by performing at least one convolution process on the intermediate feature map, and then combined with the generated center point position information of the driver's hand, the steering wheel and the steering wheel can be more accurately determined. The positional relationship between the hands.
一种可选实施方式中,基于人手对应的检测框信息指示的每个中心点位置信息对应的类别,确定方向盘与人手之间的位置关系,可以包括:In an optional embodiment, based on the category corresponding to each center point position information indicated by the detection frame information corresponding to the human hand, determining the positional relationship between the steering wheel and the human hand may include:
方式一、在人手对应的检测框信息中包括一个中心点位置信息的情况下,将中心点位置信息对应的类别,确定为方向盘与人手之间的位置关系。Manner 1: When the detection frame information corresponding to the human hand includes a center point position information, the category corresponding to the center point position information is determined as the positional relationship between the steering wheel and the human hand.
方式二、在人手对应的检测框信息中包括两个中心点位置信息、且两个中心点位置信息对应的类别为驾驶员手脱离方向盘的情况下,确定方向盘与人手之间的位置关系为驾驶员手脱离方向盘;在两个中心点位置信息对应的类别中,存在至少一个中心点位置信息对应的类别为驾驶员手握方向盘的情况下,确定方向盘与人手之间的位置关系为驾驶员手握方向盘。Mode 2: When the detection frame information corresponding to the human hand includes two center point position information, and the category corresponding to the two center point position information is that the driver's hand is detached from the steering wheel, it is determined that the positional relationship between the steering wheel and the human hand is driving. The driver's hand is off the steering wheel; in the categories corresponding to the two center point position information, if there is at least one category corresponding to the center point position information is that the driver holds the steering wheel, the positional relationship between the steering wheel and the human hand is determined as the driver's hand. Hold the steering wheel.
针对方式一,在人手对应的检测框信息中包括一个中心点位置信息时,即人手对应的检测框信息中包括左手对应的中心点位置信息或右手对应的中心点位置信息,可以将人手对应的检测框信息中,该中心点位置信息对应的类别,确定为方向盘与人手之间的位置关系。比如,在人手对应的检测框信息中包括左手对应的中心点位置信息,该左手对应的中心点位置信息的类别为驾驶员手握方向盘时,则方向盘与人手之间的位置关系为驾驶员手握方向盘。For mode 1, when the detection frame information corresponding to the human hand includes a center point position information, that is, the detection frame information corresponding to the human hand includes the center point position information corresponding to the left hand or the center point position information corresponding to the right hand, the position information corresponding to the human hand can be In the detection frame information, the category corresponding to the position information of the center point is determined as the positional relationship between the steering wheel and the human hand. For example, the detection frame information corresponding to the human hand includes the center point position information corresponding to the left hand, and the type of the center point position information corresponding to the left hand is that when the driver holds the steering wheel, the positional relationship between the steering wheel and the human hand is the driver's hand. Hold the steering wheel.
针对方式二,在人手对应的检测框信息中包括两个中心点位置信,即人手对应的检测框信息中包括左手对应的中心点位置信息和右手对应的中心点位置信息,则在两个中心点位置信息对应的类别均为驾驶员手脱离方向盘时,确定方向盘与人手之间的位置关系为驾驶员手脱离方向盘;在左手对应的中心点位置信息的类别为驾驶员手握方向盘,和/或,右手对应的中心点位置信息的类别为驾驶员手握方向盘时,确定方向盘与人手之间的位置关系为驾驶员手握方向盘。For the second method, the detection frame information corresponding to the human hand includes two center point position information, that is, the detection frame information corresponding to the human hand includes the center point position information corresponding to the left hand and the center point position information corresponding to the right hand, then the two center The categories corresponding to the point position information are all when the driver's hand is off the steering wheel, and the positional relationship between the steering wheel and the human hand is determined to be that the driver's hand is off the steering wheel; the category of the center point position information corresponding to the left hand is that the driver is holding the steering wheel, and/ Or, when the type of the center point position information corresponding to the right hand is when the driver holds the steering wheel, the positional relationship between the steering wheel and the human hand is determined to be that the driver holds the steering wheel.
针对S104:For S104:
这里,在确定了驾驶员的驾驶行为类别为危险驾驶时,可以基于驾驶员的驾驶行为类别,生成针对驾驶员的警示信息。其中,该警示信息可以以语音的形式播放。比如生 成的警示信息可以为“危险,请握紧方向盘”。Here, when it is determined that the driving behavior category of the driver is dangerous driving, warning information for the driver may be generated based on the driving behavior category of the driver. Wherein, the warning information can be played in the form of voice. For example, the generated warning message can be "Danger, please hold the steering wheel".
本领域技术人员可以理解,在具体实施方式的上述方法中,各步骤的撰写顺序并不意味着严格的执行顺序而对实施过程构成任何限定,各步骤的具体执行顺序应当以其功能和可能的内在逻辑确定。Those skilled in the art can understand that in the above method of the specific implementation, the writing order of each step does not mean a strict execution order but constitutes any limitation on the implementation process, and the specific execution order of each step should be based on its function and possible Internal logic is determined.
基于相同的构思,本申请实施例还提供了一种驾驶员行为检测装置,参见图3所示,为本申请实施例提供的一种驾驶员行为检测装置的架构示意图,包括获取模块301、检测模块302、确定模块303、以及警示模块304,具体的:Based on the same concept, an embodiment of the present application also provides a driver behavior detection device. Referring to FIG. 3 , a schematic structural diagram of a driver behavior detection device provided by an embodiment of the present application includes an acquisition module 301, a detection Module 302, determination module 303, and warning module 304, specifically:
获取模块301,配置为获取车舱内的驾驶位置区域对应的待检测图像;The obtaining module 301 is configured to obtain the to-be-detected image corresponding to the driving position area in the vehicle cabin;
检测模块302,配置为对所述待检测图像进行检测,得到目标检测结果,所述目标检测结果包括方向盘检测结果和人手检测结果;The detection module 302 is configured to detect the to-be-detected image to obtain a target detection result, where the target detection result includes a steering wheel detection result and a human hand detection result;
确定模块303,配置为根据所述目标检测结果,确定驾驶员的驾驶行为类别;A determination module 303, configured to determine the driving behavior category of the driver according to the target detection result;
警示模块304,配置为在所述驾驶员的驾驶行为类别为危险驾驶时,发出警示信息。The warning module 304 is configured to issue warning information when the driving behavior category of the driver is dangerous driving.
在本申请的一些实施例中,在所述方向盘检测结果中包括方向盘,所述人手检测结果中包括人手时,所述确定模块303,在根据所述目标检测结果,确定驾驶员的驾驶行为类别时,配置为:In some embodiments of the present application, when the steering wheel detection result includes a steering wheel and the human hand detection result includes a human hand, the determining module 303 determines the driving behavior category of the driver according to the target detection result , the configuration is:
根据所述方向盘检测结果和所述人手检测结果,确定方向盘与人手之间的位置关系;According to the detection result of the steering wheel and the detection result of the human hand, determine the positional relationship between the steering wheel and the human hand;
根据所述位置关系,确定驾驶员的驾驶行为类别。According to the position relationship, the driving behavior category of the driver is determined.
在本申请的一些实施例中,所述确定模块303,在根据位置关系,确定驾驶员的驾驶行为类别时,配置为:In some embodiments of the present application, the determining module 303, when determining the driving behavior category of the driver according to the positional relationship, is configured as follows:
在所述位置关系指示驾驶员手握方向盘的情况下,确定所述驾驶员的驾驶行为类别为安全驾驶。When the positional relationship indicates that the driver is holding the steering wheel, it is determined that the driving behavior category of the driver is safe driving.
在本申请的一些实施例中,所述确定模块303,在根据位置关系,确定驾驶员的驾驶行为类别时,配置为:In some embodiments of the present application, the determining module 303, when determining the driving behavior category of the driver according to the positional relationship, is configured as follows:
在所述位置关系指示驾驶员双手脱离方向盘的情况下,确定所述驾驶员的驾驶行为类别为危险驾驶。When the positional relationship indicates that the driver's hands are off the steering wheel, it is determined that the driver's driving behavior is classified as dangerous driving.
在本申请的一些实施例中,在所述方向盘检测结果中包括方向盘,所述人手检测结果中未包括人手时,所述确定模块303,在根据所述目标检测结果,确定驾驶员的驾驶行为类别时,配置为:In some embodiments of the present application, when the steering wheel detection result includes a steering wheel and the human hand detection result does not include a human hand, the determining module 303 determines the driving behavior of the driver according to the target detection result category, configure as:
根据所述目标检测结果,确定所述驾驶员的驾驶行为类别为危险驾驶。According to the target detection result, it is determined that the driving behavior category of the driver is dangerous driving.
在本申请的一些实施例中,所述检测模块302,在对所述待检测图像进行检测,得到目标检测结果时,配置为:In some embodiments of the present application, the detection module 302, when detecting the to-be-detected image to obtain a target detection result, is configured as follows:
基于所述待检测图像,生成所述待检测图像对应的中间特征图;generating an intermediate feature map corresponding to the to-be-detected image based on the to-be-detected image;
对所述中间特征图进行至少一次目标卷积处理,生成所述中间特征图对应的多个通道的检测特征图;Perform at least one target convolution process on the intermediate feature map to generate detection feature maps of multiple channels corresponding to the intermediate feature map;
利用激活函数对多个通道的所述检测特征图中表征位置的目标通道特征图的每个特征值进行特征值转换处理,生成转换后的目标通道特征图;Using the activation function to perform feature value conversion processing on each feature value of the target channel feature map representing the position in the detection feature maps of multiple channels, to generate a converted target channel feature map;
按照预设的池化尺寸和池化步长,对转换后的目标通道特征图进行最大池化处理,得到多个池化值以及与多个池化值中的每个池化值对应的位置索引;所述位置索引用于标识所述池化值在所述转换后的目标通道特征图中的位置;According to the preset pooling size and pooling step size, the converted target channel feature map is subjected to maximum pooling processing to obtain multiple pooling values and the position corresponding to each pooling value in the multiple pooling values. index; the position index is used to identify the position of the pooled value in the converted target channel feature map;
基于多个池化值以及与多个池化值中的每个池化值对应的位置索引,生成目标检测框信息;generating target detection frame information based on a plurality of pooling values and a position index corresponding to each of the plurality of pooling values;
根据所述目标检测框信息,确定所述目标检测结果。The target detection result is determined according to the target detection frame information.
在本申请的一些实施例中,所述检测模块302,在基于多个池化值以及与多个池化值中的每个池化值对应的位置索引,生成目标检测框信息时,配置为:In some embodiments of the present application, the detection module 302, when generating target detection frame information based on a plurality of pooling values and a position index corresponding to each of the plurality of pooling values, is configured as :
在所述多个池化值中存在至少一个池化值大于设置的池化阈值的情况下,基于所述多个池化值以及池化阈值,从所述多个池化值中确定所述目标检测框的中心点的目标池化值;In the case where there is at least one pooling value in the plurality of pooling values that is greater than a set pooling threshold, determining the pooling value from the plurality of pooling values based on the plurality of pooling values and the pooling threshold The target pooling value of the center point of the target detection frame;
基于所述目标池化值对应的位置索引,生成所述目标检测框信息。The target detection frame information is generated based on the position index corresponding to the target pooling value.
在本申请的一些实施例中,所述检测模块302,在基于多个池化值以及与多个池化值中的每个池化值对应的位置索引,生成所述目标检测框信息时,配置为:In some embodiments of the present application, when the detection module 302 generates the target detection frame information based on a plurality of pooling values and a position index corresponding to each pooling value in the plurality of pooling values, Configured as:
在所述多个池化值小于或等于设置的池化阈值的情况下,确定所述目标检测框信息为空。In the case that the multiple pooling values are less than or equal to the set pooling threshold, it is determined that the target detection frame information is empty.
在本申请的一些实施例中,所述确定模块303,在根据所述方向盘检测结果和所述人手检测结果,确定方向盘与人手之间的位置关系时,配置为:In some embodiments of the present application, the determining module 303, when determining the positional relationship between the steering wheel and the human hand according to the steering wheel detection result and the human hand detection result, is configured to:
在所述人手检测结果中包括一只人手的情况下,若所述人手检测结果中人手对应的检测框、与所述方向盘检测结果中方向盘对应的检测框存在重合区域,确定所述方向盘 与所述人手之间的位置关系为驾驶员手握方向盘;若所述人手检测结果中人手对应的检测框与所述方向盘检测结果中方向盘对应的检测框不存在重合区域,确定所述方向盘与所述人手之间的位置关系为驾驶员双手脱离方向盘。In the case where the human hand detection result includes a human hand, if the detection frame corresponding to the human hand in the human hand detection result and the detection frame corresponding to the steering wheel in the steering wheel detection result have an overlapping area, it is determined that the steering wheel and the detection frame corresponding to the steering wheel in the steering wheel detection result overlap. The positional relationship between the human hands is that the driver holds the steering wheel; if there is no overlapping area between the detection frame corresponding to the human hand in the human hand detection result and the detection frame corresponding to the steering wheel in the steering wheel detection result, it is determined that the steering wheel and the The positional relationship between the human hands is that the driver's hands are off the steering wheel.
在本申请的一些实施例中,所述确定模块303,在根据所述方向盘检测结果和所述人手检测结果,确定方向盘与人手之间的位置关系时,配置为:In some embodiments of the present application, the determining module 303, when determining the positional relationship between the steering wheel and the human hand according to the steering wheel detection result and the human hand detection result, is configured to:
在所述人手检测结果中包括两只人手的情况下,若所述人手检测结果中两只人手对应的检测框分别与所述方向盘检测结果中方向盘对应的检测框不存在重合区域,确定所述方向盘与所述人手之间的位置关系为驾驶员双手脱离方向盘;若所述人手检测结果中存在至少一只人手对应的检测框与所述方向盘检测结果中方向盘对应的检测框存在重合区域,确定所述方向盘与所述人手之间的位置关系为驾驶员手握方向盘。In the case where the human hand detection result includes two human hands, if there is no overlapping area between the detection frames corresponding to the two human hands in the human hand detection result and the detection frame corresponding to the steering wheel in the steering wheel detection result, determine the The positional relationship between the steering wheel and the human hand is that the driver's hands are off the steering wheel; if there is an overlapping area between the detection frame corresponding to at least one human hand in the detection result of the human hand and the detection frame corresponding to the steering wheel in the detection result of the steering wheel, determine The positional relationship between the steering wheel and the human hand is that the driver holds the steering wheel.
在本申请的一些实施例中,所述确定模块303,在根据所述方向盘检测结果和所述人手检测结果,确定方向盘与人手之间的位置关系时,配置为:In some embodiments of the present application, the determining module 303, when determining the positional relationship between the steering wheel and the human hand according to the steering wheel detection result and the human hand detection result, is configured to:
基于所述待检测图像,生成所述待检测图像对应的中间特征图;generating an intermediate feature map corresponding to the to-be-detected image based on the to-be-detected image;
对所述中间特征图进行至少一次卷积处理,生成所述中间特征图对应的二通道的分类特征图;其中,所述二通道的分类特征图中的每个通道特征图对应一种人手的类别;Perform at least one convolution process on the intermediate feature map to generate a two-channel classification feature map corresponding to the intermediate feature map; wherein, each channel feature map in the two-channel classification feature map corresponds to a type of human hand. category;
基于所述人手检测结果中人手对应的检测框信息指示的中心点位置信息,从所述分类特征图中提取与所述中心点位置信息匹配的特征位置处的两个特征值;从两个特征值中选取最大特征值,将所述分类特征图中,与所述最大特征值对应的通道特征图的类别,确定为所述中心点位置信息对应的类别;Based on the center point position information indicated by the detection frame information corresponding to the human hand in the hand detection result, two feature values at the feature positions matching the center point position information are extracted from the classification feature map; The maximum eigenvalue is selected from the value, and the category of the channel feature map corresponding to the maximum eigenvalue in the classification feature map is determined as the category corresponding to the center point position information;
基于所述人手对应的检测框信息指示的每个中心点位置信息对应的类别,确定所述方向盘与人手之间的位置关系。Based on the category corresponding to each center point position information indicated by the detection frame information corresponding to the human hand, the positional relationship between the steering wheel and the human hand is determined.
在本申请的一些实施例中,所述确定模块303,在基于所述人手对应的检测框信息指示的每个中心点位置信息对应的类别,确定所述方向盘与人手之间的位置关系时,配置为:In some embodiments of the present application, when the determining module 303 determines the positional relationship between the steering wheel and the human hand based on the category corresponding to each center point position information indicated by the detection frame information corresponding to the human hand, Configured as:
在所述人手对应的检测框信息中包括一个中心点位置信息的情况下,将所述中心点位置信息对应的类别,确定为方向盘与人手之间的位置关系;In the case that the detection frame information corresponding to the human hand includes a center point position information, the category corresponding to the center point position information is determined as the positional relationship between the steering wheel and the human hand;
在所述人手对应的检测框信息中包括两个中心点位置信息、且所述两个中心点位置信息对应的类别为驾驶员手脱离方向盘的情况下,确定所述方向盘与人手之间的位置关 系为驾驶员双手脱离方向盘;在所述两个中心点位置信息对应的类别中,存在至少一个中心点位置信息对应的类别为驾驶员手握方向盘的情况下,确定所述方向盘与所述人手之间的位置关系为驾驶员手握方向盘。In the case where the detection frame information corresponding to the human hand includes two center point position information, and the category corresponding to the two center point position information is that the driver's hand is off the steering wheel, determine the position between the steering wheel and the human hand The relationship is that the driver's hands are off the steering wheel; in the categories corresponding to the two center point position information, if there is at least one category corresponding to the center point position information is the driver holding the steering wheel, determine the steering wheel and the human hand The positional relationship between them is that the driver holds the steering wheel.
在一些实施例中,本申请实施例提供的装置具有的功能或包含的模板可以用于执行上文方法实施例描述的方法,其具体实现可以参照上文方法实施例的描述,为了简洁,这里不再赘述。In some embodiments, the functions or templates included in the apparatuses provided in the embodiments of the present application may be used to execute the methods described in the above method embodiments. For specific implementation, reference may be made to the above method embodiments. For brevity, here No longer.
基于同一技术构思,本申请实施例还提供了一种电子设备。参照图4所示,为本申请实施例提供的电子设备的结构示意图,包括处理器401、存储器402、和总线403。其中,存储器402配置为存储执行指令,包括内存4021和外部存储器4022;这里的内存4021也称内存储器,配置为暂时存放处理器401中的运算数据,以及与硬盘等外部存储器4022交换的数据,处理器401通过内存4021与外部存储器4022进行数据交换,当电子设备400运行时,处理器401与存储器402之间通过总线403通信,使得处理器401在执行以下指令:Based on the same technical concept, the embodiments of the present application also provide an electronic device. Referring to FIG. 4 , a schematic structural diagram of an electronic device provided in an embodiment of the present application includes a processor 401 , a memory 402 , and a bus 403 . Wherein, the memory 402 is configured to store execution instructions, including the memory 4021 and the external memory 4022; the memory 4021 here is also called internal memory, and is configured to temporarily store the operation data in the processor 401 and the data exchanged with the external memory 4022 such as the hard disk, The processor 401 exchanges data with the external memory 4022 through the memory 4021. When the electronic device 400 is running, the processor 401 communicates with the memory 402 through the bus 403, so that the processor 401 executes the following instructions:
获取车舱内的驾驶位置区域的待检测图像;Obtain the to-be-detected image of the driving position area in the cabin;
对所述待检测图像进行检测,得到目标检测结果,所述目标检测结果包括方向盘检测结果和人手检测结果;Detecting the to-be-detected image to obtain a target detection result, where the target detection result includes a steering wheel detection result and a human hand detection result;
根据所述目标检测结果,确定驾驶员的驾驶行为类别;According to the target detection result, determine the driving behavior category of the driver;
在所述驾驶员的驾驶行为类别为危险驾驶时,发出警示信息。When the driving behavior category of the driver is dangerous driving, a warning message is issued.
此外,本申请实施例还提供一种计算机可读存储介质,该计算机可读存储介质上存储有计算机程序,该计算机程序被处理器运行时执行上述方法实施例中所述的驾驶员行为检测方法的步骤。In addition, the embodiments of the present application also provide a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is run by a processor, the driver behavior detection method described in the above method embodiments is executed A step of.
本申请实施例所提供的驾驶员行为检测方法的计算机程序产品,包括存储了程序代码的计算机可读存储介质,所述程序代码包括的指令可用于执行上述方法实施例中所述的驾驶员行为检测方法的步骤,具体可参见上述方法实施例,在此不再赘述。The computer program product of the driver behavior detection method provided by the embodiments of the present application includes a computer-readable storage medium storing program codes, and the instructions included in the program codes can be used to execute the driver behavior described in the above method embodiments. For the steps of the detection method, reference may be made to the foregoing method embodiments, which will not be repeated here.
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统和装置的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。在本申请所提供的几个实施例中,应该理解到,所揭露的系统、装置和方法,可以通过其它的方式实现。以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为 一种逻辑功能划分,实际实现时可以有另外的划分方式,又例如,多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些通信接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。Those skilled in the art can clearly understand that, for the convenience and brevity of description, for the specific working process of the system and device described above, reference may be made to the corresponding process in the foregoing method embodiments, which will not be repeated here. In the several embodiments provided in this application, it should be understood that the disclosed system, apparatus and method may be implemented in other manners. The apparatus embodiments described above are only illustrative. For example, the division of the units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components may be combined or Can be integrated into another system, or some features can be ignored, or not implemented. On the other hand, the shown or discussed mutual coupling or direct coupling or communication connection may be through some communication interfaces, indirect coupling or communication connection of devices or units, which may be in electrical, mechanical or other forms.
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated, and components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution in this embodiment.
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit.
所述功能如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个处理器可执行的非易失的计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。The functions, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a processor-executable non-volatile computer-readable storage medium. Based on this understanding, the technical solution of the present application can be embodied in the form of a software product in essence, or the part that contributes to the prior art or the part of the technical solution. The computer software product is stored in a storage medium, including Several instructions are used to cause 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 methods described in the various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic disk or optical disk and other media that can store program codes .
以上仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以权利要求的保护范围为准。The above are only the specific embodiments of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the technical scope disclosed in the present application can easily think of changes or replacements, which should be covered within the scope of the present application. within the scope of protection of this application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.
工业实用性Industrial Applicability
本申请实施例公开了一种驾驶员行为检测方法、装置、电子设备、计算机存储介质和计算机程序,该方法包括:通过本地代理程序获取用于控制第一受控设备工作的程序代码;通过所述本地代理程序将所述程序代码发送至所述第一受控设备,使所述第一受控设备运行所述程序代码。本申请实施例的技术方案,可以基于本地代理程序获取程序代码并推送,进而可以基于程序代码来实现对第一受控设备的控制,而程序代码是可以灵活编辑的,如此,可以更加灵活地对第一受控设备进行控制。The embodiment of the present application discloses a driver behavior detection method, device, electronic device, computer storage medium and computer program. The method includes: obtaining a program code for controlling the operation of a first controlled device through a local agent program; The local agent program sends the program code to the first controlled device, so that the first controlled device runs the program code. In the technical solutions of the embodiments of the present application, the program code can be obtained and pushed based on the local agent program, and then the control of the first controlled device can be realized based on the program code, and the program code can be flexibly edited. Control the first controlled device.

Claims (16)

  1. 一种驾驶员行为检测方法,包括:A driver behavior detection method, comprising:
    获取车舱内的驾驶位置区域的待检测图像;Obtain the to-be-detected image of the driving position area in the cabin;
    对所述待检测图像进行检测,得到目标检测结果,所述目标检测结果包括方向盘检测结果和人手检测结果;Detecting the to-be-detected image to obtain a target detection result, where the target detection result includes a steering wheel detection result and a human hand detection result;
    根据所述目标检测结果,确定驾驶员的驾驶行为类别;According to the target detection result, determine the driving behavior category of the driver;
    在所述驾驶员的驾驶行为类别为危险驾驶时,发出警示信息。When the driving behavior category of the driver is dangerous driving, a warning message is issued.
  2. 根据权利要求1所述的方法,其中,在所述方向盘检测结果中包括方向盘,所述人手检测结果中包括人手时,所述根据所述目标检测结果,确定驾驶员的驾驶行为类别,包括:The method according to claim 1, wherein, when the steering wheel detection result includes a steering wheel and the human hand detection result includes a human hand, the determining the driving behavior category of the driver according to the target detection result includes:
    根据所述方向盘检测结果和所述人手检测结果,确定方向盘与人手之间的位置关系;According to the detection result of the steering wheel and the detection result of the human hand, determine the positional relationship between the steering wheel and the human hand;
    根据所述位置关系,确定驾驶员的驾驶行为类别。According to the position relationship, the driving behavior category of the driver is determined.
  3. 根据权利要求2所述的方法,其中,所述根据位置关系,确定驾驶员的驾驶行为类别,包括:The method according to claim 2, wherein the determining the driving behavior category of the driver according to the position relationship comprises:
    在所述位置关系指示驾驶员手握方向盘的情况下,确定所述驾驶员的驾驶行为类别为安全驾驶。When the positional relationship indicates that the driver is holding the steering wheel, it is determined that the driving behavior category of the driver is safe driving.
  4. 根据权利要求2所述的方法,其中,所述根据位置关系,确定驾驶员的驾驶行为类别,包括:The method according to claim 2, wherein the determining the driving behavior category of the driver according to the position relationship comprises:
    在所述位置关系指示驾驶员双手脱离方向盘的情况下,确定所述驾驶员的驾驶行为类别为危险驾驶。When the positional relationship indicates that the driver's hands are off the steering wheel, it is determined that the driver's driving behavior is classified as dangerous driving.
  5. 根据权利要求2所述的方法,其中,所述根据所述方向盘检测结果和所述人手检测结果,确定方向盘与人手之间的位置关系,包括:The method according to claim 2, wherein the determining the positional relationship between the steering wheel and the human hand according to the steering wheel detection result and the human hand detection result comprises:
    在所述人手检测结果中包括一只人手的情况下,若所述人手检测结果中人手对应的检测框、与所述方向盘检测结果中方向盘对应的检测框存在重合区域,确定所述方向盘与所述人手之间的位置关系为驾驶员手握方向盘;若所述人手检测结果中人手对应的检测框与所述方向盘检测结果中方向盘对应的检测框不存在重合区域,确定所述方向盘与所述人手之间的位置关系为驾驶员双手脱离方向盘。In the case where the human hand detection result includes a human hand, if the detection frame corresponding to the human hand in the human hand detection result and the detection frame corresponding to the steering wheel in the steering wheel detection result have an overlapping area, it is determined that the steering wheel and the detection frame corresponding to the steering wheel in the steering wheel detection result overlap. The positional relationship between the human hands is that the driver holds the steering wheel; if there is no overlapping area between the detection frame corresponding to the human hand in the human hand detection result and the detection frame corresponding to the steering wheel in the steering wheel detection result, it is determined that the steering wheel and the The positional relationship between the human hands is that the driver's hands are off the steering wheel.
  6. 根据权利要求2所述的方法,其中,所述根据所述方向盘检测结果和所述人手检测结果,确定方向盘与人手之间的位置关系,包括:The method according to claim 2, wherein the determining the positional relationship between the steering wheel and the human hand according to the steering wheel detection result and the human hand detection result comprises:
    在所述人手检测结果中包括两只人手的情况下,若所述人手检测结果中两只人手对应的检测框分别与所述方向盘检测结果中方向盘对应的检测框不存在重合区域,确定所述方向盘与所述人手之间的位置关系为驾驶员双手脱离方向盘;若所述人手检测结果中存在至少一只人手对应的检测框与所述方向盘检测结果中方向盘对应的检测框存在重合区域,确定所述方向盘与所述人手之间的位置关系为驾驶员手握方向盘。In the case where the human hand detection result includes two human hands, if there is no overlapping area between the detection frames corresponding to the two human hands in the human hand detection result and the detection frame corresponding to the steering wheel in the steering wheel detection result, determine the The positional relationship between the steering wheel and the human hand is that the driver's hands are off the steering wheel; if there is an overlapping area between the detection frame corresponding to at least one human hand in the detection result of the human hand and the detection frame corresponding to the steering wheel in the detection result of the steering wheel, determine The positional relationship between the steering wheel and the human hand is that the driver holds the steering wheel.
  7. 根据权利要求2所述的方法,其中,所述根据所述方向盘检测结果和所述人手检测结果,确定方向盘与人手之间的位置关系,包括:The method according to claim 2, wherein the determining the positional relationship between the steering wheel and the human hand according to the steering wheel detection result and the human hand detection result comprises:
    基于所述待检测图像,生成所述待检测图像对应的中间特征图;generating an intermediate feature map corresponding to the to-be-detected image based on the to-be-detected image;
    对所述中间特征图进行至少一次卷积处理,生成所述中间特征图对应的二通道的分类特征图;其中,所述二通道的分类特征图中的每个通道特征图对应一种人手的类别;Perform at least one convolution process on the intermediate feature map to generate a two-channel classification feature map corresponding to the intermediate feature map; wherein, each channel feature map in the two-channel classification feature map corresponds to a type of human hand. category;
    基于所述人手检测结果中人手对应的检测框信息指示的中心点位置信息,从所述分类特征图中提取与所述中心点位置信息匹配的特征位置处的两个特征值;从两个特征值中选取最大特征值,将所述分类特征图中,与所述最大特征值对应的通道特征图的类别,确定为所述中心点位置信息对应的类别;Based on the center point position information indicated by the detection frame information corresponding to the human hand in the hand detection result, two feature values at the feature positions matching the center point position information are extracted from the classification feature map; The maximum eigenvalue is selected from the value, and the category of the channel feature map corresponding to the maximum eigenvalue in the classification feature map is determined as the category corresponding to the center point position information;
    基于所述人手对应的检测框信息指示的每个中心点位置信息对应的类别,确定所述方向盘与所述人手之间的位置关系。The positional relationship between the steering wheel and the human hand is determined based on the category corresponding to each center point position information indicated by the detection frame information corresponding to the human hand.
  8. 根据权利要求7所述的方法,其中,基于所述人手对应的检测框信息指示的每个中心点位置信息对应的类别,确定所述方向盘与人手之间的位置关系,包括:The method according to claim 7, wherein determining the positional relationship between the steering wheel and the human hand based on the category corresponding to each center point position information indicated by the detection frame information corresponding to the human hand, comprising:
    在所述人手对应的检测框信息中包括一个中心点位置信息的情况下,将所述中心点位置信息对应的类别,确定为方向盘与人手之间的位置关系;In the case that the detection frame information corresponding to the human hand includes a center point position information, the category corresponding to the center point position information is determined as the positional relationship between the steering wheel and the human hand;
    在所述人手对应的检测框信息中包括两个中心点位置信息、且所述两个中心点位置信息对应的类别为驾驶员手脱离方向盘的情况下,确定所述方向盘与所述人手之间的位置关系为驾驶员双手脱离方向盘;在所述两个中心点位置信息对应的类别中,存在至少一个中心点位置信息对应的类别为驾驶员手握方向盘的情况下,确定所述方向盘与所述人手之间的位置关系为驾驶员手握方向盘。In the case where the detection frame information corresponding to the human hand includes two center point position information, and the category corresponding to the two center point position information is that the driver's hand is off the steering wheel, determine the distance between the steering wheel and the human hand. The positional relationship is that the driver's hands are off the steering wheel; in the categories corresponding to the two center point position information, there is at least one category corresponding to the center point position information that the driver holds the steering wheel, determine the steering wheel and all The positional relationship between the hands is that the driver holds the steering wheel.
  9. 根据权利要求1所述的方法,其中,所述在所述方向盘检测结果中包括方向盘,所述人手检测结果中未包括人手时,根据所述目标检测结果,确定驾驶员的驾驶行为类别,包括:The method according to claim 1, wherein when the steering wheel detection result includes a steering wheel and the human hand detection result does not include a human hand, determining the driving behavior category of the driver according to the target detection result, including :
    根据所述目标检测结果,确定所述驾驶员的驾驶行为类别为危险驾驶。According to the target detection result, it is determined that the driving behavior category of the driver is dangerous driving.
  10. 根据权利要求1至9任一项所述的方法,其中,所述对所述待检测图像进行检测,得到目标检测结果,包括:The method according to any one of claims 1 to 9, wherein the detecting the to-be-detected image to obtain a target detection result comprises:
    基于所述待检测图像,生成所述待检测图像对应的中间特征图;generating an intermediate feature map corresponding to the to-be-detected image based on the to-be-detected image;
    对所述中间特征图进行至少一次目标卷积处理,生成所述中间特征图对应的多个通道的检测特征图;Perform at least one target convolution process on the intermediate feature map to generate detection feature maps of multiple channels corresponding to the intermediate feature map;
    利用激活函数对多个通道的所述检测特征图中表征位置的目标通道特征图的每个特征值进行特征值转换处理,生成转换后的目标通道特征图;Using the activation function to perform feature value conversion processing on each feature value of the target channel feature map representing the position in the detection feature maps of multiple channels, to generate a converted target channel feature map;
    按照预设的池化尺寸和池化步长,对转换后的目标通道特征图进行最大池化处理,得到多个池化值以及与多个池化值中的每个池化值对应的位置索引;所述位置索引用于标识所述池化值在所述转换后的目标通道特征图中的位置;According to the preset pooling size and pooling step size, the converted target channel feature map is subjected to maximum pooling processing to obtain multiple pooling values and the position corresponding to each pooling value in the multiple pooling values. index; the position index is used to identify the position of the pooled value in the converted target channel feature map;
    基于多个池化值以及与多个池化值中的每个池化值对应的位置索引,生成目标检测框信息;generating target detection frame information based on a plurality of pooling values and a position index corresponding to each of the plurality of pooling values;
    根据所述目标检测框信息,确定所述目标检测结果。The target detection result is determined according to the target detection frame information.
  11. 根据权利要求10所述的方法,其中,所述基于多个池化值以及与多个池化值中的每个池化值对应的位置索引,生成所述目标检测框信息,包括:The method according to claim 10, wherein the generating the target detection frame information based on a plurality of pooling values and a position index corresponding to each of the plurality of pooling values comprises:
    在所述多个池化值中存在至少一个池化值大于设置的池化阈值的情况下,基于所述多个池化值以及池化阈值,从所述多个池化值中确定所述目标检测框的中心点的目标池化值;In the case where at least one pooling value is greater than a set pooling threshold value among the plurality of pooling values, determining the pooling value from the plurality of pooling values based on the plurality of pooling values and the pooling threshold The target pooling value of the center point of the target detection frame;
    基于所述目标池化值对应的位置索引,生成所述目标检测框信息。The target detection frame information is generated based on the position index corresponding to the target pooling value.
  12. 根据权利要求10所述的方法,其中,所述基于多个池化值以及与多个池化值中的每个池化值对应的位置索引,生成所述目标检测框信息,包括:The method according to claim 10, wherein the generating the target detection frame information based on a plurality of pooling values and a position index corresponding to each of the plurality of pooling values comprises:
    在所述多个池化值小于或等于设置的池化阈值的情况下,确定所述目标检测框信息为空。In the case that the multiple pooling values are less than or equal to the set pooling threshold, it is determined that the target detection frame information is empty.
  13. 一种驾驶员行为检测装置,包括:A driver behavior detection device, comprising:
    获取模块,配置为获取车舱内的驾驶位置区域的待检测图像;an acquisition module, configured to acquire a to-be-detected image of the driving position area in the vehicle cabin;
    检测模块,配置为对所述待检测图像进行检测,得到目标检测结果,所述目标检测结果包括方向盘检测结果和人手检测结果;a detection module, configured to detect the to-be-detected image to obtain a target detection result, where the target detection result includes a steering wheel detection result and a human hand detection result;
    确定模块,配置为根据所述目标检测结果,确定驾驶员的驾驶行为类别;a determining module, configured to determine the driving behavior category of the driver according to the target detection result;
    警示模块,配置为在所述驾驶员的驾驶行为类别为危险驾驶时,发出警示信息。The warning module is configured to issue warning information when the driving behavior category of the driver is dangerous driving.
  14. 一种电子设备,包括:处理器、存储器和总线,所述存储器存储有所述处理器可执行的机器可读指令,当电子设备运行时,所述处理器与所述存储器之间通过总线通信,所述机器可读指令被所述处理器执行时执行如权利要求1至12任一所述的驾驶员行为检测方法。An electronic device, comprising: a processor, a memory and a bus, the memory stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor and the memory communicate through the bus , when the machine-readable instructions are executed by the processor, the driver behavior detection method according to any one of claims 1 to 12 is executed.
  15. 一种计算机可读存储介质,所述计算机可读存储介质上存储有计算机程序,该计算机程序被处理器运行时执行如权利要求1至12任一所述的驾驶员行为检测方法。A computer-readable storage medium storing a computer program on the computer-readable storage medium, the computer program executing the driver behavior detection method according to any one of claims 1 to 12 when the computer program is run by a processor.
  16. 一种计算机程序,包括计算机可读代码,当所述计算机可读代码在电子设备中运行时,所述电子设备中的处理器执行配置为实现权利要求1至12中任一所述的驾驶员行为检测方法。A computer program comprising computer readable code, when the computer readable code is run in an electronic device, a processor in the electronic device executes a driver configured to implement any one of claims 1 to 12 Behavioral detection methods.
PCT/CN2020/135501 2020-08-07 2020-12-10 Driver behavior detection method and apparatus, electronic device, storage medium and program WO2022027894A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
KR1020227003906A KR20220032074A (en) 2020-08-07 2020-12-10 Driver behavior detection method, apparatus, electronic device, storage medium and program
JP2022523602A JP2023500218A (en) 2020-08-07 2020-12-10 DRIVER ACTION DETECTION METHOD, APPARATUS, ELECTRONIC DEVICE, STORAGE MEDIUM AND PROGRAM

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010790208.3 2020-08-07
CN202010790208.3A CN111931639A (en) 2020-08-07 2020-08-07 Driver behavior detection method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
WO2022027894A1 true WO2022027894A1 (en) 2022-02-10

Family

ID=73307528

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/135501 WO2022027894A1 (en) 2020-08-07 2020-12-10 Driver behavior detection method and apparatus, electronic device, storage medium and program

Country Status (4)

Country Link
JP (1) JP2023500218A (en)
KR (1) KR20220032074A (en)
CN (1) CN111931639A (en)
WO (1) WO2022027894A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115471826A (en) * 2022-08-23 2022-12-13 中国航空油料集团有限公司 Method and device for judging safe driving behavior of aircraft refueling truck and safe operation and maintenance system

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111931639A (en) * 2020-08-07 2020-11-13 上海商汤临港智能科技有限公司 Driver behavior detection method and device, electronic equipment and storage medium
CN112528910B (en) * 2020-12-18 2023-04-07 上海高德威智能交通系统有限公司 Hand-off steering wheel detection method and device, electronic equipment and storage medium
CN113486759B (en) * 2021-06-30 2023-04-28 上海商汤临港智能科技有限公司 Dangerous action recognition method and device, electronic equipment and storage medium
CN115171082B (en) * 2022-06-29 2024-01-19 北京百度网讯科技有限公司 Driving behavior detection method and device, electronic equipment and readable storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102263937A (en) * 2011-07-26 2011-11-30 华南理工大学 Driver's driving behavior monitoring device and monitoring method based on video detection
CN102289660A (en) * 2011-07-26 2011-12-21 华南理工大学 Method for detecting illegal driving behavior based on hand gesture tracking
CN109034111A (en) * 2018-08-17 2018-12-18 北京航空航天大学 A kind of driver's hand based on deep learning is from steering wheel detection method and system
CN109086662A (en) * 2018-06-19 2018-12-25 浙江大华技术股份有限公司 A kind of anomaly detection method and device
US20200143563A1 (en) * 2017-11-22 2020-05-07 Beijing Sensetime Technology Development Co., Ltd. Methods and apparatuses for object detection, and devices
CN111931639A (en) * 2020-08-07 2020-11-13 上海商汤临港智能科技有限公司 Driver behavior detection method and device, electronic equipment and storage medium

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5018926B2 (en) * 2010-04-19 2012-09-05 株式会社デンソー Driving assistance device and program
CN104276080B (en) * 2014-10-16 2016-04-06 北京航空航天大学 Bus man hand detects forewarn system and method for early warning from bearing circle
CN107766865A (en) * 2017-11-06 2018-03-06 北京旷视科技有限公司 Pond method, object detecting method, device, system and computer-readable medium
CN111439170B (en) * 2020-03-30 2021-09-17 上海商汤临港智能科技有限公司 Child state detection method and device, electronic equipment and storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102263937A (en) * 2011-07-26 2011-11-30 华南理工大学 Driver's driving behavior monitoring device and monitoring method based on video detection
CN102289660A (en) * 2011-07-26 2011-12-21 华南理工大学 Method for detecting illegal driving behavior based on hand gesture tracking
US20200143563A1 (en) * 2017-11-22 2020-05-07 Beijing Sensetime Technology Development Co., Ltd. Methods and apparatuses for object detection, and devices
CN109086662A (en) * 2018-06-19 2018-12-25 浙江大华技术股份有限公司 A kind of anomaly detection method and device
CN109034111A (en) * 2018-08-17 2018-12-18 北京航空航天大学 A kind of driver's hand based on deep learning is from steering wheel detection method and system
CN111931639A (en) * 2020-08-07 2020-11-13 上海商汤临港智能科技有限公司 Driver behavior detection method and device, electronic equipment and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115471826A (en) * 2022-08-23 2022-12-13 中国航空油料集团有限公司 Method and device for judging safe driving behavior of aircraft refueling truck and safe operation and maintenance system
CN115471826B (en) * 2022-08-23 2024-03-26 中国航空油料集团有限公司 Method and device for judging safe driving behavior of aviation fueller and safe operation and maintenance system

Also Published As

Publication number Publication date
CN111931639A (en) 2020-11-13
KR20220032074A (en) 2022-03-15
JP2023500218A (en) 2023-01-05

Similar Documents

Publication Publication Date Title
WO2022027894A1 (en) Driver behavior detection method and apparatus, electronic device, storage medium and program
US20220084316A1 (en) Method and electronic device for recognizing abnormal sitting posture, and storage medium
KR20190060817A (en) Image based vehicle damage determination method and apparatus, and electronic device
CN111259737B (en) Method and device for predicting failure of steering wheel of vehicle, electronic equipment and storage medium
JP7288097B2 (en) Seat belt wearing detection method, device, electronic device, storage medium and program
CN111523489A (en) Generation method of age classification network, and vehicle-mounted person detection method and device
CN111582272A (en) Double-row license plate recognition method, device and equipment and computer readable storage medium
CN110598562A (en) Vehicle image acquisition guiding method and device
CN107867295B (en) Accident early warning method based on vehicle risk probability, storage device and vehicle-mounted terminal
CN112818839A (en) Method, device, equipment and medium for identifying violation behaviors of driver
CN114373189A (en) Behavior detection method and apparatus, terminal device and storage medium
CN111310650A (en) Vehicle riding object classification method and device, computer equipment and storage medium
CN112926544A (en) Driving state determination method, device, equipment and storage medium
CN112883843A (en) Driver visual salient region detection method and device and computer equipment
US10266132B2 (en) Method for operating driver assistance systems in a motor vehicle, and motor vehicle
CN113051958A (en) Driver state detection method, system, device and medium based on deep learning
CN112277956B (en) Method and device for detecting drunk driving behavior by using steering wheel
CN115115531A (en) Image denoising method and device, vehicle and storage medium
CN113920310A (en) Method and device for detecting steering wheel hands off
JP2021096710A (en) Agent device, agent system, and agent program
CN110751008B (en) Processing method, device, equipment and storage medium based on driving behavior
CN114241453B (en) Driver distraction driving monitoring method utilizing key point attention
CN111797784B (en) Driving behavior monitoring method and device, electronic equipment and storage medium
CN112215840A (en) Image detection method, image detection device, driving control method, driving control device, electronic equipment and storage medium
CN113569844A (en) License plate detection method and device

Legal Events

Date Code Title Description
ENP Entry into the national phase

Ref document number: 20227003906

Country of ref document: KR

Kind code of ref document: A

121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20947943

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2022523602

Country of ref document: JP

Kind code of ref document: A

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 10.07.2023)

122 Ep: pct application non-entry in european phase

Ref document number: 20947943

Country of ref document: EP

Kind code of ref document: A1