• Stars
    star
    131
  • Rank 265,842 (Top 6 %)
  • Language
    Objective-C
  • License
    MIT License
  • Created over 3 years ago
  • Updated almost 3 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Off-The-Shelf AI Development Kit for APP Developers based on Paddle Lite (『飞桨』移动端开箱即用AI套件, 包含Java & Objective C接口支持)

LiteKit接入文档

License

LiteKit是基于端推理框架LiteKitCore和端推理引擎PaddleLite,面向移动端工程师的AI能力解决方案。 LiteKit旨在为客户端应用提供开箱即用的离线的AI能力,使产品快速的简单的接入AI能力,并将提供的AI能力应用于各种业务场景。

目前已经支持的人像分割、手势识别、视频超分均来自百度各个产品线,已上线功能中,中台化输出的AI能力。

快速体验

效果展示

手势识别 人像分割

视频超分

增强前 增强后
SR SR

1. Android - 扫码安装

QR_Code

2. Demo Project 源码安装

git clone https://github.com/PaddlePaddle/LiteKit.git

iOS平台

示例工程中展示了人像分割、手势识别、视频超分能力。包括能力的接入demo和能力效果的展示。

示例工程部署
cd ./LiteKit/LiteKitDemo/iOS/LiteKitDemo
pod install --repo-update
open LiteKitDemo.xcworkspace

运行工程可在真机测试机上查看效果。

Android平台

  1. clone依赖SDK仓库作为LocalMaven仓库
git clone https://gitee.com/paddlepaddle/LiteKit
  1. 修改LiteKitDemo工程local.properties(文件位置在./LiteKitDemo/Android/LiteKitDemo/local.properties),添加MAVEN_REPO_LOCAL属性,值为第1步中clone的gitee仓库地址。 例如:
MAVEN_REPO_LOCAL = XXXXXXX
  1. 打开工程
cd ./LiteKit/LiteKitDemo/Android/LiteKitDemo
open -a /Applications/Android\ Studio.app ./
  1. Gradle sync & Run

安装SDK

LiteKit依赖关系如下:

其中:

  1. PaddleLite层,PaddleLite是一个高性能、轻量级、灵活性强且易于扩展的深度学习推理框架,LiteKitSDK的AI能力底层基于PaddleLite引擎实现。
  2. LiteKitCore层,LiteKitCore是一种跨平台的,面向移动开发者的,AI工程化的综合解决方案。LiteKitCore作为端模型预测的统一接入层,目的是端模型的快速工程化集成,降低客户端RD在端运行AI模型的门槛和提升集成效率,同时也能更好实现基于端模型业务能力的快速横向输出。目前为提供了Objective C,Java,C++三种语言的API。
  3. LiteKit层,视频超分,人像分割,手势识别,均称为LiteKit的业务SDK。每种业务SDK中,封装了对应AI能力的模型、预测的前后处理等逻辑。后续会产生更多覆盖其他AI场景的业务SDK。

1. 依赖

LiteKit由MIT License提供

功能 依赖 iOS版本 Android版本
手势识别 LiteKitHandGestureDetection 0.2.0 0.2.0
人像分割 LiteKitPortraitSegmentation 0.2.0 0.2.0
视频超分 LiteKitAIVideoSuperResolution 0.2.0 0.2.0

2. 安装

iOS 安装SDK

  • 系统最低版本iOS 9.0
  • 通过pod引入,参考
# coding: utf-8
source 'https://github.com/CocoaPods/Specs.git'

platform :ios

target 'LiteKitDemo' do
  project './LiteKitDemo.xcodeproj'
    platform :ios, '10.0'

    pod 'LiteKitHandGestureDetection', '~> 0.2.0'
    pod 'LiteKitPortraitSegmentation', '~> 0.2.0'
    pod 'LiteKitVideoSuperResolution', '~> 0.2.0'
end

Android 安装SDK

  • 系统最低API Level16(4.1版本)
  1. 将依赖SDK仓库作为LocalMaven仓库
