Coder Social home page Coder Social logo

Comments (3)

Acurisu avatar Acurisu commented on May 29, 2024 1

There are multiple ways to achieve this and I will list a few that came to my mind.

Local (persistent)
You could directly run PULSE on a local instance. If you do that you don't even need to download the files manually as it will download them on your first run. If the cache gets cleared just do what the next method wants you to do but on your local instance of PULSE.

Online (temporary)
You could download the files and host them wherever you want and manually change the links after the colab downloaded PULSE at synthesis.pt (mapping.pt and shape_predictor_68_face_landmarks.dat are required too depending on what you are doing).
Instead of changing the links and hosting the files you could just upload the files into a directory of the colab and point PULSE to the correct location.

Online (persistent)
Fork PULSE and change the links like in the method I mentioned beforehand.
Then copy the colab to your drive and change !git clone to point to your fork (don't forget to save).
Copy to Drive

Local (persistent)
You could mix the first and second option by downloading the colab and running it using Jupyter.

The files for manual download:
synthesis.pt
mapping.pt
shape_predictor_68_face_landmarks.dat

from face-depixelizer.

JanKjellin avatar JanKjellin commented on May 29, 2024

Awesome! I'll look into those options.

Thank you. :)

from face-depixelizer.

AlbertoCasasOrtiz avatar AlbertoCasasOrtiz commented on May 29, 2024

Hi!

Following the ideas of @Acurisu, I have managed to make it work when this error happens. I had to change a few iles of code in my colab session but it is straightforward.

  1. Execute the code, it will downloading all necessary files into the colab session, and the quota exceeded error appears.

  2. Download the weights of the network manually from this link. This is the first link that appears in the error message.

  3. Once you have the weights (a file called synthesis.pt), put it in the folder of the colab filesystem called pulse.

  4. In the file PULSE.py, change the following lines of code:

    # Lines to delete (or comment):
    with open_url("https://drive.google.com/uc?id=1TCViX1YpQyRsklTVYEJwdbmK91vklCo8", cache_dir=cache_dir, verbose=verbose) as f:
        self.synthesis.load_state_dict(torch.load(f))
    # Lines to add:
    with open("/content/pulse/synthesis.pt", "rb") as f:
        self.synthesis.load_state_dict(torch.load(f))
  1. Upload your photo, either by using the upload button, or by uploading the photo manually into the folder pulse/input/. The name of the image should be face.png.

It worked for me following those steps, I hope it helps!

from face-depixelizer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.