• Stars
    star
    1,160
  • Rank 40,222 (Top 0.8 %)
  • Language
    C++
  • License
    Creative Commons ...
  • Created over 4 years ago
  • Updated 7 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Successor of Avatarify Python

Avatarify Desktop

Avatarify for desktop with a user friendly interface.

System requirements

  • Windows 10
  • Nvidia GPU: GeForce 1070 or higher is recommended
  • Web camera

Installation

  1. Download Avatarify Desktop (897 Mb).
  2. Double click on the installer. Windows Defender warning screen may pop up telling that the app comes from an unknown source. Click "More info", then "Run anyway".
  3. Follow the instructions of the setup Wizard. You may opt to the default settings.

Running

  1. The app starts automatically after the installation. If that didn't happen, press Windows button and start typing "Avatarify" and select "Avatarify Desktop". Windows Defender warning screen may pop up telling that the app comes from an unknown source. Click "More info", then "Run anyway".
  2. In the Settings section of the main window, choose your web camera in the drop-down menu.
  3. Position your head in the center of the frame and press C to calibrate.
  4. Left-click on any avatar and start driving.

Tip: whenever your avatar screws, press C (or click Calibrate button) to reset the initial pose.

To break into video conferencing with an avatar, set up the Virtual camera.

Virtual camera

This example is for Zoom, but the procedure is similar in the other video-conf apps.

  1. In Zoom, go to Settings -> Video.
  2. In the Camera drop-down menu, choose Avatarify Camera.
  3. You should see your avatar immediately. If you see image from your web camera, go back to Avatarify and left-click on an avatar.

Add new avatar

  1. Click on Open image file in the main window.
  2. Browse to your image with an avatar and open it. Requirements to images: one face, neutral emotion, frontal look.
  3. Crop your image. Using the slider under the window, zoom image so that shoulder are slightly captured. Drag the image using left mouse button and center the head of the avatar. Leave some space between top of the head and image border.
  4. Click on Save button. The new avatar will appear on the left of the avatar reel.

Use overlay

Avatar driving works better when your calibration pose matches the avatar's pose.

  1. If an avatar is selected, left-click on it to switch to the web camera mode.
  2. Right-click on the avatar to make it appear as an overlay on your web camera image.
  3. Use Overlay slider in the Settings section to change opacity of the overlay.
  4. Match your pose and expression with the avatar and press C to calibrate.
  5. Left-click on the avatar to drive it.

Smart crop

The app has a function to automatically track the position of your head. It's useful when your web camera is mounted sidewise and you not appear in the center of the frame.

In the Settings section, switch Smart crop slider. The app will start tracking your head and move it to the center of the frame. When it's done, press C to calibrate.

Controls

Key Action
C Calibrate.
⬅️ ➑️ Switch to previous / next avatar.
F Fullscreen mode

Build from source

Dependencies

  • Qt
  1. Download online installer
  2. Run the installer and on the Select Components page select these components:
    • Qt -> Qt 5.15.2. Deselect all components except MSVC 2019 64bit to save disk space
    • Qt -> Developer and Designer Tools -> OpenSSL 1.1.1d Toolkit
  • libtorch. Library for NN inference. Download library here: https://pytorch.org/ (Stable; Windows; C++/Java; 10.2/None). Direct links: release, debug. Extract files to
    • Release: C:\SDKs\libtorch-win-shared-with-deps-1.6.0
    • Debug: C:\SDKs\libtorch-win-shared-with-deps-debug-1.6.0
      Make sure path C:\SDKs\libtorch-win-shared-with-deps-1.6.0\lib (for release) is correct. Remove extra sub-directories if necessary.

Build project

  • Check that you have libtorch at C:\SDKs\
git clone https://github.com/vlivashkin/avatarify-desktop
cd avatarify-desktop
git submodule update --init --recursive
  • Build the project with Qt Creator. Choose MSVC 2019 64-bit kit and Release configuration.
  • Download additional files from here and unpack to C:\Users\[user]\.avatarify. This folder has the following structure:
    • .avatarify\avatars: avatar pictures
    • .avatarify\models: FOMM and landmark detector model weights
  • Download AkVirtualCamera.plugin from here and unpack to [build]/avatarify. Avatarify will register Π΅Ρ€Ρƒ plugin on the first run.

Build installer

(not very clean solution, but at least it works)

  • Build release solution
  • Call make install in cmake-build-release folder. Clean installation files will be located in C:\Program Files\Avatarify
  • Compress folder with 7z and put it in avatarify-desktop\installer\packages\com.avatarify.desktop\data folder
  • You need to make similar archives for models and avatars from C:\Users\[user]\.avatarify and put them to com.avatarify.desktop.models and com.avatarify.desktop.avatars folders
  • Run avatarify-desktop\installer\package_for_windows.bat