Skip to content

Commit

Permalink
Fix cv2.resize issue (#494)
Browse files Browse the repository at this point in the history
  • Loading branch information
Christophe-Foyer committed May 28, 2024
1 parent 51ae192 commit f0371ab
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pytorch_grad_cam/utils/image.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ def scale_cam_image(cam, target_size=None):
img = img - np.min(img)
img = img / (1e-7 + np.max(img))
if target_size is not None:
img = cv2.resize(img, target_size)
img = cv2.resize(np.float32(img), target_size)
result.append(img)
result = np.float32(result)

Expand Down

0 comments on commit f0371ab

Please sign in to comment.