#!/usr/bin/env bash

set -euo pipefail

DEFAULT_DEV_PYTHON="/deeplearning_team/ydong/dongying/miniconda/envs/dev/bin/python"
PYTHON_BIN="${PYTHON_BIN:-}"
if [[ -z "${PYTHON_BIN}" ]]; then
    if [[ -x "${DEFAULT_DEV_PYTHON}" ]]; then
        PYTHON_BIN="${DEFAULT_DEV_PYTHON}"
    else
        PYTHON_BIN="python3"
    fi
fi

CASE_DIR="/data1/dongying/Mono3d/G1Q3/dataset_for_evaluation/OP_KPI_SCENE/019b1a9c-6a6a-7523-b69c-748bdbd74d33"
INPUT_JSON="${CASE_DIR}/annotations/G1M3_2232_20251212195850_019b1a9c-6a6a-7523-b69c-748bdbd74d33_000001_49704_1765542681704437000.json"
OUTPUT_JSON="${CASE_DIR}/annotations_converted/G1M3_2232_20251212195850_019b1a9c-6a6a-7523-b69c-748bdbd74d33_000001_49704_1765542681704437000_converted.json"
CALIB_DIR="${CASE_DIR}/calib"

"${PYTHON_BIN}" tools/convert_gt_to_label/convert_json_to_json.py \
    "${INPUT_JSON}" \
    "${OUTPUT_JSON}" \
    --calib-path "${CALIB_DIR}"
