Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix some typos #237

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ To use with CUDA:

You can choose between:

`GradCAM` , `ScoreCAM`, `GradCAMPlusPlus`, `AblationCAM`, `XGradCAM` , `LayerCAM`, 'FullGrad' and `EigenCAM`.
`gradcam`, `gradcam++`, `scorecam`, `xgradcam`, `ablationcam`, `eigencam`, `eigengradcam`, `layercam`, `fullgrad`.

Some methods like ScoreCAM and AblationCAM require a large number of forward passes,
and have a batched implementation.
Expand Down
6 changes: 3 additions & 3 deletions usage_examples/swinT_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,9 @@ def reshape_transform(tensor, height=7, width=7):
rgb_img = cv2.imread(args.image_path, 1)[:, :, ::-1]
rgb_img = cv2.resize(rgb_img, (224, 224))
rgb_img = np.float32(rgb_img) / 255
input_tensor = preprocess_image(rgb_img, mean=[0.5, 0.5, 0.5],
std=[0.5, 0.5, 0.5])

input_tensor = preprocess_image(
rgb_img, mean=[0.485, 0.456, 0.406], std=[0.229, 0.224, 0.225]
)

# AblationCAM and ScoreCAM have batched implementations.
# You can override the internal batch size for faster computation.
Expand Down
6 changes: 3 additions & 3 deletions usage_examples/vit_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
EigenGradCAM, \
LayerCAM, \
FullGrad

from pytorch_grad_cam import GuidedBackpropReLUModel
from pytorch_grad_cam.utils.image import show_cam_on_image, \
preprocess_image
Expand Down Expand Up @@ -110,8 +109,9 @@ def reshape_transform(tensor, height=14, width=14):
rgb_img = cv2.imread(args.image_path, 1)[:, :, ::-1]
rgb_img = cv2.resize(rgb_img, (224, 224))
rgb_img = np.float32(rgb_img) / 255
input_tensor = preprocess_image(rgb_img, mean=[0.5, 0.5, 0.5],
std=[0.5, 0.5, 0.5])
input_tensor = preprocess_image(
rgb_img, mean=[0.5, 0.5, 0.5], std=[0.5, 0.5, 0.5]
)

# If None, returns the map for the highest scoring category.
# Otherwise, targets the requested category.
Expand Down