The idea of the project was to implement a lightweight solution to check driver's drowsiness, head orientation and detect cellphone usage.
- Clone this repository and install the required packages through pip.
- Launch the script from the command line, giving the index of the webcam you want to use as -i argument. Paths to configuration file, weights and cateogries names are configured by default, but you can specify it as follow:
python safedrive.py -c path/to/config.pbtxt -w path/to/weights.pb -n path/to/names -i 0Camera index changes from system to system and depends also on the number of webcam you have, usually 0 is for the main one but if it doesn't work you may have to test it with 1, 2, and so on.
You can also download the entire mobilenet_v3 model from here and extract it wherever you want, but keep in mind that you'll need the file coco.names present in the "models" folder.
pip install -r requirements.txt
If you want to test single features, in the scripts folder there are splitted python files for drowsiness detection and head pose estimation.
