mirror of
https://github.com/nerfstudio-project/nerfstudio.git
synced 2026-12-03 14:28:41 +08:00
Tune density grid parameters (#548)
This commit is contained in:
1 parent
800be33cf3
commit
2116ffeb5c
1 file changed
+6
-5
@@ -54,10 +54,11 @@ class DensityField(Field):
|
|||||||
self.aabb = Parameter(aabb, requires_grad=False)
|
self.aabb = Parameter(aabb, requires_grad=False)
|
||||||
self.spatial_distortion = spatial_distortion
|
self.spatial_distortion = spatial_distortion
|
||||||
|
|
||||||
num_levels = 16
|
num_levels = 8
|
||||||
# max_res = 2048
|
max_res = 1024
|
||||||
max_res = 4096
|
|
||||||
base_res = 16
|
base_res = 16
|
||||||
|
log2_hashmap_size = 18
|
||||||
|
features_per_level = 2
|
||||||
growth_factor = np.exp((np.log(max_res) - np.log(base_res)) / (num_levels - 1))
|
growth_factor = np.exp((np.log(max_res) - np.log(base_res)) / (num_levels - 1))
|
||||||
|
|
||||||
self.direction_encoding = tcnn.Encoding(
|
self.direction_encoding = tcnn.Encoding(
|
||||||
@@ -74,8 +75,8 @@ class DensityField(Field):
|
|||||||
encoding_config={
|
encoding_config={
|
||||||
"otype": "HashGrid",
|
"otype": "HashGrid",
|
||||||
"n_levels": num_levels,
|
"n_levels": num_levels,
|
||||||
"n_features_per_level": 2,
|
"n_features_per_level": features_per_level,
|
||||||
"log2_hashmap_size": 19,
|
"log2_hashmap_size": log2_hashmap_size,
|
||||||
"base_resolution": base_res,
|
"base_resolution": base_res,
|
||||||
"per_level_scale": growth_factor,
|
"per_level_scale": growth_factor,
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in new issue
Block a user