GitHub
ai-toolsdev-tools
Original source

LightGlue-ONNX: Local Feature Matching at Light Speed

Summary

ONNX-compatible export of LightGlue (local feature matching) — removes PyTorch dependency for production deployment.

  • Exports full extractor+matcher pipeline to ONNX for interop across platforms
  • Supports multiple backends: TensorRT, OpenVINO, CUDA, CPU
  • Extractors: SuperPoint, DISK, RaCo-ALIKED
  • Latest (Jul 2026): optimized RaCo-ALIKED-LightGlue+ with TensorRT — significant speedup over torch.compile()
  • FP8 quantization workflow (NVIDIA ModelOpt Q/DQ export) for even faster TensorRT inference
  • CLI tool via typer: lightglue-onnx export/infer/trtexec
  • Dynamic batch size support, FlashAttention-2 via onnxruntime >= 1.16
  • TopK-trick optimization: ~30% speedup by eliminating ArgMax
  • Browser WebGPU demo included
  • Uses uv for dependency management with granular install groups (cpu, cuda, trt, export)
  • Integrated into Kornia (kornia.feature.OnnxLightGlue)

Useful for deploying feature matching in production pipelines (SLAM, visual localization, homography estimation) without Python/PyTorch overhead. Pairs well with the ABot-Recon style 3D reconstruction workflows.