Reducing flicker artifacts for nerfacto method (#750)

* pose opt default nerfacto.

* added SO3 cam pose optimization which is slightly faster (~2.2m/iter) than BARF

* added occupancy grid with placeholder until nerfacc is updated to query density from it

* added occupancy grid sampling as the level 0 in proposal hierarchy, relies on nerfacc 0.1.7 (on pypi)

* merge main

* merge main

* minor changes to sampling

* adjusted sample number

* refactor occ grid stuff, settle on decent params

* nograd proposal sampling

* param tweaks

* varying resolution proposal networks

* params

* merged main

* optimizer update

* remove occ grid

* remove double nerfacto samples

* set single jitter to true

* remove pdb

* more changes

* fix method defaults

* fix pylint

* remove occupancy fn

Co-authored-by: akristoffersen <akristoffersen@berkeley.edu>
Co-authored-by: Justin Kerr <justin.g.kerr@gmail.com>
This commit is contained in:
authored and GitHub committed 2022-10-11 14:21:00 -07:00
1 parent 23828b7ad8
commit 2150bad0e4
8 files changed
+40 -37

No files matched your search

+1 -3
View File
@@ -315,7 +315,6 @@ class PDFSampler(Sampler):
# Stratified samples between 0 and 1
u = torch.linspace(0.0, 1.0 - (1.0 / num_bins), steps=num_bins, device=cdf.device)
u = u.expand(size=(*cdf.shape[:-1], num_bins))
# u = u + torch.rand(size=(*cdf.shape[:-1], num_bins), device=cdf.device) / num_bins
if self.single_jitter:
rand = torch.rand((*cdf.shape[:-1], 1), device=cdf.device) / num_bins
else:
@@ -469,7 +468,6 @@ class VolumetricSampler(Sampler):
cone_angle=cone_angle,
alpha_thre=1e-2,
)
num_samples = starts.shape[0]
if num_samples == 0:
# create a single fake sample and update packed_info accordingly
@@ -506,7 +504,7 @@ class ProposalNetworkSampler(Sampler):
num_proposal_samples_per_ray: Tuple[int] = (64,),
num_nerf_samples_per_ray: int = 32,
num_proposal_network_iterations: int = 2,
single_jitter: bool = True,
single_jitter: bool = False,
) -> None:
super().__init__()
self.num_proposal_samples_per_ray = num_proposal_samples_per_ray