CN109243144A - A kind of recognition of face warning system and its method for fatigue driving - Google Patents

A kind of recognition of face warning system and its method for fatigue driving Download PDF

Info

Publication number
CN109243144A
CN109243144A CN201811201348.1A CN201811201348A CN109243144A CN 109243144 A CN109243144 A CN 109243144A CN 201811201348 A CN201811201348 A CN 201811201348A CN 109243144 A CN109243144 A CN 109243144A
Authority
CN
China
Prior art keywords
face
driver
host
fatigue driving
recognition
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201811201348.1A
Other languages
Chinese (zh)
Inventor
高勇
张厚永
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nanjing Easter Machinery Equipment Co Ltd
Original Assignee
Nanjing Easter Machinery Equipment 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 Nanjing Easter Machinery Equipment Co Ltd filed Critical Nanjing Easter Machinery Equipment Co Ltd
Priority to CN201811201348.1A priority Critical patent/CN109243144A/en
Publication of CN109243144A publication Critical patent/CN109243144A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G08SIGNALLING
    • G08BSIGNALLING OR CALLING SYSTEMS; ORDER TELEGRAPHS; ALARM SYSTEMS
    • G08B21/00Alarms responsive to a single specified undesired or abnormal condition and not otherwise provided for
    • G08B21/02Alarms for ensuring the safety of persons
    • G08B21/06Alarms for ensuring the safety of persons indicating a condition of sleep, e.g. anti-dozing alarms
    • 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
    • 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/168Feature extraction; Face representation
    • 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/174Facial expression recognition
    • G06V40/176Dynamic expression

Abstract

A kind of recognition of face warning system and its method for fatigue driving, including the photographic device, host and warning device being arranged in driver's cabin;The photographic device is for acquiring the face image for driving indoor driver in vehicle travel process;The host is connect with the photographic device, and the host is used to handle the face image of driver and judges whether driver is in fatigue driving state with this;The warning device is connect with the host, and the warning device is used to be given a warning when judging that driver is in fatigue driving state by host control.And in conjunction with its method effectively prevent in the prior art it is basic just without being driven for driver when via recognition of face come the real-time defect for issuing the system and method that fatigue driving alerts.

Description

A kind of recognition of face warning system and its method for fatigue driving
Technical field
The present invention relates to safe driving technical fields, and in particular to a kind of recognition of face warning system for fatigue driving And its method, more particularly to a kind of mutually tied based on dynamic bionic face recognition technology, high-definition camera technology and big data application The vehicle drive safety assisting system and its method of conjunction.
Background technique
Fatigue driving refers to that driver after continuous driving for a long time, generates physiological function and the imbalance of function at heart, from And there is the phenomenon that driving efficiency decline.Cause fatigue reason be it is various, such as driver's poor sleeping quality or deficiency, Road conditions preferably cause surface conditions single, continue to drive vehicle after fatigue, can feel sleepy drowsiness, weakness of limbs pays attention to Power is not concentrated, judgment decline, slow movement or too early, the insecurity factors such as operation pause occurs, and easily generation road is handed over Interpreter's event.
It is analyzed according to traffic police department data, driver tired driving is the main reason for causing major traffic accidents.Row For driver's " feeling sleepy " without knowing, hidden danger is huge on the way for vehicle, and driver tired driving necessarily will appear face state, particularly The variation of eye state on face, but sent out in real time when just no driving for driver basic at present via recognition of face The system and method for fatigue driving warning out.
Summary of the invention
To solve the above problems, the present invention provides a kind of for the recognition of face warning system of fatigue driving and its side Method effectively prevents driving when basic just no driving for driver in the prior art via recognition of face to issue fatigue in real time Sail the defect of the system and method for warning.
A kind of recognition of face for fatigue driving alerts system in order to overcome the deficiencies in the prior art, the present invention provides The solution of system and its method, specific as follows:
A kind of recognition of face warning system for fatigue driving, including photographic device, the host being arranged in driver's cabin And warning device;
The photographic device is for acquiring the face image for driving indoor driver in vehicle travel process;
The host is connect with the photographic device, and the host is used to handle the face image of driver and is sentenced with this Whether disconnected driver is in fatigue driving state;
The warning device is connect with the host, and the warning device is used to judge that driver is in fatigue driving It is given a warning when state by host control.
The photographic device includes high-definition camera and infrared camera;The high-definition camera is acquired for daytime in vehicle The face image of indoor driver is driven in driving process, the infrared camera is acquired for night in vehicle driving mistake The face image of indoor driver is driven in journey.
The host includes processor and memory, and the processor is mutually ined succession the photographic device and warning dress It sets;
Store processing module, alarm module and database in the memory.
The recognition of face warning system for fatigue driving further includes video camera, the video camera and the host Processor connection, the video camera before vehicle driving for acquiring the face dynamic image of driver.
The processing module is used to the characteristic information of face dynamic image carry out digital modeling, and digital modeling information It is saved in database;For the characteristic in the face image being compared with the digital modeling information in database point Analysis.
The alarm module gives a warning for starting the warning device.
The database is used to save the digital modeling after the characteristic information to face dynamic image being carried out digital modeling Information.
The method of the recognition of face warning system for fatigue driving, specific steps include:
Step 1: the face dynamic image of driver is acquired by the video camera;
Step 2: the face dynamic image of the collected driver of the video camera being sent in the host, the master The characteristic information of face dynamic image is just carried out digital modeling by the processing module in machine, and digital modeling information preservation to number According to library;
Step 3: in vehicle travel process, photographic device acquires in real time drives indoor driving in vehicle travel process The face image of member, is then sent to the face image of collected driver in host, the processing module in the host Digital modeling information in characteristic and database in the face image is compared;
Step 4: if occur fatigue driving feature in comparing, alarm module just starts the warning device and issues police It accuses.
The step 4 is further comprising the steps of:
If not occurring fatigue characteristic in comparing, return step 3 is executed;It in addition can also be the fatigue occurred Driving characteristics are counted and store to form safe driving report.
The processor of the host is connect with wireless communication module, and the wireless communication module is by wireless network and wirelessly Server connection in network, the server are arranged in the machine box for server, and the machine box for server includes hollow length Cabinet R1, support member R4, the connection R3 and locking member R2 of cube shape;
The cabinet R1 is the shell for being only provided with through slot on one side, and the intracorporal side wall of shell is locating plate RA1, also can The intracorporal other vertical side wall that is located at of the shell is set as locating plate RA1;
It is rectangle and the boarding hole for penetrating the rectangular-shape through locating plate RA1 that section is provided on the locating plate RA1 AA1, locking member R2 are set in boarding hole AA1;Couple a R3 through locking member interlocking in boarding hole AA1, connection R3's One extend out in shell and the support member R4 that is connected;
The support member R4 includes blocky locating piece RD1, supporting block RD2 and right-angle prismatic column reinforcing sheet RD3;
The locating piece RD1 is connected with connection R3, is provided on locating piece RD1 with the connection corresponding positioning port DA1 of R3, Supporting block RD2 is fixed on locating piece RD1 and perpendicular to locating plate RA1;
The reinforcing sheet RD3 is set under supporting block RD2, and the reinforcing sheet RD3 is also respectively fixedly connected in locating piece RD1 and branch On bracer RD2, for increasing the support performance of supporting block RD2;
The locating piece RD1 and connection R3 are connected via the mode of being screwed on, and external sealing plug is equipped on connection R3, and fixed The internal sealing plug RC3 being screwed on connection R3 is provided in the mouth DA1 of position.
The locking member R2 includes the scarf joint DB1 and helical form beryllium-bronze silk DB2 of rectangular-shape;The scarf joint The number of DB1 is a pair and the halved joint DB1 mirror image is embedded in boarding hole AA1;After the interlocking of one halved joint, with positioning Piece RA1 is located at the side wall on the same face, the longitudinal span of the level of the side wall span one longitudinal with the level of boarding hole AA1 It causes, the span of the horizontal cross of the side wall is more than the longitudinal span of the level of boarding hole AA1;
The interface BA1 of opposite semicircular arc is had in the pair of scarf joint DB1 opposite side wall, and should It is also provided with the guide groove road BA4 towards the intracorporal arc of shell in a pair of opposite side wall, a halved joint DB1 is backwards to interface The whereabouts of BA1 is provided with rectangular-shape supporting mouth BA2, and the horizontal cross span of supporting mouth BA2 is more than the thickness of locating plate RA1 Degree, helical form beryllium-bronze silk DB2 are fixedly arranged in supporting mouth BA2, the helical form beryllium-bronze silk DB2 structure in a pair of of supporting mouth BA2 Unanimously.
Scarf joint must first be mounted in a scarf joint in boarding hole AA1, when assembly then scarf joint towards supporting mouth The direction of BA2 squeezes, and vacates region for another scarf joint, then refills into another scarf joint;Helical form beryllium-bronze silk DB2's The lower halved joint of elastic foundation effect can fasten each other, because being located on the same face after halved joint interlocking with locating plate RA1 Side wall, the longitudinal span of the level of the side wall is consistent with the longitudinal span of the level of boarding hole AA1, the horizontal cross of the side wall Span is more than the longitudinal span of the level of boarding hole AA1, also can not be loose in boarding hole AA1 after thus a halved joint fastens It is de-.
To be conducive to separating for a halved joint, be plugged in interface BA1 conducive to a connection R3.Outside a halved joint Arcuation handle BA3 is respectively equipped on wall;
The connection R3 includes cylindrical head RC1 and cylindric positioning section RC2, and head RC1's is outer just as interface BA1 is corresponding, and head RC1 can be plugged in interface BA1;
The positioning section RC2 is through locking member towards stretching in shell;
On the connection R3 through locking member grafting that the support member R4 is set in the housing, support member R4 and connection The number of R3 be it is multiple, support member R4 is set on the multiple connection R3 being located on same lateral face.
A connection R3 for the support member R4 that is connected be by locking member grafting, can be through after connection R3 is damaged Second line of a couplet narrow bars R3 is decomposed by locking member, is assembling other connection R3, is conducive to repair.
The invention has the benefit that
It solves driver and " feels sleepy " when driving and remind asking so as to cause hidden trouble of traffic without knowing and having no way of Topic.When there is fatigue driving feature, warning device, which gives a warning, reminds driver to take and grasp safely as braking, steering Make, avoids traffic accident, to realize safe driving.
Detailed description of the invention
Fig. 1 is the specific flow chart of the method for the recognition of face warning system for fatigue driving of the invention.
Fig. 2 is the specific flow chart of data modeling of the invention.
Fig. 3 is the schematic illustration of the Visualization Framework class based on PyQt.
Fig. 4 is the distribution schematic diagram of human eye characteristic point.
Fig. 5 is the connection schematic diagram of the support member of machine box for server of the invention.
Machine box for server Fig. 6 of the invention couples schematic diagram with locking member.
Fig. 7 is the enlarged drawing at the Z of Fig. 6.
Fig. 8 is a kind of schematic diagram of locking member.
Specific embodiment
The present invention is described further below in conjunction with drawings and examples.
As Figure 1-Figure 4, for the recognition of face warning system of fatigue driving, including the camera shooting being arranged in driver's cabin Device, host and warning device;Photographic device is used to acquire the face that indoor driver is driven in vehicle travel process figure Picture;Host is connect with photographic device, and host is used to handle the face image of driver and judges whether driver is in this Fatigue driving state;Warning device is connect with host, and warning device is used for when judging that driver is in fatigue driving state It is given a warning by host control.Warning device is buzzer, loudspeaker or vibrator.Host can for microcomputer, PC machine, PDA or laptop.The exploitation environment and running environment of the software of host are operating system as Linux.In host Under conditions of microcomputer, hardware environment can be raspberry pie microcomputer, which includes: memory 1GB, dominant frequency Tetra- core of 1.4GHz and 64 ARM A53 processors;Face image includes the characteristic of face image.Photographic device includes height Clear camera and infrared camera;High-definition camera drives indoor driver's for acquisition on daytime in vehicle travel process Face image, infrared camera drive the face image of indoor driver for night acquisition in vehicle travel process.It is high The pixel of clear camera and the pixel of infrared camera are in 1080P or more.Host includes processor and memory, processor phase It ins succession photographic device and warning device;Store processing module, alarm module and database in memory.For fatigue driving Recognition of face warning system further include video camera, the processor of video camera and host connects, and video camera is used in vehicle driving The face dynamic image of preceding acquisition driver.Face dynamic image includes the characteristic information of face dynamic image.Characteristic information Including frequency of wink, characteristic information can also include sight transfer, head bias or such characteristic information of yawning of dehiscing. Processing module is used to the characteristic information of face dynamic image carry out digital modeling, and digital modeling information preservation to data Library;For the digital modeling information in the characteristic and database in the face image to be compared.Alarm module It is given a warning for starting warning device.Database, which is used to save, carries out digital modeling the characteristic information to face dynamic image Digital modeling information afterwards.
And processing module and alarm module exist in the form of software, these software realizations call the library dlib acquisition face dynamic The characteristic point of the human eye of state image, and characteristic is generated, using support vector machines to the eye opening data and eye closing number of acquisition According to being trained, model is generated to realize digital modeling, finally realizes the people of the face image of the driver acquisition driver Eye characteristic be compared with model, differentiation driver whether fatigue driving.If driver is in fatigue driving, language is realized Sound reminds driver to take care.
It is in this way the core for identifying face characteristic with machine learning dlib algorithm, using support vector machines algorithm to adopting The data of collection are trained and classify.User can simple point touching screen button, so that it may realize the monitoring to driver.
And each serviced component of processing module is described as follows:
1) Qt:Gui serviced component
1. PyQt_Core: providing the support of data model attribute, thread, the service such as incident management inherits Qt kernel Class;
2. PyQt_Gui: providing user interface service (including various menus, button, dialog box etc.), inherit the Gui of Qt Class;
3. PyQt_OpenGL: providing the basic context rendering service of OpenInventer.
2) Rendering:3-D renders serviced component
1. Rd_OpenGL: providing 3D rendering service, inherit OpenGL class;
2. Rd_Coin3D: providing management OpenGL pipeline and be abstracted, scenario objects structure, Model-View conversion renders shape The service such as state, inherits the class of Coin3D.
In view of the portability and scalability of platform, the user interface User Interface of processing module is used The service that PyQT is provided carries out the design of visualization human-computer interaction, so that the recognition of face warning system for fatigue driving has Good human-computer interaction, main as follows:
1) the system potential problems when handling different windows the foundation class that PyQt includes: are concealed by these foundation class (such as file process, thread process);
2) realize cross-platform portability: PyQT supports the several operation systems such as Windows, Linux, Unix, reason By the program of upper exploitation without change, recompility can execute in different operating system;
3) PyQt supports internationalized application completely: being based on message translation table mechanism, user interface text can be translated into Various language;
4) PyQt supports the transformation of the appearance of customization: the application software based on PyQt can be in Linux appearance, Windows It is mutually converted between appearance and the appearance of some customizations;
5) PyQt is completely object-oriented, and scalability is strong, and allows real component programming, the third party much to increase income Component is all based on PyQT exploitation, freely can use and modify.
Specifically, Fig. 3 gives based on PyQt Visualization Service component class formation: in application journey of the exploitation based on PyQt When sequence, user should derive the user interface class of oneself from class QMainWindow first, and one is then defined in main program The object of QApplication constructs oneself application class (ApplicationP), and application class is by PyQt QAppliation class derives from, and ApplicationP class creates in the Main module in App serviced component, is mainly responsible for completion Initialization, the registration and unregistration of application framework, the instantiation of application program, application program of application program institute necessary environment Common variable initializer show etc..When software is run, ApplicationP class is responsible for event and receives and handle and be responsible for dynamic Management generates model class and view class.Frame window class (MainWindow) is that the QMainWindow class from PyQt derives , be responsible for the part Ui of application program, including create and manage menu bar, toolbar, status bar and scroll bar etc..Frame simultaneously Window class is also responsible for creation view class, and has the pointer variable for the view building on such, issues from menu or tool bar Message be forwarded directly to ViewManager view class, make a response in ViewManager class to the readjustment of the various menu item. Document document class realizes the encapsulation of program and the instantiation of view class, model class, and provides one or more in main window A view works a workspace to realize, is the interface of data and view, and both model and view dynamic movement are risen Come.ViewManager is also responsible for being shown in Ui_Viewer module for three-dimensional entity model and realizes, ViewManager is called The 3D figure that the Occ_Viewer of Open CASCADE is generated is shown.
Opencv computer vision library is additionally used in above-mentioned software: OpenCV is made of a series of C functions and C++ class, It has C, C++, Python and java interface, and current SDK (Software Development Kit Software Development Kit) is Supported the exploitation of the language applications such as C++, Java, Python, algorithm current OpenCV itself newly developed and module interface are all It is generated based on C++.
For the method for the recognition of face warning system of fatigue driving, specific steps include:
Step 1: the face dynamic image of driver is acquired by video camera;The face for acquiring driver by video camera is dynamic State image is that Opencv is utilized to open camera and read the image information of camera shooting, while before carrying out to the video image of acquisition Phase pretreatment, specifically includes such as under type:
(1) camera is opened using OpenCV, realizes that code is as follows:
Cap=cv2.VideoCapture (0)
(2) it is changed image size, image gray processing using OpenCV, realizes that code is as follows:
Ret, self.image=self.cap.read ()
Show=cv2.resize (self.image, (400,400))
Show=cv2.cvtColor (show, cv2.COLOR_BGR2RGB)
Step 2: the face dynamic image of the collected driver of video camera being sent in host, the processing mould in host The characteristic information of face dynamic image is just carried out digital modeling by block, and digital modeling information preservation to database;Face is dynamic State image includes the characteristic information of face dynamic image.Characteristic information includes frequency of wink, and characteristic information can also include view Line transfer, head bias or such characteristic information of yawning of dehiscing.These characteristic informations i.e. fatigue characteristic information.
It includes machine learning dlib identification face characteristic, packet that the characteristic information of face dynamic image, which is carried out digital modeling, It includes such as under type:
(1) it imports for detecting the model of 68 characteristic points of face in the library dlib, realization code is as follows:
Pwd=os.getcwd () # obtains current path
Model_path=os.path.join (pwd, ' model') # model file folder path
Shape_detector_path=os.path.join (model_path, ' shape_predictor_68_ Face_landmarks.dat') # facial feature points detection model path
Detector=dlib.get_frontal_face_detector () # human-face detector
Predictor=dlib.shape_predictor (shape_detector_path) # facial feature points detection device
(2) feature points parameter, including following parameter:
EYE_AR_CONSEC_FRAMES, the EYE_AR_CONSEC_FRAMES are indicated, when eyes aspect ratio EAR is small When the threshold value of setting, continuously there is the image of face dynamic image of the eyes aspect ratio EAR of how much quantity less than threshold value when Blink movement just centainly occurs for frame.Only being less than the frame number of the threshold value of setting has been more than this parameter EYE_AR_CONSEC_ When FRAMES value, just thinks that current eye is closure, that is, blink movement has occurred;Otherwise then it is considered maloperation.Usually should Parameter value is 3.Thus fatigue characteristic can be judged by frequency of wink.
(3) queue of the setting as feature vector, specifically includes such as under type:
How much is the dimension of setup parameter VECTOR_SIZE expression feature vector, and the queue of the software of processing module is taken 5 dimensions, i.e., VECTOR_SIZE value is 5, realize that code is as follows:
(4) eyes aspect ratio algorithm is realized, is specifically included such as under type:
The each eye in face dynamic image is set by (x, y) coordinate representation of 6 reference points, x indicates abscissa, y Indicate ordinate, which includes P1Point, P2Point, P3Point, P4Point, P5Point and P6Point, P1Point, P2Point, P3Point, P4Point, P5 Point and P6Point successively begins around the eyes from the left comer of eyes and is distributed clockwise, P1Point is in the left comer of eyes, P2Point and P3 Point is in top and the P of eyes2Point and P3Point is maintained in a horizontal direction, P4Point is in the right corner of eyes, P5Point and P6 Point is in top also, the P of eyes5Point and P6Point is maintained in a horizontal direction;
Formula (1) calculates the eyes aspect ratio EAR of each eye in face dynamic image:
Wherein P1、P2、P3、P4、P5And P6Respectively indicate P1Point, P2Point, P3Point, P4Point, P5Point and P6The coordinate of point.Its Molecule in middle formula (1) is to calculate the distance between vertical eye mark, and the denominator in formula (1) is the horizontal eyes of calculating The distance between mark, code is as follows:
def eye_aspect_ratio(self,eye):
#print(eye)
A=distance.euclidean (eye [1], eye [5])
B=distance.euclidean (eye [2], eye [4])
C=distance.euclidean (eye [0], eye [3])
Ear=(A+B)/(2.0*C)
return ear
The eye opening and eye closing of driver can be respectively obtained in the state that driver opens eyes and closes one's eyes with aforesaid way Eyes aspect ratio under state.
It can also include respectively in driver's eye opening and eye closing feelings that the characteristic information of face dynamic image, which is carried out digital modeling, It is trained, specifically includes such as under type in conjunction with its human eye aspect ratio data under condition:
(1) preset support vector machines in training: SVM can be classified as three classes: linear separability (linear SVM in Linearly separable case) Linear SVM, linearly inseparable Linear SVM, non-linear (nonlinear) SVM.This Software uses non-linear SVM.
(2) data are parsed from two txt files, extracts feature vector, be put into list train, while simultaneously right The label answered is put into list labels, realizes that code is as follows:
Images_open_txt=open (' images_open.txt', ' r')
Images_close_txt=open (' images_close.txt', ' r')
Image=[]
Labels=[]
(3) characteristic is read from eye opening text images_open.txt, realizes that code is as follows:
# reads data from eye opening text, and label is 0
print('Reading images_open.txt...')
Line_ctr=0
for txt_str in images_open_txt.readlines():
Temp=[]
#print(txt_str)
Datas=txt_str.strip ()
Datas=datas.replace (' [', ")
Datas=datas.replace ('] ', ")
Datas=datas.split (', ')
print(datas)
for data in datas:
#print(data)
Data=float (data)
temp.append(data)
#print(temp)
image.append(temp)
labels.append(0)
(4) SVM algorithm automated tuning is utilized, mode is as follows:
Presetting variable C=0.8 indicates soft margin;
It indicates to use linear kernel when setting variable kernel, kernel='linear';Kernel='rbf'
When, it is Gaussian kernel.
Variable gamma is set, gamma value is smaller, and classification interface is more continuous;Gamma value is bigger, classification interface more " scattered ".
Variable decision_function_shape is set,
When decision_function_shape='ovr', one v rest, i.e. a classification and other classifications are indicated It divides, for more classification;When decision_function_shape='ovo', indicate one v one, i.e. a classification with it is another A category division, for two classification.
Realize that code is as follows:
Gamma_range=np.outer (np.logspace (- 2,1,4), np.array ([1,5]))
Gamma_range=gamma_range.flatten ()
C_range=np.outer (np.logspace (- 1,1,3), np.array ([1,5]))
C_range=C_range.flatten ()
Parameters=' C':C_range, ' kernel':('linear', ' rbf'), ' gamma':gamma_ range,
'decision_function_shape':['ovo','ovr'],}
#clf=svm.SVC (C=0.8, kernel='linear', gamma=20,
Decision_function_shape='ovo')
Clf=svm.SVC ()
Clf=GridSearchCV (estimator=clf, param_grid=parameters, n_jobs=1, Verbose=2)
(5) joblib module is used, trained model file is saved in current file folder, realizes that code is as follows:
Clf.fit (image, labels) # is passed to training set matrix samples and training set sample mark (0 or 1)
joblib.dump(clf,"ear_svm.m")
Step 3: in vehicle travel process, photographic device acquires in real time drives indoor driving in vehicle travel process The face image of member, is then sent to the face image of collected driver in host, the processing module in host is this Digital modeling information in characteristic and database in face image is compared;
Step 4: if occur fatigue driving feature in comparing, i.e., the frame number of the above-mentioned threshold value for being less than setting is more than Mean that fatigue driving feature occur when this parameter EYE_AR_CONSEC_FRAMES value, alarm module just starts warning device It gives a warning, the realization code given a warning is as follows:
def sound(self):
mixer.init()
mixer.music.load('alarm.wav')
mixer.music.play()
It reminds driver to take safety operation as braking, steering with this, avoids traffic accident.
Step 4 is further comprising the steps of:
If not occurring fatigue characteristic in comparing, return step 3 is executed;It in addition can also be the fatigue occurred Driving characteristics are counted and store to form safe driving report, remind the good driving habit of driver with this.
The present invention can also be integrated with automobile data recorder, and high-definition camera is arranged on automobile data recorder in-vehicle display panel Head (driver's face feature data are acquired and monitored for daytime) and infrared camera (acquire for night and monitor driver Face feature data);Host for the dlib+opencv data acquisition and processing (DAP) of dynamic human face identification is set and is being obtained Loudspeaking and the shaking device of alarm are carried out after comparing.
There are also being exactly, is acquired in real time in order to back up photographic device and drive the face of indoor driver in vehicle travel process The processor of portion's image information, the host is also connect with wireless communication module, and the wireless communication module passes through wireless network It is connect with the server in wireless network, thus facial image information can be first transmitted to the processor of host, then by host Processor be transmitted in server and be measured in real time by wireless network via wireless communication module, and to avoid outside from touching The damage hit, the server are arranged in machine box for server, and machine box for server includes the cabinet of hollow rectangular-shape, cabinet On be provided with the hollow region only slotted on one side, the side wall inside the hollow region serves as locating plate, and locating plate is in a level On face welding pedestal, then in welding screw on pedestal, then on screw be connected assemble supporting block;After assembly Supporting block is for shelving server.
Such machine box for server framework is uncomplicated, but replaces after screw damage very cumbersome and time-consuming and laborious.By This has just done following improvement:
The processor of the host is connect with wireless communication module, and the wireless communication module is by wireless network and wirelessly Server connection in network, the server are arranged in the machine box for server, and the machine box for server includes hollow length Cabinet R1, support member R4, the connection R3 and locking member R2 of cube shape;
The cabinet R1 is the shell for being only provided with through slot on one side, and the intracorporal side wall of shell is locating plate RA1, also can The intracorporal other vertical side wall that is located at of the shell is set as locating plate RA1;
It is rectangle and the boarding hole for penetrating the rectangular-shape through locating plate RA1 that section is provided on the locating plate RA1 AA1, locking member R2 are set in boarding hole AA1;Couple a R3 through locking member interlocking in boarding hole AA1, connection R3's One extend out in shell and the support member R4 that is connected;
The support member R4 includes blocky locating piece RD1, supporting block RD2 and right-angle prismatic column reinforcing sheet RD3;
The locating piece RD1 is connected with connection R3, is provided on locating piece RD1 with the connection corresponding positioning port DA1 of R3, Supporting block RD2 is fixed on locating piece RD1 and perpendicular to locating plate RA1;
The reinforcing sheet RD3 is set under supporting block RD2, and the reinforcing sheet RD3 is also respectively fixedly connected in locating piece RD1 and branch On bracer RD2, for increasing the support performance of supporting block RD2;
The locating piece RD1 and connection R3 are connected via the mode of being screwed on, and external sealing plug is equipped on connection R3, and fixed The internal sealing plug RC3 being screwed on connection R3 is provided in the mouth DA1 of position.
The locking member R2 includes the scarf joint DB1 and helical form beryllium-bronze silk DB2 of rectangular-shape;The scarf joint The number of DB1 is a pair and the halved joint DB1 mirror image is embedded in boarding hole AA1;After the interlocking of one halved joint, with positioning Piece RA1 is located at the side wall on the same face, the longitudinal span of the level of the side wall span one longitudinal with the level of boarding hole AA1 It causes, the span of the horizontal cross of the side wall is more than the longitudinal span of the level of boarding hole AA1;
The interface BA1 of opposite semicircular arc is had in the pair of scarf joint DB1 opposite side wall, and should It is also provided with the guide groove road BA4 towards the intracorporal arc of shell in a pair of opposite side wall, a halved joint DB1 is backwards to interface The whereabouts of BA1 is provided with rectangular-shape supporting mouth BA2, and the horizontal cross span of supporting mouth BA2 is more than the thickness of locating plate RA1 Degree, helical form beryllium-bronze silk DB2 are fixedly arranged in supporting mouth BA2, the helical form beryllium-bronze silk DB2 structure in a pair of of supporting mouth BA2 Unanimously.
Scarf joint must first be mounted in a scarf joint in boarding hole AA1, when assembly then scarf joint towards supporting mouth The direction of BA2 squeezes, and vacates region for another scarf joint, then refills into another scarf joint;Helical form beryllium-bronze silk DB2's The lower halved joint of elastic foundation effect can fasten each other, because being located on the same face after halved joint interlocking with locating plate RA1 Side wall, the longitudinal span of the level of the side wall is consistent with the longitudinal span of the level of boarding hole AA1, the horizontal cross of the side wall Span is more than the longitudinal span of the level of boarding hole AA1, also can not be loose in boarding hole AA1 after thus a halved joint fastens It is de-.
To be conducive to separating for a halved joint, be plugged in interface BA1 conducive to a connection R3.Outside a halved joint Arcuation handle BA3 is respectively equipped on wall;
The connection R3 includes cylindrical head RC1 and cylindric positioning section RC2, and head RC1's is outer just as interface BA1 is corresponding, and head RC1 can be plugged in interface BA1;
The positioning section RC2 is through locking member towards stretching in shell;
On the connection R3 through locking member grafting that the support member R4 is set in the housing, support member R4 and connection The number of R3 be it is multiple, support member R4 is set on the multiple connection R3 being located on same lateral face.
A connection R3 for the support member R4 that is connected be by locking member grafting, can be through after connection R3 is damaged Second line of a couplet narrow bars R3 is decomposed by locking member, is assembling other connection R3, is conducive to repair.
It is the structure that can be dismantled because locking member is plugged on boarding hole AA1, after damaging occurs in locking member, Also other tight component can be replaced straight, and the machine box for server such as the prior art is avoided to replace cumbersome expense since part is damaged When it is laborious, an especially pervious connection R3 is fused in shell, and very cumbersome, welding instrument that must also be other is replaced;Lock The introducing of tight component allows these conveniences easy to operate;Reinforcing sheet RD3 is used to increase the support performance of support member R4.
The section of the head RC1 of the connection R3 is rectangle, and corresponding interface BA1 is also rectangle.
When support member R4 is installed, only upper silk mouth need to be then screwed in shell just by after connection R3 grafting.
The scarf joint must first be mounted in a scarf joint in boarding hole AA1, when assembly then scarf joint towards support The direction of mouth BA2 squeezes, and vacates region for another scarf joint, then refills into another scarf joint;In helical form beryllium-bronze silk DB2 The lower halved joint of elastic foundation effect can fasten each other;
A connection R3 for the support member R4 that is connected be by locking member grafting, can be through after connection R3 is damaged Second line of a couplet narrow bars R3 is decomposed by locking member, is assembling other connection R3, is conducive to repair.
It is the structure that can be dismantled because locking member is plugged on boarding hole AA1, after damaging occurs in locking member, Also other tight component can be replaced straight, and the machine box for server such as the prior art is avoided to replace cumbersome expense since part is damaged When it is laborious, an especially pervious connection R3 is fused in shell, and very cumbersome, welding instrument that must also be other is replaced;Lock The introducing of tight component allows these conveniences easy to operate;Reinforcing sheet RD3 is used to increase the support performance of support member R4.
The present invention is described in a manner of being illustrated with embodiment above, it will be understood by those of skill in the art that this It is open to be not limited to embodiments described above, in the case of without departing from the scope of the present invention, it can make a variety of changes, change And replacement.

Claims (9)

1. a kind of recognition of face warning system for fatigue driving, which is characterized in that including the camera shooting being arranged in driver's cabin Device, host and warning device;
The photographic device is for acquiring the face image for driving indoor driver in vehicle travel process;
The host is connect with the photographic device, and the host is used to handle the face image of driver and judges to drive with this Whether the person of sailing is in fatigue driving state;
The warning device is connect with the host, and the warning device is used to judge that driver is in fatigue driving state When by host control give a warning.
2. the recognition of face warning system according to claim 1 for fatigue driving, which is characterized in that the camera shooting dress It sets including high-definition camera and infrared camera;The high-definition camera acquires the driver's cabin in vehicle travel process for daytime The face image of interior driver, the infrared camera drive indoor driving for night acquisition in vehicle travel process The face image of member.
3. the recognition of face warning system according to claim 1 for fatigue driving, which is characterized in that the host packet Include processor and memory, the processor is mutually ined succession the photographic device and the warning device;
Store processing module, alarm module and database in the memory.
4. the recognition of face warning system according to claim 1 for fatigue driving, which is characterized in that described for tired Please the recognition of face warning system sailed further includes video camera, and the video camera is connect with the processor of the host, described to take the photograph Camera before vehicle driving for acquiring the face dynamic image of driver.
5. the recognition of face warning system according to claim 3 for fatigue driving, which is characterized in that the processing mould Block is used to the characteristic information of face dynamic image carry out digital modeling, and digital modeling information preservation to database;For Digital modeling information in characteristic and database in the face image is compared.
6. the recognition of face warning system according to claim 3 for fatigue driving, which is characterized in that the alarm mould Block gives a warning for starting the warning device.
7. the recognition of face warning system according to claim 3 for fatigue driving, which is characterized in that the database For saving the digital modeling information after the characteristic information to face dynamic image being carried out digital modeling.
8. the method for the recognition of face warning system according to claim 1 for fatigue driving, which is characterized in that specific Step includes:
Step 1: the face dynamic image of driver is acquired by the video camera;
Step 2: the face dynamic image of the collected driver of the video camera being sent in the host, in the host Processing module the characteristic information of face dynamic image is just carried out digital modeling, and digital modeling information preservation to data Library;
Step 3: in vehicle travel process, photographic device acquires in real time drives indoor driver's in vehicle travel process Then face image is sent to the face image of collected driver in host, the processing module in the host is this Digital modeling information in characteristic and database in face image is compared;
Step 4: if occur fatigue driving feature in comparing, alarm module just starts the warning device and gives a warning.
9. the method for the recognition of face warning system according to claim 8 for fatigue driving, which is characterized in that described Step 4 is further comprising the steps of:
If not occurring fatigue characteristic in comparing, return step 3 is executed;It in addition can also be the fatigue driving occurred Feature is counted and stores to form safe driving report.
CN201811201348.1A 2018-10-16 2018-10-16 A kind of recognition of face warning system and its method for fatigue driving Pending CN109243144A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811201348.1A CN109243144A (en) 2018-10-16 2018-10-16 A kind of recognition of face warning system and its method for fatigue driving

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811201348.1A CN109243144A (en) 2018-10-16 2018-10-16 A kind of recognition of face warning system and its method for fatigue driving

Publications (1)

Publication Number Publication Date
CN109243144A true CN109243144A (en) 2019-01-18

Family

ID=65053539

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811201348.1A Pending CN109243144A (en) 2018-10-16 2018-10-16 A kind of recognition of face warning system and its method for fatigue driving

Country Status (1)

Country Link
CN (1) CN109243144A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110263663A (en) * 2019-05-29 2019-09-20 南京师范大学 A kind of driver's multistage drowsiness monitor method based on multidimensional facial characteristics
CN110598627A (en) * 2019-09-11 2019-12-20 旭辉卓越健康信息科技有限公司 GUI demonstration tool based on face recognition
CN111439266A (en) * 2019-12-06 2020-07-24 天津师范大学 Driver state real-time monitoring system based on AIoT

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102509418A (en) * 2011-10-11 2012-06-20 东华大学 Fatigue driving estimation and early-warning method and device of multi-sensor information fusion
CN103513728A (en) * 2012-06-29 2014-01-15 鸿富锦精密工业(深圳)有限公司 Circuit board fixing device
CN103714659A (en) * 2013-12-26 2014-04-09 苏州清研微视电子科技有限公司 Fatigue driving identification system based on double-spectrum fusion
CN103839379A (en) * 2014-02-27 2014-06-04 长城汽车股份有限公司 Automobile and driver fatigue early warning detecting method and system for automobile
CN105354986A (en) * 2015-11-12 2016-02-24 熊强 Driving state monitoring system and method for automobile driver
CN105488957A (en) * 2015-12-15 2016-04-13 小米科技有限责任公司 Fatigue driving detection method and apparatus
CN206259001U (en) * 2016-12-23 2017-06-16 天津博普科技有限公司 A kind of tired driver drives monitoring camera equipment

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102509418A (en) * 2011-10-11 2012-06-20 东华大学 Fatigue driving estimation and early-warning method and device of multi-sensor information fusion
CN103513728A (en) * 2012-06-29 2014-01-15 鸿富锦精密工业(深圳)有限公司 Circuit board fixing device
CN103714659A (en) * 2013-12-26 2014-04-09 苏州清研微视电子科技有限公司 Fatigue driving identification system based on double-spectrum fusion
CN103839379A (en) * 2014-02-27 2014-06-04 长城汽车股份有限公司 Automobile and driver fatigue early warning detecting method and system for automobile
CN105354986A (en) * 2015-11-12 2016-02-24 熊强 Driving state monitoring system and method for automobile driver
CN105488957A (en) * 2015-12-15 2016-04-13 小米科技有限责任公司 Fatigue driving detection method and apparatus
CN206259001U (en) * 2016-12-23 2017-06-16 天津博普科技有限公司 A kind of tired driver drives monitoring camera equipment

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
HONGBIN_XU: "python dlib学习(十一):眨眼检测", 《CSDN专业开发者社区》 *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110263663A (en) * 2019-05-29 2019-09-20 南京师范大学 A kind of driver's multistage drowsiness monitor method based on multidimensional facial characteristics
CN110598627A (en) * 2019-09-11 2019-12-20 旭辉卓越健康信息科技有限公司 GUI demonstration tool based on face recognition
CN111439266A (en) * 2019-12-06 2020-07-24 天津师范大学 Driver state real-time monitoring system based on AIoT

Similar Documents

Publication Publication Date Title
Ramzan et al. A survey on state-of-the-art drowsiness detection techniques
CN109243144A (en) A kind of recognition of face warning system and its method for fatigue driving
Monkaresi et al. Automated detection of engagement using video-based estimation of facial expressions and heart rate
CN109803583A (en) Driver monitoring method, apparatus and electronic equipment
KR20190025564A (en) System and method for facial expression recognition and annotation processing
Zeng et al. Spontaneous emotional facial expression detection.
CN103340637B (en) Move and driver's Alertness intelligent monitor system of brain electro' asion and method based on eye
JP2020514861A (en) Driver monitoring and response system
CN108460345A (en) A kind of facial fatigue detection method based on face key point location
Huang et al. RF-DCM: multi-granularity deep convolutional model based on feature recalibration and fusion for driver fatigue detection
CN105516280A (en) Multi-mode learning process state information compression recording method
US20200211274A1 (en) Display cabinet and control method of the same
CN109215131A (en) The driving method and device of conjecture face
CN110414607A (en) Classification method, device, equipment and the medium of capsule endoscope image
Lin et al. Semantic event representation and recognition using syntactic attribute graph grammar
US20230072813A1 (en) Image processing method and apparatus, electronic device, and storage medium
CN108446664A (en) A kind of indentity identifying method and device based on recognition of face
CN104616321B (en) A kind of luggage image motion behavior description method based on Scale invariant features transform
Yang et al. Fatigueview: A multi-camera video dataset for vision-based drowsiness detection
Hochberg Machines should not see as people do, but must know how people see
Wang et al. A real-time driver fatigue identification method based on GA-GRNN
CN113160260A (en) Head-eye double-channel intelligent man-machine interaction system and operation method
CN112527764A (en) Big data machine room management system based on artificial intelligence and management method thereof
Tao et al. Real-time driver fatigue detection based on face alignment
Liu et al. Development of a fatigue detection and early warning system for crane operators: A preliminary study

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
WD01 Invention patent application deemed withdrawn after publication
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20190118