How to calculate mAP (mean average precision) for the whole dataset?

1.4k Views Asked by At

I am new to computer vision and I have a simple question that could not get any answer for on the web. I am using mask rcnn implementation by Matterport to perform a binary classification on some images and I have some extra lines of code that compute the mAP for each image. Now I would like to know, if I can add up the mAPs calculated for each image and then divide the number to get mAP for the whole dataset, and if not, how can I compute the overall mAP? (preferrably using the utilities of the mask rcnn model)

1

There are 1 best solutions below

0
On

Yes, you can do something like

np.sum(recall)/num_test
np.sum(precision)/num_test

where num_test is number of test images

Just keep training and test data separate.