#!/bin/bash

# 初始化路径
CONFIG_BASE_DIR="projects/ovdino/configs/24ep/eval/sp_lora_FT"
CHECKPOINT_ROOT="../wkdrs/aa_final_result/sp/pre"
EVAL_CONFIG="projects/ovdino/configs/24ep/eval/sp_lora_FT/ovdino_swin_tiny224_bert_base_eval_coco.py"
EVAL_SCRIPT="scripts/eval_sp_lora.sh"
DIR="../wkdrs/aa_final_result/ablation/sp_woasar"
# 数据集名称列表（与你的微调模型名一致）
DATASETS=("artaxor" "dior" "uodd")

for dataset in "${DATASETS[@]}"; do
    config_name="sp_lora_newm37_cos2_num10_ovdino_swin_tiny224_bert_base_ft_${dataset}_24ep"
    ckpt_path="$CHECKPOINT_ROOT/${config_name}/model_final.pth"
    
    echo "🔍 Evaluating $dataset on COCO..."
    echo "Using checkpoint: $ckpt_path"

    bash $EVAL_SCRIPT $EVAL_CONFIG $ckpt_path "$DIR/eval_sp_lora_on_coco_${dataset}"
done
