tf_unet icon indicating copy to clipboard operation
tf_unet copied to clipboard

How to get output which is in same size as input image?

Open saicoco opened this issue 7 years ago • 8 comments

Thanks for your awesome tf_unet api, it helps me a lot.

A problem I wanna to ask: how to get the output that in same size with input. As I know, padding input can get the output, however, it will bring some noises into result. How to do it, thanks!

saicoco avatar Dec 19 '17 07:12 saicoco

Great to hear that this is of use to you! The way the network works you will always get a small sized image. If you look thru older issues people are usually mirroring the edges of the image to compensate for the loss. This gives generally good results

jakeret avatar Dec 19 '17 13:12 jakeret

Joel, seems like this question should go to somekind of FAQ. Where do you think is the best place for it?

On Dec 19, 2017 6:09 PM, "Joel Akeret" [email protected] wrote:

Great to hear that this is of use to you! The way the network works you will always get a small sized image. If you look thru older issues people are usually mirroring the edges of the image to compensate for the loss. This gives generally good results

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/jakeret/tf_unet/issues/138#issuecomment-352744085, or mute the thread https://github.com/notifications/unsubscribe-auth/AHw_2ZjocyMyMb5FTg4VFEeb_47Km5MWks5tB7V5gaJpZM4RGkHy .

AlibekJ avatar Dec 19 '17 13:12 AlibekJ

Got it @jakeret

saicoco avatar Dec 19 '17 14:12 saicoco

@AlibekJ agreed, this seems to raise a lot of confusion. How about a new section (e.g. 'Data handling') in the documentation that would address this and other data related topics. Didn't you have an implementation of this edge mirroring?

jakeret avatar Dec 19 '17 16:12 jakeret

Hi, thanks for the great repo, it is very nicely documented and organised! I have a doubt regarding fixing the output size. My input is 128x128, and output is coming to be 88x88. What changes should be done to get output of same size? Thanks

314rated avatar Apr 11 '18 03:04 314rated

Try slightly bigger input, for example.

AlibekJ avatar Apr 11 '18 03:04 AlibekJ

@314rated I get the same shape with input by padding large value to input, and you can center crop the output in input_size when you get the output image.

saicoco avatar Apr 24 '18 03:04 saicoco

@saicoco Thanks! I shall try that

314rated avatar Apr 24 '18 03:04 314rated