From 24ed2d23d6a53def5baec7f6f43ce4052244502e Mon Sep 17 00:00:00 2001 From: DenisKochetov <57500456+DenisKochetov@users.noreply.github.com> Date: Wed, 13 Sep 2023 21:08:26 +0300 Subject: [PATCH] bug fix: skip downloading videos for existing folders in database/raw (#21) --- scripts/run_preprocess.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/scripts/run_preprocess.py b/scripts/run_preprocess.py index 629be39..b06ba07 100644 --- a/scripts/run_preprocess.py +++ b/scripts/run_preprocess.py @@ -114,8 +114,11 @@ def run_extract_priors(seqname, outdir, obj_class_cam): print("using gpus: ", gpulist) os.makedirs("tmp", exist_ok=True) - # download the videos - download_seq(vidname) + # check if the directory with the video already exists + viddir_path = os.path.join("database", "raw", vidname) + if not os.path.exists(viddir_path): + # download the videos only if the directory does not exist + download_seq(vidname) # set up parallel extraction frame_args = []