advimman / lama

🦙 LaMa Image Inpainting, Resolution-robust Large Mask Inpainting with Fourier Convolutions, WACV 2022
https://advimman.github.io/lama-project/
Apache License 2.0
8.09k stars 858 forks source link

can this code run in the Windows system? #148

Open improgress opened 2 years ago

jackieylogan commented 2 years ago

i think it can, because somebody had put it on pyqt5 version

improgress commented 2 years ago

OK thanks a lot

------------------ 原始邮件 ------------------ 发件人: @.>; 发送时间: 2022年9月2日(星期五) 中午12:08 收件人: @.>; 抄送: @.>; @.>; 主题: Re: [saic-mdal/lama] can this code run in the Windows system? (Issue #148)

i think it can, because somebody had put it on pyqt5 version

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

inhahe commented 2 years ago

It doesn't seem to work on Windows. When I entered the command 'conda env create -f conda_env.yml', I got this:

C:\Users\inhah\AppData\Roaming\Python\Python37\site-packages\requests__init__.py:89: RequestsDependencyWarning: urllib3 (1.26.11) or chardet (5.0.0) doesn't match a supported version! RequestsDependencyWarning) Collecting package metadata (repodata.json): done Solving environment: failed

ResolvePackageNotFound:

Maybe something else went wrong, I'm not sure.

I didn't try it outside of conda because installing pytorch never works for me outside of conda.

shahJaimin77 commented 2 years ago

Hi @inhahe , It works on Windows. But as you mentioned creating conda environment using their yml file won't work. You can create a normal conda environment using: conda create -n lama_env python=3.9 conda activate lama_env

And then installing the following dependencies: conda install pytorch torchvision torchaudio cudatoolkit=10.2 -c pytorch -y pip install pytorch-lightning==1.2.9

This worked for me!

liyiersan commented 1 year ago

Hi, @shahJaimin77 , I met some problems when calculating metrics on windows , did the evaluate_predicts.py work for on Windows?

naga-k commented 1 year ago

I think the folks who built the env yml file need to remove the platform-specific build constraints as described in this article. https://stackoverflow.com/questions/55554431/conda-fails-to-create-environment-from-yml

shahJaimin77 commented 1 year ago

Yes, if we are using their environment file, then this problem would occur because of the platform-specific build constraints. But its better we create our own env file and install the packages as mentioned above.

shahJaimin77 commented 1 year ago

Hi, @shahJaimin77 , I met some problems when calculating metrics on windows , did the evaluate_predicts.py work for on Windows?

@liyiersan Sorry, but I haven't used the evaluate_predicts.py file

naga-k commented 1 year ago

@shahJaimin77 , thanks for replying. how did you mange to install all the packages?

shahJaimin77 commented 1 year ago

@naga-k Install the dependencies using the following commands: conda install pytorch torchvision torchaudio cudatoolkit=10.2 -c pytorch -y pip install pytorch-lightning==1.2.9