GithubHelp home page GithubHelp logo

fsl-global's Introduction

Few-Shot Learning with Global Class Representations

Created by Tiange Luo*, Aoxue Li*, Tao Xiang, Weiran Huang and Liwei Wang

Overview

About this repository

This is the repository for our ICCV 2019 paper. In this paper, we propose to tackle the challenging few-shot learning (FSL) problem by learning global class representations for each class via involving both base and novel classes training samples from the beginning. For more details of our framework, please refer to our paper or project website.

Due to company and patent issues (CN patent #201910672533.7, US patent #US 2022/0092351 A1), the author only release the codes of the proposed module. If you want to run those codes, you have to implement and train the hallucinator proposed in Low-shot learning from imaginary data.

Generalized FSL in the paper

The generalized FSL test way proposed in the paper is highly similar to the typical 5-way-5-shot FSL. The only difference is that we would do a all-way classification (100-way in section 4.2.1, 120-way classification in section 4.3.2). We set three types of evaluation. Please refer to section 4.2.1, in each episode, we will sample 5 classes from base classes (acc_b), novel classes (acc_n), or all classes (acc_a). Then, sampling 5 shots from each class. Finally, for all three types, we will do a all-way classification.

In section 4.2.1, follow the class splits as the original miniImageNet, we use the validation set to tune hyper-parameters, use both the training and validation sets as the base classes (80), and use the test set as the novel classes (20). In section 4.3.2, we still use the original training and validation sets as the base classes (80), but use the test set and the new added 20 classes as the novel classes (40).

Usage

  • convnet.py: the network for extracting feature and registrating.
  • train_100way.py: train the model on the 100-way setting.
  • test_100way.py: test in generalized FSL setting descrebed in section 4.2.1.
  • samplers.py: code for sampling data in a 5-way-5-shot manner.
  • csv: dataset splits.

Citation

If you find our work useful in your research, please consider citing:

    @article{luo2019few,
      title={Few-Shot Learning with Global Class Representations},
      author={Luo, Tiange and Li, Aoxue and Xiang, Tao and Huang, Weiran and Wang, Liwei},
      journal={arXiv preprint arXiv:1908.05257},
      year={2019}
    }

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.