def __init__(self, args, root, split, label_path, cachedir, transform=None, target_transform=None, input_size=224, test_gap=50, train_gap=4, fps=24, num_classes=157, ext='jpg'): super(DatasetJPG, self).__init__(test_gap, split) self.num_classes = num_classes self.transform = transform self.target_transform = target_transform self.root = root self.input_size = input_size self.fps = fps self.train_gap = train_gap self.ext = ext self.cls2int = self.get_label_map(args.label_file) self.labels = self.get_labels(label_path, split, self.cls2int) cachename = '{}/{}_{}.pkl'.format(cachedir, self.__class__.__name__, split) self._data = cache(cachename)(self._prepare)(root, self.labels, split)
def __init__(self, args, root, split, labelpath, cachedir, transform=None, target_transform=None, test_gap=50): Dataset.__init__(self, test_gap, split) self.num_classes = 174 self.transform = transform self.target_transform = target_transform self.cls2int = self.parse_something_labels(args.label_file) self.labels = self.parse_something_json(labelpath, self.cls2int) self.root = root cachename = '{}/{}_{}.pkl'.format(cachedir, self.__class__.__name__, split) self._data = cache(cachename)(self._prepare)(root, self.labels, split)
def __init__(self, args, root, split, labelpath, cachedir, transform=None, target_transform=None, test_gap=50): self.num_classes = 27 self.transform = transform self.target_transform = target_transform self.cls2int = self.parse_jester_labels(args.label_file) self.labels = self.parse_jester_csv(labelpath, self.cls2int) self.root = root self.test_gap = test_gap cachename = '{}/{}_{}.pkl'.format(cachedir, self.__class__.__name__, split) self.data = cache(cachename)(self._prepare)(root, self.labels, split)
def __init__(self, args, root, split, labelpath, cachedir, transform=None, target_transform=None, input_size=224, test_gap=50): self.num_classes = 157 self.transform = transform self.target_transform = target_transform self.labels = self.parse_charades_csv(labelpath) self.labels = self.labels[:100] self.root = root self.test_gap = test_gap cachename = '{}/{}_{}.pkl'.format(cachedir, self.__class__.__name__, split) self._data = cache(cachename)(self._prepare)(root, self.labels, split)
def __init__(self, args, root, split, labelpath, cachedir, transform=None, target_transform=None, input_size=224, test_gap=10): Dataset.__init__(self, test_gap, split) self.num_classes = 80 self.transform = transform self.target_transform = target_transform self.cls2int = dict((str(x + 1), x) for x in range(80)) self.labels = self.parse_ava_csv(labelpath, self.cls2int) self.root = root self.train_gap = 64 self.input_size = input_size cachename = '{}/{}_{}.pkl'.format(cachedir, self.__class__.__name__, split) self._data = cache(cachename)(self._prepare)(root, self.labels, split)
def __init__(self, args, root, split, label_path, cachedir, transform=None, target_transform=None, input_size=224, test_gap=25, train_gap=4): Dataset.__init__(self, test_gap, split) self.num_classes = 400 self.transform = transform self.target_transform = target_transform self.cls2int = self.parse_kinetics_labels(args.train_file) self.labels = self.parse_kinetics_csv(label_path, self.cls2int) self.root = root self.train_gap = train_gap self.input_size = input_size cachename = '{}/{}_{}.pkl'.format(cachedir, self.__class__.__name__, split) self._data = cache(cachename)(self._prepare)(root, self.labels, split)
def __init__(self, args, root, split, label_path, cachedir, transform=None, target_transform=None, input_size=224, test_gap=50, train_gap=4, fps=24): super(Charades, self).__init__(test_gap, split) self.num_classes = 157 self.transform = transform self.target_transform = target_transform self.labels = self.parse_charades_csv(label_path) self.root = root self.input_size = input_size self.fps = fps self.train_gap = train_gap cachename = '{}/{}_{}.pkl'.format(cachedir, self.__class__.__name__, split) self._data = cache(cachename)(self._prepare)(root, self.labels, split)