#!/bin/bash

# 初始化路径
CONFIG_BASE_DIR="projects/ovdino/configs/24ep/eval/sp_lora_FT"
CHECKPOINT_ROOT="../init"
EVAL_CONFIG="projects/ovdino/configs/24ep/eval/sp_lora_FT/ovdino_swin_tiny224_bert_base_eval_coco_router.py"
EVAL_SCRIPT="scripts/eval_sp_lora_router.sh"
ROUTER_MODE="asar"
# ROUTER_MODE="none"
router_threshold=(0.039)
DATASETS=("artaxor" "dior" "uodd")

for dataset in "${DATASETS[@]}"; do
    for threshold in "${router_threshold[@]}"; do
        DIR="../wkdrs/aa_final_result/ablation/sp_w${ROUTER_MODE}/threshold_${threshold}"
        ckpt_path="$CHECKPOINT_ROOT/model_awfdino_${dataset}.pth"

        echo "🔍 Evaluating $dataset with threshold $threshold on COCO..."
        echo "Using checkpoint: $ckpt_path"

        bash "$EVAL_SCRIPT" $EVAL_CONFIG "$threshold" "${ROUTER_MODE}" "${dataset}" "$ckpt_path" "$DIR/time_eval_sp_lora_on_coco_${dataset}_w${ROUTER_MODE}_thr${threshold}"
    done
done
