Code Monkey home page Code Monkey logo

avatarify-python's Introduction

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.

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).

Avatarify apps

We have deployed Avatarify on iOS and Android devices using our proprietary inference engine. The iOS version features the Life mode for recording animations in real time. However, the Life mode is not available on Android devices due to the diversity of the devices we have to support.

drawing drawing

avatarify-python's People

Contributors

645775992 avatar alievk avatar bobvo23 avatar bsharper avatar bx70mk avatar christianll9 avatar dependabot[bot] avatar giorgiop avatar gkorepanov avatar iamphi avatar johanar avatar josharmour avatar karfly avatar martindelille avatar mikaelhg avatar mintmaker avatar msharp9 avatar mynameisfiber avatar oxnr avatar russorat avatar sagudev avatar victorp13 avatar yves147 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

avatarify-python's Issues

Not working on Mac OS 10.15

Hi,

All screens starting but without video substitution.

Python version is Python 3.7.6.

Please help with what logs do you need to help.

thanks

old gpu support ?

Hey, i'ù struggle with an old gpu...

Found GPU0 GeForce GTX 660 Ti which is of cuda capability 3.0. PyTorch no longer supports this GPU because it is too old. The minimum cuda capability that we support is 3.5.

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

Any tips for me ? I tried to understand how envs stuff working...

No module named 'sync_batchnorm' on Windows

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

System: Windows10

Error message while trying to install packages in Miniconda

" You will need to adjust your conda configuration to proceed.
Use conda config --show channels to view your configuration's current state,
and use conda config --show-sources to view config file locations."

I am getting the error message above when trying to install packages in Miniconda and I don't how solve it after viewing my configuration's current state, and viewing config file locations as per what it is asking. Can anyone help on what should I enter in order to be able to install packages that I haven't installed yet? I am stuck. please and thank you!

Python environment issue - MAC

I followed all the steps but got an environment issue. It seems the install is done not in the right environment. in My mac, the command should be 'source activate' instead of conda activate.

Not working on Mac

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

so when I run bash run_mac.sh, errors are l get the error prompt shown above

Unable to see "[python.exe]: avatarify" in Window drop-down menu in OBS Windows Capture dropdown

Hi there, thanks for creating this. I followed the instructions for Windows and completed step 5. I saw this message in the Anaconda Prompt:

Successfully installed chardet-3.0.4 idna-2.9 requests-2.23.0 urllib3-1.25.9

When I try to complete step 9. to step up the window capture in OBS I don't see the option for "[python.exe]: avatarify".

I've kept the Anaconda prompt window open and moved the .tar file into the root folder too. Is there anything else I'm missing?

Zoom v4.6.8 installer for Windows

Hi, I'm trying this on Windows but I can't find the installer file for v4.6.8 or older on Zoom official website. Could you please share a link with us? Thanks!

>run_windows.bat can not open two windows and there are some errors. How to set CAMID?

[ WARN:1] global C:\projects\opencv-python\opencv\modules\videoio\src\cap_msmf.cpp (1113) SourceReaderCB::OnReadSample videoio(MSMF): OnReadSample() is called with error status: -2147024809
[ WARN:1] global C:\projects\opencv-python\opencv\modules\videoio\src\cap_msmf.cpp (1125) SourceReaderCB::OnReadSample videoio(MSMF): async ReadSample() call is failed with error status: -2147024809
[ WARN:0] global C:\projects\opencv-python\opencv\modules\videoio\src\cap_msmf.cpp (1159) CvCapture_MSMF::grabFrame videoio(MSMF): can't grab frame. Error: -2147024809
Can't receive frame (stream end?). Exiting ...
[ WARN:0] global C:\projects\opencv-python\opencv\modules\videoio\src\cap_msmf.cpp (674) SourceReaderCB::~SourceReaderCB terminating async callback

OpenCV error on Mac OS

bash run_mac.sh hangs at:

[ERROR:0] global /Users/travis/build/skvark/opencv-python/opencv/modules/videoio/src/cap.cpp (193) open VIDEOIO(AVFOUNDATION): raised unknown C++ exception!


Cannot open camera

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

Can't install the 4.6.8 version in mac

I tried to install the 4.6.8 version but it showed the info over the install window that This package will run a program to determine if the software can be installed. Then I clicked Continue. But nothing happened then. However, I could successfully install the newest version.

Doesn't seem to use GPU

Installation was easy on Ubuntu 18.04, but I don't think my GPU is in use based on nvidia-smi. Is that even possible?

Add virtual soundcard adding the same delay as the avatarified video

The avatar video delay can desync a lot with the actual sound.
Adding a fake sound card adding exactly or approximately the same delay to the mic input, and picking this sound card mic in the Zoom/any other SW instead of the real non-delayed mic would re-sync the video and audio, making the result much more authentic.

Docker based setup

I don't know if it's even possible - there is the --device flag that allows a container to access devices like webcams: https://medium.com/@zwinny/docker-using-webcam-9fafb26cf1e6

But I'm not sure if it's possible for the host to access the virtual camera device if it's created inside a container.

But if possible, it would be cool to have this working as a Docker container, so you can just fire it up on a Linux based system without having to install anything into your host.

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'

vox-adv-cpk.pth.tar quota exceeded on Google Drive

It is not possible to download file with model's weights, because provided in scripts/download_data.sh url is returning html page that says "Sorry, you can't view or download this file at this time."

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) eltonnunes@eltonnunes-home:~/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

Mac cannot open camera with segmentation fault

I am running on Mac 10.12.6
anyone has encountered same issue? how did you solve it? During this run_mac.sh process, The camera flashed for 2 seconds and then camera light vanished

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: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)
2020-04-12 22:19:46.184 python[58744:3913169] alloc
2020-04-12 22:19:46.184 python[58744:3913169] query 2
2020-04-12 22:19:46.184 python[58744:3913169] release 2
2020-04-12 22:19:46.184 python[58744:3913169] ** MyPlugInitializeWithObjectID
2020-04-12 22:19:46.184 python[58744:3913169] init
2020-04-12 22:19:46.184 python[58744:3913169] MyPlugObjectSetPropertyData
2020-04-12 22:19:46.184 python[58744:3913169] MyPlugObjectSetPropertyData
2020-04-12 22:19:46.184 python[58744:3913169] MyPlugObjectSetPropertyData
2020-04-12 22:19:46.185 python[58744:3913169] Trying to get Surface
2020-04-12 22:19:46.185 python[58744:3913169] Found Surface
2020-04-12 22:19:46.185 python[58744:3913169] Surface is 0x140676016984336
2020-04-12 22:19:46.186 python[58744:3913169] Driver name is 8 CamTwist
2020-04-12 22:19:46.186 python[58744:3913169] <CMVideoFormatDescription 0x7ff1aee6a130 [0x7fffb3557da0]> {
mediaType:'vide'
mediaSubType:'BGRA'
mediaSpecific: {
codecType: 'BGRA' dimensions: 320 x 240
}
extensions: {<CFBasicHash 0x7ff1aeacab90 [0x7fffb3557da0]>{type = immutable dict, count = 4,
entries =>
1 : <CFString 0x7fffb376e458 [0x7fffb3557da0]>{contents = "CVFieldCount"} = <CFNumber 0x137 [0x7fffb3557da0]>{value = +1, type = kCFNumberSInt64Type}
2 : <CFString 0x14e2928a0 [0x7fffb3557da0]>{contents = "CVBytesPerRow"} = <CFNumber 0x50037 [0x7fffb3557da0]>{value = +1280, type = kCFNumberSInt64Type}
4 : <CFString 0x7fffb367fdc0 [0x7fffb3557da0]>{contents = "com.apple.cmio.format_extension.video.only_has_i_frames"} = <CFBoolean 0x7fffb3558738 [0x7fffb3557da0]>{value = true}
5 : <CFString 0x7fffb3671ad0 [0x7fffb3557da0]>{contents = "FormatName"} = <CFString 0x14e2928c0 [0x7fffb3557da0]>{contents = "Component Video - CCIR-601 RGB"}
}
}
}
2020-04-12 22:19:46.186 python[58744:3913169] Name CamTwist
2020-04-12 22:19:46.186 python[58744:3913169] alloc
2020-04-12 22:19:46.186 python[58744:3913169] query 2
2020-04-12 22:19:46.186 python[58744:3913169] release 2
2020-04-12 22:19:46.186 python[58744:3913169] ** MyPlugInitializeWithObjectID
2020-04-12 22:19:46.186 python[58744:3913169] init
2020-04-12 22:19:46.186 python[58744:3913169] MyPlugObjectSetPropertyData
2020-04-12 22:19:46.186 python[58744:3913169] MyPlugObjectSetPropertyData
2020-04-12 22:19:46.186 python[58744:3913169] MyPlugObjectSetPropertyData
2020-04-12 22:19:46.186 python[58744:3913169] <CMVideoFormatDescription 0x7ff1aeacbbf0 [0x7fffb3557da0]> {
mediaType:'vide'
mediaSubType:'2vuy'
mediaSpecific: {
codecType: '2vuy' dimensions: 320 x 240
}
extensions: {<CFBasicHash 0x7ff1aeacbc50 [0x7fffb3557da0]>{type = immutable dict, count = 6,
entries =>
0 : <CFString 0x7fffb376e5d8 [0x7fffb3557da0]>{contents = "CVImageBufferYCbCrMatrix"} = <CFString 0x7fffb376e618 [0x7fffb3557da0]>{contents = "ITU_R_601_4"}
1 : <CFString 0x7fffb376e458 [0x7fffb3557da0]>{contents = "CVFieldCount"} = <CFNumber 0x137 [0x7fffb3557da0]>{value = +1, type = kCFNumberSInt64Type}
2 : <CFString 0x7fffb376e738 [0x7fffb3557da0]>{contents = "CVImageBufferTransferFunction"} = <CFString 0x7fffb376e5f8 [0x7fffb3557da0]>{contents = "ITU_R_709_2"}
4 : <CFString 0x7fffb367fdc0 [0x7fffb3557da0]>{contents = "com.apple.cmio.format_extension.video.only_has_i_frames"} = <CFBoolean 0x7fffb3558738 [0x7fffb3557da0]>{value = true}
5 : <CFString 0x7fffb376e6b8 [0x7fffb3557da0]>{contents = "CVImageBufferColorPrimaries"} = <CFString 0x7fffb376e6f8 [0x7fffb3557da0]>{contents = "SMPTE_C"}
6 : <CFString 0x7fffb3671ad0 [0x7fffb3557da0]>{contents = "FormatName"} = <CFString 0x14e292920 [0x7fffb3557da0]>{contents = "Component Video - CCIR-601 uyvy"}
}
}
}
2020-04-12 22:19:46.186 python[58744:3913169] Name CamTwist (2VUY)
2020-04-12 22:19:46.187 python[58744:3913169] MyPlugObjectHasProperty
2020-04-12 22:19:46.187 python[58744:3913169] enog
2020-04-12 22:19:46.187 python[58744:3913169] bolg
2020-04-12 22:19:46.187 python[58744:3913169] 0
2020-04-12 22:19:46.187 python[58744:3913169] MyPlugObjectSetPropertyData
2020-04-12 22:19:46.187 python[58744:3913169] MyPlugObjectSetPropertyData
2020-04-12 22:19:46.187 python[58744:3913169] MyPlugObjectSetPropertyData
2020-04-12 22:19:46.187 python[58744:3913169] MyPlugObjectSetPropertyData
2020-04-12 22:19:46.187 python[58744:3913169] MyPlugObjectSetPropertyData
2020-04-12 22:19:46.187 python[58744:3913169] MyPlugObjectGetPropertyDataSize
2020-04-12 22:19:46.187 python[58744:3913169] sel dnwo
2020-04-12 22:19:46.187 python[58744:3913169] scope bolg
2020-04-12 22:19:46.187 python[58744:3913169] elt 0
2020-04-12 22:19:46.187 python[58744:3913169] MyPlugObjectGetPropertyDataSize
2020-04-12 22:19:46.187 python[58744:3913169] sel dnwo
2020-04-12 22:19:46.187 python[58744:3913169] scope bolg
2020-04-12 22:19:46.187 python[58744:3913169] elt 0
2020-04-12 22:19:46.187 python[58744:3913169] MyPlugObjectGetPropertyDataSize
2020-04-12 22:19:46.187 python[58744:3913169] sel dnwo
2020-04-12 22:19:46.187 python[58744:3913169] scope bolg
2020-04-12 22:19:46.187 python[58744:3913169] elt 0
2020-04-12 22:19:46.187 python[58744:3913169] MyPlugObjectGetPropertyDataSize
2020-04-12 22:19:46.187 python[58744:3913169] sel dnwo
2020-04-12 22:19:46.187 python[58744:3913169] scope bolg
2020-04-12 22:19:46.187 python[58744:3913169] elt 0
2020-04-12 22:19:46.187 python[58744:3913169] MyPlugObjectGetPropertyDataSize
2020-04-12 22:19:46.187 python[58744:3913169] sel dnwo
2020-04-12 22:19:46.187 python[58744:3913169] scope bolg
2020-04-12 22:19:46.187 python[58744:3913169] elt 0
2020-04-12 22:19:46.187 python[58744:3913169] MyPlugObjectGetPropertyDataSize
2020-04-12 22:19:46.188 python[58744:3913169] sel dnwo
2020-04-12 22:19:46.188 python[58744:3913169] scope bolg
2020-04-12 22:19:46.188 python[58744:3913169] elt 0
2020-04-12 22:19:46.188 python[58744:3913169] MyPlugObjectSetPropertyData
2020-04-12 22:19:46.188 python[58744:3913169] MyPlugObjectHasProperty
2020-04-12 22:19:46.188 python[58744:3913169] grrf
2020-04-12 22:19:46.188 python[58744:3913169] bolg
2020-04-12 22:19:46.188 python[58744:3913169] 0
2020-04-12 22:19:46.188 python[58744:3913169] MyPlugObjectHasProperty
2020-04-12 22:19:46.188 python[58744:3913169] grrf
2020-04-12 22:19:46.188 python[58744:3913169] bolg
2020-04-12 22:19:46.188 python[58744:3913169] 0
2020-04-12 22:19:46.188 python[58744:3913169] MyPlugObjectHasProperty
2020-04-12 22:19:46.188 python[58744:3913169] trfn
2020-04-12 22:19:46.188 python[58744:3913169] bolg
2020-04-12 22:19:46.188 python[58744:3913169] 0
2020-04-12 22:19:46.188 python[58744:3913169] MyPlugObjectHasProperty
2020-04-12 22:19:46.188 python[58744:3913169] trfm
2020-04-12 22:19:46.188 python[58744:3913169] bolg
2020-04-12 22:19:46.188 python[58744:3913169] 0
2020-04-12 22:19:46.188 python[58744:3913169] MyPlugObjectHasProperty
2020-04-12 22:19:46.188 python[58744:3913169] trfn
2020-04-12 22:19:46.188 python[58744:3913169] bolg
2020-04-12 22:19:46.188 python[58744:3913169] 0
2020-04-12 22:19:46.188 python[58744:3913169] DN: CamTwist
2020-04-12 22:19:46.188 python[58744:3913169] MyPlugObjectHasProperty
2020-04-12 22:19:46.188 python[58744:3913169] dulp
2020-04-12 22:19:46.188 python[58744:3913169] tpni
2020-04-12 22:19:46.188 python[58744:3913169] 0
2020-04-12 22:19:46.188 python[58744:3913169] MyPlugObjectGetPropertyDataSize
2020-04-12 22:19:46.188 python[58744:3913169] sel dnwo
2020-04-12 22:19:46.188 python[58744:3913169] scope bolg
2020-04-12 22:19:46.188 python[58744:3913169] elt 0
2020-04-12 22:19:46.188 python[58744:3913169] MyPlugObjectHasProperty
2020-04-12 22:19:46.188 python[58744:3913169] enog
2020-04-12 22:19:46.188 python[58744:3913169] bolg
2020-04-12 22:19:46.188 python[58744:3913169] 0
2020-04-12 22:19:46.189 python[58744:3913169] MyPlugObjectSetPropertyData
2020-04-12 22:19:46.189 python[58744:3913169] MyPlugObjectSetPropertyData
2020-04-12 22:19:46.189 python[58744:3913169] MyPlugObjectSetPropertyData
2020-04-12 22:19:46.189 python[58744:3913169] MyPlugObjectSetPropertyData
2020-04-12 22:19:46.189 python[58744:3913169] MyPlugObjectSetPropertyData
2020-04-12 22:19:46.189 python[58744:3913169] MyPlugObjectGetPropertyDataSize
2020-04-12 22:19:46.189 python[58744:3913169] sel dnwo
2020-04-12 22:19:46.189 python[58744:3913169] scope bolg
2020-04-12 22:19:46.189 python[58744:3913169] elt 0
2020-04-12 22:19:46.189 python[58744:3913169] MyPlugObjectGetPropertyDataSize
2020-04-12 22:19:46.189 python[58744:3913169] sel dnwo
2020-04-12 22:19:46.189 python[58744:3913169] scope bolg
2020-04-12 22:19:46.189 python[58744:3913169] elt 0
2020-04-12 22:19:46.189 python[58744:3913169] MyPlugObjectGetPropertyDataSize
2020-04-12 22:19:46.189 python[58744:3913169] sel dnwo
2020-04-12 22:19:46.189 python[58744:3913169] scope bolg
2020-04-12 22:19:46.189 python[58744:3913169] elt 0
2020-04-12 22:19:46.189 python[58744:3913169] MyPlugObjectGetPropertyDataSize
2020-04-12 22:19:46.189 python[58744:3913169] sel dnwo
2020-04-12 22:19:46.189 python[58744:3913169] scope bolg
2020-04-12 22:19:46.189 python[58744:3913169] elt 0
2020-04-12 22:19:46.189 python[58744:3913169] MyPlugObjectGetPropertyDataSize
2020-04-12 22:19:46.189 python[58744:3913169] sel dnwo
2020-04-12 22:19:46.189 python[58744:3913169] scope bolg
2020-04-12 22:19:46.189 python[58744:3913169] elt 0
2020-04-12 22:19:46.189 python[58744:3913169] MyPlugObjectGetPropertyDataSize
2020-04-12 22:19:46.189 python[58744:3913169] sel dnwo
2020-04-12 22:19:46.189 python[58744:3913169] scope bolg
2020-04-12 22:19:46.189 python[58744:3913169] elt 0
2020-04-12 22:19:46.189 python[58744:3913169] MyPlugObjectSetPropertyData
2020-04-12 22:19:46.189 python[58744:3913169] MyPlugObjectHasProperty
2020-04-12 22:19:46.189 python[58744:3913169] grrf
2020-04-12 22:19:46.189 python[58744:3913169] bolg
2020-04-12 22:19:46.189 python[58744:3913169] 0
2020-04-12 22:19:46.189 python[58744:3913169] MyPlugObjectHasProperty
2020-04-12 22:19:46.189 python[58744:3913169] grrf
2020-04-12 22:19:46.189 python[58744:3913169] bolg
2020-04-12 22:19:46.189 python[58744:3913169] 0
2020-04-12 22:19:46.189 python[58744:3913169] MyPlugObjectHasProperty
2020-04-12 22:19:46.189 python[58744:3913169] trfn
2020-04-12 22:19:46.189 python[58744:3913169] bolg
2020-04-12 22:19:46.189 python[58744:3913169] 0
2020-04-12 22:19:46.189 python[58744:3913169] MyPlugObjectHasProperty
2020-04-12 22:19:46.189 python[58744:3913169] trfm
2020-04-12 22:19:46.190 python[58744:3913169] bolg
2020-04-12 22:19:46.190 python[58744:3913169] 0
2020-04-12 22:19:46.190 python[58744:3913169] MyPlugObjectHasProperty
2020-04-12 22:19:46.190 python[58744:3913169] trfn
2020-04-12 22:19:46.190 python[58744:3913169] bolg
2020-04-12 22:19:46.190 python[58744:3913169] 0
2020-04-12 22:19:46.190 python[58744:3913169] DN: CamTwist (2VUY)
2020-04-12 22:19:46.190 python[58744:3913169] MyPlugObjectHasProperty
2020-04-12 22:19:46.190 python[58744:3913169] dulp
2020-04-12 22:19:46.190 python[58744:3913169] tpni
2020-04-12 22:19:46.190 python[58744:3913169] 0
2020-04-12 22:19:46.190 python[58744:3913169] MyPlugObjectGetPropertyDataSize
2020-04-12 22:19:46.190 python[58744:3913169] sel dnwo
2020-04-12 22:19:46.190 python[58744:3913169] scope bolg
2020-04-12 22:19:46.190 python[58744:3913169] elt 0
run_mac.sh: line 10: 58744 Segmentation fault: 11 python cam_fomm.py --config $CONFIG --checkpoint $CKPT --cam $CAMID --relative --adapt_scale --no-pad

Join Slack!

We’ve created Slack for Avatarify community! Please join:

There you can ask any questions to get quick answers, discuss ideas of new features, share works you created using Avatarify and more.

Failed loading checkloints

Creating virtual camera (this may require sudo password once after reboot)
Could not find conda environment: avatarify
You can list all discoverable environments with conda info —envs.

Running Avatarify (may take some while for the first time)...
ffmpeg version 3.4.6-0ubuntu0.18.04.1 Copyright (c) 2000-2019 the FFmpeg developers
built with gcc 7 (Ubuntu 7.3.0-16ubuntu3)
configuration: —prefix=/usr —extra-version=0ubuntu0.18.04.1 —toolchain=hardened —libdir=/usr/lib/x86_64-linux-gnu —incdir=/usr/include/x86_64-linux-gnu —enable-gpl —disable-stripping —enable-avresample —enable-avisynth —enable-gnutls —enable-ladspa —enable-libass —enable-libbluray —enable-libbs2b —enable-libcaca —enable-libcdio —enable-libflite —enable-libfontconfig —enable-libfreetype —enable-libfribidi —enable-libgme —enable-libgsm —enable-libmp3lame —enable-libmysofa —enable-libopenjpeg —enable-libopenmpt —enable-libopus —enable-libpulse —enable-librubberband —enable-librsvg —enable-libshine —enable-libsnappy —enable-libsoxr —enable-libspeex —enable-libssh —enable-libtheora —enable-libtwolame —enable-libvorbis —enable-libvpx —enable-libwavpack —enable-libwebp —enable-libx265 —enable-libxml2 —enable-libxvid —enable-libzmq —enable-libzvbi —enable-omx —enable-openal —enable-opengl —enable-sdl2 —enable-libdc1394 —enable-libdrm —enable-libiec61883 —enable-chromaprint —enable-frei0r —enable-libopencv —enable-libx264 —enable-shared
libavutil 55. 78.100 / 55. 78.100
libavcodec 57.107.100 / 57.107.100
libavformat 57. 83.100 / 57. 83.100
libavdevice 57. 10.100 / 57. 10.100
libavfilter 6.107.100 / 6.107.100
libavresample 3. 7. 0 / 3. 7. 0
libswscale 4. 8.100 / 4. 8.100
libswresample 2. 9.100 / 2. 9.100
libpostproc 54. 7.100 / 54. 7.100
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: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)
Traceback (most recent call last):
File "cam_fomm.py", line 189, in
generator, kp_detector = load_checkpoints(config_path=opt.config, checkpoint_path=opt.checkpoint, device=device)
File "cam_fomm.py", line 36, in load_checkpoints
checkpoint = torch.load(checkpoint_path, map_location=device)
File "/home/iamtheuser/anaconda3/lib/python3.7/site-packages/torch/serialization.py", line 526, in load
if _is_zipfile(opened_file):
File "/home/iamtheuser/anaconda3/lib/python3.7/site-packages/torch/serialization.py", line 76, in _is_zipfile
if ord(magic_byte) != ord(read_byte):
TypeError: ord() expected a character, but string of length 0 found

Install error: Could not open requirements file / Run error: no module yaml

`> (base) C:\Users\R2>cd avatarify-master

(base) C:\Users\R2\avatarify-master>scripts\install_windows.bat

(base) C:\Users\R2\avatarify-master>call scripts/settings_windows.bat

(base) C:\Users\R2\avatarify-master>REM Web-camera device id

(base) C:\Users\R2\avatarify-master>set CAMID=0

(base) C:\Users\R2\avatarify-master>REM ################################################

(base) C:\Users\R2\avatarify-master>REM Normally you don't want to change settings below

(base) C:\Users\R2\avatarify-master>REM Conda environment name

(base) C:\Users\R2\avatarify-master>set CONDA_ENV_NAME=avatarify

(base) C:\Users\R2\avatarify-master>call conda create -y -n avatarify python=3.8
Collecting package metadata (current_repodata.json): done
Solving environment: done

Package Plan

environment location: C:\Users\R2\MiniConda3\envs\avatarify

added / updated specs:
- python=3.8

The following NEW packages will be INSTALLED:

ca-certificates pkgs/main/win-64::ca-certificates-2020.1.1-0
certifi pkgs/main/win-64::certifi-2020.4.5.1-py38_0
openssl pkgs/main/win-64::openssl-1.1.1f-he774522_0
pip pkgs/main/win-64::pip-20.0.2-py38_1
python pkgs/main/win-64::python-3.8.2-h5fd99cc_11
setuptools pkgs/main/win-64::setuptools-46.1.3-py38_0
sqlite pkgs/main/win-64::sqlite-3.31.1-he774522_0
vc pkgs/main/win-64::vc-14.1-h0510ff6_4
vs2015_runtime pkgs/main/win-64::vs2015_runtime-14.16.27012-hf0eaf9b_1
wheel pkgs/main/win-64::wheel-0.34.2-py38_0
wincertstore pkgs/main/win-64::wincertstore-0.2-py38_0

Preparing transaction: done
Verifying transaction: done
Executing transaction: done

To activate this environment, use

 $ conda activate avatarify

To deactivate an active environment, use

 $ conda deactivate

(base) C:\Users\R2\avatarify-master>call conda activate avatarify

(avatarify) C:\Users\R2\avatarify-master>call conda install -y pytorch torchvision cudatoolkit=10.1 -c pytorch
Collecting package metadata (current_repodata.json): done
Solving environment: done

Package Plan

environment location: C:\Users\R2\MiniConda3\envs\avatarify

added / updated specs:
- cudatoolkit=10.1
- pytorch
- torchvision

The following NEW packages will be INSTALLED:

blas pkgs/main/win-64::blas-1.0-mkl
cudatoolkit pkgs/main/win-64::cudatoolkit-10.1.243-h74a9793_0
freetype pkgs/main/win-64::freetype-2.9.1-ha9979f8_1
icc_rt pkgs/main/win-64::icc_rt-2019.0.0-h0cc432a_1
intel-openmp pkgs/main/win-64::intel-openmp-2020.0-166
jpeg pkgs/main/win-64::jpeg-9b-hb83a4c4_2
libpng pkgs/main/win-64::libpng-1.6.37-h2a8f88b_0
libtiff pkgs/main/win-64::libtiff-4.1.0-h56a325e_0
mkl pkgs/main/win-64::mkl-2020.0-166
mkl-service pkgs/main/win-64::mkl-service-2.3.0-py38hb782905_0
mkl_fft pkgs/main/win-64::mkl_fft-1.0.15-py38h14836fe_0
mkl_random pkgs/main/win-64::mkl_random-1.1.0-py38hf9181ef_0
ninja pkgs/main/win-64::ninja-1.9.0-py38h74a9793_0
numpy pkgs/main/win-64::numpy-1.18.1-py38h93ca92e_0
numpy-base pkgs/main/win-64::numpy-base-1.18.1-py38hc3f5095_1
olefile pkgs/main/noarch::olefile-0.46-py_0
pillow pkgs/main/win-64::pillow-7.0.0-py38hcc1f983_0
pytorch pytorch/win-64::pytorch-1.4.0-py3.8_cuda101_cudnn7_0
six pkgs/main/win-64::six-1.14.0-py38_0
tk pkgs/main/win-64::tk-8.6.8-hfa6e2cd_0
torchvision pytorch/win-64::torchvision-0.5.0-py38_cu101
xz pkgs/main/win-64::xz-5.2.4-h2fa13f4_4
zlib pkgs/main/win-64::zlib-1.2.11-h62dcd97_3
zstd pkgs/main/win-64::zstd-1.3.7-h508b16e_0

Preparing transaction: done
Verifying transaction: done
Executing transaction: done

(avatarify) C:\Users\R2\avatarify-master>call conda install -y -c 1adrianb face_alignment
Collecting package metadata (current_repodata.json): done
Solving environment: done

Package Plan

environment location: C:\Users\R2\MiniConda3\envs\avatarify

added / updated specs:
- face_alignment

The following NEW packages will be INSTALLED:

cloudpickle pkgs/main/noarch::cloudpickle-1.3.0-py_0
cycler pkgs/main/win-64::cycler-0.10.0-py38_0
cytoolz pkgs/main/win-64::cytoolz-0.10.1-py38he774522_0
dask-core pkgs/main/noarch::dask-core-2.14.0-py_0
decorator pkgs/main/noarch::decorator-4.4.2-py_0
face_alignment 1adrianb/noarch::face_alignment-1.0.1-py_1
hdf5 pkgs/main/win-64::hdf5-1.10.4-h7ebc959_0
icu pkgs/main/win-64::icu-58.2-ha66f8fd_1
imageio pkgs/main/noarch::imageio-2.8.0-py_0
kiwisolver pkgs/main/win-64::kiwisolver-1.0.1-py38ha925a31_0
libopencv pkgs/main/win-64::libopencv-4.0.1-hbb9e17c_0
matplotlib pkgs/main/win-64::matplotlib-3.1.3-py38_0
matplotlib-base pkgs/main/win-64::matplotlib-base-3.1.3-py38h64f37c6_0
networkx pkgs/main/noarch::networkx-2.4-py_0
opencv pkgs/main/win-64::opencv-4.0.1-py38h2a7c758_0
py-opencv pkgs/main/win-64::py-opencv-4.0.1-py38he44ac1e_0
pyparsing pkgs/main/noarch::pyparsing-2.4.6-py_0
pyqt pkgs/main/win-64::pyqt-5.9.2-py38ha925a31_4
python-dateutil pkgs/main/noarch::python-dateutil-2.8.1-py_0
pywavelets pkgs/main/win-64::pywavelets-1.1.1-py38he774522_0
qt pkgs/main/win-64::qt-5.9.7-vc14h73c81de_0
scikit-image pkgs/main/win-64::scikit-image-0.16.2-py38h47e9c7a_0
scipy pkgs/main/win-64::scipy-1.4.1-py38h9439919_0
sip pkgs/main/win-64::sip-4.19.13-py38ha925a31_0
toolz pkgs/main/noarch::toolz-0.10.0-py_0
tornado pkgs/main/win-64::tornado-6.0.4-py38he774522_1
tqdm pkgs/main/noarch::tqdm-4.44.1-py_0

Preparing transaction: done
Verifying transaction: done
Executing transaction: done

(avatarify) C:\Users\R2\avatarify-master>REM ###FOMM###

(avatarify) C:\Users\R2\avatarify-master>call git clone https://github.com/alievk/first-order-model.git fomm
'git' is not recognized as an internal or external command,
operable program or batch file.

**> (avatarify) C:\Users\R2\avatarify-master>call pip install -r fomm/requirements.txt

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

(avatarify) C:\Users\R2\avatarify-master>call pip install requests
Collecting requests
Using cached requests-2.23.0-py2.py3-none-any.whl (58 kB)
Requirement already satisfied: certifi>=2017.4.17 in c:\users\r2\miniconda3\envs\avatarify\lib\site-packages (from requests) (2020.4.5.1)
Collecting idna<3,>=2.5
Using cached idna-2.9-py2.py3-none-any.whl (58 kB)
Collecting urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1
Using cached urllib3-1.25.8-py2.py3-none-any.whl (125 kB)
Collecting chardet<4,>=3.0.2
Using cached chardet-3.0.4-py2.py3-none-any.whl (133 kB)
Installing collected packages: idna, urllib3, chardet, requests
Successfully installed chardet-3.0.4 idna-2.9 requests-2.23.0 urllib3-1.25.8

(avatarify) C:\Users\R2\avatarify-master>run_windows.bat

(avatarify) C:\Users\R2\avatarify-master>REM Web-camera device id

(avatarify) C:\Users\R2\avatarify-master>set CAMID=0

(avatarify) C:\Users\R2\avatarify-master>REM ################################################

(avatarify) C:\Users\R2\avatarify-master>REM Normally you don't want to change settings below

(avatarify) C:\Users\R2\avatarify-master>REM Conda environment name

(avatarify) C:\Users\R2\avatarify-master>set CONDA_ENV_NAME=avatarify

(avatarify) C:\Users\R2\avatarify-master>REM @set /P CAMID="Pick the webcam id you want to use (typically "0"): "
Traceback (most recent call last):
File "cam_fomm.py", line 3, in
import yaml
ModuleNotFoundError: No module named 'yaml'`

I get this output when I run the script

Error: BadDrawable (invalid Pixmap or Window parameter) 9
Major opcode: 62 (X_CopyArea)
Resource id: 0x5a00013
X Error: BadDrawable (invalid Pixmap or Window parameter) 9
Major opcode: 62 (X_CopyArea)
Resource id: 0x5a00011

Cannot open camera on MacOS: Catalina

% bash run_mac.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: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)
2020-04-09 10:43:02.118 python[97843:9986825] alloc
2020-04-09 10:43:02.118 python[97843:9986825] query 2
2020-04-09 10:43:02.118 python[97843:9986825] release 2
2020-04-09 10:43:02.118 python[97843:9986825] ** MyPlugInitializeWithObjectID
2020-04-09 10:43:02.118 python[97843:9986825] init
2020-04-09 10:43:02.118 python[97843:9986825] MyPlugObjectSetPropertyData
2020-04-09 10:43:02.119 python[97843:9986825] MyPlugObjectSetPropertyData
2020-04-09 10:43:02.119 python[97843:9986825] MyPlugObjectSetPropertyData
2020-04-09 10:43:02.119 python[97843:9986825] Trying to get Surface
2020-04-09 10:43:02.132 python[97843:9986825] Found Surface
2020-04-09 10:43:02.132 python[97843:9986825] Surface is 0x140539265782080
2020-04-09 10:43:02.132 python[97843:9986825] Driver name is 8 CamTwist
2020-04-09 10:43:02.133 python[97843:9986825] <CMVideoFormatDescription 0x7fd1d9111120 [0x7fff87bf9690]> {
	mediaType:'vide'
	mediaSubType:'BGRA'
	mediaSpecific: {
		codecType: 'BGRA'		dimensions: 320 x 240
	}
	extensions: {{
    CVBytesPerRow = 1280;
    CVFieldCount = 1;
    FormatName = "Component Video - CCIR-601 RGB";
    "com.apple.cmio.format_extension.video.only_has_i_frames" = 1;
}}
}
2020-04-09 10:43:02.133 python[97843:9986825] Name CamTwist
2020-04-09 10:43:02.133 python[97843:9986825] alloc
2020-04-09 10:43:02.133 python[97843:9986825] query 2
2020-04-09 10:43:02.133 python[97843:9986825] release 2
2020-04-09 10:43:02.133 python[97843:9986825] ** MyPlugInitializeWithObjectID
2020-04-09 10:43:02.133 python[97843:9986825] init
2020-04-09 10:43:02.133 python[97843:9986825] MyPlugObjectSetPropertyData
2020-04-09 10:43:02.133 python[97843:9986825] MyPlugObjectSetPropertyData
2020-04-09 10:43:02.133 python[97843:9986825] MyPlugObjectSetPropertyData
2020-04-09 10:43:02.133 python[97843:9986825] <CMVideoFormatDescription 0x7fd1d8761230 [0x7fff87bf9690]> {
	mediaType:'vide'
	mediaSubType:'2vuy'
	mediaSpecific: {
		codecType: '2vuy'		dimensions: 320 x 240
	}
	extensions: {{
    CVFieldCount = 1;
    CVImageBufferColorPrimaries = "SMPTE_C";
    CVImageBufferTransferFunction = "ITU_R_709_2";
    CVImageBufferYCbCrMatrix = "ITU_R_601_4";
    FormatName = "Component Video - CCIR-601 uyvy";
    "com.apple.cmio.format_extension.video.only_has_i_frames" = 1;
}}
}
2020-04-09 10:43:02.133 python[97843:9986825] Name CamTwist (2VUY)
2020-04-09 10:43:02.137 python[97843:9986825] MyPlugObjectHasProperty
2020-04-09 10:43:02.137 python[97843:9986825] enog
2020-04-09 10:43:02.137 python[97843:9986825] bolg
2020-04-09 10:43:02.137 python[97843:9986825] 0
2020-04-09 10:43:02.137 python[97843:9986825] MyPlugObjectSetPropertyData
2020-04-09 10:43:02.137 python[97843:9986825] MyPlugObjectSetPropertyData
2020-04-09 10:43:02.137 python[97843:9986825] MyPlugObjectSetPropertyData
2020-04-09 10:43:02.137 python[97843:9986825] MyPlugObjectSetPropertyData
2020-04-09 10:43:02.137 python[97843:9986825] MyPlugObjectSetPropertyData
2020-04-09 10:43:02.137 python[97843:9986825] MyPlugObjectGetPropertyDataSize
2020-04-09 10:43:02.137 python[97843:9986825] sel dnwo
2020-04-09 10:43:02.137 python[97843:9986825] scope bolg
2020-04-09 10:43:02.137 python[97843:9986825] elt 0
2020-04-09 10:43:02.138 python[97843:9986825] MyPlugObjectGetPropertyDataSize
2020-04-09 10:43:02.138 python[97843:9986825] sel dnwo
2020-04-09 10:43:02.138 python[97843:9986825] scope bolg
2020-04-09 10:43:02.138 python[97843:9986825] elt 0
2020-04-09 10:43:02.138 python[97843:9986825] MyPlugObjectGetPropertyDataSize
2020-04-09 10:43:02.138 python[97843:9986825] sel dnwo
2020-04-09 10:43:02.138 python[97843:9986825] scope bolg
2020-04-09 10:43:02.138 python[97843:9986825] elt 0
2020-04-09 10:43:02.138 python[97843:9986825] MyPlugObjectGetPropertyDataSize
2020-04-09 10:43:02.138 python[97843:9986825] sel dnwo
2020-04-09 10:43:02.138 python[97843:9986825] scope bolg
2020-04-09 10:43:02.138 python[97843:9986825] elt 0
2020-04-09 10:43:02.138 python[97843:9986825] MyPlugObjectGetPropertyDataSize
2020-04-09 10:43:02.138 python[97843:9986825] sel dnwo
2020-04-09 10:43:02.138 python[97843:9986825] scope bolg
2020-04-09 10:43:02.138 python[97843:9986825] elt 0
2020-04-09 10:43:02.138 python[97843:9986825] MyPlugObjectGetPropertyDataSize
2020-04-09 10:43:02.139 python[97843:9986825] sel dnwo
2020-04-09 10:43:02.139 python[97843:9986825] scope bolg
2020-04-09 10:43:02.139 python[97843:9986825] elt 0
2020-04-09 10:43:02.139 python[97843:9986825] MyPlugObjectSetPropertyData
2020-04-09 10:43:02.139 python[97843:9986825] MyPlugObjectGetPropertyDataSize
2020-04-09 10:43:02.139 python[97843:9986825] sel dnwo
2020-04-09 10:43:02.139 python[97843:9986825] scope bolg
2020-04-09 10:43:02.139 python[97843:9986825] elt 0
2020-04-09 10:43:02.139 python[97843:9986825] MyPlugObjectHasProperty
2020-04-09 10:43:02.139 python[97843:9986825] grrf
2020-04-09 10:43:02.139 python[97843:9986825] bolg
2020-04-09 10:43:02.139 python[97843:9986825] 0
2020-04-09 10:43:02.139 python[97843:9986825] MyPlugObjectGetPropertyDataSize
2020-04-09 10:43:02.139 python[97843:9986825] sel dnwo
2020-04-09 10:43:02.139 python[97843:9986825] scope bolg
2020-04-09 10:43:02.139 python[97843:9986825] elt 0
2020-04-09 10:43:02.139 python[97843:9986825] MyPlugObjectHasProperty
2020-04-09 10:43:02.139 python[97843:9986825] grrf
2020-04-09 10:43:02.139 python[97843:9986825] bolg
2020-04-09 10:43:02.139 python[97843:9986825] 0
2020-04-09 10:43:02.139 python[97843:9986825] MyPlugObjectHasProperty
2020-04-09 10:43:02.140 python[97843:9986825] trfn
2020-04-09 10:43:02.140 python[97843:9986825] bolg
2020-04-09 10:43:02.140 python[97843:9986825] 0
2020-04-09 10:43:02.140 python[97843:9986825] MyPlugObjectHasProperty
2020-04-09 10:43:02.140 python[97843:9986825] trfm
2020-04-09 10:43:02.140 python[97843:9986825] bolg
2020-04-09 10:43:02.140 python[97843:9986825] 0
2020-04-09 10:43:02.140 python[97843:9986825] MyPlugObjectHasProperty
2020-04-09 10:43:02.140 python[97843:9986825] trfn
2020-04-09 10:43:02.140 python[97843:9986825] bolg
2020-04-09 10:43:02.140 python[97843:9986825] 0
2020-04-09 10:43:02.140 python[97843:9986825] DN: CamTwist
2020-04-09 10:43:02.140 python[97843:9986825] MyPlugObjectHasProperty
2020-04-09 10:43:02.140 python[97843:9986825] dulp
2020-04-09 10:43:02.140 python[97843:9986825] tpni
2020-04-09 10:43:02.140 python[97843:9986825] 0
2020-04-09 10:43:02.140 python[97843:9986825] MyPlugObjectGetPropertyDataSize
2020-04-09 10:43:02.140 python[97843:9986825] sel dnwo
2020-04-09 10:43:02.140 python[97843:9986825] scope bolg
2020-04-09 10:43:02.140 python[97843:9986825] elt 0
2020-04-09 10:43:02.140 python[97843:9986825] MyPlugObjectHasProperty
2020-04-09 10:43:02.140 python[97843:9986825] enog
2020-04-09 10:43:02.140 python[97843:9986825] bolg
2020-04-09 10:43:02.140 python[97843:9986825] 0
2020-04-09 10:43:02.140 python[97843:9986825] MyPlugObjectSetPropertyData
2020-04-09 10:43:02.140 python[97843:9986825] MyPlugObjectSetPropertyData
2020-04-09 10:43:02.140 python[97843:9986825] MyPlugObjectSetPropertyData
2020-04-09 10:43:02.140 python[97843:9986825] MyPlugObjectSetPropertyData
2020-04-09 10:43:02.140 python[97843:9986825] MyPlugObjectSetPropertyData
2020-04-09 10:43:02.140 python[97843:9986825] MyPlugObjectGetPropertyDataSize
2020-04-09 10:43:02.140 python[97843:9986825] sel dnwo
2020-04-09 10:43:02.140 python[97843:9986825] scope bolg
2020-04-09 10:43:02.140 python[97843:9986825] elt 0
2020-04-09 10:43:02.140 python[97843:9986825] MyPlugObjectGetPropertyDataSize
2020-04-09 10:43:02.141 python[97843:9986825] sel dnwo
2020-04-09 10:43:02.141 python[97843:9986825] scope bolg
2020-04-09 10:43:02.141 python[97843:9986825] elt 0
2020-04-09 10:43:02.141 python[97843:9986825] MyPlugObjectGetPropertyDataSize
2020-04-09 10:43:02.141 python[97843:9986825] sel dnwo
2020-04-09 10:43:02.141 python[97843:9986825] scope bolg
2020-04-09 10:43:02.141 python[97843:9986825] elt 0
2020-04-09 10:43:02.141 python[97843:9986825] MyPlugObjectGetPropertyDataSize
2020-04-09 10:43:02.141 python[97843:9986825] sel dnwo
2020-04-09 10:43:02.141 python[97843:9986825] scope bolg
2020-04-09 10:43:02.141 python[97843:9986825] elt 0
2020-04-09 10:43:02.141 python[97843:9986825] MyPlugObjectGetPropertyDataSize
2020-04-09 10:43:02.141 python[97843:9986825] sel dnwo
2020-04-09 10:43:02.141 python[97843:9986825] scope bolg
2020-04-09 10:43:02.141 python[97843:9986825] elt 0
2020-04-09 10:43:02.141 python[97843:9986825] MyPlugObjectGetPropertyDataSize
2020-04-09 10:43:02.141 python[97843:9986825] sel dnwo
2020-04-09 10:43:02.141 python[97843:9986825] scope bolg
2020-04-09 10:43:02.141 python[97843:9986825] elt 0
2020-04-09 10:43:02.141 python[97843:9986825] MyPlugObjectSetPropertyData
2020-04-09 10:43:02.141 python[97843:9986825] MyPlugObjectGetPropertyDataSize
2020-04-09 10:43:02.141 python[97843:9986825] sel dnwo
2020-04-09 10:43:02.141 python[97843:9986825] scope bolg
2020-04-09 10:43:02.141 python[97843:9986825] elt 0
2020-04-09 10:43:02.142 python[97843:9986825] MyPlugObjectHasProperty
2020-04-09 10:43:02.142 python[97843:9986825] grrf
2020-04-09 10:43:02.142 python[97843:9986825] bolg
2020-04-09 10:43:02.142 python[97843:9986825] 0
2020-04-09 10:43:02.142 python[97843:9986825] MyPlugObjectGetPropertyDataSize
2020-04-09 10:43:02.142 python[97843:9986825] sel dnwo
2020-04-09 10:43:02.142 python[97843:9986825] scope bolg
2020-04-09 10:43:02.142 python[97843:9986825] elt 0
2020-04-09 10:43:02.142 python[97843:9986825] MyPlugObjectHasProperty
2020-04-09 10:43:02.142 python[97843:9986825] grrf
2020-04-09 10:43:02.142 python[97843:9986825] bolg
2020-04-09 10:43:02.142 python[97843:9986825] 0
2020-04-09 10:43:02.142 python[97843:9986825] MyPlugObjectHasProperty
2020-04-09 10:43:02.142 python[97843:9986825] trfn
2020-04-09 10:43:02.142 python[97843:9986825] bolg
2020-04-09 10:43:02.142 python[97843:9986825] 0
2020-04-09 10:43:02.142 python[97843:9986825] MyPlugObjectHasProperty
2020-04-09 10:43:02.142 python[97843:9986825] trfm
2020-04-09 10:43:02.142 python[97843:9986825] bolg
2020-04-09 10:43:02.142 python[97843:9986825] 0
2020-04-09 10:43:02.142 python[97843:9986825] MyPlugObjectHasProperty
2020-04-09 10:43:02.142 python[97843:9986825] trfn
2020-04-09 10:43:02.142 python[97843:9986825] bolg
2020-04-09 10:43:02.142 python[97843:9986825] 0
2020-04-09 10:43:02.142 python[97843:9986825] DN: CamTwist (2VUY)
2020-04-09 10:43:02.142 python[97843:9986825] MyPlugObjectHasProperty
2020-04-09 10:43:02.142 python[97843:9986825] dulp
2020-04-09 10:43:02.142 python[97843:9986825] tpni
2020-04-09 10:43:02.142 python[97843:9986825] 0
2020-04-09 10:43:02.142 python[97843:9986825] MyPlugObjectGetPropertyDataSize
2020-04-09 10:43:02.143 python[97843:9986825] sel dnwo
2020-04-09 10:43:02.143 python[97843:9986825] scope bolg
2020-04-09 10:43:02.143 python[97843:9986825] elt 0
2020-04-09 10:43:02.166 python[97843:9986825] MyPlugObjectIsPropertySettable
2020-04-09 10:43:02.166 python[97843:9986825] MyPlugObjectIsPropertySettable
2020-04-09 10:43:02.166 python[97843:9986825] MyPlugObjectIsPropertySettable
2020-04-09 10:43:02.166 python[97843:9986825] MyPlugObjectSetPropertyData
[ERROR:0] global /Users/travis/build/skvark/opencv-python/opencv/modules/videoio/src/cap.cpp (193) open VIDEOIO(AVFOUNDATION): raised unknown C++ exception!


Cannot open camera
2020-04-09 10:43:02.400 python[97843:9986825] MyPlugTeardown
2020-04-09 10:43:02.400 python[97843:9986825] MyPlugTeardown

modprobe: ERROR: could not insert 'v4l2loopback': Operation not permitted

OS Version

Ubuntu 19.10

When I'm trying to run bash run.sh I see following errors:

Creating virtual camera /dev/video9 (sudo privelege required)
modprobe: ERROR: could not insert 'v4l2loopback': Operation not permitted
0: ./avatars/einstein.jpg
... #similar lines
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)
--- Make sure the v4l2loopback kernel module is loaded ---
sudo modprobe v4l2loopback devices=1
Traceback (most recent call last):
  File "cam_fomm.py", line 230, in <module>
    stream = pyfakewebcam.FakeWebcam(f'/dev/video{opt.virt_cam}', frame.shape[1], frame.shape[0])
  File "/root/miniconda3/envs/avatarify/lib/python3.8/site-packages/pyfakewebcam/pyfakewebcam.py", line 31, in __init__
    raise FileNotFoundError('device does not exist: {}'.format(video_device))
FileNotFoundError: device does not exist: /dev/video9

I am not familiar with conda environments so maybe it could be the problem. On terminal I see it's running the base environment:

(base) kuzdogan@kuzdogan-UX331UN

