• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

galthran-wq / face-recognition-service / 22762295336

06 Mar 2026 11:52AM UTC coverage: 75.283% (-12.3%) from 87.563%
22762295336

push

github

web-flow
Optimize throughput: 3.6-5.4x speedup via selective models and batched inference (#3)

* Optimize face recognition throughput with model-selective pipelines and batched inference

Bypass InsightFace's app.get() which runs all 5 models per face regardless of endpoint.
Each endpoint now runs only the models it needs: detect() skips 4 models, embed() skips
landmarks and genderage, analyze() skips landmarks. Recognition is batched via get_feat()
across all faces within and across images. Batch endpoints use cross-image batching with
a single semaphore acquisition.

RTX 4090 results: detect 78ms→14.5ms (5.4x), embed 78ms→21.5ms (3.6x),
embed_batch(8) 616ms→157ms (3.9x). Embeddings verified identical (cosine sim 1.0).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Fix import sorting in test_face_provider.py

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Remove comments and docstrings from source files

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Fix mypy strict errors in provider and batch processing

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>

111 of 220 new or added lines in 3 files covered. (50.45%)

1 existing line in 1 file now uncovered.

399 of 530 relevant lines covered (75.28%)

0.75 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

85.83
/src/api/endpoints/faces.py


Source Not Available

STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc