mirror of
https://github.com/PyRetri/PyRetri.git
synced 2025-06-03 14:49:50 +08:00
22 lines
473 B
Python
22 lines
473 B
Python
# -*- coding: utf-8 -*-
|
|
|
|
from abc import abstractmethod
|
|
|
|
from ...utils import ModuleBase
|
|
|
|
from typing import Dict
|
|
|
|
|
|
class EvaluatorBase(ModuleBase):
|
|
"""
|
|
The base class of evaluators which compute mAP and recall.
|
|
"""
|
|
default_hyper_params = {}
|
|
|
|
def __init__(self, hps: Dict or None = None):
|
|
super(EvaluatorBase, self).__init__(hps)
|
|
|
|
@abstractmethod
|
|
def __call__(self, query_result: Dict, gallery_info: Dict) -> (float, Dict):
|
|
pass
|