├── README.md └── havatar_colab.ipynb /README.md: -------------------------------------------------------------------------------- 1 | 🐣 Please follow me for new updates https://twitter.com/camenduru
2 | 🔥 Please join our discord server https://discord.gg/k5BwmmvJJU
3 | 🥳 Please join my patreon community https://patreon.com/camenduru
4 | 5 | ### 🦒 Colab 6 | 7 | | Colab | Info 8 | | --- | --- | 9 | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/camenduru/havatar-colab/blob/main/havatar_colab.ipynb) | havatar_colab 10 | 11 | ### 🧬 Code 12 | https://github.com/XChenZ/havatar 13 | 14 | ### 📄 Paper 15 | https://arxiv.org/abs/2309.17128 16 | 17 | ### 🌐 Page 18 | https://www.liuyebin.com/havatar/ 19 | 20 | ### 🖼 Output 21 | 22 | https://github.com/camenduru/havatar-colab/assets/54370274/425202a2-a08c-412a-b088-c908c447ad0f 23 | 24 | ### 🏢 Sponsor 25 | https://modelslab.com 26 | -------------------------------------------------------------------------------- /havatar_colab.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": { 6 | "id": "view-in-github" 7 | }, 8 | "source": [ 9 | "[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/camenduru/havatar-colab/blob/main/havatar_colab.ipynb)" 10 | ] 11 | }, 12 | { 13 | "cell_type": "code", 14 | "execution_count": null, 15 | "metadata": { 16 | "id": "VjYy0F2gZIPR" 17 | }, 18 | "outputs": [], 19 | "source": [ 20 | "%cd /content\n", 21 | "!git clone -b dev https://github.com/camenduru/havatar\n", 22 | "%cd /content/havatar\n", 23 | "\n", 24 | "!apt -y install -qq aria2\n", 25 | "!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/camenduru/havatar/resolve/main/faceverse_v3_1.npy -d /content/havatar/data_preprocessing/metamodel/v3 -o faceverse_v3_1.npy\n", 26 | "!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/camenduru/havatar/resolve/main/rvm_resnet50_fp32.torchscript -d /content/havatar/data_preprocessing/BgMatting_models -o rvm_resnet50_fp32.torchscript\n", 27 | "\n", 28 | "!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/camenduru/havatar/resolve/main/demo_dataset.zip -d /content/havatar/data/demo -o demo_dataset.zip\n", 29 | "%cd /content/havatar/data/demo\n", 30 | "!unzip demo_dataset.zip\n", 31 | "!mv /content/havatar/data/demo/demo_dataset/* /content/havatar/data/demo/\n", 32 | "%cd /content/havatar\n", 33 | "!rm -rf /content/havatar/data/demo/sv_v31_all.json\n", 34 | "!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/camenduru/havatar/raw/main/sv_v31_all.json -d /content/havatar/data/demo -o sv_v31_all.json\n", 35 | "!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/camenduru/havatar/resolve/main/latest.pt -d /content/havatar/logs/demo/HD -o latest.pt\n", 36 | "\n", 37 | "%cd /content/havatar/model/op\n", 38 | "!python setup.py install\n", 39 | "%cd /content/havatar\n", 40 | "\n", 41 | "!pip install -q einops" 42 | ] 43 | }, 44 | { 45 | "cell_type": "code", 46 | "execution_count": null, 47 | "metadata": {}, 48 | "outputs": [], 49 | "source": [ 50 | "%cd /content/havatar\n", 51 | "!python avatarHD_reenactment.py --savedir /content/havatar/results/demo/self-recon --ckpt /content/havatar/logs/demo/HD/latest.pt --split /content/havatar/data/demo/sv_v31_all.json" 52 | ] 53 | } 54 | ], 55 | "metadata": { 56 | "accelerator": "GPU", 57 | "colab": { 58 | "gpuType": "T4", 59 | "provenance": [] 60 | }, 61 | "kernelspec": { 62 | "display_name": "Python 3", 63 | "name": "python3" 64 | }, 65 | "language_info": { 66 | "name": "python" 67 | } 68 | }, 69 | "nbformat": 4, 70 | "nbformat_minor": 0 71 | } 72 | --------------------------------------------------------------------------------