Skip to main content

destripe

PDHG-based stripe-noise removal for NumPy images, backed by PyTorch. The solver decomposes an image into a TV-regularized clean component and directional ℓ²-penalized stripe components.

Features

  • Removes vertical and diagonal stripe patterns with five directional components.
  • Accepts grayscale (H, W), single-channel (H, W, 1), and RGB (H, W, 3) arrays.
  • Preserves input shape and dtype; integer outputs are clipped to their dtype range.
  • For RGB inputs, estimates stripes on Rec. 601 luminance and subtracts them from each channel.
  • Supports n x n tiled processing with cosine-blended overlap for large images.
  • Uses CUDA when available if device=None; otherwise falls back to CPU.

Install

pip install destripe

Quick Start

from destripe import destripe

image = ...  # numpy.ndarray, shape [H, W] or [H, W, 3]

clean = destripe(
    image,
    mu1=0.33,
    mu2=0.003,
    iterations=500,
    tiles=1,       # >1 for n x n tiled processing
    device="cpu",  # "cpu", "cuda", or None to auto-select
)

Parameters

  • image: numeric NumPy-compatible array with shape (H, W), (H, W, 1), or (H, W, 3).
  • mu1 (default 0.33): TV weight. Higher smooths more and removes stronger stripes; loses fine detail.
  • mu2 (default 0.003): ℓ² stripe penalty. Higher extracts stripes more eagerly; can leak real structure.
  • iterations (default 500): maximum PDHG iterations.
  • tol (default 1e-5): relative-change tolerance for early stopping, checked every 20 iterations.
  • tiles (default 1): number of tiles per side. Use values greater than 1 when the image does not fit in memory or stripes are locally non-stationary.
  • overlap (default 64): requested blend width in pixels. The solver clamps it to at most one quarter of each tile dimension.
  • device (default None): "cpu", "cuda", a torch.device, or None to auto-select CUDA when available.
  • proj (default True): project the normalized clean component onto [0, 1].
  • verbose (default False): print iteration progress.

Suggested mu Pairs

  • Conservative / subtle stripes: [0.1, 0.001], [0.1, 0.0017]
  • Light, thin stripes: [0.17, 0.003], [0.23, 0.003]
  • Typical to strong stripes: [0.33, 0.003], [0.4, 0.007]
  • Severe corruption / short stripes: [0.5, 0.017]

Starting points, not universal optima.

Reference

Metadata

Release files for destripe 0.1.3

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

Source distribution (sdist)

Source distribution for destripe 0.1.3
File Size Uploaded Provenance Actions
destripe-0.1.3.tar.gz 856.3 kB Without provenance Details for destripe-0.1.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for destripe 0.1.3
File Interpreter ABI Platform Actions
destripe-0.1.3-py3-none-any.whl Python 3 none any Details for destripe-0.1.3-py3-none-any.whl

Total release size: 866.0 kB

Release files / destripe-0.1.3.tar.gz

Download URL destripe-0.1.3.tar.gz
Size 856.3 kB
Tags Source
SHA-256 checksum
How to use checksums
1db430869b72ca714b7de2a24dff21a0af1830f767951beae6f30ebba4272e04
BLAKE2b-256 checksum
How to use checksums
472c3d1851a9983b43b01909e3f894bfedd0a527b94d95a98658996261ec63f1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.12

Release files / destripe-0.1.3-py3-none-any.whl

Download URL destripe-0.1.3-py3-none-any.whl
Size 9.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4533794d5ea2a78d8088aea59fbc31a81ace3bd2550bffcddc1157fad17baf24
BLAKE2b-256 checksum
How to use checksums
59a00ef46e3410fd031c14d1c984cf5dde92b28baff4fc23d60f515106f64a75
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.12

Security for destripe 0.1.3

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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.

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