That also works, but IMHO it’s a worse indicator when facing imbalanced datasets or imbalanced “hardness” of the classes. For example if you have a very easy class and a very hard class, you’ll get a high AP for the first and low AP for the second, which average to a “meh” AP overall. The worst case is you have many very easy classes and few very hard classes, the average will hide the very low performance on the hard classes, but maybe that hard class is very important to you and you don’t know it unless you show the AP for every class…