Skip to content

Commit

Permalink
Merge pull request #876 from MouseLand/cli_restore
Browse files Browse the repository at this point in the history
updating docs and readme
  • Loading branch information
carsen-stringer committed Feb 23, 2024
2 parents 83f00ce + 2c784f0 commit 943ca95
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
8 changes: 6 additions & 2 deletions README.md
Expand Up @@ -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.

Expand Down
5 changes: 5 additions & 0 deletions docs/restore.rst
Expand Up @@ -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)

Expand All @@ -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.)
Expand All @@ -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.)
Expand All @@ -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)
Expand Down

0 comments on commit 943ca95

Please sign in to comment.