Comments (5)
If someone is trying to reproduce the video above, here is my render code.
from matplotlib import pyplot as plt
import cv2
import numpy as np
from tqdm import tqdm
import os
def plot_3d(scatters, frame_id):
fig = plt.figure()
ax = fig.add_subplot(111, projection='3d')
# set the ax border
ax.set_xlim(border[0], border[1])
ax.set_ylim(border[2], border[3])
ax.set_zlim(border[4], border[5])
ax.set_box_aspect([1, 1, 1])
ax.scatter(scatters[0], scatters[1], scatters[2])
# save the plot as image
plt.savefig('./rendered/lips_{:06d}.png'.format(frame_id))
plt.close()
if __name__ == '__main__':
npy_file_name = 'lips_vertice_causal.npy'
save_name = 'lips_causal.avi'
if os.path.exists('./rendered'):
os.system('rm -r ./rendered')
os.makedirs('./rendered')
data = np.load(npy_file_name).reshape(-1, 338, 3)
# print(data.shape)
x, y, z = data[..., 0], data[..., 1], data[..., 2]
# print(x.shape, y.shape, z.shape)
border = [x.min(), x.max(), y.min(), y.max(), z.min(), z.max()]
# print(border)
for idx in tqdm(range(x.shape[0]), desc='plotting'):
plot_3d([x[idx, :], y[idx, :], z[idx, :]], idx)
# save as video
img = cv2.imread('./rendered/lips_000000.png')
h, w, _ = img.shape
fourcc = cv2.VideoWriter_fourcc(*'XVID')
video = cv2.VideoWriter(save_name, fourcc, 30, (w, h))
for i in tqdm(range(x.shape[0]), desc='writing video'):
video.write(cv2.imread('./rendered/lips_{:06d}.png'.format(i)))
video.release()
cv2.destroyAllWindows()
from audio2photoreal.
Hi and thanks for your interest in our work! To your questions:
-
Yeah, it's not really an encoder-decoder structure, it's really just a single straight-through network. As you can see, the transformer decoder does not receive informative input, only zeros:
audio2photoreal/model/diffusion.py
Line 74 in 3a94699
So, in other words, the audio-to-lip module is just a regressor that goes from wav2vec to vertex space with a few transformer-style operations. The architecture looks a bit confusing, which is an artifact of other experiments to make the module not a regressor but an actual diffusion model. You can just ignore this :) -
No attention mask. Correct. Our whole framework is an acausal model, so there is no need to induce causality in the audio encodings or in the lip regressor.
-
Lip vertex visualization. The model doesn't predict the vertices in its original vertex space, but in a z-normalized space (so each vertex has zero mean and unit variance). If you'd want to see the actual lip vertices, you'd have to revert that transformation. Is this something you need? In that case I could see to dig it up for you.
from audio2photoreal.
Thank you so much for replying. I guess transforming to z-normed space will benefit training, is that correct?
If convenient, I would appreciate it if you could show me how to revert to the original vertex space.
Many thanks :)
from audio2photoreal.
Hey! The version of the lip regressor used in here actually uses a more complex decoding from the lip vertex space that you plotted which we unfortunately can't provide publicly since you would be able to render lip-information of participants that are not approved for public release. Sorry :(
from audio2photoreal.
Thanks for replying! Closing the issue as the lips regressor is making a reasonable prediction.
from audio2photoreal.
Related Issues (20)
- How to build a new person? HOT 8
- Novel view HOT 2
- render_defaults_PXB184.pth
- Local url issue HOT 5
- evaluation code HOT 3
- what are 256 facial codes? HOT 1
- tutorial video on how to make the conversational avatar in audio2photoreal. HOT 1
- video instructions. HOT 1
- About classifier-free guidance train policy HOT 3
- How can I manually rotate an avatar's head? HOT 2
- How to pass avatar renderer conditions HOT 1
- How to change the position of camera/model? HOT 1
- Training the model with different data format HOT 1
- Switching from Recording to Uploading Audio in a Demo: Is it Possible? HOT 1
- Why the data is not as in the README ? HOT 2
- Models and pre-requisites models unavailable HOT 3
- Does it support languages other than English? HOT 1
- Models and pre-requisites models unavailable HOT 3
- What model was used to extract the body pose ? HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from audio2photoreal.