peft-sam implements several PEFT (Parameter Efficient Fine-Tuning) methods for Segment Anything Model (SAM) in the biomedical imaging domain.
How to install peft_sam python library from source?
We recommend to first setup an environment with the necessary requirements:
environment.yaml: to set up an environment on any platform.environment_qlora.yaml: to set up an environment on any platform, with GPU support only.
To create one of these environments and install peft_sam into it follow these steps:
- Clone the repository:
git clone https://github.com/computational-cell-analytics/peft-sam - Enter it:
cd peft-sam - Create the respective environment:
conda env create -f <ENV_FILE>.yaml - Activate the environment:
conda activate peft-sam - Install
peft_sam:pip install -e .
If you are using this repository in your research please cite:
- our paper (now published in MIDL 2025).
- the Segment Anything for Microscopy publication.
- and the original Segment Anything publication.
- If you use the medical imaging generalist models, please also cite MedicoSAM publication.