TNN is a framework from Tencent that lets you run AI models on phones, computers, and servers. The problem it solves is this: AI models are usually trained on powerful computers in the cloud, but you often want them to run locally on a device, such as detecting faces in a camera feed on a phone without sending video to a server. TNN takes a trained model and runs it as fast as possible on whatever hardware is available. The framework supports many different types of processors and chips, including the standard CPU inside any phone, graphics chips (GPUs), and specialized AI chips made by companies like Huawei and Apple. This means the same AI model can be deployed across Android phones, iPhones, desktop computers, and servers, with the framework choosing the best available chip on each device to keep things fast. Tencent uses TNN in several of its own apps, including mobile QQ and the photo editing app Pitu. The kinds of tasks it handles include detecting faces in images, estimating body poses, reading text in photos (including Chinese characters at odd angles), and identifying objects in a scene. Demos for all of these are included in the repository with links to the model files. For developers, TNN accepts models in several common formats and provides tools to convert models from other frameworks. The library is written in C++ and includes example code for Android, iOS, and Linux. The README has a large compatibility table showing which demos work on which hardware backends. The full README is longer than what was shown.
← tencent on gitmyhub — every repo by this author, as a profile.
Verify against the repo before relying on details.