Skip to main content

DeepBlur for napari

License BSD-3 PyPI Python Version napari hub npe2

DeepBlur estimates the blur of an image with neural networks, without calibration, and deblurs the image. The blur (point spread function, PSF) may vary across the field of view, as in most microscopes. From the estimated PSFs, the plugin also measures the quality of the optics: maps of the EE50, of the FWHM and of the cut-off frequency.

Usage

Open the plugin with Plugins > DeepBlur > DeepBlur, or with napari -w deepblur_napari.

You can drag&drop images, then open the plugin to treat them. An alternative is to just launch the plugin and demo images will be displayed. You can still add yours by drag&drop. The Help button of the plugin explains the main features.

The main processing pipeline is:

  • 1/ add your image
  • 2/ estimate the operator
  • 3/ estimate the noise
  • 4/ deblur
  1. Images: DeepBlur processes 2D grayscale and RGB images. Each image added to napari joins the Active Image menu.
  2. Identification model: the network that estimates the PSF. Use z3_z36 for microscopes and optical blurs, motion or motion_x_z3_z16 for motion blurs.
  3. Operator estimation: Estimate Operator builds the blur operator of the image from the PSFs estimated on overlapping tiles. It uses a single PSF (constant), PSFs interpolated through eigen-PSFs (eigen_psf), or PSFs blended between the tiles (tiled_psf).
  4. Noise: set the Gaussian noise and the bit depth, which sets the Poisson noise, or estimate them with Estimate noise.
  5. Deblurring: Deblur Image with Tikhonov, TV, DPIR or RAM (usually the best).

Metrology: Grid and clicks on the image display the estimated PSFs. EE50 Map, FWHM Map and Cut-off Map map the radius containing 50% of the energy of the PSF, its full width at half maximum, and the cut-off frequency of the optics.

Computations run in the background. The first use of a network downloads its weights.

Installation

DeepBlur needs Python 3.10 to 3.13 (PyTorch has no wheels for Intel Macs). It runs on CPU and, much faster, on NVIDIA GPUs.

In an environment that has napari, install it from napari's plugin manager (Plugins > Install/Uninstall Plugins), or with

pip install deepblur-napari

In a new environment, pip install "deepblur-napari[all]" also installs napari with its Qt backend.

On Linux, the PyTorch wheels of PyPI use CUDA. To get a CPU-only PyTorch, or one for another CUDA version, install it first by following https://pytorch.org/get-started/locally/, then install the plugin.

From the sources

uv creates the environment .venv with the versions locked in uv.lock:

git clone https://github.com/pierre-weiss/deepblur-napari.git
cd deepblur-napari
uv sync --extra all      # add --extra testing for the test tools
uv run napari -w deepblur_napari

uv run python debug.py opens the same window, e.g. to debug the plugin in an editor. With pip, run pip install -e ".[all]" in a new environment, or pip install -e . in an environment that has napari.

Weights

The networks download their weights on first use from the MAMBO server, or from the Hugging Face hub (mhnguyen712/deepblur) if the server is unreachable. They are cached in ~/.cache/deepblur/weights. You can change the server and the cache folder with the environment variables DEEPBLUR_WEIGHTS_URL and DEEPBLUR_CACHE.

Contributing

Contributions are very welcome. Run the tests with uv run pytest (after uv sync --extra all --extra testing) or with tox, and please ensure the coverage at least stays the same before you submit a pull request. The tests download the weights of the networks the first time.

To release, push a tag: git tag v0.1.0 && git push origin v0.1.0. The continuous integration runs the tests, builds the package from a clean checkout (the version comes from the tag) and publishes it on PyPI.

License

Distributed under the terms of the BSD-3 license, deepblur-napari is free and open source software.

Acknowledging this work

If you find this plugin useful for your research, please cite :

Blind spatially varying PSF estimation for fluorescence microscopy Minh Hai Nguyen, Florian Sarron, Paul Escande, Sylvain Cantaloube, Thomas Mangeat and Pierre Weiss

The main contributors to this plugin are

Minh Hai Nguyen, Florian Sarron, Paul Escande, Pierre Weiss

Issues

If you encounter any problems, please file an issue along with a detailed description.

Metadata

Release files for deepblur-napari 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for deepblur-napari 0.1.0
File Size Uploaded Provenance Actions
deepblur_napari-0.1.0.tar.gz 14.3 MB With provenance Details for deepblur_napari-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for deepblur-napari 0.1.0
File Interpreter ABI Platform Actions
deepblur_napari-0.1.0-py3-none-any.whl Python 3 none any Details for deepblur_napari-0.1.0-py3-none-any.whl

Total release size: 28.0 MB

Release files / deepblur_napari-0.1.0.tar.gz

Download URL deepblur_napari-0.1.0.tar.gz
Size 14.3 MB
Tags Source
SHA-256 checksum
How to use checksums
2951f9e1be00609c71213dd8f7c7417a518a37a3de4e57f25bb9d58cbd324a05
BLAKE2b-256 checksum
How to use checksums
aa4d425c7cc27b00a4430aae62bdec510810459c1ce388c93b86e82f4f0dd28b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 18, 2026.

Transparency log

Release files / deepblur_napari-0.1.0-py3-none-any.whl

Download URL deepblur_napari-0.1.0-py3-none-any.whl
Size 13.8 MB
Tags Python 3
SHA-256 checksum
How to use checksums
5e5185a9a5f92324e61d67d388a5e1516dc247ea8cb19665f29bc39898f2060e
BLAKE2b-256 checksum
How to use checksums
5064557bfbb86a1446475590edbf94c39e7742d419b0939bf30fcddaccd56b7e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 18, 2026.

Transparency log

Security for deepblur-napari 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for deepblur_napari-0.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 18, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page