Skip to content

Commit 79b0fcb

Browse files
authored
Merge pull request #1210 from MouseLand/docs_update
add to faq, some formatting
2 parents c68d52e + bb198b4 commit 79b0fcb

File tree

4 files changed

+50
-2
lines changed

4 files changed

+50
-2
lines changed

docs/faq.rst

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,3 +66,49 @@ FAQ
6666
using `torch.set_num_threads <https://pytorch.org/docs/stable/generated/torch.set_num_threads.html>`_ or through the environment
6767
variables ``OMP_NUM_THREADS`` or ``MKL_NUM_THREADS`` as described
6868
`here <https://pytorch.org/docs/stable/threading_environment_variables.html>`_.
69+
70+
71+
**Q: How does HITL work?**
72+
73+
In cellpose HITL training always starts from a pretrained model but incorporates more training
74+
data with each iteration. To start, only a single image is used as training data.
75+
After an iteration another image is included in the training data. Since there is more
76+
training data, the model should be more accurate on subsequent images.
77+
78+
The goal of HITL training is to produce a model that is finetuned on your data and also generalist
79+
enough to segment new images not in the training set. One of the problems with annotating
80+
images is that it can be time-consuming to annotate your images to produce a finetuned model.
81+
Cellpose also circumvents this tedium by using the already generalist-trained model to predict
82+
your image segmentation. This prediction will be better than nothing, and it will get some
83+
segmentation masks correct. That is helpful becuase you can accept the correct masks, and add
84+
or edit the incorrect ones. Now you have a new image that can be used for training a new finetuned
85+
model. This new finetuned model can then also predict segmentation for an image in your dataset,
86+
and, since it's finetuned on your data, will do somewhat better than the 'base' cellpose model.
87+
You can repeat these steps, (predict using the latest model, annotate the predictions, train,
88+
and predict again) until you have a model that performs well enough on your data.
89+
90+
91+
**Q: What is a 'model'?**
92+
93+
A model is the neural network architecture and parameters (fitted numbers) in that architecture.
94+
The CPSAM model we distribute is a 'model', and you can have another 'model' made from finetuning
95+
on your data. These models are similar becuase they have the same architecture, but distinct
96+
because they have different weights.
97+
98+
99+
**Q: How can I do HITL without the GUI? (I don't have GPU hardware on my machine, but I want to use
100+
colab/a cluster)**
101+
102+
You can do the following steps:
103+
104+
1. Load the images onto the remote machine.
105+
106+
2. Use a script to segment the image using the pretrained model.
107+
108+
3. Download the segmented image masks and annotate it with the cellpose GUI.
109+
110+
4. Load the annotated masks onto the remote machine and train a model with all the images in the folder (only 1 at first)
111+
112+
5. Evaluate the trained model on the next image.
113+
114+
6. Repeat 3-5 until you have a working fine-tuned model.

docs/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ can install it as ``pip install cellpose[gui]``.
1111

1212
- run Cellpose-SAM in the cloud (no install) at `Hugging Face <https://huggingface.co/spaces/mouseland/cellpose>`_.
1313
- `paper <https://www.biorxiv.org/content/10.1101/2025.04.28.651001v1>`_ on biorxiv
14-
- talk
14+
- `talk <https://www.youtube.com/watch?v=KIdYXgQemcI>`_
1515

1616

1717

docs/installation.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ Common issues
6262
If you receive an issue with Qt "xcb", you may need to install xcb libraries, e.g.:
6363

6464
::
65+
6566
sudo apt install libxcb-cursor0
6667
sudo apt install libxcb-xinerama0
6768

@@ -90,6 +91,7 @@ If you are having other issues with the graphical interface and QT, see some adv
9091
If you have errors related to OpenMP and libiomp5, then try
9192

9293
::
94+
9395
conda install nomkl
9496

9597
If you receive an error associated with **matplotlib**, try upgrading

docs/settings.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ See the :ref:`cpmclass` for all run options.
88

99
.. warning::
1010
Cellpose 3 used ``models.Cellpose`` class which has been removed in Cellpose 4. Users should
11-
now only use the ``models.CellposeModel``` class.
11+
now only use the ``models.CellposeModel`` class.
1212

1313
Here is an example of calling the ``CellposeModel`` class and
1414
running a list of images for reference:

0 commit comments

Comments
 (0)