CSBDeep update site changes: N2V & DenoiSeg compatible to bioimage.io specification version 0.3.0

Hi all,

the CSBDeep update site got updates! It’s mostly related to making our tools compatible with the first official cross-platform bioimage.io specification (version 0.3.0). What does that mean? Multiple groups are working hard on defining a common format for sharing trained models, and users will be able to reuse models on different platforms, some day soon!

WARNING: The plugins are still experimental, please be cautious with the results and let us know if something behaves unexpectedly. Also, we might introduce breaking changes in the future and also with this release - you should be able to use existing trained models, but in case you use DenoiSeg in scripts/ workflows, you might have to adjust them. Happy to help with any of that!

General changes

  • New plugin: Plugins > bioimage.io > bioimage.io model prediction which you can use for N2V and DenoiSeg models (trained with the new version). This plugin will be able to handle a variety of models in the future. Alternatively, you can import the model via import > bioimage.io.zip and interact with the model display directly.

  • Super basic progress window during prediction - you can disable it in the options of the prediction plugin, but it adds the possibility to cancel multi-tiled predictions.

  • New prediction option to convert the output into the data type of the input. Be aware that if output values are outside of the range of the input data type, the result will be clipped (and you might not like that).

  • bioimage.io model metadata can (partly) be edited - after importing a model, click File actions > Edit metadata to edit the model name, author, description and tags. Please be aware that the current version implies anyone listed as author trained the model and created this archive - in the near future it will become possible to put separate authors for model training vs model archive creation.

DenoiSeg output split

  • The DenoiSeg prediction will now create two outputs, one is the denoised image and the other one the segmentation probabilities (3 channels: background, foreground, border). This will also happen when you run models you have previously trained (with the older version of DenoiSeg). Please adjust e.g. your scripts accordingly, double check the result and let us know if this causes issues - we are happy to help!

Stopping training, exporting during training

  • we fixed issues with canceling or early stopping the N2V and DenoiSeg training

  • you can now also export a model archive during training at any timepoint

N2V sanity check

  • The sanity check of N2V additionally displays the difference image between the expected output and the predicted output.

  • Before we calculate the MSE and PSNR values, the predicted output gets normalized to be in the same intensity range as the input image.

Resources for developers

Here are two helpful links for anyone who wants to have a look at our libraries or join efforts on using and improving them:

As always, feedback and bug reports are most welcome, please feel free to ask any questions. Thanks to everyone who provided feedback in the past and sorry for being less responsive during the last weeks. Welcome to @tomburke-rse who joined our team and worked with @tibuch and me on this release.



Cool. Especially the standardization of model storage s what think is nned.
Hopefully there will not be too many such st andards…

We already have our own standard already (see czmodel) that will be extended step by step for quite a while are are really happy with it.

I am wondering what is your take on a unified standard for model storage in microscopy.

1 Like

The bioimage.io specification will be used by ImJoy, Ilastik, Fiji, CSBDeep, ZeroCostDL4Mic, DeepImageJ, and HPA, more groups will for sure follow. We currently meet weekly to discuss the specification. It’s a slow, but very productive and rewarding process. All resources are publicly available. Therefore my take is that whoever is interested in a unified standard should get in touch and join the journey :slight_smile:


Ok, our standard format currently works for TF.SavedModel (TF2 only) and will most likely extended for ONNX.

What we use is not so far away from the YAML format you seem to use. I will have a look and think about it.

By the way, also everybody would be invited to use our standard as well, but I am afraid this not an option for the community … :wink:


Thanks for the update!

I am getting the following error regarding a missing library when trying to run N2V predict

[ERROR] Module threw error
java.lang.NoClassDefFoundError: org/apache/commons/compress/utils/FileNameUtils
	at net.imagej.modelzoo.DefaultModelZooArchive.extract(DefaultModelZooArchive.java:174)
	at net.imagej.modelzoo.DefaultModelZooArchive.createModelInstance(DefaultModelZooArchive.java:109)
	at net.imagej.modelzoo.consumer.AbstractModelZooPrediction.loadModel(AbstractModelZooPrediction.java:156)
	at net.imagej.modelzoo.consumer.AbstractModelZooPrediction.run(AbstractModelZooPrediction.java:99)
	at net.imagej.modelzoo.consumer.command.AbstractSingleImagePredictionCommand.run(AbstractSingleImagePredictionCommand.java:101)
	at de.csbdresden.n2v.command.N2VPredictCommand.run(N2VPredictCommand.java:59)
	at org.scijava.command.CommandModule.run(CommandModule.java:196)
	at org.scijava.module.ModuleRunner.run(ModuleRunner.java:165)
	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)
Caused by: java.lang.ClassNotFoundException: org.apache.commons.compress.utils.FileNameUtils
	at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
	... 15 more

Is ther an apache.commons package I am supposed to install?

Thanks for the help


The Java-8 update site is serving jars/commons-compress-1.2.0.jar in my Fiji - can you check in the Advanced mode of the updater if you have a commons-compress library and if yes, which version and from which update site?

Dear @frauzufall

Here is the file:

Odd. Running the updater, which said everything is up to date, closing Fiji and reopening it fixed the issue… Apologies for the lost time…


No problem :slight_smile: Happy it works now!! The updater is a mysterious creature.

1 Like

This thread helped me! I was receiving a commons-compress.jar from NanoJ-Core. After removing NanoJ-Core from my update sites which let Java-8 serve this .jar to me, the error went away.