summaryrefslogtreecommitdiff
path: root/data/recursive_dataset.py
diff options
context:
space:
mode:
authorJules Laplace <julescarbon@gmail.com>2018-04-19 02:12:34 +0200
committerJules Laplace <julescarbon@gmail.com>2018-04-19 02:12:34 +0200
commit3df7afdf4fe8b8e6276dcdcd4c1f29bae57834bd (patch)
treed02494276a001db39dd2c8d14f2ea94e53fc91f1 /data/recursive_dataset.py
parentb32f538d539fcd47696f8ae3bcf6cb64ba5b75ca (diff)
parenta073c74360512e24a9b2d1e76fd38cb3aa5e88d2 (diff)
more general
Diffstat (limited to 'data/recursive_dataset.py')
-rw-r--r--data/recursive_dataset.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/data/recursive_dataset.py b/data/recursive_dataset.py
index 4bd0798..f8a5da8 100644
--- a/data/recursive_dataset.py
+++ b/data/recursive_dataset.py
@@ -1,3 +1,5 @@
+import os
+import time
import os.path
from data.base_dataset import BaseDataset, get_transform
from data.image_folder import make_dataset
@@ -37,6 +39,8 @@ class RecursiveDataset(BaseDataset):
def __getitem__(self, 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)
A_img = Image.open(A_path).convert('RGB')
A = self.transform(A_img)
if self.opt.which_direction == 'BtoA':