mirror of
https://github.com/nerfstudio-project/nerfstudio.git
synced 2026-11-28 20:10:05 +08:00
Depth supervision for Nerfacto (#1173)
* Implement depth supervision * Fixes * Change normalize dtype * refactor * Change depth weight * Small refactor * Change docstring * Removu unused import * Add assumption to depth comment * Implement URF loss * Remove default depth loss type param * URF fixes * Fix depth loss scale * Visualize gt depths * Fixes & documentation * Documentation and formatting * Fix formatting problems * Fix linter problems * Fix tests * Fix tests
This commit is contained in:
1 parent
fa6f279751
commit
3da877050d
12 files changed
+460
-4
No files matched your search
@@ -281,7 +281,14 @@ def check_generate_rays_shape():
|
||||
def _check_dataclass_allclose(ipt, other):
|
||||
for field in dataclasses.fields(ipt):
|
||||
if getattr(ipt, field.name) is not None:
|
||||
assert torch.allclose(getattr(ipt, field.name), getattr(other, field.name))
|
||||
if isinstance(getattr(ipt, field.name), dict):
|
||||
ipt_dict = getattr(ipt, field.name)
|
||||
other_dict = getattr(other, field.name)
|
||||
for k, v in ipt_dict.items():
|
||||
assert k in other_dict
|
||||
assert torch.allclose(v, other_dict[k])
|
||||
else:
|
||||
assert torch.allclose(getattr(ipt, field.name), getattr(other, field.name))
|
||||
return True
|
||||
|
||||
|
||||
|
||||
+9
-1
@@ -15,7 +15,15 @@ from nerfstudio.data.dataparsers.minimal_dataparser import MinimalDataParserConf
|
||||
from nerfstudio.engine.trainer import TrainerConfig
|
||||
from scripts.train import train_loop
|
||||
|
||||
BLACKLIST = ["base", "semantic-nerfw", "instant-ngp", "instant-ngp-bounded", "nerfacto", "phototourism"]
|
||||
BLACKLIST = [
|
||||
"base",
|
||||
"semantic-nerfw",
|
||||
"instant-ngp",
|
||||
"instant-ngp-bounded",
|
||||
"nerfacto",
|
||||
"phototourism",
|
||||
"depth-nerfacto",
|
||||
]
|
||||
|
||||
|
||||
def set_reduced_config(config: TrainerConfig):
|
||||
|
||||
Reference in new issue
Block a user