ProtoFlow: Mitigating Forgetting in Class-Incremental Remote Sensing Segmentation via Low-Curvature Prototype Flow
ProtoFlow is a time-aware prototype dynamics framework for incremental remote sensing segmentation, designed to reduce catastrophic forgetting under class and domain shifts.
cd protoflow_reproduce
python -m venv .venv
source .venv/bin/activate
pip install --upgrade pip
pip install -r requirements.txtThe project uses a generic image/mask folder format with split files:
data/processed/<dataset>/
train.txt
val.txt
test.txt # optional
images/
xxx.png
masks/
xxx.png
Each split file contains one sample per line:
images/xxx.png masks/xxx.png
Masks must contain integer class ids in [0, num_classes-1] and optional ignore id 255.
For large tiles, use:
python -m protoflow.tools.prepare_patches \
--image-dir data/raw/deepglobe/images \
--mask-dir data/raw/deepglobe/masks \
--out-root data/processed/deepglobe \
--split train \
--patch-size 512 \
--stride 512Run the command for train/val/test as needed. For Vaihingen/Potsdam, use stride 256 as described in the paper.
python -m protoflow.tools.train --config configs/deepglobe.yamlpython -m protoflow.tools.train --config configs/vaihingen.yamlpython -m protoflow.tools.train --config configs/potsdam.yamlpython -m protoflow.tools.train --config configs/loveda.yamlpython -m protoflow.tools.evaluate --config configs/deepglobe.yaml --checkpoint outputs/deepglobe_protoflow/checkpoints/final.ptThe trainer writes JSON/CSV logs under outputs/<experiment>/metrics. Use:
python -m protoflow.tools.analyze_prototypes --run-dir outputs/deepglobe_protoflow
python -m protoflow.tools.plot_analysis --run-dir outputs/deepglobe_protoflow --out-dir outputs/deepglobe_protoflow/figuresprotoflow/
configs/ YAML configs for all paper protocols and smoke test
protoflow/
config.py YAML loading and config helpers
datasets/ generic folder dataset, incremental wrappers, transforms
models/ HRNet-W48, simple CNN, segmentation head
engine/ training, evaluation, losses, metrics, memory, prototype bank
tools/ CLI tools: train, eval, patchify, synthetic data, analysis plots
scripts/run_smoke_test.sh one-command smoke test
requirements.txt
@misc{wu2026protoflowmitigatingforgettingclassincremental,
title={ProtoFlow: Mitigating Forgetting in Class-Incremental Remote Sensing Segmentation via Low-Curvature Prototype Flow},
author={Jiekai Wu and Rong Fu and Chuangqi Li and Zijian Zhang and Guangxin Wu and Hao Zhang and Shiyin Lin and Jianyuan Ni and Yang Li and Dongxu Zhang and Amir H. Gandomi and Simon Fong and Pengbin Feng},
year={2026},
eprint={2604.03212},
archivePrefix={arXiv},
primaryClass={cs.CV},
url={https://arxiv.org/abs/2604.03212},
}