instance-segmentation-with-discriminative-loss-tensorflow icon indicating copy to clipboard operation
instance-segmentation-with-discriminative-loss-tensorflow copied to clipboard

Clustering in discriminative loss

Open mikeedi opened this issue 5 years ago • 2 comments

In the original paper https://arxiv.org/pdf/1708.02551.pdf they are used only pixels of concrete class (without background) and then do instance segmentation. But in discriminative_loss.py you calculate loss for full embedding tensor including background: unique_labels, unique_id, counts = tf.unique_with_counts(correct_label) counts = tf.cast(counts, tf.float32) num_instances = tf.size(unique_labels) Here num_instances here = num of lines + 1 (background class) Am I right?

mikeedi avatar Feb 28 '19 16:02 mikeedi

Yes, you are correct.

hq-jiang avatar Mar 01 '19 11:03 hq-jiang

Is this advisable? Why not mask the output tensor so that only the foreground pixels are used in the computation of the loss?

JadTawil-theonly avatar May 06 '20 17:05 JadTawil-theonly