Ajay Harikumar commited on
Commit
6976e23
·
1 Parent(s): feff774

Removed resolution constrain

Browse files
Files changed (1) hide show
  1. app.py +0 -8
app.py CHANGED
@@ -24,14 +24,6 @@ def inference(input_img, is_gray, input_quality, zoom, x_shift, y_shift):
24
  print("datetime:",datetime.datetime.utcnow())
25
  input_img_width, input_img_height = Image.fromarray(input_img).size
26
  print("img size:",(input_img_width,input_img_height))
27
-
28
- if (input_img_width > 1080) or (input_img_height > 1080):
29
- resize_ratio = min(1080/input_img_width, 1080/input_img_height)
30
- resized_input = Image.fromarray(input_img).resize((int(input_img_width*resize_ratio)+(input_img_width*resize_ratio < 1),
31
- int(input_img_height*resize_ratio)+(input_img_height*resize_ratio < 1)),
32
- resample=Image.BICUBIC)
33
- input_img = np.array(resized_input)
34
- print("input image resized to:", resized_input.size)
35
 
36
  if is_gray:
37
  n_channels = 1 # set 1 for grayscale image, set 3 for color image
 
24
  print("datetime:",datetime.datetime.utcnow())
25
  input_img_width, input_img_height = Image.fromarray(input_img).size
26
  print("img size:",(input_img_width,input_img_height))
 
 
 
 
 
 
 
 
27
 
28
  if is_gray:
29
  n_channels = 1 # set 1 for grayscale image, set 3 for color image