Skip to main content

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:

  • api for FastAPI and Uvicorn
  • video for OpenCV-based video support
  • onnx for ONNX Runtime-based detector and embedder adapters
  • faiss for FAISS vector search support
  • dev for local testing
  • full for 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 face
  • recognize(image, class_id=None) to run recognition on a still frame
  • recognize_video(video) to process a video source or iterable of frames
  • track_video(source, include_tracking=True, class_id=None) for streaming recognition with tracking
  • save_index(directory=None) and load_index(directory=None) for persistence
  • remove_user(user_id) to delete a subject from the index
  • snapshot_metrics() for runtime counters and uptime
  • optimize_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.detection provides detector abstractions and adapters, including auto, whole-frame, RetinaFace, and SCRFD-based paths
  • fliq.embeddings provides embedder abstractions, including lightweight, ArcFace, and Buffalo-style options
  • fliq.tracking provides tracking implementations, including ByteTrack-inspired variants
  • fliq.vector provides similarity search, persistence, and optional FAISS acceleration
  • fliq.cache provides embedding, match, memory, and session caches
  • fliq.video provides frame handling, motion detection, and scheduling helpers
  • fliq.api exposes a FastAPI application and JSON routes
  • fliq.benchmarks provides 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:

  • speed for higher throughput
  • balanced for a middle ground between latency and quality
  • accuracy for 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 response
  • GET /health for a health check
  • POST /register for user registration
  • POST /recognize for 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 guide
    • UPGRADE_SUMMARY.md - Change summary
    • CLI_REFERENCE.md - CLI usage reference
    • IMPLEMENTATION_COMPLETE.md - Implementation details
    • README_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.py contains the main orchestration engine
  • fliq/config.py contains runtime configuration defaults and validation
  • fliq/api/ contains the HTTP service layer
  • fliq/cache/ contains in-memory caches and session state
  • fliq/detection/ contains detector implementations and adapters
  • fliq/embeddings/ contains embedding models and wrappers
  • fliq/tracking/ contains tracking logic
  • fliq/vector/ contains vector search and persistence helpers
  • fliq/video/ contains frame, motion, and stream utilities
  • fliq/benchmarks/ contains benchmark helpers and metrics
  • fliq/stress/ contains stress testing framework (production hardening)
  • fliq/stability/ contains stability monitoring (production hardening)
  • fliq/protection.py contains load protection systems (production hardening)
  • scripts/benchmark_runner.py is 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)

Source distribution for fliqx 0.1.2
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)

Table of built distributions (wheels) for fliqx 0.1.2
File Interpreter ABI Platform Actions
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 log

Release 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 log

Security 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.

Select from 2 files

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 log

A 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.

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page