Skip to content


Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time


License PyPI Python Version tests codecov Downloads Wheel Development Status Code style: black Imports: isort pre-commit Contributions Website Twitter

Efficient cell detection in large images (e.g. whole mouse brain images)

cellfinder-napari is a front-end to cellfinder-core to allow ease of use within the napari multidimensional image viewer. For more details on this approach, please see Tyson, Rousseau & Niedworok et al. (2021). This algorithm can also be used within the original cellfinder software for whole-brain microscopy analysis.

cellfinder-napari, cellfinder and cellfinder-core were developed by Charly Rousseau and Adam Tyson in the Margrie Lab, based on previous work by Christian Niedworok, generously supported by the Sainsbury Wellcome Centre.


Visualising detected cells in the cellfinder napari plugin



Once you have installed napari. You can install napari either through the napari plugin installation tool, or directly from PyPI with:

pip install cellfinder-napari


Full documentation can be found here.

This software is at a very early stage, and was written with our data in mind. Over time we hope to support other data types/formats. If you have any questions or issues, please get in touch on the forum or by raising an issue.



cellfinder takes a stitched, but otherwise raw dataset with at least two channels:

  • Background channel (i.e. autofluorescence)
  • Signal channel, the one with the cells to be detected:

raw Raw coronal serial two-photon mouse brain image showing labelled cells

Cell candidate detection

Classical image analysis (e.g. filters, thresholding) is used to find cell-like objects (with false positives):

raw Candidate cells (including many artefacts)

Cell candidate classification

A deep-learning network (ResNet) is used to classify cell candidates as true cells or artefacts:

raw Cassified cell candidates. Yellow - cells, Blue - artefacts


Contributions to cellfinder-napari are more than welcome. Please see the contributing guide.

Citing cellfinder

If you find this plugin useful, and use it in your research, please cite the paper outlining the cell detection algorithm:

Tyson, A. L., Rousseau, C. V., Niedworok, C. J., Keshavarzi, S., Tsitoura, C., Cossell, L., Strom, M. and Margrie, T. W. (2021) “A deep learning algorithm for 3D cell detection in whole mouse brain image datasets’ PLOS Computational Biology, 17(5), e1009074

If you use this, or any other tools in the brainglobe suite, please let us know, and we'd be happy to promote your paper/talk etc.

The BrainGlobe project is generously supported by the Sainsbury Wellcome Centre and the Institute of Neuroscience, Technical University of Munich, with funding from Wellcome, the Gatsby Charitable Foundation and the Munich Cluster for Systems Neurology - Synergy.