This repository contains the code for "Beyond Periodicity: Towards a Unifying Framework for Activations in Coordinate-MLPs".
An easy-to-get-started Colab demo for experimenting with novel activation functions proposed in the paper (coming soon)
This code heavily relies on the awesome NeRF implementation provided here.
git clone https://github.com/samgregoost/Beyond_periodicity.git
cd Beyond_periodicity
pip install -r requirements.txt
Dependencies (click to expand)
- PyTorch 1.4
- matplotlib
- numpy
- imageio
- imageio-ffmpeg
- configargparse
Download data for two example datasets: lego and fern
bash download_example_data.sh
To train the network on other datasets, download the data here. Place the downloaded dataset according to the following directory structure:
├── configs
│ ├── ...
│
├── data
│ ├── nerf_llff_data
│ │ └── fern
│ │ └── flower # downloaded llff dataset
│ │ └── horns # downloaded llff dataset
| | └── ...
| ├── nerf_synthetic
| | └── lego
| | └── ship # downloaded synthetic dataset
| | └── ...
To train a Gaussian activated NeRF without positional encoding on the lego scene:
python run_nerf.py --config configs/lego.txt
After training for 500k iterations you can find the following video at logs/lego_test/lego_test_spiral_500000_rgb.mp4.
To train NeRF on different datasets:
python run_nerf.py --config configs/{DATASET}.txt
replace {DATASET} with trex | horns | flower | fortress | lego | etc.
To test NeRF trained on different datasets:
python run_nerf.py --config configs/{DATASET}.txt --render_only
replace {DATASET} with trex | horns | flower | fortress | lego | etc.
If you find our work useful to your research, please cite
@inproceedings{ramasinghe2022beyond,
title={Beyond periodicity: towards a unifying framework for activations in coordinate-MLPs},
author={Ramasinghe, Sameera and Lucey, Simon},
booktitle={Computer Vision--ECCV 2022: 17th European Conference, Tel Aviv, Israel, October 23--27, 2022, Proceedings, Part XXXIII},
pages={142--158},
year={2022},
organization={Springer}
}
