murphygroup / CellSegmentationEvaluator

Evaluating the quality of a cell segmentation method without reference.
MIT License
7 stars 2 forks source link

Requirements for masks #3

Closed smith6jt-cop closed 9 months ago

smith6jt-cop commented 9 months ago

Your instructions indicate a requirement of two channels for the masks:

The masks should be in a similar format with an indexed image for cell masks in the first channel and an indexed image (with corresponding indices) for nuclear masks in the second channel.

However, your example 2D_CODEX.ome.tiff masks is an image with 4 channels. These masks do not appear to be typical binary/labeled masks produced by any typical imaging platform.

Please provide clear complete instructions for generating the appropriate inputs.

rfmurphy commented 9 months ago

The mask image should contain channels for a cell mask and a nucleus mask (in that order). Other mask channels may be present but will be ignored. Each channel should contain an indexed image, in which pixels contain the integer number of the cell that that pixel belongs to. Most cell segmentation tools produce an indexed image.

I will be updating the README shortly.

smith6jt-cop commented 9 months ago

Does the mask need to be formatted such that there is a grayscale gradient that begins at the top of the image and then gradually decreases to the bottom like in the example mask image? This is the aspect that seems atypical. Does the gradient itself create the integer values for the mask so the bit depth is the bounds for the maximum number of cells?

rfmurphy commented 9 months ago

Dear Justin:

I’m debugging with your images that you sent me links to on December 4. Using that mask file, aicsimageio is returning the mask as uint16, and more than one cell has the same value (see below). Those files also read with the masks in the z slices like I mentioned earlier.

You mentioned in a later email that you “fixed” the images using skimage.io and posted updated images. However, I don’t see them anywhere. Can you send me links to the “fixed” images? I suspect that is the source of our disconnect.

I’ll make it a priority to debug this once I get the new images.

Best,

Bob

mp.imshow(mask1)  mp.imshow(mask1==5) 

Robert F. Murphy, Ph.D. Ray and Stephanie Lane Professor of Computational Biology Emeritus School of Computer Science Carnegie Mellon University email: @.*** AIMBE Fellow, IEEE Fellow

On Dec 7, 2023, at 5:30 PM, Justin Smith @.***> wrote:

Does the mask need to be formatted such that there is a grayscale gradient that begins at the top of the image and then gradually decreases to the bottom like in the example mask image? This is the aspect that seems atypical. Does the gradient itself create the integer values for the mask so the bit depth is the bounds for the maximum number of cells?

— Reply to this email directly, view it on GitHub https://github.com/murphygroup/CellSegmentationEvaluator/issues/3#issuecomment-1846208721, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHFTHREQNZWX47FIHERQ2H3YII7PXAVCNFSM6AAAAABAIMQ7A2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNBWGIYDQNZSGE. You are receiving this because you commented.

smith6jt-cop commented 9 months ago

Hello,

Thank you for your help. I cannot see the output for imshow; only OBJ with a dotted line around it. Here is the link to the 32bit mask image:

https://drive.google.com/file/d/1AUa32zqsywUK-sDBci6XORNUH2xnfj9r/view?usp=sharing

Thanks,

Justin Smith, PhD Dept of Pathology, Immunology, and Laboratory Medicine UF Diabetes Institute College of Medicine 1275 Center Drive, 5th Floor Gainesville, FL 32610

From: Robert F. Murphy @.> Sent: Friday, December 8, 2023 9:30 AM To: murphygroup/CellSegmentationEvaluator @.> Cc: Smith,Justin A @.>; Author @.> Subject: Re: [murphygroup/CellSegmentationEvaluator] Requirements for masks (Issue #3)

[External Email] Dear Justin:

I’m debugging with your images that you sent me links to on December 4. Using that mask file, aicsimageio is returning the mask as uint16, and more than one cell has the same value (see below). Those files also read with the masks in the z slices like I mentioned earlier.

You mentioned in a later email that you “fixed” the images using skimage.io and posted updated images. However, I don’t see them anywhere. Can you send me links to the “fixed” images? I suspect that is the source of our disconnect.

I’ll make it a priority to debug this once I get the new images.

Best,

Bob

mp.imshow(mask1)  mp.imshow(mask1==5) 

Robert F. Murphy, Ph.D. Ray and Stephanie Lane Professor of Computational Biology Emeritus School of Computer Science Carnegie Mellon University email: @.<mailto:@.> AIMBE Fellow, IEEE Fellow

On Dec 7, 2023, at 5:30 PM, Justin Smith @.<mailto:@.>> wrote:

Does the mask need to be formatted such that there is a grayscale gradient that begins at the top of the image and then gradually decreases to the bottom like in the example mask image? This is the aspect that seems atypical. Does the gradient itself create the integer values for the mask so the bit depth is the bounds for the maximum number of cells?

— Reply to this email directly, view it on GitHub https://github.com/murphygroup/CellSegmentationEvaluator/issues/3#issuecomment-1846208721, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHFTHREQNZWX47FIHERQ2H3YII7PXAVCNFSM6AAAAABAIMQ7A2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNBWGIYDQNZSGE. You are receiving this because you commented.

— Reply to this email directly, view it on GitHubhttps://github.com/murphygroup/CellSegmentationEvaluator/issues/3#issuecomment-1847279005, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ARQJN43YYZJZ6MBSO4PB523YIMP4ZAVCNFSM6AAAAABAIMQ7A2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNBXGI3TSMBQGU. You are receiving this because you authored the thread.Message ID: @.**@.>>

smith6jt-cop commented 9 months ago

I found that there are known issues with labeled mask images created in QuPath using .useInstanceLabels(). See https://forum.image.sc/t/exporting-cell-segmentation-as-label-mask/66999/9 . However, I believe the problem has been fixed in the most recent version of QuPath-0.5 as .useInstanceLabels() results in mask images similar to the example mask images (grayscale gradient).

The issue regarding whether the requirement for mask images is 4 channels as the example mask images have has been resolved.

rfmurphy commented 9 months ago

The new masks you posted seem fine. Closing this issue.