summaryrefslogtreecommitdiff
path: root/test.py
diff options
context:
space:
mode:
authorjules@lens <julescarbon@gmail.com>2018-04-22 14:20:55 +0200
committerjules@lens <julescarbon@gmail.com>2018-04-22 14:20:55 +0200
commitf3d8266b7453425be7bafdb909875dcf7348fa1b (patch)
treec261247fa721e4eac1397ac299853b62b24d91b2 /test.py
parentd4e429f5f2dc053e51c41bdfc34ab24c3605baef (diff)
parent8ab8b62e24146c87cfa4e54efbae145c171555e4 (diff)
Merge branch 'master' of ghghgh.us:pix2pix
Diffstat (limited to 'test.py')
-rw-r--r--test.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/test.py b/test.py
index 62dc3cd..5b75c9b 100644
--- a/test.py
+++ b/test.py
@@ -60,9 +60,12 @@ if __name__ == '__main__':
# image_pil.save(save_path)
# copyfile(save_path, final_path)
if last_im is not None:
+ frac = 4
tmp_im = im.copy()
- im = np.add(np.multiply(im, 1/3), np.multiply(last_im, 2/3))
+ im = np.add(np.multiply(im, 1/(frac)), np.multiply(last_im, (frac-1)/(frac)))
last_im = tmp_im
+ else:
+ print(im.shape)
image_pil = Image.fromarray(im)
image_pil.save(save_path)
os.rename(save_path, final_path)