Skip to content

Commit

Permalink
Add section in FAQ for passing custom model weights (#707)
Browse files Browse the repository at this point in the history
* Update faq.md

---------

Co-authored-by: Constantin Pape <[email protected]>
  • Loading branch information
anwai98 and constantinpape authored Sep 29, 2024
1 parent eafff2f commit ece0325
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions doc/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,12 @@ This can happen for long running computations. You just need to wait a bit longe
`micro_sam` performs automatic segmentation in 3D volumes by first segmenting slices individually in 2D and merging the segmentations across 3D based on overlap of objects between slices. The expected shape of your 3D RGB volume should be `(Z * Y * X * 3)` (reason: Segment Anything is devised to consider 3-channel inputs, so while the user provides micro-sam with 1-channel inputs, we handle this by triplicating this to fit the requirement, or with 3-channel inputs, we use them in the expected RGB array structures as it is).


### 15. I want to use a model stored in a different directory than the `micro_sam` cache. How can I do this?
The `micro-sam` CLIs for precomputation of image embeddings and annotators (Annotator 2d, Annotator 3d, Annotator Tracking, Image Series Annotator) accept the argument `-c` / `--checkpoint` to pass model checkpoints. If you start a `micro-sam` annotator from the `napari` plugin menu, you can provide the path to model checkpoints in the annotator widget (on right) under `Embedding Settings` drop-down in the `custom weights path` option.

NOTE: It is important to choose the correct model type when you opt for the above recommendation, using the `-m / --model_type` argument or selecting it from the `Model` dropdown in `Embedding Settings` respectively. Otherwise you will face parameter mismatch issues.


## Fine-tuning questions


Expand Down

0 comments on commit ece0325

Please sign in to comment.