[IEEE TPAMI] Replay Without Saving: Prototype Derivation and Distribution Rebalance for Class-Incremental Semantic Segmentation
This is an official implementation of the paper "Replay Without Saving: Prototype Derivation and Distribution Rebalance for Class-Incremental Semantic Segmentation", accepted by IEEE TPAMI. 📝 Paper
This repository has been tested with the following environment:
- CUDA (11.3)
- Python (3.8.13)
- Pytorch (1.12.1)
- Pandas (2.0.3)
conda create -n star python=3.8.13
conda activate star
conda install pytorch==1.12.1 torchvision==0.13.1 torchaudio==0.12.1 cudatoolkit=11.3 -c pytorch
conda install pandas==2.0.3We use augmented 10,582 training samples and 1,449 validation samples for PASCAL VOC 2012. You can download the original dataset in here. To train our model with augmented samples, please download labels of augmented samples ('SegmentationClassAug') and file names ('train_aug.txt'). The structure of data path should be organized as follows:
└── ./datasets/PascalVOC2012
├── Annotations
├── ImageSets
│ └── Segmentation
│ ├── train_aug.txt
│ └── val.txt
├── JPEGImages
├── SegmentationClass
├── SegmentationClassAug
└── SegmentationObject
We use 20,210 training samples and 2,000 validation samples for ADE20K. You can download the dataset in here. The structure of data path should be organized as follows:
└── ./datasets/ADE20K
├── annotations
├── images
├── objectInfo150.txt
└── sceneCategories.txtWe use 2975 training samples and 500 validation samples for ADE20K. You can download the dataset in here ("gtFine_trainvaltest.zip (241MB) [md5]" and "leftImg8bit_trainvaltest.zip (11GB) [md5]"). The structure of data path should be organized as follows:
└── ./datasets/ADE20K
├── leftImg8bit
├── gtFine
├── fine_train.txt
└── fine_val.txtTo train STAR-Lite and STAR-Basic models, you can directly run the .sh files located in the ./scripts/ directory.
To evaluate on the PASCAL VOC 2012 dataset, execute the following command:
python eval_voc.py --device 0 --test --resume path/to/weight.pthTo evaluate on the ADE20K dataset, execute the following command:
python eval_ade.py --device 0 --test --resume path/to/weight.pthTo evaluate on the CityScapes dataset, execute the following command:
python eval_city.py --device 0 --test --resume path/to/weight.pth@article{chen2025replay,
title={Replay Without Saving: Prototype Derivation and Distribution Rebalance for Class-Incremental Semantic Segmentation},
author={Chen, Jinpeng and Cong, Runmin and Yuxuan, Luo and Ip, Horace and Kwong, Sam},
journal={IEEE Transactions on Pattern Analysis and Machine Intelligence},
year={2025},
volume={47},
number={6},
pages={4699-4716}
}
- This code is based on DKD ([2022-NeurIPS] Decomposed Knowledge Distillation for Class-Incremental Semantic Segmentation).
- This template is borrowed from pytorch-template.