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 #35

Open
zhengbowei opened this issue May 24, 2020 · 1 comment
Open

question about test #35

zhengbowei opened this issue May 24, 2020 · 1 comment

Comments

@zhengbowei
Copy link

Dear author:
Thanks for your re-implementation, it's helpful! Now I have a little question for you:
In the training phase, the training image will be scaled to 256*256, the code in dataset.py is:
if self.random_crop:
imgw, imgh = img.size
if imgh < self.image_shape[0] or imgw < self.image_shape[1]:
img = transforms.Resize(min(self.image_shape))(img)
img = transforms.RandomCrop(self.image_shape)(img)
else:
img = transforms.Resize(self.image_shape)(img)
img = transforms.RandomCrop(self.image_shape)(img)

In the testing phase, the testing image will be scaled to 256*256, the code in test_single.py is:
x = transforms.Resize(config['image_shape'][:-1])(x)
x = transforms.CenterCrop(config['image_shape'][:-1])(x)
mask = transforms.Resize(config['image_shape'][:-1])(mask)
mask = transforms.CenterCrop(config['image_shape'][:-1])(mask)

The scaling standards are the same between them?
Thank you for your answer。

@daa233
Copy link
Owner

daa233 commented May 24, 2020

You could try the same scale standard.

It should support arbitrary sizes of inputs during testing phrase but there may be some bugs now.

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