bcmi / Object-Shadow-Generation-Dataset-DESOBAv2

[CVPR 2024] The dataset, code, and model for our paper "Shadow Generation for Composite Image Using Diffusion Model", CVPR, 2024.
Apache License 2.0
87 stars 8 forks source link

ckpt issue #9

Open yuhaoliu7456 opened 3 weeks ago

yuhaoliu7456 commented 3 weeks ago

Great work. I would like to know the difference between the DESOBAv2.ckpt and the other weights, e.g., mask_predictor and Net_best. I found that the state_dict of the DESOBAv2.ckpt already contains the keys of mask_predictor and scale_encoder. Another issue is that if I want to train this method from scratch, should I save just one DESOBAv2.ckpt or all weights? Sadly, I did not find the code to save mask_predictor and Net_best. Hope to hear from you soon.

Thanks

Narumi-Maria commented 3 weeks ago

Great work. I would like to know the difference between the DESOBAv2.ckpt and the other weights, e.g., mask_predictor and Net_best. I found that the state_dict of the DESOBAv2.ckpt already contains the keys of mask_predictor and scale_encoder. Another issue is that if I want to train this method from scratch, should I save just one DESOBAv2.ckpt or all weights? Sadly, I did not find the code to save mask_predictor and Net_best. Hope to hear from you soon.

Thanks

You can use a global search to see which modules these weights correspond to. PyTorch provides an easy way to save the corresponding structure using torch.save(model.state_dict(), 'XXX_weights.pth')