|
1 | 1 | # Finetuned models |
2 | 2 |
|
3 | | -In addition to the original Segment anything models, we provide models that finetuned on microscopy data using the functionality from `micro_sam.training`. |
4 | | -The models are hosted on zenodo. We currently offer the following models: |
| 3 | +In addition to the original Segment Anything models, we provide models that are finetuned on microscopy data. |
| 4 | +The additional models are available in the [bioimage.io modelzoo](https://bioimage.io/#/) and are also hosted on zenodo. |
| 5 | + |
| 6 | +We currently offer the following models: |
5 | 7 | - `vit_h`: Default Segment Anything model with vit-h backbone. |
6 | 8 | - `vit_l`: Default Segment Anything model with vit-l backbone. |
7 | 9 | - `vit_b`: Default Segment Anything model with vit-b backbone. |
8 | 10 | - `vit_t`: Segment Anything model with vit-tiny backbone. From the [Mobile SAM publication](https://arxiv.org/abs/2306.14289). |
9 | | -- `vit_b_lm`: Finetuned Segment Anything model for cells and nuclei in light microscopy data with vit-b backbone. |
10 | | -- `vit_b_em_organelles`: Finetuned Segment Anything model for mitochodria and nuclei in electron microscopy data with vit-b backbone. |
11 | | -- `vit_b_em_boundaries`: Finetuned Segment Anything model for neurites and cells in electron microscopy data with vit-b backbone. |
| 11 | +- `vit_l_lm`: Finetuned Segment Anything model for cells and nuclei in light microscopy data with vit-l backbone. ([zenodo](TODO), [bioimage.io](TODO)) |
| 12 | +- `vit_b_lm`: Finetuned Segment Anything model for cells and nuclei in light microscopy data with vit-b backbone. ([zenodo](TODO), [bioimage.io](TODO)) |
| 13 | +- `vit_t_lm`: Finetuned Segment Anything model for cells and nuclei in light microscopy data with vit-t backbone. ([zenodo](TODO), [bioimage.io](TODO)) |
| 14 | +- `vit_l_em_organelles`: Finetuned Segment Anything model for mitochodria and nuclei in electron microscopy data with vit-l backbone. ([zenodo](TODO), [bioimage.io](TODO)) |
| 15 | +- `vit_b_em_organelles`: Finetuned Segment Anything model for mitochodria and nuclei in electron microscopy data with vit-b backbone. ([zenodo](TODO), [bioimage.io](TODO)) |
| 16 | +- `vit_t_em_organelles`: Finetuned Segment Anything model for mitochodria and nuclei in electron microscopy data with vit-t backbone. ([zenodo](TODO), [bioimage.io](TODO)) |
12 | 17 |
|
13 | 18 | See the two figures below of the improvements through the finetuned model for LM and EM data. |
14 | 19 |
|
15 | 20 | <img src="https://raw.githubusercontent.com/computational-cell-analytics/micro-sam/master/doc/images/lm_comparison.png" width="768"> |
16 | 21 |
|
17 | 22 | <img src="https://raw.githubusercontent.com/computational-cell-analytics/micro-sam/master/doc/images/em_comparison.png" width="768"> |
18 | 23 |
|
19 | | -You can select which of the models is used in the annotation tools by selecting the corresponding name from the `Model Type` menu: |
| 24 | +You can select which model to use for annotation by selecting the corresponding name in the embedding menu: |
20 | 25 |
|
21 | 26 | <img src="https://raw.githubusercontent.com/computational-cell-analytics/micro-sam/master/doc/images/model-type-selector.png" width="256"> |
22 | 27 |
|
23 | 28 | To use a specific model in the python library you need to pass the corresponding name as value to the `model_type` parameter exposed by all relevant functions. |
24 | | -See for example the [2d annotator example](https://github.com/computational-cell-analytics/micro-sam/blob/master/examples/annotator_2d.py#L62) where `use_finetuned_model` can be set to `True` to use the `vit_b_lm` model. |
25 | | - |
26 | | -Note that we are still working on improving these models and may update them from time to time. All older models will stay available for download on zenodo, see [model sources](#model-sources) below |
| 29 | +See for example the [2d annotator example](https://github.com/computational-cell-analytics/micro-sam/blob/master/examples/annotator_2d.py#L62). |
27 | 30 |
|
28 | 31 |
|
29 | | -## Which model should I choose? |
| 32 | +## Choosing a Model |
30 | 33 |
|
31 | 34 | As a rule of thumb: |
32 | | -- Use the `vit_b_lm` model for segmenting cells or nuclei in light microscopy. |
33 | | -- Use the `vit_b_em_organelles` models for segmenting mitochondria, nuclei or other organelles in electron microscopy. |
34 | | -- Use the `vit_b_em_boundaries` models for segmenting cells or neurites in electron microscopy. |
| 35 | +- Use the `vit_l_lm` or `vit_b_lm` model for segmenting cells or nuclei in light microscopy. The larger model (`vit_l_lm`) yields a bit better segmentation quality, especially for automatic segmentation, but needs more computational resources. |
| 36 | +- Use the `vit_l_em_organelles` or `vit_b_em_organelles` models for segmenting mitochondria, nuclei or other roundish organelles in electron microscopy. |
35 | 37 | - For other use-cases use one of the default models. |
| 38 | +- The `vit_t_...` models run much faster than other models, but yield inferior quality for many applications. It can still make sense to try them for your use-case if your working on a laptop and want to annotate many images or volumetric data. |
36 | 39 |
|
37 | | -See also the figures above for examples where the finetuned models work better than the vanilla models. |
38 | | -Currently the model `vit_h` is used by default. |
39 | | - |
| 40 | +See also the figures above for examples where the finetuned models work better than the default models. |
40 | 41 | We are working on further improving these models and adding new models for other biomedical imaging domains. |
41 | 42 |
|
42 | 43 |
|
43 | | -## Model Sources |
| 44 | +## Older Models |
44 | 45 |
|
45 | | -Here is an overview of all finetuned models we have released to zenodo so far: |
| 46 | +Previous versions of our models are available on zenodo: |
46 | 47 | - [vit_b_em_boundaries](https://zenodo.org/records/10524894): for segmenting compartments delineated by boundaries such as cells or neurites in EM. |
47 | 48 | - [vit_b_em_organelles](https://zenodo.org/records/10524828): for segmenting mitochondria, nuclei or other organelles in EM. |
48 | 49 | - [vit_b_lm](https://zenodo.org/records/10524791): for segmenting cells and nuclei in LM. |
49 | | -- [vit_h_em](https://zenodo.org/records/8250291): this model is outdated. |
50 | | -- [vit_h_lm](https://zenodo.org/records/8250299): this model is outdated. |
| 50 | +- [vit_h_em](https://zenodo.org/records/8250291): for general EM segmentation. |
| 51 | +- [vit_h_lm](https://zenodo.org/records/8250299): for general LM segmentation. |
51 | 52 |
|
52 | | -Some of these models contain multiple versions. |
| 53 | +We do not recommend to use these models since our new models improve upon them significantly. But we provide the links here in case they are needed to reproduce older segmentation workflows. |
0 commit comments