Sangjun Noh, Jongwon Kim, Dongwoo Nam, Seunghyeok Back, Raeyong kang, Kyoobin Lee
This repository contains source codes for the paper "GraspSAM: When Segment Anything Model meets Grasp Detection." (ICRA 2025) [ArXiv] [Project Website]
Tested on Titan RTX with python 3.8x, pytorch 2.0.1, torchvision 0.15.2, CUDA 11.7
- Download source codes
git clone https://github.com/gist-ailab/GraspSAM.git
cd GraspSAM
- Set up a python environment
conda create -n GraspSAM python=3.8
conda activate GraspSAM
pip install -r requirements.txt
- Download
Jacquarddataset at [Jacquard] - Download
Grasp-Anythingdataset at [Grasp-Anything] - Extract the downloaded datasets and organize the folders as follows
GraspSAM
└── datasets
├── Jacqurd_Dataset
│ └──Jacquard_Dataset_0
│ └──...
│ └──Jacquard_Dataset_11
└── Grasp-Anything
└──grasp_label_positive
└──grasp_label_negative
└──image
└──mask
└──scene_description
- Download
Efficient SAMcheckpoint at Efficient SAM - Download
Mobile SAMcheckpoint at Mobile SAM - Make the pretrained_checkpoint folder and move the downloaded checkpoints to the folder
GraspSAM
└── pretrained_checkpoint
├── mobile_sam.pt
├── efficient_sam
└──efficient_sma_vitt.pt
└──...
python train.py --root {JACQUARD_ROOT} --save --sam-encoder-type {BACKBONE_TYPE}
python train.py --root {GRASP_ANYTHING_ROOT} --save --sam-encoder-type {BACKBONE_TYPE}
python eval.py --root {JACQUARD_ROOT} --ckp_path {CKP_PATH}
python eval.py --root {GRASP_ANYTHING_ROOT} --ckp_path {CKP_PATH}
The source code of this repository is released only for academic use. See the license file for details.
The codes of this repository are built upon the following open sources. Thanks to the authors for sharing the code!
- SAM families : Efficient SAM and Mobile SAM
- Adapter for using SAM encoder Rein
- Learnable tokens are modified from sam-hq
- Grasp detection benchmarks : [Jacquard] and [Grasp-Anything]
If you use our work in a research project, please cite our work:
title={GraspSAM: When Segment Anything Model Meets Grasp Detection},
author={Noh, Sangjun and Kim, Jongwon and Nam, Dongwoo and Back, Seunghyeok and Kang, Raeyoung and Lee, Kyoobin},
journal={arXiv preprint arXiv:2409.12521},
year={2024}
}