-
Download
Please install Docker to use the GUI following these instructions.
Find instructions on how to use the GUI in this video.You can also install previous versions of BiaPy's graphical user interface.
-
For each workflow we have both 2D and 3D versions:
Image classification
(2D)Image denoising
(2D)Image to image
(2D)Instance segmentation
(2D)Object detection
(2D)Self-supervision
(2D)Semantic segmentation
(2D)Super-resolution
(2D)Image classification
(3D)Image denoising
(3D)Image to image
(3D)Instance segmentation
(3D)Object detection
(3D)Self supervision
(3D)Semantic segmentation
(3D)Super-resolution
(3D)For just predicting/inference you can use the following notebook:
Inference
(2D/3D) -
BiaPy is available as a tool in the Galaxy platform, enabling users to run biomedical image analysis workflows through an intuitive, web-based interface without requiring any local installation. The tool can be accessed directly from the Galaxy ToolShed at this link, and it can also be found by searching for “biapy” in the Galaxy ToolShed interface here.
-
We have a container prepared to run BiaPy:
latest-11.8
Pytorch 2.12.1 CUDA 11.8 Ubuntu 22.04 Docker Engine is available for Windows, macOS, and Linux, through Docker Desktop. For instructions on how to install Docker Desktop, see:
-
If you want to use BiaPy as a library in your own Python scripts, you can install it via pip:
pip install biapyor via conda/mamba:
conda install -c conda-forge biapypip install biapyandconda install -c conda-forge biapyalready pull in a compatible CPU build of PyTorch as part of dependency resolution. If you have an NVIDIA GPU, replace it with a matching CUDA build afterwards: check thetorch/torchvisionversions pinned in BiaPy’s pyproject.toml (as of BiaPy 3.6.8:torch==2.12.1/torchvision==0.27.1) and reinstall that exact pair through the official PyTorch selector for your CUDA version, for example:pip install torch==2.12.1 torchvision==0.27.1 --index-url https://download.pytorch.org/whl/cu126Important: Do not install PyTorch without pinning a version (e.g. plainpip install torch torchvision). It installs the newest release, which is often outside the range BiaPy expects and can break the install or raise aResolutionImpossibleerror.After that you can import BiaPy in your Python scripts:
import biapyYou can find more information in the following sections:
- Library examples that show how to use BiaPy as a library in your own Python scripts.
- API documentation for more information on how to use BiaPy as a library in your own Python scripts.
-
You have three different options to install BiaPy. Choose one or another depending on your preferences:
-
To use BiaPy via the command line, you will need to set up a
condaenvironment. To do this, you will first need to install Conda. Then choose one of the following options based on your machine capabilities:A. GPU-capable machine (NVIDIA GPU)
conda config --set channel_priority strict conda create -n BiaPy_env -c conda-forge python=3.11 biapy pytorch-gpu conda activate BiaPy_envVerify GPU at runtime:
python -c 'import torch; print(torch.__version__)' >>> 2.12.1 python -c 'import torch; print(torch.cuda.is_available())' >>> TrueB. CPU-only machine
conda config --set channel_priority strict conda create -n BiaPy_env -c conda-forge python=3.11 biapy conda activate BiaPy_env -
Before you begin, ensure you have Mamba installed. Mamba is a faster alternative to Conda and can be used to manage your
condaenvironments.Once you have mamba installed you will to choose one of the following options based on your machine capabilities:A. GPU-capable machine (NVIDIA GPU)
mamba create -n BiaPy_env -c conda-forge python=3.11 biapy pytorch-gpu mamba activate BiaPy_envVerify GPU at runtime:
python -c 'import torch; print(torch.__version__)' >>> 2.12.1 python -c 'import torch; print(torch.cuda.is_available())' >>> TrueB. CPU-only machine
mamba create -n BiaPy_env -c conda-forge python=3.11 biapy mamba activate BiaPy_env -
Set up a conda/mamba environment:
mamba create -n BiaPy_env -c conda-forge python=3.11 mamba activate BiaPy_envClone BiaPy repository:
git clone https://github.com/BiaPyX/BiaPy.git cd BiaPyImportant: Do not run a barepip install torch torchvisionbeforepip install -e .. That installs whatever is newest, which will often fall outside the exacttorch/torchvisionrange pinned in pyproject.toml and makes pip fail with aResolutionImpossibleerror — or, on machines with an older NVIDIA driver, silently install a PyTorch build compiled for a newer CUDA version than your driver supports, which will maketorch.cuda.is_available()returnFalseat runtime. Install a matching pinned pair first instead, then letpip install -e .reuse it.Check
pyproject.tomlfor the exact supportedtorch/torchvisionversions (as of BiaPy 3.6.8:torch>=2.12,<2.13/torchvision>=0.27,<0.28, i.e. the2.12.1/0.27.1pair). Install that exact pair, choosing GPU or CPU. Use the official PyTorch selector to find the right--index-urlfor your CUDA version (the selector always proposes the latest torch release, so replace the version-less command it gives you with the pinned versions below). Checknvidia-smifirst: the “CUDA Version” it reports is the newest CUDA build your driver can run, so pick an index whose CUDA version does not exceed it, for example:# GPU (CUDA 12.6, for example) pip install torch==2.12.1 torchvision==0.27.1 --index-url https://download.pytorch.org/whl/cu126 # CPU only pip install torch==2.12.1 torchvision==0.27.1 --index-url https://download.pytorch.org/whl/cpuInstall BiaPy in editable mode:
pip install -e .
-