Skip to content

Commit b9f477e

Browse files
committed
fix merge, lower gif size
1 parent 3f6b14d commit b9f477e

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed
-20.6 MB
Loading

pytorch_grad_cam/utils/image.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -165,10 +165,11 @@ def scale_cam_image(cam, target_size=None):
165165
img = img - np.min(img)
166166
img = img / (1e-7 + np.max(img))
167167
if target_size is not None:
168-
if len(img.shape) > 3:
169-
img = zoom(np.float32(img), [(t_s/i_s) for i_s, t_s in zip(img.shape, target_size[::-1])])
170-
else:
171-
img = cv2.resize(np.float32(img), target_size)
168+
if len(img.shape) > 3:
169+
img = zoom(np.float32(img), [
170+
(t_s / i_s) for i_s, t_s in zip(img.shape, target_size[::-1])])
171+
else:
172+
img = cv2.resize(np.float32(img), target_size)
172173

173174
result.append(img)
174175
result = np.float32(result)

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
setuptools.setup(
1010
name='grad-cam',
11-
version='1.5.0',
11+
version='1.5.2',
1212
author='Jacob Gildenblat',
1313
author_email='[email protected]',
1414
description='Many Class Activation Map methods implemented in Pytorch for classification, segmentation, object detection and more',

0 commit comments

Comments
 (0)