YPan0's picture
Upload folder using huggingface_hub
b6deff2 verified

A newer version of the Gradio SDK is available: 6.13.0

Upgrade

Introduction

The pre-trained SAM model was used as a baseline in this study. SAM has three model types: ViT-H, ViT-L, and ViT-B. We used ViT-B model since it has a good trade off between segmentation accuracy and performance based on their ablation study (Fig.13).

  1. Download the checkpoint.

Note: We assuem that the preprocessing steps have been done.

  1. For 2D images, run
python infer_SAM_2D_npz.py -i input_path -o output_path -m model_path
  1. For 3D images, run
python infer_SAM_3D_npz.py -i input_path -o output_path -m model_path