RAFT-Stereo icon indicating copy to clipboard operation
RAFT-Stereo copied to clipboard

Q about metric: EPE and Bad 1.0

Open TwiceMao opened this issue 2 years ago • 8 comments

I think the definition formula of EPE is as follows: epe Am I right? Although I have read the codes evaluate_stereo.py. , I am confused with the definition of bad pixel 1.0. Could you help me understand it. Wish for your early reply, thank you!

TwiceMao avatar Mar 31 '22 08:03 TwiceMao

EPE is just the euclidean distance between the predicted flow/disparity vector and the GT flow/disparity vector. Typically methods report the average EPE over the entire image. The equation above seems to show something different.

bad pixel 1.0 is the percent of EPE values that are greater than 1.0.

lahavlipson avatar Mar 31 '22 19:03 lahavlipson

OK,your answer is important to me, thanks. And I also wondering about the codes of evaluate_stereo.py corresponding to evaluating EPE and D1. I think there is no need to assign parameter "dim = 0" in the 85th line of evaluate_stereo.py. Why not just "epe = torch.sum((flow_pr - flow_gt)**2).sqrt()“” to get a whole sum? And ">= 0.5" in the 89th line and "epe_flattened > 3.0" in the 91th line both make me confused. I can not match meaning with those codes. Wish for your early reply, thank you! evaluate_stereo

TwiceMao avatar Apr 02 '22 06:04 TwiceMao

You are correct, the dim = 0 is not needed. This evaluation code is meant to also work for 2D flow.

The >= 0.5 is to convert an array of binary ints to an array of bool. The > 3.0 is to calculate the bad 3.0 error.

lahavlipson avatar Apr 02 '22 23:04 lahavlipson

What does you mean by "The >= 0.5 is to convert an array of binary ints to an array of bool. "? I can not understand. Could you explain it with an example?

TwiceMao avatar Apr 06 '22 07:04 TwiceMao

Here is one

>>> torch.tensor([1,0,1]) >= 0.5
tensor([ True, False,  True])

lahavlipson avatar Apr 06 '22 18:04 lahavlipson

But why "0.5" ? I mean what's the meaning of the numer "0.5" ? I do not think it is corresponding to bad 0.5.

TwiceMao avatar Apr 07 '22 00:04 TwiceMao