API coverage
Find examples by feature and API. Start with the platform guide to install and initialize the SDK, then choose your API in each feature guide's code tabs.
The examples use InspireFace 1.2.4, InspireCV 1.0.2, Android Java SDK 1.2.4.post1, and HarmonyOS ArkTS SDK 1.2.4. Python uses the 1.2.4.post3 PyPI package, including the 1.2.4 native SDK. Objective-C and Swift use the 1.2.4 Apple package; the HarmonyOS release includes its native SDK and HAR project. Java (JVM) uses the portable JNI build from the 1.2.4 source and is listed separately from Android. Windows x64 uses the C, C++ and Python columns below; it has no separate API layer. The table lists the operations available through each interface.
Feature examples by API
“Example” links to a guide with code for that API. The Android 1.2.4.post1 AAR includes both the InspireFace facade and the complete jni.Native API. Its column covers both, with each example identifying the layer it uses. A dash means the named interface does not directly expose that operation.
The Plus passive and flash demos combine mobile capture with service-side verification. Their guide covers Android capture, progress feedback and result handling.
The code tabs share the same API selector, so choosing Python, Java, Android, HarmonyOS (ArkTS), Objective-C or Swift also selects it in other groups that contain the same option. The complete examples include full programs to copy from the page; snippets in feature guides state which session, image or model setup they expect.
Inputs, settings and deployment
| Area | Entry points | Guide |
|---|---|---|
| SDK downloads and builds | Prebuilt packages, platform builds and Python native-library replacement | Get and build the SDK, Python packaging |
| Model loading and inspection | Launch, reload, resource-pack validation and metadata | Models and builds |
| Images and buffers | File/bitmap input, raw RGB/BGR/YUV, stream updates, strides and rotation | Image inputs |
| Session tuning | Detector level, minimum face size, confidence, preview size, intervals and smoothing | Tracking |
| Memory and threads | Borrowed buffers, owned results, session reuse and worker teardown | Architecture |
| C ABI | Handles, status codes and HFSessionConfigV2 | C API |
| Java deployment | Java 8 JAR, JNI paths, process architecture, direct buffers and explicit release | Java, Java packaging |
| Android deployment | 1.2.4.post1 AAR, single native library per ABI, R8, CameraX and both Java API layers | Android |
| Windows deployment | x64 CPU, C/C++ CMake integration, Python wheels and DLL runtime setup | Windows, Windows builds |
| Apple APIs | Objective-C errors, Swift types, scoped views and complete detection examples | Objective-C and Swift |
| iOS deployment | Device / simulator XCFrameworks, Xcode linkage, camera buffers and CoreML | iOS |
| macOS deployment | Intel / Apple Silicon frameworks, embedding, signing and native libraries | macOS |
| HarmonyOS | HAR, ArkTS, Node-API and worker ownership | HarmonyOS |
| ARM CPU | Image preprocessing, memory reuse and camera latency | ARM deployment |
| NVIDIA | TensorRT SDK, CUDA runtime and device selection | TensorRT |
| Rockchip | SoC model packs, toolchains, RK runtime and RGA | Rockchip, Python on Rockchip |
| Diagnostics | Version, error text, runtime diagnostics and resource counters | API recipes, Troubleshooting |
| Performance | Warm-up, timing boundaries, median/p95 and queue delay | Performance |
For parameter types, overloads and additional settings, refer to the headers and wrapper shipped with your SDK version. A Java installation includes Native.java, NativeTypes.java and NativeConstants.java under sources/, plus api-manifest.json listing generated functions. Every C API has a Java mapping; hardware-specific calls still depend on the native build options and runtime.
Image processing with InspireCV
InspireCV is a standalone C++ library. Its guide covers Image I/O and operations, float images, Task transforms and tensors, error handling, repeated-frame memory reuse and optional CUDA processing. Its PixelFormat, rotation and pipeline types are separate from InspireFace's C API and FrameProcess.
For the full public interface, see InspireFace C declarations, native C++ headers, Objective-C header, Swift overlay, Python wrapper, HarmonyOS ArkTS exports and InspireCV headers. Use the headers bundled with a release as the reference for its binary.
Integration notes
- Java
longhandles require explicit release. A result’sByteBuffercan borrow native storage, so retaining the Java object does not keep that storage valid. See Java lifetimes. - Android 1.2.4.post1 includes capture and snapshots. Facade results own copied Java arrays and tokens;
Nativebuffers retain C lifetime rules. Release streams through the API layer that created them. See Android lifetimes. - Copying a C++ face-result vector retains its geometry and tokens. Keep the corresponding frame pixels as well if you will extract features later.
- In ArkTS, release tracking snapshots with
session.releaseFaceResult()and callclose()on streams, bitmaps, capture sessions and sessions when finished. Keep each wrapper object on the worker that created it. - The standard HarmonyOS HAR runs MNN on CPU and accepts raw image buffers. Use HarmonyOS APIs to decode files and display images.
- Objective-C and Swift wrap the native handles. ARC owns the wrapper object; borrowed face, feature and pixel pointers still have the native lifetime limits.
- CoreML, TensorRT, RKNN, RGA and CUDA preprocessing require their matching SDK build and runtime. Follow the target platform's deployment guide.
