1 Star 0 Fork 0

yangyi0219/GS_ICP_SLAM

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
tum.sh 5.94 KB
一键复制 编辑 原始数据 按行查看 历史
Riboha 提交于 2024-04-09 21:19 . Saving results
OUTPUT_PATH="experiments/results"
DATASET_PATH="dataset/TUM"
str_pad() {
local pad_length="$1" pad_string="$2" pad_type="$3"
local pad length llength offset rlength
pad="$(eval "printf '%0.${#pad_string}s' '${pad_string}'{1..$pad_length}")"
pad="${pad:0:$pad_length}"
if [[ "$pad_type" == "left" ]]; then
while read line; do
line="${line:0:$pad_length}"
length="$(( pad_length - ${#line} ))"
echo -n "${pad:0:$length}$line"
done
elif [[ "$pad_type" == "both" ]]; then
while read line; do
line="${line:0:$pad_length}"
length="$(( pad_length - ${#line} ))"
llength="$(( length / 2 ))"
offset="$(( llength + ${#line} ))"
rlength="$(( llength + (length % 2) ))"
echo -n "${pad:0:$llength}$line${pad:$offset:$rlength}"
done
else
while read line; do
line="${line:0:$pad_length}"
length="$(( pad_length - ${#line} ))"
echo -n "$line${pad:${#line}:$length}"
done
fi
}
run_()
{
local dataset=$1
local config=$2
local result_txt=$3
local keyframe_th=$4
local knn_maxd=$5
local overlapped_th=$6
local max_correspondence_distance=$7
local trackable_opacity_th=$8
local overlapped_th2=$9
local downsample_rate=${10}
echo "run $dataset"
python -W ignore gs_icp_slam.py --dataset_path $DATASET_PATH/$dataset\
--config $config\
--output_path $OUTPUT_PATH\
--keyframe_th $keyframe_th\
--knn_maxd $knn_maxd\
--overlapped_th $overlapped_th\
--max_correspondence_distance $max_correspondence_distance\
--trackable_opacity_th $trackable_opacity_th\
--overlapped_th2 $overlapped_th2\
--downsample_rate $downsample_rate\
--save_results
wait
}
run_tum()
{
local result_txt=$1
local keyframe_th=$2
local knn_maxd=$3
local overlapped_th=$4
local max_correspondence_distance=$5
local trackable_opacity_th=$6
local overlapped_th2=$7
local downsample_rate=$8
run_ "rgbd_dataset_freiburg1_desk" "configs/TUM/rgbd_dataset_freiburg1_desk.txt" $result_txt $keyframe_th $knn_maxd $overlapped_th $max_correspondence_distance $trackable_opacity_th $overlapped_th2 $downsample_rate
run_ "rgbd_dataset_freiburg2_xyz" "configs/TUM/rgbd_dataset_freiburg2_xyz.txt" $result_txt $keyframe_th $knn_maxd $overlapped_th $max_correspondence_distance $trackable_opacity_th $overlapped_th2 $downsample_rate
run_ "rgbd_dataset_freiburg3_long_office_household" "configs/TUM/rgbd_dataset_freiburg3_long_office_household.txt" $result_txt $keyframe_th $knn_maxd $overlapped_th $max_correspondence_distance $trackable_opacity_th $overlapped_th2 $downsample_rate
}
run_replica()
{
local result_txt=$1
local keyframe_th=$2
local knn_maxd=$3
local overlapped_th=$4
local max_correspondence_distance=$5
local trackable_opacity_th=$6
local overlapped_th2=$7
local downsample_rate=$8
run_ "room0" "configs/Replica/caminfo.txt" $result_txt $keyframe_th $knn_maxd $overlapped_th $max_correspondence_distance $trackable_opacity_th $overlapped_th2 $downsample_rate
run_ "room1" "configs/Replica/caminfo.txt" $result_txt $keyframe_th $knn_maxd $overlapped_th $max_correspondence_distance $trackable_opacity_th $overlapped_th2 $downsample_rate
run_ "room2" "configs/Replica/caminfo.txt" $result_txt $keyframe_th $knn_maxd $overlapped_th $max_correspondence_distance $trackable_opacity_th $overlapped_th2 $downsample_rate
run_ "office0" "configs/Replica/caminfo.txt" $result_txt $keyframe_th $knn_maxd $overlapped_th $max_correspondence_distance $trackable_opacity_th $overlapped_th2 $downsample_rate
run_ "office1" "configs/Replica/caminfo.txt" $result_txt $keyframe_th $knn_maxd $overlapped_th $max_correspondence_distance $trackable_opacity_th $overlapped_th2 $downsample_rate
run_ "office2" "configs/Replica/caminfo.txt" $result_txt $keyframe_th $knn_maxd $overlapped_th $max_correspondence_distance $trackable_opacity_th $overlapped_th2 $downsample_rate
run_ "office3" "configs/Replica/caminfo.txt" $result_txt $keyframe_th $knn_maxd $overlapped_th $max_correspondence_distance $trackable_opacity_th $overlapped_th2 $downsample_rate
run_ "office4" "configs/Replica/caminfo.txt" $result_txt $keyframe_th $knn_maxd $overlapped_th $max_correspondence_distance $trackable_opacity_th $overlapped_th2 $downsample_rate
}
run_scannet()
{
local result_txt=$1
local keyframe_th=$2
local knn_maxd=$3
local overlapped_th=$4
local max_correspondence_distance=$5
local trackable_opacity_th=$6
local overlapped_th2=$7
local downsample_rate=$8
run_ "8b5caf3398" $result_txt $keyframe_th $knn_maxd $overlapped_th $max_correspondence_distance $trackable_opacity_th $overlapped_th2 $downsample_rate
run_ "b20a261fdf" $result_txt $keyframe_th $knn_maxd $overlapped_th $max_correspondence_distance $trackable_opacity_th $overlapped_th2 $downsample_rate
}
# txt_file="re_init_ablation/default_3DGS.txt"
txt_file="plane_regularization.txt"
str_pad 20 " " left <<< "FPS" > $txt_file
str_pad 15 " " left <<< "RMSE" >> $txt_file
str_pad 15 " " left <<< "train iter" >> $txt_file
str_pad 15 " " left <<< "kframes" >> $txt_file
str_pad 15 " " left <<< "gaussians_num" >> $txt_file
# str_pad 32 " " left <<< "Depth L1" >> $txt_file
str_pad 30 " " left <<< "PSNR" >> $txt_file
str_pad 15 " " left <<< "SSIM" >> $txt_file
str_pad 15 " " left <<< "LPIPS" >> $txt_file
echo "" >> $txt_file
overlapped_th=1e-3
max_correspondence_distance=0.03
knn_maxd=99999.0
trackable_opacity_th=0.09
overlapped_th2=1e-3
downsample_rate=5
keyframe_th=0.81
run_tum $txt_file $keyframe_th $knn_maxd $overlapped_th $max_correspondence_distance \
$trackable_opacity_th $overlapped_th2 $downsample_rate
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/yangyi0219/GS_ICP_SLAM.git
[email protected]:yangyi0219/GS_ICP_SLAM.git
yangyi0219
GS_ICP_SLAM
GS_ICP_SLAM
main

搜索帮助