TNN
TNN: developed by Tencent Youtu Lab and Guangying Lab, a uniform deep learning inference framework for mobile、desktop and server. TNN is distinguished by several outstanding features, including its cross-platform capability, high performance, model compression and code pruning. Based on ncnn and Rapidnet, TNN further strengthens the support and performance optimization for mobile devices, and also draws on the advantages of good extensibility and high performance from existed open source efforts. TNN has been deployed in multiple Apps from Tencent, such as Mobile QQ, Weishi, Pitu, etc. Contributions are welcome to work in collaborative with us and make TNN a better framework.
Install / Use
/learn @Tencent/TNNREADME
Introduction
TNN: A high-performance, lightweight neural network inference framework open sourced by Tencent Youtu Lab. It also has many outstanding advantages such as cross-platform, high performance, model compression, and code tailoring. The TNN framework further strengthens the support and performance optimization of mobile devices on the basis of the original Rapidnet and ncnn frameworks. At the same time, it refers to the high performance and good scalability characteristics of the industry's mainstream open source frameworks, and expands the support for X86 and NV GPUs. On the mobile phone, TNN has been used by many applications such as mobile QQ, weishi, and Pitu. As a basic acceleration framework for Tencent Cloud AI, TNN has provided acceleration support for the implementation of many businesses. Everyone is welcome to participate in the collaborative construction to promote the further improvement of the TNN inference framework.
Effect Example
Face Detection(blazeface) | Face Alignment<br>(from Tencent Youtu Lab) | Hair Segmentation<br>(from Tencent Guangying Lab)
:-------------------------: | :------: | :------:
<br> model link: tflite tnn |
<br> model link: tnn |
<br> model link: tnn
Pose Estimation<br>(from Tencent Guangliu) | Pose Estimation<br>(blazepose) | Chinese OCR
:--------------------------: | :------: | :------:
<br> model link: tnn |
<br> model link: tflite tnn |
<br> model link: onnx tnn
Object Detection(yolov5s) | Object Detection(MobilenetV2-SSD) | Reading Comprehension
:-------------------------: |:--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:| :------:
<br> model link: onnx tnn |
<br> model link: tensorflow tnn |
<br> model link: onnx tnn
<small>Chinese OCR demo is the TNN implementation of chineseocr_lite project. It is lightweight and supports tilted, rotated and vertical text recognition.</small>
The support for each demo is shown in the following table. You can click the ✅ and find the entrance code for each demo.
demo | ARM | OpenCL | Metal | Huawei NPU | Apple NPU | X86 | CUDA
:---------------------------------------------------------------------------------------: | :------: | :------: | :------: | :------: | :------: | :------: |:------:
Face Detection (blazeface) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅
Object Detection (yolov5s) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅
Face Alignment | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅
Hair Segmentation | ✅ | ✅ | ✅ | ✅ | ✅| ✅ | ✅
Pose Estimation<br>(from Tencent Guangliu) | ✅ | ✅ | ✅ | ✅ | ✅ | [✅](https://github.com/Tencent/TNN/blob/master/examples/linux/src/TNNSkeletonDetector/TNNSkeletonDetect
