summaryrefslogtreecommitdiff
path: root/cli/app/search/live.py
diff options
context:
space:
mode:
authorJules Laplace <julescarbon@gmail.com>2020-01-11 00:23:46 +0100
committerJules Laplace <julescarbon@gmail.com>2020-01-11 00:23:46 +0100
commit179f98c949dbeeb383d152e46610dd6789616231 (patch)
treee48ce022dfd09b06520a46bcf50a46a64ed68c6d /cli/app/search/live.py
parentb280b3b837b205e9283c0444bdb28bc2aa4e48ad (diff)
upload video script
Diffstat (limited to 'cli/app/search/live.py')
-rw-r--r--cli/app/search/live.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/cli/app/search/live.py b/cli/app/search/live.py
index b09575d..4c66873 100644
--- a/cli/app/search/live.py
+++ b/cli/app/search/live.py
@@ -374,6 +374,8 @@ class Listener:
interpolator.build()
self.rpc_client.send_status('processing', True)
tag = "biggan_" + timestamp()
+ path_out = os.path.join(app_cfg.RESULTS_DIR, tag)
+ os.makedirs(path_out, exist_ok=True)
dt = 1 / FPS
for i in range(99999):
if i == 0:
@@ -386,12 +388,10 @@ class Listener:
print("Exiting...")
break
if (i % 100) == 0 or i == 1:
- # print(gen_images.shape)
print("Step {}. Generation time: {:.2f}s".format(i, time.time() - gen_time))
out_img = vs.data2pil(gen_images[0])
if out_img is not None:
- # save image
- #if out_img.resize_before_sending:
+ out_img.save(os.path.join(path_out, "image_{:5d}.png".format(i)), format='png')
img_to_send = out_img.resize((256, 256), Image.BICUBIC)
meta = {
'i': i,