New Segmentation Tool

Hi everyone,

I just complete an early version of a simple ML-based 2-D nucleus/cell segmentation tool (as jupyter notebook).

It is based on:
a) The U-Net from Cellprofiler
b) The StarDist Model
c) The Cellpose Model

Typically, the user provides a .lif file, or a folder containing many .tif files as input (e.g. Z-Stacks).
In the simplest workflow you will just need to provide the filepath.

In this case the notebook will:
a) Run six standard pre-processing methods (1…6)
b) Run on these intermediate results the segmentation using (a,b,c)
c) Post-process images (filtering for min and max cell size).

Results are saved as segmentation masks (first folder), and overlays displaying the cell border as red line (second folder).

Typically, you would run a test on a subset of your images and simply look at the results (which you can open as Z-stack in Fiji).

The settings used to create the best result, might be used to segment all your images.
If none looks good, you might train you own model (elsewhere), and make it then available through this tool.

If you want to test the tool now, you should have a GPU and know how to create a Python environment from an .yml file.

At current creating tiles is not yet implemented.
The largest tested file size is 2048 x 2048 x n.
Please let me know if you have any further questions.

I would appreciate a lot, if some of you were interested to beta-test my tool.
Please message me & I will invite you to the repository. I would then kindly ask you to give me feedback & and share some test data. The tool might be further developed in many directions. Although I might not be able to follow up on most of them, I would encourage you to contribute to the tool whatever you would need for your application.

Thanks a lot &
Kind regards


Why not just make the repository public? Experience shows that you can get most valuable feedback by opening up your work to the community.

At least for my part: I’m happy to test anything that’s open source, but I’m not willing to serve as a private beta tester :wink:


Dear Jan,

because it is at an early stage and there might be too many issues to deal with once it is public.
I am primarily head of an electron and light microscopy facility. Thus, i could deal with issues only when time permits. I could have waited & make it public once it is mature (as most of you likely do).

But that might have taken too long given how bussy i currently am. Thus, decided to what i can do,
share it with a few people who are interested to beta-test, or even better help to co-develop.

Once it is mature (and i had time to make a good documentation & can provide a few example data sets),
i (or hopefully we) will make it public and announce it here.

So it is also about sharing effort.

All the Best


I strongly agree with @imagejan on this. I am happy to look at open source tools, but am very hesitant to look at anything that’s private (unless there is a strong reason like licensing issues).

This is a fair disclaimer, that can be added to a public repository. You are not obligated to look into all new issues that are being opened up; though they might provide valuable feedback.
However to attract potential co-developers having a public repository is a huge asset; discussion can happen in public, visibility etc.


1 Like

Please invite me.

1 Like

Dear Jagadish,

I just did so. I’m glad if the code might be useful to you!

Dear All,

best send a private message (to avoid SPAM) unless your email is anyway publicly known in the internet.

Kind regards


Dear Jan,
Dear All,

I just made the repository public & am looking forward to your feedback!

Kind regards



Please find here the full description: