LightGlue
LightGlue copied to clipboard
About Inference time
I tested lightglue and superglue using both CPU and GPU ,In both cases, superglue takes less time,but in paper,lightglue is faster。I want to know why there is such a contradiction,and my CPU:Intel(R) Xeon(R) Gold 6242 CPU @ 2.80GHz ,GPU: RTX 2080Ti
How many keypoints are there in the two images? if less than 1k, can you compare the runtimes with point pruning turned off? We indeed need to add some checks in the model.
I tested lightglue and superglue using both CPU and GPU ,In both cases, superglue takes less time,but in paper,lightglue is faster。I want to know why there is such a contradiction,and my CPU:Intel(R) Xeon(R) Gold 6242 CPU @ 2.80GHz ,GPU: RTX 2080Ti
How much inference time?
@Skydes Two images have 274 and 265 keypoints respectively 。 point pruning turned off or not, lightglue takes more time
@kvnptl Two images have 274 and 265 keypoints respectively 。 Superglue took 0.024 seconds, while lightglue took 0.0339 seconds 。
Hi @qazzombie @kvnptl
We realized that run time overhead limited the inference speed of LightGlue with few keypoints. We pushed some improvements in PR #37. Could you maybe checkout the corresponding branch and run the benchmark script:
python benchmark.py --compile --add_superglue
To add SuperGlue in the benchmark you also need hloc.
I meet similar problem. For the image DSC_0410.JPG and DSC_0411.JPG, it seems that in the case of closing the "flash-attention", Lightglue can be only ~30% faster than superglue? I do this evaluation on rtx2070. (I have excluded the time comsumed by superpoint)
Oh, I find my problem. But with benchmark code, it still seems something wrong? Without falsh-attention and compile, the speed will be similar to superglue?Am I still do something wrong?
Hi @xuanlanxingkongxia
This looks good to me. Note that in the plot above we benchmark against SuperGlue-fast, with fewer sinkhorn iterations. To compare against the original SuperGlue, you should uncomment the line here.
The main run time improvements of LightGlue are its adaptiveness, and this is clearly visible in your benchmark.