Repolode
xlite-dev

xlite-dev/lite.ai.toolkit

A lite C++ toolkit of 100+ AI models for detection, face recognition, segmentation and matting, running on ONNXRuntime, MNN, TensorRT and others.

Stars
4,444
Forks
783
Open issues
1
Last commit
2 months ago

What is it?

Lite.Ai.ToolKit is a C++ library that wraps more than 100 pretrained computer vision and generative models behind a consistent interface using the lite::cv::Type::Class naming pattern. Covered tasks include object detection (YOLO family, YOLOX, NanoDet, EfficientDet), face detection, face alignment and recognition, emotion and age attributes, classification, segmentation, and video or image matting.

The core dependencies are OpenCV and ONNXRuntime, with optional backends for MNN, NCNN, TNN and TensorRT. Support for Stable Diffusion and a FaceFusion pipeline is also included. Prebuilt libraries and a build.sh script are provided, and the project documents building on Linux, tested on Ubuntu 20.04.

Developers who need to call these models from C++ inside an existing application, rather than through Python, can use it as a ready-made wrapper with pre and post processing already written.

Key features

  • 01Consistent C++ API across 100+ vision models, with pre- and post-processing included.
  • 02Runs on ONNXRuntime by default, with optional MNN, NCNN, TNN and TensorRT backends.
  • 03Covers detection, face recognition and alignment, segmentation and matting.
  • 04Minimal required dependencies: OpenCV and ONNXRuntime.
  • 05Includes Stable Diffusion and FaceFusion pipeline examples.

Use cases

  • Adding YOLO-based object detection to a C++ desktop or embedded application.
  • Building a face recognition or landmark pipeline without a Python runtime.
  • Running background matting or segmentation in a C++ video processing tool.
  • Comparing the same model across ONNXRuntime, MNN and TensorRT backends.

Quick start

  1. 1

    Clone the repository

    git clone --depth=1 https://github.com/xlite-dev/lite.ai.toolkit.git
  2. 2

    Build the library from source with the build script

    cd lite.ai.toolkit && sh ./build.sh
  3. 3

    Or download the prebuilt library from the v0.2.0 release page

Things to know

  • The build script supports Linux only.
  • Licensed under GPL-3.0, a copyleft license that requires derivative works to be open-sourced under the same terms.
  • TensorRT acceleration needs TensorRT 10.x or later and CUDA 12.x or later.

In collections

Topics

FAQ

What is lite.ai.toolkit?
A lite C++ toolkit of 100+ AI models for detection, face recognition, segmentation and matting, running on ONNXRuntime, MNN, TensorRT and others. Lite.Ai.ToolKit is a C++ library that wraps more than 100 pretrained computer vision and generative models behind a consistent interface using the lite::cv::Type::Class naming pattern. Covered tasks include object detection (YOLO family, YOLOX, NanoDet, EfficientDet), face detection, face alignment and recognition, emotion and age attributes, classification, segmentation, and video or image matting.
Is lite.ai.toolkit free to use? What license does it have?
lite.ai.toolkit is open source under the GPL-3.0 license. Check the license terms before using it in commercial products.
Is lite.ai.toolkit still maintained?
Updated within 6 months. The last commit to lite.ai.toolkit was on Sep 5, 2026.
What can I use lite.ai.toolkit for?
Adding YOLO-based object detection to a C++ desktop or embedded application. Building a face recognition or landmark pipeline without a Python runtime. Running background matting or segmentation in a C++ video processing tool. Comparing the same model across ONNXRuntime, MNN and TensorRT backends.
How do I install lite.ai.toolkit?
Clone the repository: git clone --depth=1 https://github.com/xlite-dev/lite.ai.toolkit.git Build the library from source with the build script: cd lite.ai.toolkit && sh ./build.sh Or download the prebuilt library from the v0.2.0 release page
Where can I get lite.ai.toolkit?
The source code and installation instructions are on GitHub: https://github.com/xlite-dev/lite.ai.toolkit

Summary generated by AI from the project's README. GitHub stats refresh daily.

Related projects