swimmiing commited on
Commit
f8ab558
1 Parent(s): b623c93

Adjust output resolution

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -69,9 +69,9 @@ def greet(image, audio):
69
  seg_image = ((1 - seg.squeeze().detach().cpu().numpy()) * 255).astype(np.uint8)
70
  seg_image = Image.fromarray(seg_image)
71
 
72
- original_image = image.resize((352, 352), Image.BICUBIC)
73
  heatmap_image = cv2.applyColorMap(np.array(seg_image), cv2.COLORMAP_JET)
74
- overlaid_image = cv2.addWeighted(np.array(original_image), 0.5, heatmap_image, 0.5, 0)
75
 
76
  return overlaid_image
77
 
 
69
  seg_image = ((1 - seg.squeeze().detach().cpu().numpy()) * 255).astype(np.uint8)
70
  seg_image = Image.fromarray(seg_image)
71
 
72
+ seg_image = seg_image.resize(image.size, Image.BICUBIC)
73
  heatmap_image = cv2.applyColorMap(np.array(seg_image), cv2.COLORMAP_JET)
74
+ overlaid_image = cv2.addWeighted(np.array(image), 0.5, heatmap_image, 0.5, 0)
75
 
76
  return overlaid_image
77