This article is a follow-up to "Talking Head Anime from a Single Image". I recommend reading from that article first.
Python is required to run Talking Head Anime from a Single Image. In this article, I would like to introduce Python from scratch so that anyone can enjoy Babiniku.
Read the README.md in talking-head-anime-demo and you'll see that you need the following:
What is written on the left is the Python itself and the library. The number on the right is version, and you need to prepare a newer one.
Also, pytorch requires CUDA, and dlib requires a C ++ development environment and a library called cmake, so we will prepare them as well.
Anaconda We will install Anaconda on the premise that we have everything we need. Anaconda is a platform that provides Python itself and several libraries for scientific computing. You can easily build an environment that uses Python by installing it. Also, pillow and numpy are installed by default, so you don't need to install them.
First, go to this Anaconda Distribution.
Select Python 3 version from Download to download. Select version 3.6 or higher as described in What You Need.
Follow the steps to install Anaconda.
CUDA
CUDA is the platform and programming model required for parallel computing on GPUs.
Go to the CUDA Toolkit (https://developer.nvidia.com/cuda-toolkit) and click Download Now.
Select the platform that suits your environment from Select Target Platform and download it.
Follow the steps to install CUDA.
Set up a C ++ development environment to install dlib, one of the required libraries. Microsoft Visual Studio provides that environment.
Go to Visual Studio (https://visualstudio.microsoft.com/en/downloads/).
Download the Visual Studio Community and launch the installer.
Check and install desktop development with C ++.
We will install the necessary libraries.
Start Anaconda Prompt.
Enter conda install pytorch torchvision -c pytorch
in Anaconda Prompt, press the Enter key and wait for a while, then you will be askedPerocnceed ([y] / n)?
, So enter y
to install. To do.
Install opencv-python with pip install opencv-python
.
Install cmake with pip install cmake
.
Install dlib with pip install dlib
.
This completes the preparation of Python. Go back to "Talking Head Anime from a Single Image" and let's actually move it.
Recommended Posts