princeton-vl / relative_depth

Code for the NIPS 2016 paper
BSD 3-Clause "New" or "Revised" License
124 stars 32 forks source link

About the loss funtion #5

Closed Ariel-JUAN closed 6 years ago

Ariel-JUAN commented 6 years ago

Hi, thanks for sharing the great work. I try some Internet images and it works really well. Can you tell me how to define closer and further in loss function? I am really confused.
Thank you!

wfchen-umich commented 6 years ago

Hi, if point A is further away than point B, then the label rel_AB = 1. If A is at the same depth as B, then rel_AB = 0; if point A is closer than point B, then the label rel_AB = -1.

Ariel-JUAN commented 6 years ago

Thank you~

nian-liu commented 5 years ago

Hi, if point A is further away than point B, then the label rel_AB = 1. If A is at the same depth as B, then rel_AB = 0; if point A is closer than point B, then the label rel_AB = -1.

Hi, @wfchen-umich It seems that it's a bit confusing for the description in the "Loss Function" section in the paper. It says "and r_k \in {+1,-1,0} is the ground-truth depth relation between i_k and j_k: closer (+1), further (−1), and equal (0)" in this section. According to your reply and the loss function, "closer(+1)" should mean j_k is closer than i_k, and "further (−1)" means j_k is further away than i_k. But based on a direct understanding of this sentence, one is easy to treat "i_k" and "j_k" as the subject and the object, respectively, which leads to an inverse relation.