File size: 622 Bytes
9264c1c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/usr/bin/env bash
set -euo pipefail
ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
: "${INPUT_DIR:?Set INPUT_DIR to a directory of input videos}"
: "${MASK_DIR:?Set MASK_DIR to a directory of same-named mask videos}"
GPU_1STEP="${GPU_1STEP:-0}"
GPU_2STEP="${GPU_2STEP:-1}"
GPU="$GPU_1STEP" OUTPUT_DIR="${OUTPUT_DIR_1STEP:-$ROOT/outputs/dmd_1step}" \
  bash "$ROOT/scripts/infer_1step.sh" > "$ROOT/infer_1step.log" 2>&1 &
pid1=$!
GPU="$GPU_2STEP" OUTPUT_DIR="${OUTPUT_DIR_2STEP:-$ROOT/outputs/dmd_2step}" \
  bash "$ROOT/scripts/infer_2step.sh" > "$ROOT/infer_2step.log" 2>&1 &
pid2=$!
wait "$pid1"
wait "$pid2"