Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
stnamjef committed Dec 12, 2023
1 parent a1dd17a commit 08e81c2
Show file tree
Hide file tree
Showing 33 changed files with 3,864 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.DS_Store
10 changes: 10 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
FROM pytorch/pytorch:2.0.0-cuda11.7-cudnn8-devel

COPY ./requirements.txt ./

RUN echo "Installing pip packages..." \
&& python -m pip install -U pip \
&& pip --no-cache-dir install -r requirements.txt \
&& rm ./requirements.txt

WORKDIR /workspace
Binary file added assets/architecture.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
76 changes: 76 additions & 0 deletions mipTensoRF/configs/blender/mip_tensor_vm.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
model:
name: "MipTensorVM"
# kernel
n_kernels: 4
kernel_size: 3
kernel_init: "gaussian"
learnable_kernel: false
scale_types: null # must override
# grid
den_channels: [16, 16, 16]
app_channels: [48, 48, 48]
# density
density_shift: -10
density_activation: "softplus"
# to_rgb module
feat_n_freqs: 2
view_n_freqs: 2
to_rgb_in_features: 27
to_rgb_hidden_features: 128
# misc
distance_scale: 25
alpha_mask_threshold: 0.0001
raymarch_weight_threshold: 0.0004

loss:
# regularization
l1_weight_init: 0.00008
l1_weight_rest: 0.00004
ortho_weight: 0.0
tv_weight_den: 0.0
tv_weight_app: 0.0
end_lossmult: 1000000000 # 1e9

dataset:
name: "multiscale_blender"
data_dir: "/workspace/dataset/nerf_synthetic/lego"
n_downsamples: 4
downsample: 1.0
return_radii: true
patch_size: 1

training:
# kernel
begin_kernel: 7000
# rendering
n_samples: 1000000
step_ratio: 0.5
ndc_ray: false
# learning rate
lr_grid: 0.02
lr_network: 0.001
lr_decay_iters: -1
lr_decay_target_ratio: 0.1
lr_upsample_reset: true
# loader
batch_size: 4096
n_iters: 40000
# grid size
n_voxel_init: 2097156 # 128**3
n_voxel_final: 27000000 # 300**3
upsample_list: [2000, 3000, 4000, 5500, 7000]
update_alpha_mask_list: [2000, 4000]
# misc
vis_every: 10000
progress_refresh_rate: 10
render_train: false
render_test: true
render_path: false
ckpt: null

testing:
ndc_ray: false
render_train: false
render_test: true
render_path: false
ckpt: null
67 changes: 67 additions & 0 deletions mipTensoRF/configs/blender/tensor_vm.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
model:
name: "TensorVM"
# grid
den_channels: [16, 16, 16]
app_channels: [48, 48, 48]
# density
density_shift: -10
density_activation: "softplus"
# to_rgb module
feat_n_freqs: 2
view_n_freqs: 2
to_rgb_in_features: 27
to_rgb_hidden_features: 128
# misc
distance_scale: 25
alpha_mask_threshold: 0.0001
raymarch_weight_threshold: 0.0004

loss:
# regularization
l1_weight_init: 0.00008
l1_weight_rest: 0.00004
ortho_weight: 0.0
tv_weight_den: 0.0
tv_weight_app: 0.0

dataset:
name: "blender"
data_dir: "/workspace/dataset/nerf_synthetic/lego"
n_downsamples: 1
downsample: 1.0
return_radii: false
patch_size: 1

training:
# rendering
n_samples: 1000000
step_ratio: 0.5
ndc_ray: false
# learning rate
lr_grid: 0.02
lr_network: 0.001
lr_decay_iters: -1
lr_decay_target_ratio: 0.1
lr_upsample_reset: true
# loader
batch_size: 4096
n_iters: 40000
# grid size
n_voxel_init: 2097156 # 128**3
n_voxel_final: 27000000 # 300**3
upsample_list: [2000, 3000, 4000, 5500, 7000]
update_alpha_mask_list: [2000, 4000]
# misc
vis_every: 10000
progress_refresh_rate: 10
render_train: false
render_test: true
render_path: false
ckpt: null

