Skip to main content

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

Project description

ndsafir v2026.1014-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.1014a0-cp314-cp314-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (268.5 kB view details)

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

ndsafir-2026.1014a0-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (268.2 kB view details)

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

ndsafir-2026.1014a0-cp312-cp312-win_amd64.whl (118.2 kB view details)

Uploaded CPython 3.12Windows x86-64

ndsafir-2026.1014a0-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (268.2 kB view details)

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

ndsafir-2026.1014a0-cp312-cp312-macosx_11_0_x86_64.whl (444.9 kB view details)

Uploaded CPython 3.12macOS 11.0+ x86-64

ndsafir-2026.1014a0-cp312-cp312-macosx_11_0_arm64.whl (407.1 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

ndsafir-2026.1014a0-cp311-cp311-win_amd64.whl (116.8 kB view details)

Uploaded CPython 3.11Windows x86-64

ndsafir-2026.1014a0-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (267.1 kB view details)

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

ndsafir-2026.1014a0-cp311-cp311-macosx_11_0_x86_64.whl (442.4 kB view details)

Uploaded CPython 3.11macOS 11.0+ x86-64

ndsafir-2026.1014a0-cp311-cp311-macosx_11_0_arm64.whl (405.4 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

ndsafir-2026.1014a0-cp310-cp310-win_amd64.whl (115.4 kB view details)

Uploaded CPython 3.10Windows x86-64

ndsafir-2026.1014a0-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (266.7 kB view details)

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

ndsafir-2026.1014a0-cp310-cp310-macosx_11_0_x86_64.whl (440.9 kB view details)

Uploaded CPython 3.10macOS 11.0+ x86-64

ndsafir-2026.1014a0-cp310-cp310-macosx_11_0_arm64.whl (404.4 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

File details

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

File metadata

File hashes

Hashes for ndsafir-2026.1014a0-cp314-cp314-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 cec26bf4911d87f5f9d609e1d8abc862251034706464c3d42a68dd6082b9fcba
MD5 f420cc08126a8db0276262fb37b0d4e2
BLAKE2b-256 6a42a54a924442de43ea83a5758be8c1c3828a443ef948691bf82cbfb6f905c8

See more details on using hashes here.

Provenance

The following attestation bundles were made for ndsafir-2026.1014a0-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.1014a0-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for ndsafir-2026.1014a0-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 0198ad2c5898e2d733d7e793e5b608a84c66df89ef856552b6942cdd91bd28f8
MD5 19da9127df89d8887092ba50ec48c7aa
BLAKE2b-256 412787d2a285d4c8c8ebb74b31f1b18a166615a059423f45ceb3d9e7c202c88a

See more details on using hashes here.

Provenance

The following attestation bundles were made for ndsafir-2026.1014a0-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.1014a0-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for ndsafir-2026.1014a0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 645688871faa9b222ea24895a19bad9a60a3309289340d2ae1db5d640c9c7e70
MD5 080d2055d4a56d209e5cfe4bba18cd31
BLAKE2b-256 adc4edb52d17e761635047b364c7b3793ba012e8d79e33127530d68eded18744

See more details on using hashes here.

Provenance

The following attestation bundles were made for ndsafir-2026.1014a0-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.1014a0-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for ndsafir-2026.1014a0-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 0c20e315789bc4a2d87306dd594a776285798da73beffe58364ef1b8bc8a4fa6
MD5 c9867604628545c41664d5cba9ae4671
BLAKE2b-256 fc14b1632212363003bd629f6bcf41c8afbefeb5ca97264f702be07aa9b6d770

See more details on using hashes here.

Provenance

The following attestation bundles were made for ndsafir-2026.1014a0-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.1014a0-cp312-cp312-macosx_11_0_x86_64.whl.

File metadata

File hashes

Hashes for ndsafir-2026.1014a0-cp312-cp312-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 839f1f23aceee0db5d8588de8914d48ff74cc618209fd906d7afe7d1381f16a5
MD5 2df9ddfdb396b48ecb853b6bba6b11bf
BLAKE2b-256 f64c00ed9e037cde8d38ece37a9039d5ecfbafc8fe29dad74c4d2af472f828ce

See more details on using hashes here.

Provenance

The following attestation bundles were made for ndsafir-2026.1014a0-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.1014a0-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for ndsafir-2026.1014a0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 1b900a5a624e12ef03f7caa1146403267099ebc54a62b9c4dfebadb2bb15292f
MD5 84646679a68984988bfe16afce4b88cc
BLAKE2b-256 1fe40359d829dda183b62bedfb2dec97982ac3970467145ebb6aa97cb58d08e7

See more details on using hashes here.

Provenance

The following attestation bundles were made for ndsafir-2026.1014a0-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.1014a0-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for ndsafir-2026.1014a0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 df83ea5c4e61a45e39a529694d9c80c7d2f8f2d5e696ba9f0b8d7f40a22b2bf4
MD5 9306b6fe32c7b84535ca4689d251d526
BLAKE2b-256 3a141ff277b4144233c4021049e9b51425298a1f89257bc1345bd8b4abc1f8f1

See more details on using hashes here.

Provenance

The following attestation bundles were made for ndsafir-2026.1014a0-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.1014a0-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for ndsafir-2026.1014a0-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 eb2ebe6468252d60052d2ddda34024963d9851331d78962719eb38ecc932998d
MD5 26a4a901faf5d972d95eb06383bb8f13
BLAKE2b-256 d6cfa38cfa05e4779eb0388fc014d942a004e69ef710e4bbf11bf5160b3de9dd

See more details on using hashes here.

Provenance

The following attestation bundles were made for ndsafir-2026.1014a0-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.1014a0-cp311-cp311-macosx_11_0_x86_64.whl.

File metadata

File hashes

Hashes for ndsafir-2026.1014a0-cp311-cp311-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 46ca7b1249e098bd785a9184a9c1f836c2c53c2c66c015d171e1a1713ad8d797
MD5 b079b48891ff5d8ab500822911e4cff1
BLAKE2b-256 d34fa5d8ea9c1bff4c666d7e850f3fb746f967a75e44651639cd0f437ddca2b1

See more details on using hashes here.

Provenance

The following attestation bundles were made for ndsafir-2026.1014a0-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.1014a0-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for ndsafir-2026.1014a0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 37db52178599ff0d16a885e7bbdce7ccedf14f25381eb7fe70f190b9041e70ef
MD5 e8729f7bb447cf92f62912b053b37f1a
BLAKE2b-256 d3db42e109934ba9489757f991caa7d1bf0ade9a2fce9e452313d54942f982af

See more details on using hashes here.

Provenance

The following attestation bundles were made for ndsafir-2026.1014a0-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.1014a0-cp310-cp310-win_amd64.whl.

File metadata

File hashes

Hashes for ndsafir-2026.1014a0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 e43fd2fdef51c12c188befc30b66ccd63b4e688f320a655d95b43a9073136548
MD5 403ee8a7b4d0328f7c00578d5ab00f1a
BLAKE2b-256 3f2106250bc0a8e4292404f5e866537c7a0e9e6fe6ff505b4f1e38c9ec2c6e92

See more details on using hashes here.

Provenance

The following attestation bundles were made for ndsafir-2026.1014a0-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.1014a0-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for ndsafir-2026.1014a0-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 18ce3d48a3256bca7060f8d7ff77e090a3370a87ed4131240cab3a4712fd6fff
MD5 15244d8a31da06642fca9633723b79a2
BLAKE2b-256 c6c66e127c21c3757064db59d675b2955f68a8478fe0ebfb5bbc04d229e03f7a

See more details on using hashes here.

Provenance

The following attestation bundles were made for ndsafir-2026.1014a0-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.1014a0-cp310-cp310-macosx_11_0_x86_64.whl.

File metadata

File hashes

Hashes for ndsafir-2026.1014a0-cp310-cp310-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 2d3d94fa868b98dfec9a488ac80fd2f1f908c3f27866feb1a3099c77346e5590
MD5 5baf2d42e9d0699b81b134ff191f018d
BLAKE2b-256 6ebcc3b2cc78d0a1eb2a07064c10b666d2d9d87bdd66f77016b3133986c080e9

See more details on using hashes here.

Provenance

The following attestation bundles were made for ndsafir-2026.1014a0-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.1014a0-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for ndsafir-2026.1014a0-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 65f6b535fcf57220ed431d26fd1d1c1a58b18b08387a2a0e663ee27d9f7f63f4
MD5 5d284f2180fbd8cb6f77ca44f6cf2389
BLAKE2b-256 dc7c76f19f512b19a203524d1fd879516aee859bf5bc082b2a5187557f2bb5c4

See more details on using hashes here.

Provenance

The following attestation bundles were made for ndsafir-2026.1014a0-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