If we want to use some features extracted from deep networks such as ResNet, then this code will be of help.
Currently, we support two kinds of datasets: image and digit. Specifically, for image datasets, we support Office-31, Office-Home, Image-CLEF DA, and VisDA 2017. For digit datasets, we support MNIST, USPS, and SVHN.
Python 3, PyTorch 0.4.0+, PIL
Something as follows. It's easy to configure.
For image dataset, go to folder for_image_data, then run:
python deep_features.py -dataset office31 -src amazon -tar webcam
For digit dataset, go to folder for_digit_data, then run:
python digit_deep_feature.py -src mnist -tar usps
Currently, we support ResNet-50 features since this architecture is very often.
Office-Home ResNet-50 pretrained features
Image-CLEF ResNet-50 pretrained features
VisDA classification dataset features by ResNet-50
You can download finetuned models here:
Finetuned ResNet-50 models For Office-31 dataset
Finetuned ResNet-50 models For Office-Home dataset
Finetuned ResNet-50 models For ImageCLEF dataset
Finetuned ResNet-50 models For VisDA dataset
Finetuned LeNet+ models For MNIST dataset
The names of the model on image datasets: best_resnet_domain.pth, while domain indicates the domain of the dataset.
The finetune procedure following a 8-2 training/validation split.
See the power of deep features here.