Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

u2net.pth unable to automatically download due to permission issue #4

Closed
teyou opened this issue Mar 11, 2022 · 2 comments
Closed

u2net.pth unable to automatically download due to permission issue #4

teyou opened this issue Mar 11, 2022 · 2 comments

Comments

@teyou
Copy link

teyou commented Mar 11, 2022

When I run this command from the provided docker image
python run_object_sketching.py --target_file "camel.png"

It shows this error:

Access denied with the following error:

        Cannot retrieve the public link of the file. You may need to change
        the permission to 'Anyone with the link', or have had many accesses. 

You may still be able to access the file from the browser:

         https://drive.google.com/uc?id=1ao1ovG1Qtx4b7EoskHXmi2E9rp5CHLcZ 
@teyou
Copy link
Author

teyou commented Mar 11, 2022

the fix is simply to change the gdown version to the latest one

ref: wkentaro/gdown#43

If still have issue, can try this step

pip install --upgrade --no-cache-dir gdown

then 
1. cd to `./U2Net_/saved_models/`
2. run gdown https://drive.google.com/uc?id=1ao1ovG1Qtx4b7EoskHXmi2E9rp5CHLcZ 

@yael-vinker
Copy link
Owner

Hi @teyou, thanks for your interest in our project, and thanks for sharing your solution.

Another possible solution in case the provided link is not working, is using this command to download the trained weights of u2net from huggingface:
wget https://huggingface.co/akhaliq/CLIPasso/resolve/main/u2net.pth --output-document=U2Net_/saved_models/u2net.pth

(Credit to @AK391 for uploading this file).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants