@@ -51,26 +51,6 @@ get_epochs() {
5151 fi
5252}
5353
54- # ============================================================================
55- # Get codec parameters based on dataset name
56- # Args: $1 - dataset name
57- # Returns: Sets CODEC_MV_COMPENSATE, CODEC_STATIC_ABS_THRESH, CODEC_STATIC_REL_THRESH
58- # ============================================================================
59- get_codec_params () {
60- local dataset=" $1 "
61- if [[ " $dataset " == " diving48" || " $dataset " == " perception_test" ]]; then
62- # Parameters for diving48 and perception_test
63- CODEC_MV_COMPENSATE=" similarity"
64- CODEC_STATIC_ABS_THRESH=" 126"
65- CODEC_STATIC_REL_THRESH=" 0.38"
66- else
67- # Parameters for other datasets
68- CODEC_MV_COMPENSATE=" similarity"
69- CODEC_STATIC_ABS_THRESH=" 116"
70- CODEC_STATIC_REL_THRESH=" 0.55"
71- fi
72- }
73-
7454# ============================================================================
7555# Run attentive_probe_codec evaluation
7656# Required variables to set before calling:
@@ -81,16 +61,14 @@ get_codec_params() {
8161# - EMBEDDING_SIZE: embedding dimension (optional, default 768)
8262# - INPUT_SIZE: input size (optional, not passed if unset)
8363# - NUM_FRAMES: number of frames (optional, not passed if unset)
84- # - K_keep: number of top-K patches to keep (optional, default 2048)
8564# - DATASETS: dataset array (optional, uses DEFAULT_DATASETS if unset/empty)
86- # - REPORT_DIR_SUFFIX: report directory suffix (optional, e.g. "_64frames_codec ")
65+ # - REPORT_DIR_SUFFIX: report directory suffix (optional, e.g. "_16frames ")
8766# ============================================================================
8867run_attentive_probe_codec () {
8968 # Set default values
9069 MODEL_WEIGHT=" ${MODEL_WEIGHT:- NULL} "
9170 FRAMES_TOKEN_NUM=" ${FRAMES_TOKEN_NUM:- 196} "
9271 EMBEDDING_SIZE=" ${EMBEDDING_SIZE:- 768} "
93- K_keep=" ${K_keep:- 2048} "
9472 REPORT_DIR_SUFFIX=" ${REPORT_DIR_SUFFIX:- } "
9573
9674 # Use custom datasets or default datasets
@@ -99,18 +77,14 @@ run_attentive_probe_codec() {
9977 fi
10078
10179 # Build report directory
102- BASE_REPORT_DIR=" result_attentive_probe /${MODEL_FAMILY} /${MODEL_NAME}${REPORT_DIR_SUFFIX} "
80+ BASE_REPORT_DIR=" result_attentive_probe_codec /${MODEL_FAMILY} /${MODEL_NAME}${REPORT_DIR_SUFFIX} "
10381
10482 # Loop through each dataset for testing
10583 for DATASET in " ${DATASETS[@]} " ; do
10684 BATCH_SIZE=$( get_batch_size " $DATASET " )
10785 EPOCHS=$( get_epochs " $DATASET " )
108-
109- # Get codec-specific parameters for this dataset
110- get_codec_params " $DATASET "
11186
11287 echo " DATASET=$DATASET , BATCH_SIZE=$BATCH_SIZE "
113- echo " Codec params: mv_compensate=${CODEC_MV_COMPENSATE} , static_abs_thresh=${CODEC_STATIC_ABS_THRESH} , static_rel_thresh=${CODEC_STATIC_REL_THRESH} "
11488
11589 echo " ========================================================"
11690 echo " Start testing dataset: ${DATASET} "
@@ -132,6 +106,11 @@ run_attentive_probe_codec() {
132106 EXTRA_ARGS=" ${EXTRA_ARGS} --num_frames ${NUM_FRAMES} "
133107 fi
134108
109+ # Add --mv_use_inconsistency for all datasets except diving48
110+ if [[ " $DATASET " != " diving48" ]]; then
111+ EXTRA_ARGS=" ${EXTRA_ARGS} --mv_use_inconsistency"
112+ fi
113+
135114 torchrun --nproc_per_node 8 --master_port 15555 \
136115 attentive_probe_codec.py \
137116 --eval_freq 1 \
@@ -147,11 +126,6 @@ run_attentive_probe_codec() {
147126 --save_report " ${SAVE_DIR} " \
148127 --frames_token_num ${FRAMES_TOKEN_NUM} \
149128 --embedding_size ${EMBEDDING_SIZE} \
150- --K_keep ${K_keep} \
151- --mv_compensate ${CODEC_MV_COMPENSATE} \
152- --static_abs_thresh ${CODEC_STATIC_ABS_THRESH} \
153- --static_rel_thresh ${CODEC_STATIC_REL_THRESH} \
154- --static_fallback 1 \
155129 ${EXTRA_ARGS}
156130
157131 echo " Finished testing ${DATASET} "
0 commit comments