A pretrained autoencoder for femalefaces
Install dependencies [dlib], [cv2], [pygame], [matplotlib], [keras], [tensorflow]:
sudo pip install dlib opencv-python pygame matplotlib tensorflow keras
git clone [email protected]:BSolut/faceautoencoder.git
Execute the editor
python editor.py
If you still want to sleep peacefully at night, make sure that there are only two eyes in one picture in your training data.
- Build prepare working dir:
mdir ~/working_dir cd ~/working_dir mkdir clean mkdir raw mkdir ignore wget https://github.com/davisking/dlib-models/raw/master/shape_predictor_5_face_landmarks.dat.bz2 bzip2 -d shape_predictor_5_face_landmarks.dat.bz2 wget https://raw.githubusercontent.com/opencv/opencv/master/data/haarcascades/haarcascade_frontalface_default.xml
- Generate a textfile with links for training images. Acceptable sources are pinterest.com, famousbirthdays.com or any source of your linking
- Download images into a directory
python data.py get --source [links.txt]
- Auto process images (croping/face aligment)
python data.py process
- Remove any outliers (e.g. not a face, black and white images)
Once started, you can use: r - removes that image Left/Right arrow key - move inside the dataset ESC - exits
python data.py check
- Build train_data.npy
python data.py build
python train.py
Once you are happy with the results, build stats
python stats.py