Official Pytorch implementation of Online Continual Learning on Class Incremental Blurry Task Configuration with Anytime Inference (ICLR 2022)

Overview

The Official Implementation of CLIB (Continual Learning for i-Blurry)

Online Continual Learning on Class Incremental Blurry Task Configuration with Anytime Inference
Hyunseo Koh*, Dahyun Kim*, Jung-Woo Ha, Jonghyun Choi
ICLR 2022 [Paper]
(* indicates equal contribution)

Overview

Abstract

Despite rapid advances in continual learning, a large body of research is devoted to improving performance in the existing setups. While a handful of work do propose new continual learning setups, they still lack practicality in certain aspects. For better practicality, we first propose a novel continual learning setup that is online, task-free, class-incremental, of blurry task boundaries and subject to inference queries at any moment. We additionally propose a new metric to better measure the performance of the continual learning methods subject to inference queries at any moment. To address the challenging setup and evaluation protocol, we propose an effective method that employs a new memory management scheme and novel learning techniques. Our empirical validation demonstrates that the proposed method outperforms prior arts by large margins.

Results

Results of CL methods on various datasets, for online continual learning on i-Blurry-50-10 split, measured by metric. For more details, please refer to our paper.

Methods CIFAR10 CIFAR100 TinyImageNet ImageNet
EWC++ 57.34±2.10 35.35±1.96 22.26±1.15 24.81
BiC 58.38±0.54 33.51±3.04 22.80±0.94 27.41
ER-MIR 57.28±2.43 35.35±1.41 22.10±1.14 20.48
GDumb 53.20±1.93 32.84±0.45 18.17±0.19 14.41
RM 23.00±1.43 8.63±0.19 5.74±0.30 6.22
Baseline-ER 57.46±2.25 35.61±2.08 22.45±1.15 25.16
CLIB 70.26±1.28 46.67±0.79 23.87±0.68 28.16

Getting Started

To set up the environment for running the code, you can either use the docker container, or manually install the requirements in a virtual environment.

Using Docker Container (Recommended)

We provide the Docker image khs8157/iblurry on Docker Hub for reproducing the results. To download the docker image, run the following command:

docker pull khs8157/iblurry:latest

After pulling the image, you may run the container via following command:

docker run --gpus all -it --shm-size=64gb -v /PATH/TO/CODE:/PATH/TO/CODE --name=CONTAINER_NAME khs8157/iblurry:latest bash

Replace the arguments written in italic with your own arguments.

Requirements

  • Python3
  • Pytorch (>=1.9)
  • torchvision (>=0.10)
  • numpy
  • pillow~=6.2.1
  • torch_optimizer
  • randaugment
  • easydict
  • pandas~=1.1.3

If not using Docker container, install the requirements using the following command

pip install -r requirements.txt

Running Experiments

Downloading the Datasets

CIFAR10, CIFAR100, and TinyImageNet can be downloaded by running the corresponding scripts in the dataset/ directory. ImageNet dataset can be downloaded from Kaggle.

Experiments Using Shell Script

Experiments for the implemented methods can be run by executing the shell scripts provided in scripts/ directory. For example, you may run CL experiments using CLIB method by

bash scripts/clib.sh

You may change various arguments for different experiments.

  • NOTE: Short description of the experiment. Experiment result and log will be saved at results/DATASET/NOTE.
    • WARNING: logs/results with the same dataset and note will be overwritten!
  • MODE: CL method to be applied. Methods implemented in this version are: [clib, er, ewc++, bic, mir, gdumb, rm]
  • DATASET: Dataset to use in experiment. Supported datasets are: [cifar10, cifar100, tinyimagenet, imagenet]
  • N_TASKS: Number of tasks. Note that corresponding json file should exist in collections/ directory.
  • N: Percentage of disjoint classes in i-blurry split. N=100 for full disjoint, N=0 for full blurry. Note that corresponding json file should exist in collections/ directory.
  • M: Blurry ratio of blurry classes in i-blurry split. Note that corresponding json file should exist in collections/ directory.
  • GPU_TRANSFORM: Perform AutoAug on GPU, for faster running.
  • USE_AMP: Use automatic mixed precision (amp), for faster running and reducing memory cost.
  • MEM_SIZE: Maximum number of samples in the episodic memory.
  • ONLINE_ITER: Number of model updates per sample.
  • EVAL_PERIOD: Period of evaluation queries, for calculating .

Citation

If you used our code or i-blurry setup, please cite our paper.

@inproceedings{koh2022online,
  title={Online Continual Learning on Class Incremental Blurry Task Configuration with Anytime Inference},
  author={Koh, Hyunseo and Kim, Dahyun and Ha, Jung-Woo and Choi, Jonghyun},
  booktitle={ICLR},
  year={2022}
}

License

Copyright (C) 2022-present NAVER Corp.

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <https://www.gnu.org/licenses/>.
You might also like...
[CVPR 2022] CoTTA Code for our CVPR 2022 paper Continual Test-Time Domain Adaptation

CoTTA Code for our CVPR 2022 paper Continual Test-Time Domain Adaptation Prerequisite Please create and activate the following conda envrionment. To r

Official repository for the paper
Official repository for the paper "Self-Supervised Models are Continual Learners" (CVPR 2022)

Self-Supervised Models are Continual Learners This is the official repository for the paper: Self-Supervised Models are Continual Learners Enrico Fini

ReLoss - Official implementation for paper "Relational Surrogate Loss Learning" ICLR 2022

Relational Surrogate Loss Learning (ReLoss) Official implementation for paper "R

