Skip to content

computational-cell-analytics/peft-sam

Repository files navigation

Parameter Efficient Fine-Tuning of Segment Anything Models

peft-sam implements several PEFT (Parameter Efficient Fine-Tuning) methods for Segment Anything Model (SAM) in the biomedical imaging domain.

Installation

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:

  1. Clone the repository: git clone https://github.com/computational-cell-analytics/peft-sam
  2. Enter it: cd peft-sam
  3. Create the respective environment: conda env create -f <ENV_FILE>.yaml
  4. Activate the environment: conda activate peft-sam
  5. Install peft_sam: pip install -e .

Citation

If you are using this repository in your research please cite: