Barbershop icon indicating copy to clipboard operation
Barbershop copied to clipboard

Minimal Requirements for inference.

Open muhammad-ahmed-ghani opened this issue 2 years ago • 2 comments

Hi, I thought it would be useful to install the required packages except of the additional ones.

requirements.txt

dlib
gdown
scikit-image
IPython
opencv-python

Commands to setup project

git clone https://github.com/ZPdesu/Barbershop.git
cd Barbershop

conda create -n barbershop python=3.10 -y
conda activate barbershop

# For CPU
pip install torch torchvision torchaudio

# For CUDA v11.6 (for v10.2 and v11.3 don't use '-c conda-forge')
conda install pytorch torchvision torchaudio cudatoolkit=11.6 -c pytorch -c conda-forge

pip install -r requirements.txt

muhammad-ahmed-ghani avatar Sep 28 '22 11:09 muhammad-ahmed-ghani

Hello, to complete, i just did a proper install. You need to add after the pip install requirements : conda install Ninja

Add cl.exe on path : SET PATH=%PATH%;C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\bin\Hostx64\x86

Patch PILLOW functionnal.py ( https://stackoverflow.com/questions/59659146/could-not-import-pillow-version-from-pil ) ( For me it was here : C:\Users\USER\AppData\Local\miniforge3\envs\barbershop\Lib\site-packages\torchvision\transforms\functional.py)

xabila avatar Oct 10 '22 13:10 xabila

Yeah maybe you need this in windows. I installed it on ubuntu and it was working fine.

muhammad-ahmed-ghani avatar Oct 10 '22 13:10 muhammad-ahmed-ghani