-
Notifications
You must be signed in to change notification settings - Fork 25
/
eval.sh
52 lines (44 loc) · 1.92 KB
/
eval.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#!/bin/bash
DIR="ckpt/timechat"
MODEL_DIR=${DIR}/timechat_7b.pth
TASK='dvc'
ANNO_DIR='data/TimeIT/data/dense_video_captioning/youcook2'
VIDEO_DIR='data/YouCook2-BB/YouCook2_asr_denseCap/youcook2_6fps_224/'
DATASET='youcook'
SPLIT='val'
PROMPT_FILE="prompts/${TASK}_description_zeroshot.txt"
GT_FILE="${ANNO_DIR}/${SPLIT}.caption_coco_format.json"
ASR_DIR='data/YouCook2-BB/YouCook2_asr_denseCap/whisper_outputs_with_time/small.en.cleaned/'
#TASK='dvc'
#ANNO_DIR='data/TimeIT/data/dense_video_captioning/anet'
#VIDEO_DIR='data/Activitynet_Captions/anet_6fps_224/'
#DATASET='activitynet'
#SPLIT='test'
#PROMPT_FILE="prompts/${TASK}_description.txt"
#GT_FILE="${ANNO_DIR}/${SPLIT}.caption_coco_format.json"
#TASK='tvg'
#ANNO_DIR='data/TimeIT/data/temporal_video_grounding/charades/charades_annotation'
#VIDEO_DIR='data/Charades/videos/'
#DATASET='charades'
#SPLIT='test'
#PROMPT_FILE="prompts/${TASK}_description_zeroshot.txt"
#GT_FILE="${ANNO_DIR}/${SPLIT}.caption_coco_format.json"
#ASR_DIR='data/Charades/whisper_outputs_with_time/tiny.en.cleaned/'
#TASK='vhd'
#ANNO_DIR='data/TimeIT/data/video_highlight_detection/qvhighlights/annotations_raw'
#VIDEO_DIR='data/QVhighlights/videos/val/'
#DATASET='qvhighlights'
#SPLIT='val'
#PROMPT_FILE="prompts/${TASK}_description.txt"
#GT_FILE="${ANNO_DIR}/highlight_${SPLIT}_release.jsonl"
#ASR_DIR='data/QVhighlights/whisper_outputs_with_time/tiny.en.cleaned/val/'
NUM_FRAME=96
OUTPUT_DIR=${DIR}/${TASK}
python evaluate.py --anno_path ${ANNO_DIR} --video_path ${VIDEO_DIR} \
--task ${TASK} --dataset ${DATASET} --output_dir ${OUTPUT_DIR} --split ${SPLIT} --num_frames ${NUM_FRAME} --batch_size 16 \
--prompt_file ${PROMPT_FILE} --timechat_model_path ${MODEL_DIR} \
#--asr --asr_path ${ASR_DIR}
#--debug
cd metrics/${TASK}
python eval_${TASK}.py --pred_file "${OUTPUT_DIR}/fmt_${DATASET}_${SPLIT}_f${NUM_FRAME}_result.json" --gt_file ${GT_FILE} | tee "${OUTPUT_DIR}/fmt_${DATASET}_${SPLIT}_f${NUM_FRAME}_result.txt"
cd ../..