Implementation of the paper "Self-Promoted Prototype Refinement for Few-Shot Class-Incremental Learning"

Related tags

Deep LearningSPPR
Overview

Self-Promoted Prototype Refinement for Few-Shot Class-Incremental Learning

This is the implementation of the paper "Self-Promoted Prototype Refinement for Few-Shot Class-Incremental Learning" (accepted to CVPR2021).

For more information, check out the paper on [arXiv].

Requirements

  • Python 3.8
  • PyTorch 1.8.1 (>1.1.0)
  • cuda 11.2

Preparing Few-Shot Class-Incremental Learning Datasets

Download following datasets:

1. CIFAR-100

Automatically downloaded on torchvision.

2. MiniImageNet

(1) Download MiniImageNet train/test images[github], and prepare related datasets according to [TOPIC].

(2) or Download processed data from our Google Drive: [mini-imagenet.zip], (and locate the entire folder under datasets/ directory).

3. CUB200

(1) Download CUB200 train/test images, and prepare related datasets according to [TOPIC]:

wget http://www.vision.caltech.edu/visipedia-data/CUB-200-2011/CUB_200_2011.tgz

(2) or Download processed data from our Google Drive: [cub.zip], (and locate the entire folder under datasets/ directory).

Create a directory '../datasets' for the above three datasets and appropriately place each dataset to have following directory structure:

../                                                        # parent directory
├── ./                                           # current (project) directory
│   ├── log/                              # (dir.) running log
│   ├── pre/                              # (dir.) trained models for test.
│   ├── utils/                            # (dir.) implementation of paper 
│   ├── README.md                          # intstruction for reproduction
│   ├── test.sh                          # bash for testing.
│   ├── train.py                        # code for training model
│   └── train.sh                        # bash for training model
└── datasets/
    ├── CIFAR100/                      # CIFAR100 devkit
    ├── mini-imagenet/           
    │   ├── train/                         # (dir.) training images (from Google Drive)
    │   ├── test/                           # (dir.) testing images (from Google Drive)
    │   └── ..some csv files..
    └── cub/                                   # (dir.) contains 200 object classes
        ├── train/                             # (dir.) training images (from Google Drive)
        └── test/                               # (dir.) testing images (from Google Drive)

Training

Choose apporopriate lines in train.sh file.

sh train.sh
  • '--base_epochs' can be modified to control the initial accuracy ('Our' vs 'Our*' in our paper).
  • Training takes approx. several hours until convergence (trained with one 2080 Ti or 3090 GPUs).

Testing

1. Download pretrained models to the 'pre' folder.

Pretrained models are available on our [Google Drive].

2. Test

Choose apporopriate lines in train.sh file.

sh test.sh 

Main Results

The experimental results with 'test.sh 'for three datasets are shown below.

1. CIFAR-100

Model 1 2 3 4 5 6 7 8 9
iCaRL 64.10 53.28 41.69 34.13 27.93 25.06 20.41 15.48 13.73
TOPIC 64.10 56.03 47.89 42.99 38.02 34.60 31.67 28.35 25.86
Ours 63.97 65.86 61.31 57.6 53.39 50.93 48.27 45.36 43.32

2. MiniImageNet

Model 1 2 3 4 5 6 7 8 9
iCaRL 61.31 46.32 42.94 37.63 30.49 24.00 20.89 18.80 17.21
TOPIC 61.31 45.58 43.77 37.19 32.38 29.67 26.44 25.18 21.80
Ours 61.45 63.80 59.53 55.53 52.50 49.60 46.69 43.79 41.92

3. CUB200

Model 1 2 3 4 5 6 7 8 9 10 11
iCaRL 68.68 52.65 48.61 44.16 36.62 29.52 27.83 26.26 24.01 23.89 21.16
TOPIC 68.68 61.01 55.35 50.01 42.42 39.07 35.47 32.87 30.04 25.91 24.85
Ours 68.05 62.01 57.61 53.67 50.77 46.76 45.43 44.53 41.74 39.93 38.45

The presented results are slightly different from those in the paper, which are the average results of multiple tests.

BibTeX

If you use this code for your research, please consider citing:

