https://github.com/JayParanjape/biastuning
biastuning for SAM on medical datasets
https://github.com/JayParanjape/biastuning
Last synced: 5 months ago
JSON representation
biastuning for SAM on medical datasets
- Host: GitHub
- URL: https://github.com/JayParanjape/biastuning
- Owner: JayParanjape
- Created: 2023-05-27T00:15:51.000Z (almost 2 years ago)
- Default Branch: master
- Last Pushed: 2024-03-07T20:18:48.000Z (about 1 year ago)
- Last Synced: 2024-03-07T21:28:50.368Z (about 1 year ago)
- Language: Jupyter Notebook
- Homepage:
- Size: 5.38 MB
- Stars: 32
- Watchers: 1
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- Awesome-Segment-Anything - [code
README
# AdaptiveSAM
This repository contains the code for **AdaptiveSAM: Towards Efficient Tuning of SAM for Surgical Scene Segmentation**## Environment File
Create a new conda environment with the config file given in the repository as follows:
```
conda env create --file=biastuning_env.yaml
conda activate biastuning_env
```## 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
- train.py - code for general training, common to all datasets
- train_baselines.py - driver code for generating results on baselines described in the paper.
- driver_scratchpad.py - driver code for training models.
- eval/*/generate_predictions.py - code for generating results for a given folder
- model_biastuning.yml - config file for defining various model hyperparameters for AdaptiveSAM
- model_baselines.yml - config file for different baseline models
- config_.yml - config file for defining various dataset related hyperparameters## Link to model checkpoints
[GDrive](https://drive.google.com/drive/folders/15XcLcB4AS376MPyMLNob77VWAuev0U6S?usp=drive_link)## Example Usage for Training
```
python driver_scratchpad.py --model_config model_biastuning.yml --data_config config_cholec8k.yml --save_path "./temp.pth"
```
## Example Usage for Evaluation
```
cd eval/endovispython generate_predictions.py --model_config config_model_test.yml --data_config config_endovis_test.yml --data_folder --gt_path --save_path "./temp_results" --pretrained_path
```## Citation
```
@misc{paranjape2023adaptivesam,
title={AdaptiveSAM: Towards Efficient Tuning of SAM for Surgical Scene Segmentation},
author={Jay N. Paranjape and Nithin Gopalakrishnan Nair and Shameema Sikder and S. Swaroop Vedula and Vishal M. Patel},
year={2023},
eprint={2308.03726},
archivePrefix={arXiv},
primaryClass={cs.CV}
}
```