Advertisement
Guest User

Untitled

a guest
Aug 5th, 2020
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. from demo import make_animation
  2. from skimage import img_as_ubyte
  3.  
  4. predictions = make_animation(source_image, driving_video, generator, kp_detector, relative=True)
  5.  
  6. #save resulting video
  7. imageio.mimsave('../generated.mp4', [img_as_ubyte(frame) for frame in predictions], fps=30)
  8. !ffmpeg -y -i /content/gdrive/My\ Drive/first-order-motion-model/a_zrobione.mp4 -q:a 0 -map a ../sample.mp3
  9. !ffmpeg -y -i ../generated.mp4 -i ../sample.mp3 -map 0 -map 1 -codec copy ../final.mp4
  10. #video can be downloaded from /content folder
  11.  
  12. HTML(display(source_image, driving_video, predictions).to_html5_video())
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement