-
Notifications
You must be signed in to change notification settings - Fork 2
3. Installation
Download the .whl file of the latest release from PyAFAR's release website. If you wish to use the GPU version of PyAFAR use the file with GPU in the tag otherwise select CPU.
The following steps will help PyAFAR installation. We recommend using PyAFAR in an anaconda environment. Find more details on how to download and install anaconda here. Then follow the below steps:
- Create a python3.9 environment and activate it
conda create -n pyafar python=3.9
conda activate pyafar
- Install cmake and dlib (dlib can be installed using pip as well)
conda install cmake
conda install -c conda-forge dlib
If you are installing on Ubuntu, dlib may need additional requirements below:
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
sudo apt install g++-11
- Install PyAFAR
Using the whl file from GitHub, for CPU version run:
pip install PyAFAR_CPU-3.0-py3-none-any.whl
for GPU version run:
pip install PyAFAR_GPU-3.0-py3-none-any.whl
If you are not familiar with GitHub layout and releases, after steps-1 and 2
for CPU version use:
pip install https://github.com/AffectAnalysisGroup/PyAFAR/releases/download/v3.0.0/PyAFAR_CPU-3.0-py3-none-any.whl
for GPU version use:
pip install https://github.com/AffectAnalysisGroup/PyAFAR/releases/download/v3.0.0/PyAFAR_GPU-3.0-py3-none-any.whl
We encourage users to install CUDA on their own. PyAFAR GPU capabilities work only on Ubuntu or WSL2.
Once PyAFAR is installed from the above code, type download_models from your terminal to download AU prediction models. This should take some time depending on your internet speed.