From 33e49b29db08583ed82b41af650f17d3d8ea4739 Mon Sep 17 00:00:00 2001 From: Admin <ruida.zhang@163.com> Date: Sun, 16 Oct 2022 15:51:47 +0800 Subject: [PATCH] update readme --- README.md | 10 +++++++- core/gdrn_modeling/test_gdrn_depth_refine.sh | 26 ++++++++++++++++++++ 2 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 core/gdrn_modeling/test_gdrn_depth_refine.sh diff --git a/README.md b/README.md index 1e7687f..59dc84d 100644 --- a/README.md +++ b/README.md @@ -74,4 +74,12 @@ The difference between this repo and gdrn conference version mainly including: `./core/gdrn_modeling/test_gdrn.sh <config_path> <gpu_ids> <ckpt_path> (other args)` ## Pose Refinement -TODO: rudy \ No newline at end of file +We utilize depth information to further refine the estimated pose. +We provide two types of refinement: fast refinement and iterative refinement. + +For fast refinement, we compare the rendered object depth and the observed depth to refine translation. +Run + +`./core/gdrn_modeling/test_gdrn_depth_refine.sh <config_path> <gpu_ids> <ckpt_path> (other args)` + +For iterative refinement, please checkout to the pose_refine branch for details. diff --git a/core/gdrn_modeling/test_gdrn_depth_refine.sh b/core/gdrn_modeling/test_gdrn_depth_refine.sh new file mode 100644 index 0000000..e242c6b --- /dev/null +++ b/core/gdrn_modeling/test_gdrn_depth_refine.sh @@ -0,0 +1,26 @@ +#!/usr/bin/env bash +# test +set -x +this_dir=$(dirname "$0") +# commonly used opts: + +# MODEL.WEIGHTS: resume or pretrained, or test checkpoint +CFG=$1 +CUDA_VISIBLE_DEVICES=$2 +IFS=',' read -ra GPUS <<< "$CUDA_VISIBLE_DEVICES" +# GPUS=($(echo "$CUDA_VISIBLE_DEVICES" | tr ',' '\n')) +NGPU=${#GPUS[@]} # echo "${GPUS[0]}" +echo "use gpu ids: $CUDA_VISIBLE_DEVICES num gpus: $NGPU" +CKPT=$3 +if [ ! -f "$CKPT" ]; then + echo "$CKPT does not exist." + exit 1 +fi +NCCL_DEBUG=INFO +OMP_NUM_THREADS=1 +MKL_NUM_THREADS=1 +PYTHONPATH="$this_dir/../..":$PYTHONPATH \ +CUDA_VISIBLE_DEVICES=$2 python $this_dir/main_gdrn.py \ + --config-file $CFG --num-gpus $NGPU --eval-only \ + --opts MODEL.WEIGHTS=$CKPT INPUT.WITH_DEPTH=True TEST.USE_DEPTH_REFINE=True \ + ${@:4} -- GitLab