Simple Emotion Recognition for internship project.
Make sure you already have the following things installed:
- Windows 8~10 or Linux Ubuntu (I'm using 18.04)
- Numpy
- Scipy
- OpenCV 3 or 4
- Scikit-learn (if you want to compare it to this library usage)
- Keras (with Tensorflow Backend)
- Anaconda 3
- h5py
- Matplotlib
- Json
- Webcam or Video File to do the real time programming
- If python 3, use
python3
instead
python -c haarcascade_frontalface_default.xml \
-m checkpoints/epoch_*num*.hdf5
-
If you wish to use a video file instead of webcam add
-v video_path/video_file.format
at the end of the above run text -
In my laptop, the internal webcam uses
cv2.VideoCapture(0)
orcv2.VideoCapture(1)
while external webcam usescv2.VideoCapture(2)
- Run
python train_recognizer.py -c checkpoints \
-m checkpoints/epoch_*num*.hdf5 \
-s *num epoch to restart at*
or
python train_recognizer.py --checkpoints checkpoints \
--model checkpoints/epoch_*num*.hdf5 \
--start-epoch *num epoch to restart at*
- Run
python test_recognizer.py -m checkpoints/epoch_*num*.hdf5
or
python test_recognizer.py --model checkpoints/epoch_*num*.hdf5
This project is the codification of the module "Deep Learning for Computer Vision with Python" Chapter 1~3 by Dr. Adrian Rosenberck. Great great thanks to him for making it easy for me to learn DLCV. There are some module that were not included in the module, so I kinda interpret it myself. Thank goodness it works with the remaining module.