#!/bin/bash
# Compare per_case_2d metrics between mono3d and yolov5s-300w-newdata models

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

MODEL1_PATH="$PROJECT_ROOT/evaluation_results/eval_results_common_match_comparison_CNCAP_roi1/mono3d/20260211_120939/evaluation_report.json"
MODEL2_PATH="$PROJECT_ROOT/evaluation_results/eval_results_common_match_comparison_CNCAP_roi1/yolov5s-300w-newdata/20260211_120939/evaluation_report.json"
OUTPUT_PATH="$PROJECT_ROOT/evaluation_results/eval_results_common_match_comparison_CNCAP_roi1/per_case_2d_comparison.json"

echo "Comparing per_case_2d metrics..."
echo "Model 1: mono3d"
echo "Model 2: yolov5s-300w-newdata"
echo ""

python "$SCRIPT_DIR/compare_per_case_2d.py" \
    --model1 "$MODEL1_PATH" \
    --model2 "$MODEL2_PATH" \
    --model1-name "mono3d" \
    --model2-name "yolov5s-300w-newdata" \
    --threshold 0.1 \
    --output "$OUTPUT_PATH" \
    --top-n 30

echo ""
echo "Done! Results saved to: $OUTPUT_PATH"
