0% found this document useful (0 votes)
113 views4 pages

READ Me

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
113 views4 pages

READ Me

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 4

#### Windows

<!-- **New**: Check out our [app](https://github.com/alievk/avatarify-desktop) with


graphical interface! -->

:arrow_forward: [Video tutorial](https://youtu.be/lym9ANVb120)

This guide is tested for Windows 10.

<!--- 1. Install [CUDA](https://developer.nvidia.com/cuda-downloads?


target_os=Windows&target_arch=x86_64&target_version=10&target_type=exenetwork). -->
1. Install [Miniconda Python
3.8](https://docs.conda.io/en/latest/miniconda.html#windows-installers).
2. Install [Git](https://git-scm.com/download/win).
3. Press Windows button and type "miniconda". Run suggested Anaconda Prompt.
4. Download and install Avatarify (please copy-paste these commands and don't
change them):
```bash
git clone https://github.com/alievk/avatarify-python.git
cd avatarify-python
scripts\install_windows.bat
```
5. [Download network weights](#download-network-weights) and place `vox-adv-
cpk.pth.tar` file in the `avatarify-python` directory (don't unpack it).
6. Run `run_windows.bat`. If installation was successful, two windows "cam" and
"avatarify" will appear. Leave these windows open for the next installation steps.
<!--If there are multiple cameras (including virtual ones) in the system, you may
need to select the correct one. `scripts/settings_windows.bat` and edit `CAMID`
variable. `CAMID` is an index number of camera like 0, 1, 2, ...-->
7. Install [OBS Studio](https://obsproject.com/) for capturing Avatarify output.
8. Install [VirtualCam plugin](https://obsproject.com/forum/resources/obs-
virtualcam.539/). Choose `Install and register only 1 virtual camera`.
9. Run OBS Studio.
10. In the Sources section, press on Add button ("+" sign), select Windows Capture
and press OK. In the appeared window, choose "[python.exe]: avatarify" in Window
drop-down menu and press OK. Then select Edit -> Transform -> Fit to screen.
11. In OBS Studio, go to Tools -> VirtualCam. Check AutoStart, set Buffered Frames
to 0 and press Start.
12. Now `OBS-Camera` camera should be available in Zoom (or other videoconferencing
software).

The steps 10-11 are required only once during setup.

#### Remote GPU

You can offload the heavy work to [Google


Colab](https://colab.research.google.com/github/alievk/avatarify/blob/master/
avatarify.ipynb) or a [server with a GPU](https://github.com/alievk/avatarify-
python/wiki/Remote-GPU) and use your laptop just to communicate the video stream.
The server and client software are native and dockerized available.

1. In Anaconda Prompt:
```
cd C:\path\to\avatarify
run_windows.bat
```
2. Run OBS Studio. It should automaitcally start streaming video from Avatarify to
`OBS-Camera`.

`cam` and `avatarify` windows will pop-up. The `cam` window is for controlling your
face position and `avatarify` is for the avatar animation preview. Please follow
these [recommendations](#driving-your-avatar) to drive your avatars.

**Note:** To reduce video latency, in OBS Studio right click on the preview window
and uncheck Enable Preview.

## Controls

Keys | Controls
--- | ---
1-9 | These will immediately switch between the first 9 avatars.
Q | Turns on StyleGAN-generated avatar. Every time you push the button – new avatar
is sampled.
0 | Toggles avatar display on and off.
A/D | Previous/next avatar in folder.
W/S | Zoom camera in/out.
U/H/J/K | Translate camera. `H` - left, `K` - right, `U` - up, `J` - Down by 5
pixels. Add `Shift` to adjust by 1 pixel.
Shift-Z | Reset camera zoom and translation
Z/C | Adjust avatar target overlay opacity.
X | Reset reference frame.
F | Toggle reference frame search mode.
R | Mirror reference window.
T | Mirror output window.
L | Reload avatars.
I | Show FPS
O | Toggle face detection overlay.
ESC | Quit

## Driving your avatar

These are the main principles for driving your avatar:

* Align your face in the camera window as closely as possible in proportion and
position to the target avatar. Use zoom in/out function (W/S keys) and camera left,
right, up, down translation (U/H/J/K keys). When you have aligned, hit 'X' to use
this frame as reference to drive the rest of the animation
* Use the image overlay function (Z/C keys) or the face detection overlay function
(O key) to match your and avatar's face expressions as close as possible

Alternatively, you can hit 'F' for the software to attempt to find a better
reference frame itself. This will slow down the framerate, but while this is
happening, you can keep moving your head around: the preview window will flash
green when it finds your facial pose is a closer match to the avatar than the one
it is currently using. You will see two numbers displayed as well: the first number
is how closely you are currently aligned to the avatar, and the second number is
how closely the reference frame is aligned.

You want to get the first number as small as possible - around 10 is usually a good
alignment. When you are done, press 'F' again to exit reference frame search mode.

You don't need to be exact, and some other configurations can yield better results
still, but it's usually a good starting point.
## Configure video meeting app

Avatarify supports any video-conferencing app where video input source can be
changed (Zoom, Skype, Hangouts, Slack, ...). Here are a few examples how to
configure particular app to use Avatarify.

### Skype

Go to Settings -> Audio & Video, choose `avatarify` (Linux), `CamTwist` (Mac) or
`OBS-Camera` (Windows) camera.

<img src=skype.jpg width=600>

### Zoom

Go to Settings -> Video and choose `avatarify` (Linux), `CamTwist` (Mac) or `OBS-
Camera` (Windows) from Camera drop-down menu.

<img src=zoom.jpg width=600>

### Teams

Go to your profile picture -> Settings -> Devices and choose `avatarify` (Linux),
`CamTwist` (Mac) or `OBS-Camera` (Windows) from Camera drop-down menu.

<img src=teams.jpg width=600>

### Slack

Make a call, allow browser using cameras, click on Settings icon, choose
`avatarify` (Linux), `CamTwist` (Mac) or `OBS-Camera` (Windows) in Video settings
drop-down menu.

<img src=slack.jpg width=600>

## Uninstall
To remove Avatarify and its related programs follow the
[instructions](https://github.com/alievk/avatarify-python/wiki/Removing-Avatarify)
in the Wiki.

## Contribution

Our goal is to democratize photorealistic avatars for video-conferencing. To make


the technology even more accessible, we have to tackle the following problems:

* ~~Add support for more platforms (Linux and Mac are already supported).~~
* ~~Remote GPU support. This is a work in progress.~~
* Porting to non-CUDA GPUs (Intel integrated GPUs, AMD GPUs, etc) and optimization.
The goal is to run Avatarify real-time (at least 10FPS) on modern laptops.

Please make pull requests if you have any improvements or bug-fixes.

## FAQ

Q: **Do I need any knowledge of programming to run Avatarify?**


A: Not really, but you need some beginner-level knowledge of the command line. For
Windows we recorded a video [tutorial](https://www.youtube.com/watch?
v=lym9ANVb120), so it’ll be easy to install.

Q: **Why does it work so slow on my Macbook?**


A: The model used in Avatarify requires a CUDA-enabled NVIDIA GPU to perform heavy
computations. Macbooks don’t have such GPUs, and for processing use CPU, which has
much less computing power to run Avatarify smoothly.

Q: **I don’t have a NVIDIA GPU, can I run it?**


A: You still can run it without a NVIDIA GPU, but with drastically reduced
performance (<1fps).

Q: **I have an ATI GPU (e.g. Radeon). Why does it work so slow?**
A: To run the neural network Avatarify uses PyTorch library, which is optimized for
CUDA. If PyTorch can’t find a CUDA-enabled GPU in your system it will fallback to
CPU. The performance on the CPU will be much worse.

Q: **How to add a new avatar?**


A: It’s easy. All you need is to find a picture of your avatar and put it in the
`avatars` folder. [More](https://github.com/alievk/avatarify-python#setup-avatars).

Q: **My avatar looks distorted.**


A: You need to calibrate your face position. Please follow the
[tips](https://github.com/alievk/avatarify-python#driving-your-avatar) or watch the
video [tutorial](https://youtu.be/lym9ANVb120?t=662).

Q: **Can I use a cloud GPU?**


A: This is work in progress. See the relevant
[discussion](https://github.com/alievk/avatarify-python/issues/115).

Q: **Avatarify crashed, what to do?**


A: First, try to find your error in the
[troubleshooting](https://github.com/alievk/avatarify-python#troubleshooting)
section. If it is not there, try to find it in the
[issues](https://github.com/alievk/avatarify-python/issues). If you couldn’t find
your issue there, please open a new one using the issue template.

Q: **Can I use Avatarify for commercial purposes?**


A: No. Avatarify and First Order Motion Model are licensed under Creative Commons
Non-Commercial license, which prohibits commercial use.

Q: **What video conferencing apps does Avatarify support?**


A: Avatarify creates a virtual camera which can be plugged into any app where video
input source can be changed (Zoom, Skype, Hangouts, Slack, ...).

Q: **Where can I discuss Avatarify-related topics with the community?**


A: We have Slack. Please join: [<img src="https://img.shields.io/badge/slack-join-
brightgreen?style=flat&logo=slack">](https://join.slack.com/t/avatarify/
shared_invite/zt-dyoqy8tc-~4U2ObQ6WoxuwSaWKKVOgg)

## Troubleshooting

Please follow the


[Wiki](https://github.com/alievk/avatarify-python/wiki/Troubleshooting) page.

You might also like