Skip to content

Commit 4d7685b

Browse files
Update doc on model training
1 parent 3d22ad3 commit 4d7685b

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

doc/python_library.md

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,18 @@ The library
1212
- provides functionality for quantitative and qualitative evaluation of Segment Anything models in `micro_sam.evaluation`.
1313

1414
This functionality is used to implement the interactive annotation tools and can also be used as a standalone python library.
15-
Check out the documentation under `Submodules` for more details.
15+
Some preliminary examples for how to use the python library can be found [here](https://github.com/computational-cell-analytics/micro-sam/tree/master/examples/use_as_library). Check out the `Submodules` documentation for more details.
1616

1717
## Training your own model
1818

19-
TODO
19+
We reimplement the training logic described in the [Segment Anything publication](https://arxiv.org/abs/2304.02643) to enable finetuning on custom data.
20+
We use this functionality to provide the [finetuned microscopy models](#finetuned-models) and it can also be used to finetune models on your own data.
21+
In fact the best results can be expected when finetuning on your own data, and we found that it does not require much annotated training data to get siginficant improvements in model performance.
22+
So a good strategy is to annotate a few images with one of the provided models using one of the interactive annotation tools and, if the annotation is not working as good as expected yet, finetune on the annotated data.
23+
<!--
24+
TODO: provide link to the paper with results on how much data is needed
25+
-->
26+
27+
The training logic is implemented in `micro_sam.training` and is based on [torch-em](https://github.com/constantinpape/torch-em). Please check out [examples/finetuning](https://github.com/computational-cell-analytics/micro-sam/tree/master/examples/finetuning) to see how you can finetune on your own data with it. The script `finetune_hela.py` contains an example for finetuning on a small custom microscopy dataset and `use_finetuned_model.py` shows how this model can then be used in the interactive annotatin tools.
28+
29+
More advanced examples, including quantitative and qualitative evaluation, of finetuned models can be found in [finetuning](https://github.com/computational-cell-analytics/micro-sam/tree/master/finetuning), which contains the code for training and evaluating our microscopy models.

0 commit comments

Comments
 (0)