Views
No views yet
┌─────────────────────────────────────────────────┐
│ PriviGazeTeacher │
│ │
│ Left Eye RGB ──→ ConvNeXtV2-Atto ──→ 256d │
│ Right Eye RGB ─→ ConvNeXtV2-Atto ──→ 256d │
│ ↓ (Fusion) │
│ Face Blurred ──→ ConvNeXtV2-Nano ──→ 256d │
│ (Grayscale) ↓ (Cross-Attention) │
│ ┌──────────┐ │
│ │ Fused │ │
│ │ Features │ │
│ │ 256d │ │
│ └────┬─────┘ │
│ ┌────┴─────┐ │
│ │ Pitch │ Yaw │ │
│ └─────────────┘ │
└─────────────────────────────────────────────────┘┌─────────────────────────────────────────────────┐
│ PriviGazeStudent │
│ ~80K params │
│ │
│ Face Grayscale ──→ Light Correction │
│ ↓ │
│ Stem (32ch, /4) │
│ ↓ │
│ Inception Block → DSConv (/2) → 64ch │
│ ↓ │
│ Inception Block → DSConv (/2) → 96ch │
│ ↓ │
│ Inception Block → DSConv (/2) → 128ch │
│ ↓ │
│ Inception Block → GAP → 160ch │
│ ↓ │
│ Feature Projection → 128d │
│ ↓ │
│ ┌────┴─────┐ │
│ │ Pitch │ Yaw │ │
│ └─────────────┘ │
└─────────────────────────────────────────────────┘L_total = L_task + α_angular·L_angular + α_contrast·L_contrast + α_mmd·L_mmd + α_logit·L_logit| Component | Weight | Description |
|---|---|---|
| L_task | 1.0 | L2CS-Net binned regression (CE + MSE) |
| L_angular | 1.0 | Direct L1 in degrees |
| L_contrast | 0.5 | InfoNCE contrastive feature matching |
| L_mmd | 0.1 | Maximum Mean Discrepancy distribution matching |
| L_logit | 0.5 | KL divergence on soft targets |
1# Install dependencies
2pip install -r requirements.txt
3
4# Train teacher first, then distill to student
5python train.py --mode both \
6 --batch-size 32 \
7 --epochs 100 \
8 --teacher-epochs 50 \
9 --save-dir ./checkpoints \
10 --push-to-hub \
11 --hub-model-id BcantCode/privi-gaze-distill1python train.py --mode pretrain_teacher \
2 --batch-size 32 \
3 --teacher-epochs 50 \
4 --save-dir ./checkpoints1python train.py --mode distill \
2 --teacher-path ./checkpoints/teacher_best.pt \
3 --epochs 100 \
4 --batch-size 32 \
5 --save-dir ./checkpoints| Model | Parameters | Input | Use |
|---|---|---|---|
| PriviGazeTeacher | ~19M | 2×RGB eyes + blurred face | Training only |
| PriviGazeStudent | ~80K | 1×grayscale face | On-device inference |
MPIIGazeDataset class in models/dataset.py.@software{privi_gaze_2026,
title={PriviGaze: Privileged Distillation for Accessible Gaze Estimation},
year={2026},
url={https://huggingface.co/BcantCode/privi-gaze-distill}
}