C3AE: Exploring the Limits of Compact Model for Age Estimation
This repo is organized as follows:
C3AE_Age_Estimation/
|->examples
|->models
|->prepare_data
|->data
| |->img_list
| |->dataset
|->tf_records
|->ckpt
|->tools
- tensorflow-gpu==1.12.0 (I only test on tensorflow 1.12.0)
- python==3.4.3
- numpy
- easydict
- opencv==3.4.1
- Python packages might missing. pls fix it according to the error message.
- Clone the C3AE_Age_Estimation repository, and we'll call the directory that you cloned C3AE_Age_Estimation as
${C3AE_Age_Estimation_ROOT}
.
git clone https://github.com/vicwer/C3AE_Age_Estimation.git
- Create data, tf_records and ckpt directory.
cd ${C3AE_Age_Estimation_ROOT};
mkdir ckpt
mkdir tf_records
mkdir data
cd data
mkdir img_list
mkdir train_list
mkdir dataset
data should be organized as follows:
data/
|->img_list/img_list.txt
|->train_list/train.txt
|->dataset/*.png
-
Download dataset: IMDB-WIKI, Morph II, FG-NET
-
Generate img_list.txt formatted as "img_path age"
-
Generate train.txt formatted as "img_path age_label age_Yn_vector"
-
Generate tf_records:
cd prepare_data
python3 gen_tf_records_fast_to_uint8.py
I provide common used config.py in ${C3AE_Age_Estimation_ROOT}, which can set hyperparameters.
e.g.
cd ${C3AE_Age_Estimation_ROOT}
vim config.py
cfg.train.num_gpus = {your gpu nums}
etc.
cd ${C3AE_Age_Estimation_ROOT}/examples/
python3 multi_gpus_train.py
test.py
tools.py
pre-train model
...