summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJules Laplace <julescarbon@gmail.com>2018-04-22 14:46:49 +0200
committerJules Laplace <julescarbon@gmail.com>2018-04-22 14:46:49 +0200
commit28aeac762722e464826cd9947a4e430953031f0d (patch)
tree65e28e519e094df71f351cb2e543a43664bb3752
parentfcf5d2cfc6774e73101f179347c066846da964b2 (diff)
push
-rwxr-xr-xrun.sh2
-rw-r--r--test.py6
2 files changed, 4 insertions, 4 deletions
diff --git a/run.sh b/run.sh
index 8c1d424..65ed182 100755
--- a/run.sh
+++ b/run.sh
@@ -24,7 +24,7 @@ python test.py \
--dataroot "/home/lens/Desktop/thumbs/$dataset/A/train/" \
--name "$dataset" \
--start_img "/home/lens/Desktop/thumbs/$dataset/A/train/frame_1008.png" \
- --how_many 100 \
+ --how_many 30 \
--model test \
--aspect_ratio 1.777777 \
--which_model_netG unet_256 \
diff --git a/test.py b/test.py
index 54b033c..4efddb8 100644
--- a/test.py
+++ b/test.py
@@ -63,15 +63,15 @@ if __name__ == '__main__':
if last_im is not None:
frac = 4.
tmp_im = im.copy()
- array_a = np.divide(im, frac)
- array_b = np.divide(last_im, frac/(frac-1))
+ array_a = np.multiply(im, 1/frac)
+ array_b = np.multiply(last_im, (frac-1)/frac)
print(im.shape, array_a.shape, array_b.shape)
im = np.add(array_a, array_b).clip(0, 255)
last_im = tmp_im
else:
last_im = im.copy()
print(im.shape)
- image_pil = Image.fromarray(im, mode='RGB')
+ image_pil = Image.fromarray(im)
image_pil.save(save_path)
os.rename(save_path, final_path)
webpage.save()