hukkelas / deep_privacy2

DeepPrivacy2 - A Toolbox for Realistic Image Anonymization
Apache License 2.0
292 stars 33 forks source link

Can't install Deep_privacy2 in the Google Collab with miniconda and python3.9 #21

Closed AbdirayimovS closed 1 month ago

AbdirayimovS commented 9 months ago

Hello all,

I was given to implement deep_privacy2 anonymization in Google Colab. After successfully installing miniconda and pytorch, I run the following code: pip install git+https://github.com/hukkelas/deep_privacy2/

Result

As a n output I got following error:

image

Looking forward for you help!

PedroKBrant commented 8 months ago

Hello @AbdirayimovS , did you managed to solve this issue? I'm also interested in training the network on collab

hukkelas commented 7 months ago

Hi, I'm not familiar with google colab and do not have time currently to look into it. Although, it should not be required to use miniconda/anaconda on google cloud.

Gordon-4389 commented 6 months ago

You can clone and build it separately, but you have to loosen the dependencies:

  1. First clone the repo !git clone https://github.com/hukkelas/deep_privacy2/
  2. Then, in 'setup.py' change the following using a script:
    • scipy==1.7.1 to scipy
    • setuptools==5.9.5.0 to setuptools
    • pillow==8.3.1 to pillow
  3. Then, I just build:
    %cd deep_privacy2
    ! pip install -e .
    %cd ..

    From this, I managed to get anonymization working, but I've run into some of my own issues I am working to resolve.

AbdirayimovS commented 1 month ago

I have solved the issue with downgrading the python to 3.8 or 3.9. Sorry for late response. @Gordon-4389 solution looks very promising.