Skip to content

derekray311511/SAM-webui

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SAM-webui

News

  • Release code
  • Add brush and eraser tool
  • Add save type dropdown menu

TODO List

  • Save current masks
  • Zoom in and zoom out
  • Brush tool and eraser tool
  • Save masks in coco format

Features

  • Preview Images
  • Multi-View Switch
  • SAM Point Segmentation
  • SAM Box Segmentation
  • SAM Auto Segmentation (Inference without prompt)
  • Undo (ctrl+z)
  • Clear (c)
  • Save Masks (ctrl+s)
  • Mouse wheel to zoom in / out
  • Find shortcuts when mouse hovering on buttons!
  • Press ctrl to drag the zoomed image
  • Press alt to change the brush to eraser

Install

The code requires python>=3.8, as well as pytorch>=1.7 and torchvision>=0.8. Please follow the instructions here to install both PyTorch and TorchVision dependencies. Installing both PyTorch and TorchVision with CUDA support is strongly recommended.

We have tested: Python 3.8 pytorch 2.0.0 (py3.8_cuda11.7_cudnn8.5.0_0) torchvision 0.15.0

git clone https://github.com/derekray311511/SAM-webui.git
cd SAM-webui; pip install -e .
pip install opencv-python pycocotools matplotlib onnxruntime onnx flask flask_cors

Model Checkpoints

You can download the model checkpoints here.

Run

MODEL_TYPE: vit_h, vit_l, vit_b

python app.py --model_type vit_h --checkpoint ../models/sam_vit_h_4b8939.pth

If you want to run on cpu,

python app.py --model_type vit_h --checkpoint ../models/sam_vit_h_4b8939.pth --device cpu

Credits

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published