Giter Club home page Giter Club logo

napa-vq's Introduction

NAPA-VQ: Neighborhood-Aware Prototype Augmentation with Vector Quantization for Continual Learning

We propose NAPA-VQ: Neighborhood Aware Prototype Augmentation with Vector Quantization, a framework that reduces catastrophic forgetting in Non-Exemplar based Class Incremental Learning.

Paper

Requirements

Python 3.7.4

PyTorch: 1.9.0

Datasets

Create the "dataset" directory under NAPA-VQ and download the following datasets into the created directory.

1.CIFAR-100

2.Tiny-ImageNet

3.ImageNet-Subset

Training

CIFAR-100

# 5 Tasks
python main_cifar.py --fg_nc 50 --task_num 5 --custom_name "cifar_100-5" --base_model "cifar_100-5" --epochs 100 --shuffle > cifar-5.txt
# 10 Tasks
python main_cifar.py --fg_nc 50 --task_num 10 --custom_name "cifar_100-10" --base_model "cifar_100-10" --epochs 100 --shuffle > cifar-10.txt
# 20 Tasks
python main_cifar.py --fg_nc 40 --task_num 20 --custom_name "cifar_100-20" --base_model "cifar_100-20" --epochs 100 --shuffle > cifar-20.txt

Tiny-ImageNet

# 5 Tasks
python main_tiny.py --fg_nc 100 --task_num 5 --base_model "tiny-5" --custom_name "tiny-5" --shuffle --epochs 50 > tiny-5.txt
# 10 Tasks
python main_tiny.py --fg_nc 100 --task_num 10 --base_model "tiny-10" --custom_name "tiny-10" --shuffle --epochs 50 > tiny-10.txt
# 20 Tasks
python main_tiny.py --fg_nc 100 --task_num 20 --base_model "tiny-20" --custom_name "tiny-20" --shuffle --epochs 50 > tiny-20.txt

ImageNet-Subset

# 5 Tasks
python main_imagenet.py --custom_name "imagenet-5" --base_model "imagenet-5" --fg_nc 50 --task_num 5 --shuffle > imagenet-5.txt
# 10 Tasks
python main_imagenet.py --custom_name "imagenet-10" --base_model "imagenet-10" --fg_nc 50 --task_num 10 --shuffle > imagenet-10.txt
# 20 Tasks
python main_imagenet.py --custom_name "imagenet-20" --base_model "imagenet-20" --fg_nc 40 --task_num 20 --shuffle > imagenet-20.txt

Citation

    
    @InProceedings{Malepathirana_2023_ICCV,
        author    = {Malepathirana, Tamasha and Senanayake, Damith and Halgamuge, Saman},
        title     = {NAPA-VQ: Neighborhood-Aware Prototype Augmentation with Vector Quantization for Continual Learning},
        booktitle = {Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV)},
        month     = {October},
        year      = {2023},
        pages     = {11674-11684}
    }
    

References

We thank the authors of the following repositories for their excellent codebase providing reusable functions.

https://github.com/Impression2805/CVPR21_PASS

napa-vq's People

Contributors

tamasham avatar

Stargazers

Kemibiubiubiu avatar  avatar yuzhang avatar AHang avatar  avatar Yuanlong Wu avatar  avatar Zijian Gao avatar Qiwei Li avatar BarryGu avatar

Watchers

 avatar

napa-vq's Issues

Why multiplying by 4 in the code?

In the code, why multipying self.num_class by 4 for NAVQ? For example:
(1) self.model = network(args.fg_nc * 4, feature_extractor)
(2) self.navq = NAVQ(
num_classes=self.num_class * 4,
feat_dim=self.args.emb_size,
device=device,
)
and so on.

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.