Skip to content

Commit

Permalink
docs: Improved documentation (#60)
Browse files Browse the repository at this point in the history
  • Loading branch information
frgfm authored Apr 9, 2021
1 parent b0eae1a commit aa4f02e
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 8 deletions.
1 change: 1 addition & 0 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
sphinx<=3.4.3
sphinx-rtd-theme==0.4.3
sphinxemoji
20 changes: 16 additions & 4 deletions docs/source/cams.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,20 @@ torchcam.cams
.. currentmodule:: torchcam.cams


CAM
--------
Class activation map
--------------------
The class activation map gives you the importance of each region of a feature map on a model's output.
More specifically, a class activation map is relative to:

* the layer at which it is computed (e.g. the N-th layer of your model)
* the model's classification output (e.g. the raw logits of the model)
* the class index to focus on

With TorchCAM, the target layer is selected when you create your CAM extractor. You will need to pass the model logits to the extractor and a class index for it to do its magic!


Activation-based methods
------------------------
Methods related to activation-based class activation maps.


Expand All @@ -19,8 +31,8 @@ Methods related to activation-based class activation maps.
.. autoclass:: ISCAM


Grad-CAM
--------
Gradient-based methods
----------------------
Methods related to gradient-based class activation maps.


Expand Down
1 change: 1 addition & 0 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
'sphinx.ext.viewcode',
'sphinx.ext.autosummary',
'sphinx.ext.mathjax',
'sphinxemoji.sphinxemoji', # cf. https://sphinxemojicodes.readthedocs.io/en/stable/
]

napoleon_use_ivar = True
Expand Down
13 changes: 10 additions & 3 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
@@ -1,12 +1,19 @@
Torchcam documentation
=======================
TorchCAM: class activation explorer
===================================

TorchCAM provides a minimal yet flexible way to explore the spatial importance of features on your PyTorch model outputs.

The :mod:`torchcam` package gives PyTorch users the possibility to visualize the spatial influence on classification outputs.

.. image:: https://github.com/frgfm/torch-cam/releases/download/v0.1.2/base_snippet.png
:alt: code_snippet
:align: center

This project is meant for :

* |:zap:| **for exploration**: easily assess the influence of spatial features on your model's outputs
* |:woman_scientist:| **for research**: quickly implement your own ideas for new CAM methods


.. toctree::
:maxdepth: 2
:caption: Getting Started
Expand Down
2 changes: 1 addition & 1 deletion docs/source/installing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Installation
************

This library requires Python 3.6 or newer.
This library requires Python 3.6 or higher.

Via Python Package
==================
Expand Down

0 comments on commit aa4f02e

Please sign in to comment.