facebookresearch / audio2photoreal

Code and dataset for photorealistic Codec Avatars driven from audio
Other
2.66k stars 250 forks source link

Visualize 2 avatars in the same scene, just like the introduction page #63

Open 9jtiger opened 5 months ago

9jtiger commented 5 months ago

Thank you, for your awesome work!! It's really cool.

Implementing your awesome project, I have few questions....

I want to visualize 2 different avatars in the same scene, just like the introduction page. However, when I ran the code by following README, only 1 avatar was displayed, in 2 different angles.

Can you give me the code which enables visualizing 2 different avatars in the same scene?

I want to display just like the first photo, but I cannot figure out how to.

스크린샷 2024-04-07 220023 스크린샷 2024-04-07 220051

evonneng commented 4 months ago

Hi! Sorry for the delay in response. I don't have plans yet to release the script that allows you to render both at the same time since it's a bit messy, but I can describe the process in detail.

  1. You will need to render both people/2 avatars and change the render script to reflect this here, where you are getting the render parameters of a person: https://github.com/facebookresearch/audio2photoreal/blob/fee7d1273607298964d85920ff1969b6cac22ace/sample/generate.py#L202-L206
  2. In this function, you will then need to get the correct geometry of both ppl with respect to one another. So you might have to alter the geometry so that they are in the same space. https://github.com/facebookresearch/audio2photoreal/blob/fee7d1273607298964d85920ff1969b6cac22ace/visualize/render_codes.py#L109
  3. You will then need to modify this class to update the parameters of rendering, that is including the number of vertices in the mesh, texture, etc. This is a bit tricky, so I can provide a release with the updated code for this part sometime. I will ping when released. https://github.com/facebookresearch/audio2photoreal/blob/fee7d1273607298964d85920ff1969b6cac22ace/visualize/ca_body/models/mesh_vae_drivable.py#L72

Hope this helps to unblock for now!