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
880 stars 74 forks source link

train and test #90

Closed Enternal-w closed 3 months ago

Enternal-w commented 3 months ago

作者您好,非常感谢您的开源成果,遇到一些问题,希望您给到一些建议 在train过程中出现以下错误: RuntimeError: CUDA out of memory. Tried to allocate 20.00 MiB (GPU 0; 3.80 GiB total capacity; 2.25 GiB already allocated; 11.88 MiB free; 2.29 GiB reserved in total by PyTorch) If reserved memory is >> allocated memory try setting max_split_size_mb to avoid fragmentation. See documentation for Memory Management and PYTORCH_CUDA_ALLOC_CONF

在test过程中出现以下错误: Not using Automatic Mixed Precision 2024-07-02 11:47:19,157 INFO: Dataset Dataset_PairedImage - TrainSet is created. 2024-07-02 11:47:19,158 INFO: Number of test images in TrainSet: 485 2024-07-02 11:47:19,158 INFO: Dataset Dataset_PairedImage - ValSet is created. 2024-07-02 11:47:19,158 INFO: Number of test images in ValSet: 15 2024-07-02 11:47:21,803 INFO: Model [ImageCleanModel] is created. 2024-07-02 11:47:21,803 INFO: Testing TrainSet... Traceback (most recent call last): File "/home/jia/Retinexformer/basicsr/test.py", line 62, in main() File "/home/jia/Retinexformer/basicsr/test.py", line 58, in main rgb2bgr=rgb2bgr, use_image=use_image) File "/home/jia/Retinexformer/basicsr/models/base_model.py", line 52, in validation save_img, rgb2bgr, use_image) File "/home/jia/Retinexformer/basicsr/models/image_restoration_model.py", line 314, in nondist_validation metric_module, metrictype)(visuals['result'], visuals['gt'], **opt) File "/home/jia/Retinexformer/basicsr/metrics/psnr_ssim.py", line 40, in calculate_psnr img1 = img1.detach().cpu().numpy().transpose(1,2,0) ValueError: axes don't match array

caiyuanhao1998 commented 3 months ago

你好,请把你执行的详细的 train 和 test 指令以及你是按照哪个环境进行配置的发一下,我可以帮你看看

如果觉得我们的 repo 有用的话,帮忙点点 star 支持一下

caiyuanhao1998 commented 3 months ago

hello, 发一下吗,我可以帮你看看

Enternal-w commented 3 months ago

我可能知道是什么问题了,我在ubantu上使用pycharm运行的train test,并没有使用您主页上的指令,我晚点尝试一下

---Original--- From: "Yuanhao @.> Date: Tue, Jul 2, 2024 13:48 PM To: @.>; Cc: @.**@.>; Subject: Re: [caiyuanhao1998/Retinexformer] train and test (Issue #90)

hello, 发一下吗,我可以帮你看看

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

Enternal-w commented 3 months ago

非常非常非常感谢您

---Original--- From: "Yuanhao @.> Date: Tue, Jul 2, 2024 13:48 PM To: @.>; Cc: @.**@.>; Subject: Re: [caiyuanhao1998/Retinexformer] train and test (Issue #90)

hello, 发一下吗,我可以帮你看看

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

caiyuanhao1998 commented 3 months ago

哦哦,好的 :)

Enternal-w commented 3 months ago

作者您好,作为一个初学者被一些基础问题所困扰,希望可以得到您启发性的指导。 1.为什么illuminate prior使用的是通道维度dim=1的均值,这样操作是可以简化运算还是 2.可分离卷积55的作用就是为了提取特征吗,设计成55有什么特殊要求吗 3.light map为什么通过这样三个卷积就得到了,有什么理论性的说法吗

---Original--- From: "Yuanhao @.> Date: Tue, Jul 2, 2024 13:51 PM To: @.>; Cc: @.**@.>; Subject: Re: [caiyuanhao1998/Retinexformer] train and test (Issue #90)

哦哦,好的 :)

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

caiyuanhao1998 commented 3 months ago

1、illumination prior 是在通道维度上算均值,即 RGB 均值 2、对的,5x5是为了扩大感受野 3、类似于用一个简单的卷积网络直接去学习

Enternal-w commented 3 months ago

非常感谢您的回复

---Original--- From: "Yuanhao @.> Date: Thu, Jul 11, 2024 09:32 AM To: @.>; Cc: @.**@.>; Subject: Re: [caiyuanhao1998/Retinexformer] train and test (Issue #90)

1、illumination prior 是在通道维度上算均值,即 RGB 均值 2、对的,5x5是为了扩大感受野 3、类似于用一个简单的卷积网络直接去学习

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

Enternal-w commented 3 months ago

作者您好,文中L点乘L-等于1是如何约束的,L-就是那个从三个卷积层出来的light map 有什么理论依据吗,还是参考了那些文献

---Original--- From: "Yuanhao @.> Date: Thu, Jul 11, 2024 09:32 AM To: @.>; Cc: @.**@.>; Subject: Re: [caiyuanhao1998/Retinexformer] train and test (Issue #90)

1、illumination prior 是在通道维度上算均值,即 RGB 均值 2、对的,5x5是为了扩大感受野 3、类似于用一个简单的卷积网络直接去学习

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>