Skip to content

BSolut/faceautoencoder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A pretrained autoencoder for femalefaces

Run

Install dependencies [dlib], [cv2], [pygame], [matplotlib], [keras], [tensorflow]:

sudo pip install dlib opencv-python pygame matplotlib tensorflow keras
git clone git@github.com:BSolut/faceautoencoder.git

Execute the editor

python editor.py

Train your own dataset

Friendly note

If you still want to sleep peacefully at night, make sure that there are only two eyes in one picture in your training data.

Building 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)
    python data.py check
    Once started, you can use: r - removes that image Left/Right arrow key - move inside the dataset ESC - exits
  • Build train_data.npy
    python data.py build

Execute training

python train.py

Once you are happy with the results, build stats

python stats.py

About

A pretrained autoencoder for femalefaces

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages