By Linfeng
Please build caffe
Data
#train
##face
##smoking
#val
##face
##smoking
cd Data python generate_txt.py #get train.txt and val.txt
cd .. ./create_imagenet.sh #get lmdb Dataset
sudo ~/PATH-TO-CAFFE/caffe/build/tools/compute_image_mean ./Data/train_lmdb #get the mean.binaryproto
sudo python convert_mean.py mean.binaryproto mean.npy #get mean.npy
Please modfiy the path of your dataset and hyperparameters of solver.prototxt run train.sh for ResNet-18 run train_alex.sh for Alex-Net