fix-grid-lr-bug
This commit is contained in:
parent
d3fdb452e1
commit
4b181e2b34
4
.gitignore
vendored
4
.gitignore
vendored
@ -7,4 +7,6 @@ diff_rasterization/dist
|
||||
tensorboard_3d
|
||||
screenshots
|
||||
data/
|
||||
data
|
||||
data
|
||||
argument/
|
||||
scripts/
|
||||
|
||||
@ -4,9 +4,7 @@
|
||||
|
||||
### [Project Page](https://guanjunwu.github.io/4dgs/index.html)| [Arxiv Paper](https://arxiv.org/abs/2310.08528)
|
||||
|
||||
<!-- | [Video](https://youtu.be/sROLfK_VkCk) -->
|
||||
|
||||
<!-- [Fast Dynamic Radiance Fields with Time-Aware Neural Voxels](https://jaminfong.cn/tineuvox) -->
|
||||
[Guanjun Wu](https://guanjunwu.github.io/)<sup>1*</sup>, [Taoran Yi](https://github.com/taoranyi)<sup>2*</sup>,
|
||||
[Jiemin Fang](https://jaminfong.cn/)<sup>3</sup>, [Lingxi Xie](http://lingxixie.com/)<sup>3</sup>, </br>[Xiaopeng Zhang](https://sites.google.com/site/zxphistory/)<sup>3</sup>, [Wei Wei](https://www.eric-weiwei.com/)<sup>1</sup>,[Wenyu Liu](http://eic.hust.edu.cn/professor/liuwenyu/)<sup>2</sup>, [Qi Tian](https://scholar.google.com/citations?hl=en&user=61b6eYkAAAAJ)<sup>3</sup> , [Xinggang Wang](https://xinggangw.info/)<sup>2✉</sup>
|
||||
|
||||
|
||||
@ -20,9 +20,9 @@ ModelHiddenParams = dict(
|
||||
multires = [1, 2, 4, 8 ],
|
||||
defor_depth = 0,
|
||||
net_width = 64,
|
||||
# plane_tv_weight = 0,
|
||||
# time_smoothness_weight = 0,
|
||||
# l1_time_planes = 0,
|
||||
plane_tv_weight = 0.0002,
|
||||
time_smoothness_weight = 0.001,
|
||||
l1_time_planes = 0.001,
|
||||
weight_decay_iteration=0,
|
||||
bounds=1.6
|
||||
)
|
||||
|
||||
@ -40,7 +40,7 @@ def render_set(model_path, name, iteration, views, gaussians, pipeline, backgrou
|
||||
# torchvision.utils.save_image(rendering, os.path.join(render_path, '{0:05d}'.format(idx) + ".png"))
|
||||
render_images.append(to8b(rendering).transpose(1,2,0))
|
||||
# print(to8b(rendering).shape)
|
||||
# render_list.append(rendering)
|
||||
render_list.append(rendering)
|
||||
if name in ["train", "test"]:
|
||||
gt = view.original_image[0:3, :, :]
|
||||
# torchvision.utils.save_image(gt, os.path.join(gts_path, '{0:05d}'.format(idx) + ".png"))
|
||||
|
||||
@ -18,7 +18,7 @@ from utils.system_utils import mkdir_p
|
||||
from plyfile import PlyData, PlyElement
|
||||
from random import randint
|
||||
from utils.sh_utils import RGB2SH
|
||||
# from simple_knn._C import distCUDA2
|
||||
from simple_knn._C import distCUDA2
|
||||
from utils.graphics_utils import BasicPointCloud
|
||||
from utils.general_utils import strip_symmetric, build_scaling_rotation
|
||||
from scene.deformation import deform_network
|
||||
@ -143,7 +143,7 @@ class GaussianModel:
|
||||
|
||||
print("Number of points at initialisation : ", fused_point_cloud.shape[0])
|
||||
|
||||
dist2 = torch.clamp_min(torch.from_numpy(np.asarray(pcd.points)).float().cuda())
|
||||
dist2 = torch.clamp_min(distCUDA2(torch.from_numpy(np.asarray(pcd.points)).float().cuda()), 0.0000001)
|
||||
scales = torch.log(torch.sqrt(dist2))[...,None].repeat(1, 3)
|
||||
rots = torch.zeros((fused_point_cloud.shape[0], 4), device="cuda")
|
||||
rots[:, 0] = 1
|
||||
@ -188,6 +188,10 @@ class GaussianModel:
|
||||
lr_final=training_args.deformation_lr_final*self.spatial_lr_scale,
|
||||
lr_delay_mult=training_args.deformation_lr_delay_mult,
|
||||
max_steps=training_args.position_lr_max_steps)
|
||||
self.grid_scheduler_args = get_expon_lr_func(lr_init=training_args.grid_lr_init*self.spatial_lr_scale,
|
||||
lr_final=training_args.grid_lr_final*self.spatial_lr_scale,
|
||||
lr_delay_mult=training_args.deformation_lr_delay_mult,
|
||||
max_steps=training_args.position_lr_max_steps)
|
||||
|
||||
def update_learning_rate(self, iteration):
|
||||
''' Learning rate scheduling per step '''
|
||||
@ -196,7 +200,10 @@ class GaussianModel:
|
||||
lr = self.xyz_scheduler_args(iteration)
|
||||
param_group['lr'] = lr
|
||||
# return lr
|
||||
|
||||
if "grid" in param_group["name"]:
|
||||
lr = self.grid_scheduler_args(iteration)
|
||||
param_group['lr'] = lr
|
||||
# return lr
|
||||
elif param_group["name"] == "deformation":
|
||||
lr = self.deformation_scheduler_args(iteration)
|
||||
param_group['lr'] = lr
|
||||
|
||||
@ -17,26 +17,26 @@ echo "Done"
|
||||
|
||||
exp_name1=$1
|
||||
|
||||
export CUDA_VISIBLE_DEVICES=2&&python render.py --model_path "output/$exp_name1/standup/" --skip_train --configs arguments/$exp_name1/standup.py &
|
||||
export CUDA_VISIBLE_DEVICES=3&&python render.py --model_path "output/$exp_name1/jumpingjacks/" --skip_train --configs arguments/$exp_name1/jumpingjacks.py &
|
||||
export CUDA_VISIBLE_DEVICES=0&&python render.py --model_path "output/$exp_name1/standup/" --skip_train --configs arguments/$exp_name1/standup.py &
|
||||
export CUDA_VISIBLE_DEVICES=1&&python render.py --model_path "output/$exp_name1/jumpingjacks/" --skip_train --configs arguments/$exp_name1/jumpingjacks.py &
|
||||
export CUDA_VISIBLE_DEVICES=2&&python render.py --model_path "output/$exp_name1/bouncingballs/" --skip_train --configs arguments/$exp_name1/bouncingballs.py &
|
||||
export CUDA_VISIBLE_DEVICES=3&&python render.py --model_path "output/$exp_name1/lego/" --skip_train --configs arguments/$exp_name1/lego.py &
|
||||
wait
|
||||
export CUDA_VISIBLE_DEVICES=2&&python render.py --model_path "output/$exp_name1/hellwarrior/" --skip_train --configs arguments/$exp_name1/hellwarrior.py &
|
||||
export CUDA_VISIBLE_DEVICES=3&&python render.py --model_path "output/$exp_name1/hook/" --skip_train --configs arguments/$exp_name1/hook.py &
|
||||
export CUDA_VISIBLE_DEVICES=0&&python render.py --model_path "output/$exp_name1/hellwarrior/" --skip_train --configs arguments/$exp_name1/hellwarrior.py &
|
||||
export CUDA_VISIBLE_DEVICES=1&&python render.py --model_path "output/$exp_name1/hook/" --skip_train --configs arguments/$exp_name1/hook.py &
|
||||
export CUDA_VISIBLE_DEVICES=2&&python render.py --model_path "output/$exp_name1/trex/" --skip_train --configs arguments/$exp_name1/trex.py &
|
||||
export CUDA_VISIBLE_DEVICES=3&&python render.py --model_path "output/$exp_name1/mutant/" --skip_train --configs arguments/$exp_name1/mutant.py &
|
||||
# wait
|
||||
echo "Done"
|
||||
exp_name1=$1
|
||||
|
||||
export CUDA_VISIBLE_DEVICES=2&&python metrics.py --model_path "output/$exp_name1/standup/" &
|
||||
export CUDA_VISIBLE_DEVICES=3&&python metrics.py --model_path "output/$exp_name1/jumpingjacks/" &
|
||||
export CUDA_VISIBLE_DEVICES=0&&python metrics.py --model_path "output/$exp_name1/standup/" &
|
||||
export CUDA_VISIBLE_DEVICES=1&&python metrics.py --model_path "output/$exp_name1/jumpingjacks/" &
|
||||
export CUDA_VISIBLE_DEVICES=2&&python metrics.py --model_path "output/$exp_name1/bouncingballs/" &
|
||||
export CUDA_VISIBLE_DEVICES=3&&python metrics.py --model_path "output/$exp_name1/lego/"
|
||||
|
||||
export CUDA_VISIBLE_DEVICES=2&&python metrics.py --model_path "output/$exp_name1/hellwarrior/" &
|
||||
export CUDA_VISIBLE_DEVICES=3&&python metrics.py --model_path "output/$exp_name1/hook/" &
|
||||
export CUDA_VISIBLE_DEVICES=0&&python metrics.py --model_path "output/$exp_name1/hellwarrior/" &
|
||||
export CUDA_VISIBLE_DEVICES=1&&python metrics.py --model_path "output/$exp_name1/hook/" &
|
||||
export CUDA_VISIBLE_DEVICES=2&&python metrics.py --model_path "output/$exp_name1/trex/" &
|
||||
export CUDA_VISIBLE_DEVICES=3&&python metrics.py --model_path "output/$exp_name1/mutant/" &
|
||||
wait
|
||||
|
||||
@ -1,8 +1,7 @@
|
||||
import json
|
||||
import os
|
||||
exp_name = ["dnerf_gridlarge","dnerf_gridsmall","dnerf_gridsmaller","dnerf_mlplarge","dnerf_mlplarger","dnerf_nocoarse","dnerf_silm","dnerf_imageloss",
|
||||
"dnerf_3dgs","dnerf_tv","dnerf_noboth","dnerf_nogrid"]
|
||||
scene_name = ["bouncingball","jumpingjack","lego","standup","hook","mutant","hellwarrior","trex"]
|
||||
exp_name = ["dnerf_tv_test"]
|
||||
scene_name = ["bouncingballs","jumpingjacks","lego","standup","hook","mutant","hellwarrior","trex"]
|
||||
json_name = "results.json"
|
||||
result_json = {"SSIM":0,"PSNR":0,"LPIPS":0}
|
||||
exp_json = {}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user