Comments (5)
如果想减少内存占用率,可以考虑下面几个方面:
1.缩小图像,最直接,简单,但可能影响结果。
2.去掉分数低的特征点,supepoint的输出为 "keypoints","scores","descriptors",设置阈值,去掉scores低的特征点。
3.对模型进行压缩,剪枝,量化,有技术门槛,且可能影响结果。
4.通过设置合理的ONNX推理引擎参数进行内存优化。
例如,disablecpumemarena是一个ONNX Runtime的会话选项参数,用于设置是否禁用CPU内存竞技场。如果为真,会话将使用系统的默认内存分配器,而不是自定义的内存分配器,这可能会导致内存碎片和性能下降。一般情况下,不建议禁用CPU内存竞技场,除非你有特殊的需求或遇到了一些问题。
5.采用GPU进行推理。
from superpoint-lightglue-image-stiching.
设置sessionoptions disablecpumemarena降低
如何设置点的个数?
from superpoint-lightglue-image-stiching.
6.及时释放内存,比如,superpoint检测完特征点,只保留特征点结果就行了,图像内存等就可以释放了
from superpoint-lightglue-image-stiching.
非常感谢您的回复。大牛什么时候出Tensorrt?期待
github上我找一个基于tensorRt的,但存在大量的vector计算之类的,相对慢,我修改成mat计算方式,现在1027*768图像,检测+配准 (不包括反序列化时间)约100ms以内,感觉还有提升空间。float16的。
from superpoint-lightglue-image-stiching.
我电脑GPU不支持TensorRT,所以没有升级TensorRT推理计划。
我现在用的是ONNXRuntime,你可以尝试在此基础上使用TensorRT加速。
https://onnxruntime.ai/docs/execution-providers/TensorRT-ExecutionProvider.html
另外,虽然GPU能够通过并行计算加速推理,但CPU与GPU之间通信的也存在开销,但我没尝试过,所以不确定是否能在100ms以内完成。
from superpoint-lightglue-image-stiching.
Related Issues (11)
- compile dependencies HOT 1
- 无法打开输入文件“opencv_world455.obj” HOT 2
- Superpoint and lightglue models? HOT 9
- Question l meet about execution HOT 2
- 推理速度很慢 HOT 6
- Cuda. HOT 2
- 关于superpoint_lightglue.onnx模型是如何转化的问题 HOT 4
- LightGlue-ONNX End_to_End model HOT 1
- models from https://github.com/fabio-sim/LightGlue-ONNX
- 未来会出用tensorrt api搭建的吗 HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from superpoint-lightglue-image-stiching.