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

What is pad_mask? #6

Open
ian860505 opened this issue Apr 18, 2022 · 5 comments
Open

What is pad_mask? #6

ian860505 opened this issue Apr 18, 2022 · 5 comments

Comments

@ian860505
Copy link

ian860505 commented Apr 18, 2022

Sorry for bothering.
I can't understand where is the batch['pad_mask'] from?
Is its definition from results['pad_mask']?

or, does it have something to do with the 'mask' in the following image?
image

@guillembraso
Copy link
Collaborator

Hi,

Sorry for my late reply, I've been sick.

It's the second option: it's coming from results['pad_mask'], and it has nothing to do with the screenshot you sent. When images are resized, to fit a certain aspect ratio, some additional padding might be added on the left/right or top/bottom sides. 'pad_mask' indicates which regions of the image are just padding, and which ones are actual pixels.

Hope this made it clear!

Guillem

@ian860505
Copy link
Author

ian860505 commented May 2, 2022

Thank you for your reply! I hope you feel better soon.

Could you give an example?
What are the shapes and values of masks and pad_mask in a batch?

@ian860505 ian860505 reopened this May 2, 2022
@aayushsingla
Copy link

aayushsingla commented May 31, 2022

Hi, I am facing this issue with masks too. Can someone explain what these masks are and where do they come from? are these segmentation masks or something else? I am confused as there is nothing mentioned in the paper about use or need of segmentation masks but DETR needs segmentation masks. Please correct me if I am wrong. @ian860505 @guillembraso

@ian860505
Copy link
Author

@aayushsingla You can check the funtion _get_mask. These masks come from the definition of dataset in mmpose. The pad_mask is from the data augmentation pipeline results['pad_mask'](train pipeline) and pad_masks (test pipeline)

@aayushsingla
Copy link

@ian860505 Thanks! This was exactly what I needed.

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

3 participants