Skip to main content

image denoising https://doi.org/10.1109/TMI.2009.2033991

Project description

ndsafir v2026.1011-alpha

Build Wheels Python tests

Denoising of multi-dimensional microscopy images.

Command line

Compilation

Install dependencies on ubuntu or debian with

sudo apt update
sudo apt install build-essential cmake libtiff-dev

To compile the code with a traditional makefile:

cd src
make release

To compile the code with CMake:

mkdir build
cd build
cmake ../src
make

Usage

Type ndsafir -h for help.

ndsafir 2026.1004-alpha - https://doi.org/10.1109/TMI.2009.2033991
    -i               0                        input (TIFF file)
    -o               0                        output (TIFF file)
    -patch           3,3,0,0,0                patch radius x,y,z,c,t
    -3D              true                     use 3D
    -time            true                     use time
    -noise           0                        noise model: gain,offset or gain,offset,readout
    -max_iter        4                        maximum number of iterations
    -pval            0.01                     p-value (0,1)
    -nthreads        12                       number of available threads

The input and output are TIFF file and support the hyperstack from ImageJ.

The patch radius can be tuned for each axis (x,y,z,c and time).

3D and time option will activate the use of 3d and time.

The noise level (-noise) can be specified as

  • the noise standard deviation for Gaussisan noise
  • a triplet gain, offset, readout for Poisson-Gaussian noise
  • a pair of gain and noise offset If not specified it will be estimated.

The pvalue pval determines the threshold for detecting similar block or patches in the images.

Python bindings

Installation

git clone this repo
pip install ./ndsafir

Usage in a script or notebook

from skimage import data
import ndsafir
img = data.cat()
denoised = ndsafir.denoise(img,"gaussian",noise_std=5,axes="YXC")

Usage as a command line

The module can be used as a command line tool too which allows to support more input format and use distributed computing using dask distributed.

For processing tif files:

python -m ndsafir --input input.tif --output output.tif

For processing ome-zarr with 16x256x256 chunks with 8 pixel overlap.

python -m ndsafir --input input.zarr --output output.zarr --chunk 1,1,16,256,256 --depth 0,0,8,8,8

For processing a czi file with 16,256x256 chunks with 8 pixel overlaps.

python -m ndsafir --input input.czi --output output.zarr --chunk 1,1,16,256,256 --depth 0,0,8,8,8

For processing an ome-zarr on a cluster with 12 workers (with 112 processors each):

python -m ndsafir --input input.czi --output output.zarr --chunk 1,1,16,256,256 --depth 0,0,8,8,8 --compute compute.yml

with compute.yml a file:

slurm:
   processes: 1
   cores: 112
   n_workers: 10
   memory: "64GB"
   queue: "cpu"
   walltime: '01:00:00'
   local_directory: $SLURM_SCRATCH_DIR

Benchmark

A benchmarking bash script is in the scripts folder.

cd scripts
./benchmark.sh

Results are saved in a benchmark.csv file and can be analyzed using the notebook 'Analyze Benchmark.ipynb'.

Average PSNR for several datasets:

dataset 5 10 15 20 25 30
BSD68 36.7516 32.6167 30.5264 29.1308 28.0673 27.1925
CBSD68 36.8811 32.9032 30.9022 29.563 28.5382 27.6981
Fluo4 43.8542 39.4669 36.8542 34.9359 33.4384 32.1515
Kodak24 37.5176 33.8983 31.9482 30.5841 29.528 28.6477
McMaster 38.1061 34.5695 32.5226 31.0209 29.8129 28.808
RNI15 35.3304 30.8142 28.9499 27.7385 26.8422 26.1281
RNI6 35.7485 31.5641 29.6211 28.342 27.3921 26.6005
Set12 37.2683 33.6293 31.6777 30.2513 29.0975 28.133

Reference

J. Boulanger, C. Kervrann, P. Bouthemy, P. Elbau, J. -B. Sibarita and J. Salamero, "Patch-Based Nonlocal Functional for Denoising Fluorescence Microscopy Image Sequences," in IEEE Transactions on Medical Imaging, vol. 29, no. 2, pp. 442-454, Feb. 2010, doi: 10.1109/TMI.2009.2033991.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

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

ndsafir-2026.1008a0-cp314-cp314-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (268.4 kB view details)

Uploaded CPython 3.14manylinux: glibc 2.24+ x86-64manylinux: glibc 2.28+ x86-64

ndsafir-2026.1008a0-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (268.1 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.24+ x86-64manylinux: glibc 2.28+ x86-64

ndsafir-2026.1008a0-cp312-cp312-win_amd64.whl (115.6 kB view details)

Uploaded CPython 3.12Windows x86-64

ndsafir-2026.1008a0-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (268.0 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.24+ x86-64manylinux: glibc 2.28+ x86-64

ndsafir-2026.1008a0-cp312-cp312-macosx_11_0_x86_64.whl (444.8 kB view details)

Uploaded CPython 3.12macOS 11.0+ x86-64

ndsafir-2026.1008a0-cp312-cp312-macosx_11_0_arm64.whl (407.0 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

ndsafir-2026.1008a0-cp311-cp311-win_amd64.whl (114.2 kB view details)

Uploaded CPython 3.11Windows x86-64

ndsafir-2026.1008a0-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (267.0 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.24+ x86-64manylinux: glibc 2.28+ x86-64

ndsafir-2026.1008a0-cp311-cp311-macosx_11_0_x86_64.whl (442.3 kB view details)

Uploaded CPython 3.11macOS 11.0+ x86-64

ndsafir-2026.1008a0-cp311-cp311-macosx_11_0_arm64.whl (405.2 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

ndsafir-2026.1008a0-cp310-cp310-win_amd64.whl (113.6 kB view details)

Uploaded CPython 3.10Windows x86-64

ndsafir-2026.1008a0-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (266.6 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.24+ x86-64manylinux: glibc 2.28+ x86-64

ndsafir-2026.1008a0-cp310-cp310-macosx_11_0_x86_64.whl (440.7 kB view details)

Uploaded CPython 3.10macOS 11.0+ x86-64

ndsafir-2026.1008a0-cp310-cp310-macosx_11_0_arm64.whl (404.3 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

File details

Details for the file ndsafir-2026.1008a0-cp314-cp314-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for ndsafir-2026.1008a0-cp314-cp314-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 b60907442d86ceffbf9aed2769eab04995f3f073e1a146ae242ae3a84729e4a0
MD5 bbb13a8207f138eed75800493b681556
BLAKE2b-256 e292c4e9791709da5cbbdd909353e35327212d6c6d88eb884aecc4f69719ad45

See more details on using hashes here.

Provenance

The following attestation bundles were made for ndsafir-2026.1008a0-cp314-cp314-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl:

Publisher: wheels.yaml on jboulanger/ndsafir

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ndsafir-2026.1008a0-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for ndsafir-2026.1008a0-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 20aa63c593a33e281108842d5e551d3034f78f2c32d33850cb62f3372b21af4c
MD5 1273d8d097bd7763e94fefeb69b7bcc8
BLAKE2b-256 cda12d336f0575cd3d99d790caebcbd29f86cd9193166a0c019a6673ff6030d2

See more details on using hashes here.

Provenance

The following attestation bundles were made for ndsafir-2026.1008a0-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl:

Publisher: wheels.yaml on jboulanger/ndsafir

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ndsafir-2026.1008a0-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for ndsafir-2026.1008a0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 9921bae69ce974ecc636b950c42f1e43331a850f38d020cfe4ffa3581d18c761
MD5 1db294388bb5b6d99f496c7fb6a89529
BLAKE2b-256 97da06d1dcdb29b111a83fc99ff4335009ace7e2d4926a945b8f1ed4208ed833

See more details on using hashes here.

Provenance

The following attestation bundles were made for ndsafir-2026.1008a0-cp312-cp312-win_amd64.whl:

Publisher: wheels.yaml on jboulanger/ndsafir

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ndsafir-2026.1008a0-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for ndsafir-2026.1008a0-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 2fffb12749166b55a3cb5b7782094ed388ba26a13700ed4f7c7dc4e5f8b1709f
MD5 7924738ddb335d98c261f57f1e7c7ea6
BLAKE2b-256 b4e9005c13bc16969da72b894807d49f22d6e175d665f9758d8f2924cbffe1ea

See more details on using hashes here.

Provenance

The following attestation bundles were made for ndsafir-2026.1008a0-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl:

Publisher: wheels.yaml on jboulanger/ndsafir

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ndsafir-2026.1008a0-cp312-cp312-macosx_11_0_x86_64.whl.

File metadata

File hashes

Hashes for ndsafir-2026.1008a0-cp312-cp312-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 0299163277896264fd3363f1f27cea4075b150441c6bca5cffcee7d07dc27295
MD5 924470d5d28ecb34a469f3f347f5e387
BLAKE2b-256 b40bdf46e2753be3a31a21012cef299c2c9f3062e70751e0e47828c640adfff7

See more details on using hashes here.

Provenance

The following attestation bundles were made for ndsafir-2026.1008a0-cp312-cp312-macosx_11_0_x86_64.whl:

Publisher: wheels.yaml on jboulanger/ndsafir

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ndsafir-2026.1008a0-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for ndsafir-2026.1008a0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 d61ad886b96cc6fffec6773a29a1433a21412cec69da9c8959a68aadc27e8aa0
MD5 45935d1f2a55083bc2afc805007f6913
BLAKE2b-256 26da326a309048d91a7c1a83050a5cd9203a9a967f9d25a9aed8073d908c5b20

See more details on using hashes here.

Provenance

The following attestation bundles were made for ndsafir-2026.1008a0-cp312-cp312-macosx_11_0_arm64.whl:

Publisher: wheels.yaml on jboulanger/ndsafir

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ndsafir-2026.1008a0-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for ndsafir-2026.1008a0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 3aa98b429b446a3a43ec7d667ae64351be593fdf2f29d42fc6b08a2fd6694b7b
MD5 5835fcda4ed67579242f5e1d2782ed41
BLAKE2b-256 c304a5dc6f2ccf892c146b96e376a51f28f53b41e6c189baceace209ab2df0a3

See more details on using hashes here.

Provenance

The following attestation bundles were made for ndsafir-2026.1008a0-cp311-cp311-win_amd64.whl:

Publisher: wheels.yaml on jboulanger/ndsafir

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ndsafir-2026.1008a0-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for ndsafir-2026.1008a0-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 6529d154215858980ba41f71b5470c88c5000fd1e9d19e4f903bfc526042b278
MD5 5a10404dd59eebda87e5ff9e9e2089aa
BLAKE2b-256 0d06c05110b7b9638b226675d70c2cee0f8be327dc9a5766018126e38180de3e

See more details on using hashes here.

Provenance

The following attestation bundles were made for ndsafir-2026.1008a0-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl:

Publisher: wheels.yaml on jboulanger/ndsafir

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ndsafir-2026.1008a0-cp311-cp311-macosx_11_0_x86_64.whl.

File metadata

File hashes

Hashes for ndsafir-2026.1008a0-cp311-cp311-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 7828c7e5ed4f26b74cedd67bd21dd4ff81eea1284ec226e01fa8842ef27a49e6
MD5 102b36c5010b8298b20ced41c1284ec4
BLAKE2b-256 5a203cd7031b127f4f2d9f91de6ce50afdc92662ec68bdbeefacd066a3bc51f8

See more details on using hashes here.

Provenance

The following attestation bundles were made for ndsafir-2026.1008a0-cp311-cp311-macosx_11_0_x86_64.whl:

Publisher: wheels.yaml on jboulanger/ndsafir

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ndsafir-2026.1008a0-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for ndsafir-2026.1008a0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 dddfddc0a517abe2eb85c7c057ff903e13c0993f34b383d345952830ad08de14
MD5 625760fff8f47753b78503b69b43ca97
BLAKE2b-256 4a6c49832d404e499249c18af691e73bc16ca04637d66f4b5a3b907fe33605b6

See more details on using hashes here.

Provenance

The following attestation bundles were made for ndsafir-2026.1008a0-cp311-cp311-macosx_11_0_arm64.whl:

Publisher: wheels.yaml on jboulanger/ndsafir

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ndsafir-2026.1008a0-cp310-cp310-win_amd64.whl.

File metadata

File hashes

Hashes for ndsafir-2026.1008a0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 54d65af7c93ec6ec93beb9d765d9303a27cf5a826f406c621d06e335e20d7119
MD5 f080f17d2c89196606054ad770312315
BLAKE2b-256 afa1e0ae5b3865c4224f4488752761c265062bdc5ce80c3ec902967cb15b195d

See more details on using hashes here.

Provenance

The following attestation bundles were made for ndsafir-2026.1008a0-cp310-cp310-win_amd64.whl:

Publisher: wheels.yaml on jboulanger/ndsafir

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ndsafir-2026.1008a0-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for ndsafir-2026.1008a0-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 67fd55eda75f756a45866fc913a6bd3076666042fd70af0bc15281b4012ab3d8
MD5 4280ebdd91e67f4a8d3465c16392d99f
BLAKE2b-256 7f4dc3a1952dae1df65376b676eef4214494374d9535bdc65d38edab72186b91

See more details on using hashes here.

Provenance

The following attestation bundles were made for ndsafir-2026.1008a0-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl:

Publisher: wheels.yaml on jboulanger/ndsafir

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ndsafir-2026.1008a0-cp310-cp310-macosx_11_0_x86_64.whl.

File metadata

File hashes

Hashes for ndsafir-2026.1008a0-cp310-cp310-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 d7d4c63d6a77d846d21699573f11c6fea6f02513a318350926372daa7ef86619
MD5 4fa1df4cf73bd6375de86b14cf1a2c54
BLAKE2b-256 509b92d1fd9f4f7427ff49c4a2ec33b8eb1be6ef94c2971762340e013e1e6b6a

See more details on using hashes here.

Provenance

The following attestation bundles were made for ndsafir-2026.1008a0-cp310-cp310-macosx_11_0_x86_64.whl:

Publisher: wheels.yaml on jboulanger/ndsafir

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ndsafir-2026.1008a0-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for ndsafir-2026.1008a0-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 ef74ec09f7c2f1d277bf072f8438c0951059f4896164a632c6040278b9e842f5
MD5 57e8e4cb5ec20221ff2c22662f930d20
BLAKE2b-256 30f063f8877d55c80a2a1f813140d31d79feace12491fe7d411e21c81f7a0acd

See more details on using hashes here.

Provenance

The following attestation bundles were made for ndsafir-2026.1008a0-cp310-cp310-macosx_11_0_arm64.whl:

Publisher: wheels.yaml on jboulanger/ndsafir

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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