Deep Feature Extractor
If we want to use some features extracted from deep networks such as ResNet, then this code will be of help.
Supported Datasets
Currently, we support two kinds of datasets: image
and digit
.
- Image datasets can be versatile.
Digit datasets: we support MNIST, USPS, and SVHN.
Requirements
Python 3, PyTorch 1.0+, PIL
Usage
For image dataset, go to folder
for_image_data
, then run:
python main.py --dataset_path 'your_data_folder' --model_name resnet50 --src amazon --tar webcam
- For digit dataset, go to folder
for_digit_data
, then run:
python digit_deep_feature.py -src mnist -tar usps
Download Features that We Have Already Extracted
Currently, we support ResNet-50 features since this architecture is very popular.
Office-31 ResNet-50 features
Office-Home ResNet-50 pretrained features
Image-CLEF ResNet-50 pretrained features
VisDA classification dataset features by ResNet-50
Downloaded Finetuned Models
You can download finetuned models here:
Finetuned ResNet-50 models For Office-31 dataset: BaiduYun | Mega
Finetuned ResNet-50 models For Office-Home dataset: BaiduYun | Mega
Finetuned ResNet-50 models For ImageCLEF dataset: BaiduYun | Mega
Finetuned ResNet-50 models For VisDA dataset: BaiduYun | Mega
Finetuned LeNet+ models For MNIST dataset: BaiduYun
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.
Benchmark
See the power of deep features here.