Official PyTorch implementation of Meta-Continual Learning of Neural Fields (arXiv 2025).
This repository provides a clean, minimal implementation to train and evaluate MCL-NF across three different data modalities:
- Images: CelebA, FFHQ, Imagenette
- Video: VoxCeleb
- Audio: LibriSpeech (1-second and 3-second variants)
We recommend using Conda to manage your environment.
1. Create and activate a new environment:
conda create -n mcl_nf python=3.10 -y
conda activate mcl_nf2. Install PyTorch: (Note: Adjust the CUDA version to match your system. Here we use CUDA 11.8 as an example.)
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu1183. Install remaining dependencies:
pip install numpy einops Pillow PyYAML tensorboard(Depending on your environment, you may also need pytorchvideo for certain video operations.)
To maintain privacy and prevent local paths from leaking, dataset paths are dynamically configured. By default, the code looks for datasets in the ./data directory relative to the project root.
You can override the default data root directory using one of the following methods:
Method 1: Environment Variable (Recommended)
export MCL_NF_DATA_ROOT=/absolute/path/to/your/datasetsMethod 2: Command-Line Argument
Pass the --data_root argument when running the scripts (see Usage below).
If using the default ./data folder, your directory structure should look like this:
data/
├── celeba/ # For CelebA
├── ffhq/ # For FFHQ
├── imagenette/ # For Imagenette
├── voxceleb/ # For VoxCeleb
└── librispeech/ # For LibriSpeech
You can launch experiments by specifying a dataset and optionally passing a YAML configuration file.
Run the main.py script to start training.
Example: Training on VoxCeleb
python main.py --dataset voxceleb --data_root /path/to/your/dataExample: Training on LibriSpeech (using a config file)
If you have a configuration file located at configs/maml_librispeech3.yaml, you can pass it to automatically load hyperparameters:
python main.py --configs configs/maml_librispeech3.yaml --data_root /path/to/your/dataCustomizing Hyperparameters via CLI: Command-line arguments will override configuration files.
python main.py \
--dataset celeba \
--configs configs/maml_celeba.yaml \
--inner_step 4 \
--inner_iter 1 \
--lr 1e-5 \
--batch_size 32To evaluate a saved model checkpoint, use eval.py:
python eval.py \
--dataset voxceleb \
--data_root /path/to/your/data \
--load_path logs/<your_experiment_folder>/best.model(Make sure to adjust the <your_experiment_folder> to point to your actual log directory).
If you find this code or our paper useful in your research, please cite our work:
@inproceedings{woo2025mclnf,
title={Meta-Continual Learning of Neural Fields},
author={Woo, Seungyoon and Yun, Junhyeog and Kim, Gunhee},
booktitle={The Thirteenth International Conference on Learning Representations},
year={2025}
}