A PyTorch reimplementation of Weakly Supervised Facial Action Unit Recognition through Adversarial Training
Please note that this project is NOT the official implementation. It is a replicate only for learning, and I cannot guarantee its correctness. Kindly refer to the Differences and Existing Problems below before using this project or making contact with me. Thanks
git clone https://github.com/donydchen/ran_replicate.git
cd ran_replicate
python tools/gen_pseudo_au.py
datasets/CKPlus
python tools/preprocess_ckplus.py
# this script will parse image path and label, create train and test list, detect and align faces, etc.
python tools/extract_au.py
# note that you need to build and install OpenFace first.
python main.py --data_root datasets/CKPlus --which_model_netR resnet18 --backend_pretrain --gpu_ids 0 --gan_type wgan-gp --load_size 250 --final_size 224 --visdom_env resnet18_wgan_fold1 --train_csv train_ids_1.csv --test_csv test_ids_1.csv
python main.py --mode test --data_root datasets/CKPlus --gpu_ids 0 --ckpt_dir ckpts/CKPlus/resnet18/fold_1/190423_105211 --load_epoch 300 --which_model_netR resnet18 --load_size 250 --final_size 224 --test_csv test_ids_1.csv
Five-fold subject-independent corss-validation on CK+.
AU | F1 Score |
---|---|
AU01 | 0.463703 |
AU02 | 0.605515 |
AU04 | 0.684670 |
AU05 | 0.623919 |
AU06 | 0.513861 |
AU07 | 0.379647 |
AU09 | 0.529395 |
AU12 | 0.629960 |
AU17 | 0.728096 |
AU23 | 0.632099 |
AU25 | 0.367475 |
Avg | 0.559849 |
You are always welcome to contribute to this repository by sending a pull request.