#!/bin/bash

# Example usage of compare_temporal_stability.py
# Compare temporal stability between two models


# 019b18ef-ca2b-7e97-8ca5-d4b1d7eefdbb
# 4:9 343:399
# 179:200 343:434

# python eval_tools/temporal_analysis/compare_temporal_stability.py \
#     --input1 /deeplearning_team/ydong/dongying/projects/yolov5-3d/runs/val_viz_300w/2026-01-07_14-21-06_roi0/tracking.json \
#     --input2 /deeplearning_team/ydong/dongying/projects/monocular_3d_object_detection/yolov5_mono2d3d_augment_roi_for4face_double_roi_json_rickshaw_g1m3/output/2026-01-07_14-21-06_roi0/tracking.json \
#     --track-mapping 20:9 488:399 \
#     --class-id 3 \
#     --model1-name "yolov5s-30w" \
#     --model2-name "mono3d" \
#     --output ./comparison_plots_300w/019b18ef-ca2b-7e97-8ca5-d4b1d7eefdbb_roi0/comparison_report.json \
#     --output-dir ./comparison_plots_300w/019b18ef-ca2b-7e97-8ca5-d4b1d7eefdbb_roi0


# Set PYTHONPATH to project root for module imports
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
PROJECT_ROOT="$(cd "${SCRIPT_DIR}/../.." && pwd)"
export PYTHONPATH="${PROJECT_ROOT}:${PYTHONPATH}"
python eval_tools/temporal_analysis/compare_temporal_stability.py \
    --input1 /deeplearning_team/ydong/dongying/projects/yolov5-3d/runs/val_viz/2026-01-07_14-21-06_roi0/tracking.json \
    --input2 /deeplearning_team/ydong/dongying/projects/monocular_3d_object_detection/yolov5_mono2d3d_augment_roi_for4face_double_roi_json_rickshaw_g1m3/output/2026-01-07_14-21-06_roi0/tracking.json \
    --track-mapping 1:2 8:9 \
    --class-id 0 \
    --model1-name "yolov5s-30w" \
    --model2-name "mono3d" \
    --output ./comparison_plots_30w/2026-01-07_14-21-06_roi0/comparison_report.json \
    --output-dir ./comparison_plots_30w/2026-01-07_14-21-06_roi0

# python eval_tools/temporal_analysis/compare_temporal_stability.py \
#     --input1 /deeplearning_team/ydong/dongying/projects/yolov5-3d/runs/val_viz/20251210222153_roi0/tracking.json \
#     --input2 /deeplearning_team/ydong/dongying/projects/monocular_3d_object_detection/yolov5_mono2d3d_augment_roi_for4face_double_roi_json_rickshaw_g1m3/output/20251210222153_roi0/tracking.json \
#     --track-mapping 1:12 44:53 104:150 \
#     --class-id 0 \
#     --model1-name "yolov5s-30w" \
#     --model2-name "mono3d" \
#     --output ./comparison_plots_30w/20251210222153_roi0/comparison_report.json \
#     --output-dir ./comparison_plots_30w/20251210222153_roi0