@inproceedings{zhu2021self,
  title={Self-Promoted Prototype Refinement for Few-Shot Class-Incremental Learning},
  author={Zhu, Kai and Cao, Yang and Zhai, Wei and Cheng, Jie and Zha, Zheng-Jun},
  booktitle={Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  pages={6801--6810},
  year={2021}
}
Owner
Kai Zhu
Kai Zhu
An Inverse Kinematics library aiming performance and modularity

IKPy Demo Live demos of what IKPy can do (click on the image below to see the video): Also, a presentation of IKPy: Presentation. Features With IKPy,

Pierre Manceron 481 Jan 02, 2023
A tiny, friendly, strong baseline code for Person-reID (based on pytorch).

Pytorch ReID Strong, Small, Friendly A tiny, friendly, strong baseline code for Person-reID (based on pytorch). Strong. It is consistent with the new

Zhedong Zheng 3.5k Jan 08, 2023
Implementation for "Conditional entropy minimization principle for learning domain invariant representation features"

Implementation for "Conditional entropy minimization principle for learning domain invariant representation features". The code is reproduced from thi

1 Nov 02, 2022
An official implementation of the Anchor DETR.

Anchor DETR: Query Design for Transformer-Based Detector Introduction This repository is an official implementation of the Anchor DETR. We encode the

MEGVII Research 276 Dec 28, 2022
Implementation of "Fast and Flexible Temporal Point Processes with Triangular Maps" (Oral @ NeurIPS 2020)

Fast and Flexible Temporal Point Processes with Triangular Maps This repository includes a reference implementation of the algorithms described in "Fa

Oleksandr Shchur 20 Dec 02, 2022
nanodet_plus,yolov5_v6.0

OAK_Detection OAK设备上适配nanodet_plus,yolov5_v6.0 Environment pytorch = 1.7.0

炼丹去了 1 Feb 18, 2022
A Pose Estimator for Dense Reconstruction with the Structured Light Illumination Sensor

Phase-SLAM A Pose Estimator for Dense Reconstruction with the Structured Light Illumination Sensor This open source is written by MATLAB Run Mode Open

Xi Zheng 14 Dec 19, 2022
Keyword-BERT: Keyword-Attentive Deep Semantic Matching

project discription An implementation of the Keyword-BERT model mentioned in my paper Keyword-Attentive Deep Semantic Matching (Plz cite this github r

1 Nov 14, 2021
Official code for "Mean Shift for Self-Supervised Learning"

MSF Official code for "Mean Shift for Self-Supervised Learning" Requirements Python = 3.7.6 PyTorch = 1.4 torchvision = 0.5.0 faiss-gpu = 1.6.1 In

UMBC Vision 44 Nov 21, 2022
ICLR2021 (Under Review)

Self-Supervised Time Series Representation Learning by Inter-Intra Relational Reasoning This repository contains the official PyTorch implementation o

Haoyi Fan 58 Dec 30, 2022
An integration of several popular automatic augmentation methods, including OHL (Online Hyper-Parameter Learning for Auto-Augmentation Strategy) and AWS (Improving Auto Augment via Augmentation Wise Weight Sharing) by Sensetime Research.

An integration of several popular automatic augmentation methods, including OHL (Online Hyper-Parameter Learning for Auto-Augmentation Strategy) and AWS (Improving Auto Augment via Augmentation Wise

45 Dec 08, 2022
This repository contains a pytorch implementation of "StereoPIFu: Depth Aware Clothed Human Digitization via Stereo Vision".

StereoPIFu: Depth Aware Clothed Human Digitization via Stereo Vision | Project Page | Paper | This repository contains a pytorch implementation of "St

87 Dec 09, 2022
SuperSDR: multiplatform KiwiSDR + CAT transceiver integrator

SuperSDR SuperSDR integrates a realtime spectrum waterfall and audio receive from any KiwiSDR around the world, together with a local (or remote) cont

Marco Cogoni 30 Nov 29, 2022
Easy-to-use micro-wrappers for Gym and PettingZoo based RL Environments

SuperSuit introduces a collection of small functions which can wrap reinforcement learning environments to do preprocessing ('microwrappers'). We supp

Farama Foundation 357 Jan 06, 2023
A Lightweight Face Recognition and Facial Attribute Analysis (Age, Gender, Emotion and Race) Library for Python

deepface Deepface is a lightweight face recognition and facial attribute analysis (age, gender, emotion and race) framework for python. It is a hybrid

Sefik Ilkin Serengil 5.2k Jan 02, 2023
Auto-Lama combines object detection and image inpainting to automate object removals

Auto-Lama Auto-Lama combines object detection and image inpainting to automate object removals. It is build on top of DE:TR from Facebook Research and

44 Dec 09, 2022
Unsupervised Discovery of Object Radiance Fields

Unsupervised Discovery of Object Radiance Fields by Hong-Xing Yu, Leonidas J. Guibas and Jiajun Wu from Stanford University. arXiv link: https://arxiv

Hong-Xing Yu 148 Nov 30, 2022
KoRean based ELECTRA pre-trained models (KR-ELECTRA) for Tensorflow and PyTorch

KoRean based ELECTRA (KR-ELECTRA) This is a release of a Korean-specific ELECTRA model with comparable or better performances developed by the Computa

12 Jun 03, 2022
Official repo for the work titled "SharinGAN: Combining Synthetic and Real Data for Unsupervised GeometryEstimation"

SharinGAN Official repo for the work titled "SharinGAN: Combining Synthetic and Real Data for Unsupervised GeometryEstimation" The official project we

Koutilya PNVR 23 Oct 19, 2022
Meta graph convolutional neural network-assisted resilient swarm communications

Resilient UAV Swarm Communications with Graph Convolutional Neural Network This repository contains the source codes of Resilient UAV Swarm Communicat

62 Dec 06, 2022