-
Notifications
You must be signed in to change notification settings - Fork 100
/
arguments.py
51 lines (45 loc) · 1.65 KB
/
arguments.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
###
# Copyright (C) 2023, Computer Vision Lab, Seoul National University, https://cv.snu.ac.kr
# For permission requests, please contact robot0321@snu.ac.kr, esw0116@snu.ac.kr, namhj28@gmail.com, jarin.lee@gmail.com.
# All rights reserved.
###
import numpy as np
class GSParams:
def __init__(self):
self.sh_degree = 3
self.images = "images"
self.resolution = -1
self.white_background = False
self.data_device = "cuda"
self.eval = False
self.use_depth = False
self.iterations = 2990#3_000
self.position_lr_init = 0.00016
self.position_lr_final = 0.0000016
self.position_lr_delay_mult = 0.01
self.position_lr_max_steps = 2990#3_000
self.feature_lr = 0.0025
self.opacity_lr = 0.05
self.scaling_lr = 0.005
self.rotation_lr = 0.001
self.percent_dense = 0.01
self.lambda_dssim = 0.2
self.densification_interval = 100
self.opacity_reset_interval = 3000
self.densify_from_iter = 500
self.densify_until_iter = 15_000
self.densify_grad_threshold = 0.0002
self.convert_SHs_python = False
self.compute_cov3D_python = False
self.debug = False
class CameraParams:
def __init__(self, H: int = 512, W: int = 512):
self.H = H
self.W = W
self.focal = (5.8269e+02, 5.8269e+02)
self.fov = (2*np.arctan(self.W / (2*self.focal[0])), 2*np.arctan(self.H / (2*self.focal[1])))
self.K = np.array([
[self.focal[0], 0., self.W/2],
[0., self.focal[1], self.H/2],
[0., 0., 1.],
]).astype(np.float32)