You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Circle loss is recently proposed (https://arxiv.org/abs/2002.10857) for image recognition tasks (face recognition, person re-identification, and image retrieval).
The implementation could be summarized as:
for i, j in ...:
alpha_i = tf.stop_gradient(tf.nn.relu(1 + m - score_i))
alpha_j = tf.stop_gradient(tf.nn.relu(score_j + m))
loss = alpha_j * (score_j - m) - alpha_i * (score_i - 1 + m)
loss = tf.exp(loss * gamma)
return tf.math.log1p(tf.math.reduce_sum(losses))
and score should be in [0, 1].
As for lambda weight, the loss might be modified as tf.math.log1p(tf.math.reduce_sum(losses * loss_weights)).
The text was updated successfully, but these errors were encountered:
Circle loss is recently proposed (https://arxiv.org/abs/2002.10857) for image recognition tasks (face recognition, person re-identification, and image retrieval).
The implementation could be summarized as:
and score should be in [0, 1].
As for lambda weight, the loss might be modified as
tf.math.log1p(tf.math.reduce_sum(losses * loss_weights))
.The text was updated successfully, but these errors were encountered: