{"library":"pytorch-wavelets","title":"PyTorch Wavelets (DTCWT)","description":"A port of the Dual-Tree Complex Wavelet Transform (DTCWT) toolbox to run on PyTorch, enabling wavelet-based image processing, denoising, and feature extraction with GPU support. Current version 1.3.0 (released 2021), with no recent releases since June 2021.","language":"python","status":"maintenance","last_verified":"Fri May 01","install":{"commands":["pip install pytorch-wavelets"],"cli":null},"imports":["from pytorch_wavelets import DWTForward","from pytorch_wavelets import DWTInverse","from pytorch_wavelets import DTCWTForward"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import torch\nfrom pytorch_wavelets import DWTForward, DWTInverse\n\n# Create a random image batch (B, C, H, W)\nx = torch.randn(2, 3, 64, 64)\n\n# Forward DWT with wavelet 'db1' (Haar) and 3 levels\nxfm = DWTForward(J=3, wave='db1', mode='zero')\nyl, yh = xfm(x)  # yl: lowpass, yh: list of highpass components\n\n# Inverse DWT\nifm = DWTInverse(wave='db1', mode='zero')\nrecon = ifm((yl, yh))\n\n# Check reconstruction error\nprint(torch.abs(x - recon).max().item())","lang":"python","description":"Basic DWT forward and inverse on a random image batch","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}