Shortcuts

mmcls.core.mAP

mmcls.core.mAP(pred, target)[source]

Calculate the mean average precision with respect of classes.

Parameters
  • pred (torch.Tensor | np.ndarray) – The model prediction with shape (N, C), where C is the number of classes.

  • target (torch.Tensor | np.ndarray) – The target of each prediction with shape (N, C), where C is the number of classes. 1 stands for positive examples, 0 stands for negative examples and -1 stands for difficult examples.

Returns

A single float as mAP value.

Return type

float

Read the Docs v: latest
Versions
master
latest
1.x
dev-1.x
Downloads
html
epub
On Read the Docs
Project Home
Builds

Free document hosting provided by Read the Docs.