This repository is a Torch implementation of "Age Estimation Using Expectation of Label Distribution Learning", Bin-Bin Gao, Hong-Yu Zhou, Jianxin Wu, Xin Geng. The paper is accepted at the 27th International Joint Conference on Artificial Intelligence (IJCAI 2018).
You can train Deep ConvNets from a pre-trained model on your datasets with limited resources. This repo is created by Bin-Bin Gao. You can train Deep ConvNets from a pre-trained model on your datasets with limited resources. This repo is created by Bin-Bin Gao.
MS-Celeb-1M Face Models (jrjq)
Align&Cropped ChaLearn Face Imgaes
copy ./private/*.lua to the path of torch nn package (torch/extra/nn/)
copy ./private/*.c to the path of torch nn package (torch/extra/nn/lib/THNN/generic)
add the following lines to torch/nn/init.lua
require('nn.KLDivCriterion')
require('nn.ExpOut')
add the following lines to torch/extra/nn/lib/THNN/generic/THNN.h
TH_API void THNN_(KLDivCriterion_updateOutput)(
THNNState *state, // library's state
THTensor *input, // input tensor
THTensor *target, // target tensor
THTensor *output, // [OUT] a one-element tensor containing the loss
bool sizeAverage); // if true, the loss will be normalized **by total number of elements**
TH_API void THNN_(KLDivCriterion_updateGradInput)(
THNNState *state, // library's state
THTensor *input, // input tensor
THTensor *target, // target tensor
THTensor *gradInput, // [OUT] gradient w.r.t. input
bool sizeAverage); // if true, the loss will be normalized **by total number of elements**
add the following lines to torch/extra/nn/lib/THNN/init.c
#include "generic/KLDivCriterion.c"
#include "THGenerateFloatTypes.h"
luarocks install rocks/nn-scm-1.rockspec
CUDA_VISIBLE_DEVICES=14,15 th main_agenet.lua -dataset chalearn15 -nGPU 2 -batchSize 128 -dataAug true -nEpochs 60 -loss ldkl -LR 0.001 -netType hp-agenet-msceleb1m -CR 0.5 -labelStep 1
CUDA_VISIBLE_DEVICES=14,15 th main_mtagenet.lua -dataset chalearn15 -nGPU 2 -batchSize 128 -dataAug true -nEpochs 60 -loss ldklexpl1 -LR 0.001 -netType hp-mtagenet-msceleb1m -CR 0.5 -labelStep 1 -lambda 1
CUDA_VISIBLE_DEVICES=1 th evaluation.lua -dataset chalearn15 -loss ldkl -netType hp-agenet-msceleb1m -CR 0.5 -dataAug true -labelStep 1
CUDA_VISIBLE_DEVICES=1 th evaluation.lua -dataset chalearn15 -loss ldklexpl1 -netType hp-mtagenet-msceleb1m -CR 0.5 -dataAug true -labelStep 1 -lambda 1
If you find DLDL-v2 helpful, please cite it as
@inproceedings{gaoDLDLv2,
title={Age Estimation Using Expectation of Label Distribution Learning},
author={Gao, Bin-Bin and Zhou, Hong-Yu and Wu, Jianxin and Geng, Xin},
booktitle={Proceedings of the 27th International Joint Conference on Artificial Intelligence (IJCAI 2018)},
pages={xx--xx},
year={2018}
}
ATTN1: This packages are free for academic usage. You can run them at your own risk. For other purposes, please contact Prof. Jianxin Wu ([email protected]).