Automating cellular image analysis
The VLabApp is created with the aim of automating the cellular image analysis process.
The application is divided into several modules that can be used consecutively and/or independently:
- Registration - to register and align images.
- Z-Projection - to make a projection of the z stack. Max, min, std, average and median projections possible.
- Segmentation - to segment the images and generate the corresponding masks.
- Cell tracking - to track segmented cells over time and create the cell tracking graph.
- Graph filtering - to filter and clean the graph and the corresponding mask.
- Events selection - to extract fusion or division events from the graph and the corresponding mask.
- Pipeline - to create a pipeline by combining individual modules.
- Viewers - to easily view the generated images, masks, graphs, registration matrix in Napari.
- File organization - to export or clean generated output.
- File conversion - to export masks and graphs to various file formats and to convert image and masks to small file-size preview movies or images.
- Image cropping - to crop images and masks.
- Ground truth generator - to quickly and easily generate the ground truth masks useful for a possible retraining of the network to be used in the Segmentation module.
-
Install Conda
If Conda is not already installed, download and install Miniconda or Anaconda from https://www.anaconda.com/download/.
-
Download VLabApp
Go to the latest release page and download the Source code archive (
.zipor.tar.gz). Extract the archive, then open a terminal or anaconda powershell prompt (Windows) and navigate to the extracted folder. -
Create a new conda environment
If an older
venv_VLabAppenvironment exists, remove it withconda env remove --name venv_VLabApp.Run the following command to create a new environment
conda create --name venv_VLabApp python=3.11.11 -
Activate the environment
After the environment is created, activate it
conda activate venv_VLabApp -
Install dependencies
Use
pipto install dependencies listed in therequirements.txtfilepip install -r requirements.txtWindows: CUDA support
To enable GPU acceleration on Windows with an NVIDIA GPU, a CUDA-enabled build of PyTorch must be installed. Use one of the following commands instead, selecting the CUDA version suited to your system:
-
For CUDA 12.9:
pip install -r requirements.txt --extra-index-url https://download.pytorch.org/whl/cu129 -
For CUDA 12.8:
pip install -r requirements.txt --extra-index-url https://download.pytorch.org/whl/cu128 -
For CUDA 12.6:
pip install -r requirements.txt --extra-index-url https://download.pytorch.org/whl/cu126
More information is available in the official PyTorch documentation https://pytorch.org/get-started/locally/
-
-
Start the application
In the
venv_VLabAppenvironment, start the application withpython master.py
Open doc/site/index.html from the downloaded VLabApp folder with a web browser to access documentation.
If you use VLabApp in your research, please cite the VLabApp paper:
J. Dorier, A. Ravera and A. Vjestica. In preparation
If you use the registration module with stackreg, please cite the following publication:
P. Thevenaz, U. E. Ruttimann and M. Unser (1998). A pyramid approach to subpixel registration based on intensity. IEEE Transactions on Image Processing, 7(1), 27–41.
If you use the segmentation module with Cellpose, please cite the Cellpose 1.0 publication:
C. Stringer, T. Wang, M. Michaelos and M. Pachitariu (2021). Cellpose: a generalist algorithm for cellular segmentation. Nature Methods 18, 100–106.
If you fine-tune a Cellpose model, please cite the Cellpose 2.0 publication:
M. Pachitariu and C. Stringer (2022). Cellpose 2.0: how to train your own model. Nature Methods 19, 1634–1641.
If you use the segmentation module with the cyto3 Cellpose model, please cite the Cellpose 3.0 publication:
C. Stringer and M. Pachitariu (2025). Cellpose3: one-click image restoration for improved cellular segmentation. Nature Methods 22, 592-599.
-
G. Csardi and T. Nepusz (2006). The igraph software package for complex network research. InterJournal, Complex Systems, 1695.
-
napari contributors (2019). napari: a multi-dimensional image viewer for python. doi:10.5281/zenodo.3555620
-
C.R. Harris, K.J. Millman, S.J. van der Walt et al. (2020). Array programming with NumPy. Nature 585, 357–362.
-
G. Bradski (2000). The OpenCV Library. Dr. Dobb's Journal of Software Tools.
-
S. van der Walt, J. L. Schönberger, J. Nunez-Iglesias et al. (2014). scikit-image: Image processing in Python. PeerJ 2, e453.
-
P. Virtanen, R. Gommers, T.E. Oliphant et al. (2020). SciPy 1.0: Fundamental Algorithms for Scientific Computing in Python. Nature Methods, 17, 261–272.
Julien Dorier - Bioinformatics Competence Center, University of Lausanne.
Arianna Ravera - Scientific Computing and Research Support Unit, University of Lausanne.
Aleksandar Vjestica - Center for Integrative Genomics, University of Lausanne.
Project Link: VLabApp