Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/JayParanjape/LoRASAM
Code for Low-Rank Adaptation of SAM for Surgical Scene Segmentation
https://github.com/JayParanjape/LoRASAM
Last synced: 30 days ago
JSON representation
Code for Low-Rank Adaptation of SAM for Surgical Scene Segmentation
- Host: GitHub
- URL: https://github.com/JayParanjape/LoRASAM
- Owner: JayParanjape
- Created: 2023-12-22T12:48:48.000Z (about 1 year ago)
- Default Branch: master
- Last Pushed: 2023-12-22T12:50:18.000Z (about 1 year ago)
- Last Synced: 2023-12-22T14:55:49.446Z (about 1 year ago)
- Language: Python
- Size: 1.4 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- Awesome-Segment-Anything - [code
README
# LoRASAM
This repository contains the code for **Low-Rank Adaptation of Segment Anything Model for Surgical Scene Segmentation**## Environment File
Create a new conda environment with the config file given in the repository as follows:
```
conda env create -f lorasam.yml
conda activate lorasam
```## General file descriptions
- data_transforms/*.py - data transforms defined here for different datasets.
- data_utils.py - functions to generate dataloaders for different datasets
- model.py - model architectures defined here
- prompt_adapted_segment_anything/modeling/lora_layers.py - code for the Low Rank modifications used in the model
- train.py - code for general training, common to all datasets
- driver_scratchpad.py - driver code for training models.
- eval/*/generate_predictions.py - code for generating results for a given dataset
- eval/*/generate_predictions.sh - script to run generate_predictions for generating results for all labels of interest.
- model_loratuning.yml - config file for defining various model hyperparameters for LoRASAM
- config_.yml - config file for defining various dataset related hyperparameters
## Example Usage for Training
```
python driver_scratchpad.py --model_config model_loratuning.yml --data_config config_endovis.yml --save_path "./temp.pth"
```
Please refer to driver_scratchpad.py for other command line options and parameters.## Example Usage for Evaluation
```
cd eval/endovisbash generate_all_predictions.sh
```## Citation
```
To be added
```Please feel free to reach out to me or raise an issue in case of trouble while running the code.