MedicoSAM implements interactive annotation and (automatic) semantic segmentation for medical images. It is built on top of Segment Anything by Meta AI and specializes it for biomedical imaging data. Its core components are:
- The
medico_sam
publicly available model for interactive data annotation in 2d and 3d data. - The
medico_sam
library provides training frameworks, inspired by Segment Anything for Microscopy, for downstream tasks:- Supports semantic segmentation for 2d and 3d data.
- Apply Segment Anything to 2d and 3d data or fine-tune it on your data.
- The
medico_sam
models that are fine-tuned on publicly available medical images. Based on these components,medico_sam
enables fast interactive and automatic annotation for medical images:
How to install medico-sam
python library from source?
We recommend to first setup an environment with the necessary requirements:
- environment.yaml: to set up an environment on Linux or Mac OS.
- environment_cpu_win.yaml: to set up an environment on windows with CPU support.
- environment_gpu_win.yaml: to set up an environment on windows with GPU support.
To create one of these environments and install medico_sam
into it follow these steps
- Clone the repository:
git clone https://github.com/computational-cell-analytics/micro-sam
- Enter it:
cd micro-sam
- Create the respective environment:
conda env create -f <ENV_FILE>.yaml
- Activate the environment:
conda activate sam
- Install
medico_sam
:pip install -e .
You can find the model checkpoints at: https://owncloud.gwdg.de/index.php/s/AB69HGhj8wuozXQ
Download it via terminal using: wget https://owncloud.gwdg.de/index.php/s/AB69HGhj8wuozXQ/download -O vit_b_medicosam.pt
.
See TOOL_USAGE.md
document for details.
If you are using this repository in your research please cite:
- our preprint.
- and the original Segment Anything publication.