MIScnn icon indicating copy to clipboard operation
MIScnn copied to clipboard

155-overlay_segmentation-function-is-missing

Open Pfleiderer-Adrian opened this issue 3 years ago • 5 comments
trafficstars

  • add missing "overlay_segmentation"-function
  • adjust function calls with necessary num_classes-value
  • add seaborn package for color palette generation
  • add seaborn package in the requirements.txt file

Pfleiderer-Adrian avatar Jun 15 '22 22:06 Pfleiderer-Adrian

seaborn needs to be added to setup.py as well

muellerdo avatar Jun 30 '22 10:06 muellerdo

seaborn needs to be added to setup.py as well

done.

Pfleiderer-Adrian avatar Jul 04 '22 17:07 Pfleiderer-Adrian

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.

Deathlymad avatar Jul 08 '22 10:07 Deathlymad

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.

Pfleiderer-Adrian avatar Jul 08 '22 11:07 Pfleiderer-Adrian

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 avatar Jul 09 '22 21:07 Deathlymad

stale, will close for now

Deathlymad avatar May 11 '23 19:05 Deathlymad