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?
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?