spreka / biomagdsb

This repository contains the codes to run the nuclei segmentation pipeline of the BIOMAG group inspired by Kaggle's Data Science Bowl 2018 competition
52 stars 15 forks source link

Network not detecting groups of nuclei #10

Closed jasperblee closed 4 years ago

jasperblee commented 4 years ago

Hello,

I have noticed that the algorithm will fail to detect clusters of nuclei, with the resulting segmentation containing large empty gaps. I have attached two representative images of this situation. Is there any way I can modify the algorithm, or pre-process my image, to prevent this from happening? Thank you!

image

image

spreka commented 4 years ago

@jasperblee Thanks for reaching out and sorry for the late response. I tested your image using the presegmenter and the final model, respectively. When only using the fast prediction (without calculating resizing) it already found more nuclei. If you set the size (median size, I tested with 15), results will further improve. As examples, please see the segmentations outlined in red, overlayed on the original image (for better visibility) below.

fast prediction (default settings, presegmenter model): 90593552-37854600-e1b6-11ea-9c10-d28ae4c92e1d

fast prediction (size 15, presegmenter model): 90593552-37854600-e1b6-11ea-9c10-d28ae4c92e1d

fast prediction (size 15, final model): 90593552-37854600-e1b6-11ea-9c10-d28ae4c92e1d

You can run these with the bash/batch scripts run_workflow_predictOnly_fast_manualsize.sh . testImages or run_workflow_predictOnly_fast_manualsize.bat . testImages on the default test image folder in the repo as an example, after setting the target_object_size parameter in \kaggle_workflow\maskrcnn\config\predict\presegment_manualsize.json to e.g. 15.

Let me know if you could manage to solve the clumped region-issue on your images.

jasperblee commented 4 years ago

Hello,

Thank you for the help! I set the target size to 15 as you said, and ran the fast prediction. One question - when I run this, the program stops running after "PRESEGMENTATION DONE". Is this the intended behavior, and the later algorithm steps that occur during the full prediction pipeline are the resizing steps that I am meant to ignore?

spreka commented 4 years ago

@jasperblee this manualsize fast prediction was only a demonstration of how you can set the size parameter. You can change the full prediction pipeline to include this instead of the default size calculation based on the presegmented masks. It is up to you whether you want to include the post-processing steps :)

jasperblee commented 4 years ago

@spreka Thank you for the clarification, and for helping troubleshoot - the results are much better now!