MCPcopy Create free account
hub / github.com/VisionRush/DeepFakeDefenders / __init__

Method __init__

core/dsproc_mcls.py:60–71  ·  view source on GitHub ↗
(self, transform=None)

Source from the content-addressed store, hash-verified

58class MultiClassificationProcessor(torch.utils.data.Dataset):
59
60 def __init__(self, transform=None):
61 self.transformer_ = transform
62 self.extension_ = '.jpg .jpeg .png .bmp .webp .tif .eps'
63 # load category info
64 self.ctg_names_ = [] # ctg_idx to ctg_name
65 self.ctg_name2idx_ = OrderedDict() # ctg_name to ctg_idx
66 # load image infos
67 self.img_names_ = [] # img_idx to img_name
68 self.img_paths_ = [] # img_idx to img_path
69 self.img_labels_ = [] # img_idx to img_label
70
71 self.srm = SRMConv2d_simple()
72
73 def load_data_from_dir(self, dataset_list):
74 """Load image from folder.

Callers

nothing calls this directly

Calls 1

SRMConv2d_simpleClass · 0.70

Tested by

no test coverage detected