Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

为什么对视频的评分需要的内存如此之大! #14

Open
304883563 opened this issue Oct 23, 2020 · 4 comments
Open

为什么对视频的评分需要的内存如此之大! #14

304883563 opened this issue Oct 23, 2020 · 4 comments

Comments

@304883563
Copy link

我需要测试的视频是yuv大小大约是433M 1366x768 大约280多帧。使用CPU机器进行评分。机器内存4核32G。 运行一段时间。提示需要52G的内存。为何需要如此之大的内存?能否解答下。或者是否有参数可以调节。

@ciwei123
Copy link

@304883563 请问您有LIVE或其他数据集可以分享下吗2606789239@qq.com,非常感谢!!!

@haiqwang
Copy link

haiqwang commented Dec 3, 2020

我需要测试的视频是yuv大小大约是433M 1366x768 大约280多帧。使用CPU机器进行评分。机器内存4核32G。 运行一段时间。提示需要52G的内存。为何需要如此之大的内存?能否解答下。或者是否有参数可以调节。

首先,不建议使用CPU来跑模型,就算是解决了内存问题,CPU的运行时间会是GPU的几十倍。现在的代码是没有任何针对CPU的优化。当然,GPU模式也有很大的优化空间

直观地来说,有几个原因导致内存开销大。我们对YUV使用sliding windows采样,而且是有overlap的方式。模型运行期间也会产生高纬度的tensor,所以内存消耗比较大。另外,这是一个全参考模型,内存消耗又会加倍。数据预加载也会同步消耗内存。

在不改代码的前提下,一个比较简单的方式是减少单个测试序列的帧数,CPU/GPU内存消耗跟帧数成线性。

@haiqwang
Copy link

haiqwang commented Dec 3, 2020

@304883563 请问您有LIVE或其他数据集可以分享下吗2606789239@qq.com,非常感谢!!!

需要你去数据集官网下载。一般这种数据集不允许redistribute。

@weweaq
Copy link

weweaq commented Sep 27, 2021

@haiqwang 你好,请问GPU运行情况下对显存占用有什么优化操作推荐我们去研究?我12G的显存,跑1980x1080分辨率的视频有点吃力。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants