xuelunshen / gim

GIM: Learning Generalizable Image Matcher From Internet Videos (ICLR 2024 Spotlight)
https://xuelunshen.com/gim
MIT License
498 stars 23 forks source link

High Video Memory Usage When Running the Code #31

Open SirJackYang opened 2 weeks ago

SirJackYang commented 2 weeks ago

Hello,

I've encountered an issue with high video memory (VRAM) usage when executing the code provided in this repository

Here are the details of my environment and the steps I took:

Operating System: Windows 10 GPU Model: NVIDIA GeForce RTX 4080 with 16G memory CUDA Version: CUDA 11.8 with pytorch==2.3.0 Image resoluction: 1800*2000

image

I tried to resize the image using the following code, but the video memory usage is still very high. image image

image

xuelunshen commented 2 weeks ago

如果你想尝试 demo.py 里面的 gim_dkm, 你需要改变下面这行代码的数值, (672, 896) 代表图像输入以后会被缩放到这个大小, 你可以对这个图像尺寸进行等比缩小, 比如 (480, 640).

If you want to try gim_dkm at demo.py, you need to change the value of the code below. (672, 896) means that the image will be zoomed to this size later. You can reduce the image's size by an equal proportion, such as (480, 640).

https://github.com/xuelunshen/gim/blob/e06dba6c939ea5f4be8a11071df771d1956d3fcb/demo.py#L409

SirJackYang commented 2 weeks ago

好的,明白了,感谢