Home

Awesome

Project Name

Released code for ECCV 2024 paper: Attention Beats Linear for Fast Implicit Neural Representation Generation. Arxiv paper link: https://arxiv.org/abs/2407.15355

Table of Contents

Installation

Prerequisites

Steps

  1. Clone or download the project to your local machine.
  2. Navigate to the project directory:
cd path/to/your/project
  1. Install the dependencies:
pip install -r requirements.txt
  1. download datasets

Download any image dataset or nerf dataset you want, for example:

If you want to use nerf dataset, we expect the folder structure is like:

|--dataset_root
|  |--subset_1.json
|  |--subset_1
|  |  |--id_of_item1
|  |  |  |--transforms.json
|  |  |  |--r_0.png
|  |  |  |--r_1.png
|  |  |  |--   ...
|  |  |  |--r_n1.png
|  |  |--id_of_item2
|  |     |--transforms.json
|  |     |--r_0.png
|  |     |--r_1.png
|  |     |--   ...
|  |     |--r_n2.png
|  |--subset_2.json
|  |--subset_2
|     |--id_of_item1
|     |  |--transforms.json
|     |  |--r_0.png
|     |  |--   ...
|     |  |--r_m1.png
|     |--id_of_item2
|     ...
|

Usage

Configuration Parameters

We give the example configs in ./configs, and here's some important parameters:

Example Run

  1. make sure that your installation is correct

  2. modify the configuration file

You can choose those in ./configs/test to test whether your setup is correct.

  1. run script

The scripts for training/testing/evaling an model are present in ./script. If you want to train a model, just modify the first few rows in the main function to choose the correspoding config file.

for example:

if __name__ == "__main__":
    global config_file
    config_file = "./configs/Celeba128_anr_d5.yaml"

and then, run the following command in terminal:

python ./script/train_inr.py 

License

@article{zhang2024attention,
  title={Attention Beats Linear for Fast Implicit Neural Representation Generation},
  author={Zhang, Shuyi and Liu, Ke and Gu, Jingjun and Cai, Xiaoxu and Wang, Zhihua and Bu, Jiajun and Wang, Haishuai},
  journal={arXiv preprint arXiv:2407.15355},
  year={2024}
}

Contact

If you have any questions, you can reach me via the following:

Email: keliu99@zju.edu.cn