vanvalenlab / deepcell-tf

Deep Learning Library for Single Cell Analysis
https://deepcell.readthedocs.io
Other
423 stars 99 forks source link

Label Image Transformations #591

Open chnlyi opened 2 years ago

chnlyi commented 2 years ago

Are "fgbg" and "outer-distance" not used in the current "deep_watershed"?

msschwartz21 commented 2 years ago

Hi chnlyi,

The foreground-background transform is used as part of the model training process, but it is not used in prediction. deepcell_toolbox.deep_watershed takes a list of images as inputs where the first item in the list is inner distance and the second item in the list is the outer distance.

chnlyi commented 2 years ago
  1. If I use dictionary in "num_semantic_classes", do I still need to specify "num_semantic_heads"?

  2. How are these classes getting their numbers { 'inner_distance': 1, 'outer_distance': 1, 'fgbg': 2, 'pixelwise': 3}?

  3. In function deep_watershed, by default, maxima_index=0, interior_index=-1. If I use { 'inner_distance': 1, 'outer_distance': 1, 'fgbg': 2, 'pixelwise': 3} in training, and { 'inner_distance': 1, 'outer_distance': 1, 'pixelwise': 3} in prediction, will 'outer_distance': 1 be used?

msschwartz21 commented 2 years ago

Can you include the code snippet that you are working off so that I can have a bit more context for your questions?

AlexInJar commented 2 years ago

May I ask how the outer distance transformed is calculated? In the paper, I can seem to find the inner distance as $d_i = \frac{1}{1+\alpha \beta \gamma}$, but not the outer distance.