Giter Club home page Giter Club logo

itaml's Introduction

iTAML : An Incremental Task-Agnostic Meta-learning Approach

Official implementation of "iTAML : An Incremental Task-Agnostic Meta-learning Approach". (CVPR 2020) (paper link).

iTAML : An Incremental Task-Agnostic Meta-learning Approach (accepted at IEEE Conference on Computer Vision and Pattern Recognition, Seattle, Washington, 2020), hypothesizes that generalization is a key factor for continual learning. In this pursuit, we learn a set of generalized parameters, that are neither specific to old nor new tasks by introducing a novel meta-learning approach that seeks to maintain an equilibrium between all the encountered tasks. This is ensured by a task-agnostic meta-update rule which avoids catastrophic forgetting. When presented with a continuum of data, our model automatically identifies the task and quickly adapts to it with just a single update.

This code provides an implementation for iTAML. This repository is implemented using PyTorch and it includes code for running the incremental learning domain experiments on MNIST, SVHN, CIFAR100, ImageNet, and MS-Celeb-10K datasets.

(a) iTAML overall learning process

Dependencies

This code requires the following:

  • matplotlib==3.2.1
  • numpy==1.18.2
  • pandas==1.0.3
  • Pillow==7.0.0
  • scipy==1.4.1
  • torch==1.4.0
  • torchvision==0.5.0

run pip3 install -r requirements.txt to install all the dependencies.

Data

All the dataloading is handled at incremental_dataloader.py and the experimental setting for the datasets are handled at args class in train_<dataset>.py. args class contains all the hyper-parameters settings to run the experiment. For example, consider the following:

class args:
   dataset = "cifar100"
   checkpoint = "results/cifar100/test1"
   savepoint = "models/" + "/".join(checkpoint.split("/")[1:])
   data_path = "../Datasets/CIFAR100/"
   
   num_class = 100
   class_per_task = 10
   num_task = 10

   memory = 2000
   beta = 1
   r = 1
   .
   .

Here, dataset can be set to the following:

  • "cifar100"
  • "cub200"
  • "imagenet"
  • "celeb"
  • "mnist"
  • "svhn"

checkpoint and savepoint saves the records of performance and trained models, respectively. data_path points to the location of the dataset downloaded, if it is not downloaded previously, the script will download and extract at the pointed location. As mentioned in our paper, each dataset can be run with different class incremental settings, hence the total number of classes included in the experiment, number of classes assigned per each task and the total number of tasks are defined at num_class, class_per_task, and num_task. Also, memory is the upper bound for the number of exemplars. Further, beta is the decay-rate, which controls the amount of fusion between old parameters and current parameters and r is the number of inner loop updates.

Usage

To run the experiment, run CUDA_VISIBLE_DEVICES=0 python3 train_cifar.py [x]. Here [x] is a system argument of the starting task id. begins with 0.

Results

We perform extensive experiments on five datasets in a class-incremental setting, leading to significant improvements over the state of the art methods (e.g.,a 21.3% boost on CIFAR100 with 10 incremental tasks). Specifically, on large-scale datasets that generally prove difficult cases for incremental learning, our approach delivers absolute gains as high as 19.1% and 7.4% on ImageNetand MS-Celeb datasets, respectively.

(b) iTAML performance on CIFAR100 with class incremental setting of 5,10,20 classes per task respectivly.



(c) iTAML performance on ImageNet-100, ImageNet-1K and MS-Celeb-10K.

We Credit

Thanks to https://github.com/khurramjaved96/incremental-learning, for the preliminary implementation of the data loader.

Contact

Jathushan Rajasegaran - [email protected] or [email protected]
To ask questions or report issues, please open an issue on the issues tracker.
Discussions, suggestions and questions are welcome!

Citation

@article{rajasegaran2020itaml,
  title={iTAML : An Incremental Task-Agnostic Meta-learning Approach},
  author={Rajasegaran, Jathushan and Khan, Salman and Hayat, Munawar and Khan, Fahad Shahbaz and Shah, Mubarak},
  journal={The IEEE Conference on Computer Vision and Pattern Recognition (CVPR)},
  month = {June},
  year = {2020}
}

itaml's People

Contributors

brjathu avatar salman-h-khan 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.