-
Download AgeDB dataset from here and extract the zip file (you may need to contact the authors of AgeDB dataset for the zip password) to folder
./data -
(Optional) We have provided required AgeDB-DIR meta file
agedb.csvto set up balanced val/test set in folder./data. To reproduce the results in the paper, please directly use this file. If you want to try other different balanced splits, you can generate it using
python data/create_agedb.py
python data/preprocess_agedb.py- PyTorch (>= 1.2, tested on 1.6)
- tensorboard_logger
- numpy, pandas, scipy, tqdm, matplotlib, PIL
train_gradual.py: main training and evaluation scriptcreate_agedb.py: create AgeDB raw meta datapreprocess_agedb.py: create AgeDB-DIR meta fileagedb.csvwith balanced val/test set
--data_dir: data directory to place data and meta file--num_branch: number of branch for model--loss: training loss type--resume: path to resume checkpoint (for both training and evaluation)--evaluate: evaluate only flag
# for example, train with 2-expert model
python train_gradual.py --loss l1nll --num_branch 2 --dynamic_losspython train_gradual.py --evaluate --resume MODEL_CHECKPOINT [other model settings: e.g.--loss l1nll --num_branch 2]