A classification plugin for the ROIs of a segmentation mask.

    View project data

    License PyPI Python Version tests codecov napari hub Documentation

    The aim of this plugin is to classify the output of a segmentation algorithm. The inputs are :

    • A folder of raw images
    • Their segmentation masks where each ROI has its own label.

    Svetlana can process 2D, 3D and multichannel image. If you want to use it to work on cell images, we strongly recommend the use of Cellpose for the segmentation part, as it provides excellent quality results and a standard output format accepted by Svetlana (labels masks).

    If you use this plugin please cite the paper:

    	author = "Clément Cazorla and Pierre Weiss and Renaud Morin",
    	booktitle = "28° Colloque sur le traitement du signal et des images",
    	year = "2022",
    	publisher = "GRETSI - Groupe de Recherche en Traitement du Signal et des Images",
    	number = "001-0194",
    	pages = "p. 777-780",
    	month = "Sep # 6--9",
    	address = "Nancy",
    	doi = "",
    	pdf = "2022_cazorla801.pdf",

    This napari plugin was generated with Cookiecutter using @napari's cookiecutter-napari-plugin template.


    First install Napari in a Python 3.9 Conda environment following the instructions provided in the official documentation.

    You can install napari_svetlana via pip, or directly from the Napari plugin manager (see Napari documentation):

    pip install napari_svetlana


    If you have a Cuda compatible GPU on your computer, some computations may be accelerated using Cupy. Unfortunately, Cupy needs Cudatoolkit to be installed. This library can only be installed via Conda while the plugin is a pip plugin, so it must be installed manually for the moment:

    conda install cudatoolkit=10.2 

    Also note that the library (Cucim) that we use to improve these performances, computing morphological operations on GPU is unfortunately only available for Linux systems. Hence, if you are a Windows user, this installation is not necessary.


    To learn more about the features of Svetlana and how to use it, please check our Youtube tutorial and our documentation. A folder in this repository called "Demo images", contains two demo images, similar to the ones of the Youtube tutorial. Feel free to use them to test all the features of Sevtlana.

    The data augmentation

    It is possible to perform all the complex data augmentations proposed in the Albumentations library. To do so, please refer to the documentation, and add all the needed parameters to the JSON configuration file.


    Gaussian blurring in documentation :

    GaussianBlur(blur_limit=(3, 7), sigma_limit=0, always_apply=False, p=0.5)

    Equivalent in JSON configuration file:

    "GaussianBlur": {
          "apply": "False",
          "blur_limit": "(3, 7)",
          "sigma_limit": "0", 
          "p": "0.5"

    where apply means you want this data augmentation to be applied or not.


    Contributions are very welcome.


    Distributed under the terms of the BSD-3 license, "napari_svetlana" is free and open source software


    The method was developed by Clément Cazorla, Renaud Morin and Pierre Weiss. And the plugin was written by Clément Cazorla. The project is co-funded by Imactiv-3D and CNRS.


    If you encounter any problems, please file an issue along with a detailed description.


    • 0.1.4

    Release date:

    • 23 November 2022

    First released:

    • 22 November 2022


    • GPL-3.0-only

    Supported data:

    • Information not submitted

    Open extension:

    Save extension:

    • Information not submitted

    Save layers:

    GitHub activity:

    • Stars: 0
    • Forks: 0
    • Issues + PRs: 0

    Python versions supported:

    Operating system:


    • napari-plugin-engine (>=0.1.4)
    • numpy
    • albumentations (==1.0.3)
    • joblib (==1.1.0)
    • light-the-torch
    • matplotlib
    • opencv-python (==
    • PyQt5
    • cupy-cuda102 (==10.6.0)
    • xlsxwriter
    • pandas
    • cucim (==22.6.0) ; platform_system == "Linux"

    Sign up to receive updates