Giter VIP home page Giter VIP logo

semisup_scarse's Introduction

Semi-Supervised Learning with Scarce Annotations

Code to reproduce some of the main results in:

Sylvestre-Alvise Rebuffi, Sebastien Ehrhardt, Kai Han, Andrea Vedaldi, Andrew Zisserman, "Semi-Supervised Learning with Scarce Annotations", arXiv

Requirements

Install requirements: the environement used to run this code is provided in environment.yml. It can be installed using conda with the following command (environment name will be salsa):

conda env create -f environment.yml

Train a RotNet

python rotNet.py --dataset mydataset --network mynetwork --save_dir myrotnetdir

Choose any network among: {ResNet-18, RevNet-18,TempEns} and dataset in {cifar10, cifar100, svhn}

Alternative training with semi-supervision

python alternative_training.py --dataset mydataset --save_dir mydir --rotnet_dir myrotnetdir --nb_labels_per_class 10

Default parameters are for CIFAR10. For CIFAR100 use inner milestones [14,20], for SVHN use learning rate of 0.1 and outer milestones [120,150].

Training scripts

A sample training script to run the same experiments 10 time with different dataset splits is available in scripts/. You will have to specify (in the following order) dataset, number of labels per class, save_dir, and rotnet_dir.

For instance: sh ./scripts/train_semi.sh cifar10 10 mydir myrotnetdir

Train with full supervision

python supervised_training.py --dataset mydataset --network mynetwork --save_dir mydir --rotnet_dir myrotnetdir

Available Datasets

This code supports CIFAR10, CIFAR100 and SVHN datasets.

Two moons figure

We also provide the script to generate the two moons figure of the paper (Fig 1.). To generate the pictures run python two_moons/pi_model.py, figures will be available in the folder render/.

Cite this work

If you use this code for your project please consider citing us:

@article{rebuffi2019semi,
  title={Semi-Supervised Learning with Scarce Annotations},
  author={Rebuffi, Sylvestre-Alvise and Ehrhardt, Sebastien and Han, Kai and Vedaldi, Andrea and Zisserman, Andrew},
  journal={Technical report},
  year={2019}
}

semisup_scarse's People

Contributors

hyenal avatar

Watchers

James Cloos 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.