diff --git a/.napari-hub/DESCRIPTION.md b/.napari-hub/DESCRIPTION.md index 551c131..8531ce6 100644 --- a/.napari-hub/DESCRIPTION.md +++ b/.napari-hub/DESCRIPTION.md @@ -1,41 +1,47 @@ -# napari-nuclephaser +# NuclePhaser: Cell Proliferation Measurement & Cell Tracking Assistant Plugin for Timelapse Images -A Napari plugin to detect and count nuclei on phase contrast images +[![License MIT](https://img.shields.io/pypi/l/napari-nuclephaser.svg?color=green)](https://github.com/nikvo1/napari-nuclephaser/raw/main/LICENSE) +[![PyPI](https://img.shields.io/pypi/v/napari-nuclephaser.svg?color=green)](https://pypi.org/project/napari-nuclephaser) +[![Python Version](https://img.shields.io/pypi/pyversions/napari-nuclephaser.svg?color=green)](https://python.org) +[![tests](https://github.com/nikvo1/napari-nuclephaser/workflows/tests/badge.svg)](https://github.com/nikvo1/napari-nuclephaser/actions) +[![napari hub](https://img.shields.io/endpoint?url=https://api.napari-hub.org/shields/napari-nuclephaser)](https://napari-hub.org/plugins/napari-nuclephaser) +[![npe2](https://img.shields.io/badge/plugin-npe2-blue?link=https://napari.org/stable/plugins/index.html)](https://napari.org/stable/plugins/index.html) +[![Copier](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/copier-org/copier/master/img/badge/badge-grayscale-inverted-border-purple.json)](https://github.com/copier-org/copier) -napari-nuclephaser utilizes [Ultralytics](https://docs.ultralytics.com/) YOLO object detection models and [obss/sahi](https://github.com/obss/sahi) sliced inference methods to detect cell nuclei on phase contrast (and other brightfield) images of any size, including large whole slide ones. Learn more with [documentation](https://napari-nuclephaser.readthedocs.io/en/latest/index.html). +A Napari plugin for automated cell nuclei detection, proliferation and population growth analysis, and single-cell tracking in brightfield and fluorescent nuclei timelapse microscopy images. -For more information, see our [GitHub page](https://github.com/nikvo1/napari-nuclephaser), [documentation](https://napari-nuclephaser.readthedocs.io/en/latest/index.html) and [paper](https://www.biorxiv.org/content/10.1101/2025.05.13.653705v1) +napari-nuclephaser is an open-source Napari plugin designed for scientists who need to measure cell proliferation rates, analyze population growth, and perform individual cell tracking on timelapse microscopy images. It utilizes [Ultralytics](https://docs.ultralytics.com/) YOLO object detection models and [obss/sahi](https://github.com/obss/sahi) sliced inference methods to detect cell nuclei on brightfield and fluorescent images of any size, including large whole slide ones. Learn more with [documentation](https://napari-nuclephaser.readthedocs.io/en/latest/index.html) and [paper](https://www.biorxiv.org/content/10.1101/2025.05.13.653705v1). -# Nuclei detection +## Nuclei detection -We trained a series of [YOLOv5](https://github.com/ultralytics/yolov5) and [YOLOv11](https://github.com/ultralytics/ultralytics) models to detect nuclei on phase contrast images. It can be used for counting cells or for individual cell tracking (using nuclei detections as tracking marks). Prominent features of this approach are: +We trained a series of [YOLOv5](https://github.com/ultralytics/yolov5) and [YOLOv11](https://github.com/ultralytics/ultralytics) models to detect nuclei on phase contrast images. It can be used for counting cells or for individual cell tracking (using nuclei detections as tracking markers). Prominent features of this approach are: - Napari-nuclephaser plugin includes [obss/sahi](https://github.com/obss/sahi) functionality, allowing detection on images of arbitrary sizes.

- - - Image didn't load - -

+ + + Image didn't load + + - YOLO models are fast, providing reasonable inference speed even with CPU. - Ability to predict and automatically count nuclei on stacks of images, making it convenient for cell population growth studies and individual cell tracking. -

- - - Image didn't load - -

+ + + Image didn't load + + +- Calibration algorithm that allows measuring accuracy for each specific use case. -# Calibration algorithm +## Calibration algorithm Result of object detection model inference is highly dependent on _confidence threshold_ parameter.

- - Image didn't load + + Image didn't load

@@ -47,16 +53,38 @@ We created several calibration (finding optimal confidence threshold) algorithms Apart from optimal confidence threshold search, these algorithms return accuracy metrics for specific use cases. Given that the calibration image is large, only part of it is used for search of threshold, while the second part is used for evaluation model's accuracy. Accuracy metrics are [Mean Absolute Percentage Error (MAPE)](https://en.wikipedia.org/wiki/Mean_absolute_percentage_error) and prediction-ground truth scatterplot, which shows how well model performs with different densities of cells. -Learn more about calibration in [documentation](https://napari-nuclephaser.readthedocs.io/en/latest/General%20information/Confidence%20threshold%20calibration.html). +Learn more about calibration in [documentation](https://napari-nuclephaser.readthedocs.io/en/latest/Biological%20tasks%20guidelines/Individual%20cells%20tracking.html). + +

