Skip to main content

Segmentation of microscopy images and data analysis pipeline with a graphical user interface, powered by Cellpose.

Project description

🦠 CellSePi – Cell Segmentation Pipeline 🦠

PyPI version License PyPI Downloads Last Commit GitHub Repo stars GitHub forks GitHub issues

Segmentation of microscopy images and data analysis pipeline with a graphical user interface, powered by Cellpose.

🌟 Highlights

  • User-Friendly Interface: Intuitive GUI for seamless image segmentation.
  • Advanced Segmentation: Leverages Cellpose models for accurate cellular segmentation.
  • Correction Tools: Easily refine and correct segmentation results with an integrated drawing tool.
  • Fluorescence Readout: Automatically extract fluorescence data.
  • Correction Tools: Easily refine and correct segmentation results.
  • Fluorescence Readout: Automatically extract fluorescence data.
  • Custom Model Training: Train and fine-tune models with your own data.
  • Batch Processing: Process multiple images simultaneously.
  • Multi-Format Support: Compatible with .lif and .tif/.tiff image formats.
  • Configurable Profiles: Save and manage processing parameters effortlessly.
  • Adjustable Image Settings: Manually or automatically fine-tune contrast and brightness.

ℹ️ Overview

This project was developed in the context of a Bachelor project commissioned by the Self-Organizing Systems Lab of the Technical University Darmstadt and supervised by Erik Kubaczka and Anja J. Engel. CellSePi is a powerful segmentation pipeline designed for microscopy images, featuring an interactive GUI to streamline your workflow. By utilizing the advanced Cellpose segmentation engine, CellSePi empowers researchers to efficiently process and analyze cellular images.

🚀 Usage

1. Start the Application
Run the following command to launch the GUI:

python -m cellsepi

Interface Overview
Main Window Start Screen Main Window Start Screen

Main Window with Images Main Window with Images

Options

  • The dark/light theme adapts to your system settings. The changed theme is only active for the current session.
  • Mask and outline colors can be customized and are saved between sessions.
  • Mask opacity can be changed for the current session.

Note: Changes to the Mask Opacity will only appear in the drawing window after reloading the currently opened image by pressing on the Drawing Tools button.

Options

Profiles
Save and manage the following parameters:

  • Bright-Field Channel:
    The channel on which segmentation is performed and whose masks are currently displayed.

  • Channel Prefix:
    The prefix in the image name that separates the series name and the channel. For example, if the channel prefix is set to c, the images series100c1 and series100c2 are recognized as part of series100 with channels 1 and 2.

  • Mask Suffix:
    Specifies the suffix that is used to identify and create the masks of the corresponding images. For instance, series100c1_seg is recognized as the mask for the image series100c1.

  • Diameter:
    Represents the average cell diameter used by the segmentation model.

Note: Changes to the Mask Suffix or Channel Prefix will only take effect when new files are loaded.

Profiles

Segmentation
To start segmentation process select both:

  • a .lif or .tif/.tiff file
  • a compatible model

You will be alerted if you selected an incompatible model, when trying to start the segmentation.

During segmentation, you can:

  • Pause: Temporarily halt the process and resume later.
  • Cancel: Abort the process, reverting to the previous masks or removing them if none existed before.

Note: Large images can take longer to pause or to cancel, because the segmentation of the current image needs to be finished.

Segmentation

Readout
Generates an .xlsx file containing the extracted fluorescence values. Click the "Open fluorescence file" button to launch your system’s default spreadsheet application with the generated file (e.g. ONLYOFFICE as seen below).

Readout

Drawing Tools
Correct segmentation errors manually or draw masks to train new models.

  • Cell ID Shifting: Automatically adjusts cell IDs to maintain a consecutive numbering when a cell is deleted.
  • Drawing: Draw own cells. Finishes the outline and fills the cell with color automatically
  • Deletion: Delete an unwanted cell
  • Undo/Redo changes: If the deletion or drawing is not to your liking, you are able to reverse the made changes

All changes in the Drawing Tools window are synchronized in real time with the main window.

Drawing Tools

Brightness and Contrast
Enhance the visibility of your image by using the brightness and contrast sliders. The "Auto brightness and contrast" button automatically adjusts and normalizes the image.

Brightness Contrast

Average Diameter
The average diameter of all cells over all images is displayed and updated with every change in the masks. The cell diameter is approximated by assuming circular cells and calculating the diameter from the area.

Average Diameter

Training
Train your own models using the Cellpose framework. Two training modes are available:

  1. New Model Training: Train a model from scratch using standard Cellpose models (nuclei, cyto, cyto2 or cyto3).
  2. Model Fine-Tuning: Retrain an existing model with your own images and masks for improved performance.

Training

⬇️ Installation

To install CellSePi, simply run:

  • Using Pip

    pip install cellsepi
    

    This command automatically installs all required dependencies as specified in the package configuration.

Build your app:

  • Using Linux:

    flet build linux -v
    
  • Using Mac:

    flet build macos -v
    
  • Using Windows:

    flet build windows -v
    

📚 Citations

Our segmentation and models are powered by CellPose and our spot detection is powered by Big-FISH.

  • Stringer, C., Wang, T., Michaelos, M., & Pachitariu, M. (2021). Cellpose:
    a generalist algorithm for cellular segmentation. Nature Methods, 18(1), 100-106.
  • Pachitariu, M. & Stringer, C. (2022). Cellpose 2.0:
    how to train your own model. Nature Methods, 1-8.
  • Stringer, C. & Pachitariu, M. (2025). Cellpose3:
    one-click image restoration for improved segmentation. Nature Methods.
  • Eva Maxfield Brown, Dan Toloudis, Jamie Sherman, Madison Swain-Bowden, Talley Lambert, Sean Meharry, Brian Whitney, AICSImageIO Contributors (2023). BioIO:
    Image Reading, Metadata Conversion, and Image Writing for Microscopy Images in Pure Python [Computer software]. GitHub
  • dilli_hangrae(2024): Scanline Filling Algorithm. Website
  • Arthur Imbert, Wei Ouyang, Adham Safieddine, Emeline Coleno, Christophe Zimmer, Edouard Bertrand, Thomas Walter, Florian Mueller. FISH-quant v2: a scalable and modular analysis tool for smFISH image analysis. bioRxiv (2021) Paper

✍️ Authors

Developed by:

📝 License

This project is licensed under the Apache License 2.0 – see the LICENSE file for details.

📖 How to cite

If you use our repository in you own work, please cite us as follows:

Jenna Ahlvers,Santosh Chhetri Thapa, Nike Dratt, Pascal Heß, Florian Hock(2025). CellSePi: Cell Segmentation Pipeline[computer software]. GitHub. https://github.com/PraiseTheDarkFlo/CellSePi

or as bibtext:

@misc{cellsepi,
  author    = {Ahlvers, Jenna and Chhetri Thapa, Santosh and Dratt, Nike and Heß, Pascal and Hock, Florian},   
  title     = {CellSePi: Cell Segmentation Pipeline},  
  year      = {2025},  
  publisher = {GitHub},  
  url       = {https://github.com/PraiseTheDarkFlo/CellSePi}  
}

💭 Feedback & Contributions

Report bugs or suggest features via GitHub Issues.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cellsepi-1.1.6.tar.gz (104.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cellsepi-1.1.6-py3-none-any.whl (120.7 kB view details)

Uploaded Python 3

File details

Details for the file cellsepi-1.1.6.tar.gz.

File metadata

  • Download URL: cellsepi-1.1.6.tar.gz
  • Upload date:
  • Size: 104.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.3

File hashes

Hashes for cellsepi-1.1.6.tar.gz
Algorithm Hash digest
SHA256 e41831c7b5bf6e50c723660233913e930387d070dc7d3a64e09bf03857f5c75a
MD5 b7a0d875b7e409904f360112501d188e
BLAKE2b-256 6da80803bcaef7c2246f9e5705a9ed469021f9d53377271b9cd3903c1b9bb88e

See more details on using hashes here.

File details

Details for the file cellsepi-1.1.6-py3-none-any.whl.

File metadata

  • Download URL: cellsepi-1.1.6-py3-none-any.whl
  • Upload date:
  • Size: 120.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.3

File hashes

Hashes for cellsepi-1.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 15903ce9251c6b8c0148e68f336e44f6b3adf3e2182bafa9aaef663ce016bc31
MD5 30e70dcfc8e7c5f42c7d8493d9c69494
BLAKE2b-256 239eda8960b7f78fc17459c8db434f2e9a704716881a56b3a6992dedc7d16e1a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page