Using ImageJ as part of Python classification pipeline? Yes or no?

Using ImageJ as part of Python classification pipeline? Yes or no?

Particularly for manual segmenting (freehand or some sort of polygon).


  • Is ImageJ small enough to ship?
  • Will it run reliably?
  • Is there something simpler available?

Is pyimagej the solution?

I’m not sure if this will fit your needs or not, but if you are doing manual segmentation you could check out LabelStudio.

I wrote up a blog post about it getting it configured here.

A while ago I wrote a short blog article how to transfer ImageJ image and ROI data to R with Bio7 by means of Rserve, disconnect the Java connection to R and connect R (working as a kind of data storage) to Python with the package ‘pyRserve’ to access and postprocess the data in a Python workflow, see:

(Step 4 - see summary - is not necessary anymore!)

The simple Groovy scripts to disconnect Java and connect Python to R are now shipped with Bio7 (and can easily adapted).

With the latest release of Bio7 individual ImageJ ROI classes can easily transferred to R (Java connection) to be used for, e.g., supervised classification, see:

By installing PyDev in Bio7 you have a very powerful Python editor available, too (instead of using the default Bio7 Jython/Python editor).

You might want to check out #napari, which I suspect will do the trick for you.

Here’s the tutorial on the shapes layers, which you can use to define ROIs in the GUI, then pull them back into your python pipeline:

1 Like