Tensorflow 2 implementation of the paper: Learning and Evaluating Representations for Deep One-class Classification published at ICLR 2021

Deep Representation One-class Classification (DROC). This is not an officially supported Google product. Tensorflow 2 implementation of the paper: Lea

A PyTorch implementation of ICLR 2022 Oral paper PiCO: Contrastive Label Disambiguation for Partial Label Learning
A PyTorch implementation of ICLR 2022 Oral paper PiCO: Contrastive Label Disambiguation for Partial Label Learning

PiCO: Contrastive Label Disambiguation for Partial Label Learning This is a PyTorch implementation of ICLR 2022 Oral paper PiCO; also see our Project

PyTorch-LIT is the Lite Inference Toolkit (LIT) for PyTorch which focuses on easy and fast inference of large models on end-devices.

PyTorch-LIT PyTorch-LIT is the Lite Inference Toolkit (LIT) for PyTorch which focuses on easy and fast inference of large models on end-devices. With

Learning Efficient Online 3D Bin Packing on Packing Configuration Trees
Learning Efficient Online 3D Bin Packing on Packing Configuration Trees

Learning Efficient Online 3D Bin Packing on Packing Configuration Trees This repository is being continuously updated, please stay tuned! Any code con

PyTorch implementation of our Adam-NSCL algorithm from our CVPR2021 (oral) paper "Training Networks in Null Space for Continual Learning"

Adam-NSCL This is a PyTorch implementation of Adam-NSCL algorithm for continual learning from our CVPR2021 (oral) paper: Title: Training Networks in N

Official code of CVPR 2021's PLOP: Learning without Forgetting for Continual Semantic Segmentation
Official code of CVPR 2021's PLOP: Learning without Forgetting for Continual Semantic Segmentation

PLOP: Learning without Forgetting for Continual Semantic Segmentation This repository contains all of our code. It is a modified version of Cermelli e

Comments
  • How to make N-M split .json file?

    How to make N-M split .json file?

    Dear authors,

    Thanks for your great job in introducing a new continual learning scenario, incremental Blurry setup. I have a simple question regarding the dataset json file. I want to test iBlurry setup in more diverse N-M conditions. So I would like to ask you for help if you can share the code for making the iBlurry dataset. it would be a great help. I look forward to hearing from you.

    Thank you.

    opened by pgh2874 0
Owner
NAVER AI
Official account of NAVER CLOVA AI Lab, Korea No.1 Industrial AI Research Group
NAVER AI
This is the formal code implementation of the CVPR 2022 paper 'Federated Class Incremental Learning'.

Official Pytorch Implementation for GLFC [CVPR-2022] Federated Class-Incremental Learning This is the official implementation code of our paper "Feder

Race Wang 57 Dec 27, 2022
Code for ICLR 2021 Paper, "Anytime Sampling for Autoregressive Models via Ordered Autoencoding"

Anytime Autoregressive Model Anytime Sampling for Autoregressive Models via Ordered Autoencoding , ICLR 21 Yilun Xu, Yang Song, Sahaj Gara, Linyuan Go

Yilun Xu 22 Sep 8, 2022
The official PyTorch code for 'DER: Dynamically Expandable Representation for Class Incremental Learning' accepted by CVPR2021

DER.ClassIL.Pytorch This repo is the official implementation of DER: Dynamically Expandable Representation for Class Incremental Learning (CVPR 2021)

rhyssiyan 108 Jan 1, 2023
Official pytorch code for "APP: Anytime Progressive Pruning"

APP: Anytime Progressive Pruning Diganta Misra1,2,3, Bharat Runwal2,4, Tianlong Chen5, Zhangyang Wang5, Irina Rish1,3 1 Mila - Quebec AI Institute,2 L

Landskape AI 12 Nov 22, 2022
Official repository of the paper 'Essentials for Class Incremental Learning'

Essentials for Class Incremental Learning Official repository of the paper 'Essentials for Class Incremental Learning' This Pytorch repository contain

null 33 Nov 27, 2022
Pytorch Implementation of Continual Learning With Filter Atom Swapping (ICLR'22 Spolight) Paper

Continual Learning With Filter Atom Swapping Pytorch Implementation of Continual Learning With Filter Atom Swapping (ICLR'22 Spolight) Paper If find t

null 11 Aug 29, 2022
The code repository for "PyCIL: A Python Toolbox for Class-Incremental Learning" in PyTorch.

PyCIL: A Python Toolbox for Class-Incremental Learning Introduction • Methods Reproduced • Reproduced Results • How To Use • License • Acknowledgement

Fu-Yun Wang 258 Dec 31, 2022
Implementation of the paper "Self-Promoted Prototype Refinement for Few-Shot Class-Incremental Learning"

Self-Promoted Prototype Refinement for Few-Shot Class-Incremental Learning This is the implementation of the paper "Self-Promoted Prototype Refinement

Kai Zhu 78 Dec 2, 2022
Code for "Learning Structural Edits via Incremental Tree Transformations" (ICLR'21)

Learning Structural Edits via Incremental Tree Transformations Code for "Learning Structural Edits via Incremental Tree Transformations" (ICLR'21) 1.

NeuLab 40 Dec 23, 2022
EDPN: Enhanced Deep Pyramid Network for Blurry Image Restoration

EDPN: Enhanced Deep Pyramid Network for Blurry Image Restoration Ruikang Xu, Zeyu Xiao, Jie Huang, Yueyi Zhang, Zhiwei Xiong. EDPN: Enhanced Deep Pyra

null 69 Dec 15, 2022