← Retour au Blog
ProductSDKEdge Computing

InspireFace: Cross-Platform C/C++ Face Recognition SDK for Edge Devices

Introduction

We are excited to announce the release of InspireFace, a high-performance C/C++ face recognition SDK designed for cross-platform edge deployment. InspireFace brings InsightFace's state-of-the-art face analysis capabilities to mobile, desktop, and embedded devices with a unified, easy-to-use API.

Key Features

Extreme Performance

InspireFace is engineered for speed:

  • Full pipeline (detection + alignment + feature extraction) in under 2ms on iPhone 13 (CoreML/ANE)
  • Optimized for CPU, GPU, and NPU inference
  • Lightweight models suitable for resource-constrained devices

Cross-Platform Support

Deploy on virtually any platform:

  • Linux: x86_64, ARM64, RISC-V
  • macOS: Intel and Apple Silicon
  • iOS: iPhone and iPad with CoreML acceleration
  • Android: ARM and x86 with NNAPI support
  • Embedded: Rockchip NPU (RK3588/RK3566/RK3568)
  • CUDA: NVIDIA GPU acceleration for server deployment

Comprehensive Functionality

InspireFace provides a complete face analysis pipeline:

  • Face Detection: High-accuracy face localization
  • Face Recognition: ArcFace-based identity embedding extraction
  • Face Alignment: Precise landmark detection
  • Attribute Analysis: Age, gender, and expression estimation
  • Liveness Detection: Anti-spoofing with presentation attack detection
  • Head Pose Estimation: Yaw, pitch, and roll estimation
  • Facial Action Detection: Blink, nod, and shake detection
  • Mask Detection: Face mask presence detection

Architecture

InspireFace is built with a modular, layered architecture:

1. C API Layer: Stable ABI for language interoperability

2. Core Engine: Optimized inference pipeline

3. Backend Abstraction: Pluggable inference backends (ONNX Runtime, CoreML, TensorRT, RKNN)

4. Model Management: Efficient model loading and caching

Quick Start

C/C++ Integration

#include "inspireface.h"

// Initialize

HResult ret = HFLaunchInspireFace(model_path);

// Create session

HFSession session;

HFCreateInspireFaceSession(

HF_ENABLE_FACE_RECOGNITION | HF_ENABLE_LIVENESS,

HF_DETECT_MODE_ALWAYS_DETECT,

3, // max face count

-1, // use default pixel format

0, // use default thread count

&session

);

// Process image

HFImageData image = {width, height, 3, data};

HFImageStream stream;

HFCreateImageStream(&image, &stream);

// Detect and recognize

HFMultipleFaceData faces;

HFExecuteFaceTrack(session, stream, &faces);

HFFaceFeature feature;

HFExtractFaceFeature(session, stream, faces.tokens[0], &feature);

Python Integration

import cv2

import inspireface as isf

# Initialize and create session

session = isf.InspireFaceSession(

isf.HF_ENABLE_FACE_RECOGNITION | isf.HF_ENABLE_LIVENESS,

isf.HF_DETECT_MODE_ALWAYS_DETECT

)

# Process image

image = cv2.imread("face.jpg")

faces = session.face_detection(image)

# Extract features

for face in faces:

feature = session.face_feature_extract(image, face)

print(f"Feature dimension: {len(feature)}")

Performance Benchmarks

PlatformDetectionRecognitionFull Pipeline
iPhone 13 (CoreML)0.8ms0.6ms1.8ms
Rockchip RK3588 (NPU)3.2ms2.1ms6.5ms
Intel i7-12700 (CPU)4.1ms2.8ms8.2ms
NVIDIA RTX 3090 (CUDA)0.5ms0.3ms1.2ms

Licensing

InspireFace is available under two licensing options:

  • Academic License: Free for research and educational use
  • Commercial License: Contact us for production deployment

Getting Started

Visit the InspireFace GitHub repository for documentation, examples, and pre-built binaries. For commercial licensing inquiries, contact us at contact@insightface.ai.