DeepMultiCap icon indicating copy to clipboard operation
DeepMultiCap copied to clipboard

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

Open alexwang2013 opened this issue 1 year ago • 1 comments

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

alexwang2013 avatar Mar 02 '24 13:03 alexwang2013

Hello,

I noticed that the results you reproduced are excellent. In my own attempt, I encountered repeated warnings such as "warning: no normal" and "warning: no depth," which ultimately resulted in subpar outcomes. If it’s not too much trouble, I would greatly appreciate it if you could share the modified code you used. Your guidance would be incredibly helpful for my work.This is my mailbox:[email protected]

Thank you in advance for your time and assistance!

Best regards,

edisonsun284 avatar Feb 28 '25 07:02 edisonsun284