mask
Opened this issue · 3 comments
COTR/COTR/trainers/cotr_trainer.py
Line 143 in 5c9363f
why do you use 10 divided by
MAX_SIZE
?I can't understand the principle of mask
The mask is used to enforce cycle-consistency loss. We want to enforce cycle-consistency loss only on already close enough correspondences, not catastrophically wrong correspondences. 10/MAX_SIZE
is an empirical number for a good measurement of "close enough".
My best guess for the reasons of the drifting in your case is the textureless white and black regions make the correspondences inaccurate.
thanks!
I found a magical thing that cycle_loss calculation, after flipping the image and query, the calculated cycle_loss should be the same as before the flip. Because the essence is to calculate the pred of B from picture A, and then calculate the cycle of A from the pred of B, the difference is only in which A and B are on the left, but the truth is that this two cycle_loss are not the same.