Skip to content

v0.4.0: Evaluation metrics and PyTorch 2.0

Latest
Compare
Choose a tag to compare
@frgfm frgfm released this 19 Oct 18:37
· 14 commits to main since this release
53e9dfe

This minor release adds evaluation metrics to the package and bumps PyTorch to version 2.0

Note: TorchCAM 0.4.0 requires PyTorch 2.0.0 or higher.

Highlights

Evaluation metrics

This release comes with a standard way to evaluate interpretability methods. This allows users to better evaluate models' robustness:

from functools import partial
from torchcam.metrics import ClassificationMetric
metric = ClassificationMetric(cam_extractor, partial(torch.softmax, dim=-1))
metric.update(input_tensor)
metric.summary()

What's Changed

New Features 🚀

  • feat: Added CAM evaluation metric by @frgfm in #172
  • ci: Added FUNDING button by @frgfm in #182
  • feat: Added new TV models to demo by @frgfm in #184
  • ci: Added precommits, bandit & autoflake by @frgfm in #192
  • feat: Removes model hooks when the context manager exits by @frgfm in #198

Bug Fixes 🐛

  • chore: Applied post-release modifications by @frgfm in #180
  • fix: Fixed division by zero during normalization by @frgfm in #185
  • fix: Fixed zero division for weight computation in gradient based methods by @frgfm in #187
  • docs: Fixes README badges by @frgfm in #194
  • ci: Fixes issue templates by @frgfm in #196
  • fix: Fixes SmoothGradCAMpp by @frgfm in #204

Improvements

  • docs: Improved documentation build script by @frgfm in #183
  • docs: Updates README & CONTRIBUTING by @frgfm in #193
  • feat: Removed param grad computation in scripts by @frgfm in #201
  • style: Updates precommit hooks and mypy config by @frgfm in #203
  • refactor: Replaces flake8 by ruff and updates python version by @frgfm in #211
  • style: Bumps ruff & black, removes isort & pydocstyle by @frgfm in #216
  • style: Bumps ruff and updates torch & torchvision version specifiers by @frgfm in #219
  • docs: Updates CONTRIBUTING & README by @frgfm in #220
  • test: Speeds up test suite using plugins by @frgfm in #222
  • ci: Adds multiple build CI jobs by @frgfm in #223
  • feat: Removes warnings for torchvision and matplotlib by @frgfm in #224

Full Changelog: v0.3.2...v0.4.0