TIM2015YXH / HaveFun

Apache License 2.0
32 stars 2 forks source link

[issue] run Training command on FS-DART dataset error #2

Open xdobetter opened 4 months ago

xdobetter commented 4 months ago

Thanks for your Great Work!

I encountered a problem when I ran the Training command on the FS-DART dataset.

The run sh command is as follows:

bash scripts/dart_experiments/train_one_exp.sh 3 2 0.05

The problem is as follows:

main.py 439 <module>                                                                                                                                                                                               
trainer = Trainer(' '.join(sys.argv), 'df', opt, model, guidance, device=device, workspace=opt.workspace, optimizer=optimizer, ema_decay=0.95, fp16=opt.fp16, lr_scheduler=scheduler, use_checkpoint=opt.ckpt, sche
duler_update_every_step=True)                                                                                                                                                                                      

utils.py 329 __init__                                                                                                                                                                                              
self.prepare_embeddings()                                                                                                                                                                                          

_contextlib.py 115 decorate_context                                                                                                                                                                                
return func(*args, **kwargs)                                                                                                                                                                                       

utils.py 514 prepare_embeddings                                                                                                                                                                                    
mano_param = torch.load(mano_param_path)                                                                                                                                                                           

serialization.py 986 load                                                                                                                                                                                          
with _open_file_like(f, 'rb') as opened_file:                                                                                                                                                                      

serialization.py 435 _open_file_like                                                                                                                                                                               
return _open_file(name_or_buffer, mode)

serialization.py 416 __init__
super().__init__(open(name, mode))

FileNotFoundError:
2
No such file or directory
data/FS-DART/training/003/mano_param_flip/2.pth

I don't find any file of data/FS-DART/training/003/mano_param_flip/2.pth from the README.md. I find the relative code of the problem in HaveFun/nerf/utils.py.

                if self.opt.handy_path or self.opt.mano_path:   
                    if '_rgba.png' in self.opt.images[0]:
                        mano_param_paths = [image.replace('_rgba.png', '_mano_param.pth') for image in self.opt.images]
                    else:
                        mano_param_paths = [image.replace('basecolor', 'mano_param_flip') for image in self.opt.images]
                        mano_param_paths = [image.replace('.png', '.pth') for image in mano_param_paths]
                    for mano_param_path in mano_param_paths:
                        mano_param = torch.load(mano_param_path)
                        mano_param = torch.cat((mano_param[0], mano_param[1]), dim=1)
                        # print(mano_param)
                        mano_params.append(mano_param)
                    self.mano_param = torch.stack(mano_params).to(torch.float32).to(self.device)

I have a similar problem when running the FS-DART dataset. I cannot find the normal, depth of the image.

In addition, I find the data preparation does not match well. When I try configuring it as README.md, the actual running path does not match that in the README.md.

Could you provide a more suitable data preparation process?

If you could give me some help, I'd be very grateful.