SBU-BMI / quip_cnn_segmentation

CNN based segmentation codes
BSD 3-Clause "New" or "Revised" License
47 stars 17 forks source link

*.SVS is't registered with it's mask. #8

Closed WxpHB closed 3 years ago

WxpHB commented 3 years ago

Hi, maintainer: I slice [:20000,0:20000] from both *.svs and it's mask for a test, but they don't registered. The tested WSI is TCGA-4J-AA1J-01Z-00-DX1.8E768211-46FC-45A4-8689-6DDEA0198D43.svs 捕获

lehougoogle commented 3 years ago

Hi,

Did you use the following script for extracting segmentation mask (see segmentation-of-nuclei/READMD.md)? https://github.com/SBU-BMI/quip_cnn_segmentation/blob/master/segmentation-of-nuclei/extract_patch_segmentation_mask.py

If yes, is this the only image you tested? If no, please try that script. The microns per-pixel (mpp) value in each whole slide image might not be exactly 0.25, which will make the scaling different.

Thx

WxpHB commented 3 years ago

Hi, I used the script you provide to extract segmentation mask,and i tested several WSIs. The image and it's mask still can't be registered. For example:

图片 图片 图片 图片

for detail: segmentation mask: test_10

difference between WSI slice and it's mask: difference_4000

WxpHB commented 3 years ago

and even in the different place of the same slice,there are displacement in different direction,for example: left-down direction displacement direction_1 right-down direction displacement direction_2

lehougoogle commented 3 years ago

Hi,

Sorry to see errors. From the figure "difference between WSI slice and its mask", I see that on the top-left corner, the image and the mask sort of aligned. So this probably indicates scaling issue.

From your python code, I see that you extract image regions without scaling. Can you rerun the extract_patch_segmentation_mask.py by setting scale_to_40X to False? https://github.com/SBU-BMI/quip_cnn_segmentation/blob/master/segmentation-of-nuclei/extract_patch_segmentation_mask.py#L30

For the last two patches you showed where the displacements are inconsistent, what were the <x, y> coordinates of these two patches? Maybe that would give me a hint of where the problem might be.

Thx

scotthoule commented 3 years ago

Hi WxpHB,

Have you tried setting scale_to_40X to False? If yes, does the mis-alignment problem still persist?

Thx

alphaccw commented 3 years ago

After setting the scale_to_40X to False, for my test image, the displacement problem is solved.

Thanks a lot.

WxpHB commented 3 years ago

Hi,

Sorry to see errors. From the figure "difference between WSI slice and its mask", I see that on the top-left corner, the image and the mask sort of aligned. So this probably indicates scaling issue.

From your python code, I see that you extract image regions without scaling. Can you rerun the extract_patch_segmentation_mask.py by setting scale_to_40X to False? https://github.com/SBU-BMI/quip_cnn_segmentation/blob/master/segmentation-of-nuclei/extract_patch_segmentation_mask.py#L30

For the last two patches you showed where the displacements are inconsistent, what were the <x, y> coordinates of these two patches? Maybe that would give me a hint of where the problem might be.

Thx

Hi,

Please forgive a layman of WSI for asking that stupid question,problem solved,thank for your excellent work!

scotthoule commented 3 years ago

No worries at all. Please do not hesitate to leave a message should you have further questions.