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

Original image color was changed #136

Open
rubi-du opened this issue Nov 29, 2024 · 2 comments
Open

Original image color was changed #136

rubi-du opened this issue Nov 29, 2024 · 2 comments

Comments

@rubi-du
Copy link

rubi-du commented Nov 29, 2024

I use the hugging demo to remove image background, but the color changed in image which background was removed.
From these two images, it can be seen that the color of the processed image has become lighter

huggingface space link: https://huggingface.co/spaces/ZhengPeng7/BiRefNet_demo

  • original image
image
  • result
image
@rubi-du
Copy link
Author

rubi-du commented Nov 29, 2024

I found through debugging that there are many floating-point data with very small differences in the mask. Is this the reason for this
image

@ZhengPeng7
Copy link
Owner

Yeah. If you don't apply hard thresholding, the pixel values of the predicted maps of BiRefNet are actually float ones between 0 and 1. What's more, floats also represent transparency.

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