summaryrefslogtreecommitdiff
path: root/augment.py
diff options
context:
space:
mode:
authorJules Laplace <julescarbon@gmail.com>2018-09-13 18:58:43 +0200
committerJules Laplace <julescarbon@gmail.com>2018-09-13 18:58:43 +0200
commitf987d163754044f6dc032325766f4c6c7e1dc401 (patch)
treeb9861a75144665f6f8cf3e4e4301dbce0ab0dafc /augment.py
parent908e0644bacad5850798c52c1c050f5f733040a2 (diff)
paths
Diffstat (limited to 'augment.py')
-rwxr-xr-xaugment.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/augment.py b/augment.py
index 4aab5f1..1b32483 100755
--- a/augment.py
+++ b/augment.py
@@ -153,6 +153,9 @@ for m in range(data_opt.augment_take):
image_pil.save(tmp_path)
os.rename(tmp_path, next_path)
+ if data_opt.no_symlink:
+ continue
+
frame_A = os.path.join("./datasets/", data_opt.sequence_name, "train_A", "recur_{}_{:05d}_{:05d}.png".format(epoch_id, m, index+1))
frame_B = os.path.join("./datasets/", data_opt.sequence_name, "train_B", "recur_{}_{:05d}_{:05d}.png".format(epoch_id, m, index+1))
if os.path.exists(frame_A):
@@ -161,5 +164,3 @@ for m in range(data_opt.augment_take):
os.unlink(frame_B)
os.symlink(os.path.abspath(next_path), os.path.abspath(frame_A))
os.symlink(os.path.abspath(sequence[index+2]), os.path.abspath(frame_B))
-
-