Skip to main content

Uncertainty quantification library in PyTorch

Project description

TorchUncertaintyLogo

pypi tests Docs PRWelcome Ruff Code Coverage Downloads Discord Badge

TorchUncertainty is a package designed to help you leverage uncertainty quantification techniques and make your deep neural networks more reliable. It aims at being collaborative and including as many methods as possible, so reach out to add yours!

:construction: TorchUncertainty is in early development :construction: - expect changes, but reach out and contribute if you are interested in the project! Please raise an issue if you have any bugs or difficulties and join the discord server.

:books: Our webpage and documentation is available here: torch-uncertainty.github.io. :books:

TorchUncertainty contains the official implementations of multiple papers from major machine-learning and computer vision conferences and was/will be featured in tutorials at WACV 2024, HAICON 2024 and ECCV 2024.


This package provides a multi-level API, including:

  • easy-to-use :zap: lightning uncertainty-aware training & evaluation routines for 4 tasks: classification, probabilistic and pointwise regression, and segmentation.
  • ready-to-train baselines on research datasets, such as ImageNet and CIFAR
  • pretrained weights for these baselines on ImageNet and CIFAR ( :construction: work in progress :construction: ).
  • layers, models, metrics, & losses available for use in your networks
  • scikit-learn style post-processing methods such as Temperature Scaling.

Have a look at the Reference page or the API reference for a more exhaustive list of the implemented methods, datasets, metrics, etc.

:gear: Installation

TorchUncertainty requires Python 3.10 or greater. Install the desired PyTorch version in your environment. Then, install the package from PyPI:

pip install torch-uncertainty

The installation procedure for contributors is different: have a look at the contribution page.

:racehorse: Quickstart

We make a quickstart available at torch-uncertainty.github.io/quickstart.

:books: Implemented methods

TorchUncertainty currently supports classification, probabilistic and pointwise regression, segmentation and pixelwise regression (such as monocular depth estimation). It includes the official codes of the following papers:

  • LP-BNN: Encoding the latent posterior of Bayesian Neural Networks for uncertainty quantification - IEEE TPAMI
  • Packed-Ensembles for Efficient Uncertainty Estimation - ICLR 2023 - Tutorial
  • MUAD: Multiple Uncertainties for Autonomous Driving, a benchmark for multiple uncertainty types and tasks - BMVC 2022

We also provide the following methods:

Baselines

To date, the following deep learning baselines have been implemented. Click :inbox_tray: on the methods for tutorials:

Augmentation methods

The following data augmentation methods have been implemented:

  • Mixup, MixupIO, RegMixup, WarpingMixup

Post-processing methods

To date, the following post-processing methods have been implemented:

Tutorials

Check out our tutorials at torch-uncertainty.github.io/auto_tutorials.

:telescope: Projects using TorchUncertainty

The following projects use TorchUncertainty:

  • A Symmetry-Aware Exploration of Bayesian Neural Network Posteriors - ICLR 2024

If you are using TorchUncertainty in your project, please let us know, we will add your project to this list!

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

torch_uncertainty-0.2.1.post0.tar.gz (737.8 kB view details)

Uploaded Source

Built Distribution

torch_uncertainty-0.2.1.post0-py3-none-any.whl (241.5 kB view details)

Uploaded Python 3

File details

Details for the file torch_uncertainty-0.2.1.post0.tar.gz.

File metadata

File hashes

Hashes for torch_uncertainty-0.2.1.post0.tar.gz
Algorithm Hash digest
SHA256 23b91a528602139e13a712fc0d8c60e61c9bd2a6eb6883832de69a67ff8290f0
MD5 dcc66a5a0ef26c35a8a878a64fdb0315
BLAKE2b-256 74015fdb4da415c75e222a3509755d58c56c8ac93b7685286f3e211f77fbc2ea

See more details on using hashes here.

File details

Details for the file torch_uncertainty-0.2.1.post0-py3-none-any.whl.

File metadata

File hashes

Hashes for torch_uncertainty-0.2.1.post0-py3-none-any.whl
Algorithm Hash digest
SHA256 775e2215833352d38b61c1e9dbdb55455cb28fa4e207d36b97e40958847f6be1
MD5 f32137f00d7696ecf96b0f49e4610e05
BLAKE2b-256 8e80c4e9c6a226dc26084f7ca32d4ea690b33c9345b13a409af390247f9d25fb

See more details on using hashes here.

Supported by

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