#!/bin/bash
# 简洁启动 analyze_heading_debug.py 的脚本
# 用法示例：
#   bash run_analyze_heading_debug.sh /path/to/tracking.json
#   bash run_analyze_heading_debug.sh /path/to/case_dir combined_tracking.json

# /data1/dongying/Mono3d/G1M3/pdcl_batch_infer/cases_aeb_v2/CPFA/25_6.5_20/019d2d81-68fc-7b69-45fe-930341ffd56e/merge.json
# /data1/dongying/Mono3d/G1M3/pdcl_batch_infer/cases_aeb_v2/CBNA/50_15_50/019d2d86-4a7b-72da-6e09-1e7ab3494d0b/merge.json

INPUT_PATH="$1"
JSON_NAME="$2"

SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
PYTHON_SCRIPT="$SCRIPT_DIR/analyze_heading_debug.py"

if [ -z "$INPUT_PATH" ]; then
  echo "用法: bash run_analyze_heading_debug.sh <input_path> [json_name]"
  exit 1
fi

if [ -z "$JSON_NAME" ]; then
  python "$PYTHON_SCRIPT" --input "$INPUT_PATH" --class-ids 1 3 --large-dyaw 0.78 --large-delta 0.78
else
  python "$PYTHON_SCRIPT" --input "$INPUT_PATH" --json-name "$JSON_NAME" --class-ids 1 3 --large-dyaw 0.78 --large-delta 0.78
fi
