The napari hub is transitioning to a community-run implementation due to launch in June 2025.
Since October 1, 2024, this version is no longer actively maintained and will not be updated. New plugins and plugin updates will continue to be listed.

napari-pitcount-cfim

napari-pitcount-cfim

A pipeline for stuff #TODO: Get knowledge to write a proper description Pitcount

License

BSD 3-Clause

About

This napari plugin was developed in partnership with CFIM (Centre for Microscopy and Image Analysis, Copenhagen University).

The plugin enables image analysis for microscopy, focused on identifying pits and segmenting cells, then generating detailed statistics. It is tailored for using .czi files and integrates well with the napari-czi-reader.

For training the VGG19 2_2 × Random Forest Classifier used in this plugin, visit the pitcount-ml-training repository.

Features

  • Detects pits in images using a trained torchvision model.
  • Performs cell segmentation via Cellpose (default model: cyto3).
  • Calculates and outputs statistics such as:
    • Total cell count
    • Total pit count
    • Percentage of cells containing pits
    • Average number of pits per cell

Usage

Graphical Mode (GUI)

You can launch the plugin in napari with:

napari-pitcount-cfim --dev

or open napari and activate the plugin manually.

Headless Mode (NO GUI)

napari-pitcount-cfim --no-gui 

Run --help to list all options:

napari-pitcount-cfim --no-gui -h

Command-Line Arguments

ArgumentAliasTypeDescription
--no-guiflagRuns the pipeline without GUI. Required for headless automation.
--devflagLaunches napari in developer mode for plugin debugging.
--verbosity-vint (0–2)Sets the level of console output. Default: 0.
--input-folder-istrInput directory for image data (required with --no-gui).
--output-folder-ostrDirectory to save results. Default: 'output'.
--pit-mask-folder-ppathIf specified, skips pit prediction and uses this directory for pit masks.
--save-raw-dataflagSaves raw, unprocessed data to the output folder (only in --no-gui mode).
--family-groupingstrGrouping method for output: default, file, folder, or all. Default: default.

Notes

  • --input-folder must be used with --no-gui.

  • --pit-mask-folder must be a valid existing directory.

  • Set environment variables are used internally to control behavior.

Requirements

Napari recommends installing napari seperately, as it is not included in this package. You can install it with:

pip install napari[all]

Or you can just

pip install napari-pitcount-cfim[napari]

Known Issues

  • The plugin might not support the formats of most model output.
  • It's not possible to link masks directly to images in the GUI.
  • The default pit model, is a stub and mostly for decoration.

Version:

  • 1.0.0

Last updated:

  • 04 June 2025

First released:

  • 24 April 2025

License:

Supported data:

  • Information not submitted

Plugin type:

GitHub activity:

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

Python versions supported:

Operating system:

Requirements:

  • QtPy
  • pydantic
  • xmltodict
  • napari-czi-reader
  • aicsimageio
  • aicspylibczi
  • czifile
  • matplotlib
  • adjustText
  • cellpose<4.0.0
  • tensorflow
  • joblib
  • torch
  • torchvision