Emilyl613 commited on
Commit
93916b6
Β·
verified Β·
1 Parent(s): 4aaeb56

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -82,7 +82,7 @@ def get_gradcam_overlay(image_pil, image_tensor):
82
  heatmap = cv2.applyColorMap((cam_resized * 255).astype(np.uint8), cv2.COLORMAP_JET)
83
  heatmap = cv2.cvtColor(heatmap, cv2.COLOR_BGR2RGB)
84
  overlaid = (0.5 * img + 0.5 * heatmap).astype(np.uint8)
85
- overlaid_large = Image.fromarray(overlaid).resize((224, 224), Image.NEAREST)
86
  return overlaid_large
87
 
88
  # ── Detection Function ───────────────────────────────────────
 
82
  heatmap = cv2.applyColorMap((cam_resized * 255).astype(np.uint8), cv2.COLORMAP_JET)
83
  heatmap = cv2.cvtColor(heatmap, cv2.COLOR_BGR2RGB)
84
  overlaid = (0.5 * img + 0.5 * heatmap).astype(np.uint8)
85
+ overlaid_large = Image.fromarray(overlaid).resize((224, 224), Image.LANCZOS)
86
  return overlaid_large
87
 
88
  # ── Detection Function ───────────────────────────────────────