CN110188645B - Face detection method and device for vehicle-mounted scene, vehicle and storage medium - Google Patents

Face detection method and device for vehicle-mounted scene, vehicle and storage medium Download PDF

Info

Publication number
CN110188645B
CN110188645B CN201910431152.XA CN201910431152A CN110188645B CN 110188645 B CN110188645 B CN 110188645B CN 201910431152 A CN201910431152 A CN 201910431152A CN 110188645 B CN110188645 B CN 110188645B
Authority
CN
China
Prior art keywords
face
vehicle
mounted scene
image
scene
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910431152.XA
Other languages
Chinese (zh)
Other versions
CN110188645A (en
Inventor
雷宇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Apollo Zhilian Beijing Technology Co Ltd
Original Assignee
Apollo Zhilian Beijing Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Apollo Zhilian Beijing Technology Co Ltd filed Critical Apollo Zhilian Beijing Technology Co Ltd
Priority to CN201910431152.XA priority Critical patent/CN110188645B/en
Publication of CN110188645A publication Critical patent/CN110188645A/en
Application granted granted Critical
Publication of CN110188645B publication Critical patent/CN110188645B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/50Context or environment of the image
    • G06V20/59Context or environment of the image inside of a vehicle, e.g. relating to seat occupancy, driver state or inner lighting conditions
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/16Human faces, e.g. facial parts, sketches or expressions
    • G06V40/161Detection; Localisation; Normalisation

Abstract

The application provides a face detection method and device for a vehicle-mounted scene, a vehicle and a storage medium, and belongs to the technical field of computer application. Wherein, the method comprises the following steps: acquiring a collected real-time video aiming at the vehicle-mounted scene; extracting each frame image in the real-time video; and detecting whether a human face exists in the vehicle-mounted scene or not according to each frame of image and a human face interesting region set in the vehicle-mounted scene which is constructed in advance. Therefore, the face interesting region set in the vehicle-mounted scene is constructed in advance through the face detection method for the vehicle-mounted scene, so that the face is detected only in the face interesting region, the calculation complexity of face identification is reduced, the calculation resources are saved, false detection and missing detection can be avoided, and the identification accuracy is improved.

Description

Face detection method and device for vehicle-mounted scene, vehicle and storage medium
Technical Field
The present application relates to the field of computer application technologies, and in particular, to a method and an apparatus for detecting a human face in a vehicle-mounted scene, a vehicle, and a storage medium.
Background
With the rapid development of economy, the holding capacity of motor vehicles in various countries is also rapidly increased. However, the increase in the number of motor vehicles kept has also led to the frequent occurrence of traffic accidents. With the continuous maturity of computer technology nowadays, the safety performance of a vehicle can be improved by providing a driver behavior detection system, an antitheft system, and the like in the vehicle. Many in-vehicle security systems rely on face recognition technology.
In the related art, face recognition in a vehicle-mounted environment is generally performed by a face detection and tracking method in a conventional computer vision algorithm. However, the vehicle-mounted environment is narrow in space, extremely deficient in computing resources, and high in computing complexity of the traditional computer vision algorithm, so that the traditional computer vision algorithm is applied to the vehicle-mounted environment for face recognition, not only occupies more computing resources, but also is easy to generate false detection and missed detection, and is low in recognition accuracy.
Disclosure of Invention
The method, the device, the vehicle and the storage medium for detecting the face of the vehicle-mounted scene are used for solving the problems that in the related technology, a traditional computer vision algorithm is applied to a vehicle-mounted environment for face recognition, so that not only can more computing resources be occupied, but also false detection and missing detection are easy to generate, and the recognition accuracy is low.
In one aspect of the present application, a face detection method for a vehicle-mounted scene provided in an embodiment includes: acquiring a collected real-time video aiming at the vehicle-mounted scene; extracting each frame image in the real-time video; and detecting whether a human face exists in the vehicle-mounted scene or not according to the image of each frame and a human face interesting region set in the vehicle-mounted scene which is constructed in advance.
The embodiment of the application provides a face detection device for a vehicle-mounted scene, which comprises: the video acquisition module is used for acquiring the acquired real-time video aiming at the vehicle-mounted scene; the image extraction module is used for extracting each frame of image in the real-time video; and the face detection module is used for detecting whether a face exists in the vehicle-mounted scene or not according to the image of each frame and a pre-constructed face interesting region set in the vehicle-mounted scene.
An embodiment of another aspect of the present application provides a vehicle, including: memory, processor and computer program stored on the memory and operable on the processor, characterized in that the processor implements the method for face detection for an in-vehicle scene as described above when executing the program.
In another aspect, the present application provides a computer-readable storage medium, on which a computer program is stored, where the computer program is executed by a processor to implement the method for detecting a human face for an in-vehicle scene as described above.
In another aspect of the present application, a computer program is provided, where the computer program is executed by a processor to implement the method for detecting a face of a vehicle-mounted scene according to the embodiment of the present application.
The face detection method, the face detection device, the vehicle, the computer-readable storage medium and the computer program for the vehicle-mounted scene provided by the embodiment of the application can acquire the acquired real-time video aiming at the vehicle-mounted scene, extract each frame of image in the real-time video, and further detect whether the face exists in the vehicle-mounted scene according to each frame of image and the pre-constructed face interesting region set in the vehicle-mounted scene. Therefore, the face interesting region set in the vehicle-mounted scene is constructed in advance, so that the face is only detected in the face interesting region, the calculation complexity of face identification is reduced, the calculation resources are saved, false detection and missing detection can be avoided, and the identification accuracy is improved.
Additional aspects and advantages of the present application will be set forth in part in the description which follows and, in part, will be obvious from the description, or may be learned by practice of the present application.
Drawings
The above and/or additional aspects and advantages of the present application will become apparent and readily appreciated from the following description of the embodiments, taken in conjunction with the accompanying drawings of which:
fig. 1 is a schematic flowchart of a face detection method for a vehicle-mounted scene according to an embodiment of the present application;
fig. 2 is a schematic flowchart of another face detection method for a vehicle-mounted scene according to an embodiment of the present disclosure;
fig. 3 is a schematic structural diagram of a face detection apparatus for a vehicle-mounted scene according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of a vehicle according to an embodiment of the present application.
Detailed Description
Reference will now be made in detail to the embodiments of the present application, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to the like or similar elements throughout. The embodiments described below with reference to the drawings are exemplary and intended to be used for explaining the present application and should not be construed as limiting the present application.
The embodiment of the application provides a face detection method for a vehicle-mounted scene, aiming at the problems that in the related technology, a traditional computer vision algorithm is applied to a vehicle-mounted environment for face recognition, so that not only can more computing resources be occupied, but also false detection and missing detection are easy to generate, and the recognition accuracy rate is low.
The face detection method for the vehicle-mounted scene, provided by the embodiment of the application, can acquire the collected real-time video aiming at the vehicle-mounted scene, extract each frame of image in the real-time video, and further detect whether the face exists in the vehicle-mounted scene according to each frame of image and the face interesting region set in the vehicle-mounted scene constructed in advance. Therefore, the face interesting region set in the vehicle-mounted scene is constructed in advance, so that the face is only detected in the face interesting region, the calculation complexity of face identification is reduced, the calculation resources are saved, false detection and missing detection can be avoided, and the identification accuracy is improved.
The following describes a face detection method, a face detection device, a vehicle, a storage medium, and a computer program for a vehicle-mounted scene provided in the present application in detail with reference to the accompanying drawings.
Fig. 1 is a schematic flow chart of a face detection method for a vehicle-mounted scene according to an embodiment of the present application.
As shown in fig. 1, the method for detecting a human face in a vehicle scene includes the following steps:
step 101, acquiring the acquired real-time video aiming at the vehicle-mounted scene.
It should be noted that the face detection method for the vehicle-mounted scene in the embodiment of the present application may be executed by the face detection apparatus for the vehicle-mounted scene provided by the present application. In practical use, the face detection device for the vehicle-mounted scene provided by the embodiment of the application can be configured in any vehicle to execute the face detection method for the vehicle-mounted scene.
In the embodiment of the application, a camera can be installed in the vehicle to acquire video information in the vehicle, namely the video information in the vehicle-mounted scene, and the acquired video information is stored in the storage device in the vehicle. The number and the installation positions of the cameras can be set according to actual face recognition requirements. For example, if only the face of the driver needs to be detected, a camera can be installed at a suitable position in front of the driver seat; if the human faces of passengers at all seats in the vehicle need to be detected, cameras can be mounted at appropriate positions in front of all the seats, or images of all the seats in the vehicle can be collected by one camera, or only one camera can be mounted at an appropriate position to collect images of all the seats in the vehicle.
As a possible implementation manner, the face detection apparatus for an in-vehicle scene according to the embodiment of the present application may acquire a required real-time video for the in-vehicle scene from a storage device of a vehicle according to current time information, or may also acquire a required historical video for the in-vehicle scene from a storage device of a vehicle according to historical time information.
As a possible implementation manner, the communication connection between the camera and the face detection device for the vehicle-mounted scene may also be established through wired connection or wireless network connection, so that the camera may directly send the acquired real-time video in the vehicle-mounted scene to the face detection device for the vehicle-mounted scene, so as to acquire the real-time video in the vehicle-mounted scene.
And 102, extracting each frame of image in the real-time video.
In the embodiment of the application, after the acquired real-time video in the vehicle-mounted scene is acquired, each frame of image in the real-time video can be identified, so that whether the face is contained in the vehicle-mounted environment or not in the time range corresponding to the acquired real-time video is determined. Therefore, each frame of image in the real-time video can be extracted, that is, the real-time video is read in units of frames, and each frame of image in the real-time video can be saved when necessary.
And 103, detecting whether a human face exists in the vehicle-mounted scene or not according to each frame of image and a human face interesting region set in the vehicle-mounted scene which is constructed in advance.
The human face interesting region refers to a region corresponding to a preset human face in an image. It should be noted that, when the face detection needs to be performed on multiple positions in the vehicle, the face roi set may include multiple face rois.
In the embodiment of the application, because the positions of the faces of the driver and the passengers at all seats are relatively fixed in the vehicle-mounted environment, the priori knowledge of the face region in the image acquired by the camera can be acquired according to the installation position of the camera in the vehicle, so that the face region-of-interest set in the vehicle-mounted scene is constructed in advance.
As a possible implementation manner, after each frame of image in the real-time video is extracted, the face roi in each frame of image can be determined according to a face roi set of the pre-constructed vehicle-mounted scene, and then whether the face roi of each frame of image contains a face is detected, so as to determine whether a face exists in the vehicle-mounted scene according to the detection result of each frame of image. That is, in a possible implementation form of the embodiment of the present application, the step 103 may include:
determining a face interested area in each frame of image according to the face interested area set;
judging whether a human face exists in the human face interesting region in each frame of image;
if yes, judging that a human face exists in the vehicle-mounted scene;
if not, judging that the human face is not detected in the vehicle-mounted scene.
As a possible implementation manner, each face region of interest in the face region of interest set may be represented by a pixel coordinate of each face region of interest in an image, so that after each frame of image in the real-time video is extracted, each face region of interest in each frame of image in the real-time video is determined according to the pixel coordinate of each face region of interest in the face region of interest set. And then judging whether the human face exists in the region of interest of each human face in each frame of image by using a human face detection algorithm.
Specifically, if the image includes a face region of interest in which a face exists, it may be determined that the face exists in the image, that is, it may be determined that the face exists in the vehicle-mounted scene; if no human face exists in each region of interest of the human face in each frame of image, the fact that no human face is detected in the vehicle-mounted scene can be judged.
It should be noted that the number of the face roi in the face roi set is related to the actual scene for face detection. If only one position in the vehicle is subjected to face detection, for example, only the driving seat is subjected to face detection, only one face can be included in the face region-of-interest set; if face detection needs to be performed on a plurality of positions in the vehicle, for example, face detection needs to be performed on all seats in the vehicle, the face roi set may include a plurality of face rois, that is, the number of face rois included in the face roi set is the same as the number of positions where face detection needs to be performed.
Optionally, when face detection needs to be performed on a plurality of positions in the vehicle and each position corresponds to one camera, the identifier of the camera and the corresponding relationship between the identifier of the camera and the face region of interest can be preset. Therefore, after each frame of image of the real-time video is extracted, the face interesting region corresponding to the real-time video can be determined from the face interesting region set according to the identification of the camera for collecting the real-time video and the corresponding relation between the preset identification of the camera and the face interesting region, and the face interesting region in each frame of image can be determined according to the face interesting region corresponding to the real-time video.
In the embodiment of the application, if the face is determined to exist in the vehicle-mounted scene, the face detected in the vehicle-mounted scene can be determined; otherwise, it can be determined that no face is detected in the vehicle-mounted scene.
The face detection method for the vehicle-mounted scene can acquire the collected real-time video aiming at the vehicle-mounted scene, extract each frame image in the real-time video, and detect whether the face exists in the vehicle-mounted scene according to each frame image and the face interesting region set in the vehicle-mounted scene which is constructed in advance. Therefore, the face interesting region set in the vehicle-mounted scene is constructed in advance, so that the face is only detected in the face interesting region, the calculation complexity of face identification is reduced, the calculation resources are saved, false detection and missing detection can be avoided, and the identification accuracy is improved.
In a possible implementation form of the method, a face region-of-interest set in the vehicle-mounted scene can be constructed according to prior knowledge such as the position relation between a camera in the vehicle-mounted scene and a seat needing face detection; or the human face can be constructed in advance according to the occurrence probability of the human face at each position in the vehicle-mounted environment.
The following further describes the face detection method for a vehicle-mounted scene provided in the embodiment of the present application with reference to fig. 2.
Fig. 2 is a schematic flow chart of another face detection method for a vehicle-mounted scene according to an embodiment of the present application.
As shown in fig. 2, the face detection method for a vehicle-mounted scene includes the following steps:
step 201, determining the position relation between a camera and a target seat in the vehicle-mounted scene.
The target seat refers to a seat which needs to be subjected to face detection in the current vehicle-mounted scene. For example, if the face detection needs to be performed on the driver in the current vehicle-mounted scene, the target seat is the driving position; and if the face detection needs to be carried out on all passengers in the current vehicle-mounted scene, the target seats are all seats in the vehicle.
In the embodiment of the application, a face region-of-interest set in a vehicle-mounted scene can be constructed according to the position relationship between a camera and a target seat in the vehicle-mounted scene. The position relation between the camera and the target seat in the vehicle-mounted scene is determined when the camera is installed.
Optionally, the position relationship between the camera and the target seat in the vehicle-mounted scene may be determined by establishing a three-dimensional coordinate system in the vehicle-mounted scene. For example, a three-dimensional coordinate system may be established with a central point in the vehicle-mounted environment as an origin of coordinates, a vehicle horizontal direction as an X axis, a vehicle forward direction as a Y axis, and a vertical ground direction as a Z axis, and coordinates of a camera central point in the three-dimensional coordinate system and coordinates of a target seat back central point in the three-dimensional coordinate system may be determined, and then a positional relationship between the camera and the target seat in the vehicle-mounted scene may be determined according to the coordinates of the camera central point and the coordinates of the target seat back central point in the three-dimensional coordinate system. For example, the position relationship may include parameters such as a linear distance between a center point of the camera and a center point of the target seat back, and included angles between a connecting line between the center point of the camera and the center point of the target seat back and the X axis, the Y axis, and the Z axis, respectively.
As a possible implementation manner, if there are a plurality of target seats and one camera, the position relationship between the camera and each target seat can be determined respectively; if there are a plurality of target seats and cameras, that is, each target seat corresponds to one camera, the position relationship between each camera and the corresponding target seat can be determined respectively.
It should be noted that, the method for determining the position relationship between the camera and the target seat in the vehicle-mounted scene, and the parameters included in the position relationship may include, but are not limited to, the above-listed situations. In actual use, a method for determining the position relationship between the camera and the target seat in the vehicle-mounted scene and parameters included in the position relationship can be preset according to actual needs, and the method is not limited in the embodiment of the application.
Step 202, constructing a human face region-of-interest set in the vehicle-mounted scene according to the position relation between a camera and a target seat in the vehicle-mounted scene; wherein the face region-of-interest set has at least one face region-of-interest.
It should be noted that there is at least one face region of interest in the face region of interest set, and the number of face regions of interest in the face region of interest set is the same as the number of target seats. For example, if there is one target seat, the face region-of-interest set has one face region-of-interest; if the number of the target seats is multiple, the face interesting region set has multiple face interesting regions.
As a possible implementation, since the height of a human being is in a relatively fixed range, when a passenger sits in the seat, the relative position of the face of the passenger and the seat is also relatively fixed. Therefore, in a possible implementation form of the embodiment of the present application, the position of the human body in the target seat can be determined according to the position of the target seat in the vehicle-mounted scene and the height range of the human body, and then the position of the human face in the target seat is determined according to the proportional relationship between the head and the body of the human body. And then, the position relation between the face corresponding to the target seat and the camera can be determined according to the determined position relation between the camera and the target seat, so that the position of the face in an image shot by the camera, namely the face interesting region corresponding to the target seat, can be determined according to the shooting parameters of the camera. If the number of the target seats is multiple, the human face interesting regions corresponding to the target seats can be respectively determined according to the method, so that a human face interesting region set is formed.
It should be noted that the height range of the human and the proportional relationship between the head and the body of the human can be obtained according to the statistical data of the physiological characteristics of the human, and can be preset in the face detection device for the vehicle-mounted scene.
Further, if the face region-of-interest set cannot be constructed by using the position relationship between the camera and the target seat, the face region-of-interest set can be determined according to the occurrence probability of the face at each position in the vehicle-mounted environment. That is, in a possible implementation form of the embodiment of the present application, a face region-of-interest set may be further constructed in advance by the following steps:
acquiring a sample video image aiming at the inside of the vehicle-mounted scene;
carrying out face detection on the sample video image based on a face detection algorithm to determine a face occurrence probability heat map in the vehicle-mounted scene;
constructing a human face interesting region set in the vehicle-mounted scene according to the human face occurrence probability heat map; wherein the face region-of-interest set has at least one face region-of-interest.
The sample video image may be a historical video image within a period of time acquired by a camera in the vehicle-mounted scene, for example, the sample video image may be a historical video image within a period of one month, three months, or the like. It can be understood that the sample video image in the vehicle-mounted scene can record the appearance of the human face at each position in the vehicle-mounted scene in the corresponding time range of the sample video image.
It should be noted that, in actual use, the duration of the obtained sample video image may be preset according to actual needs, and this is not limited in the embodiment of the present application.
As a possible implementation manner, a camera in the vehicle-mounted environment may store the acquired video image in a storage device in the vehicle-mounted scene, so that a sample video image in the vehicle-mounted scene may be acquired from the storage device in the vehicle-mounted environment. Then, based on a face detection algorithm, face detection is carried out on each frame of image in the sample video image, and then a face occurrence probability heat map in the vehicle-mounted scene is determined according to the position of the detected face in each frame of image, so that a face interesting region set in vehicle-mounted vacation can be constructed according to the face occurrence probability heat map.
Specifically, the face occurrence probability heatmap includes occurrence probabilities of faces in respective regions in an image acquired by a camera, so that one or more regions with the highest occurrence probability can be determined as face regions of interest, and a face region of interest set is constructed according to the determined one or more face regions of interest.
It should be noted that the face detection algorithm for performing face detection on the sample video image may be preset in advance. In practical use, a suitable face detection algorithm can be selected according to parameters such as detection accuracy required by a specific application scene, calculation capability of a calculation device and the like, and the application is not limited to this.
Step 203, acquiring the collected real-time video aiming at the vehicle-mounted scene.
And step 204, extracting each frame of image in the real-time video.
Step 205, detecting whether a human face exists in the vehicle-mounted scene according to each frame of image and a human face region-of-interest set in the vehicle-mounted scene which is constructed in advance.
The detailed implementation process and principle of steps 203 to 205 may refer to the detailed description of the above embodiments, and are not described herein again.
And step 206, if the detected face exists, sending the current frame image of the detected face to the terminal equipment of the user for reminding.
In a possible implementation form of the embodiment of the application, different subsequent processing can be performed on the face detection result in the vehicle-mounted scene according to the actual application scene.
As a possible implementation manner, if the actual application scene is anti-theft, when the face is detected in the vehicle-mounted scene is determined, the current frame image in which the face is detected is sent to the terminal device of the user for reminding, so that the user can judge whether the vehicle is opened by a stranger according to the acquired face image.
Further, if faces appear in consecutive multi-frame images, the video segment corresponding to the multi-frame images may be sent to the terminal device of the user, that is, in a possible implementation form of this embodiment, the step 206 may further include:
when the face is detected by the continuous multi-frame images, the continuous multi-frame images are sent to the terminal equipment of the user in a video clip mode.
It should be noted that, if it is determined that faces appear in the continuous multi-frame images, the video segments corresponding to the continuous multi-frame images can be captured from the real-time video and sent to the terminal device of the user, so that the feedback result is more vivid and accurate, and the user can conveniently check and judge the video segments.
Preferably, the user may also preset a terminal device that can receive the feedback information and a time for receiving the feedback information. For example, when a user uses a vehicle, the user may prohibit a face detection device for a vehicle-mounted scene from sending face image information or video information, so as to avoid frequently acquiring useless information; when the vehicle is not used, the function of sending the face image information or the video information is started.
As a possible implementation manner, after the face recognition result in the vehicle-mounted scene is obtained, the number of faces in the vehicle-mounted environment may be counted, and the statistical data may be sent to the terminal device of the user. Specifically, if it is determined that no face exists in the vehicle-mounted scene, the number of faces in the vehicle-mounted scene can be determined to be 0; if the human face exists in the vehicle-mounted scene, the number of the interested areas with the detected human face can be determined as the number of the human faces in the vehicle-mounted environment; or, the facial features of each detected face can be identified and compared to determine different detected faces, so as to determine the number of faces in the vehicle-mounted scene.
Optionally, when the statistical data is sent to the terminal device of the user, the number of the faces in the vehicle-mounted scene counted each time can be sent to the terminal device of the user in real time, or the total number of the faces counted in the preset time period can be sent to the terminal device of the user according to the preset time period of the user.
It should be noted that, during actual use, the terminal device that receives the statistical data, the feedback mode of the statistical data, the time period, and the like may be preset according to an actual application scenario and a user requirement, which is not limited in the embodiment of the present application.
For example, when the face detection device for the vehicle-mounted scene in the embodiment of the application is applied to a taxi, the terminal device for receiving the statistical data is a mobile phone of a driver and a data statistics platform of a taxi company, and the preset time period for receiving the statistical data is 1 day, the number of passengers in the taxi can be determined according to the face recognition result of each time, and the sum of the number of the passengers per day is counted and sent to the mobile phone of the driver, and the data statistics platform of the taxi company is used for the driver and the taxi company to know the operation condition of the vehicle.
As a possible implementation manner, the face recognition result of the embodiment of the present application may also be used in safety driving scenarios such as driver fatigue detection, smoking detection, phone call detection, and sight line detection, and only a corresponding recognition algorithm needs to be used to further recognize and process the face detection result of the embodiment of the present application, so as to determine whether an irregular dangerous driving behavior exists in the driver.
Specifically, if it is determined that a face exists in the vehicle-mounted scene, a preset face recognition algorithm may be used to recognize the detected face image, so as to determine whether a preset dangerous driving behavior exists in the detected face image, and if so, the driver may be prompted through a buzzer, a voice prompt, and the like.
It should be noted that the face detection method for a vehicle-mounted scene provided in the embodiment of the present application can reduce the computational complexity of a face recognition scene, and application scenes may include, but are not limited to, the above-listed situations.
According to the face detection method for the vehicle-mounted scene, the position relation between a camera and a target seat in the vehicle-mounted scene is determined, a face interesting area set in the vehicle-mounted scene is constructed according to the position relation between the camera and the target seat in the vehicle-mounted scene, the collected real-time video aiming at the vehicle-mounted scene is obtained, then whether a face exists in the vehicle-mounted scene or not is detected according to each frame image in the extracted real-time video and the face interesting area set in the vehicle-mounted scene constructed in advance, and then when the face is determined to be detected in the vehicle-mounted scene, the current frame image with the detected face is sent to terminal equipment of a user to be reminded. Therefore, by constructing the face interesting region set in the vehicle-mounted scene in advance and feeding back the face detection result to the user, the calculation complexity of face recognition is reduced, the calculation resources are saved, the recognition accuracy is improved, the interchangeability and the expandability are improved, and the user experience is further improved.
In order to implement the above embodiments, the present application further provides a face detection apparatus for a vehicle-mounted scene.
Fig. 3 is a schematic structural diagram of a face detection apparatus for a vehicle-mounted scene according to an embodiment of the present application.
As shown in fig. 3, the face detection apparatus 30 for an in-vehicle scene includes:
the video acquisition module 31 is configured to acquire a collected real-time video for the vehicle-mounted scene;
an image extraction module 32, configured to extract each frame of image in the real-time video;
and the face detection module 33 is configured to detect whether a face exists in the vehicle-mounted scene according to each frame of image and a pre-constructed face roi set in the vehicle-mounted scene.
In practical use, the face detection device for an in-vehicle scene provided by the embodiment of the application can be configured in any vehicle to execute the face detection method for an in-vehicle scene.
The face detection device for the vehicle-mounted scene, provided by the embodiment of the application, can acquire the collected real-time video aiming at the vehicle-mounted scene, extract each frame of image in the real-time video, and further detect whether the face exists in the vehicle-mounted scene according to each frame of image and the face interesting region set in the vehicle-mounted scene constructed in advance. Therefore, the human face interesting region set in the vehicle-mounted scene is constructed in advance, so that the human face is detected only in the human face interesting region, the calculation complexity of human face recognition is reduced, the calculation resources are saved, false detection and missing detection can be avoided, and the recognition accuracy is improved.
In a possible implementation form of the present application, the face detection apparatus 30 for an on-vehicle scene further includes:
the face interesting region set building module is used for pre-building a face interesting region set in the vehicle-mounted scene;
the face region-of-interest set construction module is specifically configured to:
determining the position relation between a camera and a target seat in the vehicle-mounted scene;
constructing a human face region-of-interest set in the vehicle-mounted scene according to the position relation between a camera and a target seat in the vehicle-mounted scene; wherein the face region-of-interest set has at least one face region-of-interest.
Further, in another possible implementation form of the present application, the face detection apparatus 30 for a vehicle-mounted scene further includes:
the face interesting region set building module is used for pre-building a face interesting region set in the vehicle-mounted scene;
the face region-of-interest set construction module is specifically configured to:
acquiring a sample video image for the vehicle-mounted scene;
carrying out face detection on the sample video image based on a face detection algorithm to determine a face occurrence probability heat map in the vehicle-mounted scene;
constructing a human face interesting region set in the vehicle-mounted scene according to the human face occurrence probability heat map; wherein the face region-of-interest set has at least one face region-of-interest.
Further, in another possible implementation form of the present application, the face detection module 33 is specifically configured to:
determining a face interesting region in each frame of image according to the face interesting region set;
judging whether a human face exists in the human face interesting region in each frame of image;
if yes, judging that a human face exists in the vehicle-mounted scene;
if not, judging that the human face is not detected in the vehicle-mounted scene.
Further, in another possible implementation form of the present application, the above-mentioned face detection apparatus 30 for a vehicle-mounted scene further includes:
and the reminding module is used for sending the current frame image of the detected face to the terminal equipment of the user for reminding after the face is detected in the vehicle-mounted scene.
Further, in another possible implementation form of the present application, the reminding module is further configured to:
when the face is detected by the continuous multi-frame images, the continuous multi-frame images are sent to the terminal equipment of the user in a video clip mode.
It should be noted that the foregoing explanation on the embodiment of the face detection method for a vehicle-mounted scene shown in fig. 1 and fig. 2 is also applicable to the face detection apparatus 30 for a vehicle-mounted scene in this embodiment, and is not repeated here.
The face detection device for the vehicle-mounted scene provided by the embodiment of the application constructs a face region-of-interest set in the vehicle-mounted scene by determining the position relationship between the camera and the target seat in the vehicle-mounted scene and according to the position relationship between the camera and the target seat in the vehicle-mounted scene, acquires the acquired real-time video aiming at the vehicle-mounted scene, detects whether a face exists in the vehicle-mounted scene according to each frame image in the extracted real-time video and the pre-constructed face region-of-interest set in the vehicle-mounted scene, and then sends the current frame image with the detected face to the terminal equipment of a user for reminding when the face is determined to be detected in the vehicle-mounted scene. Therefore, by constructing the face interesting region set in the vehicle-mounted scene in advance and feeding back the face detection result to the user, the calculation complexity of face recognition is reduced, the calculation resources are saved, the recognition accuracy is improved, the interchangeability and the expandability are improved, and the user experience is further improved.
In order to realize the above embodiment, the present application also proposes a vehicle.
Fig. 4 is a schematic structural view of a vehicle according to an embodiment of the present invention.
As shown in fig. 4, the vehicle 200 includes:
a memory 210 and a processor 220, a bus 230 connecting different components (including the memory 210 and the processor 220), wherein the memory 210 stores a computer program, and when the processor 220 executes the program, the method for detecting a human face for a vehicle-mounted scene according to the embodiment of the present application is implemented.
Bus 230 represents one or more of any of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, and a processor or local bus using any of a variety of bus architectures. By way of example, such architectures include, but are not limited to, industry Standard Architecture (ISA) bus, micro-channel architecture (MAC) bus, enhanced ISA bus, video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect (PCI) bus.
The vehicle 200 typically includes a variety of electronic device readable media. Such media may be any available media that is accessible by vehicle 200 and includes both volatile and nonvolatile media, removable and non-removable media.
Memory 210 may also include computer system readable media in the form of volatile memory, such as Random Access Memory (RAM) 240 and/or cache memory 250. The vehicle 200 may further include other removable/non-removable, volatile/nonvolatile computer system storage media. By way of example only, storage system 260 may be used to read from and write to non-removable, nonvolatile magnetic media (not shown in FIG. 4, and commonly referred to as a "hard drive"). Although not shown in FIG. 4, a magnetic disk drive for reading from and writing to a removable, nonvolatile magnetic disk (e.g., a "floppy disk") and an optical disk drive for reading from or writing to a removable, nonvolatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to bus 230 by one or more data media interfaces. Memory 210 may include at least one program product having a set (e.g., at least one) of program modules that are configured to carry out the functions of embodiments of the application.
A program/utility 280 having a set (at least one) of program modules 270, including but not limited to an operating system, one or more application programs, other program modules, and program data, each of which or some combination thereof may comprise an implementation of a network environment, may be stored in, for example, the memory 210. The program modules 270 generally perform the functions and/or methodologies of the embodiments described herein.
Vehicle 200 may also communicate with one or more external devices 290 (e.g., keyboard, pointing device, display 291, etc.), with one or more devices that enable a user to interact with the vehicle 200, and/or with any devices (e.g., network card, modem, etc.) that enable the vehicle 200 to communicate with one or more other computing devices. Such communication may occur via input/output (I/O) interfaces 292. Also, the vehicle 200 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network, such as the internet) via the network adapter 293. As shown, the network adapter 293 communicates with the other modules of the vehicle 200 via the bus 230. It should be appreciated that although not shown in the figures, other hardware and/or software modules may be used in connection with the vehicle 200, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, to name a few.
The processor 220 executes various functional applications and data processing by executing programs stored in the memory 210.
It should be noted that, for the implementation process and the technical principle of the vehicle of the embodiment, reference is made to the foregoing explanation of the face detection method for the vehicle-mounted scene in the embodiment of the present application, and details are not repeated here.
The vehicle provided by the embodiment of the application can execute the face detection method for the vehicle-mounted scene, acquire the collected real-time video aiming at the vehicle-mounted scene, extract each frame image in the real-time video, and further detect whether the face exists in the vehicle-mounted scene according to each frame image and the face interesting region set in the vehicle-mounted scene constructed in advance. Therefore, the human face interesting region set in the vehicle-mounted scene is constructed in advance, so that the human face is detected only in the human face interesting region, the calculation complexity of human face recognition is reduced, the calculation resources are saved, false detection and missing detection can be avoided, and the recognition accuracy is improved.
In order to implement the foregoing embodiments, the present application further proposes a computer-readable storage medium.
The computer-readable storage medium stores thereon a computer program, and the computer program is executed by a processor to implement the method for detecting a human face for a vehicle-mounted scene according to the embodiment of the present application.
In order to implement the foregoing embodiment, an embodiment of another aspect of the present application provides a computer program, where the computer program is executed by a processor to implement the method for detecting a face of a vehicle-mounted scene according to the embodiment of the present application.
In an alternative implementation, the embodiments may be implemented in any combination of one or more computer-readable media. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
A computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, smalltalk, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the consumer electronic device, partly on the consumer electronic device, as a stand-alone software package, partly on the consumer electronic device and partly on a remote electronic device, or entirely on the remote electronic device or server. In the case of remote electronic devices, the remote electronic devices may be connected to the consumer electronic device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external electronic device (e.g., through the internet using an internet service provider).
Other embodiments of the present application will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the invention following, in general, the principles of the application and including such departures from the present disclosure as come within known or customary practice within the art to which the invention pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the application being indicated by the following claims.
It will be understood that the present application is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the application is limited only by the appended claims.

