fix resize
Browse files
app.py
CHANGED
@@ -87,7 +87,7 @@ def inference(img, version, scale, weight):
|
|
87 |
if scale != 2:
|
88 |
interpolation = cv2.INTER_AREA if scale < 2 else cv2.INTER_LANCZOS4
|
89 |
h, w = img.shape[0:2]
|
90 |
-
output = cv2.resize(output, (int(w * scale
|
91 |
except Exception as error:
|
92 |
print('wrong scale input.', error)
|
93 |
if img_mode == 'RGBA': # RGBA images should be saved in png format
|
|
|
87 |
if scale != 2:
|
88 |
interpolation = cv2.INTER_AREA if scale < 2 else cv2.INTER_LANCZOS4
|
89 |
h, w = img.shape[0:2]
|
90 |
+
output = cv2.resize(output, (int(w * scale), int(h * scale)), interpolation=interpolation)
|
91 |
except Exception as error:
|
92 |
print('wrong scale input.', error)
|
93 |
if img_mode == 'RGBA': # RGBA images should be saved in png format
|