testing:
ndc_ray: false
render_train: false
render_test: true
render_path: false
ckpt: null
76 changes: 76 additions & 0 deletions mipTensoRF/configs/llff/mip_tensor_vm.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
model:
name: "MipTensorVM"
# kernel
n_kernels: 4
kernel_size: 3
kernel_init: "gaussian"
learnable_kernel: false
scale_types: null # must override
# grid
den_channels: [16, 4, 4]
app_channels: [48, 12, 12]
# density
density_shift: -10
density_activation: "relu"
# to_rgb module
feat_n_freqs: 0
view_n_freqs: 0
to_rgb_in_features: 27
to_rgb_hidden_features: 128
# misc
distance_scale: 25
alpha_mask_threshold: 0.0001
raymarch_weight_threshold: 0.0001

loss:
# regularization
l1_weight_init: 0.0
l1_weight_rest: 0.0
ortho_weight: 0.0
tv_weight_den: 1.0
tv_weight_app: 1.0
end_lossmult: 1000000000 # 1e9

dataset:
name: "multiscale_llff"
data_dir: "/workspace/dataset/nerf_llff_data/fern"
n_downsamples: 4
downsample: 1.0 # equivalent to images_4
return_radii: true
patch_size: 1

training:
# kernel
begin_kernel: 5500
# rendering
n_samples: 1000000
step_ratio: 0.5
ndc_ray: true
# learning rate
lr_grid: 0.02
lr_network: 0.001
lr_decay_iters: -1
lr_decay_target_ratio: 0.1
lr_upsample_reset: true
# loader
batch_size: 4096
n_iters: 25000
# grid size
n_voxel_init: 2097156 # 128**3
n_voxel_final: 262144000 # 640**3
upsample_list: [2000, 3000, 4000, 5500]
update_alpha_mask_list: [2500,]
# misc
vis_every: 10000
progress_refresh_rate: 10
render_train: false
render_test: true
render_path: false
ckpt: null

testing:
ndc_ray: true
render_train: false
render_test: true
render_path: false
ckpt: null
67 changes: 67 additions & 0 deletions mipTensoRF/configs/llff/tensor_vm.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
model:
name: "TensorVM"
# grid
den_channels: [16, 4, 4]
app_channels: [48, 12, 12]
# density
density_shift: -10
density_activation: "relu"
# to_rgb module
feat_n_freqs: 0
view_n_freqs: 0
to_rgb_in_features: 27
to_rgb_hidden_features: 128
# misc
distance_scale: 25
alpha_mask_threshold: 0.0001
raymarch_weight_threshold: 0.0001

loss:
# regularization
l1_weight_init: 0.0
l1_weight_rest: 0.0
ortho_weight: 0.0
tv_weight_den: 1.0
tv_weight_app: 1.0

dataset:
name: "llff"
data_dir: "/workspace/dataset/nerf_llff_data/fern"
n_downsamples: 1
downsample: 1.0 # equivalent to images_4
return_radii: false
patch_size: 1

training:
# rendering
n_samples: 1000000
step_ratio: 0.5
ndc_ray: true
# learning rate
lr_grid: 0.02
lr_network: 0.001
lr_decay_iters: -1
lr_decay_target_ratio: 0.1
lr_upsample_reset: true
# loader
batch_size: 4096
n_iters: 25000
# grid size
n_voxel_init: 2097156 # 128**3
n_voxel_final: 262144000 # 640**3
upsample_list: [2000, 3000, 4000, 5500]
update_alpha_mask_list: [2500,]
# misc
vis_every: 10000
progress_refresh_rate: 10
render_train: false
render_test: true
render_path: false
ckpt: null

testing:
ndc_ray: true
render_train: false
render_test: true
render_path: false
ckpt: null
11 changes: 11 additions & 0 deletions mipTensoRF/data_loader/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
from .blender import *
from .llff import *


dataset_dict = {
"blender": SinglescaleBlenderDataset,
"multiscale_blender": MultiscaleBlenderDataset,
"video_blender": VideoBlenderDataset,
"llff": SinglescaleLLFFDataset,
"multiscale_llff": MultiscaleLLFFDataset
}
Loading

0 comments on commit 08e81c2

Please sign in to comment.