frankkramer-lab / MIScnn

A framework for Medical Image Segmentation with Convolutional Neural Networks and Deep Learning
GNU General Public License v3.0
398 stars 116 forks source link

155-overlay_segmentation-function-is-missing #156

Closed Pfleiderer-Adrian closed 1 year ago

Pfleiderer-Adrian commented 2 years ago
muellerdo commented 2 years ago

seaborn needs to be added to setup.py as well

Pfleiderer-Adrian commented 2 years ago

seaborn needs to be added to setup.py as well

done.

Deathlymad commented 2 years ago

So afaik the overlay_segmentation was renamed to overlay_segmentation_greyscale. The reason for that was the the existing overlay segmentation function did not handle RGB valued volume inputs that may exist.

It would be great if you pointed the motivation out for me again. (What overlay_segmentation has over overlay_segmentation_greyscale) Furthermore it would be great if you removed the need for seaborn. Matplotlib can handle colormaps in a similar fashion which would remove the need for the library.

Pfleiderer-Adrian commented 2 years ago

So afaik the overlay_segmentation was renamed to overlay_segmentation_greyscale. The reason for that was the the existing overlay segmentation function did not handle RGB valued volume inputs that may exist.

oh ok. now i understand why that was renamed. I will revise the pull request again for RGB volumes.

It would be great if you pointed the motivation out for me again. (What overlay_segmentation has over overlay_segmentation_greyscale) Furthermore it would be great if you removed the need for seaborn. Matplotlib can handle colormaps in a similar fashion which would remove the need for the library.

First, the function calls have not been adjusted. All function-calls still call the old "overlay_segmentation" function. This results in a function not found error. Furthermore, the overlay_segmentation_greyscale function generates extremely dark colors (black, gray, ..) for ascending labels (0, 1, 2, ..) which cannot be recognized on greyscale images (only tested on master-branch maybe this has changed in dev). With the color_palette-function, Seaborn delivers a uniform and ideally distributed color spectrum across all classes to ensure that the colors are as different as possible for each class.

Deathlymad commented 2 years ago

I just read the github computed diff in the PR tab. But after reading all commits including the merge commit i cannot figure out for the life of me why it says the functions change.

I have not seen a case where the colors act in the way you are describing. Do you haave an exaample case? As for the color spectrum that entirely depends on the colormap that is used. Virdis is the scale commonly used by heatmaps. If you want an ideally distributed scolor spectrum you can just set it to hsv for example.

Deathlymad commented 1 year ago

stale, will close for now