Skip to content

Commit cf7ac09

Browse files
authored
Merge pull request #1202 from MouseLand/docs_update
fix #1180 example not working from docs and update docs for autodoc to work
2 parents 9d59b2e + 6721e7b commit cf7ac09

File tree

3 files changed

+13
-3
lines changed

3 files changed

+13
-3
lines changed

docs/conf.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@
4646
autodoc_mock_imports = [
4747
"importlib",
4848
"torch",
49+
"torchvision",
4950
"numpy",
5051
"tqdm",
5152
"scipy",
@@ -57,6 +58,8 @@
5758
"fastremap",
5859
"natsort",
5960
"numba",
61+
"segment_anything",
62+
"fill_voids"
6063
]
6164

6265
autoapi_dirs = ['../cellpose']

docs/index.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ can install it as ``pip install cellpose[gui]``.
1414
- talk
1515

1616

17+
18+
**See details on migrating from Cellpose 3 to 4 in** :ref:`Settings`
19+
1720
Old releases:
1821
-----------------------------
1922

docs/settings.rst

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,19 @@ Settings
66
The important settings are described on this page.
77
See the :ref:`cpmclass` for all run options.
88

9-
Here is an example of calling the Cellpose class and
9+
.. warning::
10+
Cellpose 3 used ``models.Cellpose`` class which has been removed in Cellpose 4. Users should
11+
now only use the ``models.CellposeModel``` class.
12+
13+
Here is an example of calling the ``CellposeModel`` class and
1014
running a list of images for reference:
1115

1216
::
1317

1418
from cellpose import models
1519
from cellpose.io import imread
1620

17-
model = models.Cellpose(gpu=True)
21+
model = models.CellposeModel(gpu=True)
1822

1923
files = ['img0.tif', 'img1.tif']
2024
imgs = [imread(f) for f in files]
@@ -36,7 +40,7 @@ you will want to omit it from the input, or combine it with the cytoplasm channe
3640
from cellpose import models
3741
from cellpose.io import imread
3842

39-
model = models.Cellpose(gpu=True)
43+
model = models.CellposeModel(gpu=True)
4044

4145
img = imread("img.tif") # tiff is n x 100 x 100
4246

0 commit comments

Comments
 (0)