+ + + Image didn't load + +

+ +## Cell Proliferation Measurement & Population Growth Analysis + +With NuclePhaser you can reconstruct population growth curves from timelapse images of growing cell population by counting number of nuclei on each image. Key features of this approach are: + +- No special equipment, reagents or dyes required, only regular culture plastic and cell growth medium, microscope with mechanical stage and a PC (even without GPU). +- [Accuracy measurement for each specific use case](https://napari-nuclephaser.readthedocs.io/en/latest/General%20information/Confidence%20threshold%20calibration.html), so you will be sure the tool is working with appropriate precision. +- Measuring the number of cells, not the area occupied by cells, which can be significantly influenced by spreading/narrowing of cells. +- Complete reproducibility of results with metadata.txt files saved for each experiment.

- - Image didn't load + + Image didn't load

-# Models +For more detailed information about how NuclePhaser can be used for cell proliferation measurement & population growth analysis, visit our [documentation](https://napari-nuclephaser.readthedocs.io/en/latest/Biological%20tasks%20guidelines/Population%20growth%20curves.html#). + +## Individual cell tracking + +NuclePhaser can be used as an assistant for individual cells tracking. This task is extremely difficult, and manual tracking is still the only method with 100% proof against false tracks. With NuclePhaser, you can significantly simplify manual tracking: instead of marking each cell on each image, you can predict nuclei location with NuclePhaser and then correct the result, which is **much** faster. Learn more in [documentation](https://napari-nuclephaser.readthedocs.io/en/latest/Biological%20tasks%20guidelines/Individual%20cells%20tracking.html). + +## Models Currently only YOLOv5n, YOLOv5s, YOLOv11n and YOLOv11s models, as well as fluorescent nuclei detector YOLOv5n are downloaded automatically with pip install napari-nuclephaser. To use larger models, download them with these links: @@ -93,7 +121,7 @@ Brighfield nuclei detectors > [!NOTE] -> Feel free to use the models published there without the plugin! +> Feel free to use the models published here without the plugin! # Plugin functionality napari-nuclephaser plugin offers following widgets: @@ -107,8 +135,8 @@ napari-nuclephaser plugin offers following widgets: Learn more about widgets and their functionality at [documentation](https://napari-nuclephaser.readthedocs.io/en/latest/index.html). -# Citation - +## Citation +If you use NuclePhaser in your work, please cite our preprint: ```bibtex @article {Voloshin2025.05.13.653705, author = {Voloshin, Nikita and Putlyaev, Egor and Chechekhina, Elizaveta and Usachev, Vladimir and Karagyaur, Maxim and Bozov, Kirill and Grigorieva, Olga and Tyurin-Kuzmin, Pyotr and Kulebyakin, Konstantin}, @@ -121,97 +149,9 @@ Learn more about widgets and their functionality at [documentation](https://napa } ``` +## Installation ----------------------------------- - -This [napari] plugin was generated with [copier] using the [napari-plugin-template]. - - - -# Installation - -### Option 1: Using Anaconda (recommended) - -We recommend installation using [Anaconda Distribution](https://www.anaconda.com/) - -1. Install Anaconda with [Installation instructions](https://www.anaconda.com/docs/getting-started/anaconda/install) - -2. Open Anaconda Prompt using Search Bar or Anaconda Navigator - -3. Create new environment with default anaconda packages using command - -```sh -conda create --name napari-env anaconda -``` -4. Activate new environment using command - -```sh -conda activate napari-env -``` -5. Install [Napari](https://napari.org/stable/) using command - -```sh -pip install napari[all] -``` -6. Verify napari installation using following command. It should open napari GUI. - -```sh -napari -``` -7. Install napari-nuclephaser plugin using command - -```sh -pip install napari-nuclephaser -``` -8. Plugin is ready to be used! Start napari by typing - -```sh -napari -``` -Initialize plugin's widgets by opening Plugins window and choosing NuclePhaser. - -### Installation with GPU - -If you have [NVIDIA GPU with CUDA](https://developer.nvidia.com/cuda-gpus), you can significantly increase plugin's speed. - -To install GPU-powered version of the plugin, you first need to do all the steps for the installation using Anaconda (above). Then you need to: - -1. Install CUDA using [official instructions](https://developer.nvidia.com/cuda-downloads) -> [!NOTE] -> Check which versions of CUDA are supported by current [torch installation](https://pytorch.org/get-started/locally/) and consider [installing earlier ones](https://developer.nvidia.com/cuda-toolkit-archive) - -2. Check CUDA installation with nvidia-smi command in the command line. - -```sh -nvidia-smi -``` -3. In the environment with napari and napari-nuclephaser installed, install CUDA-supported torch by typing specific command for your system, which can be found at [torch installation page](https://pytorch.org/get-started/locally/). For example, if you have Windows-based system and CUDA 12.6, your line should look like - -```sh -pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu126 -``` - -> [!WARNING] -> During our tests, torchvision wasn't installed using this line. To avoid that, add -U after install: -> ```sh ->pip3 install -U torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu126 ->``` - ----------------------------------- - -### Option 2: Using standalone napari app (simpler) - -1. Download and install napari as standalone app using [installation instructions](https://napari.org/dev/tutorials/fundamentals/installation_bundle_conda.html) - -2. Search, download and install napari-nuclephaser plugin by opening the app, navigating to Plugins window and choosing Install/Uninstall plugins... - ----------------------------------- +For detailed installation instructions, visit our [documentation](https://napari-nuclephaser.readthedocs.io/en/latest/Installation/Installation.html). ## Contributing @@ -227,8 +167,6 @@ Distributed under the terms of the [MIT] license, If you encounter any problems, please [file an issue] along with a detailed description. -(This is a Napari-specific description) - [napari]: https://github.com/napari/napari [copier]: https://copier.readthedocs.io/en/stable/ [@napari]: https://github.com/napari @@ -246,3 +184,7 @@ If you encounter any problems, please [file an issue] along with a detailed desc [tox]: https://tox.readthedocs.io/en/latest/ [pip]: https://pypi.org/project/pip/ [PyPI]: https://pypi.org/ + +This [napari] plugin was generated with [copier] using the [napari-plugin-template]. + +This is a Napari-specific description. diff --git a/README.md b/README.md index ccc4f3c..8f23f03 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ A Napari plugin for automated cell nuclei detection, proliferation and populatio napari-nuclephaser is an open-source Napari plugin designed for scientists who need to measure cell proliferation rates, analyze population growth, and perform individual cell tracking on timelapse microscopy images. It utilizes [Ultralytics](https://docs.ultralytics.com/) YOLO object detection models and [obss/sahi](https://github.com/obss/sahi) sliced inference methods to detect cell nuclei on brightfield and fluorescent images of any size, including large whole slide ones. Learn more with [documentation](https://napari-nuclephaser.readthedocs.io/en/latest/index.html) and [paper](https://www.biorxiv.org/content/10.1101/2025.05.13.653705v1). -# Nuclei detection +## Nuclei detection We trained a series of [YOLOv5](https://github.com/ultralytics/yolov5) and [YOLOv11](https://github.com/ultralytics/ultralytics) models to detect nuclei on phase contrast images. It can be used for counting cells or for individual cell tracking (using nuclei detections as tracking markers). Prominent features of this approach are: - Napari-nuclephaser plugin includes [obss/sahi](https://github.com/obss/sahi) functionality, allowing detection on images of arbitrary sizes. @@ -34,7 +34,7 @@ We trained a series of [YOLOv5](https://github.com/ultralytics/yolov5) and [YOLO - Calibration algorithm that allows measuring accuracy for each specific use case. -# Calibration algorithm +## Calibration algorithm Result of object detection model inference is highly dependent on _confidence threshold_ parameter. @@ -62,7 +62,7 @@ Learn more about calibration in [documentation](https://napari-nuclephaser.readt

