From e619888c23c863db2847a9c1c449dc4d11e4d1db Mon Sep 17 00:00:00 2001 From: mooniean Date: Mon, 29 Jan 2024 10:29:15 +0000 Subject: [PATCH] added dataset abstract method --- src/caked/base.py | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 src/caked/base.py diff --git a/src/caked/base.py b/src/caked/base.py new file mode 100644 index 0000000..7c881d8 --- /dev/null +++ b/src/caked/base.py @@ -0,0 +1,31 @@ +from abc import ABC, abstractmethod +from pathlib import Path + +from torch.utils.data import DataLoader, Dataset + + +class AbstractDataLoader(DataLoader, ABC): + @abstractmethod + def read(self, pipeline, classes, volume_size, dataset_size, save_to_disk): + pass + + @abstractmethod + def process(self, dataset, classes, split_size, batch_size, training): + pass + + +class AbstractDataset(ABC, Dataset): + def __init__(self, origin: str, classes: Path) -> None: + pass + + def __len__(self) -> int: + pass + + @abstractmethod + def set_len(self, length:int): + pass + + @abstractmethod + def augment(self, augment:bool, aug_type:str): + pass + \ No newline at end of file