wrong calculation of map
Miilli opened this issue · comments
Miilli commented
I think the calculation of mean average precision is wrong. In metrics.py (in ScaledYOLOv4/utils/) the function compute_ap is not correct. Using np.interp(x, mrec, mpre), x) results in a map which is too high because like this the interpolation sets all values between the last recall value and 1 to the last precision value (instead of 0).
An easy way to correct this is just to use the comments in line 125 and 126. Although I think you should use 1.0 for the first value instead of 0 ( like this: np.concatenate(([1.], precision, [0.])) )