[Face attributes] age-gender-estimation reproduction

reference:

https://github.com/yu4u/age-gender-estimation

0. Environment

ubuntu16.04
python3.6
cuda10.1
tensorflow-gpu==2.3.0

absl-py==0.11.0
astunparse==1.6.3
cachetools==4.1.1
certifi==2020.12.5
chardet==3.0.4
cmake==3.18.4.post1
dataclasses==0.8
dlib==19.21.1
gast==0.3.3
google-auth==1.23.0
google-auth-oauthlib==0.4.2
google-pasta==0.2.0
grpcio==1.34.0
h5py==2.10.0
idna==2.10
importlib-metadata==3.1.1
Keras-Preprocessing==1.1.2
Markdown==3.3.3
numpy==1.18.5
oauthlib==3.1.0
omegaconf==2.0.5
opencv-python==4.1.0.25
opt-einsum==3.3.0
protobuf==3.14.0
pyasn1==0.4.8
pyasn1-modules==0.2.8
pycurl==7.43.0
pygobject==3.20.0
python-apt==1.1.0b1+ubuntu0.16.4.10
PyYAML==5.3.1
requests==2.25.0
requests-oauthlib==1.3.0
rsa==4.6
scipy==1.4.1
six==1.15.0
tensorboard==2.4.0
tensorboard-plugin-wit==1.7.0
tensorflow-estimator==2.3.0
termcolor==1.1.0
typing-extensions==3.7.4.3
unattended-upgrades==0.1
urllib3==1.26.2
Werkzeug==1.0.1
wrapt==1.12.1
zipp==3.4.0
pandas
scikit-learn
hydra
hydra-core
albumentations
tqdm

The tensorflow-v2.3.0 used in the environment was originally debugged on 1.12.0, but the model cannot be called up. Try to compile and so on a series of operations. After being severely beaten, finally succumbed to tensorflow-v2.3.0. 

1.demo

python demo.py

Or specify the picture in the directory to identify:

python demo.py --weight_file ./pretrained_models/EfficientNetB3_224_weights.11-3.44.hdf5 --image_dir ./data/imdb_crop/00

If you set up your own GPU, it is probably inferred to use the GPU size within 1G. 

2. Training

python train.py

The training uses about 9G GPU size.

3. Test

Follow https://github.com/yu4u/age-gender-estimation/blob/master/appa-real to download and prepare data, test:

 python evaluate_appa_real.py --weight_file ./checkpoint/EfficientNetB3_224_weights.14-3.45.hdf5

 

Guess you like

Origin blog.csdn.net/qq_35975447/article/details/110622808