facebookresearch / pytorch3d

PyTorch3D is FAIR's library of reusable components for deep learning with 3D data
https://pytorch3d.org/
Other
8.81k stars 1.32k forks source link

Joining a Batch of Scenes #1757

Open fishbotics opened 8 months ago

fishbotics commented 8 months ago

❓ Questions on how to use PyTorch3D

I'm trying to render a batch of images where each image is a scene. I have two meshes objects that I'd like to place in the same scene, but each object has a batch dimension. What's the best way to merge these?

In other words, I have two batches mesh objects and I'd like to merge them into a new batched mesh object with the same batch size.

join_meshes_as_scene seems to put everything into a single scene, which is not what I want

Thanks!

bottler commented 8 months ago

Can you do something like

m = []
for i in range(len(meshes1)):
    m.append(join_meshes_as_scene([meshes1[i], meshes2[i]))
meshes = join_meshes_as_batch(m)