Abstract
BiaPy is an open-source library and application that streamlines the use of common deep learning approaches for bioimage analysis. Designed to simplify technical complexities, it offers an intuitive interface, zero-code notebooks, and Docker integration, catering to both users and developers. While focused on deep learning workflows for 2D and 3D image data, it enhances performance with multi-GPU capabilities, memory optimization, and scalability for large datasets. Although BiaPy does not encompass all aspects of bioimage analysis, such as visualization and manual annotation tools, it empowers researchers by providing a ready-to-use environment with customizable templates that facilitate sophisticated bioimage analysis workflows.
Introduction
Deep learning has become the gold standard for analyzing complex microscopy data, yet it remains largely inaccessible to many life scientists due to technical complexity and ecosystem fragmentation. Researchers often find themselves juggling multiple tools for different tasks—segmentation, denoising, or object detection—while struggling with the "programming barrier" of Python-based implementations. Furthermore, the increasing size of biological datasets often leads to memory constraints on standard hardware.
BiaPy addresses these challenges as an all-in-one, open-source framework designed to democratize state-of-the-art deep learning. By providing a unified interface, multi-GPU support, and zero-code accessibility, it enables researchers to handle "big data" microscopy without extensive coding expertise.
Architecture and Workflow
BiaPy is built on Python and PyTorch, functioning as a high-level wrapper that orchestrates complex workflows. Its architecture is divided into three primary stages: pre-processing (data preparation and augmentation), training/inference (supporting architectures like U-Net, ResUNet++, UNETR, and ViT), and post-processing (refining results via watershed or filtering).
A key innovation in BiaPy is its unified configuration system. Every workflow is encapsulated in a single YAML file, ensuring perfect reproducibility. To bypass "dependency hell," BiaPy utilizes Docker containers, providing a consistent environment across Linux, Windows, and MacOS. For non-experts, BiaPy offers a Graphical User Interface (GUI) and Google Colab notebooks, allowing complex models to be run without writing code.
Capabilities and Tasks
BiaPy stands out for its feature completeness and scalability. It is one of the few tools that supports a comprehensive suite of tasks within a single framework, including classification, semantic and instance segmentation, object detection, denoising, super-resolution, and self-supervised learning (SSL).
The framework's versatility has been demonstrated across various high-impact datasets:
- MitoEM: Large-scale 3D EM for mitochondria instance segmentation.
- Drosophila Embryos: Time-lapse sequences for modeling wound healing.
- Epithelial Cysts (CartoCell): 3D datasets for generating accurate cell labels.
BiaPy also introduces a sophisticated multi-GPU inference strategy. By chunking massive images into overlapping patches and distributing them across multiple GPUs, it can process datasets far larger than a system's RAM, reconstructing results into memory-efficient formats like Zarr or H5.
Discussion and Future Work
While BiaPy is a powerful processing engine, it is not a visualization tool. Users still require external software like Fiji or napari for manual annotation and final 3D rendering. Additionally, while memory-optimized, the core deep learning tasks still require modern GPU hardware for efficient performance.
As an open-source project, BiaPy is designed to grow with community contributions. Future developments will focus on expanding the library of pre-trained models and integrating more specialized biological workflows, further lowering the barrier to advanced bioimage analysis.
Summary updated