FLIQ
FLIQ is a lightweight face recognition acceleration layer for Python that combines detection, embedding, tracking, caching, vector search, and streaming helpers in a single package. It is designed to run with only NumPy installed, while optional extras unlock FastAPI, OpenCV, FAISS, and ONNX-backed acceleration paths.
What It Does
FLIQ provides a practical face recognition engine for image, video, and streaming workloads. The package centers on the Fliq engine and exposes:
- face registration and recognition for still images
- video and iterable-based stream processing
- tracking-aware recognition with classroom/session-style caches
- motion detection and adaptive frame scheduling support
- FAISS-backed similarity search with a NumPy fallback path
- optional FastAPI routes for service integration
- benchmark helpers for measuring throughput, latency, memory, and stream behavior
The package exports Fliq, FliqConfig, and RecognitionMatch from the top-level fliqx module.
Installation
FLIQ requires Python 3.10 or newer.
Install the core package from source:
pip install .
Install with optional extras depending on your use case:
pip install .[full]
Available extras:
apifor FastAPI and Uvicornvideofor OpenCV-based video supportonnxfor ONNX Runtime-based detector and embedder adaptersfaissfor FAISS vector search supportdevfor local testingfullfor API, video, and test dependencies together
For local development from the repository:
pip install -e .[dev]
Quick Start
import numpy as np
from fliqx import Fliq
engine = Fliq()
image = np.zeros((256, 256, 3), dtype=np.uint8)
engine.register("person-001", image)
results = engine.recognize(image)
print(results)
If you want to process video or frame iterables:
frames = [np.zeros((256, 256, 3), dtype=np.uint8) for _ in range(5)]
for frame_result in engine.track_video(frames):
print(frame_result)
Public API
The main engine methods are:
register(user_id, image)to add a known facerecognize(image, class_id=None)to run recognition on a still framerecognize_video(video)to process a video source or iterable of framestrack_video(source, include_tracking=True, class_id=None)for streaming recognition with trackingsave_index(directory=None)andload_index(directory=None)for persistenceremove_user(user_id)to delete a subject from the indexsnapshot_metrics()for runtime counters and uptimeoptimize_existing(embeddings, ids)for bulk index updates
The configuration object FliqConfig controls runtime behavior such as:
- device selection
- frame skipping and recognition cadence
- detector, embedder, tracker, and vector backend selection
- confidence thresholds
- cache sizes and concurrency limits
- warmup behavior and motion sensitivity
Architecture
FLIQ is organized around a few cooperating layers:
fliq.detectionprovides detector abstractions and adapters, including auto, whole-frame, RetinaFace, and SCRFD-based pathsfliq.embeddingsprovides embedder abstractions, including lightweight, ArcFace, and Buffalo-style optionsfliq.trackingprovides tracking implementations, including ByteTrack-inspired variantsfliq.vectorprovides similarity search, persistence, and optional FAISS accelerationfliq.cacheprovides embedding, match, memory, and session cachesfliq.videoprovides frame handling, motion detection, and scheduling helpersfliq.apiexposes a FastAPI application and JSON routesfliq.benchmarksprovides benchmark routines and result reporting
When optional acceleration packages are unavailable, the engine falls back to pure Python and NumPy implementations so the package remains usable in minimal environments.
Configuration Examples
from fliqx import Fliq
engine = Fliq(
mode="balanced",
detector="scrfd",
embedder="buffalo",
tracker="bytetrack",
vector_backend="faiss",
warmup=True,
)
Common runtime modes:
speedfor higher throughputbalancedfor a middle ground between latency and qualityaccuracyfor tighter recognition cadence and thresholding
API Service
If you install the api extra, you can create a FastAPI app around the engine:
from fliqx.api.fastapi_app import create_app
app = create_app()
Available routes:
GET /for a readiness responseGET /healthfor a health checkPOST /registerfor user registrationPOST /recognizefor recognition requests
Benchmarks
The repository includes benchmark helpers for both single-frame recognition and concurrent classroom-style loads.
Run the benchmark script from the repository root:
python scripts/benchmark_runner.py
The benchmark output reports:
- total time and per-call latency
- frames per second
- recognition call and result counts
- concurrent stream usage
- queue peak size
- CPU and GPU utilization when available
- RSS memory deltas
- stream recovery counts
Development
Run the test suite with:
pytest
The repository is configured for editable installs and includes package markers so the full fliqx tree is discoverable during development and wheel builds.
PyPI Distribution
What's Included in PyPI Package:
- Core FLIQ engine (
fliq/) - All detection, embedding, tracking, vector, video, and cache modules
- CLI tools (
fliq/cli.py) - Production hardening modules (stress, stability, protection)
- Type hints and markers
What's Excluded from PyPI (GitHub only):
- Test files (
fliq/tests/) - Development documentation:
PRODUCTION.md- Production deployment guideUPGRADE_SUMMARY.md- Change summaryCLI_REFERENCE.md- CLI usage referenceIMPLEMENTATION_COMPLETE.md- Implementation detailsREADME_PRODUCTION.md- File reference
- Benchmark reports directory (
benchmarks/reports/) - Scripts directory (
scripts/) - Build and configuration files (
setup.py,.github/, etc.)
Why? The PyPI package is kept lean (only production code) while the GitHub repository includes comprehensive testing, documentation, and development tools. This keeps package size small and installation fast while maintaining full transparency and documentation in the source repository.
To Install from PyPI:
pip install fliq
To Get Development Version with All Tests and Docs:
git clone https://github.com/your-org/fliq.git
cd fliq
pip install -e .[dev]
Project Layout
fliq/engine.pycontains the main orchestration enginefliq/config.pycontains runtime configuration defaults and validationfliq/api/contains the HTTP service layerfliq/cache/contains in-memory caches and session statefliq/detection/contains detector implementations and adaptersfliq/embeddings/contains embedding models and wrappersfliq/tracking/contains tracking logicfliq/vector/contains vector search and persistence helpersfliq/video/contains frame, motion, and stream utilitiesfliq/benchmarks/contains benchmark helpers and metricsfliq/stress/contains stress testing framework (production hardening)fliq/stability/contains stability monitoring (production hardening)fliq/protection.pycontains load protection systems (production hardening)scripts/benchmark_runner.pyis a runnable benchmark entry point
Notes
FLIQ is intentionally modular: you can use the core NumPy-only package for development and testing, then add optional extras only when your deployment needs them. Saved indexes are automatically loaded when an index directory is present, and recognition results are cached to reduce repeated work in high-throughput workloads.
Metadata
Release files for fliqx 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| fliqx-0.1.2.tar.gz | 48.1 kB | With provenance | Details for fliqx-0.1.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| fliqx-0.1.2-py3-none-any.whl | Python 3 | none | any | Details for fliqx-0.1.2-py3-none-any.whl |
Total release size: 110.0 kB
Release files / fliqx-0.1.2.tar.gz
| Download URL | fliqx-0.1.2.tar.gz |
|---|---|
| Size | 48.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f73672d8f563e4d058b06ec157e3c1cbbf826ea00e9feabcff97f6219d75020e
|
|
BLAKE2b-256 checksum How to use checksums |
70e8aeb5748047849fe9040aea6ab5663d3e2bce56e0ea3c51c971eddbaaf80d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 11, 2026.
Transparency logRelease files / fliqx-0.1.2-py3-none-any.whl
| Download URL | fliqx-0.1.2-py3-none-any.whl |
|---|---|
| Size | 61.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5f47509f294d84bf608061581baf00cb0376f811e2c2b311eacc0c15ed5a2b94
|
|
BLAKE2b-256 checksum How to use checksums |
3f508bd70e0172f5899614f481e6e05e120d06ff26bbadfaf8c3747db5f3a194
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 11, 2026.
Transparency logSecurity for fliqx 0.1.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for fliqx-0.1.2.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 11, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.