Experience seamless client-side image segmentation with Segment Anything 2 using WebGPU. Fully browser-based, it leverages cutting-edge web tech to deliver real-time results without any server dependency.
Segment Anything 2 with WebGPU delivers a fully browser-based implementation of the Segment Anything model, leveraged through WebGPU. This approach enhances performance by executing all processes client-side, ensuring no data transfer to external servers. Experience the capability online with the live demo.
Project Highlights:
Constructed using Svelte, this application maintains a clean and straightforward architecture. The project structure divides into decoder and encoder modules:
Supports models up to 1024x1024 pixels for inputs and outputs masks of 256x256 pixels.
To address model size limitations for web deployment, models are stored locally in the browser after initial download. Implementation leverages the origin private file system for efficient use of disk space.
Models are optimized for web use through the following steps:
onnxruntime tools to further optimize models, reducing their size via .ORT format.For a more detailed methodology and contributions, read the full write-up and explore collaborations that inspired this project.
No comments yet.
Sign in to be the first to comment.