Feature Request: Integration of Quality-Aware Loss Functions (AdaFace, MagFace, QMagFace) for Robust Surveillance FR

#1
by sayyidai - opened

Is your feature request related to a problem? Please describe.
I have been experimenting with EdgeFace checkpoints for real-world surveillance applications on embedded edge devices (specifically Rockchip NPUs). While the current implementation using standard margin-based losses (like ArcFace) yields excellent results on high-quality benchmarks (LFW, CFP-FP), I observe performance drops when dealing with Low-Resolution (LR) and Motion-Blurred images typical of CCTV feeds.

Fixed-margin losses tend to overfit to noise in unconstrained/low-quality samples, which limits the potential of the efficient EdgeFace backbone in challenging surveillance scenarios (e.g., QMUL-SurvFace, TinyFace).

Describe the solution you'd like
I propose expanding the training pipeline to support Quality-Aware Loss Functions. Specifically, I would appreciate the integration of:

  1. AdaFace (CVPR 2022): To apply adaptive margins based on image quality (feature norm). This is crucial for preventing the model from overfitting to low-quality surveillance frames.
  2. MagFace (CVPR 2021): To learn a universal representation where the magnitude of the embedding corresponds to face quality. This would allow for intrinsic quality filtering on edge devices without a separate QA model.
  3. QMagFace (WACV 2023): Implementing the quality-aware comparison score for the evaluation/inference stage.

Describe alternatives you've considered
I have considered training standard MobileFaceNet with these losses externally, but the EdgeFace architecture (Hybrid CNN-ViT) has shown superior feature extraction capabilities for edge devices. Combining EdgeFace's architecture with AdaFace/MagFace loss seems like the optimal SOTA solution for edge surveillance.

Additional context
This feature would make EdgeFace the go-to repository for "In-the-Wild" and Surveillance Face Recognition on resource-constrained hardware (Jetson/Rockchip), bridging the gap between academic accuracy and real-world deployment challenges.

Sign up or log in to comment