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

UNet for non-square input images? #79

Closed
Attila94 opened this issue Oct 17, 2018 · 5 comments
Closed

UNet for non-square input images? #79

Attila94 opened this issue Oct 17, 2018 · 5 comments

Comments

@Attila94
Copy link

When I train a model with square input size, all goes well. However, when I train a model with an input layer of, for example, 512x768, the training loss increases to up to 97% but the output is almost completely empty.

Anybody succeeded using UNet with a non-square input size?

@guanzzz
Copy link

guanzzz commented Oct 17, 2018

yes, you can. But you need to know that the u net output is actually probability rather than pixel value. So what I did was multiply a constant and take threshold to get the segmentation result

@Attila94
Copy link
Author

Turns out it was a matter of unbalanced data, had nothing to do with the input ratio.

@Mahi-Mai
Copy link

Hi @Attila94

Are you also making predictions on non-square images? This is something I'm struggling with right now. If I want to make a prediction, I need to segment my image into square subsamples, and I don't like that.

@ICG14
Copy link

ICG14 commented Sep 12, 2021

Could you solve it? I am struggling to train a UNET CNN with rectangular images 512x896

@Attila94
Copy link
Author

I'm not sure what the issue is but it has probably nothing to do with the input shape - UNet works for all input sizes.

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

4 participants