SuLvXiangXin / zipnerf-pytorch

Unofficial implementation of ZipNeRF
Apache License 2.0
783 stars 85 forks source link

Path separator string fix in create_videos() in render.py #63

Closed KotaYonezawa closed 1 year ago

KotaYonezawa commented 1 year ago

Thanks a lot for great repo! I found a tiny issue in render.py https://github.com/SuLvXiangXin/zipnerf-pytorch/blob/main/render.py

def create_videos(config, base_dir, out_dir, out_name, num_frames):
    """Creates videos out of the images saved to disk."""
    names = [n for n in config.exp_path.split('/') if n]

On Windows, above code caused error. Following code will be better, I felt. (using os.sep)

def create_videos(config, base_dir, out_dir, out_name, num_frames):
    """Creates videos out of the images saved to disk."""
    names = [n for n in config.exp_path.split(os.sep) if n]
SuLvXiangXin commented 1 year ago

Thanks for advice!