liruoteng / FlowNet

Modified Version of FlowNet, specifically for adversed environment optical flow
Other
113 stars 56 forks source link

Why in training step, the loss is L1loss? #14

Closed yanmengjia closed 7 years ago

yanmengjia commented 7 years ago

I read the paper that the loss is EPE end point error. Can L1loss replace it?

liruoteng commented 7 years ago

Hi thank you for your questions. If you look into the parameter of L1loss layer, it assigns l2_per_location to true, which means the layer computes L2 Loss rather than L1.

yanmengjia commented 7 years ago

So that means you use L1loss layer to compute the L2 loss of u and v respectively and sum them together to compute endpoint error?

yanmengjia commented 7 years ago

Sorry for reopening this issue. I have another question. I notice that you write your own eltwise layer and downsample layer. Can you explain a litter to me about those two layers?

liruoteng commented 7 years ago

Hi,

  1. In this case, it computes: L2 loss = sqrt[(u_est - u_gt) + (v_est - v_gt)]. est indicates predicted flow, gt indicates ground-truth.

  2. Which eltwise layer and downsample layer do you refer to ?

yanmengjia commented 7 years ago

Thank you for explaining L2 loss. I refer to eltwise layer and downsample layer you used in FlowNet/models/flownet/model_simple/train.prototxt.

liruoteng commented 7 years ago

I did not write my own eltwise layer and downsample layer in train.prototxt. That file is original actually.