MobileSAM icon indicating copy to clipboard operation
MobileSAM copied to clipboard

how to convet the model to onnx

Open qnmts opened this issue 1 year ago • 8 comments

I did not convert the model to onnx according to the method provided by SAM

qnmts avatar Jun 30 '23 03:06 qnmts

@qnmts

python scripts/export_onnx_model.py --checkpoint weights/mobile_sam.pt --model-type vit_t --opset 11 --output mobile_sam_onnx_opset11.onnx

mobile_sam_to_onnx

jnulzl avatar Jun 30 '23 08:06 jnulzl

@jnulzl thank you, but no the vit_t type image

qnmts avatar Jun 30 '23 09:06 qnmts

@jnulzl This is my way of switching, but there are a lot of caveats,and the accuracy of ONNX's inference is not as high as before. Do you have this situation image

qnmts avatar Jun 30 '23 09:06 qnmts

@qnmts Hi, please check this pull request.

dhkim2810 avatar Jun 30 '23 09:06 dhkim2810

@qnmts I didn't meet your error. You can try to update your code to the latest and try again.

jnulzl avatar Jun 30 '23 09:06 jnulzl

@qnmts Hi, please check this pull request.

thank you !!!

qnmts avatar Jun 30 '23 09:06 qnmts

@qnmts I didn't meet your error. You can try to update your code to the latest and try again. ok

qnmts avatar Jun 30 '23 09:06 qnmts

@jnulzl This is my way of switching, but there are a lot of caveats,and the accuracy of ONNX's inference is not as high as before. Do you have this situation image

Have you figured out the reason? If so, please kindly let us know. Thanks~~

ChaoningZhang avatar Jun 30 '23 12:06 ChaoningZhang

Hi @qnmts , we will close the issue. Please let us know if there is performance degradation in exported ONNX model.

Thank you.

dhkim2810 avatar Jul 04 '23 03:07 dhkim2810