git clone https://gitee.com/paddlepaddle/LiteKit
  1. 修改LiteKitDemo工程local.properties(例如./LiteKitDemo/Android/LiteKitDemo/local.properties),添加MAVEN_REPO_LOCAL属性,值为第1步中clone的gitee仓库地址。 例如:
MAVEN_REPO_LOCAL = XXXXXXX
  1. 在工程的gradle中增加配置LocalMaven,例如./LiteKitDemo/Android/LiteKitDemo/build.gradle
allprojects {
    repositories {
        google()
        jcenter()
        maven{ url getLocalProperty("MAVEN_REPO_LOCAL") + "/Android/repository" }
    }
}

/**
 * 从local.properties文件中读取配置
 *
 * @param propertyName 读取的参数名
 * @return 配置value
 */
def getLocalProperty(String propertyName) {
    Properties properties = new Properties()
    try {
        properties.load(project.rootProject.file('local.properties').newDataInputStream())
    } catch (Exception e) {
        println "read local.properties failed${e.message}"
    }
    String value =  properties.get(propertyName);
    System.out.println("key: " + propertyName + ", value: " +  value)
    return value
}
  1. 在app的gradle中增加配置引入SDK,例如./LiteKitDemo/Android/LiteKitDemo/app/build.gradle
dependencies {
    implementation 'com.baidu.litekit:handgesturedetector:0.2.0'
    implementation 'com.baidu.litekit:portraitsegmentation:0.2.0'
    implementation 'com.baidu.litekit:videosuperresolution:0.2.0'
}

API

LiteKit的AI能力,主要包含3类接口:创建、执行、释放。 使用时,先通过创建接口创建对应的预测引擎实例,之后可以通过执行接口进行预测,当使用完毕后需要对预测引擎实例进行释放。
其中执行接口通常有多个,可以接受不同格式的数据输入,以适应相机帧、图像、视频解码数据等不同也业务场景。

人像分割 API文档
手势识别 API文档
视频超分 API文档

隐私说明

LiteKit目前版本不会收集任何用户数据和用户信息,也不需要申请用户的隐私权限。

交流与反馈

     

   微信公众号                  官方技术交流微信群

版权和许可证

LiteKit由MIT License提供

FAQ

FAQ

LiteKitCore接入文档

一、介绍

1. 背景

LiteKitCore是一种跨平台的,面向移动开发者的,AI工程化的综合解决方案。LiteKitCore作为端模型预测的统一接入层,目的是端模型的快速工程化集成,降低客户端RD在端运行AI模型的门槛和提升集成效率,同时也能更好实现基于端模型业务能力的快速横向输出。基于LiteKitCore的端AI预测能力,可以快速的基于不同宿主进行集成与部署。LiteKitCore主要功能如下:模型加载,预测能力,前后处理能力,业务数据到Backend Input/Output的转换,Backend无感知升级,性能统计,容错处理,任务队列管理,运行时资源调度,生命周期管理等。

2. 兼容性

支持平台:iOS、Android、Native C++ 。

3. Demo Project

iOS示例工程包含了Native C++ API和Objective-C API的demo调用示例,Native C++ API和Objective-C API分别包含CPU和GPU两种backend,一共4种加载和预测的方式。针对C++API(在iOS上)和Objective-C API的CPU/GPU backend分别是对齐的,模型的加载和预测能力一致。但是CPU和GPU backend之间是隔离的,预测所使用的模型是不一样的。

部署iOS示例工程

  1. clone git仓库
git clone https://github.com/PaddlePaddle/LiteKit.git
  1. 添加LiteKitCore依赖 按照接入文档 for Objective-C API 构建产物LiteKit.framework放在./LiteKitCore/LiteKitCoreDemo/iOS/Dependence/*
    按照接入文档 for Native C++ API on iOS构建产物./LiteKitCore/LiteKitCore/C++/build-ios/product/release/*, *.h头文件到文件夹./LiteKitCore/LiteKitCoreDemo/iOS/Dependence/LiteKitCoreNative/include/*.h,liblitekit_framework_ios.a文件放到./LiteKitCore/LiteKitCoreDemo/iOS/Dependence/LiteKitCoreNative/liblitekit_framework_ios.a

  2. 打开工程

cd ./LiteKitCore/LiteKitCoreDemo/iOS
pod install
open LiteKitCoreDemo.xcworkspace
类名 说明
ViewController LiteKit(Objective-C & C++)以GPU、CPU作为backend的load及predict的demo code
ViewController+LiteKitCore_CPP LiteKit Native C++ API demo code
ViewController+LiteKitCore_OC LiteKit Objective-C API demo code

部署Android示例工程

  1. 环境部署
环境 版本
NDK android-ndk-r16b
cmake cmake 3.15.0

在~/.bashrc里指定cmake路径ANDROID_CMAKE和NDK路径ANDROID_NDK变量

  1. clone git仓库
git clone https://github.com/PaddlePaddle/LiteKit.git
  1. 根据接入文档 for Java API , 生成LiteKitCore-debug.aar,放置在./LiteKitCore/LiteKitCoreDemo/Android/app/libs/litekitcore-debug.aar路径下。
  2. 需要下载Demo依赖的opencv.so和libgnustl_shared.so,放置在./LiteKitCore/LiteKitCoreDemo/Android/app/src/main/cpp/libs路径下。
  3. 打开工程
cd ./LiteKit/LiteKitCore/LiteKitCoreDemo/Android
open -a /Applications/Android\ Studio.app ./
  1. Gradle sync & Run

二、接口文档

接口文档 for Native C++ API
接口文档 for Objective-C API
接口文档 for Java API

三、接入文档

接入文档 for Objective-C API
接入文档 for Native C++ API on iOS
接入文档 for Native C++ API on Android
接入文档 for Java API

FAQ

FAQ

More Repositories

1

PaddleOCR

Awesome multilingual OCR toolkits based on PaddlePaddle (practical ultra lightweight OCR system, support 80+ languages recognition, provide data annotation and synthesis tools, support training and deployment among server, mobile, embedded and IoT devices)
Python
38,354
star
2

Paddle

PArallel Distributed Deep LEarning: Machine Learning Framework from Industrial Practice (『飞桨』核心框架,深度学习&机器学习高性能单机、分布式训练和跨平台部署)
C++
21,619
star
3

PaddleHub

Awesome pre-trained models toolkit based on PaddlePaddle. (400+ models including Image, Text, Audio, Video and Cross-Modal with Easy Inference & Serving)
Python
12,439
star
4

PaddleDetection

Object Detection toolkit based on PaddlePaddle. It supports object detection, instance segmentation, multiple object tracking and real-time multi-person keypoint detection.
Python
12,003
star
5

PaddleNLP

👑 Easy-to-use and powerful NLP and LLM library with 🤗 Awesome model zoo, supporting wide-range of NLP tasks from research to industrial applications, including 🗂Text Classification, 🔍 Neural Search, ❓ Question Answering, ℹ️ Information Extraction, 📄 Document Intelligence, 💌 Sentiment Analysis etc.
Python
11,233
star
6

PaddleSpeech

Easy-to-use Speech Toolkit including Self-Supervised Learning model, SOTA/Streaming ASR with punctuation, Streaming TTS with text frontend, Speaker Verification System, End-to-End Speech Translation and Keyword Spotting. Won NAACL2022 Best Demo Award.
Python
10,060
star
7

PaddleSeg

Easy-to-use image segmentation library with awesome pre-trained model zoo, supporting wide-range of practical tasks in Semantic Segmentation, Interactive Segmentation, Panoptic Segmentation, Image Matting, 3D Segmentation, etc.
Python
8,188
star
8

PaddleGAN

PaddlePaddle GAN library, including lots of interesting applications like First-Order motion transfer, Wav2Lip, picture repair, image editing, photo2cartoon, image style transfer, GPEN, and so on.
Python
7,661
star
9

models

Officially maintained, supported by PaddlePaddle, including CV, NLP, Speech, Rec, TS, big models and so on.
Python
6,868
star
10

Paddle-Lite

PaddlePaddle High Performance Deep Learning Inference Engine for Mobile and Edge (飞桨高性能深度学习端侧推理引擎)
C++
6,839
star
11

ERNIE

Official implementations for various pre-training models of ERNIE-family, covering topics of Language Understanding & Generation, Multimodal Understanding & Generation, and beyond.
Python
6,162
star
12

PaddleClas

A treasure chest for visual classification and recognition powered by PaddlePaddle
Python
5,244
star
13

VisualDL

Deep Learning Visualization Toolkit(『飞桨』深度学习可视化工具 )
HTML
4,716
star
14

PaddleX

PaddlePaddle End-to-End Development Toolkit(『飞桨』深度学习全流程开发工具)
Python
4,564
star
15

PaddleRec

Recommendation Algorithm大规模推荐算法库,包含推荐系统经典及最新算法LR、Wide&Deep、DSSM、TDM、MIND、Word2Vec、Bert4Rec、DeepWalk、SSR、AITM,DSIN,SIGN,IPREC、GRU4Rec、Youtube_dnn、NCF、GNN、FM、FFM、DeepFM、DCN、DIN、DIEN、DLRM、MMOE、PLE、ESMM、ESCMM, MAML、xDeepFM、DeepFEFM、NFM、AFM、RALM、DMR、GateNet、NAML、DIFM、Deep Crossing、PNN、BST、AutoInt、FGCNN、FLEN、Fibinet、ListWise、DeepRec、ENSFM,TiSAS,AutoFIS等,包含经典推荐系统数据集criteo 、movielens等
Python
4,077
star
16

PARL

A high-performance distributed training framework for Reinforcement Learning
Python
3,182
star
17

awesome-DeepLearning

深度学习入门课、资深课、特色课、学术案例、产业实践案例、深度学习知识百科及面试题库The course, case and knowledge of Deep Learning and AI
Jupyter Notebook
2,752
star
18

book

Deep Learning 101 with PaddlePaddle (『飞桨』深度学习框架入门教程)
Jupyter Notebook
2,728
star
19

FastDeploy

⚡️An Easy-to-use and Fast Deep Learning Model Deployment Toolkit for ☁️Cloud 📱Mobile and 📹Edge. Including Image, Video, Text and Audio 20+ main stream scenarios and 150+ SOTA models with end-to-end optimization, multi-platform and multi-framework support.
C++
2,695
star
20

Research

novel deep learning research works with PaddlePaddle
Python
1,694
star
21

PGL

Paddle Graph Learning (PGL) is an efficient and flexible graph learning framework based on PaddlePaddle
Python
1,558
star
22

PaddleSlim

PaddleSlim is an open-source library for deep model compression and architecture search.
Python
1,507
star
23

PaddleVideo

Awesome video understanding toolkits based on PaddlePaddle. It supports video data annotation tools, lightweight RGB and skeleton based action recognition model, practical applications for video tagging and sport action detection.
Python
1,392
star
24

Paddle.js

Paddle.js is a web project for Baidu PaddlePaddle, which is an open source deep learning framework running in the browser. Paddle.js can either load a pre-trained model, or transforming a model from paddle-hub with model transforming tools provided by Paddle.js. It could run in every browser with WebGL/WebGPU/WebAssembly supported. It could also run in Baidu Smartprogram and WX miniprogram.
JavaScript
928
star
25

Serving

A flexible, high-performance carrier for machine learning models(『飞桨』服务化部署框架)
C++
869
star
26

PaddleHelix

Bio-Computing Platform Featuring Large-Scale Representation Learning and Multi-Task Deep Learning “螺旋桨”生物计算工具集
Python
784
star
27

RocketQA

🚀 RocketQA, dense retrieval for information retrieval and question answering, including both Chinese and English state-of-the-art models.
Python
742
star
28

X2Paddle

Deep learning model converter for PaddlePaddle. (『飞桨』深度学习模型转换工具)
Python
713
star
29

Knover

Large-scale open domain KNOwledge grounded conVERsation system based on PaddlePaddle
Python
670
star
30

Paddle-Lite-Demo

lib, demo, model, data
C++
640
star
31

Paddle2ONNX

ONNX Model Exporter for PaddlePaddle
Python
637
star
32

Parakeet

PAddle PARAllel text-to-speech toolKIT (supporting Tacotron2, Transformer TTS, FastSpeech2/FastPitch, SpeedySpeech, WaveFlow and Parallel WaveGAN)
Python
599
star
33

FlyCV

FlyCV is a high-performance library for processing computer visual tasks.
C++
560
star
34

Anakin

High performance Cross-platform Inference-engine, you could run Anakin on x86-cpu,arm, nv-gpu, amd-gpu,bitmain and cambricon devices.
C++
530
star
35

Paddle3D

A 3D computer vision development toolkit based on PaddlePaddle. It supports point-cloud object detection, segmentation, and monocular 3D object detection models.
Python
529
star
36

Quantum

Jupyter Notebook
528
star
37

PaddleYOLO

🚀🚀🚀 YOLO series of PaddlePaddle implementation, PP-YOLOE+, RT-DETR, YOLOv5, YOLOv6, YOLOv7, YOLOv8, YOLOX, YOLOv5u, YOLOv7u, YOLOv6Lite, RTMDet and so on. 🚀🚀🚀
Python
500
star
38

PaddleFL

Federated Deep Learning in PaddlePaddle
Python
480
star
39

VIMER

视觉预训练基础模型仓库
Python
479
star
40

PaddleTS

Awesome Easy-to-Use Deep Time Series Modeling based on PaddlePaddle, including comprehensive functionality modules like TSDataset, Analysis, Transform, Models, AutoTS, and Ensemble, etc., supporting versatile tasks like time series forecasting, representation learning, and anomaly detection, etc., featured with quick tracking of SOTA deep models.
Python
444
star
41

PaddleFleetX

飞桨大模型开发套件,提供大语言模型、跨模态大模型、生物计算大模型等领域的全流程开发工具链。
Python
417
star
42

PaddleRS

Awesome Remote Sensing Toolkit based on PaddlePaddle.
Python
330
star
43

PaddleSpatial

PaddleSpatial is an open-source spatial-temporal computing tool based on PaddlePaddle.
GLSL
316
star
44

PaddleCloud

PaddlePaddle Docker images and K8s operators for PaddleOCR/Detection developers to use on public/private cloud.
Go
279
star
45

ERNIE-SDK

ERNIE Bot Agent is a Large Language Model (LLM) Agent Framework, powered by the advanced capabilities of ERNIE Bot and the platform resources of Baidu AI Studio.
Jupyter Notebook
274
star
46

MetaGym

Collection of Reinforcement Learning / Meta Reinforcement Learning Environments.
Python
267
star
47

PASSL

PASSL包含 SimCLR,MoCo v1/v2,BYOL,CLIP,PixPro,simsiam, SwAV, BEiT,MAE 等图像自监督算法以及 Vision Transformer,DEiT,Swin Transformer,CvT,T2T-ViT,MLP-Mixer,XCiT,ConvNeXt,PVTv2 等基础视觉算法
Python
257
star
48

PaddleScience

PaddleScience is SDK and library for developing AI-driven scientific computing applications based on PaddlePaddle.
Python
234
star
49

docs

Documentations for PaddlePaddle
Python
230
star
50

InterpretDL

InterpretDL: Interpretation of Deep Learning Models,基于『飞桨』的模型可解释性算法库。
Python
226
star
51

Paddle-Inference-Demo

C++
223
star
52

PaddleRobotics

PaddleRobotics is an open-source algorithm library for robots based on Paddle, including open-source parts such as human-robot interaction, complex motion control, environment perception, SLAM positioning, and navigation.
Python
210
star
53

PaddleMIX

Paddle Multimodal Integration and eXploration, supporting mainstream multi-modal tasks, including end-to-end large-scale multi-modal pretrain models and diffusion model toolbox. Equipped with high performance and flexibility.
Python
207
star
54

TrustAI

飞桨可信AI
Python
179
star
55

ElasticCTR

ElasticCTR,即飞桨弹性计算推荐系统,是基于Kubernetes的企业级推荐系统开源解决方案。该方案融合了百度业务场景下持续打磨的高精度CTR模型、飞桨开源框架的大规模分布式训练能力、工业级稀疏参数弹性调度服务,帮助用户在Kubernetes环境中一键完成推荐系统部署,具备高性能、工业级部署、端到端体验的特点,并且作为开源套件,满足二次深度开发的需求。
Python
176
star
56

PALM

a Fast, Flexible, Extensible and Easy-to-use NLP Large-scale Pretraining and Multi-task Learning Framework.
Python
174
star
57

AutoDL

Python
158
star
58

PLSC

Paddle Large Scale Classification Tools,supports ArcFace, CosFace, PartialFC, Data Parallel + Model Parallel. Model includes ResNet, ViT, Swin, DeiT, CaiT, FaceViT, MoCo, MAE, ConvMAE, CAE.
Python
142
star
59

CINN

Compiler Infrastructure for Neural Networks
C++
139
star
60

PaddleFlow

Go
104
star
61

PaddleDTX

Paddle with Decentralized Trust based on Xuperchain
Go
87
star
62

PaddleSports

Python
86
star
63

XWorld

A C++/Python simulator package for reinforcement learning
C++
84
star
64

hapi

hapi is a High-level API that supports both static and dynamic execution modes
Jupyter Notebook
76
star
65

benchmark

Python
74
star
66

PaddleSleeve

PaddleSleeve
Python
70
star
67

Mobile

Embedded and Mobile Deployment
Python
70
star
68

community

PaddlePaddle Developer Community
Jupyter Notebook
66
star
69

PaConvert

Code Convert to PaddlePaddle Toolkit
Python
66
star
70

PaddleDepth

Python
58
star
71

PaddleCustomDevice

PaddlePaddle custom device implementaion. (『飞桨』自定义硬件接入实现)
C++
49
star
72

PaddlePaddle.org

PaddlePaddle.org is the repository for the website of the PaddlePaddle open source project.
CSS
48
star
73

PaddleTest

PaddlePaddle TestSuite
Python
43
star
74

PaDiff

Paddle Automatically Diff Precision Toolkits.
Python
42
star
75

EasyData

Python
35
star
76

epep

Easy & Effective Application Framework for PaddlePaddle
Python
34
star
77

paddle-ce-latest-kpis

Paddle Continuous Evaluation, keep updating.
Python
26
star
78

VisionTools

Python
22
star
79

Contrib

contribution works with PaddlePaddle from the third party developers
Python
20
star
80

PaddleCraft

Take neural networks as APIs for human-like AI.
Python
20
star
81

PaddleTransfer

飞桨迁移学习算法库
Python
19
star
82

recordio

An implementation of the RecordIO file format.
Go
19
star
83

continuous_evaluation

Macro Continuous Evaluation Platform for Paddle.
Python
19
star
84

Perf

SOTA benchmark
Python
17
star
85

Paddle-bot

Python
17
star
86

examples

Python
17
star
87

continuous_integration

Python
16
star
88

tape

C++
14
star
89

PaddleSOT

A Bytecode level Implementation of Symbolic OpCode Translator For PaddlePaddle
Python
14
star
90

paddle_upgrade_tool

upgrade paddle-1.x to paddle-2.0
Python
12
star
91

talks

Shell
6
star
92

CLA

5
star
93

any

Legacy Repo only for PaddlePaddle with version <= 1.3
C++
5
star