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

run python u2net_portrait_demo.py error #100

Open
oops20180325 opened this issue Nov 24, 2020 · 5 comments
Open

run python u2net_portrait_demo.py error #100

oops20180325 opened this issue Nov 24, 2020 · 5 comments

Comments

@oops20180325
Copy link

my PyTorch version is 1.7.0

(u2net) D:\ai\U^2-Net\U-2-Net>python u2net_portrait_demo.py
Number of images: 11

inferencing 0 / 11 ./test_data/test_portrait_images/your_portrait_im\GalGadot.jpg
D:\soft\anaconda3\envs\u2net\lib\site-packages\torch\nn\functional.py:2952: UserWarning: nn.functional.upsample is deprecated. Use nn.functional.interpolate instead.
warnings.warn("nn.functional.upsample is deprecated. Use nn.functional.interpolate instead.")
D:\soft\anaconda3\envs\u2net\lib\site-packages\torch\nn\functional.py:3063: UserWarning: Default upsampling behavior when mode=bilinear is changed to align_corners=False since 0.4.0. Please specify align_corners=True if the old behavior is desired. See the documentation of nn.Upsample for details.
"See the documentation of nn.Upsample for details.".format(mode))
D:\soft\anaconda3\envs\u2net\lib\site-packages\torch\nn\functional.py:1639: UserWarning: nn.functional.sigmoid is deprecated. Use torch.sigmoid instead.
warnings.warn("nn.functional.sigmoid is deprecated. Use torch.sigmoid instead.")

@woctezuma
Copy link

These are warnings, not errors.

@jzz3933
Copy link

jzz3933 commented Dec 1, 2020

I also got these warnings, and there is no output in the output folder, I'm working on it

@xuebinqin
Copy link
Owner

xuebinqin commented Dec 1, 2020 via email

@jzz3933
Copy link

jzz3933 commented Dec 1, 2020

when running the code in windows, please change the separators "/" in the image and model weight path " ./test_data/test_portrait_images/your_portrait_im\GalGadot.jpg" to "".

On Mon, Nov 30, 2020 at 8:13 PM jzz3933 @.***> wrote: I also got these warnings, and there is no output in the output folder, I'm working on it — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub <#100 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADSGORI2QI35YDNQXWO5H6TSSRNMZANCNFSM4UA6MAAA .
-- Xuebin Qin PhD Department of Computing Science University of Alberta, Edmonton, AB, Canada Homepage:https://webdocs.cs.ualberta.ca/~xuebin/

Thanks! It works well now!

@gurusura
Copy link

I am getting this error.

"RuntimeError: Attempting to deserialize object on a CUDA device but torch.cuda.is_available() is False. If you are running on a CPU-only machine, please use torch.load with map_location=torch.device('cpu') to map your storages to the CPU."

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

5 participants