Skip to content

Commit

Permalink
docs: Added example notebooks (#99)
Browse files Browse the repository at this point in the history
* docs: Added notebook page in the documentation

* docs: Added notebooks

* docs: Updated documentation requirements

* docs: Added ref to notebooks in README

* docs: Updated symlink

* docs: Updated README

* docs: Updated notebook README
  • Loading branch information
frgfm authored Oct 31, 2021
1 parent 5fbdd95 commit caeac26
Show file tree
Hide file tree
Showing 8 changed files with 1,413 additions and 1 deletion.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

# TorchCAM: class activation explorer

[![License: Apache 2.0](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](LICENSE) [![Codacy Badge](https://app.codacy.com/project/badge/Grade/25324db1064a4d52b3f44d657c430973)](https://www.codacy.com/gh/frgfm/torch-cam/dashboard?utm_source=github.com&utm_medium=referral&utm_content=frgfm/torch-cam&utm_campaign=Badge_Grade) ![Build Status](https://github.com/frgfm/torch-cam/workflows/tests/badge.svg) [![codecov](https://codecov.io/gh/frgfm/torch-cam/branch/master/graph/badge.svg)](https://codecov.io/gh/frgfm/torch-cam) [![Docs](https://img.shields.io/badge/docs-available-blue.svg)](https://frgfm.github.io/torch-cam) [![Pypi](https://img.shields.io/badge/pypi-v0.2.0-blue.svg)](https://pypi.org/project/torchcam/) [![Hugging Face Spaces](https://img.shields.io/badge/%F0%9F%A4%97%20Hugging%20Face-Spaces-blue)](https://huggingface.co/spaces/frgfm/torch-cam)
[![License: Apache 2.0](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](LICENSE) [![Codacy Badge](https://app.codacy.com/project/badge/Grade/25324db1064a4d52b3f44d657c430973)](https://www.codacy.com/gh/frgfm/torch-cam/dashboard?utm_source=github.com&utm_medium=referral&utm_content=frgfm/torch-cam&utm_campaign=Badge_Grade) ![Build Status](https://github.com/frgfm/torch-cam/workflows/tests/badge.svg) [![codecov](https://codecov.io/gh/frgfm/torch-cam/branch/master/graph/badge.svg)](https://codecov.io/gh/frgfm/torch-cam) [![Docs](https://img.shields.io/badge/docs-available-blue.svg)](https://frgfm.github.io/torch-cam) [![Pypi](https://img.shields.io/badge/pypi-v0.2.0-blue.svg)](https://pypi.org/project/torchcam/) [![Hugging Face Spaces](https://img.shields.io/badge/%F0%9F%A4%97%20Hugging%20Face-Spaces-blue)](https://huggingface.co/spaces/frgfm/torch-cam) [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/frgfm/torch-cam/blob/master/notebooks/quicktour.ipynb)

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

Expand Down Expand Up @@ -213,6 +213,10 @@ python scripts/eval_latency.py SmoothGradCAMpp

*All script arguments can be checked using `python scripts/eval_latency.py --help`*

### Example notebooks

Looking for more illustrations of TorchCAM features?
You might want to check the [Jupyter notebooks](notebooks) designed to give you a broader overview.



Expand Down
2 changes: 2 additions & 0 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@ sphinx-rtd-theme==0.4.3
sphinxemoji
sphinx-copybutton
docutils<0.18
recommonmark
sphinx-markdown-tables
2 changes: 2 additions & 0 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@
'sphinx.ext.mathjax',
'sphinxemoji.sphinxemoji', # cf. https://sphinxemojicodes.readthedocs.io/en/stable/
'sphinx_copybutton',
'recommonmark',
'sphinx_markdown_tables',
]

napoleon_use_ivar = True
Expand Down
1 change: 1 addition & 0 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ This project is meant for:
:hidden:

installing
notebooks



Expand Down
1 change: 1 addition & 0 deletions docs/source/notebooks.md
8 changes: 8 additions & 0 deletions notebooks/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# TorchCAM Notebooks

Here are some notebooks compiled for users to better leverage the library capabilities:

| Notebook | Description | |
|:----------|:-------------|------:|
| [Quicktour](https://github.com/frgfm/torchcam/blob/master/notebooks/quicktour.ipynb) | A presentation of the main features of TorchCAM | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/frgfm/torch-cam/blob/master/notebooks/quicktour.ipynb) |
| [Latency benchmark](https://github.com/frgfm/torchcam/blob/master/notebooks/latency_benchmark.ipynb) | How to benchmark the latency of a CAM method | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/frgfm/torch-cam/blob/master/notebooks/latency_benchmark.ipynb) |
Loading

0 comments on commit caeac26

Please sign in to comment.