caiyuanhao1998 / Retinexformer

"Retinexformer: One-stage Retinex-based Transformer for Low-light Image Enhancement" (ICCV 2023) & (NTIRE 2024 Challenge)
https://arxiv.org/abs/2303.06705
MIT License
828 stars 64 forks source link

How to infer 6000x4000 images? #65

Closed Zhou-Yijie closed 4 months ago

Zhou-Yijie commented 4 months ago

I tried to use Retinexformer model to infer one 6000x4000 image but got Out Of Memory (A100 40G). Could you share how to do 6000x4000 image inference? (maybe need crop?)

caiyuanhao1998 commented 4 months ago

Hi, thanks for your interests,

My suggestion is:

(i) Use a GPU with 48G memory to execute our code to infer 6k x 4k images.

or

(ii) You can modify this part of code to split the image into three part:

截屏2024-04-23 下午11 04 10
ZziTaiLeo commented 2 months ago

你好,我的显卡是24g的3090,好奇这种分割为n part的方式即等同于下采样吗

caiyuanhao1998 commented 2 months ago

可以这么理解,但又并不完全是,这种拆分方式能让最后平凑的图片没有明显的明暗边界,语义上更为连续