TorchMorph: CUDA-Accelerated Morphological Transforms for PyTorch

kornia_foss · x · 2026-08-26

Kai Zhao released TorchMorph, a new morphological transforms library based on PyTorch. Optimized for GPU training loops, it operates directly on CUDA tensors via fused CUDA kernels. Compared to the CPU-based SciPy, batched execution achieves up to 1,100x throughput on greyscale morphology and up to 350x on exact Euclidean distance transforms. The API is designed to mirror SciPy argument-for-argument, facilitating easy migration of existing pipelines.

Related event: TorchMorph: CUDA-Accelerated Morphology Library for PyTorch(2 posts)→

Original post →

More from Infra

Infra channel →