Training project to detect if eye is open or closed
python -m train --network mi --dataset_dir /path/to/dataset of the model --output /path/to/output file --image_size image_height image_width
python -m train --network si --dataset_dir /path/to/dataset of the model --output /path/to/output file --image_size image_height image_width
Where
--mmodule type. It can be eithertrainordemo.--networknetwork type. It can be eithermiorsi.--outputpath to model's weight output file.--epochsspecifies the number of passes through the dataset.--batch_sizerefers to the number of training examples utilised in one iteration usually between 1 and size of the dataset.--lrthe learning rate of the model.--stepshow many steps per epoch.--weightspath to the weights of the model .h5 file.--image_sizetwo arguments that specify the height and width of the image.
-
tensorflow >= 1.0
-
keras >= 2.0
-
opencv >= 3.0
-
dlib
-
numpy
-
[shape_predictor_68_face_landmarks.dat][sp]
- opencv should be compiled with ffmpeg support.
- Conda virtual environment can be created using the following command.
conda env create -f requirements.yml -n emopy_2