-
Notifications
You must be signed in to change notification settings - Fork 49
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
ASpanFormer (LofTR-like) support #43
Comments
Hi. Here is my quick guess: |
Still WIP but if you intend to use new onnxruntime version. You might need to take a look at this. |
If it is possible, I am more than happy if you can create a PR to integrate your work on ASpanFormer into this repo. |
Hi @xmba15, sorry for the late reply, it is possible for me to integrate the work for ASpanFormer into this repo after resolving the problems. I believe it is caused by this line, which occurs in the loftr code too: in fine_matching.py, function get_fine_match(). I will look into it now, if you guys have any advice or experience considering this error, help would be great, if not, i will comment after resolving it PS: I am trying to use the outdoor version of aspanformer, since in my experience the indoor model doesn't perform as good as the outdoor and is preferable in my use case. |
worked around the error by removing the slicing part |
@fatihkykc I could export the (new) outdoor loftr model too, but the performance was bad. Some other issues in loftr repo also reported the same thing with the (new) outdoor loftr model. If you can test and still get a good result, it would be great. I am curious to see the result. |
@xmba15 Hi, can you provide some sample results, or at least a link to some sample images that outdoor loftr version doesnt work well, it may be a good start for comparing the results |
Hi, would it be possible to create an example for ASpanFormer model, a loftr like model, that is mostly using the same code as loftr.
I tried to implement it using your loftr example, but first, got an error from onnx saying that the opset 12 doesn't support grid_sampler. error below:
Exception has occurred: UnsupportedOperatorError Exporting the operator 'aten::grid_sampler' to ONNX opset version 12 is not supported. Support for this operator was added in version 16, try exporting with this version. File "convert_to_onnx_aspan.py", line 35, in main torch.onnx.export( File "convert_to_onnx_aspan.py", line 70, in <module> main()
After setting the opset version to 16, the code successfully exported the onnx model, but when calling the inferenceSession as
sess = onnxruntime.InferenceSession("aspanformer.onnx")
got another error saying:Exception has occurred: InvalidGraph [ONNXRuntimeError] : 10 : INVALID_GRAPH : Load model from aspanformer.onnx failed:This is an invalid model. Type Error: Type 'tensor(bool)' of input parameter (/coarse_matching/And_1_output_0) of operator (ReduceMax) in node (/coarse_matching/ReduceMax_2) is invalid.
The exported model even passes the onnx.checker.check_model validation.
Any help would be great, and thanks for the good work.
The text was updated successfully, but these errors were encountered: