Research project that focuses on recognizing emotions using face recognition and NLP. The project is developed by Emory NLP lab.
- Software requirements
- Installation of Faster R-CNN
- Adjusting to detect in Friends TV show
- Face_recognition package installation
- Run Face_recognition package
pycaffe. Detailed installation instructions can be found at Caffe: Installation
- Python Packages: cython, opencv-mac, or opencv-ubuntu, and easydict
- Make sure you use virtual environment. Further instructions can be found at pyimagesearch
Installation of Faster R-CNN (Based on
- Follow every step outlined by face-py-faster-rcnn
Face-py-faster-rcnn uses WIDER data set to train the model. The output should be .caffemodel extension
Note 3: Make sure to download the package Faster RCNN package 'recursively'.
- To test the model, the tutorial uses FDDB provided by UMass. So, if you are using pre-trained model, there is no need to download WIDER data set (make sure you adjust code accordingly).
- If all the steps are executed without errors, you can run the code on dataset:
~$ cd rcnn/face-py-faster-rcnn-master/ python ./tools/run_face_detection_on_fddb.py --gpu=0
Installation of Faster R-CNN (Friends TV show)
- Update directory names in the file: run_face_detection_on_fddb.py:
1.1 location of .caffemodel 1.2 data_dir, out_dir 1.3 plt.savefig() in the vis_detections() method
- Run the code as in Step 3 of Installation of
**General Note: **
After updating the directory names, if you get 'asType' error, it means that directory isn't being read properly. In other words, recheck by asserting or printing directories you visit.
Installing Face Recognition package using dlib
- Install dlib using either Method 1 or Method 2.
Use procedure outlined by PyImageSearch
Make sure you install python, opencv, boost, boost-python, dlib using
brew install package_name.
Download dlib from website
Activate virtual environment, and in dlib directory, run
python setup.py install
More information can be found in this github
- Install face_recognition package
Make sure dlib is installed without errors, otherwise face_recognition will not run properly. Then, in your bash run
pip install face_recognition
More information about face recognition can be found here
Convenient explanation and sample explanations are given by Adam Geitgey
Run Face Recognition Package
- Copy get_dir.py file
- Inside the get_dir.py file provide 3 paths.
2.1 rootDir - known faces (i.e. faces of characters: Rachel, Ross, Monica, etc) 2.2 unknownDir - location of pictures where you need to recognize faces 2.3 newDir - location where to store new, evaluated pictures