MCPcopy Create free account
hub / github.com/OpenGVLab/HumanBench / _calculate_map

Method _calculate_map

PATH/core/solvers/utils/peddet_tester_dev.py:586–593  ·  view source on GitHub ↗
(recall, precision)

Source from the content-addressed store, hash-verified

584 """
585 # calculate general ap score
586 def _calculate_map(recall, precision):
587 assert len(recall) == len(precision)
588 area = 0
589 for i in range(1, len(recall)):
590 delta_h = (precision[i - 1] + precision[i]) / 2
591 delta_w = recall[i] - recall[i - 1]
592 area += delta_w * delta_h
593 return area
594
595 tp, fp, dp = 0.0, 0.0, 0.0
596 rpX, rpY = list(), list()

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected