diff options
| author | jules@lens <julescarbon@gmail.com> | 2018-04-19 00:13:32 +0200 |
|---|---|---|
| committer | jules@lens <julescarbon@gmail.com> | 2018-04-19 00:13:32 +0200 |
| commit | a073c74360512e24a9b2d1e76fd38cb3aa5e88d2 (patch) | |
| tree | 77b5fb1d9cf2d2803c1f68404fe57693cc8ebce9 /data | |
| parent | 92223bd44b891536bf0423f9b7f43c29414331c6 (diff) | |
training!!
Diffstat (limited to 'data')
| -rw-r--r-- | data/recursive_dataset.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/data/recursive_dataset.py b/data/recursive_dataset.py index b51777f..1b79255 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 = "/home/lens/code/pytorch-CycleGAN-and-pix2pix/recursive/frame_{:04d}.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': |
