fabio-sim / LightGlue-ONNX

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

TypeError: unsupported operand type(s) for |: 'type' and 'NoneType #13

Closed GUOkekkk closed 1 year ago

GUOkekkk commented 1 year ago
  File "/home/ke/GUO_Ke/Python_test/DL/LightGlue-ONNX/lightglue_onnx/disk.py", line 35, in <module>
    n: int | None = None,
TypeError: unsupported operand type(s) for |: 'type' and 'NoneType'

Hi I met this problem when I am trying to run the demo, it is because of the python version? My command:

 python3 export.py \                                                                                                                                                                                                        
  --img_size 320 320 \
  --extractor_type superpoint \
  --extractor_path weights/superpoint.onnx \
  --lightglue_path weights/superpoint_lightglue.onnx \
  --dynamic
GUOkekkk commented 1 year ago

And in the 66 line of infer.py, when I choose --img_size 512, it always does not work, I have to change it to --img_size 512 512, so for me, it should be "Invalid img_size. Please provide 2, or 4 integers"?

fabio-sim commented 1 year ago

Hi @GUOkekkk , many thanks for the bug report! The latest release fixes these errors and also adds mixed precision support. I hope it works on your end now!

GUOkekkk commented 1 year ago

Thanks for your kind reply, really impressive work!