You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: README.md
+7-1
Original file line number
Diff line number
Diff line change
@@ -17,7 +17,7 @@ The following packages are required to run the scripts:
17
17
18
18
- Dataset: please download dataset and put images into the folder data/[name of dataset, miniimagenet or cub]/images
19
19
20
-
- Pre-trained weights: please download the [pre-trained weights](https://drive.google.com/open?id=14Jn1t9JxH-CxjfWy4JmVpCxkC9cDqqfE) of the encoder if needed
20
+
- Pre-trained weights: please download the [pre-trained weights](https://drive.google.com/open?id=14Jn1t9JxH-CxjfWy4JmVpCxkC9cDqqfE) of the encoder if needed. The pre-trained weights can be downloaded by the script download_weight.sh
21
21
22
22
### Dataset
23
23
@@ -80,6 +80,12 @@ to train the 1-shot 5-way FEAT model with ResNet backbone on MiniImageNet:
The train_xxx.py scripts will evaluate the model with best validation accuracy at last. Meanwhile, a given model can also be evaluated by the eval_xxx.py, with options similar to the training scripts. For example, for a ConvNet model at "./saves/feat-model/xx.pth", it can be evaluated for 1-shot 5-way tasks by:
After downloading the dataset, please create a new folder named "images" under the folder "miniimagenet" or "cub", and put all images in this folder. The provided data loader will read images from the "images" folder by default. Of course, it is also OK to change the read path. For example, for the miniimagenet dataset, please change the line 10 of "./feat/dataloader/mini_imagenet.py" as the path of the downloaded images.
5
+
6
+
We assume all the images in the folder are the original ones (except a crop based on bounding boxes for CUB, see details below), and the data loader will do transformations on those raw images, such as resize and normalization. All the images will be resized as 84x84 for ConNet backbone, and 80x80 for ResNet backbone.
7
+
8
+
### MiniImageNet
9
+
The MiniImageNet dataset is a subset of the ImageNet that includes a total number of 100 classes and 600 examples per class. We follow the [Ravi's split](https://github.com/twitter/meta-learning-lstm), and use 64 classes as SEEN categories, 16 and 20 as two sets of UNSEEN categories for model validation and evaluation respectively. To download this dataset, please email Sachin Ravi for the link.
10
+
11
+
### CUB
12
+
[Caltech-UCSD Birds (CUB) 200-2011 dataset](http://www.vision.caltech.edu/visipedia/CUB-200-2011.html) is initially designed for fine-grained classification. It contains in total 11,788 images of birds over 200 species. On CUB, we follow the [previous setting](https://arxiv.org/abs/1707.02610) randomly sampling 100 species as SEEN classes, another two 50 species are used as two UNSEEN sets. Since there is no public class split for CUB, we use our own split as saved in the "CUB" folder. We crop all images with given bounding box before training. We only test CUB with ConvNet backbone in our work.
0 commit comments