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

Question about test image size #15

Closed
LinglanZhao opened this issue Apr 18, 2020 · 2 comments
Closed

Question about test image size #15

LinglanZhao opened this issue Apr 18, 2020 · 2 comments

Comments

@LinglanZhao
Copy link

Hi Kaixin,
It seems that during both training and testing both the support and query images are resized to a fixed size (e.g. [417, 417]). However, in many few-shot segmentation works, the segmentation mask output is resized to the original image resolution for evaluation. How can I get the original query images and the corresponding ground-truth masks during testing phase?
I also output some unused key-value pairs in the dataloader dictionary, but they seem to be of the same fixed shape:
sample_batched['support_images_t'][0][0].shape = torch.Size([1, 3, 417, 417]) sample_batched['query_images_t'][0].shape = torch.Size([1, 3, 417, 417]) sample_batched['query_masks'][0][0].shape = torch.Size([1, 1, 417, 417]) sample_batched['query_labels'][0].shape = torch.Size([1, 417, 417])

@kaixin96
Copy link
Owner

kaixin96 commented May 1, 2020

Hi @LinglanZhao , sorry for the late reply.

You can set transforms to None in https://github.com/kaixin96/PANet/blob/master/test.py#L60 and modify https://github.com/kaixin96/PANet/blob/master/models/fewshot.py#L55 to forward support and query images separately.

Thank you.

@LinglanZhao
Copy link
Author

Thanks for your reply!

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