File size: 4,004 Bytes
a10ba7f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
# SCIENTIFIC METHODOLOGY: LIPE V2 GAZE ESTIMATION

This document summarizes the core technical innovations of LIPE V2. It highlights the transition from a standard lightweight model to the **Gold Standard** configuration designed for high-precision, CPU-efficient gaze estimation.

---

## 1. Dual-State Asymmetric Architecture
The system employs a multi-frequency processing strategy to balance accuracy and power consumption:

*   **State A (Active Appearance - 10 FPS):** Full inference mode. It processes eye image patches through a CNN and concatenates the results with facial landmarks. This state defines the "fine" gaze vector.
*   **State B (Missing Appearance - 20 FPS):** Landmark-only mode. It completely bypasses the CNN and Image I/O, using only the **Geometric MLP** to predict gaze from 478 landmarks. This achieves extreme efficiency without losing tracking continuity.
*   **Asymmetric Blending:** A dynamic interpolation mechanism ($G_t = \alpha \cdot G_t^{geo} + (1-\alpha) \cdot G_{t-1}^{app}$) ensures a smooth 30 FPS output stream.

## 2. Hybrid Learning & Loss Functions
LIPE V2 is trained using a composite objective function to ensure deep convergence:

*   **Adaptive Wing Loss (AW Loss):** Unlike standard MSE, AW Loss spikes the gradient for errors below 1 degree. This forces the model to resolve fine details even when input patches are low-resolution (16x16).
*   **Knowledge Distillation (KD):** Uses **KL Divergence** to transfer the "spatial uncertainty" from a Teacher model (L2CS-Net / ResNet-50) to the Student.
*   **Dynamic Loss Weighting:** 
    $$\mathcal{L}_{total} = w_{aw}(t) \cdot \mathcal{L}_{AW} + w_{kd}(t) \cdot \mathcal{L}_{KD}$$
    Trọng số $w_{kd}$ cao ở giai đoạn đầu để Student "bắt chước" Teacher, sau đó $w_{aw}$ tăng dần để Student tự tối ưu hóa dựa trên nhãn thực tế (Ground Truth).

## 3. Advanced Feature Handling
*   **Adaptive Average Pooling:** Integrated into the CNN to make the feature extractor resolution-independent. This allows the model to scale from 8x8 to 16x16 pixels without changing the number of weights in the subsequent layers.
*   **Unified Affine Normalization:** Pre-processes every eye patch to be pose-invariant, removing the "noise" of head rotation before the pixels reach the network.

---

## 4. Evolution: Baseline vs. Gold Standard
Bảng so sánh dưới đây thể hiện sự thay đổi mang tính bước ngoặt từ bản thử nghiệm sang bản hoàn thiện:

| Kỹ thuật | **Baseline (Phase 3)** | **Gold Standard (Phase 5)** | Mục tiêu khoa học |
| :--- | :--- | :--- | :--- |
| **Input Resolution** | 16 x 16 px | 16 x 16 px | Giữ nguyên độ chi tiết ảnh. |
| **Fusion Mechanism** | **Residual Addition (`+`)** | **Concatenation + MLP** | Tăng khả năng học tương quan phi tuyến. |
| **Early Stopping** | Patience 15 - 25 | **Patience 50** | Tìm kiếm điểm hội tụ sâu hơn. |
| **Batch Size** | 64 - 256 | **32** | Tăng độ nhạy gradient cho AW Loss. |
| **LR Scheduler** | Cosine Annealing | **ReduceLROnPlateau** | Tự động tinh chỉnh tốc độ khi về đích. |
| **Độ chính xác (MAE)**| ~4.98° | **Dự kiến < 4.2°** | **Vượt ngưỡng yêu cầu đồ án.** |

---

## 5. Temporal Filtering
*   **One Euro Filter ($1€ Filter$):** Một bộ lọc thông thấp thích ứng giúp triệt tiêu hiện tượng rung lắc (jitter) của hướng nhìn. Nó cho phép hệ thống phản ứng nhanh với các cú liếc mắt tốc độ cao (Saccades) nhưng vẫn cực kỳ ổn định khi người dùng nhìn cố định vào một điểm.

## 6. Resource Efficiency (CPU Optimization)
*   **Computation:** **~21.25 MFLOPs** (Gold Standard).
*   **Latency:** **~1.2 ms** per frame.
*   **Efficiency:** Chỉ sử dụng **17%** giới hạn tài nguyên cho phép, đảm bảo máy không bị nóng khi chạy thời gian thực.

---
*Cập nhật lần cuối: 02/06/2026*