File size: 2,591 Bytes
cfc7a54 | 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 53 54 55 56 57 58 59 60 61 62 63 64 65 66 | #!/usr/bin/env bash
# v23 training β Fix Track 4 concept grounding failures from v22.
#
# v22 eval results (KS=0.1527, Pearson=0.4433) β Track 2 PASS.
# v22 Track 4 failures:
#
# blur β continuity XX+0.261 (should be negative)
# jpeg β continuity XX+0.184 (should be negative)
# occlusion β minutiae_reliability XX+0.067 (should be negative)
# dry_skin β contrast_uniformity XX+0.504 (should be negative)
#
# Root cause: --concept-deg-gamma 0.5 is too weak.
# Gaussian blur naturally SMOOTHS ridges β model's continuity feature increases
# with blur. L_deg with gamma=0.5 cannot overcome this natural correlation.
# contrast_uniformity is only targeted by dry_skin once β single weak signal.
# minutiae_reliability for occlusion similarly has a weak signal.
#
# v23 fix: --concept-deg-gamma 2.0 (vs v22's 0.5 β 4Γ stronger concept supervision)
# All other settings are identical to v22.
#
# Note: orientation_coherence saturation (mean=0.952, always near 1.0) is NOT
# fixed in v23. It requires adding concept[0] to dry_skin and wet_press targets
# in DEGRADATION_CONCEPT_MAP (T39 fix, applied to src/losses/degradation_ranking.py).
# v24 will include this fix.
set -euo pipefail
REPO_ROOT="$(cd "$(dirname "$0")/../.." && pwd)"
export PATH="/home/aiserver/miniconda3/bin:$PATH"
VERSION="v23"
SAVE_DIR="${REPO_ROOT}/sifq/checkpoints/${VERSION}"
LOG_FILE="${REPO_ROOT}/sifq/logs/train_${VERSION}.log"
EVAL_SCRIPT="${REPO_ROOT}/sifq/scripts/run_eval_${VERSION}.sh"
mkdir -p "${REPO_ROOT}/sifq/logs"
python "${REPO_ROOT}/sifq/scripts/train_sifq.py" \
--root-302a "${REPO_ROOT}/dataset/302a/images/challengers" \
--root-302b "${REPO_ROOT}/dataset/302b/images/baseline" \
--root-302d "${REPO_ROOT}/dataset/nist_302d/images/auxiliary" \
--root-fvc2002 "${REPO_ROOT}/dataset/FVC_Dataset/FVC2002" \
--root-fvc2004 "${REPO_ROOT}/dataset/FVC_Dataset/FVC2004" \
--root-polyu "${REPO_ROOT}/dataset/PolyU" \
--exclude-sensor "R_1000_slap,R_500_slap,S_500_slap" \
--mdgt-checkpoint "${REPO_ROOT}/pad/TRAM-downstream/checkpoint/checkpoints_dinov2_tram/best_eer.pt" \
--epochs 60 \
--batch-size 96 \
--image-size 224 \
--lr 1e-4 \
--spread-mode uniform \
--spread-weight 3.0 \
--concept-deg-gamma 2.0 \
--sd302-concept-weight 0.0 \
--deg-every-n-steps 2 \
--no-mat-stats \
--proto-max-batches 0 \
--k-cross 0 \
--max-train-samples -1 \
--num-workers 8 \
--gpus 0 \
--save-dir "${SAVE_DIR}"
echo "[auto-eval] Training done. Starting eval ${VERSION}..."
bash "${EVAL_SCRIPT}" >> "${LOG_FILE}" 2>&1
|