Avatarify Python - Avatars for Zoom, Skype and other video-conferencing apps.

Overview

Avatarify Python

Photorealistic avatars for video-conferencing.

Avatarify Python requires manually downloading and installing some dependencies, and is therefore best suited for users who have some experience with command line applications. Avatarify Desktop, which aims to be easier to install and use, is recommended for most users. If you still want to use Avatarify Python, proceed to the install instructions.

Based on First Order Motion Model.

Avatarify Python is not affiliated with Avatarify Inc.

News

  • 7 Mar 2021. Renamed project to Avatarify Python to distinguish it from other versions of Avatarify
  • 14 December 2020. Released Avatarify Desktop. Check it out here.
  • 11 July 2020. Added Docker support. Now you can run Avatarify from Docker on Linux. Thanks to mikaelhg and mintmaker for contribution!
  • 22 May 2020. Added Google Colab mode. Now you can run Avatarify on any computer without GPU!
  • 7 May 2020. Added remote GPU support for all platforms (based on mynameisfiber's solution). Demo. Deployment instructions.
  • 24 April 2020. Added Windows installation tutorial.
  • 17 April 2020. Created Slack community. Please join via invitation link.
  • 15 April 2020. Added StyleGAN-generated avatars. Just press Q and now you drive a person that never existed. Every time you push the button – new avatar is sampled.
  • 13 April 2020. Added Windows support (kudos to 9of9).
Issues
  • Dockerize the

    Dockerize the "Remote GPU" service

    This PR needs some testing before merging, so I'm creating it as a draft.

    Based on my previous contribution to AliaksandrSiarohin/first-order-model#55.

    Building

    docker build -t avatarify .
    

    Running

    docker run -it --rm --gpus=all -p 5557:5557 -p 5558:5558 avatarify
    
    opened by mikaelhg 47
  • Broken pipe

    Broken pipe

    ffmpeg version 4.1.4-1build2 Copyright (c) 2000-2019 the FFmpeg developers
      built with gcc 9 (Ubuntu 9.2.1-4ubuntu1)
      configuration: --prefix=/usr --extra-version=1build2 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared
      libavutil      56. 22.100 / 56. 22.100
      libavcodec     58. 35.100 / 58. 35.100
      libavformat    58. 20.100 / 58. 20.100
      libavdevice    58.  5.100 / 58.  5.100
      libavfilter     7. 40.101 /  7. 40.101
      libavresample   4.  0.  0 /  4.  0.  0
      libswscale      5.  3.100 /  5.  3.100
      libswresample   3.  3.100 /  3.  3.100
      libpostproc    55.  3.100 / 55.  3.100
    0: ./avatars/mona.jpg
    cam_fomm.py:26: YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details.
      config = yaml.load(f)
    [mjpeg @ 0x561a4d0f8a00] Format mjpeg detected only with low score of 25, misdetection possible!
    Input #0, mjpeg, from 'pipe:0':                                                                                                                           
      Duration: N/A, bitrate: N/A
        Stream #0:0: Video: mjpeg, yuvj420p(pc, bt470bg/unknown/unknown), 640x480 [SAR 1:1 DAR 4:3], 25 tbr, 1200k tbn, 25 tbc
    Stream mapping:
      Stream #0:0 -> #0:0 (mjpeg (native) -> rawvideo (native))
    [swscaler @ 0x561a4d153040] deprecated pixel format used, make sure you did set range correctly
    [video4linux2,v4l2 @ 0x561a4d0fe680] ioctl(VIDIOC_G_FMT): Invalid argument                                                                                
    Could not write header for output file #0 (incorrect codec parameters ?): Invalid argument                                                                
    Error initializing output stream 0:0 --                                                                                                                   
    Conversion failed!                                                                                                                                        
    Traceback (most recent call last):
      File "cam_fomm.py", line 173, in <module>
        sys.stdout.buffer.write(buf)
    BrokenPipeError: [Errno 32] Broken pipe
    Exception ignored in: <_io.TextIOWrapper name='<stdout>' mode='w' encoding='utf-8'>
    BrokenPipeError: [Errno 32] Broken pipe
    
    opened by zuenko 42
  • Error when run

    Error when run "bash run.sh"

    Hi,

    I pull the last commit, executed again the install.sh and tryed run:

    bash run.sh

    But this error occours:

    (avatarify) [email protected]:~/Repository/others/avatarify$ bash run.sh 0: ./avatars/einstein.jpg 1: ./avatars/eminem.jpg 2: ./avatars/jobs.jpg 3: ./avatars/mona.jpg 4: ./avatars/obama.jpg 5: ./avatars/potter.jpg 6: ./avatars/ronaldo.png 7: ./avatars/schwarzenegger.png load checkpoints.. cam_fomm.py:34: YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details. config = yaml.load(f) Traceback (most recent call last): File "cam_fomm.py", line 231, in stream = pyfakewebcam.FakeWebcam(f'/dev/video{opt.virt_cam}', frame.shape[1], frame.shape[0]) File "/home/eltonnunes/.conda/envs/avatarify/lib/python3.8/site-packages/pyfakewebcam/pyfakewebcam.py", line 54, in init fcntl.ioctl(self._video_device, _v4l2.VIDIOC_S_FMT, self._settings) OSError: [Errno 22] Invalid argument

    Anyone can help ?

    My OS: Linux Mint 19.3 Cinnamon

    opened by eltonnuness 27
  • Getting multiple cam windows opened while running run.sh

    Getting multiple cam windows opened while running run.sh

    I am on latest Ubuntu I have installed correctly and updated everything but when I run bash run.sh then it didn't. Run so I run with sudo bash run.sh but so it sometime shows me avatar list to select and sometimes it open webcam and when I press X and configure my face than multiple cam windows start opening and I can't understand what's the issue and how to fix it please help me out

    opened by shwetkanwal24 19
  • Error with run_windows.bat

    Error with run_windows.bat

    RuntimeError: CUDA error: no kernel image is available for execution on the device

    I have a Windows 10 machine with Nvidia GTX Titan card. Nvidia says it supports CUDA 3.5 which I think is the minimum required?

    Also I read in the notes that it should fall to the CPU if the GPU isn't supported? How would I configure that if the card is the problem?

    opened by virtualmonster 17
  • No module named 'sync_batchnorm'

    No module named 'sync_batchnorm'

    Windows 10 system.

    Traceback (most recent call last): File "cam_fomm.py", line 13, in from sync_batchnorm import DataParallelWithCallback ModuleNotFoundError: No module named 'sync_batchnorm'

    opened by newtonke 17
  • When run_windows.bat is finished, the two windows do not pop up. (avatarify does not launch)

    When run_windows.bat is finished, the two windows do not pop up. (avatarify does not launch)

    Describe the bug

    To Reproduce

    Info (please complete the following information):

    • OS (e.g., Linux):
    • GPU model:
    • Any other relevant information:

    Screenshots

    Logs

    duplicate 
    opened by board808 16
  • Add overlay drawing of landmarks

    Add overlay drawing of landmarks

    Seeing the landmarks of both the current frame and the avatar can make it easier to get a good pose. I also thought it was interesting to expose a little of the underlying techniques

    opened by JohanAR 16
  • How to find the IP address of Google Colab Notebook

    How to find the IP address of Google Colab Notebook

    Hi, I want to run avatarify on macOS, but I need to use google colab... How do I find the IP address of the notebook so I can connect to the server? I tried to put the !curl ipecho.net/plain command in the notebook and I received an IP, but when I use this IP, the terminal is stuck on Receiving from.

    This is the google colab command:

    google_colab_command

    and this is what I see in the terminal: terminal

    opened by tvtr04 16
  • Installation : Error on window

    Installation : Error on window

    I am trying to install Avatarify under window. When running the script I got this error:

    ERROR: Could not open requirements file: [Errno 2] No such file or directory: 'fomm/requirements.txt'

    image

    Can you help me ?

    thank you .

    opened by Xamamule 15
  • run_windows.bat raises a RuntimeError

    run_windows.bat raises a RuntimeError

    I'm trying to run avatarify on Windows 10, I'm pretty sure to have installed everything correctly, but every time I try to run run_windows.bat I get this error:

    Traceback (most recent call last):
        File "cam_fomm.py", line 219, in <module>
            fa = face_alignment.FaceAlignment(face_alignment.LandmarksType._2D, flip_input=True, device=device)
        File "C:\Users\Alberto\miniconda3\envs\avatarify\lib\site-packages\face_alignment\api.py", line 78, in __init__
            fan_weights = load_url(models_urls[network_name], map_location=lambda storage, loc: storage)
        File "C:\Users\Alberto\miniconda3\envs\avatarify\lib\site-packages\torch\hub.py", line 506, in load_state_dict_from_url
            return torch.load(cached_file, map_location=map_location)
        File "C:\Users\Alberto\miniconda3\envs\avatarify\lib\site-packages\torch\serialization.py", line 529, in load
            return _legacy_load(opened_file, map_location, pickle_module, **pickle_load_args)
        File "C:\Users\Alberto\miniconda3\envs\avatarify\lib\site-packages\torch\serialization.py", line 709, in _legacy_load
            deserialized_objects[key]._set_from_file(f, offset, f_should_read_directly)
    RuntimeError: unexpected EOF, expected 640133 more bytes. The file might be corrupted.
    

    Any idea?

    opened by AlbyIanna 15
  • PC Cam shows but Avatarify Cam does not display

    PC Cam shows but Avatarify Cam does not display

    I had a difficult time getting Avatarify to work on my PC. I have a MSI Katana GF76 11UD 11th Gen Intel(R) Core(TM) i7-11800H @ 2.30GHz 2.30 GHz with 16gb Ram and Nvidia GeForce RTX 3050 Ti Laptup GPU. Eventually I got it to work but only my cam shows up and the Avatarify cam does not show up. Before I was able to get the Scripts to run successfully, the initial error was

    '"OMP: Error #15: Initializing libiomp5md.dll, but found libiomp5md.dll already initialized. OMP: Hint This means that multiple copies of the OpenMP runtime have been linked into the program. That is dangerous, since it can degrade performance or cause incorrect results. The best thing to do is to ensure that only a single OpenMP runtime is linked into the process, e.g. by avoiding static linking of the OpenMP runtime in any library. As an unsafe, unsupported, undocumented workaround you can set the environment variable KMP_DUPLICATE_LIB_OK=TRUE to allow the program to continue to execute, but that may cause crashes or silently produce incorrect results. For more information, please see http://www.intel.com/software/products/support/.'"

    so in order to solve this, I searched for all instances of "libiomp5md.dll" and deleted only one from "C:\ProgramData\Miniconda3\envs\avatarify\Library\bin" -after which the scripts ran but here the problem of only my cam showed up.

    Please I need some insight on this!

    opened by BigBLAZE 4
  • X Error: BadAccess (attempt to access private resource denied) 10

    X Error: BadAccess (attempt to access private resource denied) 10

    details: i am using Google Colab . my pc is Kali Linux .

    please help me to fix this issue :

    [1638910352.957219] Trying camera with id 0 [1638910355.146407] Trying camera with id 1 [ WARN:0] global /io/opencv/modules/videoio/src/cap_v4l.cpp (887) open VIDEOIO(V4L2:/dev/video1): can't open camera by index [1638910355.146952] Camera with id 1 is not available [1638910355.147025] Trying camera with id 2 [ WARN:0] global /io/opencv/modules/videoio/src/cap_v4l.cpp (887) open VIDEOIO(V4L2:/dev/video2): can't open camera by index [1638910355.147230] Camera with id 2 is not available [1638910355.147298] Trying camera with id 3 [ WARN:0] global /io/opencv/modules/videoio/src/cap_v4l.cpp (887) open VIDEOIO(V4L2:/dev/video3): can't open camera by index [1638910355.147474] Camera with id 3 is not available [1638910355.147785] Selected camera 0

    === Control keys === 1-9: Change avatar 1: einstein.jpg 2: eminem.jpg 3: jobs.jpg 4: mona.jpg 5: obama.jpg 6: potter.jpg 7: ronaldo.png 8: schwarzenegger.png W: Zoom camera in S: Zoom camera out A: Previous avatar in folder D: Next avatar in folder Q: Get random avatar X: Calibrate face pose I: Show FPS ESC: Quit

    Full key list: https://github.com/alievk/avatarify#controls

    X Error: BadAccess (attempt to access private resource denied) 10 Extension: 130 (MIT-SHM) Minor opcode: 1 (X_ShmAttach) Resource id: 0x16f X Error: BadShmSeg (invalid shared segment parameter) 128 Extension: 130 (MIT-SHM) Minor opcode: 5 (X_ShmCreatePixmap) Resource id: 0x3e0000c X Error: BadDrawable (invalid Pixmap or Window parameter) 9 Major opcode: 62 (X_CopyArea) Resource id: 0x3e0000d X Error: BadDrawable (invalid Pixmap or Window parameter) 9 Major opcode: 62 (X_CopyArea) Resource id: 0x3e0000d X Error: BadDrawable (invalid Pixmap or Window parameter) 9 Major opcode: 62 (X_CopyArea) Resource id: 0x3e0000d X Error: BadDrawable (invalid Pixmap or Window parameter) 9 Major opcode: 62 (X_CopyArea) Resource id: 0x3e0000d X Error: BadDrawable (invalid Pixmap or Window parameter) 9 Major opcode: 62 (X_CopyArea) Resource id: 0x3e0000d

    linux 
    opened by xUx4n0n 0
  • Avatarify doesn't start when I try to open it

    Avatarify doesn't start when I try to open it

    I've just installed it but when i try to start it, the next messege appears: Traceback (most recent call last): File "afy/cam_fomm.py", line 218, in **predictor_args File "C:\Users\Usuario\avatarify\afy\predictor_local.py", line 49, in init self.fa = face_alignment.FaceAlignment(face_alignment.LandmarksType._2D, flip_input=True, device=self.device) File "E:\Py\miniconda3\envs\avatarify\lib\site-packages\face_alignment\api.py", line 75, in init self.face_detector = face_detector_module.FaceDetector(device=device, verbose=verbose) File "E:\Py\miniconda3\envs\avatarify\lib\site-packages\face_alignment\detection\sfd\sfd_detector.py", line 24, in init model_weights = load_url(models_urls['s3fd']) File "E:\Py\miniconda3\envs\avatarify\lib\site-packages\torch\hub.py", line 555, in load_state_dict_from_url download_url_to_file(url, cached_file, hash_prefix, progress=progress) File "E:\Py\miniconda3\envs\avatarify\lib\site-packages\torch\hub.py", line 425, in download_url_to_file u = urlopen(req) File "E:\Py\miniconda3\envs\avatarify\lib\urllib\request.py", line 222, in urlopen return opener.open(url, data, timeout) File "E:\Py\miniconda3\envs\avatarify\lib\urllib\request.py", line 525, in open response = self._open(req, data) File "E:\Py\miniconda3\envs\avatarify\lib\urllib\request.py", line 543, in _open '_open', req) File "E:\Py\miniconda3\envs\avatarify\lib\urllib\request.py", line 503, in _call_chain result = func(*args) File "E:\Py\miniconda3\envs\avatarify\lib\urllib\request.py", line 1393, in https_open context=self._context, check_hostname=self._check_hostname) File "E:\Py\miniconda3\envs\avatarify\lib\urllib\request.py", line 1352, in do_open raise URLError(err) urllib.error.URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: certificate has expired (_ssl.c:1091)>

    I don't reaally know what does it mean and what x=can I do with it.

    opened by MM5002 1
  • change avatar

    change avatar

    how do i change avatar when using python version?

    and how do i fix this error

    warnings.warn("nn.functional.sigmoid is deprecated. Use torch.sigmoid instead.")

    opened by moaeddy 3
  • OMP: Error #15? Help?

    OMP: Error #15? Help?

    Hi, im trying to download avatarify on windows, but when i do the, run_windows.bat i get this error:

    OMP: Error #15: Initializing libiomp5md.dll, but found libiomp5md.dll already initialized. OMP: Hint This means that multiple copies of the OpenMP runtime have been linked into the program. That is dangerous, since it can degrade performance or cause incorrect results. The best thing to do is to ensure that only a single OpenMP runtime is linked into the process, e.g. by avoiding static linking of the OpenMP runtime in any library. As an unsafe, unsupported, undocumented workaround you can set the environment variable KMP_DUPLICATE_LIB_OK=TRUE to allow the program to continue to execute, but that may cause crashes or silently produce incorrect results. For more information, please see http://www.intel.com/software/products/support/.

    I tried doing the: import os os.environ["KMP_DUPLICATE_LIB_OK"]="TRUE"

    But then i got the error:

    'import' is not recognized as an internal or external command, operable program or batch file.

    and

    ["KMP_DUPLICATE_LIB_OK"]="TRUE" 'os.environ["KMP_DUPLICATE_LIB_OK"]' is not recognized as an internal or external command, operable program or batch file.

    Can anyone help me?

    opened by pepsidude1 6
Releases(v0.2.0)
Owner
Ali Aliev
Computer graphics
Ali Aliev
A python bot to move your mouse every few seconds to appear active on Skype, Teams or Zoom as you go AFK. 🐭 🤖

PyMouseBot If you're from GT and annoyed with SGVPN idle timeouts while working on development laptop, You might find this useful. A python cli bot to

Oaker Min 2 Mar 3, 2022
Unofficial pytorch implementation of paper "One-Shot Free-View Neural Talking-Head Synthesis for Video Conferencing"

One-Shot Free-View Neural Talking Head Synthesis Unofficial pytorch implementation of paper "One-Shot Free-View Neural Talking-Head Synthesis for Vide

ZLH 310 Jun 18, 2022
Generate pixel-style avatars with python.

face2pixel Generate pixel-style avatars with python. Run: Clone the project: git clone https://github.com/theodorecooper/face2pixel install requiremen

Theodore Cooper 2 May 11, 2022
[SIGGRAPH 2022 Journal Track] AvatarCLIP: Zero-Shot Text-Driven Generation and Animation of 3D Avatars

AvatarCLIP: Zero-Shot Text-Driven Generation and Animation of 3D Avatars Fangzhou Hong1*  Mingyuan Zhang1*  Liang Pan1  Zhongang Cai1,2,3  Lei Yang2 

Fangzhou Hong 437 Jun 16, 2022
SMPLpix: Neural Avatars from 3D Human Models

subject0_validation_poses.mp4 Left: SMPL-X human mesh registered with SMPLify-X, middle: SMPLpix render, right: ground truth video. SMPLpix: Neural Av

Sergey Prokudin 229 Jun 21, 2022
This application is the basic of automated online-class-joiner(for YıldızEdu) within the right time. Gets the ZOOM link by scheduled date and time.

This application is the basic of automated online-class-joiner(for YıldızEdu) within the right time. Gets the ZOOM link by scheduled date and time.

215355 1 Dec 16, 2021
Video-Captioning - A machine Learning project to generate captions for video frames indicating the relationship between the objects in the video

Video-Captioning - A machine Learning project to generate captions for video frames indicating the relationship between the objects in the video

null 1 Jan 23, 2022
Source code and data from the RecSys 2020 article "Carousel Personalization in Music Streaming Apps with Contextual Bandits" by W. Bendada, G. Salha and T. Bontempelli

Carousel Personalization in Music Streaming Apps with Contextual Bandits - RecSys 2020 This repository provides Python code and data to reproduce expe

Deezer 44 May 26, 2022
Colour detection is necessary to recognize objects, it is also used as a tool in various image editing and drawing apps.

Colour Detection On Image Colour detection is the process of detecting the name of any color. Simple isn’t it? Well, for humans this is an extremely e

Astitva Veer Garg 1 Jan 13, 2022
HMLLDB is a collection of LLDB commands to assist in the debugging of iOS apps.

HMLLDB is a collection of LLDB commands to assist in the debugging of iOS apps. 中文介绍 Features Non-intrusive. Your iOS project does not need to be modi

mao2020 44 Jun 16, 2022
Measuring Coding Challenge Competence With APPS

Measuring Coding Challenge Competence With APPS This is the repository for Measuring Coding Challenge Competence With APPS by Dan Hendrycks*, Steven B

Dan Hendrycks 183 Jun 18, 2022
Illuminated3D This project participates in the Nasa Space Apps Challenge 2021.

Illuminated3D This project participates in the Nasa Space Apps Challenge 2021.

Eleftheriadis Emmanouil 1 Oct 9, 2021
Create Data & AI apps in 20 lines of code with Shimoku

Install with: pip install shimoku-api-python Start with: from os import getenv import shimoku_api_python.client as Shimoku

Shimoku 4 May 22, 2022
A machine learning malware analysis framework for Android apps.

??️ A machine learning malware analysis framework for Android apps. ☢️ DroidDetective is a Python tool for analysing Android applications (APKs) for p

James Stevenson 60 Jun 16, 2022
Video-face-extractor - Video face extractor with Python

Python face extractor Setup Create the srcvideos and faces directories Put your

null 2 Feb 3, 2022
Search Youtube Video and Get Video info

PyYouTube Get Video Data from YouTube link Installation pip install PyYouTube How to use it ? Get Videos Data from pyyoutube import Data yt = Data("ht

lokaman chendekar 31 May 28, 2022
We present a framework for training multi-modal deep learning models on unlabelled video data by forcing the network to learn invariances to transformations applied to both the audio and video streams.

Multi-Modal Self-Supervision using GDT and StiCa This is an official pytorch implementation of papers: Multi-modal Self-Supervision from Generalized D

Facebook Research 37 May 19, 2022
Video lie detector using xgboost - A video lie detector using OpenFace and xgboost

video_lie_detector_using_xgboost a video lie detector using OpenFace and xgboost

null 2 Jan 11, 2022