Skip to content

zjykzj/cam

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Language: 🇺🇸 🇨🇳

«cam» implements Gradient-weighted Class Activation Mapping.

Table of Contents

Background

Through CAM (Class Activation Mapping), I can effectively visualize the model's focus on images, helping me better apply them to practical scenarios.

This warehouse has implemented Grad-CAM (Weight the 2D activations by the average gradient). At present, there are many other variants besides CAM and Grad-CAM. You can view the usage of jacobgil/pytorch-grad-cam and frgfm/torch-cam

Usage

# Custom Grad-CAM
python imagenet/Grad-CAM.py --arch resnet50 imgs/cat.jpg

# jacobgil/pytorch-grad-cam
python samples/pytorch-grad-cam.py imgs/cat.jpg

Maintainers

  • zhujian - Initial work - zjykzj

Thanks

Contributing

Anyone's participation is welcome! Open an issue or submit PRs.

Small note:

License

Apache License 2.0 © 2023 zjykzj