PruneTruong/DenseMatching

Loss calculation

Closed this issue · 3 comments

Hi,
Thanks for this wonderful project. I would like to know whether the mask is involved in the loss calculation during training.

Hi, thanks! Which mask are you referring to?

I am confused about that whether the predicted confidence map can reflect the reliability of the predicted flow and also identify the out-of-view pixels. If all works, I want to know if the out-of-view pixels are involved in the training and the loss is calculated on the out-of-view regions?

Hi, i think i answered you via email, but just to be sure:
The predicted confidence map doesn't explicitly differentiate unreliable matching regions from specifically out-of-view pixels. It is just usually uncertain in out-of-view pixel since the flow there is more likely to be wrong. But it can happen that if the network is still very confident about its matches in bordering out of view regions, the predicted confidence map will be confident there.

The loss is calculated everywhere, including the out-of-view regions for the synthetic data. For Megadepth, it is only computed at the location of the sparse ground-truth.