Conversation
2ede67c to
88cacd3
Compare
|
@fengyuentau I tried to load one of the models in your shared folder with OpenCV model diagnostics tool and got a lot of errors. Could you take a look on attached log. |
With this patch, our dnn engine can only parse and infer |
|
|
@fengyuentau Friendly reminder. |
To be honest, I do not think my patch affects anything related to this node and SAM just works on my side. You can try the following test code instead: Let me know if there are further issues. |
Resolves #23470.
Need to have einsum supported, so link #23134 as well.Einsum is extracted into several operators to bypass this issue first. Will support Einsum in another PR.To build a demo running SAM with dnn, we actually need two models:
Since the current dnn engine does not support dynamic shape, we need to carefully export ONNX SAM with:
onnxsim.Access the code of exporting ONNX SAM with encoder: https://github.com/fengyuentau/segment-anything
Download the model I carefully exported: https://drive.google.com/drive/folders/110JBApuq0_37C0gTlMzqs9B3var2oCGY
Pull Request Readiness Checklist
See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request
Patch to opencv_extra has the same branch name.