RAFT-Stereo
RAFT-Stereo copied to clipboard
Q about metric: EPE and Bad 1.0
I think the definition formula of EPE is as follows:
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!
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.
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!
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.
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?
Here is one
>>> torch.tensor([1,0,1]) >= 0.5
tensor([ True, False, True])
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.