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.

Thanks!!

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
java.lang.NullPointerException
at io.scif.services.DefaultInitializeService.initializeReader(DefaultInitializeService.java:87)
at io.scif.img.ImgOpener.createReader(ImgOpener.java:483)
at io.scif.img.ImgOpener.openImgs(ImgOpener.java:242)
at io.scif.services.DefaultDatasetIOService.open(DefaultDatasetIOService.java:152)
at io.scif.services.DefaultDatasetIOService.open(DefaultDatasetIOService.java:133)
at io.scif.services.DefaultDatasetIOService.open(DefaultDatasetIOService.java:138)
at io.scif.convert.FileToDatasetConverter.convert(FileToDatasetConverter.java:66)
at org.scijava.convert.AbstractConvertService.convert(AbstractConvertService.java:125)
at org.scijava.convert.AbstractDelegateConverter.convert(AbstractDelegateConverter.java:53)
at org.scijava.convert.AbstractConvertService.convert(AbstractConvertService.java:125)
at org.scijava.module.DefaultModuleService.load(DefaultModuleService.java:316)
at org.scijava.module.DefaultModuleService.loadInput(DefaultModuleService.java:544)
at org.scijava.module.DefaultModuleService.lambda$loadInputs$1(DefaultModuleService.java:346)
at java.util.ArrayList.forEach(ArrayList.java:1257)
at java.util.Collections$UnmodifiableCollection.forEach(Collections.java:1080)
at org.scijava.module.DefaultModuleService.loadInputs(DefaultModuleService.java:346)
at org.scijava.module.process.LoadInputsPreprocessor.process(LoadInputsPreprocessor.java:58)
at org.scijava.module.ModuleRunner.preProcess(ModuleRunner.java:102)
at org.scijava.module.ModuleRunner.run(ModuleRunner.java:154)
at org.scijava.module.ModuleRunner.call(ModuleRunner.java:124)
at org.scijava.module.ModuleRunner.call(ModuleRunner.java:63)
at org.scijava.thread.DefaultThreadService.lambda$wrap$2(DefaultThreadService.java:225)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)

Hope all the information is clear.
Thanks!

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!