in Machine Learning, Tutorial

How To Install FakeApp

You can read all the posts in this series here:

If you are interested in reading more about AI Art (Stable Diffusion, Midjourney, etc) you can check this article instead: The Rise of AI Art.

Introduction

Despite what media is claiming, creating deepfakes is not easy. To be more precise, creating deepfakes is very easy, but creating good ones is not. There is no doubt that the most accessible application to create deepfakes is FakeApp, which recently hit version 2.2. This tutorial will show you how to install it and use it. For an in-depth discussion on how to get the most out of face-swap technology, you can refer to How To Create The Perfect DeepFakes.

FakeApp, like most face-swapping software, is based on the original implementation provided by the Reddit user deepfakes. There are other softwares available, such as faceswap on GitHub), but FakeApp remains the most accessible one due to its friendly interface. Whichever application you are going to use, make sure to download it from an official source, as many are infected with Bitcoin miners and Trojans.

Step 1. Installing NVidia CUDA9

FakeApp relies on neural networks, which are notoriously expensive to train. Despite their cost, the process of training a neural network is highly parallelisable. For this reason, most Machine Learning frameworks (such as Keras and TernsorFlow) can dispatch the computation on a GPU. GPU stands for Graphics Processing Unit, and is the chip that inside your machine that usually processes graphics inputs.

GPUs are designed to perform operations in parallel, hence they are perfect to train neural networks which are built upon independent neurons working in parallel. FakeApp uses TensorFlow, a Machine Learning framework which supports GPU-accelerated computation using NVIDIA graphics cards. Before using that, however, you need to install CUDA®, a parallel computing platform that delegates intensive computation to an NVIDIA GPU.

Check your Graphics Card. Not all graphics cards from NVIDIA have integrated support for GPU Computing. You can check whether your GPU is compatible or not visiting the CUDA GPUs list. Any graphics card with Compute Capability greater or equal to 3.0 will work.

For instance, all the models on the right will support CUDA®:

FakeApp allows to train your models without a GPU. This is strongly discouraged, as the process might take weeks, instead of hours.

Update your NVIDIA Drivers. Before being able to use CUDA®, you must update your NVIDIA drivers. You can do so from the official NVIDIA Driver Downloads page.

Make sure you are choosing the right model and architecture.

❓ How do I know the model of my GPU?
If you are unsure about which GPU model you have, you can choose Option 2 which will automatically find it for you. Alternatively, you can search for “Device Manager” in your Start bar and check it yourself under “Display adapters“:

Names might vary slightly depending on your version of Windows.

Install CUDA® Toolkit 9.0. Now that your NVIDIA drivers are up to date, you can download the actual CUDA® Toolkit from the official CUDA® Toolkit Download page.

Make sure that you select the right version for both CUDA and your OS.

You can choose whichever Installer Type you prefer. “exe (local)” will download the entire installer first. The file is rather big, so get ready to wait.

During the installation, choose the “Custom” option and select all of its components.

Install cuDNN. While the CUDA® Toolkit provides the basic set of tools required for GPU computing, it does not include the libraries for certain specialised tasks. ML-Agents uses reinforcement learning to training neural networks. As such, you will also need to download the CUDA® support for deep neural networks, also known as cuDNN.

Downloading cuDNN requires a login. You can register for free as an NVIDIA Developer, and then visit the webpage again to access the download link. FakeApp works with cuDNN 7, so make sure to select the right version.

While CUDA® Toolkit comes with a proper installer, cuDNN is simply a zip file with all the necessary libraries. To install it, you will need to extract its content and merge it with the CUDA/v9.0  folder in your system (typically: C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.0):

While this is the suggested option, you can keep the cuDNN files in a separate folder. If you do this, remember to follow the next step carefully so that they are still accessible through your Path.

Configure your Path System Variable. Both CUDA® and cuDNN needs to be accessible by FakeApp. By default, installing CUDA9.0 updates your Path. This is a system variable that Windows uses to find critical files and applications.

Search for “system variable” on your Search bar and open the “Edit the system environment variables” application (the name might be slightly different, depending on your version of Windows). Click on “Environment Variables…” and find the Path variable from the list below:

Click on “Edit…” and make sure that there are two entries: one for the bin and one for the libnvvp  folders of your CUDA® installation. Typically they are:

  • C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.0\bin
  • C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.0\libnvvp

The installer for CUDA® should automatically update your Path; double check this is the case, or FakeApp will not be able to work.

Step 2. Installing FakeApp

Installing FakeApp is the easiest step, although it still requires some configuration. The installer can be downloaded from the FakeApp Download page. Make sure to download it from there, as many other sources are infected with malware and Bitcoin miners.

There are two files that you need to download. One is the actual installer for the FakeApp binaries, while the other is called core.zip and contains all the dependencies that it requires. Once extracted, all of its content should be merged in the C:\Users\[USER]\AppData\Local\FakeApp\app-2.2.0\resources\api folder, which should look like this:

If everything works correctly, you should now be able to use FakeApp.

Conclusion

Now that FakeApp (and all of its dependencies) are installed, the next tutorial will teach how to use it.

You can read all the posts in this series here:

A special thanks goes to Christos Sfetsios and David King, who gave me access to the machine I have used to create the deepfakes used in this tutorial.

💖 Support this blog

This website exists thanks to the contribution of patrons on Patreon. If you think these posts have either helped or inspired you, please consider supporting this blog.

Patreon Patreon_button
Twitter_logo

YouTube_logo
📧 Stay updated

You will be notified when a new tutorial is released!

📝 Licensing

You are free to use, adapt and build upon this tutorial for your own projects (even commercially) as long as you credit me.

You are not allowed to redistribute the content of this tutorial on other platforms, especially the parts that are only available on Patreon.

If the knowledge you have gained had a significant impact on your project, a mention in the credit would be very appreciated. ❤️🧔🏻

Write a Comment

Comment

50 Comments

  1. Started to go step by step. Updated my Nvidia drivers then read the rest of the tutorial.
    At least I have updated drivers now…

  2. The fakeapp.org website has been shut down sadly. I have managed to find an installer for the app itself, but have not managed to find a way to download the core library yet. Has anyone had any luck with that?

  3. I found a download for the fakeapp, but impossible to find a download for the core library. Any ideas? Great tutorial by the way!

  4. hi.I have a problem. every time I extract the faces the pc crashes after about 40 faces. I do not know what to do. Please help me

    • Totally! I have been used a laptop for most of my experiments.
      However, you do need one that has a GPU that supports CUDA.
      If not, you can still train your neural networks but is likely to take weeks.

    • Fakeapp 2.2 & MyfakeApp are still readily available online but I’ve found that they aren’t compatible with the new versions of Cuda

  5. Is there a way to make this work with Cuda 10.1? Cuda 9.0 is no longer available for download, I have Cuda 10.1 installed along with the version of CuDNN for it but neither this nor the other deepfake apps I’ve found will recognise Cuda 10.1 so I end up having to try using my CPU to do the work instead of my GPU

    • i had no trouble installing Cuda 9.0.xxx from the Nvidia site. The documentation there says CUDA 10, but what I installed says CUDA 9.0.xxx

  6. I don’t understand, when I open the app, it tells me to install the core folder which I have already done, but it won’t let me use the app.

  7. One solution to all of the above…

    Be patient. Wait. Forget FakeApp for now and come back to this subject in a year or three.

    Fakes are cool, but not cool enough to merit all of the above, imho. But it will get easier over time. In the meantime, there are lots of other things to do. I’m creating pretty good fakes using Hitfilm and CrazyTalk, try that perhaps. 1,000x easier than what is described here.

  8. i have thinkpad r400 laptop with graphic card like: “Mobile intel (r) for series Express Chipset Family”, so i dont have nvidia graphic card? And can i use Fakeapp on my laptop or not ? sorry for my english.

  9. Hi Alan
    This is my log:
    undefined File “site-packages\PyInstaller\loader\pyiboot01_bootstrap.py”, line 174, in __init__
    __main__.PyInstallerImportError: Failed to load dynlib/dll ‘cudart64_90.dll’. Most probably this dynlib/dll was not found when the application was frozen.

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
    File “execute.py”, line 1, in
    File “d:\anaconda\envs\fakeapp\lib\site-packages\PyInstaller\loader\pyimod03_importers.py”, line 631, in exec_module
    File “merge_faces.py”, line 8, in
    File “d:\anaconda\envs\fakeapp\lib\site-packages\PyInstaller\loader\pyimod03_importers.py”, line 631, in exec_module
    File “d:\anaconda\envs\fakeapp\lib\site-packages\PyInstaller\loader\pyimod03_importers.py”, line 631, in exec_module
    ImportError: Could not find ‘cudart64_90.dll’. TensorFlow requires that this DLL be installed in a directory that is named in your %PATH% environment variable. Download and install CUDA 9.0 from this URL: https://developer.nvidia.com/cuda-toolkit
    [4396] Failed to execute script execute
    What is problem???
    Thanks

  10. Re the system variables, you emphasize there must be one for the bin and one for the libnvvp, but you do NOT say what the variable names should be. I see one for CUDA_PATH and and another for CUDA_PATH_V9_0 but they both terminate at V9.0. Is that good enough after installing CUDA 9, or am I missing something? I hope I can now find FakeApp to install. Do you have a good link?

  11. Alan Z., thanks for laying it all out. I’ve been reading everything you suggest; as for this part, I’ve downloaded everything without issue, and am looking forward to installing all of it (not to mention actually, you know, *using* it!). Thanks again, much appreciated.

  12. hi, i ‘ve installed Cuda (local) 9 and patches, and fakeapp with core library but there is a message that stop the program :
    “Announcements

    Welcome to FakeApp 2.2.0!

    Changelog:
    – Squirrel autoupdates
    – Re-added image datasets
    – Fixed no-face error
    – Re-added merge options
    – Upgraded to TF 1.5, CUDA 9
    Remember to download and install the core library as well. Once it has been downloaded and installed as per the instructions on the forum, reload the app and this message will disappear.”

    Any idea??? thanks

  13. I can’t train
    the lgo.txt for details is
    undefinedUsing CPU for processing
    Traceback (most recent call last):
    File “execute.py”, line 69, in
    File “train.py”, line 41, in main
    File “utils.py”, line 14, in load_images
    AttributeError: ‘NoneType’ object has no attribute ‘shape’
    [4648] Failed to execute script execute
    please tell me how to solve
    thank very much

  14. Hola tengo un problema parecido al anterior:
    undefined File “align_faces.py”, line 136, in main
    File “align_faces.py”, line 103, in iter_face_alignments.
    Esto ocurre cuando termina de extraer las imagenes y comienza a crear la carpeta con las caras.

  15. I have a laptop with an NVIDIA GeForce GTX 1060 graphics card, the Cuda 9.0 and fake App 2.2 do not work
    so I redid as indicated in the tutorial except that on the NVIDIA site there is not my card
    I reloaded the Cuda and the fake App
    but nothing helps
    Can someone tell me why and if there is a solution?

  16. Hello, thanks for the tutorial. I installed the program exactly according to your instructions. Everything was ok up to and including Train At Create I got an error message.
    undefinedffmpeg version git-2017-12-29-0c78b6a Copyright (c) 2000-2017 the FFmpeg developers
    built with gcc 7.2.0 (GCC)
    configuration ………………
    d: \ wik.mp4: No such file or directory
    I ask for help.

  17. well that was a total waste of my time.
    this app is crap an wont work.
    i read all the suggestions and tried and tried again to down load.
    it not work.
    why put something out there if it cant be used.
    a bunch of BS is what it is.

Webmentions

  • Deepfake Detection Competitions - AntiSpoofing June 15, 2022

    […] static or live, that was doctored using a deepfake app such as Face Swapper, DeepAR, FaceSwap, FakeApp […]

  • An Introduction to Neural Networks and Autoencoders - Alan Zucconi June 15, 2022

    […] Part 3. How To Install FakeApp […]

  • An Introduction to DeepFakes - Alan Zucconi June 15, 2022

    […] Part 3. How To Install FakeApp […]

  • Deep Fakes – Intelixencia Artificial – Novas Falsas June 15, 2022

    […] cómo instalar FakeApp       cómo instalar en Linux  explorando DeepFakes […]