Git Product home page Git Product logo

imagej-modelzoo's Introduction

imagej-modelzoo's People

Contributors

ctrueden avatar frauzufall avatar jdeschamps avatar tomburke-rse avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

imagej-modelzoo's Issues

Empty Metadata fields in new model throw exception

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

Modelzoo exporter command

We need a command & API to export trained models into modelzoo format.

Use cases

Export SavedModelBundle method

  • input: SavedModelBundle directory (including variables, saved_model.pb)
  • input: additional needed parameters (inputs, outputs, data type etc.)

Add missing information to existing YAML specification

  • input: A ZIP file with a SavedModelBundle and a model.yaml file

Goal

The 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.).

Existing code

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

NoClassDefFoundError

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.

Unclear error message for no open images, when loading model

A confusing message pops-up when attempting to load a bioimage.io model without open images.
"A RandomAccessibleInterval is required but none exist."

bioimage_predict_noimage

Happens both through File > Import > bioimage.io.zip and Plugins > bioimage.io > bioimage.io prediction

Hosting models for BioImage.IO

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.