The official implementation of "CAT-SAM: Conditional Tuning Network for Few-Shot Adaptation of Segmentation Anything Model".
[arXiv] [Project Page]
Authors: Aoran Xiao*, Weihao Xuan*, Heli Qi, Yun Xing, Ruijie Ren, Xiaoqin Zhang, Ling Shao, Shijian Lu
Please git our project to your local machine and prepare our environment by the following commands:
$: cd cat-sam
$: conda env create -f environment.yaml
$: conda activate cat-sam
(cat-sam) $: python -m pip install -e .
Please refer to the README.md in the dataset-specific folders under ./data
to prepare each of them.
For testing, please run:
$: cd cat-sam
$: pwd
/your_dir/cat-sam
$: conda activate cat-sam
(cat-sam) $: python test.py --dataset <your-target-dataset> --cat_type <your-target-type> --ckpt_path <your-target-ckpt>
For reproducing the results of CAT-SAM models in our paper, please download our checkpoints below to any place in your machine.
You can refer to the one you are interested in by --ckpt_path
.
Note: if you set --dataset whu
, please prepare 1 x NVIDIA RTX A5000 (24GB) or the device with more or similar memory.
To download the checkpoints, please visit the following Google Drive link:
- Release of test code
- Release of training code