ChaoningZhang / MobileSAM

This is the official code for MobileSAM project that makes SAM lightweight for mobile applications and beyond!
Apache License 2.0
4.86k stars 505 forks source link

ONNX decoder's output has float type #92

Closed LyndzP closed 1 year ago

LyndzP commented 1 year ago

Hi Thank you for guys made awesome project.

I made react-native app and run onnx encoder and decoder.

but decoder's output(maybe mask) has float type not bool

How can convert onnx decoder's output to binary mask? or Am i did something wrong?

LyndzP commented 1 year ago

I test onnx_model_example.ipynb

When i was set imageEmbedding from Sampredictor, the decoder's output mask was perfect, but when i was set imageEmbedding from mobilesam.encoder.onnx, the mask was wrong. maybe it is encoder.onnx's problem

LyndzP commented 1 year ago

I solved problem!