desplat icon indicating copy to clipboard operation
desplat copied to clipboard

Dynamic Rendering

Open EH-HU opened this issue 7 months ago • 1 comments

How can I render dynamics?

EH-HU avatar May 28 '25 00:05 EH-HU

By default, the evaluation dataset is the clean data. However, you can enable debug mode to render the dynamic part of the training (cluttered) dataset by using the --eval_train flag. Then before this line: https://github.com/AaltoML/desplat/blob/966b1f4ba68dc4e1fc900fc416e3f4244ee88902/desplat/desplat_model.py#L1381 you can insert the following:

if hasattr(self.dataparser_config, "eval_train") and self.dataparser_config.eval_train:
    if "img_dyn" in outputs:
        images_dict["img_dyn"] = outputs["img_dyn"]
        images_dict["alpha_2d"] = outputs["alpha_2d"].float()
            
    images_dict["rgb_static"] = outputs["rgb_static"]
    images_dict["accumulation"] = outputs["accumulation"].float()

johanna0626 avatar May 28 '25 20:05 johanna0626