Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clustering in discriminative loss #13

Open
mikeedi opened this issue Feb 28, 2019 · 2 comments
Open

Clustering in discriminative loss #13

mikeedi opened this issue Feb 28, 2019 · 2 comments

Comments

@mikeedi
Copy link

mikeedi commented Feb 28, 2019

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?

@hq-jiang
Copy link
Owner

hq-jiang commented Mar 1, 2019

Yes, you are correct.

@JadTawil-theonly
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants