| # v25 training — T40 fix: address 3 remaining Track 4 failures from v24. | |
| # | |
| # Changes from v24: | |
| # 1. DEGRADATION_CONCEPT_MAP (T40 in src/losses/degradation_ranking.py): | |
| # blur: [1, 2] → [1, 2, 0] (+orient_coh: blur smears orientation fields) | |
| # noise: [3] → [3, 4] (+contrast_u: noise disrupts local contrast) | |
| # jpeg: [2, 1] → [2, 1, 4] (+contrast_u: JPEG blocking creates contrast bands) | |
| # dry_skin/wet_press/occlusion: unchanged from T39 | |
| # | |
| # 2. --concept-deg-gamma 1.5 (down from 2.0) | |
| # gamma=2.0 caused noise→noise_lv REGRESSION (+0.365 in v24). | |
| # gamma=1.5 keeps enough signal for blur/jpeg (needed >0.5) while | |
| # reducing saturation pressure that triggered noise_lv inversion. | |
| # | |
| # Expected improvements: | |
| # noise → noise_lv: +0.365 → negative (gamma reduced + noise now 2-concept) | |
| # dry_skin → contrast_u: +0.051 → negative (3 degradations now target contrast_u) | |
| # dry_skin → orient_coh: +0.008 → negative (blur gives orient_coh strong signal) | |
| set -euo pipefail | |
| REPO_ROOT="$(cd "$(dirname "$0")/../.." && pwd)" | |
| export PATH="/home/aiserver/miniconda3/bin:$PATH" | |
| VERSION="v25" | |
| 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 1.5 \ | |
| --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 | |