'''
blueprint for data loader API
'''
# Author: Matt Clifford <matt.clifford@bristol.ac.uk>
# License: BSD 3-Clause License
from abc import ABC, abstractmethod
[docs]class base_dataloader(ABC):
@property
def metrics(self):
return self._metrics
@metrics.setter
def metrics(self, metrics_dict):
self._metrics = metrics_dict
@property
def metric_images(self):
return self._metric_images
@metric_images.setter
def metric_images(self, metric_images_dict):
self._metric_images = metric_images_dict
[docs] @abstractmethod
def get_reference_image_name(self):
pass
[docs] @abstractmethod
def get_reference_image(self):
pass
[docs] @abstractmethod
def get_metrics(self):
pass
[docs] @abstractmethod
def get_metric_images(self):
pass
[docs]class base_dataset_loader(base_dataloader):
@abstractmethod
def __len__(self):
pass
@abstractmethod
def __getitem__(self):
pass
[docs] @abstractmethod
def get_reference_image_by_index(self, index):
pass