File size: 1,310 Bytes
b33e5eb
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
#!/usr/bin/env bash
# Full SIFQ training — 50 epochs, all losses active from epoch 0.
#
# Fixed stage schedule (stage_scheduler.py v2):
#   epochs  0– 4  : warm-up   (alpha=0.2, beta=0.1, gamma=1.0)
#   epochs  5–19  : balanced  (alpha=0.5, beta=0.3, gamma=0.5)
#   epochs 20–39  : +sensor   (alpha=0.5, beta=0.5, gamma=0.3)
#   epochs 40–49  : finetune  (alpha=0.3, beta=0.7, gamma=0.2)
#
# Usage:
#   bash scripts/run_train.sh              # defaults
#   bash scripts/run_train.sh --epochs 20  # partial run
set -euo pipefail

SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
ROOT="$(cd "$SCRIPT_DIR/.." && pwd)"
VENV="$ROOT/../.venv"

[[ -f "$VENV/bin/activate" ]] && source "$VENV/bin/activate"

python "$SCRIPT_DIR/train_sifq.py" \
  --root-302a  /home/aiserver/works/fingerprint/dataset/302a/images/challengers \
  --root-302b  /home/aiserver/works/fingerprint/dataset/302b/images/baseline \
  --root-302d  /home/aiserver/works/fingerprint/dataset/nist_302d/images/auxiliary \
  --mdgt-checkpoint /home/aiserver/works/fingerprint/pad/TRAM-downstream/checkpoint/checkpoints_dinov2_tram/best_eer.pt \
  --epochs 50 \
  --batch-size 64 \
  --image-size 224 \
  --lr 1e-4 \
  --max-train-samples -1 \
  --num-workers 4 \
  --gpus "0,1" \
  --save-dir "$ROOT/checkpoints_full_v2" \
  "$@"