verlab / accelerated_features

Implementation of XFeat (CVPR 2024). Do you need robust and fast local feature extraction? You are in the right place!
https://www.verlab.dcc.ufmg.br/descriptors/xfeat_cvpr24
Apache License 2.0
1.02k stars 113 forks source link

Requesting a constants.pkl file for pre trained models #27

Closed wangy-w closed 5 months ago

wangy-w commented 5 months ago

Xfeature has been very helpful to me. Recently, I have been using libtorch to modify it to C++code. During the testing phase, when loading the pre trained model, the following error occurred: "Terminate called after throwing an instance of 'c10:: Error'" What(): PytorchStreamReader failed locating file constants.pkl: file not found ” So I would like to request a constants.pkl file in the pre trained model.Looking forward to your reply

guipotje commented 5 months ago

Hi @wangy-w,

Thanks for the interest in our work!

I don't know about this constants.pkl file, it might be a pytorch dependency itself;

I would recommend trying the ONNX versions or trying to serialize the model with torch jit and loading in C++.

Best regards.

wangy-w commented 5 months ago

@guipotje Thank you very much for your reply. I have found the answer here https://docs.djl.ai/docs/pytorch/how_to_convert_your_model_to_torchscript.html

guipotje commented 5 months ago

Nice! Hope it worked for you, just closing the issue. Feel free to open again if issue persists.