sepal / sam-embeddings

Get the image embeddings from segement anything

  • Public
  • 135 runs
  • GitHub
  • Paper

Input

Output

Run time and cost

This model costs approximately $0.0026 to run on Replicate, or 384 runs per $1, but this varies depending on your inputs. It is also open source and you can run it on your own computer with Docker.

This model runs on Nvidia A40 GPU hardware. Predictions typically complete within 5 seconds. The predict time for this model varies significantly based on the inputs.

Readme

A simple model to calculate the embeddings for the Segment Anything Model. The purpose is to calculate the embeddings on a GPU powered Replicate instance, and then calculate the segments on a CPU-only machine or even via WASM directly in the user’s browser.

PhotograftAI is an example demo where I use this architecture. The model generates a zip containing the embeddings you can store as a file. To calculate the mask you load the embeddings and add them to your input (e.g. the point, rect, or prompt that you wanna mask) and run the model. To calculate the masks directly in a browser you, can follow meta’s ONNX notebook