Skip to content

Alpha dimension doesn't match picture dimensions #26

Description

@musja007

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions