mirror of
https://github.com/nerfstudio-project/nerfstudio.git
synced 2026-12-03 14:28:41 +08:00
Setting near and far with scene bounds collider. Also LR schedules. (#74)
* some initial cuda code as I learn. using git to save progress. * first cuda kernel for ray sampling that mostly works * cleaning up code. working on lr. structs for scene bounds aabb * added scene bounds collider code * updated setup * setup * setup * black * including some files * exporting env variable * new file * git workflows * github actions * github actions * github actions * removing env var
This commit is contained in:
1 parent
752df417ce
commit
676beebb14
45 files changed
+803
-8354
No files matched your search
@@ -37,3 +37,17 @@ def get_dict_to_cpu(stuff):
|
||||
if isinstance(stuff, torch.Tensor):
|
||||
return stuff.detach().cpu()
|
||||
return stuff
|
||||
|
||||
|
||||
def is_not_none(var):
|
||||
"""Return True if the variable var is None."""
|
||||
return not isinstance(var, type(None))
|
||||
|
||||
|
||||
def get_masked_dict(d, mask):
|
||||
"""Return a masked dictionary.
|
||||
TODO(ethan): add more asserts/checks so this doesn't have unpredictable behavior."""
|
||||
masked_dict = {}
|
||||
for key, value in d.items():
|
||||
masked_dict[key] = value[mask]
|
||||
return masked_dict
|
||||
Reference in new issue
Block a user