NCAadapt: Dynamic adaptation with domain-specific Neural Cellular Automata for continual hippocampus segmentation (WACV 2025)
This repository represents the official PyTorch code base for our WACV 2025 published paper NCAadapt: Dynamic adaptation with domain-specific Neural Cellular Automata for continual hippocampus segmentation.
This WACV 2025 submission currently includes the following CL baselines
- NCAdapt
- EWC
- RWalk
- SI
- FDR
- DER
- A-Gem
The simplest way to install all dependencies is by using Anaconda:
- Create a Python 3.9 environment as
conda create -n <your_conda_env> python=3.9
and activate it asconda activate <your_conda_env>
. - Install CUDA and PyTorch through conda with the command specified by PyTorch. The command for Linux was at the time
conda install pytorch torchvision cudatoolkit=11.3 -c pytorch
. Our code was last tested with version 1.13. Pytorch and TorchVision versions can be specified during the installation asconda install pytorch==<X.X.X> torchvision==<X.X.X> cudatoolkit=<X.X> -c pytorch
. Note that the cudatoolkit version should be of the same major version as the CUDA version installed on the machine, e.g. when using CUDA 11.x one should install a cudatoolkit 11.x version, but not a cudatoolkit 10.x version. - Navigate to the project root (where
setup.py
lives). - Execute
pip install -r requirements.txt
to install all required packages.
- Since all U-Net and NCAdapt baselines are implemented in this Framework, all models are trained in the same fashion.
- The easiest way to start is using our
train_*.py
python files. For every baseline and Continual Learning method, we provide specifictrain_*.py
python files, located in several script folders like this one. - The eval folder contains a jupyter notebooks that was used to calculate performance metrics and plots used in our submission.
- Models: Our pre-trained models from our submission can be provided by contacting the main author upon request.
- Prototypes: Our generated prototypes along with the preprocessed dataset can be requested per mail.
For more information about NCAdapt, please read the following paper:
Ranem, A., Kalkhof, J. & Mukhopadhyay, A. (2024).
NCAdapt: Dynamic adaptation with domain-specific Neural Cellular Automata for continual hippocampus segmentation.
If you are using NCAdapt or our code base for your article, please cite the following paper:
@article{ranem2024ncadapt,
title={NCAdapt: Dynamic adaptation with domain-specific Neural Cellular Automata for continual hippocampus segmentation},
author={Ranem, Amin and Kalkhof, John and Mukhopadhyay, Anirban},
}