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 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.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 preprint.
- 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.