README.md 4.3 KB
Newer Older
B
BUG1989 已提交
1 2 3 4
<p align="center"><img width="40%" src="logo-Tengine.png" /></p>

# Tengine Lite

B
BUG1989 已提交
5 6 7 8 9 10
[![GitHub license](http://OAID.github.io/pics/apache_2.0.svg)](./LICENSE)
[![Build Status](https://img.shields.io/github/workflow/status/OAID/Tengine/Tengine-Lite-Actions/tengine-lite)](https://github.com/OAID/Tengine/actions?query=workflow%3ATengine-Lite-Actions)
[![Build Status](https://img.shields.io/github/workflow/status/OAID/Tengine-Convert-Tools/Tengine-Convert-Tools-Actions?label=tools%20build)](https://github.com/OAID/Tengine-Convert-Tools/actions?query=workflow%3ATengine-Convert-Tools-Actions)
[![Test Status](https://img.shields.io/travis/OAID/Tengine/tengine-lite?label=test)](https://travis-ci.org/OAID/Tengine)
[![codecov](https://codecov.io/gh/OAID/Tengine/branch/tengine-lite/graph/badge.svg?token=kz9NcQPRrk)](https://codecov.io/gh/OAID/Tengine)
[![Language grade: C/C++](https://img.shields.io/lgtm/grade/cpp/g/OAID/Tengine.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/OAID/Tengine/context:cpp)
B
BUG1989 已提交
11 12 13



没秃的程序员's avatar
没秃的程序员 已提交
14 15 16 17
[**English Version**](README_EN.md)



B
BUG1989 已提交
18 19
## 简介

baiyu33's avatar
baiyu33 已提交
20
**Tengine Lite****[OPEN AI LAB](http://www.openailab.com)** 主导开发,该项目实现了深度学习神经网络模型在嵌入式设备上的**快速****高效**部署需求。为实现在众多 **AIoT** 应用中的跨平台部署,本项目基于原有 Tengine 项目使用 **C 语言**进行重构,针对嵌入式设备资源有限的特点进行了深度框架裁剪。同时采用了完全分离的前后端设计,有利于 CPU、GPU、NPU 等异构计算单元的快速移植和部署。同时**兼容 Tengine** 框架原有 API 和 模型格式 tmfile,降低评估、迁移成本。
B
BUG1989 已提交
21 22 23

Tengine Lite 核心代码由 4 个模块组成:

baiyu33's avatar
baiyu33 已提交
24
- [**dev**](src/dev):NN Operators 后端模块,当前提供 CPU 代码,后续逐步开源 GPU、NPU 参考代码;
B
BUG1989 已提交
25 26 27 28 29 30
- [**lib**](src/lib):框架核心部件,包括 NNIR、计算图、硬件资源、模型解析器的调度和执行模块;
- [**op**](src/op):NN Operators 前端模块,实现 NN Operators 注册、初始化;
- [**serializer**](src/serializer):模型解析器,实现 tmfile 格式的网络模型参数解析。


## 架构简析
baiyu33's avatar
baiyu33 已提交
31

B
BUG1989 已提交
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46
![Tengine Lite 架构](doc/architecture.png)


## 如何使用

### 编译

- [快速编译](doc/compile.md) 基于 cmake 实现简单的跨平台编译。

### 示例

- [examples](examples/) 提供基础的分类、检测算法用例,根据 issue 需求持续更新。

### 模型仓库

baiyu33's avatar
baiyu33 已提交
47
- [Tengine model zoo](https://pan.baidu.com/s/1Ar9334MPeIV1eq4pM1eI-Q) 兼容原有 Tengine 的模型示例仓库(密码:_hhgc_)。
B
BUG1989 已提交
48 49 50

### 转换工具

B
BUG1989 已提交
51
- [预编译版本](https://github.com/OAID/Tengine/releases/download/lite-v1.2/convert_tool.zip):提供 Ubuntu 18.04 系统上预编译好的模型转换工具;
D
daquexian 已提交
52
- [在线转换版本](https://convertmodel.com/#outputFormat=tengine):基于 WebAssembly 实现(浏览器本地转换,模型不会上传);
B
BUG1989 已提交
53 54 55 56 57
- [源码编译](https://github.com/OAID/Tengine-Convert-Tools):参考 **Tengine-Convert-Tools** 项目编译生成,建议采用。

### 量化工具

- [预编译版本](tools/quantize/README.md):提供 Ubuntu 18.04 系统上预编译好的模型量化工具,已支持uint8/int8;
B
BUG1989 已提交
58 59 60 61 62

### 速度评估

- [Benchmark](benchmark/) 基础网络速度评估工具,欢迎大家更新。

mathilde27's avatar
mathilde27 已提交
63 64 65
### AutoKernel Plugin
- [AutoKernel](https://github.com/OAID/AutoKernel.git) 是一个简单易用,低门槛的自动算子优化工具,AutoKernel Plugin实现了自动优化算子一键部署到Tengine中;

B
BUG1989 已提交
66 67 68 69 70
## Roadmap

- [Road map](doc/roadmap.md)

## 致谢
baiyu33's avatar
baiyu33 已提交
71

B
BUG1989 已提交
72 73 74 75 76 77 78
Tengine Lite 参考和借鉴了下列项目:

- [Caffe](https://github.com/BVLC/caffe)
- [Tensorflow](https://github.com/tensorflow/tensorflow)
- [MegEngine](https://github.com/MegEngine/MegEngine)
- [ONNX](https://github.com/onnx/onnx)
- [ncnn](https://github.com/Tencent/ncnn)
B
BUG1989 已提交
79
- [FeatherCNN](https://github.com/Tencent/FeatherCNN)
B
BUG1989 已提交
80 81 82 83
- [MNN](https://github.com/alibaba/MNN)
- [Paddle Lite](https://github.com/PaddlePaddle/Paddle-Lite)
- [ACL](https://github.com/ARM-software/ComputeLibrary)
- [stb](https://github.com/nothings/stb)
baiyu33's avatar
baiyu33 已提交
84
- [convertmodel](https://convertmodel.com)
B
BUG1989 已提交
85
- [TIM-VX](https://github.com/VeriSilicon/TIM-VX)
B
BUG1989 已提交
86 87 88 89 90 91 92 93 94 95

## License

- [Apache 2.0](LICENSE)

## FAQ

- [FAQ 常见问题](doc/faq.md)

## 技术讨论
baiyu33's avatar
baiyu33 已提交
96

B
BUG1989 已提交
97
- Github issues
B
BUG1989 已提交
98
- QQ 群: 829565581
B
BUG1989 已提交
99
- Email: Support@openailab.com
baiyu33's avatar
baiyu33 已提交
100
- Tengine 社区: http://www.tengine.org.cn