Gaze-LIPE / docs /MODEL_METRICS.md
thanhhuyvan's picture
Initial release of LIPE V2 GOLD
a10ba7f
|
Raw
History Blame Contribute Delete
2.69 kB

Model Complexity Analysis: LIPE V2 Gaze Estimation

This document provides a definitive technical breakdown of the architectural complexity for the LIPE V2 Student model across different configurations. These metrics have been verified using automated code analysis (src/utils/verify_complexity.py).

1. Comparative Complexity Matrix

Metric 8x8 Baseline 16x16 Baseline (Current) Gold Standard (16x16 + Fusion)
Input Resolution 8 x 8 px 16 x 16 px 16 x 16 px
Fusion Type Residual Addition (+) Residual Addition (+) Concatenation + MLP
Total Parameters 379,188 379,188 510,516
Total FLOPs 1.93 MFLOPs 20.99 MFLOPs 21.25 MFLOPs
Model Size (.pt) ~1.45 MB ~1.45 MB ~1.95 MB
Inference (CPU) ~0.8 ms ~1.1 ms ~1.2 ms
Max FPS ~1250 ~900 ~830

2. Parameter Derivation (Layer-by-Layer)

Module Layer Configuration Calculation Parameters
Appearance (CNN) Conv1 1 $\to$ 16, 3x3 (1 * 3 * 3 * 16) + 16 160
Conv2 16 $\to$ 32, 3x3 (16 * 3 * 3 * 32) + 32 4,640
Conv3 32 $\to$ 64, 3x3 (32 * 3 * 3 * 64) + 64 18,496
Geometric (MLP) Geo_MLP1 956 $\to$ 256 (956 * 256) + 256 244,992
LayerNorm 256 (256 * 2) 512
Geo_MLP2 256 $\to$ 256 (256 * 256) + 256 65,792
Fusion (Gold Only) Fusion_MLP 512 $\to$ 256 (512 * 256) + 256 131,328
Heads Pitch_Head (256, 64, 90) (25664+64) + (6490+90) 22,298
Yaw_Head (256, 64, 90) (25664+64) + (6490+90) 22,298
TOTAL 510,516

3. Key Architectural Observations

Adaptive Stability

The use of Adaptive Average Pooling ensures that the convolutional feature maps are flattened into a fixed 64-dimensional vector regardless of the input resolution (8x8 or 16x16). This design choice keeps the total parameter count constant when scaling resolution, preventing model "bloat."

Real-Time Efficiency

Even in the highest-fidelity configuration (Gold Standard), the model utilizes only ~17.7% of the targeted computation budget (120 MFLOPs). This leaves significant thermal and computational headroom for other background tasks on consumer-grade hardware.

Fusion Scalability

Upgrading to Concatenation Fusion increases the parameter count by ~34% but only increases the computational load (FLOPs) by < 1%. This makes it an extremely efficient method for improving model accuracy without sacrificing real-time performance.


Generated and Verified on: 2026-06-02