fabio-sim/LightGlue-ONNX

onnxruntime error

Closed this issue · 1 comments

use the command to export the end2end model
python export.py \ --img_size 512 \ --extractor_type disk \ --lightglue_path weights/superpoint_lightglue.onnx \ --end2end \ --safe
and then load \ build and export the onnx model to another embedded platform
then the error message occurs
[ONNXRuntimeError] : 1 : FAIL : Node (/extractor/unet/2/Concat) Op (Concat) [ShapeInferenceError] Can't merge shape info. Both source and target dimension have values but they differ. Source=257 Target=256 Dimension=2

Hi @valenbase , I've provided an exported end2end model in your previous issue (#19 (comment)). Could you try using that one?

I recommend exporting with python export.py --extractor_type disk --dynamic --end2end. If you provide only one number in --img_size without specifying --dynamic, the images used for tracing (image0 and image1) will be resized such that their longer side is equal to --img_size, and the exported model will be locked into whatever those input shapes are.