Skip to content

N-Raghav/SfM-and-NeRF

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Buildings Built in Minutes: SfM and NeRF for 3D Reconstruction

NeRF Ship Render

Classical Approach

Dependencies

  • OpenCV
  • Numpy
  • Scipy
  • Matplotlib

Quick Start

Run the following command from the root directory of the project:

python Phase1/Wrapper.py

This command executes the entire pipeline, and gives outputs at each stage. The outputs are stored in the P2Data directory.

NeRF Approach

Dependencies

  • PyTorch
  • Tensorboard
  • Numpy
  • imageio

Quick Start

Run the following command from the root directory of the project:

python Phase2/Wrapper.py --data_path <path_to_your_dataset>

Other Arguments:

  • --data_path: Path to the dataset containing images. (default: "./nerf_synthetic/lego/").
  • --mode: Mode of operation, train/test/video (default: train).
  • --no-encoding: Include this flag to disable positional encoding.
  • --lrate: Learning rate for training (default: 5e-4).
  • --n_rays_batch: Number of rays per batch (default: 32324).
  • --n_fine: Number of samples per ray for the fine network (default: 128).
  • --n_coarse: Number of samples per ray for the coarse network (default: 64).
  • --max_iters: Maximum number of iterations for training (default: 200000).
  • --logs_path: Path to store logs (default: "./logs/").
  • --checkpoint_path: Path to store checkpoints (default: "./Phase2/checkpoints/").
  • --run_name: Name of the run to specify in logs and checkpoints folders (default: 'train_run').
  • --load_checkpoint: Whether to load checkpoint or not (default: True).
  • --save_ckpt_iter: Number of iterations to save checkpoint (default: 5000).
  • --images_path: Folder to store rendered images (default: "./image/").
  • --near: Near plane distance (default: 2.0).
  • --far: Far plane distance (default: 6.0).
  • --n_pos_freq: Number of positional encoding frequencies for position (default: 10).
  • --n_dirc_freq: Number of positional encoding frequencies for direction (default: 4).
  • --video_frames: Number of frames to render for video (default: 40).
  • --video_fps: FPS of output video (default: 10).
  • --video_radius: Camera orbit radius (default: 4.0).
  • --video_height: Camera height for orbit (default: 0.0).
  • --render_h: Render height for video (default: 400).
  • --render_w: Render width for video (default: 400).
  • --render_focal: Focal length for video render (default: 555.0).

About

3-D reconstruction using images by implementing Structure from Motion and Neural Radiance Fields

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Python 100.0%