Module Threw Exception [Error]

Hi csbdeep team,

Great and awesome tools but after I used n2v (in Fiji) to train once (two models outputs) and predicted. I could not go further. I always get this Error (module threw exception) when I use predict with new trained model. Other modules currently stay fine. I tried TF with CPU or GPU but doesn’t make impact. Does anybody could advice? Otherwise I would try to use csbdeep in Python.


Hi @Meng_Ju_Lin,

Please describe in more detail what you did exactly, with which tensorflow versions, and what the full error message was. Maybe we can help you then. @frauzufall

Hi @mweigert ,

Sure. I tried to train and predict one of my images and let it train 300 steps about two days. Then I finished the training and got two models and one predicted image. It looks awesome. But when I want to use the model to predict another image, the error appears. I closed all the windows and open the model then predict again, the error shows up.

I tried copy this model to my second computer then run predict. It works! But the second time, the error shows up again.

I think right now my tensorflow versions is 1.15. And I tried both CPU with my old computer and GPU with my new PC, both fail at the predict step. And the error even shows up when I’d like to use predict in Denoiseg in one of my computer. All other function look fine (such as DEMO).

Below is the error message:

[ERROR] Module threw exception
	at io.scif.img.ImgOpener.createReader(
	at io.scif.img.ImgOpener.openImgs(
	at io.scif.convert.FileToDatasetConverter.convert(
	at org.scijava.convert.AbstractConvertService.convert(
	at org.scijava.convert.AbstractDelegateConverter.convert(
	at org.scijava.convert.AbstractConvertService.convert(
	at org.scijava.module.DefaultModuleService.load(
	at org.scijava.module.DefaultModuleService.loadInput(
	at org.scijava.module.DefaultModuleService.lambda$loadInputs$1(
	at java.util.ArrayList.forEach(
	at java.util.Collections$UnmodifiableCollection.forEach(
	at org.scijava.module.DefaultModuleService.loadInputs(
	at org.scijava.module.process.LoadInputsPreprocessor.process(
	at org.scijava.module.ModuleRunner.preProcess(
	at org.scijava.thread.DefaultThreadService.lambda$wrap$2(
	at java.util.concurrent.ThreadPoolExecutor.runWorker(
	at java.util.concurrent.ThreadPoolExecutor$

Hope all the information is clear.

Might be related @tibuch @frauzufall

Thanks for reporting, can you update Fiji and try again? There seems to be an issue with the persistence of image input parameters in the new Fiji, I don’t think it has anything to do with N2V or TensorFlow specifically, and I uploaded a version with a workaround (at least for me it does not throw this error any more). Please let me know if it works for you as well :slight_smile:

I still have to do the same workaround for DenoiSeg so another update will follow soon.

1 Like

Hi @frauzufall,

Thanks for this updates. I’ve updated Fiji with two updates from csbdeep and it works! Thanks for this immediate response and awesome tool! Looking forward to the new workaround update for DenoiSeg.

1 Like

Hey @Meng_Ju_Lin, I finally also updated DenoiSeg, sorry for the long delay!

I reported the issue here as well: