Giter Club home page Giter Club logo

tfg's Introduction

Training-Free Generator for Few-Shot Class Incremental Learning

PyTorch implementation of Training-Free Generator for Few-Shot Class Incremental Learning

Abstract

In Class Incremental Learning (CIL), generative replay methods play a crucial role by training a generator to recreate old session samples when new sessions are introduced. However, in the more realistic and stringent scenario of Few-Shot Class Incremental Learning (FSCIL), limited data in new sessions often leads to overfitting of the generator, resulting in poor generation and classification performance. To address this challenge, we introduce the concept of zero-shot learning and propose a novel conditional generator capable of directly generating samples for new sessions without explicit training. Our approach involves training a feature extractor to reduce the training complexity of the generator and then leveraging a semantic feature conditional generator, which combines Variation AutoEncoder (VAE) and Generative Adversarial Network (GAN) architectures, to generate image features based on semantic features. By utilizing semantic features from both old and new classes, our method generates corresponding pseudo image features for new sessions, which are then combined with real image features for classifier fine-tuning. Extensive experiments conducted on the miniImagenet, CUB200, and CIFAR100 datasets demonstrate that our proposed method achieves state-of-the-art performance in FSCIL tasks. Our work addresses the limitations of existing methods and opens avenues for further research in Few-Shot Class Incremental Learning.

Requirements

tqdm~=4.64.1 numpy~=1.23.5 pillow~=9.3.0 torchvision~=0.15.0

Datasets

We follow FSCIL setting to use the same data index_list for training.
For CIFAR100, the dataset will be download automatically.
For miniImagenet and CUB200, you can download from here. Please put the downloaded file under data/ folder and unzip it:

$ tar -xvf miniimagenet.tar 
$ tar -xvzf CUB_200_2011.tgz

Training scripts

cifar100

$ python main.py -dataset cifar100 -epochs_base 150 -lr_base 0.1 -batch_size_base 128 -dataroot YOUR_DATA_PATH

mini_imagenet

$ python main.py -dataset mini_imagenet -epochs_base 150 -lr_base 0.1 -batch_size_base 128 -dataroot YOUR_DATA_PATH

cub200

$ python main.py -dataset cub200 -epochs_base 150 -lr_base 0.01 -batch_size_base 128 -dataroot YOUR_DATA_PATH

Notice

Different machines may yield different results; therefore, we provide the trained model parameters for users to check the results of our work in this link Then move trained model parameters to the checkpoint directory. To use them, set the base learning rate to 0.0001 and run the model.

Acknowledgment

Our project references the codes in the following repos.

tfg's People

Contributors

rumorgin avatar

Watchers

 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.