TensoRF

apchenstuMIT长期未更新

用张量分解来建模和重建辐射场,把 NeRF 的显存占用和训练时间大幅压下来,同时保持渲染质量。

[ECCV 2022] Tensorial Radiance Fields, a novel approach to model and reconstruct radiance fields

暂无版本1,238star156fork同步于 2026-11-07 07:30 UTC

怎么上手

由 README 提炼,执行前请确认
conda create -n TensoRF python=3.8
conda activate TensoRF
pip install torch torchvision
pip install tqdm scikit-image opencv-python configargparse lpips imageio-ffmpeg kornia lpips tensorboard
python train.py --config configs/lego.txt
硬件要求按 README 说明

README 未说明显存要求,仅注明在 Ubuntu 20.04 + PyTorch 1.10.1 上测试过,未提及 GPU 型号

下载:源码 zip·GitHub Releases(安装包)本站不镜像安装包

项目说明

由 README 自动翻译提炼

用张量分解重建辐射场的 NeRF 实现,训练快、显存省、渲染质量高

用张量分解来建模和重建辐射场,把 NeRF 的显存占用和训练时间大幅压下来,同时保持渲染质量。

核心能力

  • 用张量 CP 和 VM 分解建模辐射场
  • 支持 TensorVMSplit 与 TensorCP 两种模型
  • 支持 blender、llff、nsvf、tankstemple 数据集
  • 训练后可渲染测试视图、路径并导出网格
  • 提供 COLMAP 转 NeRF 格式脚本处理自有数据

容易踩的坑

需自行下载 Synthetic-NeRF 等数据集,README 只给链接不含数据;用 TensorCP 模型要手动取消配置文件末尾几行注释;导出网格必须重新训练,官方预训练权重因渲染参数变化不可直接用

内容由模型根据 README 生成,可能不完整或不准确,以官方文档为准。看原文 README

最近发版

0 个版本

暂无 release 数据(可能没有发版,或尚未同步)。

用户点评

登录用户的真实使用记录,可按版本和硬件筛选
共 0 条

    还没有人点评。第一个说出真实体验的人最有价值。

    README 原文

    未翻译

    TensoRF

    Project page | Paper

    This repository contains a pytorch implementation for the paper: TensoRF: Tensorial Radiance Fields. Our work present a novel approach to model and reconstruct radiance fields, which achieves super fast training process, compact memory footprint and state-of-the-art rendering quality.

    https://user-images.githubusercontent.com/16453770/158920837-3fafaa17-6ed9-4414-a0b1-a80dc9e10301.mp4

    Installation

    Tested on Ubuntu 20.04 + Pytorch 1.10.1

    Install environment:

    conda create -n TensoRF python=3.8
    conda activate TensoRF
    pip install torch torchvision
    pip install tqdm scikit-image opencv-python configargparse lpips imageio-ffmpeg kornia lpips tensorboard
    

    Dataset

    Quick Start

    The training script is in train.py, to train a TensoRF:

    python train.py --config configs/lego.txt
    

    we provide a few examples in the configuration folder, please note:

    dataset_name, choices = ['blender', 'llff', 'nsvf', 'tankstemple'];

    shadingMode, choices = ['MLP_Fea', 'SH'];

    model_name, choices = ['TensorVMSplit', 'TensorCP'], corresponding to the VM and CP decomposition. You need to uncomment the last a few rows of the configuration file if you want to training with the TensorCP model;

    n_lamb_sigma and n_lamb_sh are string type refer to the basis number of density and appearance along XYZ dimension;

    N_voxel_init and N_voxel_final control the resolution of matrix and vector;

    N_vis and vis_every control the visualization during training;

    You need to set --render_test 1/--render_path 1 if you want to render testing views or path after training.

    More options refer to the opt.py.

    For pretrained checkpoints and results please see:

    https://1drv.ms/f/c/0c624178fab774b7/Erd0t_p4QWIggAyNAAAAAAABOgUbwHB19U4y6Rwvn_Oc-Q?e=UgiBeT

    Rendering

    python train.py --config configs/lego.txt --ckpt path/to/your/checkpoint --render_only 1 --render_test 1 
    

    You can just simply pass --render_only 1 and --ckpt path/to/your/checkpoint to render images from a pre-trained checkpoint. You may also need to specify what you want to render, like --render_test 1, --render_train 1 or --render_path 1. The rendering results are located in your checkpoint folder.

    Extracting mesh

    You can also export the mesh by passing --export_mesh 1:

    python train.py --config configs/lego.txt --ckpt path/to/your/checkpoint --export_mesh 1
    

    Note: Please re-train the model and don't use the pretrained checkpoints provided by us for mesh extraction, because some render parameters has changed.

    Training with your own data

    We provide two options for training on your own image set:

    1. Following the instructions in the NSVF repo, then set the dataset_name to 'tankstemple'.
    2. Calibrating images with the script from NGP: python dataLoader/colmap2nerf.py --colmap_matcher exhaustive --run_colmap, then adjust the datadir in configs/your_own_data.txt. Please check the scene_bbox and near_far if you get abnormal results.

    Citation

    If you find our code or paper helps, please consider citing:

    @INPROCEEDINGS{Chen2022ECCV,
      author = {Anpei Chen and Zexiang Xu and Andreas Geiger and Jingyi Yu and Hao Su},
      title = {TensoRF: Tensorial Radiance Fields},
      booktitle = {European Conference on Computer Vision (ECCV)},
      year = {2022}
    }