From 2c784f040b194e71f209a2a3971fd853dfd38f3d Mon Sep 17 00:00:00 2001 From: Carsen Stringer Date: Fri, 23 Feb 2024 18:07:47 -0500 Subject: [PATCH] updating docs and readme --- README.md | 8 ++++++-- docs/restore.rst | 5 +++++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index b3d65870..467f7768 100644 --- a/README.md +++ b/README.md @@ -24,9 +24,13 @@ Please see install instructions [below](README.md/#Installation), and also check ### :star2: v3 (Feb 2024) :star2: -Cellpose3 enables image restoration in the GUI and the API (CLI support and example notebooks coming soon!) To learn more... -* Check out the paper [thread](https://neuromatch.social/@computingnature/111932247922392030). +Cellpose3 enables image restoration in the GUI, API and CLI (saved to `_seg.npy`). To learn more... * Check out the [paper](https://www.biorxiv.org/content/10.1101/2024.02.10.579780v1). +* Check out the paper [thread](https://neuromatch.social/@computingnature/111932247922392030). +* API documentation [here](https://cellpose.readthedocs.io/en/latest/restore.html) +* Example google colab notebook for image restoration: [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/MouseLand/cellpose/blob/main/notebooks/run_cellpose3.ipynb). +* Example google colab notebook with new super-generalist "cyto3" model: [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/MouseLand/cellpose/blob/main/notebooks/run_cyto3.ipynb). + Try out the new `cyto3` super-generalist Cellpose model with `model_type="cyto3"`. There are some Cellpose API changes from v2.0 which will be documented soon. diff --git a/docs/restore.rst b/docs/restore.rst index 739bfb3f..c3864c44 100644 --- a/docs/restore.rst +++ b/docs/restore.rst @@ -17,6 +17,7 @@ DenoiseModel Initialize a DenoiseModel with the model_type: :: + from cellpose import denoise dn = denoise.DenoiseModel(model_type="denoise_cyto3", gpu=True) @@ -26,12 +27,14 @@ using the Cellpose channel format (e.g. ``channels=[1,2]``), or leave the size of the objects in your image. :: + imgs_dn = dn.eval(imgs, channels=None, diameter=50.) If you have two channels, and the second is a nuclear channel, you can specify to use the nuclei restoration models on the second channel, with ``chan2=True``: :: + from cellpose import denoise dn = denoise.DenoiseModel(model_type="denoise_cyto3", gpu=True, chan2=True) imgs_dn = dn.eval(imgs, channels=[1,2], diameter=50.) @@ -42,6 +45,7 @@ images, for example, in which the objects are of diameter 10, specify that in th function call, and then the model will upsample the image to 30 or 17: :: + from cellpose import denoise dn = denoise.DenoiseModel(model_type="upsample_cyto3", gpu=True, chan2=True) imgs_up = dn.eval(imgs, channels=[1,2], diameter=10.) @@ -55,6 +59,7 @@ The ``CellposeDenoiseModel`` wraps the CellposeModel and DenoiseModel into one c ensure the channels and diameters are handled properly. See example: :: + from cellpose import denoise model = denoise.CellposeDenoiseModel(gpu=True, model_type="cyto3", restore_type="denoise_cyto3", chan2_restore=True)