Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

The two individuals are separated in the merged 3D model when Multi-Person reconstruction #10

Open
alexwang2013 opened this issue Mar 2, 2024 · 0 comments

Comments

@alexwang2013
Copy link

Hi, Thanks for your great works.

I can reproduce the result by the demo in the repository.

But I found an issue after I merged the two meshes into one mesh.
As the following image shows, two persons are separated.
image

The two individuals in the input image are interacting and connected. However, in the merged 3D model, the two individuals are separated.

I merged the two .obj files which are generated in the demo of this repository with the following code

import torch
import pytorch3d.io as p3dio
from pytorch3d.structures import Meshes

# Load the two .obj files
mesh1_data = p3dio.load_obj("results/dmc_demo/inference_eval_20_0_0.obj")
mesh2_data = p3dio.load_obj("results/dmc_demo/inference_eval_20_1_0.obj")

# Extract vertices and faces from the loaded data
mesh1_verts, mesh1_faces, _ = mesh1_data
mesh2_verts, mesh2_faces, _ = mesh2_data

# Concatenate vertices
merged_verts = torch.cat([mesh1_verts, mesh2_verts], dim=0)

# Concatenate faces
num_verts_mesh1 = len(mesh1_verts)
mesh2_faces_idx = mesh2_faces.verts_idx + num_verts_mesh1
merged_faces = torch.cat([mesh1_faces.verts_idx, mesh2_faces_idx], dim=0)

# Create a new Meshes object with merged vertices and faces
merged_mesh = Meshes(verts=[merged_verts], faces=[merged_faces])

# Save the merged mesh as a new .obj file
p3dio.save_obj("merged_mesh.obj", verts=merged_mesh.verts_list()[0], faces=merged_mesh.faces_list()[0])

Is there some way to improve the result when multi-person are interactive with each other?

Regards and Thanks

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant