Skip to main content

Class activation maps for your PyTorch CNN models

Project description

Torchcam: class activation explorer

License Codacy Badge Build Status codecov Docs Pypi

Simple way to leverage the class-specific activation of convolutional layers in PyTorch.

gradcam_sample

Table of Contents

Getting started

Prerequisites

  • Python 3.6 (or more recent)
  • pip

Installation

You can install the package using pypi as follows:

pip install torchcam

or using conda:

conda install -c frgfm torchcam

Usage

You can find a detailed example below to retrieve the CAM of a specific class on a resnet architecture.

python scripts/cam_example.py --model resnet50 --class-idx 232

gradcam_sample

Documentation

The full package documentation is available here for detailed specifications. The documentation was built with Sphinx using a theme provided by Read the Docs.

Contributing

Please refer to CONTRIBUTING if you wish to contribute to this project.

Credits

This project is developed and maintained by the repo owner, but the implementation was based on the following precious papers:

License

Distributed under the MIT License. See LICENSE for more information.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

torchcam-0.1.2.tar.gz (13.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

torchcam-0.1.2-py3-none-any.whl (12.9 kB view details)

Uploaded Python 3

File details

Details for the file torchcam-0.1.2.tar.gz.

File metadata

  • Download URL: torchcam-0.1.2.tar.gz
  • Upload date:
  • Size: 13.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/51.1.0 requests-toolbelt/0.9.1 tqdm/4.55.0 CPython/3.7.9

File hashes

Hashes for torchcam-0.1.2.tar.gz
Algorithm Hash digest
SHA256 035c59aa763173d2f34e95b1588413ac94657c2d553a2fc5441e80b7e6daf44e
MD5 1017a34474329b1a0dc23773fb8aa487
BLAKE2b-256 4119f66fe9caf5aa46e75570bff90e2cae878dc8b23b396e2e7c620040478f4c

See more details on using hashes here.

File details

Details for the file torchcam-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: torchcam-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 12.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/51.1.0 requests-toolbelt/0.9.1 tqdm/4.55.0 CPython/3.7.9

File hashes

Hashes for torchcam-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 65606a29cb5985cd1ffc469ae98d3a75dc6dc58e4b7ca0e7ecebe38f472fb825
MD5 16d676646e5bfeb99df052ba60b2d1f3
BLAKE2b-256 bbb825080c458a4a45fe3a6e60da337c9099c0bc976defa8008c7d2117db2334

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page