GithubHelp home page GithubHelp logo

图像在4096*3000时候cpu下内存占用率特别大(matchthresh=0.9),将近16g,而且cpu下onnxruntime有点慢, about superpoint-lightglue-image-stiching HOT 5 OPEN

aidajiangtang avatar aidajiangtang commented on August 24, 2024
图像在4096*3000时候cpu下内存占用率特别大(matchthresh=0.9),将近16g,而且cpu下onnxruntime有点慢,

from superpoint-lightglue-image-stiching.

Comments (5)

AIDajiangtang avatar AIDajiangtang commented on August 24, 2024 1

如果想减少内存占用率,可以考虑下面几个方面:
1.缩小图像,最直接,简单,但可能影响结果。
2.去掉分数低的特征点,supepoint的输出为 "keypoints","scores","descriptors",设置阈值,去掉scores低的特征点。
3.对模型进行压缩,剪枝,量化,有技术门槛,且可能影响结果。
4.通过设置合理的ONNX推理引擎参数进行内存优化。
例如,disablecpumemarena是一个ONNX Runtime的会话选项参数,用于设置是否禁用CPU内存竞技场。如果为真,会话将使用系统的默认内存分配器,而不是自定义的内存分配器,这可能会导致内存碎片和性能下降。一般情况下,不建议禁用CPU内存竞技场,除非你有特殊的需求或遇到了一些问题。

5.采用GPU进行推理。

from superpoint-lightglue-image-stiching.

dugushiyu avatar dugushiyu commented on August 24, 2024

设置sessionoptions disablecpumemarena降低
如何设置点的个数?

from superpoint-lightglue-image-stiching.

AIDajiangtang avatar AIDajiangtang commented on August 24, 2024

6.及时释放内存,比如,superpoint检测完特征点,只保留特征点结果就行了,图像内存等就可以释放了

from superpoint-lightglue-image-stiching.

dugushiyu avatar dugushiyu commented on August 24, 2024

非常感谢您的回复。大牛什么时候出Tensorrt?期待
github上我找一个基于tensorRt的,但存在大量的vector计算之类的,相对慢,我修改成mat计算方式,现在1027*768图像,检测+配准 (不包括反序列化时间)约100ms以内,感觉还有提升空间。float16的。

from superpoint-lightglue-image-stiching.

AIDajiangtang avatar AIDajiangtang commented on August 24, 2024

我电脑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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.