hytseng0509 / CrossDomainFewShot

Cross-Domain Few-Shot Classification via Learned Feature-Wise Transformation (ICLR 2020 spotlight)
331 stars 62 forks source link
domain-generalization few-shot-learning iclr2020 meta-learning

Cross-Domain Few-Shot Classification via Learned Feature-Wise Transformation

[Project Page][Paper]

Pytorch implementation for our cross-domain few-shot classification method. With the proposed learned feature-wise transformation layers, we are able to:

  1. improve the performance of exisiting few-shot classification methods under cross-domain setting
  2. achieve stat-of-the-art performance under single-domain setting.

Contact: Hung-Yu Tseng (htseng6@ucmerced.edu)

Paper

Please cite our paper if you find the code or dataset useful for your research.

Cross-Domain Few-Shot Classification via Learned Feature-Wise Transformation
Hung-Yu Tseng, Hsin-Ying Lee, Jia-Bin Huang, Ming-Hsuan Yang
International Conference on Learning Representations (ICLR), 2020 (spotlight)

@inproceedings{crossdomainfewshot,
  author = {Tseng, Hung-Yu and Lee, Hsin-Ying and Huang, Jia-Bin and Yang, Ming-Hsuan},
  booktitle = {International Conference on Learning Representations},
  title = {Cross-Domain Few-Shot Classification via Learned Feature-Wise Transformation},
  year = {2020}
}

Usage

Prerequisites

Install

Clone this repository:

git clone https://github.com/hytseng0509/CrossDomainFewShot.git
cd CrossDomainFewShot

Datasets

Download 5 datasets seperately with the following commands.

Feature encoder pre-training

We adopt baseline++ for MatchingNet, and baseline from CloserLookFewShot for other metric-based frameworks.

Training with multiple seen domains

Baseline training w/o feature-wise transformations.

Evaluation

Test the metric-based framework METHOD on the unseen domain TESTSET.

Note