{"data":{"slug":"tencent-tnn","name":"TNN","tagline":"A cross-platform deep learning inference framework for diverse computing environments, from mobile to desktop and server.","github_url":"https://github.com/Tencent/TNN","owner":"Tencent","repo":"TNN","owner_avatar_url":"https://avatars.githubusercontent.com/u/18461506?v=4","primary_language":"C++","stars":4643,"forks":772,"topics":["coreml","deep-learning","face-detection","hairsegmentaion","inference","mnn","ncnn","ocr","openvino","pytorch","tengine","tensorflow","tensorrt"],"archived":false,"github_pushed_at":"2025-05-09T07:33:14+00:00","maintenance_label":"Dormant","url":"https://www.graphcanon.com/tools/tencent-tnn","markdown_url":"https://www.graphcanon.com/tools/tencent-tnn.md","api_url":"https://www.graphcanon.com/api/graphcanon/tools/tencent-tnn","graph_url":"https://www.graphcanon.com/api/graphcanon/graph?tool=tencent-tnn","description":"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. ","homepage_url":null,"license":"Other","open_issues":318,"watchers":90,"ai_summary":"Developed by Tencent's Youtu Lab and Guangying Lab, TNN is an advanced inference tool that supports model conversion, compilation, and runtime across various platforms. It excels in high performance, efficient model compression, and code optimization.","readme_excerpt":"## Quick Start\n\nIt is very simple to use TNN. If you have a trained model, the model can be deployed on the target platform through three steps.\n1. Convert the trained model into a TNN model. We provide a wealth of tools to help you complete this step, whether you are using Tensorflow, Pytorch, or Caffe, you can easily complete the conversion.\nDetailed hands-on tutorials can be found here [How to Create a TNN Model](doc/en/user/convert_en.md).\n\n2. When you have finished converting the model, the second step is to compile the TNN engine of the target platform. You can choose among different acceleration solutions such as ARM/OpenCL/Metal/NPU/X86/CUDA according to the hardware support.\n   For these platforms, TNN provides convenient one-click scripts to compile. For detailed steps, please refer to [How to Compile TNN](doc/en/user/compile_en.md).\n\n3. The final step is to use the compiled TNN engine for inference. You can make program calls to TNN inside your application. We provide a rich and detailed demo as a reference to help you complete.\n    * [Run an iOS Demo](doc/en/user/demo_en.md#i-introduction-to-ios-demo)\n    * [Run an Android Demo](doc/en/user/demo_en.md#ii-introduction-to-android-demo)\n    * [Run an Linux/Windows Demo](doc/en/user/demo_en.md#iii-introduction-to-linuxmacwindowsarmlinuxcudalinux-demo)","github_created_at":"2020-05-29T07:20:28+00:00","created_at":"2026-07-11T23:37:48.253628+00:00","updated_at":"2026-08-04T12:01:21.838446+00:00","categories":[{"slug":"inference-serving","name":"Inference & Serving","url":"https://www.graphcanon.com/categories/inference-serving","markdown_url":"https://www.graphcanon.com/categories/inference-serving.md","api_url":"https://www.graphcanon.com/api/graphcanon/categories/inference-serving"}],"tags":[{"slug":"coreml","name":"coreml"},{"slug":"deep-learning","name":"deep-learning"},{"slug":"face-detection","name":"face-detection"},{"slug":"hairsegmentaion","name":"hairsegmentaion"},{"slug":"inference","name":"inference"},{"slug":"mnn","name":"mnn"},{"slug":"ncnn","name":"ncnn"},{"slug":"ocr","name":"ocr"}],"trust":{"provenance":{"is_fork":false,"github_id":267792621,"owner_type":"Organization","methodology":"github_public_v1","parent_repo":null,"near_duplicate_slugs":[]},"computed_at":"2026-08-04T12:01:20.962Z","maintenance":{"label":"Dormant","score":18,"methodology":"github_public_v1","releases_90d":0,"days_since_push":452,"last_release_at":"2021-04-26T14:23:12Z"},"security_summary":{"status":"no_lockfile","scanner":null,"low_count":0,"high_count":0,"last_scan_at":"2026-07-11T23:37:49.676Z","medium_count":0,"scan_profile":"none","critical_count":0}},"capability_facts":{"scan":{"source":"repo_scan","observed_at":"2026-08-04T12:01:21.449Z"},"deploy":{"source":"dockerfile:Dockerfile","self_host":true,"observed_at":"2026-08-04T12:01:21.449Z","managed_saas":false},"languages":{"value":["c++"],"source":"github.language","observed_at":"2026-08-04T12:01:21.449Z"},"has_docker":{"value":true,"source":"dockerfile:Dockerfile","observed_at":"2026-08-04T12:01:21.449Z"},"license_spdx":{"value":"Other","source":"github.license","observed_at":"2026-08-04T12:01:21.449Z"}},"decision_facts":{"hosting":null,"pricing":null,"requirements":null,"constraints":null,"when_to_use":["When developing AI apps for Tencent-affiliated software like Mobile QQ or Weishi","For projects requiring high-performance inference across ARM devices with extensive acceleration solutions support"],"when_not_to_use":["If you prefer a framework that heavily integrates with TensorFlow's ecosystem, as TNN has a steeper learning curve when converting models","When your project primarily relies on Python environments. TNN is C++-centric with no native Python interface."],"source":"enrich:decision_facts","observed_at":"2026-07-17T02:13:27.387Z"},"constraint_facets":null,"decision_summary":[{"label":"Adopt for","value":"Developed by Tencent Labs, TNN offers strong cross-platform performance with efficient model compression and runtime optimization for mobile to server use."}]}}