This repo implements training and testing models, and feature extractor based on models for VGGFace2 [1]. Pretrained models for PyTorch are converted from Caffe models authors of [1] provide.
To download VGGFace2 dataset, see authors' site.
The followings are PyTorch models converted from Caffe models authors of [1] provide.
arch_type | download link |
---|---|
resnet50_ft |
link(preparing) |
senet50_ft |
link(preparing) |
resnet50_scratch |
link(preparing) |
senet50_scratch |
link(preparing) |
Usage:
python demo.py extract <options>
--arch_type
network architecture type (default:resnet50_ft
):resnet50_ft
ResNet-50 which are first pre-trained on MS1M, and then fine-tuned on VGGFace2senet50_ft
SE-ResNet-50 trained likeresnet50_ft
resnet50_scratch
ResNet-50 trained from scratch on VGGFace2senet50_scratch
SE-ResNet-50 trained likeresnet50_scratch
--weight_file
weight file converted from Caffe model(see here)--resume
checkpoint file used in feature extraction (default: None). If set,--weight_file
is ignored.--dataset_dir
dataset directory--feature_dir
directory where extracted features are saved--test_img_list_file
image file for which features are extracted--log_file
log file--meta_file
Meta information file for VGGFace2,identity_meta.csv
in Meta.tar.gz--batch_size
batch size (default: 32)--gpu
GPU devide id (default: 0)--workers
number of data loading workers (default: 4)--horizontal_flip
horizontally flip images specified in--test_img_list_file
Usage:
python demo.py test <options>
--arch_type
network architecture type (default:resnet50_ft
):resnet50_ft
ResNet-50 which are first pre-trained on MS1M, and then fine-tuned on VGGFace2senet50_ft
SE-ResNet-50 trained likeresnet50_ft
resnet50_scratch
ResNet-50 trained from scratch on VGGFace2senet50_scratch
SE-ResNet-50 trained likeresnet50_scratch
--weight_file
weight file converted from Caffe model(see here)--resume
checkpoint file used in test (default: None). If set,--weight_file
is ignored.--dataset_dir
dataset directory--test_img_list_file
text file containing image files used for validation, test or feature extraction--log_file
log file--meta_file
Meta information file for VGGFace2,identity_meta.csv
in Meta.tar.gz--batch_size
batch size (default: 32)--gpu
GPU devide id (default: 0)--workers
number of data loading workers (default: 4)
Usage:
python demo.py train <options>
--arch_type
network architecture type (default:resnet50_ft
):resnet50_ft
ResNet-50 which are first pre-trained on MS1M, and then fine-tuned on VGGFace2senet50_ft
SE-ResNet-50 trained likeresnet50_ft
resnet50_scratch
ResNet-50 trained from scratch on VGGFace2senet50_scratch
SE-ResNet-50 trained likeresnet50_scratch
--weight_file
weight file converted from Caffe model(see here), and used for fine-tuning--resume
checkpoint file used to resume training (default: None). If set,--weight_file
is ignored.--dataset_dir
dataset directory--train_img_list_file
text file containing image files used for training--test_img_list_file
text file containing image files used for validation, test or feature extraction--log_file
log file--meta_file
Meta information file for VGGFace2,identity_meta.csv
in Meta.tar.gz--checkpoint_dir
checkpoint output directory--config
number of settings and hyperparameters used in training--batch_size
batch size (default: 32)--gpu
GPU devide id (default: 0)--workers
number of data loading workers (default: 4)
VGG-Face dataset, described in [1] is not planned to be supported in this repo. If you are interested in models for VGG-Face, see keras-vggface.