Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FileNotFoundError: [Errorno 2] No such a file or directory: ‘experiments/ddpm-RS-Unet_220819_161634 #5

Closed
wo0423 opened this issue Aug 19, 2022 · 5 comments
Labels
help wanted Extra attention is needed

Comments

@wo0423
Copy link

wo0423 commented Aug 19, 2022

Excuse me, by reading the readme file, I know that the model should be trained first, but when I run ddpm_ Train reported such an error
FileNotFoundError: [Errorno 2] No such a file or directory: ‘experiments/ddpm-RS-Unet_220819_161634
I don't know where I made a mistake, I would be grateful if you could reply

@wgcban
Copy link
Owner

wgcban commented Aug 19, 2022

Hi @wo0423
Yes, you can start with training the diffusion model first if you wish (however, this may take several days to train), or else you can use the pre-trained diffusion model provided (I strongly recommend you to use the pre-trained diffusion model first). Can you pls copy and paste the full error details here?

@wgcban wgcban added the help wanted Extra attention is needed label Aug 19, 2022
@wo0423
Copy link
Author

wo0423 commented Aug 19, 2022

firstly,thx for your reply.i set the resume_state in “path”: "E:/I190000_E97_opt.pth" in the cdd.json,but when i run the ddpm_cd file, a similar error occured
E:\anaconda\ana\python.exe E:/ddpm-cd-master/ddpm_cd.py
Traceback (most recent call last):
File "E:/ddpm-cd-master/ddpm_cd.py", line 28, in
opt = Logger.parse(args)
File "E:\ddpm-cd-master\core\logger.py", line 43, in parse
mkdirs(opt['path'][key])
File "E:\ddpm-cd-master\core\logger.py", line 11, in mkdirs
os.makedirs(paths, exist_ok=True)
File "E:\anaconda\ana\lib\os.py", line 211, in makedirs
makedirs(head, exist_ok=exist_ok)
File "E:\anaconda\ana\lib\os.py", line 221, in makedirs
mkdir(name, mode)
FileNotFoundError: [WinError 3] 系统找不到指定的路径。: 'experiments\ddpm-RS-CDHead-CDD_220819_194305'

@wgcban
Copy link
Owner

wgcban commented Aug 19, 2022

@wo0423 The code assumes you save your pre-trained diffusion model in the experiments folder, as you can see from the error msg.

  • So, pls create a folder named experiments inside ddpm-cd-master (or any other location you wish to save the results).
  • Then create ddpm-RS-Unet_220426_160536/checkpoint/ inside experiments and place both I190000_E97_opt.pth and I190000_E97_gen.pth in it.
  • In the config file you should mention only the first part of the pre-trained model (omit _opt.pth and/or _gen.pth, the code will automatically take care of it), i.e. experiments/ddpm-RS-Unet_220426_160536/checkpoint/I110000_E88.
  • The results will be saved in experiments.

I hope this will resolve your issue.
Also, I see that you run the code on the windows machine. In windows, we need to specify path using \ whereas in my code running on linux machine uses /. Pls change those also.

@wo0423
Copy link
Author

wo0423 commented Aug 19, 2022

i got it,you are so nice,thx very much

@wo0423 wo0423 closed this as completed Aug 19, 2022
@wgcban wgcban pinned this issue Aug 19, 2022
@udrs
Copy link

udrs commented Nov 30, 2023

you are so nice @wgcban

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants