ZPdesu / Barbershop

Barbershop: GAN-based Image Compositing using Segmentation Masks (SIGGRAPH Asia 2021)
https://zpdesu.github.io/Barbershop/
MIT License
1.32k stars 264 forks source link

Minimal Requirements for inference. #55

Open muhammad-ahmed-ghani opened 1 year ago

muhammad-ahmed-ghani commented 1 year ago

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
xabila commented 1 year ago

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)

muhammad-ahmed-ghani commented 1 year ago

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