suxuann / ddib

Dual Diffusion Implicit Bridges for Image-to-Image Translation. ICLR 2023.
MIT License
361 stars 31 forks source link

Training on my own datasets #2

Open kaneyxx opened 2 years ago

kaneyxx commented 2 years ago

Hi there, if I had the paired image datasets A B. I want to train a DDIB model translate the B to A (B is synthetic dataset from A). Which script I need to run? I'm a little confused about the README. Could you explain for me? Thanks a lot!

typeface-cn commented 1 year ago

Chinese 中文: 是不是不成对也可以?是不是用下面的步骤? 在win上。 0.先设置检查点保存位置 set OPENAI_LOGDIR=d:/DDIB/checkpointsA 设置Python引入路径 set PYTHONPATH=. 1.训练A组图片 python scripts/synthetic_train.py --num_res_blocks 3 --diffusion_steps 4000 --noise_schedule linear --lr 1e-4 --batch_size 20000 --task 0 --data_dir=D:/DDIB/datasets/A 2.训练B组图片 先设置检查点保存位置 set OPENAI_LOGDIR=d:/DDIB/checkpointsB 再训练,注意 --task python scripts/synthetic_train.py --num_res_blocks 3 --diffusion_steps 4000 --noise_schedule linear --lr 1e-4 --batch_size 20000 --task 1 --data_dir=D:/DDIB/datasets/B 3.转换图片生成 python scripts/synthetic_translation.py --num_res_blocks 3 --diffusion_steps 4000 --batch_size 30000 --source 0 --target 1

kaneyxx commented 1 year ago

Chinese 中文: 是不是不成对也可以?是不是用下面的步骤? 在win上。 0.先设置检查点保存位置 set OPENAI_LOGDIR=d:/DDIB/checkpointsA 设置Python引入路径 set PYTHONPATH=. 1.训练A组图片 python scripts/synthetic_train.py --num_res_blocks 3 --diffusion_steps 4000 --noise_schedule linear --lr 1e-4 --batch_size 20000 --task 0 --data_dir=D:/DDIB/datasets/A 2.训练B组图片 先设置检查点保存位置 set OPENAI_LOGDIR=d:/DDIB/checkpointsB 再训练,注意 --task python scripts/synthetic_train.py --num_res_blocks 3 --diffusion_steps 4000 --noise_schedule linear --lr 1e-4 --batch_size 20000 --task 1 --data_dir=D:/DDIB/datasets/B 3.转换图片生成 python scripts/synthetic_translation.py --num_res_blocks 3 --diffusion_steps 4000 --batch_size 30000 --source 0 --target 1

I would give it a shot, thanks! Still hope the authors can answer issues tho...

A2Amir commented 1 year ago

Hi, thanks for sharing the project code. Actually i tried to perform it for a cycle consistent translation on my own dataset which consist of two types of images, image A and images B. it was not successful. please help me in performing code in Jupyter Notebook.

Bayern4ever-dot commented 1 year ago

Chinese 中文: 是不是不成对也可以?是不是用下面的步骤? 在win上。 0.先设置检查点保存位置 set OPENAI_LOGDIR=d:/DDIB/checkpointsA 设置Python引入路径 set PYTHONPATH=. 1.训练A组图片 python scripts/synthetic_train.py --num_res_blocks 3 --diffusion_steps 4000 --noise_schedule linear --lr 1e-4 --batch_size 20000 --task 0 --data_dir=D:/DDIB/datasets/A 2.训练B组图片 先设置检查点保存位置 set OPENAI_LOGDIR=d:/DDIB/checkpointsB 再训练,注意 --task python scripts/synthetic_train.py --num_res_blocks 3 --diffusion_steps 4000 --noise_schedule linear --lr 1e-4 --batch_size 20000 --task 1 --data_dir=D:/DDIB/datasets/B 3.转换图片生成 python scripts/synthetic_translation.py --num_res_blocks 3 --diffusion_steps 4000 --batch_size 30000 --source 0 --target 1

Thanks for your sharing.I'm also interested in training on my own dataset. However, fisrt there is no such 'data_dir' arguments set in advance. Also, using above command can only train six kinds of datasets mentioned in this paper. Actually, I'm trying to make a difference......

xiayhh commented 1 year ago

Have you found a solution, I hope to hear from you.

Bayern4ever-dot commented 1 year ago

I have tried on my own datasets as follows: First,train two independent ddim models based on source and target datasets. Second,write and run my own translation code based on imagenet_translation.py

yanre-hyd commented 1 year ago

我在自己的数据集上进行了如下尝试: 首先,根据源数据集和目标数据集训练两个独立的ddim模型。 其次,基于imagenet_translation.py编写并运行我自己的翻译代码

have you implemented this method ? Can you tell me more about your method

LZX-ZNRA commented 10 months ago

Chinese 中文: 是不是不成对也可以?是不是用下面的步骤? 在win上。 0.先设置检查点保存位置 set OPENAI_LOGDIR=d:/DDIB/checkpointsA 设置Python引入路径 set PYTHONPATH=. 1.训练A组图片 python scripts/synthetic_train.py --num_res_blocks 3 --diffusion_steps 4000 --noise_schedule linear --lr 1e-4 --batch_size 20000 --task 0 --data_dir=D:/DDIB/datasets/A 2.训练B组图片 先设置检查点保存位置 set OPENAI_LOGDIR=d:/DDIB/checkpointsB 再训练,注意 --task python scripts/synthetic_train.py --num_res_blocks 3 --diffusion_steps 4000 --noise_schedule linear --lr 1e-4 --batch_size 20000 --task 1 --data_dir=D:/DDIB/datasets/B 3.转换图片生成 python scripts/synthetic_translation.py --num_res_blocks 3 --diffusion_steps 4000 --batch_size 30000 --source 0 --target 1

非常遗憾,这个是不行的,因为您加入了未知参数 --dataroot,这个在合成数据集任务当中是不存在的参数,因此失败。

06Liz commented 3 days ago

How to run at my dataset? @ @

I have tried on my own datasets as follows: First,train two independent ddim models based on source and target datasets. Second,write and run my own translation code based on imagenet_translation.py

Can you share me with the details?

yanre-hyd commented 2 days ago

How to run at my dataset? @ @

I have tried on my own datasets as follows: First,train two independent ddim models based on source and target datasets. Second,write and run my own translation code based on imagenet_translation.py

Can you share me with the details?

I have not research in this field,I have forgot the method to realize ,I am so sorry