I found a bug in your code of calculating mAP, which lies in the function get_AP, originating from the wrong construction of the recall difference list.
I advise to change the final computing code of AP to AP = sum(l .* pl) / sum(l);.
For reference codes and testing case, see:
I found a bug in your code of calculating mAP, which lies in the function get_AP, originating from the wrong construction of the recall difference list.
I advise to change the final computing code of AP to
AP = sum(l .* pl) / sum(l);.For reference codes and testing case, see: