Skip to content

raja434/driver-fatigue-detection-system

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 

Repository files navigation

driver-fatigue-detection-system

drowsiness detection

Intallation process

step 1:

Install all libraries

  • scipy (pip install scipy)

    • We’ll need the SciPy package so we can compute the Euclidean distance between facial landmarks points in the eye aspect ratio calculation (not strictly a requirement, but you should have SciPy installed if you intend on doing any work in the computer vision, image processing, or machine learning space).
  • OpenCv

    • openCv for computer vision
  • numpy (pip install numpy)

    • numpy for basic processing and calcutions ...
  • imutils (pip install imutils)

    • We’ll also need the imutils package, my series of computer vision and image processing functions to make working with OpenCV easier.
  • pyglet (pip install pyglet)

    • we'll also need pyglet playing sound such as .mp3 , .wav ...
  • dlib

    • To detect and localize facial landmarks we’ll need the dlib library

installation of Dlib libary

These instructions assume you are on macOS, but basically the same on Linux.

Pre-reqs:

Clone the code from github:

git clone https://github.com/davisking/dlib.git

Build the main dlib library:

cd dlib
mkdir build; cd build; cmake .. -DDLIB_USE_CUDA=0 -DUSE_AVX_INSTRUCTIONS=1; cmake --build .

Build and install the Python extensions:

cd ..
python3 setup.py install --yes USE_AVX_INSTRUCTIONS --no DLIB_USE_CUDA

At this point, you should be able to run python3 and type import dlib successfully.

if you have python 2.7.---

cd ..
python setup.py install --yes USE_AVX_INSTRUCTIONS --no DLIB_USE_CUDA

step 2

step 3

python drowsiness detection.py

Releases

No releases published

Packages

No packages published

Languages