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:
This is the result from triplicating CD8 to occupy all three channels before segmenting the image, where we don't see mask expansion:
We also see mask expansion when segmenting DAPI single channel images (although the issue is less prevalent):
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.
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:
This is the result from triplicating CD8 to occupy all three channels before segmenting the image, where we don't see mask expansion:
We also see mask expansion when segmenting DAPI single channel images (although the issue is less prevalent):
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.