JirongZhang / DeepHomography

Content-Aware Unsupervised Deep Homography Estimation
MIT License
340 stars 57 forks source link

Is the loss function in the code not as comprehensive compared to the loss function described in the paper? #53

Closed Jerry-bear closed 7 months ago

Jerry-bear commented 7 months ago

I currently have a question regarding the loss function calculation in my code. It seems that only the L1 loss has been calculated, but the loss in the paper is described as follows. Could you tell me if I need to add the feature_loss, l1_loss, and smooth_loss together with specific weights?

It seems that your input points (h4p/h4p1/h4p2) number are half of needed

Should each batchsize(h4p/h4p1/h4p2)have (divide +1) (divide +1) 2*2 points, and why?

sorry the "The input for h4p is [bs, 4]" confused me。 But it's "[bs, 8]" in your description later, which is the correct size. Come on, the correct size should always be (divide +1) (divide +1) 2.

I currently have a question regarding the loss function calculation in my code. It seems that only the image has been calculated, but the loss in the paper is described as follows. image Could you tell me if I need to add the feature_loss, l1_loss, and smooth_loss together with specific weights?And also, does the content within the following red area not yet reflected in the network? image

Originally posted by @Jerry-bear in https://github.com/JirongZhang/DeepHomography/issues/51#issuecomment-1987563638

Jerry-bear commented 7 months ago

After reviewing previous issues, I now understand that the code implements an Oneline mode, whereas the paper mentions a Doubleline mode. If I want to switch to the Doubleline mode, do I need to manually write the missing loss functions?

CallMeFrozenBanana commented 7 months ago

Hi ~ This is a regularization term in the Doubleline mode, but I don't think it is essential

Jerry-bear commented 7 months ago

Hi ~ This is a regularization term in the Doubleline mode, but I don't think it is essential

So, I just need to subtract the L1 loss from the original loss, right?