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

Background image removal using pth / converting from .pth to .onnx #374

Closed
KDubZz opened this issue Dec 28, 2022 · 2 comments
Closed

Background image removal using pth / converting from .pth to .onnx #374

KDubZz opened this issue Dec 28, 2022 · 2 comments
Labels

Comments

@KDubZz
Copy link

KDubZz commented Dec 28, 2022

Hi there!

I was using rembg to remove the backgrounds from many images at once, which I got to work using u2net.onnx as you provided in rembg. These images are images of clothing. However, on images with white clothing, the u2net and u2netp models leave large shadows behind each of the items of clothing, and leave gaps in between the item where it was even brighter. In addition, it fails to remove between hair.

I did some research and found this model on the u2net page: https://github.com/dennisbappert/u-2-net-portrait
This seems to be what I need, but the download page gives a .pth model.

My two questions are: how can I adjust the loss threshold to account for white clothes, and how can I convert this model from .pth to .onnx and use it within my code so that I can see if it works better than u2net?

Thanks in advance!

@github-actions
Copy link

This issue is stale because it has been open for 30 days with no activity.

@github-actions github-actions bot added the stale label Jan 28, 2023
@github-actions
Copy link

This issue was closed because it has been inactive for 14 days since being marked as stale.

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

No branches or pull requests

1 participant