Source code for rastervision.core.evaluation.evaluation_item

from abc import (ABC, abstractmethod)
from pprint import pformat

[docs]class EvaluationItem(ABC):
[docs] @abstractmethod def merge(self, other): """Merges another item from a different scene into this one. This is used to average metrics over scenes. Merges by taking a weighted average (by gt_count) of the metrics. """ pass
[docs] @abstractmethod def to_json(self) -> dict: return self.__dict__
def __repr__(self): return pformat(self.to_json())