-
Notifications
You must be signed in to change notification settings - Fork 36
Open
Description
Hello,
First of all, thanks for the great work on this project! I'm currently trying to use the triangulation method with the following code:
def recalculate_adjacency(xyz):
if not has_triangulation:
return None, None
device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
xyz_device = xyz.to(device, dtype=torch.float32)
triangulation = Triangulation(xyz_device)
adjacency = triangulation.point_adjacency().cpu().to(torch.long)
offsets = triangulation.point_adjacency_offsets().cpu().to(torch.long)
del triangulation, xyz_device
if device.type == 'cuda':
torch.cuda.empty_cache()
return adjacency, offsets
def main():
model_path = "data/mipnerf360/bonsai/bonsai.pt"
save_path = "data/mipnerf360/bonsai/bonsai_processed2.pt"
os.makedirs(os.path.dirname(save_path), exist_ok=True)
model = load_model(model_path)
xyz = model['xyz']
new_adjacency, new_adjacency_offsets = recalculate_adjacency(xyz)
if new_adjacency is not None:
model['adjacency'] = new_adjacency
model['adjacency_offsets'] = new_adjacency_offsets
torch.save(model, save_path)Everything works fine when I visualize the Bonsai-trained scene, but when I use my recalculated adjacencies, I encounter the following issue:
Additionally, I’m running the training on an RTX 4060 Laptop (8GB VRAM), and for larger scenes (e.g., MipNeRF360 Garden), I get a CUDA OUT OF MEMORY error. From my testing, this seems to be related to the triangulation process itself—when I attempt to triangulate these larger scenes, I run into the same memory issue.
I wanted to ask:
- What algorithm is being used for the Delaunay triangulation?
- Do you think there's a way to reduce memory consumption during triangulation? Would it be possible to perform it in smaller batches and then merge the results? (I’m not very experienced with Voronoi diagrams, so I’m not sure if this approach makes sense.)
Any insights or suggestions would be greatly appreciated! Thanks in advance for your time.
Metadata
Metadata
Assignees
Labels
No labels