diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2018-04-19 02:18:38 +0200 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2018-04-19 02:18:38 +0200 |
| commit | 3b55c1e130d0466e164a8344a9fb66e504ad8bbc (patch) | |
| tree | b66cb3b91341ca7d7ed00d3a47b74b92de0180a2 /data/recursive_dataset.py | |
| parent | f9e01192be935e4faa18a344a4efbd5f4e9ee280 (diff) | |
y
Diffstat (limited to 'data/recursive_dataset.py')
| -rw-r--r-- | data/recursive_dataset.py | 19 |
1 files changed, 1 insertions, 18 deletions
diff --git a/data/recursive_dataset.py b/data/recursive_dataset.py index f8a5da8..e42f1f7 100644 --- a/data/recursive_dataset.py +++ b/data/recursive_dataset.py @@ -6,23 +6,6 @@ from data.image_folder import make_dataset from PIL import Image import random -class NextImage(): - def __init__(self): - self.next_image = "lol" - self.id = str(random.randint(1,100)) - def append(self, path): - self.next_image = path - print("APPEND " + self.id + ' ' + self.next_image) - def get(self, index): - print("GET " + self.id + ' ' + self.next_image) - return self.next_image - -im = NextImage() -im.append('a') -im.get(1) -im.append('b') -im.get(1) - class RecursiveDataset(BaseDataset): def initialize(self, opt): print('initialize') @@ -37,7 +20,7 @@ class RecursiveDataset(BaseDataset): self.transform = get_transform(opt) def __getitem__(self, index): - A_path = self.opt.results_dir + "/" + self.opt.name + "/exp:" + self.opt.experiment + "/frame_{:05d}.png".format(index) + A_path = self.opt.results_dir + self.opt.name + "/exp:" + self.opt.experiment + "/frame_{:05d}.png".format(index) print('next image: ' + A_path) while not os.path.exists(A_path): time.sleep(0.1) |
