Skip to content

Commit b226727

Browse files
CopilotFeilong607
andcommitted
Add K_keep parameter to codec evaluation scripts
- Add K_keep=2048 to eval_ov_encoder_large_2kpatches_codec.sh - Add K_keep=4096 to eval_ov_encoder_large_4kpatches_codec.sh - Update common_codec.sh to accept and pass K_keep parameter - Fix filename issue with common_codec.sh (removed special character) Co-authored-by: FeilongTangmonash <152372878+FeilongTangmonash@users.noreply.github.com>
1 parent 067554c commit b226727

3 files changed

Lines changed: 7 additions & 0 deletions

File tree

eval_encoder/shells_eval_ap/common_codec.sh‎ renamed to eval_encoder/shells_eval_ap/common_codec.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ get_codec_params() {
8181
# - EMBEDDING_SIZE: embedding dimension (optional, default 768)
8282
# - INPUT_SIZE: input size (optional, not passed if unset)
8383
# - NUM_FRAMES: number of frames (optional, not passed if unset)
84+
# - K_keep: number of top-K patches to keep (optional, default 2048)
8485
# - DATASETS: dataset array (optional, uses DEFAULT_DATASETS if unset/empty)
8586
# - REPORT_DIR_SUFFIX: report directory suffix (optional, e.g. "_64frames_codec")
8687
# ============================================================================
@@ -89,6 +90,7 @@ run_attentive_probe_codec() {
8990
MODEL_WEIGHT="${MODEL_WEIGHT:-NULL}"
9091
FRAMES_TOKEN_NUM="${FRAMES_TOKEN_NUM:-196}"
9192
EMBEDDING_SIZE="${EMBEDDING_SIZE:-768}"
93+
K_keep="${K_keep:-2048}"
9294
REPORT_DIR_SUFFIX="${REPORT_DIR_SUFFIX:-}"
9395

9496
# Use custom datasets or default datasets
@@ -129,6 +131,9 @@ run_attentive_probe_codec() {
129131
if [[ -n "${NUM_FRAMES}" ]]; then
130132
EXTRA_ARGS="${EXTRA_ARGS} --num_frames ${NUM_FRAMES}"
131133
fi
134+
if [[ -n "${K_keep}" ]]; then
135+
EXTRA_ARGS="${EXTRA_ARGS} --K_keep ${K_keep}"
136+
fi
132137

133138
torchrun --nproc_per_node 8 --master_port 15555 \
134139
attentive_probe_codec.py \

eval_encoder/shells_eval_ap/eval_ov_encoder_large_2kpatches_codec.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ MODEL_WEIGHT=$1
1212
FRAMES_TOKEN_NUM=256
1313
EMBEDDING_SIZE=1024
1414
NUM_FRAMES=64
15+
K_keep=2048
1516
REPORT_DIR_SUFFIX="_8frames_codec"
1617

1718
DEFAULT_DATASETS=(

eval_encoder/shells_eval_ap/eval_ov_encoder_large_4kpatches_codec.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ MODEL_WEIGHT=$1
1212
FRAMES_TOKEN_NUM=256
1313
EMBEDDING_SIZE=1024
1414
NUM_FRAMES=64
15+
K_keep=4096
1516
REPORT_DIR_SUFFIX="_64frames_codec"
1617

1718
DEFAULT_DATASETS=(

0 commit comments

Comments
 (0)