Skip to content

[BUG] Mask expansion / inflated masks with Cellpose-SAM on single-channel microscopy images #1442

@walkeraw2002

Description

@walkeraw2002

The Bug

When segmenting single-channel microscopy images with Cellpose-SAM, I’m seeing mask expansion / inflated masks. There is expansion for both membrane markers and nuclear markers.

When I triplicate the channel to RGB, I see improved results. When I use an RGB screenshot taken from an image viewer, I also see improved results.

I have tried cellpose default normalization along with custom normalization methods. I have tried changing image bit depth as well, but the only thing that changes the behavior is triplicating the single channel.

In the docs it states that Cellpose-SAM was trained on two channel images (one membrane and one nuclei), with the other channel set to zero, but I'm not sure what the best practices are for segmenting membrane or nuclei on it's own as a single channel.

Below is an example where we see mask expansion when segmenting a CD8 membrane image. To generate this result, CD8 was placed in the first channel and the other two were zeroed out:

Image

This is the result from triplicating CD8 to occupy all three channels before segmenting the image, where we don't see mask expansion:

Image

We also see mask expansion when segmenting DAPI single channel images (although the issue is less prevalent):

Image

Question

Are there any tips or best practices out there for segmenting single channel images and avoiding this mask expansion? Is the only way to triplicate the single channel across all three channels or are there alternative ways of solving this issue? I'm not sure if the model being trained on images with cytoplasm and nuclear channels in any order, and the other channel set to zero, is causing this to happen.

Any advice would be much appreciated. Thank you for your time.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions