How fabio-sim/lightglue-onnx works
LightGlue ONNX exports and runs feature-matching pipelines on image pairs, with CLI inference/export and a browser WebGPU demo. The core path preprocesses two images, extracts local features, matches them, and returns correspondences for visualization. README capabilities also include adaptive-depth export, several feature extractors, ONNX Runtime providers, pure TensorRT inference, FP8 quantization, and optional GPU JPEG preprocessing. Source excerpts were partial, so links for unsampled CLI behavior are limited to documented capabilities and supported module paths.
Main entry points: cli.py CLI commands · models Feature extractors · main.js WebGPU demo · serve.py Demo server
Components 25
User interfaces
- CLI commands
lightglue_dynamo/cli.py - WebGPU demo
web/main.js - Demo server
web/serve.py
Inference runtime
- Image pair prep
lightglue_dynamo/preprocessors/io.py - GPU JPEG prep
lightglue_dynamo/preprocessors/cuda.py - Extractor matcher
lightglue_dynamo/models/pipeline.py
Feature models
- Feature extractors
lightglue_dynamo/models - ALIKED
lightglue_dynamo/models/aliked.py - RaCo ranker
lightglue_dynamo/models/raco.py - SuperPoint
lightglue_dynamo/models/superpoint.py - DISK extractor
lightglue_dynamo/models/disk/disk.py - LightGlue matcher
lightglue_dynamo/models/lightglue.py
Export and optimization
- Adaptive depth
lightglue_dynamo/adaptive_depth.py - FP8 quantization
lightglue_dynamo/scripts/quantize.py - Ranker quantization
lightglue_dynamo/scripts/quantize_ranker_fp8.py - Benchmarking
lightglue_dynamo/scripts/benchmark.py
Execution integrations
- ONNX Runtime
- TensorRT runtime
- OpenVINO runtime
- WebGPU runtime
web/main.js - GitHub releases
- Model files
weights
Other components
- CLI user
- Browser user
- Match results
Connections 26
- CLI user → CLI commands: invokes
- CLI commands → Image pair prep: prepares inputs
- CLI commands → GPU JPEG prep: selects optional
- Image pair prep → Extractor matcher: passes tensors
- GPU JPEG prep → CLI commands: provides GPU inputs
- Extractor matcher → Feature extractors: extracts features
- Feature extractors → ALIKED: supports
- Feature extractors → RaCo ranker: supports
- Feature extractors → SuperPoint: supports
- Feature extractors → DISK extractor: supports
- Extractor matcher → LightGlue matcher: matches keypoints
- LightGlue matcher → Match results: returns correspondences
- CLI commands → ONNX Runtime: runs model
- CLI commands → TensorRT runtime: dispatches inference
- CLI commands → OpenVINO runtime: selects provider
- CLI commands → Adaptive depth: exports adaptive graph
- CLI commands → FP8 quantization: runs quantization
- CLI commands → Ranker quantization: runs ranker quantization
- CLI commands → Benchmarking: benchmarks inference
- CLI commands → Model files: reads or writes
- Browser user → WebGPU demo: runs demo
- WebGPU demo → WebGPU runtime: executes model
- WebGPU demo → Demo server: requests model
- Demo server → Model files: serves local model
- Demo server → GitHub releases: proxies model
- WebGPU demo → Match results: renders matches