vt-vl-lab / 3d-photo-inpainting

[CVPR 2020] 3D Photography using Context-aware Layered Depth Inpainting
https://shihmengli.github.io/3D-Photo-Inpainting/
Other
6.9k stars 1.11k forks source link

[Question] Video output at arbitrary resolution? #87

Open turkeyphant opened 4 years ago

turkeyphant commented 4 years ago

Is there any way to configure the output to produce video files of arbitrary size? Or to match the input image?

LemonATsu commented 4 years ago

Changing longer_side_len in argument.xml should do the trick.

See https://github.com/vt-vl-lab/3d-photo-inpainting/blob/master/DOCUMENTATION.md for details.

DGriffin91 commented 4 years ago

You may also want to look at this: https://github.com/vt-vl-lab/3d-photo-inpainting/issues/40#issuecomment-639470366

Without it you may get soft results. I ended up doing it like this (main.py):

        image_width = image.shape[1]
        target_w = min(image_width, config["longer_side_len"])
        run_depth(
            [sample["ref_img_fi"]],
            config["src_folder"],
            config["depth_folder"],
            config["MiDaS_model_ckpt"],
            MonoDepthNet,
            MiDaS_utils,
            target_w=target_w,
        )