You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Expand FAQ with segmentation and fine-tuning advice (#1226)
* Expand FAQ with segmentation and fine-tuning advice
Added detailed guidance for automatic instance segmentation and fine-tuning questions in the FAQ.
* Update faq.md
Copy file name to clipboardExpand all lines: doc/faq.md
+17-1Lines changed: 17 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -195,8 +195,24 @@ Here's what you can do to solve this issue:
195
195
- Use a PyTorch/CUDA build that is known to work with V100, for example CUDA 12.1 or 11.8 with a compatible PyTorch version (please check your installed CUDA drivers).
196
196
- Run on CPU (slower, but works).
197
197
198
-
## Fine-tuning questions
198
+
### 20. The automatic instance segmentation does a very poor job for my microscopy images.
199
+
200
+
This can have multiple reasons that you can address by choosing the best settings for your image:
201
+
- First, choose the most suitable model for your image type and segmentation task:
202
+
-`vit_b_lm` for any cell or nucleus segmentation task in light microscopy or related tasks such as segmentation of organoids or similar structures.
203
+
-`vit_b_em_organelles` for segmenting mitochondria or nuclei in electron microscopy. Note: this model does not yet support other organelles.
204
+
-`vit_b_histopathology` for segmenting nuclei in H&E stained images or other typical image data from histopathology.
205
+
- If you have multi-channel images then you have to pass those in a format and channel order compatible with `micro_sam`:
206
+
- If your image has 2 or 3 channels you can use it as is. The channels must be given in the last axis.
207
+
- If you have images with a fluorescent marker staining the cytosol or membrane and another marker staining the nucleus, then pass the cytosol/membrane maker as first channel and the nucleus marker as second channel.
208
+
- If you have more than 3 channels then you have to reduce the number of channels to 3, either by selecting the most relevant channels (see previous item) or by averaging or otherwise combining channels in a suitable fashion.
209
+
- If you have large images (>~ 700 x 700 pixels) you should activate tiling by passing the `tile_shape` and `halo` parameters (if you use CLI or python) or by setting `tile_x` / `tile_y`, `halo_x` / `halo_y` in the `Advanced Settings` of the `Embedding Widget` (if you use the napari tool).
210
+
- The recommended values for tile shape and halo are `(384, 384)` and `(64, 64)`, respectively.
211
+
- If your image contains very small objects that you want to segment then decrease the minimum object size by passing a low value (e.g. 10) for `min_size` to the CLI / python function you are using or by setting it in the `Automatic Segmentation Settings` of the instance segmentation widget.
212
+
213
+
If none of these steps help then the available `micro_sam` models are likely not well suited for your data. Note that you can still use `micro_sam` for your segmentation problem, but you will have to fine-tune your own model (see the next section).
199
214
215
+
## Fine-tuning questions
200
216
201
217
### 1. I have a microscopy dataset I would like to fine-tune Segment Anything for. Is it possible using `micro_sam`?
202
218
Yes, you can fine-tune Segment Anything on your own dataset. Here's how you can do it:
0 commit comments