File size: 1,079 Bytes
c335050
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/bin/bash
# Run the official arXiv:2506.05284 TSDF renderer on one reconstructed clip.
# INPUT_NPZ must contain: images, depths, intrinsic, cam_c2w.
set -euo pipefail

SPMEM_ROOT="${SPMEM_ROOT:?Set SPMEM_ROOT to a checkout of https://github.com/spmem/spmem}"
INPUT_NPZ="${INPUT_NPZ:?Set INPUT_NPZ to the reconstructed clip .npz}"
CLIP_NAME="${CLIP_NAME:?Set CLIP_NAME to the output sample name}"
GEOMETRY_OUTPUT_ROOT="${GEOMETRY_OUTPUT_ROOT:?Set GEOMETRY_OUTPUT_ROOT}"

RUN_DATA="${SPMEM_ROOT}/tsdf/run_data.py"
if [ ! -f "${RUN_DATA}" ]; then
  echo "Missing official TSDF entrypoint: ${RUN_DATA}" >&2
  exit 2
fi
if [ ! -f "${INPUT_NPZ}" ]; then
  echo "Missing reconstructed clip: ${INPUT_NPZ}" >&2
  exit 2
fi

python "${RUN_DATA}" \
  --input_dir "${INPUT_NPZ}" \
  --name "${CLIP_NAME}" \
  --save_dir "${GEOMETRY_OUTPUT_ROOT}" \
  --fast_mode

OUTPUT_VIDEO="${GEOMETRY_OUTPUT_ROOT}/${CLIP_NAME}/Vid_masktarget.mp4"
if [ ! -f "${OUTPUT_VIDEO}" ]; then
  echo "TSDF preprocessing completed without expected output: ${OUTPUT_VIDEO}" >&2
  exit 3
fi
echo "${OUTPUT_VIDEO}"