4
0
mirror of https://github.com/nerfstudio-project/nerfstudio.git synced 2026-11-11 18:44:21 +08:00

Tune density grid parameters (#548)

This commit is contained in:
Matthew Tancik 2022-09-26 14:35:42 -07:00 committed by GitHub
parent 800be33cf3
commit 2116ffeb5c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -54,10 +54,11 @@ class DensityField(Field):
self.aabb = Parameter(aabb, requires_grad=False)
self.spatial_distortion = spatial_distortion
num_levels = 16
# max_res = 2048
max_res = 4096
num_levels = 8
max_res = 1024
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))
self.direction_encoding = tcnn.Encoding(
@ -74,8 +75,8 @@ class DensityField(Field):
encoding_config={
"otype": "HashGrid",
"n_levels": num_levels,
"n_features_per_level": 2,
"log2_hashmap_size": 19,
"n_features_per_level": features_per_level,
"log2_hashmap_size": log2_hashmap_size,
"base_resolution": base_res,
"per_level_scale": growth_factor,
},