qlty: handling large tensors in scientific imaging
Petrus Zwart
TL;DR
qlty tackles memory bottlenecks in large volumetric scientific imaging by providing out-of-core tensor management with patch-based subsampling, edge-aware augmentation, and weighted stitching. The method uses sliding windows over tensors with shapes such as $$(N,C,Y,X)$$ to generate $$(M,C,Y_w,X_w)$$, complemented by border-aware cleaning and $zarr$-stored mean/normalization arrays processed via $dask$ to fuse results. A 3D tomographic segmentation example demonstrates practical viability, including data duplication from patching, an eight-model SMSNet ensemble, and coherent full-volume inference. By integrating with PyTorch and parallel I/O backends, qlty makes high-resolution scientific imaging analytics more accessible on hardware with limited memory, enabling robust segmentation and denoising workflows.
Abstract
In scientific imaging, deep learning has become a pivotal tool for image analytics. However, handling large volumetric datasets, which often exceed the memory capacity of standard GPUs, require special attention when subjected to deep learning efforts. This paper introduces qlty, a toolkit designed to address these challenges through tensor management techniques. qlty offers robust methods for subsampling, cleaning, and stitching of large-scale spatial data, enabling effective training and inference even in resource-limited environments.
