summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJules Laplace <julescarbon@gmail.com>2018-04-19 02:18:38 +0200
committerJules Laplace <julescarbon@gmail.com>2018-04-19 02:18:38 +0200
commit3b55c1e130d0466e164a8344a9fb66e504ad8bbc (patch)
treeb66cb3b91341ca7d7ed00d3a47b74b92de0180a2
parentf9e01192be935e4faa18a344a4efbd5f4e9ee280 (diff)
y
-rw-r--r--data/recursive_dataset.py19
-rw-r--r--test.py2
2 files changed, 2 insertions, 19 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)
diff --git a/test.py b/test.py
index a13ee0f..39fe4c5 100644
--- a/test.py
+++ b/test.py
@@ -22,7 +22,7 @@ if __name__ == '__main__':
render_dir = opt.results_dir + "/" + opt.name + "/exp:" + opt.experiment
mkdirs(render_dir)
- copyfile(opt.start_img, render_dir)
+ copyfile(opt.start_img, render_dir + "/frame_00000.png")
data_loader = CreateRecursiveDataLoader(opt)
dataset = data_loader.load_data()