Skip to content

Installation requirements

esgomezm edited this page Mar 9, 2021 · 16 revisions

Automatic installation with Fiji update sites (optional for ImageJ2 and Fiji distributions)

In Fiji or Image2:

  • In Fiji/ImageJ, click on Help > Update....
  • Once the ImageJ Updater pops up, click on Manage update sites > Add update site.
  • There you can write the name ("DeepImageJ") and the URL given (https://sites.imagej.net/DeepImageJ/).
  • Click on Close.
  • Click on Apply Changes. Then The plugin will then be installed automatically together with its java dependencies WARNING!: If you are using Windows, the previous steps will only let you using Tensorflow models. For PyTorch models, you still need to follow one more step: Visual studio installation.

Manual installation (mandatory when using ImageJ1)

  • Download the latest release of DeepImageJ at GitHub releases. The ZIP file (DeepImageJ.zip) contains all the necessary libraries (JAR files) and DeepImageJ_X.X.X.jar.
  • Unzip the ZIP file.
  • Copy the plugin executable DeepImage_X.X.X.jar in the plugins folder of ImageJ1 / Image2 / Fiji directory.
  • The folder Dependencies contains all the Java dependencies (.jar) needed. You can take all the dependencies and drag&drop them directly in ImageJ. Whenever it asks where to store them:
    • If you are in ImageJ1, in ImageJ/plugins/jars.
    • Otherwise, in the jars folder inside ImageJ/Fiji.
  • Otherwise, you can directly copy&paste all the dependencies in the locations specified above.

The last step might produce some version conflicts with existing libraries in your local installation. Thus being careful is advised. If there are already other versions of the dependencies inside the jars folder, some conflicts might appear when ImageJ2/Fiji is started, and the plugin might not function correctly.

Dependencies of DeepImageJ

The .jar executables included in the Dependencies folder and needed to run the plugin are:

  • api-0.7.0.jar
  • pytorch-native-auto-1.6.0.jar
  • pytorch-engine-0.7.0.jar
  • imagej-tensorflow-1.1.6.jar
  • kotlin-stdlib-1.3.72.jar
  • libtensorflow-1.15.0.jar
  • libtensorflow_jni-1.15.0.jar (libtensorflow_jni_gpu-1.15.0.jar for GPU support)
  • npy-0.3.3.jar
  • proto-1.15.0.jar
  • protobuf-java-3.5.1.jar
  • snake-yaml-1.2.1.jar

Note that for ImageJ1 we do not need the ImageJ-Tensorflow-1.6.0 jar as it corresponds to the TensorFlow version manager that allows changing Tensorflow versions from ImageJ2/Fiji. This feature is available for the ImageJ2/Fiji distributions, but not for the ImageJ1.

PyTorch dependencies for Windows OS

Pytorch is available for MacOs and Linux/Unix Operating Systems after the common installation. However, to use PyTorch models in Windows OS it is necessary to install Visual Studio 2019 redistributable:

Update TensorFlow version manually (mandatory for ImageJ1)

In order to switch between Tensorflow versions in ImageJ, the libtensorflow-1.15.0.jar and libtensorflow_jni-1.15.0.jar (or libtensorflow_jni_gpu-1.15.0.jar) dependencies need to be replaced by the executable .jar file corresponding to the desired version. All the available versions can be found at

Note that for the moment DeepImageJ only supports Tensorflow until version 1.15.0.

Clone this wiki locally