deepimagej / deepimagej-plugin

The ImageJ plugin to run deep-learning models
https://deepimagej.github.io/deepimagej/
BSD 2-Clause "Simplified" License
86 stars 13 forks source link

Error patch size is too large #5

Closed NicolasCARPi closed 5 years ago

NicolasCARPi commented 5 years ago

I'm trying to run the Noise2Void Denoising model on my images. When selecting the model from the Run menu, the patch size is set to 400 and one cannot modify it.

But when running it, the error is "Patch size is too large (400)".

Why can't I change the patch size and why is it giving me this error?

I tried with 2 channel timelapse, then one channel, then one image, always the same error.

See debug log (no pre or post processing):

DeepImageJ (8.9 us) : Load model: Fully Residual U-net - TEM(fru-net_sev_segmentation) DeepImageJ (18.4 ms) : Load model error: false DeepImageJ (18.9 ms) : start progress DeepImageJ (75.0 ms) : start runner DeepImageJ (75.4 ms) : call runner DeepImageJ (76.4 ms) : image size 1756x45 Error patch size is too large 400 DeepImageJ (82.6 ms) : Error, output is null

Cheers, ~Nico

carlosuc3m commented 5 years ago

Hello Nico, The patch size is fixed to 400x400 because the network only admits images of that size because of the way it was programmed. The plugin does not apply the model to that image because it requires images whose size is at most three times smaller than the patch size. So this model requires images whose smallest dimension is 134 or more (in your case is 45). However this limitation might be removed in the near future. Thank you again for you feedback!!

Carlos

NicolasCARPi commented 5 years ago

I see. Indeed it would be nice if this limitation could be removed ;)

carlosuc3m commented 5 years ago

Hello Nico, It seems that this limitation is going to be maintained at least for this version. Regards, Carlos