Coder Social home page Coder Social logo

comet's Introduction

Concept Learners for Few-Shot Learning

Kaidi Cao*, Maria Brbić*, Jure Leskovec

Project website


This repo contains the reference source code in PyTorch of the COMET algorithm. COMET is a meta-learning method that learns generalizable representations along human-understandable concept dimensions. For more details please check our paper Concept Learners for Few-Shot Learning (ICLR '21).

Dependencies

The code is built with following libraries:

Getting started

CUB dataset
  • Change directory to ./filelists/CUB
  • Run source ./download_CUB.sh
Tabula Muris dataset
  • Change directory to ./filelists/tabula_muris
  • Run source ./download_TM.sh

Usage

Training

We provide an example here:

Run python ./train.py --dataset CUB --model Conv4NP --method comet --train_aug

Testing

We provide an example here:

Run python ./test.py --dataset CUB --model Conv4NP --method comet --train_aug

Tabula Muris benchmark

If you would like to test your algorithm on the new benchmark dataset introduced in our work, you can download the data as described above or directly at http://snap.stanford.edu/comet/data/tabula-muris-comet.zip.

Dataset needs to be preprocessed using preprocess.py. Train/test/validation splits are available in load_tabula_muris.

Running this code requires anndata and scanpy libraries.

Citing

If you find our research useful, please consider citing:

@inproceedings{
    cao2021concept,
    title={Concept Learners for Few-Shot Learning},
    author={Cao, Kaidi and Brbi\'c, Maria and Leskovec, Jure},
    booktitle={International Conference on Learning Representations (ICLR)},
    year={2021},
}

Our codebase is developed based on the benchmark implementation from paper A Closer Look at Few-shot Classification.

Tabula Muris benchmark is developed based on the mouse aging cell atlas from paper https://www.nature.com/articles/s41586-020-2496-1.

comet's People

Contributors

mbrbic avatar kaidic avatar

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.