#!/bin/bash
# 将三路跟踪结果（roi0.json / roi1.json / merge.json）合并为 combined_tracking.json
# 前提：已运行 track_objects.sh 生成上述三个 JSON 文件

SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
PROJECT_ROOT="$(cd "${SCRIPT_DIR}/../.." && pwd)"
export PYTHONPATH="${PROJECT_ROOT}:${PYTHONPATH}"

RESULTS_ROOT="/data1/dongying/Mono3d/G1M3/cases_regular"
MODEL_NAME="model_20260228"

# python "${PROJECT_ROOT}/tools/temporal_analysis/merge_tracking_results.py" \
#     --results-root "${RESULTS_ROOT}" \
#     --model-name "${MODEL_NAME}"

python "${PROJECT_ROOT}/tools/temporal_analysis/merge_tracking_results.py" \
    --roi0 /data1/dongying/Mono3d/G1M3/cases_regular/model_20260228_test/roi0.json \
    --roi1 /data1/dongying/Mono3d/G1M3/cases_regular/model_20260228_test/roi1.json \
    --merge /data1/dongying/Mono3d/G1M3/cases_regular/model_20260228_test/merge.json \
    --output-name combined_tracking.json \
    --output /data1/dongying/Mono3d/G1M3/cases_regular/model_20260228_test/combined_tracking.json