-# Cell Proliferation Measurement & Population Growth Analysis +## Cell Proliferation Measurement & Population Growth Analysis With NuclePhaser you can reconstruct population growth curves from timelapse images of growing cell population by counting number of nuclei on each image. Key features of this approach are: @@ -80,11 +80,11 @@ With NuclePhaser you can reconstruct population growth curves from timelapse ima For more detailed information about how NuclePhaser can be used for cell proliferation measurement & population growth analysis, visit our [documentation](https://napari-nuclephaser.readthedocs.io/en/latest/Biological%20tasks%20guidelines/Population%20growth%20curves.html#). -# Individual cell tracking +## Individual cell tracking NuclePhaser can be used as an assistant for individual cells tracking. This task is extremely difficult, and manual tracking is still the only method with 100% proof against false tracks. With NuclePhaser, you can significantly simplify manual tracking: instead of marking each cell on each image, you can predict nuclei location with NuclePhaser and then correct the result, which is **much** faster. Learn more in [documentation](https://napari-nuclephaser.readthedocs.io/en/latest/Biological%20tasks%20guidelines/Individual%20cells%20tracking.html). -# Models +## Models Currently only YOLOv5n, YOLOv5s, YOLOv11n and YOLOv11s models, as well as fluorescent nuclei detector YOLOv5n are downloaded automatically with pip install napari-nuclephaser. To use larger models, download them with these links: @@ -135,7 +135,7 @@ napari-nuclephaser plugin offers following widgets: Learn more about widgets and their functionality at [documentation](https://napari-nuclephaser.readthedocs.io/en/latest/index.html). -# Citation +## Citation If you use NuclePhaser in your work, please cite our preprint: ```bibtex @article {Voloshin2025.05.13.653705, @@ -149,7 +149,7 @@ If you use NuclePhaser in your work, please cite our preprint: } ``` -# Installation +## Installation For detailed installation instructions, visit our [documentation](https://napari-nuclephaser.readthedocs.io/en/latest/Installation/Installation.html).