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

Alpha dimension doesn't match picture dimensions #26

Open
musja007 opened this issue Nov 22, 2023 · 1 comment
Open

Alpha dimension doesn't match picture dimensions #26

musja007 opened this issue Nov 22, 2023 · 1 comment

Comments

@musja007
Copy link

musja007 commented Nov 22, 2023

High all!

I'm trying to run the model from transformers on the picture given the trimap following this notebook: https://github.com/NielsRogge/Transformers-Tutorials/blob/master/ViTMatte/Quick_inference_with_ViTMatte_for_image_matting.ipynb

Screenshot from 2023-11-22 15-54-48

For some reason the dimensions of alpha don't match the original picture dimensions. Original picture is (1080, 1920) and alphas is (1088, 1952).

If I run the code from the notebook everything runs correctly. So I assume something might be wrong with the format of picture or trimap I'm trying to use?

To reproduce, links to files:

picture: https://drive.google.com/file/d/1eF9sQwvQ573rgO_IK5lGhr2iZCI-ncP1/view?usp=sharing
trimap: https://drive.google.com/file/d/1wdx1McNBj92Q_ZuzFhJ79JUdfkd0ZYXH/view?usp=sharing

Thanks in advance!

@JingfengYao
Copy link
Member

I think it may be because of the padding. Check here.

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