zhiweili commited on
Commit
981b92f
·
1 Parent(s): 3eebd45

change scal

Browse files
Files changed (1) hide show
  1. app_enhance.py +4 -4
app_enhance.py CHANGED
@@ -65,10 +65,10 @@ def enhance_image(
65
  else:
66
  output, _ = upsampler.enhance(img, outscale=scale)
67
 
68
- if scale != 2:
69
- interpolation = cv2.INTER_AREA if scale < 2 else cv2.INTER_LANCZOS4
70
- h, w = img.shape[0:2]
71
- output = cv2.resize(output, (int(w * scale / 2), int(h * scale / 2)), interpolation=interpolation)
72
 
73
  enhanced_image = Image.fromarray(cv2.cvtColor(output, cv2.COLOR_BGR2RGB))
74
  tmpPrefix = "/tmp/gradio/"
 
65
  else:
66
  output, _ = upsampler.enhance(img, outscale=scale)
67
 
68
+ # if scale != 2:
69
+ # interpolation = cv2.INTER_AREA if scale < 2 else cv2.INTER_LANCZOS4
70
+ # h, w = img.shape[0:2]
71
+ # output = cv2.resize(output, (int(w * scale / 2), int(h * scale / 2)), interpolation=interpolation)
72
 
73
  enhanced_image = Image.fromarray(cv2.cvtColor(output, cv2.COLOR_BGR2RGB))
74
  tmpPrefix = "/tmp/gradio/"