This is an ImageJ consumer for models from the bioimage model zoo.
imagej / imagej-modelzoo Goto Github PK
View Code? Open in Web Editor NEWLicense: BSD 2-Clause "Simplified" License
License: BSD 2-Clause "Simplified" License
This is an ImageJ consumer for models from the bioimage model zoo.
When editing the Metadata information of a new trained model, if the Description and Authors fields are left empty, it will throw the following error into the console (see below).
It only happens in a new trained model. If the same thing is done in a model that already had metadata in it, no error is shown.
[ERROR] Module threw exception
java.lang.NullPointerException
at net.imagej.modelzoo.consumer.command.ModelArchiveEditMetaDataCommand.stringToList(ModelArchiveEditMetaDataCommand.java:102)
at net.imagej.modelzoo.consumer.command.ModelArchiveEditMetaDataCommand.run(ModelArchiveEditMetaDataCommand.java:70)
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)
java.util.concurrent.ExecutionException: java.lang.NullPointerException
at java.util.concurrent.FutureTask.report(FutureTask.java:122)
at java.util.concurrent.FutureTask.get(FutureTask.java:192)
at net.imagej.modelzoo.display.SwingModelArchiveDisplayViewer.editMetaData(SwingModelArchiveDisplayViewer.java:458)
at net.imagej.modelzoo.display.SwingModelArchiveDisplayViewer.access$100(SwingModelArchiveDisplayViewer.java:104)
at net.imagej.modelzoo.display.SwingModelArchiveDisplayViewer$3.lambda$actionPerformed$0(SwingModelArchiveDisplayViewer.java:227)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.NullPointerException
at net.imagej.modelzoo.consumer.command.ModelArchiveEditMetaDataCommand.stringToList(ModelArchiveEditMetaDataCommand.java:102)
at net.imagej.modelzoo.consumer.command.ModelArchiveEditMetaDataCommand.run(ModelArchiveEditMetaDataCommand.java:70)
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)
... 1 more
We need a command & API to export trained models into modelzoo format.
SavedModelBundle
directory (including variables
, saved_model.pb
)SavedModelBundle
and a model.yaml
fileThe exporter should be able to write the YAML specification and ask the user for missing parameters (like author names, a doi to the training data etc.).
Writing the model is already implemented in Noise2Void in Fiji and should move from there to this repository, then N2V and others can use imagej-modelzoo
as a library: https://github.com/juglab/N2V_fiji/blob/master/src/main/java/de/csbdresden/n2v/train/ModelSpecification.java
Tagging @esgomezm @ctr26 in case it might be possible to reuse code from DeepImageJ for the UI part (discussion started in this issue). @tibuch
@tomburke-rse I am curious, why couldn't you just use a CachedCellImg
here?
I just created a spec compliant (0.3.2. which is the latest version) modelzoo example of stardist : stardist_test_v0.3.2.zip
Upon loading it in fiji, the following error gets thrown:
(cross referencing juglab/n2v#109)
Updating imglib2-cache (v1.0.0-beta-16) from the Fiji update site causes a NoClassDefFoundError in TiledImageDataReference.createTiledOutputView. Compiling against version 30.0.0 of the scijava-pom made the error disappear (but there are JUnit test failures that I did not investigate).
java.lang.NoClassDefFoundError: net/imglib2/cache/img/DiskCachedCellImgOptions$CacheType
at net.imagej.modelzoo.consumer.tiling.TiledImageDataReference.createTiledOutputView(TiledImageDataReference.java:204)
at net.imagej.modelzoo.consumer.tiling.TiledImageDataReference.createTiledOutputView(TiledImageDataReference.java:163)
at net.imagej.modelzoo.consumer.tiling.DefaultTiling.init(DefaultTiling.java:105)
at net.imagej.modelzoo.consumer.TiledPredictionExecutor.initTiling(TiledPredictionExecutor.java:188)
at net.imagej.modelzoo.consumer.TiledPredictionExecutor.run(TiledPredictionExecutor.java:84)
at net.imagej.modelzoo.consumer.AbstractModelZooPrediction.executePrediction(AbstractModelZooPrediction.java:210)
at net.imagej.modelzoo.consumer.AbstractModelZooPrediction.run(AbstractModelZooPrediction.java:105)
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: net.imglib2.cache.img.DiskCachedCellImgOptions$CacheType
at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
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)
... 18 more
This was reported in a N2V_fiji issue.
We are changing the way we provide models for BioImage.IO, please take a look at here: https://github.com/bioimage-io/bioimage.io/blob/master/docs/join-partners.md
This is the manifest file for Fiji: https://github.com/bioimage-io/fiji-bioimage-io/blob/master/manifest.bioimage.io.yaml
Since Fiji/ImageJ is a community partner, I think it's better to migrate this repo: https://github.com/bioimage-io/fiji-bioimage-io to the imagej organization, either merge with this repo or keep as is.
We are also thinking if a third-party contributor made a model for your imagej plugin, it make more sense to submit it to your managed model repo rather than BioImage.IO.
Another question I have is, what's the logo and name you would like to use? ImageJ or Fiji? In any case, you can change them yourself here: https://github.com/bioimage-io/fiji-bioimage-io/blob/6034c76cda97fd9db48c8c1d6e2e285d1a80136b/manifest.bioimage.io.yaml#L2-L16
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.