Code Monkey home page Code Monkey logo

finn's Introduction

A Simple And Effective Filtering Scheme For Improving Neural Fields

This repository contains the code for the paper "A Simple And Effective Filtering Scheme For Improving Neural Fields".

Install

The code has been tested on Ubuntu 18.04, please follow the following instructions to install the requirements.

  conda create --name finn python=3.7
  conda activate finn
  conda install  pytorch==1.4.0 cudatoolkit=10.2 torchvision -c pytorch
  pip install -r requirements.txt

Regress images

  • Run the following command: python image_regress.py -g 0 --data './data' --model FINN to regress all images located at folder data using the network FINN on gpu 0.
  • To fit a single image, use the following command: python image_regress.py -g 0 --data './data/reference_1.png' --model FINN instead.
  • For an alternative network, e.g., FFN, use the command: python image_regress.py -g 0 --data './data/reference_1.png' --model FFN.
  • Generate an image with arbitary resolution, e.g., 1000, run python image_regress.py --ckpt pretrained_checkpoint_path --test_file save_to_file --model FINN -g 3 --res 1000.

Statistics for images

  • Run the following command: python statistics_images.py for PSNR statistics.
  • For the ꟻLIP metric, please use the code from NVIDIA

Reconstruct 3D Surface from point cloud

  • Run the following command: python surface_reconstruct.py --data './test.xyz' --pc_num 100000 --model FINN -g 0 to train the point cloud using the network FINN. At each iteration, 100000 points are randomly sampled.

  • Generate a mesh from the signed distance field with an arbitrary resolution, e.g., 1600, run python surface_reconstruct.py --ckpt pretrained_checkpoint_path --test_file save_to_file --model FINN -g 3 --res 1600.

  • Run the following command: python calc_error_abc.py --gt './shapename.obj' --pred './logs/shapename_FINN/mesh/10000.ply' to compute reconstruction error indicated by the chamfer distance.

Novel view synthesis

  • We use a simplified version of NeRF for demonstration. We replace the 'Positional Encodering' with 'Gaussian Random Fourier Feature Mapping' and apply 'Filtering' to MLPs. The source code is at file folder ./tiny-nerf.
  • Run the following command: python run_nerf.py --config ./configs/fern.txt -g 0 to train on 'Fern' dataset. The testing PSNR will be saved.

Datasets

  • Download the datasets for image regression and 3D reconstruction from google drive.
  • Download the datasets, following the instruction of nerf-pytorch.

Cite

Please cite our work if you find it useful:

@article{zhuang2023finn,
  title={A Simple And Effective Filtering Scheme For Improving Neural Fields},
  author={Zhuang, Yixin},
  journal={Computational Visual Media},
  year={2024}
}

finn's People

Contributors

yixin26 avatar

Stargazers

Xihaier avatar Jinbao Wei avatar ChenYu avatar hyeonjang avatar Slava Elizarov avatar Shuo Chen avatar Null avatar  avatar llcc avatar Anuvesh Kumar avatar zhanghe avatar Mao Qingyu avatar  avatar  avatar 爱可可-爱生活 avatar Siyan Dong avatar Luming Tang avatar Zhijie Wu avatar yuzy avatar yu_bao avatar Snow avatar  avatar  avatar Qing Wu avatar Xiaohua Peng avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.