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