Skip to main content

Pytorch library for solving inverse problems with deep learning

Project description

deepinv logo

Test Status Docs Status Python 3.6+ codecov Black discord colab

Introduction

Deep Inverse is an open-source pytorch library for solving imaging inverse problems using deep learning. The goal of deepinv is to accelerate the development of deep learning based methods for imaging inverse problems, by combining popular learning-based reconstruction approaches in a common and simplified framework, standarizing forward imaging models and simplifying the creation of imaging datasets.

With deepinv you can:

deepinv schematic

Documentation

Read the documentation and examples at https://deepinv.github.io.

Install

To install the latest stable release of deepinv, you can simply do:

pip install deepinv

You can also install the latest version of deepinv directly from github:

pip install git+https://github.com/deepinv/deepinv.git#egg=deepinv

Getting Started

Try out the following plug-and-play image inpainting example:

import deepinv as dinv
from deepinv.utils import load_url_image

url = ("https://huggingface.co/datasets/deepinv/images/resolve/main/cameraman.png?download=true")
x = load_url_image(url=url, img_size=512, grayscale=True, device='cpu')

physics = dinv.physics.Inpainting((1, 512, 512), mask = 0.5, \
                                   noise_model=dinv.physics.GaussianNoise(sigma=0.01))

data_fidelity = dinv.optim.data_fidelity.L2()
prior = dinv.optim.prior.PnP(denoiser=dinv.models.MedianFilter())
model = dinv.optim.optim_builder(iteration="HQS", prior=prior, data_fidelity=data_fidelity, \
                                 params_algo={"stepsize": 1.0, "g_param": 0.1, "lambda": 2.})
y = physics(x)
x_hat = model(y, physics)
dinv.utils.plot([x, y, x_hat], ["signal", "measurement", "estimate"], rescale_mode='clip')

Also try out one of the examples to get started.

Contributing

DeepInverse is a community-driven project and welcomes contributions of all forms. We are ultimately aiming for a comprehensive library of inverse problems and deep learning, and we need your help to get there! The preferred way to contribute to deepinv is to fork the main repository on GitHub, then submit a “Pull Request” (PR). See our contributing guide for more details.

Finding help

If you have any questions or suggestions, please join the conversation in our Discord server. The recommended way to get in touch with the developers is to open an issue on the issue tracker.

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

deepinv-0.1.0.dev0.tar.gz (147.6 kB view details)

Uploaded Source

Built Distribution

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

deepinv-0.1.0.dev0-py3-none-any.whl (187.8 kB view details)

Uploaded Python 3

File details

Details for the file deepinv-0.1.0.dev0.tar.gz.

File metadata

  • Download URL: deepinv-0.1.0.dev0.tar.gz
  • Upload date:
  • Size: 147.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.12

File hashes

Hashes for deepinv-0.1.0.dev0.tar.gz
Algorithm Hash digest
SHA256 11105769b36f34aa6b6ac9ba58369f2cc7189a5ce7bf2540783c6b507af4c607
MD5 f2687698bb28ae75878f4272a9f545c1
BLAKE2b-256 e98e40bacf6c7951d81fa965687137d3343c2f3fe3a38fb62cb7744c115c3043

See more details on using hashes here.

File details

Details for the file deepinv-0.1.0.dev0-py3-none-any.whl.

File metadata

  • Download URL: deepinv-0.1.0.dev0-py3-none-any.whl
  • Upload date:
  • Size: 187.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.12

File hashes

Hashes for deepinv-0.1.0.dev0-py3-none-any.whl
Algorithm Hash digest
SHA256 3405fd78a40393b371a3e75fe0644ec63afd446e5b72e146712b944f2770f2b1
MD5 9a11b7b21a6b7f0301f393af9d4b22d6
BLAKE2b-256 cd794573b1776de279d7b824988a57d840f97c66de709c734ce418d4c7e0c835

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