We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a2ecd75 commit 9f1a6c2Copy full SHA for 9f1a6c2
modules/ximgproc/src/alphagan_matting/test.py
@@ -21,17 +21,16 @@
21
break
22
model.forward(data)
23
w = data['w']
24
- h = data['h']
+ h = data['h']
25
visuals = model.get_current_visuals()
26
img_path = model.get_image_paths()
27
print('%04d: process image... %s' % (i, img_path))
28
aspect_ratio = opt.aspect_ratio
29
for label, im in visuals.items():
30
image_name = '%s.png' % (name)
31
save_path = os.path.join(image_dir, image_name)
32
- if aspect_ratio >= 1.0:
+ if aspect_ratio >= 1.0:
33
im = np.array(Image.fromarray(im).resize((h, int(w * aspect_ratio))))
34
if aspect_ratio < 1.0:
35
im = np.array(Image.fromarray(im).resize((int(h/aspect_ratio),w)))
36
utils.save_image(im, save_path)
37
-
0 commit comments