ajuric / aliked-tensorrt

TensorRT implementation of ALIKED
BSD 3-Clause "New" or "Revised" License
8 stars 1 forks source link

false output for C++ inference #1

Closed mht1421 closed 8 months ago

mht1421 commented 9 months ago

Thanks for the export code to onnx, I tried to use it in C++, for the preprocess I just normalized the input to 0-1 and transformed to float32. But I couldn't get an appropriate output using the onnx models. Is there something I am doing wrong?

ajuric commented 9 months ago

That could be due to a lot of stuff. Here is the execution of onnx model in Python: https://github.com/ajuric/aliked-tensorrt/blob/main/convert_pytorch_to_onnx.py#L163

During the conversion to ONNX, I get same outputs as in Pytorch, so check your steps again.

Don't forget to do the same preprocessing and post-processing (e.g. scaling keypoints back to [0-Height, 0-Width]) as in ALIKED model.

mht1421 commented 9 months ago

Thank you for the fast reply, I got a good output. Just another question please, have you tested lightglue with the aliked features also?

ajuric commented 9 months ago

Using LightGlue and ALIKED together has been done here: https://github.com/cvg/glue-factory?tab=readme-ov-file#available-models (see the second table in the linked section).

It's also mentioned/tested here and here .