#!/bin/bash
set -e

export CUDA_VISIBLE_DEVICES=0,1,2,5,6

VQA_DIR=/path/to/VQA_v2
SUBSET_IMG_DIR=/path/to/VQA_v2/sample500_images
DEPTH_DIR=/path/to/VQA_v2/sample500_depth
OUT_DIR=./output/VQA_v2
mkdir -p "${OUT_DIR}"

PROJECT_ROOT=/path/to/experiments
cd "${PROJECT_ROOT}"

python ./eval/llava15_vqa.py \
  --image-folder "${SUBSET_IMG_DIR}" \
  --question-file "${VQA_DIR}/sample500_questions.json" \
  --gt-file "${VQA_DIR}/sample500_answers.json" \
  --answers-file "${OUT_DIR}/llava15_dscr_sample500.jsonl" \
  --max-new-tokens 8 \
  --format ow_format \
  --conv-mode vicuna_v1 \
  --use_dscr \
  --depth-folder "${DEPTH_DIR}" \
  --dscr-alpha 0.4 \
  --dscr-beta 0.6 \
  --dscr-sigma 0.2 \
  --dscr-start-layer 0 \
  --dscr-end-layer 30 \
  --dscr-lambda 0.1 \
  --dscr-self-keep 1.0 \
  --dscr-key-only

echo "[DONE] LLaVA1.5 DSCR VQA evaluation finished."
