microsoft / microsoft/onnxruntime-inference-examples

exporting the vit_b model with sam exporter ?

Open
#422 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
1.7k
Forks
414
Avg merge
1d 6h
Merged PRs (30d)
14

Description

https://github.com/microsoft/onnxruntime-inference-examples/blob/8fcc97e1e035d57ffdfd19b76732e3fc79d8c2a6/js/segment-anything/index.js#L21

Hi @guschmue, can you share the command used with the sam exporter tool to get this onnx file?

p.s. : I tried exporting the vit_b version with the sam exporter tool and got a larger onnx file (360 MB compared with yours 180 MB) that runs slower in browser with webgpu. Did you convert the model weights to mixed precision/ half precision before exporting it with sam_exporter?

Thank you

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with js/segment-anything/index.js at line 21 and identify the SAM exporter invocation that produced its ONNX model. Compare the export command and precision settings with the reported 360 MB file, then verify the resulting model size and browser WebGPU performance. Done means documenting the exact command and any mixed- or half-precision step.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
machine-learning, web-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.