Claims (6)

1. A face detection method for a vehicle-mounted scene is characterized by comprising the following steps:
acquiring a collected real-time video aiming at the vehicle-mounted scene;
extracting each frame image in the real-time video;
detecting whether a human face exists in the vehicle-mounted scene or not according to each frame of image and a pre-constructed human face interesting region set in the vehicle-mounted scene, wherein the human face interesting region set in the vehicle-mounted scene is pre-constructed through the following steps:
acquiring a sample video image in the vehicle-mounted scene, wherein the sample video image is a historical video image in a period of time acquired by a camera in the vehicle-mounted scene;
carrying out face detection on the sample video image based on a face detection algorithm to determine a face occurrence probability heat map in the vehicle-mounted scene;
constructing a human face interesting region set in the vehicle-mounted scene according to the human face occurrence probability heat map; wherein the face region-of-interest set has at least one face region-of-interest;
after detecting whether a human face exists in the vehicle-mounted scene, the method further comprises the following steps:
if yes, sending the current frame image with the detected face to a terminal device of a user for reminding;
when a face is detected by a continuous multi-frame image, sending the continuous multi-frame image to a terminal device of a user in a video clip mode;
the method further comprises the following steps:
the vehicle-mounted scene comprises a plurality of seats, each seat corresponds to a face interesting region, and the method for determining the face interesting region corresponding to each seat comprises the following steps:
determining the position of a human body in the seat according to the position of the seat in the vehicle-mounted scene and the height range of the human body;
determining the position of a human face in the seat according to the proportional relation between the head and the body of the human;
determining the position relation between the face corresponding to the seat and the camera according to the position relation between the camera and the seat;
determining the position of the face in the image shot by the camera according to the shooting parameters of the camera;
and determining the position of the face in the image shot by the camera as a face interesting area corresponding to the seat.
2. The method according to claim 1, wherein the detecting whether a human face exists in the vehicle-mounted scene according to the each frame image and a pre-constructed human face region-of-interest set in the vehicle-mounted scene comprises:
determining a face interesting region in each frame of image according to the face interesting region set;
judging whether a human face exists in the human face interesting region in each frame of image;
if yes, judging that a human face exists in the vehicle-mounted scene;
if not, judging that the human face is not detected in the vehicle-mounted scene.
3. A face detection device for an on-vehicle scene, comprising:
the video acquisition module is used for acquiring the acquired real-time video aiming at the vehicle-mounted scene;
the image extraction module is used for extracting each frame of image in the real-time video;
the face detection module is used for detecting whether a face exists in the vehicle-mounted scene according to each frame of image and a pre-constructed face interesting region set in the vehicle-mounted scene, wherein the face interesting region set in the vehicle-mounted scene is pre-constructed through the following steps:
acquiring a sample video image in the vehicle-mounted scene, wherein the sample video image is a historical video image in a period of time acquired by a camera in the vehicle-mounted scene;
carrying out face detection on the sample video image based on a face detection algorithm to determine a face occurrence probability heat map in the vehicle-mounted scene;
constructing a human face interesting region set in the vehicle-mounted scene according to the human face occurrence probability heat map; wherein the face region-of-interest set has at least one face region-of-interest;
the reminding module is used for sending the current frame image of the detected face to the terminal equipment of the user for reminding after the face is detected in the vehicle-mounted scene;
the reminding module is also used for: when a face is detected by a continuous multi-frame image, sending the continuous multi-frame image to a terminal device of a user in a video clip mode;
the apparatus is further configured to:
the vehicle-mounted scene comprises a plurality of seats, each seat corresponds to a face interesting region, and the method for determining the face interesting region corresponding to each seat comprises the following steps:
determining the position of a human body in the seat according to the position of the seat in the vehicle-mounted scene and the height range of the human body;
determining the position of a human face in the seat according to the proportional relation between the head and the body of the human;
determining the position relation between the face corresponding to the seat and the camera according to the position relation between the camera and the seat;
determining the position of the face in the image shot by the camera according to the shooting parameters of the camera;
and determining the position of the face in the image shot by the camera as a face interesting region corresponding to the seat.
4. The apparatus of claim 3, wherein the face detection module is specifically configured to:
determining a face interested area in each frame of image according to the face interested area set;
judging whether a human face exists in the human face interesting region in each frame of image;
if yes, judging that a human face exists in the vehicle-mounted scene;
if not, judging that the human face is not detected in the vehicle-mounted scene.
5. A vehicle, characterized by comprising: memory, processor and computer program stored on the memory and executable on the processor, when executing the computer program, implementing the method for face detection for an in-vehicle scene as claimed in any one of claims 1 to 2.
6. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out a method for face detection for an in-vehicle scene according to any one of claims 1 to 2.
CN201910431152.XA 2019-05-22 2019-05-22 Face detection method and device for vehicle-mounted scene, vehicle and storage medium Active CN110188645B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910431152.XA CN110188645B (en) 2019-05-22 2019-05-22 Face detection method and device for vehicle-mounted scene, vehicle and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910431152.XA CN110188645B (en) 2019-05-22 2019-05-22 Face detection method and device for vehicle-mounted scene, vehicle and storage medium

