DeniJsonC / WaveNet

[PG 2023] WaveNet: Wave-Aware Image Enhancement
Other
78 stars 14 forks source link

Train Problem #7

Closed Albertchamberlain closed 4 months ago

Albertchamberlain commented 4 months ago

image

DeniJsonC commented 4 months ago

image

你好,看起来你这pytorch版本不是GPU版本,torch.cuda.is_available() 是否为True?

Albertchamberlain commented 4 months ago

image

你好,看起来你这pytorch版本不是GPU版本,torch.cuda.is_available() 是否为True?

False,但我的环境是符合的,PyTorch 1.11,Ubuntu 18.04 、Python3.8、CUDA11.7

Albertchamberlain commented 4 months ago

所以很奇怪,谢谢

Albertchamberlain commented 4 months ago

image

DeniJsonC commented 4 months ago

image

你好,看起来你这pytorch版本不是GPU版本,torch.cuda.is_available() 是否为True?

False,但我的环境是符合的,PyTorch 1.11,Ubuntu 18.04 、Python3.8、CUDA11.7

你需要用conda 安装 不是pip 执行这条命令:conda install pytorch=1.11 torchvision cudatoolkit=11.7 -c pytorch

Albertchamberlain commented 4 months ago

是的,我是使用conda安装的

Albertchamberlain commented 4 months ago

更高版本的cuda和torch可以运行此项目吗?

DeniJsonC commented 4 months ago

更高版本的cuda和torch可以运行此项目吗?

可以的 1.1x pytorch 都可以,精确版本号 只是为了保持环境一致 你也可以参考 pip install torch==1.13.0+cu117 torchvision==0.14.0+cu117 torchaudio==0.13.0 --extra-index-url https://download.pytorch.org/whl/cu117 该命令 或者参考pytorch官方本地编译 按理说按照流程来 应该是没问题的 至少我自己本地测试是这样的

Albertchamberlain commented 4 months ago

好的谢谢,我稍后尝试

DeniJsonC commented 4 months ago

好的谢谢,我稍后尝试

有问题欢迎反馈~

Albertchamberlain commented 4 months ago

谢谢,跑通了,顺便问一下,此项目支持多卡吗?

DeniJsonC commented 4 months ago

谢谢,跑通了,顺便问一下,此项目支持多卡吗?

支持,具体参考https://github.com/XPixelGroup/BasicSR/blob/master/docs/TrainTest.md.

Albertchamberlain commented 4 months ago

So Cool😎

Albertchamberlain commented 4 months ago

我尝试了修改成多卡,但是由于存在对experiments文件夹的校验,后续卡上结果在写入时会由于已经存在而报错,这是一个问题

Albertchamberlain commented 4 months ago

不一定是多卡的原因,当我想要把一次实验重复跑多次时,就会报错,删除experiments文件夹再次运行,问题得以解决。这部分我还没有看代码

DeniJsonC commented 4 months ago

不一定是多卡的原因,当我想要把一次实验重复跑多次时,就会报错,删除experiments文件夹再次运行,问题得以解决。这部分我还没有看代码

这里是因为我添加了保存最佳PSNR的checkpoint,导致断开再继续训练时会自动加载里面experiments文件夹下最新XXX(迭代此次数).state继续训练,但是由于我设置额外保存最佳PSNRcheckpoint会导致加载冲突,你可以在train.py 177行手动修改你最近一次的state文件以用于继续训练,而不必重新训练

Albertchamberlain commented 4 months ago

我想要运行LOLv2 Real captured subset of LOL https://github.com/flyywh/SGM-Low-Light数据集 配置如下 image 总是提示缺失图片,事实上它是存在的,对于这个问题,你有什么想法吗?😀

Albertchamberlain commented 4 months ago

LOLV2的Synthetic subdataset可以直接运行,而Real-Captured却不能

Albertchamberlain commented 4 months ago

你可以提供一个多卡训练,多卡测试脚本吗?

Albertchamberlain commented 4 months ago

我想要运行LOLv2 Real captured subset of LOL https://github.com/flyywh/SGM-Low-Light数据集我想要运行 LOLv2 真实捕获的 LOL 子集 https://github.com/flyywh/SGM-Low-Light数据集 配置如下 image 总是提示缺失图片,事实上它是存在的,对于这个问题,你有什么想法吗?😀

好吧,经过我的测试,不论是LOL-V2还是VE-LOL,只要是Syntactic的都可以直接运行,而Real的却会提示缺失图片,尽管那些所谓缺失的图片安静的躺在文件夹里。不知道这是什么原因,很奇怪.

DeniJsonC commented 4 months ago

我想要运行LOLv2 Real captured subset of LOL https://github.com/flyywh/SGM-Low-Light数据集我想要运行 LOLv2 真实捕获的 LOL 子集 https://github.com/flyywh/SGM-Low-Light数据集 配置如下 image 总是提示缺失图片,事实上它是存在的,对于这个问题,你有什么想法吗?😀

好吧,经过我的测试,不论是LOL-V2还是VE-LOL,只要是Syntactic的都可以直接运行,而Real的却会提示缺失图片,尽管那些所谓缺失的图片安静的躺在文件夹里。不知道这是什么原因,很奇怪.

从图片上看 应该是路径错误,一个是Train 文件夹 一个是Test 你把Train文件,另外我是单卡训练和测试的,这边多卡测试没有试过,需要你自己探索了,BasicSR也给出了脚本,应该简单修改或者不修改就能跑起来吧

Albertchamberlain commented 4 months ago

我想要运行LOLv2 Real captured subset of LOL https://github.com/flyywh/SGM-Low-Light数据集我想要运行 LOLv2 真实捕获的 LOL 子集 https://github.com/flyywh/SGM-Low-Light数据集 配置如下 image 总是提示缺失图片,事实上它是存在的,对于这个问题,你有什么想法吗?😀

好吧,经过我的测试,不论是LOL-V2还是VE-LOL,只要是Syntactic的都可以直接运行,而Real的却会提示缺失图片,尽管那些所谓缺失的图片安静的躺在文件夹里。不知道这是什么原因,很奇怪.

从图片上看 应该是路径错误,一个是Train 文件夹 一个是Test 你把Train文件,另外我是单卡训练和测试的,这边多卡测试没有试过,需要你自己探索了,BasicSR也给出了脚本,应该简单修改或者不修改就能跑起来吧

好的,谢谢

Albertchamberlain commented 4 months ago

我检查了我的路径,路径是没有问题的,仅仅把上层目录Synthetic换成了Real_captured,

DeniJsonC commented 4 months ago

我检查了我的路径,路径是没有问题的,仅仅把上层目录Synthetic换成了Real_captured,

从你给的截图上看 'normal00246.png'文件的上一级文件夹是Train/Normal/, 而配置文件里你展示的是val: Test/Normal/

Albertchamberlain commented 4 months ago

也就是说我需要从train里抽取一部分作为val出来吗

Albertchamberlain commented 4 months ago

因为,Real-Captured和Syn有着相同的目录结构布局,按照道理来说我只要把输入的配置Syn替换成Real_captured即可 image

DeniJsonC commented 4 months ago

因为,Real-Captured和Syn有着相同的目录结构布局,按照道理来说我只要把输入的配置Syn替换成Real_captured即可 image

你可以提供完整的配置文件吗?train:下面放训练数据的文件夹路径 val:放验证数据的文件夹路径 https://github.com/DeniJsonC/WaveNet/issues/6#issuecomment-2031646378

Albertchamberlain commented 4 months ago

没问题 train: name: TrainSet type: Dataset_PairedImage dataroot_gt: /home/cicero/hbx/whl/WaveNet/datasets/LOL-v2/Real_captured/Train/Normal/ dataroot_lq: /home/cicero/hbx/whl/WaveNet/datasets/LOL-v2/Real_captured/Train/Low/ geometric_augs: true

filename_tmpl: '{}'
io_backend:
  type: disk

val: name: ValSet type: Dataset_PairedImage dataroot_gt: /home/cicero/hbx/whl/WaveNet/datasets/LOL-v2/Real_captured/Test/Normal/ dataroot_lq: /home/cicero/hbx/whl/WaveNet/datasets/LOL-v2/Real_captured/Test/Low/ io_backend: type: disk val_crop:

DeniJsonC commented 4 months ago

因为,Real-Captured和Syn有着相同的目录结构布局,按照道理来说我只要把输入的配置Syn替换成Real_captured即可 image

我知道问题出在哪里了 看你文件 训练文件LOL-v2应该是689张用于训练的,Train文件夹下成对文件只有689对,Test文件夹下只有100对才对,但是看你截图 所有图像都是序号是连号的 应该是数据集本身问题,建议你重新整理一下数据

Albertchamberlain commented 4 months ago

很奇怪,只有LOLv2和LOL-Ve的Real-Captured会有这种状况,Syn都是可以直接运行的,我觉得这不是巧合,后面我会仔细调查

Albertchamberlain commented 4 months ago

Hello, I have made a new discovery Using this work it is possible to run directly LOLv2-RealCaptured https://github.com/wangchx67/FourLLIE

image

或许是你们的代码实现不同?

DeniJsonC commented 4 months ago

Hello, I have made a new discovery Using this work it is possible to run directly LOLv2-RealCaptured https://github.com/wangchx67/FourLLIE

image

或许是你们的代码实现不同?

你可以尝试下载该连接的LOL-v2数据集https://drive.google.com/file/d/1Ou9EljYZW8o5dbDCf9R34FS8Pd8kEp2U/view 再重新配置文件路径尝试一下,理论上能训练LOLv1就能训练其他配对数据集 不存在任何问题

Albertchamberlain commented 4 months ago

Hello, I have made a new discovery Using this work it is possible to run directly LOLv2-RealCaptured https://github.com/wangchx67/FourLLIE image 或许是你们的代码实现不同?

你可以尝试下载该连接的LOL-v2数据集https://drive.google.com/file/d/1Ou9EljYZW8o5dbDCf9R34FS8Pd8kEp2U/view 再重新配置文件路径尝试一下,理论上能训练LOLv1就能训练其他配对数据集 不存在任何问题

嗯,我和你看法一致