Commit 8233abec authored by Alessia Marcolini's avatar Alessia Marcolini
Browse files

Remove get_transform

parent fb1514cc
......@@ -6,9 +6,6 @@ from abc import ABC, abstractmethod
import numpy as np
import torch.utils.data as data
import cv2
from albumentations import Compose, Resize, ToFloat
class BaseDataset(data.Dataset, ABC):
"""This class is an abstract base class (ABC) for datasets.
......@@ -40,15 +37,3 @@ class BaseDataset(data.Dataset, ABC):
"""Callback to be called after every epoch.
"""
pass
def get_transform(opt, method=cv2.INTER_LINEAR):
transform_list = []
if 'preprocess' in opt:
if 'resize' in opt['preprocess']:
transform_list.append(Resize(opt['input_size'][0], opt['input_size'][1], method))
if 'tofloat' in opt and opt['tofloat'] == True:
transform_list.append(ToFloat())
return Compose(transform_list)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment