MCL-NF

February 23, 2026 ยท View on GitHub

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)

๐Ÿ›  Setup & Dependencies

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_nf

2. 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/cu118

3. Install remaining dependencies:

pip install numpy einops Pillow PyYAML tensorboard

(Depending on your environment, you may also need pytorchvideo for certain video operations.)


๐Ÿ“‚ Data Configuration

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/datasets

Method 2: Command-Line Argument Pass the --data_root argument when running the scripts (see Usage below).

Expected Dataset Structure

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

๐Ÿš€ Usage

You can launch experiments by specifying a dataset and optionally passing a YAML configuration file.

Training

Run the main.py script to start training.

Example: Training on VoxCeleb

python main.py --dataset voxceleb --data_root /path/to/your/data

Example: 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/data

Customizing 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 32

Evaluation

To 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).


๐Ÿ“ Citation

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