summaryrefslogtreecommitdiff
path: root/live-mogrify.py
diff options
context:
space:
mode:
authorJules Laplace <julescarbon@gmail.com>2018-06-08 11:30:53 +0200
committerJules Laplace <julescarbon@gmail.com>2018-06-08 11:30:53 +0200
commit2aa96a6bf070804c7a3231b6a93939c02527dfc7 (patch)
tree9996e589cfbd9c727c38ddea67205bb9fb92c0f2 /live-mogrify.py
parent782d22b6ee3f40d91055d15cc6d6c8d499ff45f0 (diff)
fix
Diffstat (limited to 'live-mogrify.py')
-rw-r--r--live-mogrify.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/live-mogrify.py b/live-mogrify.py
index 6817fd7..35fe797 100644
--- a/live-mogrify.py
+++ b/live-mogrify.py
@@ -160,9 +160,9 @@ import torchvision.transforms as transforms
def get_transform(opt={}):
transform_list = []
- # if opt.resize_or_crop == 'resize_and_crop':
- # osize = [opt.loadSize, opt.loadSize]
- # transform_list.append(transforms.Scale(osize, Image.BICUBIC))
+ if opt.resize_or_crop == 'resize_and_crop':
+ osize = [opt.loadSize, opt.loadSize]
+ transform_list.append(transforms.Scale(osize, Image.BICUBIC))
# if opt.center_crop:
# transform_list.append(transforms.CenterCrop(opt.fineSize))
# else:
@@ -190,7 +190,7 @@ def load_frame(opt, index):
if not os.path.exists(A_path):
print("path doesn't exist: {}".format(A_path))
return None
- transform = get_transform()
+ transform = get_transform(opt)
A_img = Image.open(A_path).convert('RGB')
A = transform(A_img)
# if self.opt.which_direction == 'BtoA':