fabio-sim / LightGlue-ONNX

ONNX-compatible LightGlue: Local Feature Matching at Light Speed. Supports TensorRT, OpenVINO
Apache License 2.0
375 stars 34 forks source link

QKV Error when keypoint number is small #89

Closed biggiantpigeon closed 1 month ago

biggiantpigeon commented 2 months ago

I ran into the same error as #51, but not all the time--only when keypoint number is small(the biggest one I met is 127). Is there some method I can bypass this problem? like set a minimum keypoint required? But how do I know the exact number? I'm using c++ to run the model, is there any interface I can set this?

I think this may be a onnxruntime bug and they maybe fixed it in 1.19.2, but 1.19.2 have some problem to adapt cuda11.

My model version is v1.0. Thanks a lot.

fabio-sim commented 2 months ago

Hi @biggiantpigeon, thank you for your interest in LightGlue-ONNX.

Yes, I reimplemented the extractors to always output a fixed number of keypoints in the v2 release. For example, the models here were exported with --num-keypoints 1024: https://github.com/fabio-sim/LightGlue-ONNX/releases/tag/v2.0