Skip to content

Export and depoly SAM(segment-anything model) on onnxruntime.

Notifications You must be signed in to change notification settings

llx-08/sam-ort-deploy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

SAM-ort-deploy

Export and depoly SAM(segment-anything model) on onnxruntime.

Export onnx model

SAM repo: https://github.com/facebookresearch/segment-anything

  1. Install SAM via readme in SAM.
  2. Download SAM checkpoint & Set the path of checkpoint.
  3. Run python script in dir export_onnx, the sam is composed of two parts: image encoder and mask decoder, we will export them into onnx model separately

To export mask decoder, run

python export/export_mask_decoder.py --checkpoint <path/to/checkpoint> --model-type <model_type> --output <path/to/output>

Run Inference

Run ort_inference.py

About

Export and depoly SAM(segment-anything model) on onnxruntime.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages