A physiognomy application which analysis people facial feature to evaluates a person's characteristic, and then do the fortune-telling.
*Only tested in python3
pip3 install --user -r requirement.txt
To build the dataset for training, run build_db.py
Data are collect from Google Image search directly accordling to the facial description mentioned in
data/analysis.json
python build_db.py
Or you may download the builded dataset from Google Drive, and extract it into this folder.
To train your own classifier, run train.py
If you updated the face database, just delete
data/train_data.pkl
and let it generate a new one for you.
# if need to regenerate the dataset, run below line
# rm data/train_data.pkl
python train.py
To run test on different source of image, run test.py
python test.py --help
usage: test.py [-h] [-i IMAGE] [-u URL]
optional arguments:
-h, --help show this help message and exit
-i IMAGE, --image IMAGE
input image
-u URL, --url URL input image url