-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
where is the SAM model service you call deployed? #5
Comments
in this file meta-sam-demo/src/components/helpers/modelAPI.tsx, when i changed it to my server, like it can work, but the performance is not as good as the official one. so "https://model-zoo.metademolab.com/predictions/segment_everything_box_model" use this https://dl.fbaipublicfiles.com/segment_anything/sam_vit_h_4b8939.pth or not? |
From what i understand the model used in this project is a quantized ONNX model like the explain in the segment-anything github? You use a server like confidential ONNX inference server to host the ONNX file? Does the ONNX server run the model for you or does it serve the ONNX model file and runs it on your local computer? |
The quantized ONNX files included in this repository are used for decoding the masks from the image embedding. As correctly explained above, |
I'm new to the ONNX files, can you point me to some documentation how to serve the provided .onnx files? 🙂 |
The two ONNX files which are included with this repository are included inside of the repository and are served using a WASM (Web Assembly) engine on your browser. This is done through onnxruntime-web. So in other words, you don't have to do anything, it will automatically just work when you run it :) |
@wkkuniquegmail @MiscellaneousStuff I got the same result when I changed the image embedding server from
I also run the GitHub JS demo(https://github.com/facebookresearch/segment-anything/tree/main/demo),
In my opinion , input image resize before embedding and onnx model |
Have you found a solution? I use the vit_h model deployed by myself to extract the image embedding. The segmentation accuracy is very low. |
I haven't tried this repo with a self deployed model, but from what I can tell resizing the input image to the 1024x1024 expected by the model might help performance? Sorry this isn't very helpful but I'm not exactly sure what pre-processing the model zoo endpoint uses for computing the Image Embedding. |
@sun631998316 I rewrited the code base https://github.com/facebookresearch/segment-anything/tree/main/demo , it work well ! And you don't need to do anything before image embedding , it will transform the input image to long-side 1024 in set_image function |
I have personally exported an ONNX model and conducted a successful test using the image mentioned above。 This project (https://github.com/haibingtown/segment-matting) provides a complete demo. |
where is the SAM model service you call deployed?
The text was updated successfully, but these errors were encountered: