Skip to content

jinpeng0528/STAR-TPAMI

Repository files navigation

[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

Installation

Pre-requisites

This repository has been tested with the following environment:

  • CUDA (11.3)
  • Python (3.8.13)
  • Pytorch (1.12.1)
  • Pandas (2.0.3)

Example conda environment setup

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.3

Getting Started

Datasets

PASCAL VOC 2012

We 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
    
    

ADE20K

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.txt

CityScapes

We 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.txt

Training

To train STAR-Lite and STAR-Basic models, you can directly run the .sh files located in the ./scripts/ directory.

Testing

PASCAL VOC 2012

To evaluate on the PASCAL VOC 2012 dataset, execute the following command:

python eval_voc.py --device 0 --test --resume path/to/weight.pth

ADE20K

To evaluate on the ADE20K dataset, execute the following command:

python eval_ade.py --device 0 --test --resume path/to/weight.pth

CityScapes

To evaluate on the CityScapes dataset, execute the following command:

python eval_city.py --device 0 --test --resume path/to/weight.pth

Citation

@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}
}

Acknowledgements

  • This code is based on DKD ([2022-NeurIPS] Decomposed Knowledge Distillation for Class-Incremental Semantic Segmentation).
  • This template is borrowed from pytorch-template.

About

Code release for "Replay Without Saving: Prototype Derivation and Distribution Rebalance for Class-Incremental Semantic Segmentation" (IEEE TPAMI)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors