This project serves a deep learning model scoring selfie images between 1 to 10 based on image and face attributes. You can learn the technical details of this project from this blog post. Use [resnet.torch] (https://github.com/erogol/resnet.torch), if you plan to follow all the training pipeline described on the post.
Given image is processed as follows;
- Detect face.
- Find landmarks
- Rotate image to align face.
- Fill gaps with constant pixel value.
- Send into scoring model.
For an example use check notebook ExampleUse.ipynb
- Contact me from erengolge at gmail.com
Main requirement is Torch computing framework.
dlib face model - place under utils/
beauty model - GPU model (use utils/convert2cpu.lua
for setting it for CPU) place under trained/
optimstate - if you like to fine-tune the model.
dlib sudo pip install dlib
- face and landmark detection)
lutorpy sudo pip install lutorpy
- using torch model on python
skimage sudo pip install skimage
- image processing
cv2 sudo pip install cv2
- OpenCV python module
- Face alignment code in
utils/img_processing.py
. - A template for porting Torch models to python in
utils/Classifier.py
. - The model itself