Another thing to notice is I can only run bash run.sh as a root user so after sudo -i. If I run sudo bash run.sh I get

run.sh: line 9: conda: command not found
run.sh: line 9: /etc/profile.d/conda.sh: No such file or directory
run.sh: line 10: conda: command not found

Thank you

can't find avatar for streaming

My avatarify works well without streaming, but can't be found on skypes, Microsoft teams or slacks:
image
Only one camera can be found, any clue?

Windows version?

Hi, thanks for this amazing repo, did you tried to run this code on Windows?

pipe:0: Invalid data found when processing input - Linux

I cannot start the script. Used both CAMID 0 and 1.

> v4l2-ctl --list-devices       
avatarify (platform:v4l2loopback-000):
	/dev/video9

HD Pro Webcam C920 (usb-0000:00:14.0-6):
	/dev/video0
	/dev/video1
➜  avatarify git:(master) ✗ bash run.sh             
Creating virtual camera (this may require sudo password once after reboot)
run.sh: line 9: conda: command not found
run.sh: line 9: /etc/profile.d/conda.sh: No such file or directory
run.sh: line 10: conda: command not found
Running Avatarify (may take some while for the first time)...
  File "cam_fomm.py", line 28
    generator = OcclusionAwareGenerator(**config['model_params']['generator_params'],
                                                                                    ^
SyntaxError: invalid syntax
ffmpeg version 4.1.3-0ubuntu1 Copyright (c) 2000-2019 the FFmpeg developers
  built with gcc 8 (Ubuntu 8.3.0-6ubuntu1)
  configuration: --prefix=/usr --extra-version=0ubuntu1 --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
pipe:0: Invalid data found when processing input

command no found

hello , I get this error while running the script
$ sudo bash run.sh run.sh: line 9: conda: command not found run.sh: line 9: /etc/profile.d/conda.sh: No such file or directory run.sh: line 10: conda: command not found File "cam_fomm.py", line 36 generator = OcclusionAwareGenerator(**config['model_params']['generator_params'], ^ SyntaxError: invalid syntax

Blue filter

On Manjaro I have this output image in Zoom app.
Output log in Konsole:

$ ./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)
/home/gosvoh/miniconda2/envs/avatarify/lib/python3.8/site-packages/torch/nn/functional.py:2705: UserWarning: Default grid_sample and affine_grid behavior has changed to align_corners=False since 1.3.0. Please specify align_corners=True if the old behavior is desired. See the documentation of grid_sample for details.
  warnings.warn("Default grid_sample and affine_grid behavior has changed "
/home/gosvoh/miniconda2/envs/avatarify/lib/python3.8/site-packages/torch/nn/functional.py:2503: UserWarning: Default upsampling behavior when mode=bilinear is changed to align_corners=False since 0.4.0. Please specify align_corners=True if the old behavior is desired. See the documentation of nn.Upsample for details.
  warnings.warn("Default upsampling behavior when mode={} is changed "
/home/gosvoh/miniconda2/envs/avatarify/lib/python3.8/site-packages/torch/nn/functional.py:1351: UserWarning: nn.functional.sigmoid is deprecated. Use torch.sigmoid instead.
  warnings.warn("nn.functional.sigmoid is deprecated. Use torch.sigmoid instead.")

Press F then crash

0: ./avatars/eminem.jpg
1: ./avatars/jobs.jpg
2: ./avatars/mona.jpg
3: ./avatars/obama.jpg
4: ./avatars/potter.jpg
5: ./avatars/ronaldo.png
6: ./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)
/home/andrew/.local/lib/python3.8/site-packages/torch/nn/functional.py:2705: UserWarning: Default grid_sample and affine_grid behavior has changed to align_corners=False since 1.3.0. Please specify align_corners=True if the old behavior is desired. See the documentation of grid_sample for details.
  warnings.warn("Default grid_sample and affine_grid behavior has changed "
/home/andrew/.local/lib/python3.8/site-packages/torch/nn/functional.py:2503: UserWarning: Default upsampling behavior when mode=bilinear is changed to align_corners=False since 0.4.0. Please specify align_corners=True if the old behavior is desired. See the documentation of nn.Upsample for details.
  warnings.warn("Default upsampling behavior when mode={} is changed "
/home/andrew/.local/lib/python3.8/site-packages/torch/nn/functional.py:1351: UserWarning: nn.functional.sigmoid is deprecated. Use torch.sigmoid instead.
  warnings.warn("nn.functional.sigmoid is deprecated. Use torch.sigmoid instead.")
1660 : 123
2184 : 123
115 : 123
Taking new frame!
1477 : 115
101 : 115
Taking new frame!
2636 : 101
90 : 101
Taking new frame!
2052 : 2986
Taking new frame!
2066 : 1682
1970 : 1682
89 : 1682
Taking new frame!
92 : 89
87 : 89
Taking new frame!
2184 : 87
1611 : 87
2166 : 87
86 : 87
Taking new frame!
2886 : 86
93 : 86
90 : 86
90 : 86
96 : 86
1940 : 86
1958 : 86
115 : 86
112 : 86
7766 : 86
105 : 86
/home/andrew/.local/lib/python3.8/site-packages/face_alignment/detection/sfd/bbox.py:61: RuntimeWarning: invalid value encountered in less_equal
  inds = np.where(ovr <= thresh)[0]
Traceback (most recent call last):
  File "cam_fomm.py", line 263, in <module>
    if is_new_frame_better(fa, avatar, frame, device):
  File "cam_fomm.py", line 88, in is_new_frame_better
    new_kp = get_frame_kp(fa, driving)
  File "cam_fomm.py", line 64, in get_frame_kp
    kp_landmarks = fa.get_landmarks(255 * image)
  File "/home/andrew/.local/lib/python3.8/site-packages/face_alignment/api.py", line 141, in get_landmarks
    return self.get_landmarks_from_image(image_or_path, detected_faces)
  File "/home/andrew/.local/lib/python3.8/site-packages/face_alignment/api.py", line 187, in get_landmarks_from_image
    inp = crop(image, center, scale)
  File "/home/andrew/.local/lib/python3.8/site-packages/face_alignment/utils.py", line 130, in crop
    newImg = cv2.resize(newImg, dsize=(int(resolution), int(resolution)),
cv2.error: OpenCV(4.2.0) /io/opencv/modules/imgproc/src/resize.cpp:4045: error: (-215:Assertion failed) !ssize.empty() in function 'resize'

Running on win10, i7 and 1070gtx poor results

First of, thanks for the help into having it running. It seems that it isnt using my gpu, thus less than 1fps and weird warping at frames. My face is fully lit, centered and plain background.
Check it out.
image

Netowrk Weights - Corrupt file or non-standard format?

Downloaded vox-adv-cpk.pth.tar from google drive, and as i do with any archive file went to open it to test it wasnt corrupt, but it gives an error about corruption or non-standard format

Before i download it a 3rd time on my slow connection, is this archive in a non-standard format by any chance, to protect its content perhaps?

Very slow performance on high sierra

Hi! Awesome work. I was finally able to install all the dependencies and run the application, but the avatar changes so slowly that it almost doesn't change at all. I have a Macbook Pro 2012 with SSD disk. Is there any way to make it work faster?

Thanks!

`IndexError: list index out of range` when selecting avatar on MacOS

When I select one of avatars by pressing 0 or 1, this error occurs:
Traceback (most recent call last): File "/Users/john/avatarify-master/cam_fomm.py", line 162, in <module> pred = predict(frame, avatars[cur_ava], opt.relative, opt.adapt_scale, device=device) IndexError: list index out of range

No Sync_batchnorm

Trying to run on windows, error:

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

a question about training data

The performance of your application is not good on my computer. I think it's a good app. So I want to improve the performance. Because I'm an Asian, I want to use some Asian faces in your training model. Could you please tell me how can I do it.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.