Publications (2)

Publication Number Publication Date
CN110188645A CN110188645A (en) 2019-08-30
CN110188645B true CN110188645B (en) 2022-10-21

Family

ID=67717301

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910431152.XA Active CN110188645B (en) 2019-05-22 2019-05-22 Face detection method and device for vehicle-mounted scene, vehicle and storage medium

Country Status (1)

Country Link
CN (1) CN110188645B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111414833A (en) * 2020-03-16 2020-07-14 北京嘀嘀无限科技发展有限公司 Target detection tracking method, target detection tracking device, and storage medium
CN113561908B (en) * 2021-07-27 2023-06-23 奇瑞新能源汽车股份有限公司 Control method and device of vehicle-mounted face recognition equipment

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103873741A (en) * 2014-04-02 2014-06-18 北京奇艺世纪科技有限公司 Method and device for substituting area of interest in video
CN108629316A (en) * 2018-05-08 2018-10-09 东北师范大学人文学院 A kind of video accident detection method of various visual angles
CN109766841A (en) * 2019-01-10 2019-05-17 深圳大学 Vehicle checking method, device and computer readable storage medium

Family Cites Families (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN202472864U (en) * 2012-03-06 2012-10-03 上海骏聿数码科技有限公司 Driver fatigue early warning device
US9721173B2 (en) * 2014-04-04 2017-08-01 Conduent Business Services, Llc Machine learning approach for detecting mobile phone usage by a driver
CN204415338U (en) * 2014-12-22 2015-06-24 清华大学苏州汽车研究院(吴江) A kind of Vehicle Anti-Theft System based on recognition of face
CN104527570A (en) * 2014-12-22 2015-04-22 清华大学苏州汽车研究院(吴江) Vehicle anti-theft system based on panoramic picture
CN104494564B (en) * 2014-12-22 2018-01-26 清华大学苏州汽车研究院(吴江) A kind of VATS Vehicle Anti-Theft System based on recognition of face
CN204547917U (en) * 2015-04-15 2015-08-12 郭帅 The overcrowding detection alarm system of a kind of car
CN104850771B (en) * 2015-04-30 2018-11-16 广东欧珀移动通信有限公司 A kind of indentity identifying method and relevant device
CN105691367B (en) * 2016-01-25 2018-08-07 大连楼兰科技股份有限公司 Based on image and the united bus active brake method of heartbeat inspecting and system
CN108021856B (en) * 2016-10-31 2020-09-15 比亚迪股份有限公司 Vehicle tail lamp identification method and device and vehicle
CN106599774A (en) * 2016-10-31 2017-04-26 深圳市元征科技股份有限公司 Vehicle alarm method and device
CN106709420B (en) * 2016-11-21 2020-07-10 厦门瑞为信息技术有限公司 Method for monitoring driving behavior of commercial vehicle driver
CN106934355A (en) * 2017-02-28 2017-07-07 西交利物浦大学 In-car hand detection method based on depth convolutional neural networks
CN207173533U (en) * 2017-09-11 2018-04-03 马芳武 A kind of vehicle-mounted intelligent video monitoring and recognition of face anti-theft alarm system
CN107766835A (en) * 2017-11-06 2018-03-06 贵阳宏益房地产开发有限公司 traffic safety detection method and device
CN109784290B (en) * 2019-01-23 2021-03-05 科大讯飞股份有限公司 Target detection method, device, equipment and readable storage medium

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103873741A (en) * 2014-04-02 2014-06-18 北京奇艺世纪科技有限公司 Method and device for substituting area of interest in video
CN108629316A (en) * 2018-05-08 2018-10-09 东北师范大学人文学院 A kind of video accident detection method of various visual angles
CN109766841A (en) * 2019-01-10 2019-05-17 深圳大学 Vehicle checking method, device and computer readable storage medium

Also Published As

Publication number Publication date
CN110188645A (en) 2019-08-30

Similar Documents

Publication Publication Date Title
CN106952303B (en) Vehicle distance detection method, device and system
CN104916138B (en) The processing method of information of vehicles, system, mobile unit and server
US9881221B2 (en) Method and system for estimating gaze direction of vehicle drivers
WO2020042984A1 (en) Vehicle behavior detection method and apparatus
US10796132B2 (en) Public service system and method using autonomous smart car
US9779311B2 (en) Integrated control system and method using surveillance camera for vehicle
US11709282B2 (en) Asset tracking systems
CN105894384A (en) Vehicle accident claims information obtaining method and device
CN111460938B (en) Vehicle driving behavior real-time monitoring method and device
CN111368612B (en) Overguard detection system, personnel detection method and electronic equipment
CN113055823B (en) Method and device for managing shared bicycle based on road side parking
US20180316901A1 (en) Event reconstruct through image reporting
CN110188645B (en) Face detection method and device for vehicle-mounted scene, vehicle and storage medium
CN109523793A (en) The methods, devices and systems of intelligent recognition information of vehicles
US11151678B2 (en) Handheld photo enforcement systems and methods
CN111241918B (en) Vehicle tracking prevention method and system based on face recognition
CN110706115A (en) Traffic accident fast claims settlement method, system and server
CN110619256A (en) Road monitoring detection method and device
JP2022032520A (en) Management system, management method, management device, program and communication terminal
CN116152790B (en) Safety belt detection method and device
US11580751B2 (en) Imaging device, video retrieving method, video retrieving program, and information collecting device
CN111191603B (en) Method and device for identifying people in vehicle, terminal equipment and medium
US11854278B2 (en) Information processing device and method
WO2021145013A1 (en) Obstacle notification device, obstacle notification interface terminal, obstacle notification system
US20230230386A1 (en) Automobile video capture and processing

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right

Effective date of registration: 20211011

Address after: 100176 101, floor 1, building 1, yard 7, Ruihe West 2nd Road, Beijing Economic and Technological Development Zone, Daxing District, Beijing

Applicant after: Apollo Zhilian (Beijing) Technology Co.,Ltd.

Address before: 2 / F, baidu building, No. 10, Shangdi 10th Street, Haidian District, Beijing 100085

Applicant before: BEIJING BAIDU NETCOM SCIENCE AND TECHNOLOGY Co.,Ltd.

TA01 Transfer of patent application right
GR01 Patent grant
GR01 Patent grant