Skip to content

Commit 3b288f7

Browse files
committed
init
1 parent de3c393 commit 3b288f7

File tree

340 files changed

+214828
-535
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

340 files changed

+214828
-535
lines changed

.gitignore

+4-6
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,8 @@
3131
*.out
3232
*.app
3333

34+
imgui.ini
35+
3436
data
35-
dependencies
36-
instant-ngp/dependencies
37-
cinema
38-
scripts/*.txt
39-
scripts/sandbox
40-
scripts/diagrams/output
37+
scripts/insta
38+
scripts/dependencies

.gitmodules

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
[submodule "instant-ngp/dependencies/pybind11"]
2+
path = instant-ngp/dependencies/pybind11
3+
url = https://github.com/Tom94/pybind11.git
4+
[submodule "instant-ngp/dependencies/eigen"]
5+
path = instant-ngp/dependencies/eigen
6+
url = https://github.com/Tom94/eigen.git
7+
[submodule "instant-ngp/dependencies/dlss"]
8+
path = instant-ngp/dependencies/dlss
9+
url = https://github.com/NVIDIA/DLSS.git
10+
[submodule "instant-ngp/dependencies/glfw"]
11+
path = instant-ngp/dependencies/glfw
12+
url = https://github.com/Tom94/glfw.git
13+
[submodule "instant-ngp/dependencies/imgui"]
14+
path = instant-ngp/dependencies/imgui
15+
url = https://github.com/ocornut/imgui.git
16+
[submodule "instant-ngp/dependencies/tiny-cuda-nn"]
17+
path = instant-ngp/dependencies/tiny-cuda-nn
18+
url = https://github.com/NVlabs/tiny-cuda-nn.git
19+
[submodule "instant-ngp/dependencies/tinylogger"]
20+
path = instant-ngp/dependencies/tinylogger
21+
url = https://github.com/Tom94/tinylogger.git
22+
[submodule "instant-ngp/dependencies/args"]
23+
path = instant-ngp/dependencies/args
24+
url = https://github.com/Taywee/args.git

LICENSE

+88
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
License
2+
3+
Software Copyright License for non-commercial scientific research purposes
4+
Please read carefully the following terms and conditions and any accompanying documentation before you download
5+
and/or use the INSTA model, data and software, (the "Model & Software"), including 3D meshes, software, and scripts.
6+
By downloading and/or using the Model & Software (including downloading, cloning, installing, and any other use
7+
of this github repository), you acknowledge that you have read these terms and conditions, understand them, and
8+
agree to be bound by them. If you do not agree with these terms and conditions, you must not download and/or use
9+
the Model & Software. Any infringement of the terms of this agreement will automatically terminate your rights
10+
under this License
11+
12+
Ownership / Licensees
13+
The Model & Software and the associated materials has been developed at the
14+
Max Planck Institute for Intelligent Systems (hereinafter "MPI").
15+
16+
Any copyright or patent right is owned by and proprietary material of the
17+
Max-Planck-Gesellschaft zur Förderung der Wissenschaften e.V. (hereinafter “MPG”; MPI and MPG hereinafter
18+
collectively “Max-Planck”) hereinafter the “Licensor”.
19+
20+
License Grant
21+
Licensor grants you (Licensee) personally a single-user, non-exclusive, non-transferable, free of charge right:
22+
23+
• To install the Model & Software on computers owned, leased or otherwise controlled by you and/or your organization.
24+
• To use the Model & Software for the sole purpose of performing peaceful non-commercial scientific research,
25+
non-commercial education, or non-commercial artistic projects.
26+
27+
Any other use, in particular any use for commercial, pornographic, military, or surveillance purposes is prohibited.
28+
This includes, without limitation, incorporation in a commercial product, use in a commercial service,
29+
or production of other artefacts for commercial purposes.
30+
31+
The Model & Software may not be used to create fake, libelous, misleading, or defamatory content of any kind, excluding
32+
analyses in peer-reviewed scientific research.
33+
34+
The Model & Software may not be reproduced, modified and/or made available in any form to any third party
35+
without Max-Planck’s prior written permission.
36+
37+
The Model & Software may not be used for pornographic purposes or to generate pornographic material whether
38+
commercial or not. This license also prohibits the use of the Model & Software to train methods/algorithms/neural
39+
networks/etc. for commercial use of any kind. By downloading the Model & Software, you agree not to reverse engineer it.
40+
41+
No Distribution
42+
The Model & Software and the license herein granted shall not be copied, shared, distributed, re-sold, offered
43+
for re-sale, transferred or sub-licensed in whole or in part except that you may make one copy for archive
44+
purposes only.
45+
46+
Disclaimer of Representations and Warranties
47+
You expressly acknowledge and agree that the Model & Software results from basic research, is provided “AS IS”,
48+
may contain errors, and that any use of the Model & Software is at your sole risk.
49+
LICENSOR MAKES NO REPRESENTATIONS
50+
OR WARRANTIES OF ANY KIND CONCERNING THE MODEL & SOFTWARE, NEITHER EXPRESS NOR IMPLIED, AND THE ABSENCE OF ANY
51+
LEGAL OR ACTUAL DEFECTS, WHETHER DISCOVERABLE OR NOT. Specifically, and not to limit the foregoing, licensor
52+
makes no representations or warranties (i) regarding the merchantability or fitness for a particular purpose of
53+
the Model & Software, (ii) that the use of the Model & Software will not infringe any patents, copyrights or other
54+
intellectual property rights of a third party, and (iii) that the use of the Model & Software will not cause any
55+
damage of any kind to you or a third party.
56+
57+
Limitation of Liability
58+
Because this Model & Software License Agreement qualifies as a donation, according to Section 521 of the German
59+
Civil Code (Bürgerliches Gesetzbuch – BGB) Licensor as a donor is liable for intent and gross negligence only.
60+
If the Licensor fraudulently conceals a legal or material defect, they are obliged to compensate the Licensee
61+
for the resulting damage.
62+
63+
Licensor shall be liable for loss of data only up to the amount of typical recovery costs which would have
64+
arisen had proper and regular data backup measures been taken. For the avoidance of doubt Licensor shall be
65+
liable in accordance with the German Product Liability Act in the event of product liability. The foregoing
66+
applies also to Licensor’s legal representatives or assistants in performance. Any further liability shall
67+
be excluded. Patent claims generated through the usage of the Model & Software cannot be directed towards the copyright holders.
68+
The Model & Software is provided in the state of development the licensor defines. If modified or extended by
69+
Licensee, the Licensor makes no claims about the fitness of the Model & Software and is not responsible
70+
for any problems such modifications cause.
71+
72+
No Maintenance Services
73+
You understand and agree that Licensor is under no obligation to provide either maintenance services,
74+
update services, notices of latent defects, or corrections of defects with regard to the Model & Software.
75+
Licensor nevertheless reserves the right to update, modify, or discontinue the Model & Software at any time.
76+
77+
Defects of the Model & Software must be notified in writing to the Licensor with a comprehensible description
78+
of the error symptoms. The notification of the defect should enable the reproduction of the error.
79+
The Licensee is encouraged to communicate any use, results, modification or publication.
80+
81+
Publications using the Model & Software
82+
You acknowledge that the Model & Software is a valuable scientific resource and agree to appropriately reference
83+
the following paper in any publication making use of the Model & Software.
84+
85+
Commercial licensing opportunities
86+
For commercial uses of the Model & Software, please send email to [email protected]
87+
88+
This Agreement shall be governed by the laws of the Federal Republic of Germany except for the UN Sales Convention.

README.md

+86-5
Original file line numberDiff line numberDiff line change
@@ -6,30 +6,111 @@
66

77
<h4 align="center">
88
<a href="https://youtu.be/HOgaeWTih7Q" target="_blank">Video&nbsp</a>
9-
<a href="https://arxiv.org/pdf/2211.12499.pdf" target="_blank">Paper&nbsp</a>
9+
<a href="https://arxiv.org/pdf/2211.12499v2.pdf" target="_blank">Paper&nbsp</a>
1010
<a href="https://zielon.github.io/insta/" target="_blank">Project Website&nbsp</a>
11+
<a href="https://keeper.mpdl.mpg.de/d/5ea4d2c300e9444a8b0b/" target="_blank"><b>Dataset&nbsp</b></a>
12+
<a href="https://github.com/Zielon/metrical-tracker" target="_blank">Face Tracker&nbsp</a>
13+
<a href="https://github.com/Zielon/INSTA-pytorch" target="_blank">INSTA Pytorch&nbsp</a>
14+
<a href="mailto:&#105;&#110;&#115;&#116;&#97;&#64;&#116;&#117;&#101;&#46;&#109;&#112;&#103;&#46;&#100;&#101;">Email</a>
1115
</h4>
1216

1317
<div align="center">
14-
<img src="documents/teaser.jpg">
18+
<img src="documents/faces.gif">
19+
<br>
1520
<i style="font-size: 1.05em;">Official Repository for CVPR 2023 paper Instant Volumetric Head Avatars</i>
1621
</div>
22+
<br>
23+
24+
This repository is based on [instant-ngp](https://github.com/NVlabs/instant-ngp), some of the features of the original code are not available in this work. Therefore, one should restrain the program options to the main menu only.
25+
26+
<div align="center">
27+
&#x26A0 We also prepared a Pytorch demo version of the project <a href="https://github.com/Zielon/INSTA-pytorch" target="_blank">INSTA Pytorch&nbsp</a> &#x26A0
28+
</div>
1729

1830
### Installation
1931

20-
The repository is based on instant-ngp
32+
The repository is based on `instant-ngp` [commit](https://github.com/NVlabs/instant-ngp/tree/e7631da9fca9d0f3467f826fccd7a5849b3f6309). The requirements for the installation are the same, therefore please follow the [guide](https://github.com/NVlabs/instant-ngp#building-instant-ngp-windows--linux).
33+
Remember to use the `--recursive` option during cloning.
34+
35+
```shell
36+
git clone --recursive https://github.com/Zielon/INSTA.git
37+
cd INSTA
38+
cmake . -B build
39+
cmake --build build --config RelWithDebInfo -j
40+
```
41+
42+
### Usage and Requirements
2143

22-
### How To Use
44+
After building the project you can either start training an avatar from scratch or load a snapshot. For training, we recommend a graphics card higher or equal to `RTX3090 24GB`, (we have not tested any other GPU) and `64 GB` of RAM memory. Rendering from a snapshot does not require a high-end GPU
45+
and can be performed even on a laptop. We have tested it on `RTX 3080 8GB` laptop version.
46+
47+
The viewer options are the same as in the case of [instant-ngp](https://github.com/NVlabs/instant-ngp#keyboard-shortcuts-and-recommended-controls), with some additional key `F` to raycast the FLAME mesh.
48+
49+
Usage example
50+
51+
```shell
52+
# Training
53+
./build/rta --config insta.json --scene data/obama --height 1024 --width 1024
54+
55+
# Loading from a checkpoint
56+
./build/rta --config insta.json --scene data/obama/transforms_test.json --height 1024 --width 1024 --snapshot data/obama/snapshot.msgpack
57+
```
2358

2459
### Dataset and Training
2560

61+
We are releasing part of our dataset together with publicly available preprocessed avatars from [NHA](https://github.com/philgras/neural-head-avatars), [NeRFace](https://github.com/gafniguy/4D-Facial-Avatars) and [IMAvatar](https://github.com/zhengyuf/IMavatar).
62+
The output of the training (**Record Video** in menu), including rendered frames, checkpoint, etc will be saved in the `./data/{actor}/experiments/{config}/debug`.
63+
After the specified number of steps, the program will automatically either render all videos with the `All` option or only the currently selected one in `Mode`.
64+
65+
[Available avatars](https://keeper.mpdl.mpg.de/d/5ea4d2c300e9444a8b0b/). Click the selected avatar to download the training dataset and the checkpoint. The avatars have to be placed in the `data` folder.
66+
<div align="center" dis>
67+
<table class="images" width="100%" style="border:0px solid white; width:100%;">
68+
<tr style="border: 0px;">
69+
<td style="border: 0px;"><a href="https://keeper.mpdl.mpg.de/f/53e9988994914c93bb51/?dl=1"><img src="documents/gifs/justin.gif" height="128" width="128"></a></td>
70+
<td style="border: 0px;"><a href="https://keeper.mpdl.mpg.de/f/1a58d09b3b7442988c3e/?dl=1"><img src="documents/gifs/nf_03.gif" height="128" width="128"></a></td>
71+
<td style="border: 0px;"><a href="https://keeper.mpdl.mpg.de/f/c3632aaba19542d49f1d/?dl=1"><img src="documents/gifs/nf_01.gif" height="128" width="128"></a></td>
72+
<td style="border: 0px;"><a href="https://keeper.mpdl.mpg.de/f/f273e0d5c6c14d8892a0/?dl=1"><img src="documents/gifs/marcel.gif" height="128" width="128"></a></td>
73+
<td style="border: 0px;"><a href="https://keeper.mpdl.mpg.de/f/9acb4822310c4d5aa555/?dl=1"><img src="documents/gifs/biden.gif" height="128" width="128"></a></td>
74+
</tr>
75+
</table>
76+
<table class="images" width="100%" style="border:0px solid white; width:100%;">
77+
<tr style="border: 0px;">
78+
<td style="border: 0px;"><a href="https://keeper.mpdl.mpg.de/f/f1545b9e7ea74f9e802b/?dl=1"><img src="documents/gifs/obama.gif" height="128" width="128"></a></td>
79+
<td style="border: 0px;"><a href="https://keeper.mpdl.mpg.de/f/ba379b9a5c384722939c/?dl=1"><img src="documents/gifs/wojtek_1.gif" height="128" width="128"></a></td>
80+
<td style="border: 0px;"><a href="https://keeper.mpdl.mpg.de/f/0f81a65cbdee4e01bfae/?dl=1"><img src="documents/gifs/malte_1.gif" height="128" width="128"></a></td>
81+
<td style="border: 0px;"><a href="https://keeper.mpdl.mpg.de/f/ae5a0b3ae4c84c25944c/?dl=1"><img src="documents/gifs/bala.gif" height="128" width="128"></a></td>
82+
<td style="border: 0px;"><a href="https://keeper.mpdl.mpg.de/f/ece2fc07bbee424f80c6/?dl=1"><img src="documents/gifs/person_0004.gif" height="128" width="128"></a></td>
83+
</tr>
84+
</table>
85+
</div>
86+
87+
### Dataset Generation
88+
89+
For the input generation, a conda environment is needed, and a few other repositories. Simply run `install.sh` from [scripts](https://github.com/Zielon/INSTA/tree/master/scripts) folder to prepare the workbench.
90+
91+
Next, you can use [Metrical Photometric Tracker](https://github.com/Zielon/metrical-tracker) for the tracking of a sequence. After the processing is done run the `generate.sh` script to prepare the sequence. As input please specify the absolute path of the tracker output.
92+
93+
**For training we recommend at least 1000 frames.**
94+
95+
```shell
96+
# 1) Run the tracker for a selected actor
97+
python tracker.py --cfg ./configs/actors/duda.yml
98+
99+
# 2) Generate a dataset using the script. Importantly, use the absolute path to tracker input and desired output.
100+
./generate.sh /metrical-tracker/output/duda INSTA/data/duda 100
101+
102+
# ./generate.sh {input} {output} {# of test frames from the end}
103+
```
104+
26105
### Citation
106+
27107
If you use this project in your research please cite INSTA:
108+
28109
```bibtex
29110
@proceedings{INSTA:CVPR2023,
30111
author = {Zielonka, Wojciech and Bolkart, Timo and Thies, Justus},
31112
title = {Instant Volumetric Head Avatars},
32113
journal = {Conference on Computer Vision and Pattern Recognition},
33114
year = {2023}
34115
}
35-
```
116+
```

configs/nerf/insta.json

+7-2
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,14 @@
22
"loss": {
33
"otype": "Huber"
44
},
5-
"max_cached_bvh": 4000,
65
"nerf_network": "concatenation",
76
"recorder_steps": 33000,
7+
"beta_loss": 0,
8+
"use_eyes": false,
9+
"optimize_latent_code": false,
10+
"use_ngp": false,
11+
"penalize_density_alpha": false,
12+
"geo_params": 0,
813
"exp_params": 16,
914
"seg_weight": 40,
1015
"depth_weight": 1.25,
@@ -24,7 +29,7 @@
2429
"otype": "HashGrid",
2530
"n_levels": 16,
2631
"n_features_per_level": 8,
27-
"log2_hashmap_size": 17,
32+
"log2_hashmap_size": 18,
2833
"base_resolution": 16
2934
},
3035
"network": {

data/README

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
The avatars are available under https://keeper.mpdl.mpg.de/d/5ea4d2c300e9444a8b0b/
2+
3+
After downloading please place them in this folder.

documents/avatars/bala.png

233 KB
Loading

documents/avatars/biden.png

114 KB
Loading

documents/avatars/justin.png

111 KB
Loading

documents/avatars/justin_1.png

110 KB
Loading

documents/avatars/malte.png

190 KB
Loading

documents/avatars/marcel.png

266 KB
Loading

documents/avatars/nf_01.png

224 KB
Loading

documents/avatars/nf_03.png

251 KB
Loading

documents/avatars/obama.png

180 KB
Loading

documents/avatars/person_0004.png

221 KB
Loading

documents/avatars/wojtek_1.png

209 KB
Loading

documents/faces.gif

6.22 MB
Loading

documents/gifs/bala.gif

1.4 MB
Loading

documents/gifs/biden.gif

1.22 MB
Loading

documents/gifs/justin.gif

1.05 MB
Loading

documents/gifs/malte_1.gif

1.16 MB
Loading

documents/gifs/marcel.gif

1.19 MB
Loading

documents/gifs/nf_01.gif

1.39 MB
Loading

documents/gifs/nf_03.gif

1.56 MB
Loading

documents/gifs/obama.gif

1.3 MB
Loading

documents/gifs/person_0004.gif

1.02 MB
Loading

documents/gifs/wojtek_1.gif

1.31 MB
Loading

0 commit comments

Comments
 (0)