| 1 |  |
| 2 | |
| 3 | # ncnn |
| 4 | |
| 5 | [](LICENSE.txt) |
| 6 | [](https://github.com/Tencent/ncnn/releases) |
| 7 | [](https://codecov.io/gh/Tencent/ncnn) |
| 8 | |
| 9 | ncnn is a high-performance neural network inference computing framework optimized for mobile platforms. |
| 10 | ncnn is deeply considerate about deployment and uses on mobile phones from the beginning of design. |
| 11 | ncnn does not have third-party dependencies. |
| 12 | It is cross-platform and runs faster than all known open-source frameworks on mobile phone cpu. |
| 13 | Developers can easily deploy deep learning algorithm models to the mobile platform by using efficient ncnn implementation, creating intelligent APPs, and bringing artificial intelligence to your fingertips. |
| 14 | ncnn is currently being used in many Tencent applications, such as QQ, Qzone, WeChat, Pitu, and so on. |
| 15 | |
| 16 | ncnn 是一个为手机端极致优化的高性能神经网络前向计算框架。 |
| 17 | ncnn 从设计之初深刻考虑手机端的部署和使用。 |
| 18 | 无第三方依赖,跨平台,手机端 cpu 的速度快于目前所有已知的开源框架。 |
| 19 | 基于 ncnn,开发者能够将深度学习算法轻松移植到手机端高效执行, |
| 20 | 开发出人工智能 APP,将 AI 带到你的指尖。 |
| 21 | ncnn 目前已在腾讯多款应用中使用,如:QQ,Qzone,微信,天天 P 图等。 |
| 22 | |
| 23 | --- |
| 24 | |
| 25 | <table> |
| 26 | <tr> |
| 27 | <td> |
| 28 | <b>技术交流 QQ 群</b><br /> |
| 29 | 637093648 (超多大佬)<br /> |
| 30 | 答案:卷卷卷卷卷(已满) |
| 31 | </td> |
| 32 | <td rowspan=3> |
| 33 | <b>Telegram Group</b> |
| 34 | |
| 35 | <https://t.me/ncnnyes> |
| 36 | </td> |
| 37 | <td rowspan=3> |
| 38 | <b>Discord Channel</b> |
| 39 | |
| 40 | <https://discord.gg/YRsxgmF> |
| 41 | </td> |
| 42 | </tr> |
| 43 | <tr> |
| 44 | <td> |
| 45 | <b>Pocky QQ 群(MLIR YES!)</b><br /> |
| 46 | 677104663 (超多大佬)<br /> |
| 47 | 答案:multi-level intermediate representation |
| 48 | </td> |
| 49 | </tr> |
| 50 | <tr> |
| 51 | <td> |
| 52 | <b>他们都不知道 pnnx 有多好用群</b><br /> |
| 53 | 818998520 (新群!) |
| 54 | </td> |
| 55 | </tr> |
| 56 | </table> |
| 57 | |
| 58 | --- |
| 59 | |
| 60 | ## Download & Build status |
| 61 | |
| 62 | https://github.com/Tencent/ncnn/releases/latest |
| 63 | |
| 64 | |
| 65 | <table> |
| 66 | <tr> |
| 67 | <td rowspan=2> |
| 68 | <img src="https://user-images.githubusercontent.com/25181517/192108372-f71d70ac-7ae6-4c0d-8395-51d8870c2ef0.png" width="120" height="auto"> |
| 69 | </td> |
| 70 | <td colspan=3> |
| 71 | |
| 72 | **[how to build ncnn library](https://github.com/Tencent/ncnn/wiki/how-to-build) on Linux / Windows / macOS / Raspberry Pi3, Pi4 / POWER / Android / NVIDIA Jetson / iOS / WebAssembly / AllWinner D1 / Loongson 2K1000** |
| 73 | |
| 74 | </td> |
| 75 | </tr> |
| 76 | <tr> |
| 77 | <td>Source</td> |
| 78 | <td colspan=2> |
| 79 | |
| 80 | [<img src="https://img.shields.io/badge/download-blue?style=for-the-badge">](https://github.com/Tencent/ncnn/releases/latest/download/ncnn-20240820-full-source.zip) |
| 81 | |
| 82 | </td> |
| 83 | </tr> |
| 84 | |
| 85 | <tr> |
| 86 | <td rowspan=3> |
| 87 | <img src="https://user-images.githubusercontent.com/25181517/117269608-b7dcfb80-ae58-11eb-8e66-6cc8753553f0.png" width="120" height="auto"> |
| 88 | </td> |
| 89 | <td colspan=3> |
| 90 | |
| 91 | - [Build for Android](https://github.com/Tencent/ncnn/wiki/how-to-build#build-for-android) |
| 92 | - [Build for Termux on Android](https://github.com/Tencent/ncnn/wiki/how-to-build#build-for-termux-on-android) |
| 93 | |
| 94 | </td> |
| 95 | </tr> |
| 96 | <tr> |
| 97 | <td>Android</td> |
| 98 | <td> |
| 99 | |
| 100 | [<img src="https://img.shields.io/badge/download-blue?style=for-the-badge">](https://github.com/Tencent/ncnn/releases/latest/download/ncnn-20240820-android-vulkan.zip) |
| 101 | [<img src="https://img.shields.io/badge/+cpuonly-blue?style=for-the-badge">](https://github.com/Tencent/ncnn/releases/latest/download/ncnn-20240820-android.zip) |
| 102 | |
| 103 | </td> |
| 104 | <td rowspan=2> |
| 105 | |
| 106 | [<img src="https://img.shields.io/github/actions/workflow/status/Tencent/ncnn/android.yml?branch=master&style=for-the-badge&label=build">](https://github.com/Tencent/ncnn/actions?query=workflow%3Aandroid) |
| 107 | |
| 108 | </td> |
| 109 | </tr> |
| 110 | <tr> |
| 111 | <td>Android shared</td> |
| 112 | <td> |
| 113 | |
| 114 | [<img src="https://img.shields.io/badge/download-blue?style=for-the-badge">](https://github.com/Tencent/ncnn/releases/latest/download/ncnn-20240820-android-vulkan-shared.zip) |
| 115 | [<img src="https://img.shields.io/badge/+cpuonly-blue?style=for-the-badge">](https://github.com/Tencent/ncnn/releases/latest/download/ncnn-20240820-android-shared.zip) |
| 116 | |
| 117 | </td> |
| 118 | </tr> |
| 119 | |
| 120 | <tr> |
| 121 | <td rowspan=3> |
| 122 | <img src="https://upload.wikimedia.org/wikipedia/commons/thumb/3/37/HMOS_Logo_Icon.svg/240px-HMOS_Logo_Icon.svg.png" width="120" height="auto"> |
| 123 | </td> |
| 124 | <td colspan=3> |
| 125 | |
| 126 | - [Build for HarmonyOS with cross-compiling](https://github.com/Tencent/ncnn/wiki/how-to-build#build-for-harmonyos-with-cross-compiling) |
| 127 | |
| 128 | </td> |
| 129 | </tr> |
| 130 | <tr> |
| 131 | <td>HarmonyOS</td> |
| 132 | <td> |
| 133 | |
| 134 | </td> |
| 135 | <td rowspan=2> |
| 136 | |
| 137 | [<img src="https://img.shields.io/github/actions/workflow/status/Tencent/ncnn/harmonyos.yml?branch=master&style=for-the-badge&label=build">](https://github.com/Tencent/ncnn/actions?query=workflow%3Aharmonyos) |
| 138 | |
| 139 | </td> |
| 140 | </tr> |
| 141 | <tr> |
| 142 | <td>HarmonyOS shared</td> |
| 143 | <td> |
| 144 | |
| 145 | </td> |
| 146 | </tr> |
| 147 | |
| 148 | <tr> |
| 149 | <td rowspan=3> |
| 150 | <img src="https://user-images.githubusercontent.com/25181517/121406611-a8246b80-c95e-11eb-9b11-b771486377f6.png" width="120" height="auto"> |
| 151 | </td> |
| 152 | <td colspan=3> |
| 153 | |
| 154 | - [Build for iOS on macOS with xcode](https://github.com/Tencent/ncnn/wiki/how-to-build#build-for-ios-on-macos-with-xcode) |
| 155 | |
| 156 | </td> |
| 157 | </tr> |
| 158 | <tr> |
| 159 | <td>iOS</td> |
| 160 | <td> |
| 161 | |
| 162 | [<img src="https://img.shields.io/badge/download-blue?style=for-the-badge">](https://github.com/Tencent/ncnn/releases/latest/download/ncnn-20240820-ios-vulkan.zip) |
| 163 | [<img src="https://img.shields.io/badge/+cpuonly-blue?style=for-the-badge">](https://github.com/Tencent/ncnn/releases/latest/download/ncnn-20240820-ios.zip) |
| 164 | |
| 165 | </td> |
| 166 | <td rowspan=2> |
| 167 | |
| 168 | [<img src="https://img.shields.io/github/actions/workflow/status/Tencent/ncnn/ios.yml?branch=master&style=for-the-badge&label=build">](https://github.com/Tencent/ncnn/actions?query=workflow%3Aios) |
| 169 | |
| 170 | </td> |
| 171 | </tr> |
| 172 | <tr> |
| 173 | <td>iOS-Simulator</td> |
| 174 | <td> |
| 175 | |
| 176 | [<img src="https://img.shields.io/badge/download-blue?style=for-the-badge">](https://github.com/Tencent/ncnn/releases/latest/download/ncnn-20240820-ios-simulator-vulkan.zip) |
| 177 | [<img src="https://img.shields.io/badge/+cpuonly-blue?style=for-the-badge">](https://github.com/Tencent/ncnn/releases/latest/download/ncnn-20240820-ios-simulator.zip) |
| 178 | |
| 179 | </td> |
| 180 | </tr> |
| 181 | |
| 182 | <tr> |
| 183 | <td rowspan=10> |
| 184 | <img src="https://user-images.githubusercontent.com/25181517/186884152-ae609cca-8cf1-4175-8d60-1ce1fa078ca2.png" width="120" height="auto"> |
| 185 | </td> |
| 186 | <td colspan=3> |
| 187 | |
| 188 | - [Build for macOS](https://github.com/Tencent/ncnn/wiki/how-to-build#build-for-macos) |
| 189 | |
| 190 | </td> |
| 191 | </tr> |
| 192 | <tr> |
| 193 | <td>macOS</td> |
| 194 | <td> |
| 195 | |
| 196 | [<img src="https://img.shields.io/badge/download-blue?style=for-the-badge">](https://github.com/Tencent/ncnn/releases/latest/download/ncnn-20240820-macos-vulkan.zip) |
| 197 | [<img src="https://img.shields.io/badge/+cpuonly-blue?style=for-the-badge">](https://github.com/Tencent/ncnn/releases/latest/download/ncnn-20240820-macos.zip) |
| 198 | |
| 199 | </td> |
| 200 | <td rowspan=1> |
| 201 | |
| 202 | [<img src="https://img.shields.io/github/actions/workflow/status/Tencent/ncnn/macos.yml?branch=master&style=for-the-badge&label=build">](https://github.com/Tencent/ncnn/actions?query=workflow%3Amacos) |
| 203 | |
| 204 | </td> |
| 205 | </tr> |
| 206 | <tr> |
| 207 | <td>Mac-Catalyst</td> |
| 208 | <td> |
| 209 | |
| 210 | [<img src="https://img.shields.io/badge/download-blue?style=for-the-badge">](https://github.com/Tencent/ncnn/releases/latest/download/ncnn-20240820-mac-catalyst-vulkan.zip) |
| 211 | [<img src="https://img.shields.io/badge/+cpuonly-blue?style=for-the-badge">](https://github.com/Tencent/ncnn/releases/latest/download/ncnn-20240820-mac-catalyst.zip) |
| 212 | |
| 213 | </td> |
| 214 | <td rowspan=1> |
| 215 | |
| 216 | [<img src="https://img.shields.io/github/actions/workflow/status/Tencent/ncnn/mac-catalyst.yml?branch=master&style=for-the-badge&label=build">](https://github.com/Tencent/ncnn/actions?query=workflow%3Amac-catalyst) |
| 217 | |
| 218 | </td> |
| 219 | </tr> |
| 220 | <tr> |
| 221 | <td>watchOS</td> |
| 222 | <td> |
| 223 | |
| 224 | [<img src="https://img.shields.io/badge/download-blue?style=for-the-badge">](https://github.com/Tencent/ncnn/releases/latest/download/ncnn-20240820-watchos.zip) |
| 225 | |
| 226 | </td> |
| 227 | <td rowspan=2> |
| 228 | |
| 229 | [<img src="https://img.shields.io/github/actions/workflow/status/Tencent/ncnn/watchos.yml?branch=master&style=for-the-badge&label=build">](https://github.com/Tencent/ncnn/actions?query=workflow%3Awatchos) |
| 230 | |
| 231 | </td> |
| 232 | </tr> |
| 233 | <tr> |
| 234 | <td>watchOS-Simulator</td> |
| 235 | <td> |
| 236 | |
| 237 | [<img src="https://img.shields.io/badge/download-blue?style=for-the-badge">](https://github.com/Tencent/ncnn/releases/latest/download/ncnn-20240820-watchos-simulator.zip) |
| 238 | |
| 239 | </td> |
| 240 | </tr> |
| 241 | <tr> |
| 242 | <td>tvOS</td> |
| 243 | <td> |
| 244 | |
| 245 | [<img src="https://img.shields.io/badge/download-blue?style=for-the-badge">](https://github.com/Tencent/ncnn/releases/latest/download/ncnn-20240820-tvos-vulkan.zip) |
| 246 | [<img src="https://img.shields.io/badge/+cpuonly-blue?style=for-the-badge">](https://github.com/Tencent/ncnn/releases/latest/download/ncnn-20240820-tvos.zip) |
| 247 | |
| 248 | </td> |
| 249 | <td rowspan=2> |
| 250 | |
| 251 | [<img src="https://img.shields.io/github/actions/workflow/status/Tencent/ncnn/tvos.yml?branch=master&style=for-the-badge&label=build">](https://github.com/Tencent/ncnn/actions?query=workflow%3Atvos) |
| 252 | |
| 253 | </td> |
| 254 | </tr> |
| 255 | <tr> |
| 256 | <td>tvOS-Simulator</td> |
| 257 | <td> |
| 258 | |
| 259 | [<img src="https://img.shields.io/badge/download-blue?style=for-the-badge">](https://github.com/Tencent/ncnn/releases/latest/download/ncnn-20240820-tvos-simulator-vulkan.zip) |
| 260 | [<img src="https://img.shields.io/badge/+cpuonly-blue?style=for-the-badge">](https://github.com/Tencent/ncnn/releases/latest/download/ncnn-20240820-tvos-simulator.zip) |
| 261 | |
| 262 | </td> |
| 263 | </tr> |
| 264 | <tr> |
| 265 | <td>visionOS</td> |
| 266 | <td> |
| 267 | |
| 268 | [<img src="https://img.shields.io/badge/download-blue?style=for-the-badge">](https://github.com/Tencent/ncnn/releases/latest/download/ncnn-20240820-visionos-vulkan.zip) |
| 269 | [<img src="https://img.shields.io/badge/+cpuonly-blue?style=for-the-badge">](https://github.com/Tencent/ncnn/releases/latest/download/ncnn-20240820-visionos.zip) |
| 270 | |
| 271 | </td> |
| 272 | <td rowspan=2> |
| 273 | |
| 274 | [<img src="https://img.shields.io/github/actions/workflow/status/Tencent/ncnn/visionos.yml?branch=master&style=for-the-badge&label=build">](https://github.com/Tencent/ncnn/actions?query=workflow%3Avisionos) |
| 275 | |
| 276 | </td> |
| 277 | </tr> |
| 278 | <tr> |
| 279 | <td>visionOS-Simulator</td> |
| 280 | <td> |
| 281 | |
| 282 | [<img src="https://img.shields.io/badge/download-blue?style=for-the-badge">](https://github.com/Tencent/ncnn/releases/latest/download/ncnn-20240820-visionos-simulator-vulkan.zip) |
| 283 | [<img src="https://img.shields.io/badge/+cpuonly-blue?style=for-the-badge">](https://github.com/Tencent/ncnn/releases/latest/download/ncnn-20240820-visionos-simulator.zip) |
| 284 | |
| 285 | </td> |
| 286 | </tr> |
| 287 | <tr> |
| 288 | <td>Apple xcframework</td> |
| 289 | <td> |
| 290 | |
| 291 | [<img src="https://img.shields.io/badge/download-blue?style=for-the-badge">](https://github.com/Tencent/ncnn/releases/latest/download/ncnn-20240820-apple-vulkan.zip) |
| 292 | [<img src="https://img.shields.io/badge/+cpuonly-blue?style=for-the-badge">](https://github.com/Tencent/ncnn/releases/latest/download/ncnn-20240820-apple.zip) |
| 293 | |
| 294 | </td> |
| 295 | <td rowspan=1> |
| 296 | |
| 297 | </td> |
| 298 | </tr> |
| 299 | |
| 300 | <tr> |
| 301 | <td rowspan=4> |
| 302 | <img src="https://user-images.githubusercontent.com/25181517/186884153-99edc188-e4aa-4c84-91b0-e2df260ebc33.png" width="120" height="auto"> |
| 303 | </td> |
| 304 | <td colspan=4> |
| 305 | |
| 306 | - [Build for Linux / NVIDIA Jetson / Raspberry Pi3, Pi4 / POWER](https://github.com/Tencent/ncnn/wiki/how-to-build#build-for-linux) |
| 307 | |
| 308 | </td> |
| 309 | </tr> |
| 310 | <tr> |
| 311 | <td>Ubuntu 20.04</td> |
| 312 | <td> |
| 313 | |
| 314 | [<img src="https://img.shields.io/badge/download-blue?style=for-the-badge">](https://github.com/Tencent/ncnn/releases/latest/download/ncnn-20240820-ubuntu-2004.zip) |
| 315 | [<img src="https://img.shields.io/badge/+shared-blue?style=for-the-badge">](https://github.com/Tencent/ncnn/releases/latest/download/ncnn-20240820-ubuntu-2004-shared.zip) |
| 316 | |
| 317 | </td> |
| 318 | <td rowspan=3> |
| 319 | |
| 320 | [<img src="https://img.shields.io/github/actions/workflow/status/Tencent/ncnn/linux-x64-gpu-gcc.yml?branch=master&style=for-the-badge&label=build">](https://github.com/Tencent/ncnn/actions?query=workflow%3Alinux-x64-gpu-gcc) |
| 321 | |
| 322 | </td> |
| 323 | </tr> |
| 324 | <tr> |
| 325 | <td>Ubuntu 22.04</td> |
| 326 | <td> |
| 327 | |
| 328 | [<img src="https://img.shields.io/badge/download-blue?style=for-the-badge">](https://github.com/Tencent/ncnn/releases/latest/download/ncnn-20240820-ubuntu-2204.zip) |
| 329 | [<img src="https://img.shields.io/badge/+shared-blue?style=for-the-badge">](https://github.com/Tencent/ncnn/releases/latest/download/ncnn-20240820-ubuntu-2204-shared.zip) |
| 330 | |
| 331 | </td> |
| 332 | </tr> |
| 333 | <tr> |
| 334 | <td>Ubuntu 24.04</td> |
| 335 | <td> |
| 336 | |
| 337 | [<img src="https://img.shields.io/badge/download-blue?style=for-the-badge">](https://github.com/Tencent/ncnn/releases/latest/download/ncnn-20240820-ubuntu-2404.zip) |
| 338 | [<img src="https://img.shields.io/badge/+shared-blue?style=for-the-badge">](https://github.com/Tencent/ncnn/releases/latest/download/ncnn-20240820-ubuntu-2404-shared.zip) |
| 339 | |
| 340 | </td> |
| 341 | </tr> |
| 342 | |
| 343 | <tr> |
| 344 | <td rowspan=5> |
| 345 | <img alt="windows" src="https://user-images.githubusercontent.com/25181517/186884150-05e9ff6d-340e-4802-9533-2c3f02363ee3.png" width="120" height="auto"> |
| 346 | </td> |
| 347 | <td colspan=3> |
| 348 | |
| 349 | - [Build for Windows x64 using VS2017](https://github.com/Tencent/ncnn/wiki/how-to-build#build-for-windows-x64-using-visual-studio-community-2017) |
| 350 | - [Build for Windows x64 using MinGW-w64](https://github.com/Tencent/ncnn/wiki/how-to-build#build-for-windows-x64-using-mingw-w64) |
| 351 | |
| 352 | </td> |
| 353 | </tr> |
| 354 | <tr> |
| 355 | <td>VS2015</td> |
| 356 | <td> |
| 357 | |
| 358 | [<img src="https://img.shields.io/badge/download-blue?style=for-the-badge">](https://github.com/Tencent/ncnn/releases/latest/download/ncnn-20240820-windows-vs2015.zip) |
| 359 | [<img src="https://img.shields.io/badge/+shared-blue?style=for-the-badge">](https://github.com/Tencent/ncnn/releases/latest/download/ncnn-20240820-windows-vs2015-shared.zip) |
| 360 | |
| 361 | </td> |
| 362 | <td rowspan=4> |
| 363 | |
| 364 | [<img src="https://img.shields.io/github/actions/workflow/status/Tencent/ncnn/windows.yml?branch=master&style=for-the-badge&label=build">](https://github.com/Tencent/ncnn/actions?query=workflow%3Awindows) |
| 365 | |
| 366 | </td> |
| 367 | </tr> |
| 368 | <tr> |
| 369 | <td>VS2017</td> |
| 370 | <td> |
| 371 | |
| 372 | [<img src="https://img.shields.io/badge/download-blue?style=for-the-badge">](https://github.com/Tencent/ncnn/releases/latest/download/ncnn-20240820-windows-vs2017.zip) |
| 373 | [<img src="https://img.shields.io/badge/+shared-blue?style=for-the-badge">](https://github.com/Tencent/ncnn/releases/latest/download/ncnn-20240820-windows-vs2017-shared.zip) |
| 374 | |
| 375 | </td> |
| 376 | </tr> |
| 377 | <tr> |
| 378 | <td>VS2019</td> |
| 379 | <td> |
| 380 | |
| 381 | [<img src="https://img.shields.io/badge/download-blue?style=for-the-badge">](https://github.com/Tencent/ncnn/releases/latest/download/ncnn-20240820-windows-vs2019.zip) |
| 382 | [<img src="https://img.shields.io/badge/+shared-blue?style=for-the-badge">](https://github.com/Tencent/ncnn/releases/latest/download/ncnn-20240820-windows-vs2019-shared.zip) |
| 383 | |
| 384 | </td> |
| 385 | </tr> |
| 386 | <tr> |
| 387 | <td>VS2022</td> |
| 388 | <td> |
| 389 | |
| 390 | [<img src="https://img.shields.io/badge/download-blue?style=for-the-badge">](https://github.com/Tencent/ncnn/releases/latest/download/ncnn-20240820-windows-vs2022.zip) |
| 391 | [<img src="https://img.shields.io/badge/+shared-blue?style=for-the-badge">](https://github.com/Tencent/ncnn/releases/latest/download/ncnn-20240820-windows-vs2022-shared.zip) |
| 392 | |
| 393 | </td> |
| 394 | </tr> |
| 395 | |
| 396 | <tr> |
| 397 | <td rowspan=2> |
| 398 | <img src="https://user-images.githubusercontent.com/25181517/188324036-d704ac9a-6e61-4722-b978-254b25b61bed.png" width="120" height="auto"> |
| 399 | </td> |
| 400 | <td colspan=3> |
| 401 | |
| 402 | - [Build for WebAssembly](https://github.com/Tencent/ncnn/wiki/how-to-build#build-for-webassembly) |
| 403 | |
| 404 | </td> |
| 405 | </tr> |
| 406 | <tr> |
| 407 | <td>WebAssembly</td> |
| 408 | <td> |
| 409 | |
| 410 | [<img src="https://img.shields.io/badge/download-blue?style=for-the-badge">](https://github.com/Tencent/ncnn/releases/latest/download/ncnn-20240820-webassembly.zip) |
| 411 | |
| 412 | </td> |
| 413 | <td> |
| 414 | |
| 415 | [<img src="https://img.shields.io/github/actions/workflow/status/Tencent/ncnn/web-assembly.yml?branch=master&style=for-the-badge&label=build">](https://github.com/Tencent/ncnn/actions?query=workflow%3Aweb-assembly) |
| 416 | |
| 417 | </td> |
| 418 | </tr> |
| 419 | |
| 420 | <tr> |
| 421 | <td rowspan=8> |
| 422 | <img src="https://github.com/marwin1991/profile-technology-icons/assets/76662862/2481dc48-be6b-4ebb-9e8c-3b957efe69fa" width="120" height="auto"> |
| 423 | </td> |
| 424 | <td colspan=3> |
| 425 | |
| 426 | - [Build for ARM Cortex-A family with cross-compiling](https://github.com/Tencent/ncnn/wiki/how-to-build#build-for-arm-cortex-a-family-with-cross-compiling) |
| 427 | - [Build for Hisilicon platform with cross-compiling](https://github.com/Tencent/ncnn/wiki/how-to-build#build-for-hisilicon-platform-with-cross-compiling) |
| 428 | - [Build for AllWinner D1](https://github.com/Tencent/ncnn/wiki/how-to-build#build-for-allwinner-d1) |
| 429 | - [Build for Loongson 2K1000](https://github.com/Tencent/ncnn/wiki/how-to-build#build-for-loongson-2k1000) |
| 430 | - [Build for QNX](https://github.com/Tencent/ncnn/wiki/how-to-build#build-for-qnx) |
| 431 | |
| 432 | </td> |
| 433 | </tr> |
| 434 | <tr> |
| 435 | <td>Linux (arm)</td> |
| 436 | <td></td> |
| 437 | <td> |
| 438 | |
| 439 | [<img src="https://img.shields.io/github/actions/workflow/status/Tencent/ncnn/linux-arm-cpu-gcc.yml?branch=master&style=for-the-badge&label=build">](https://github.com/Tencent/ncnn/actions?query=workflow%3Alinux-arm-cpu-gcc) |
| 440 | |
| 441 | </td> |
| 442 | </tr> |
| 443 | <tr> |
| 444 | <td>Linux (aarch64)</td> |
| 445 | <td></td> |
| 446 | <td> |
| 447 | |
| 448 | [<img src="https://img.shields.io/github/actions/workflow/status/Tencent/ncnn/linux-aarch64-cpu-gcc.yml?branch=master&style=for-the-badge&label=build">](https://github.com/Tencent/ncnn/actions?query=workflow%3Alinux-aarch64-cpu-gcc) |
| 449 | |
| 450 | </td> |
| 451 | </tr> |
| 452 | <tr> |
| 453 | <td>Linux (mips)</td> |
| 454 | <td></td> |
| 455 | <td> |
| 456 | |
| 457 | [<img src="https://img.shields.io/github/actions/workflow/status/Tencent/ncnn/linux-mips-cpu-gcc.yml?branch=master&style=for-the-badge&label=build">](https://github.com/Tencent/ncnn/actions?query=workflow%3Alinux-mips-cpu-gcc) |
| 458 | |
| 459 | </td> |
| 460 | </tr> |
| 461 | <tr> |
| 462 | <td>Linux (mips64)</td> |
| 463 | <td></td> |
| 464 | <td> |
| 465 | |
| 466 | [<img src="https://img.shields.io/github/actions/workflow/status/Tencent/ncnn/linux-mips64-cpu-gcc.yml?branch=master&style=for-the-badge&label=build">](https://github.com/Tencent/ncnn/actions?query=workflow%3Alinux-mips64-cpu-gcc) |
| 467 | |
| 468 | </td> |
| 469 | </tr> |
| 470 | <tr> |
| 471 | <td>Linux (ppc64)</td> |
| 472 | <td></td> |
| 473 | <td> |
| 474 | |
| 475 | [<img src="https://img.shields.io/github/actions/workflow/status/Tencent/ncnn/linux-ppc64-cpu-gcc.yml?branch=master&style=for-the-badge&label=build">](https://github.com/Tencent/ncnn/actions?query=workflow%3Alinux-ppc64-cpu-gcc) |
| 476 | |
| 477 | </td> |
| 478 | </tr> |
| 479 | <tr> |
| 480 | <td>Linux (riscv64)</td> |
| 481 | <td></td> |
| 482 | <td> |
| 483 | |
| 484 | [<img src="https://img.shields.io/github/actions/workflow/status/Tencent/ncnn/linux-riscv64-cpu-gcc.yml?branch=master&style=for-the-badge&label=build">](https://github.com/Tencent/ncnn/actions?query=workflow%3Alinux-riscv64-cpu-gcc) |
| 485 | |
| 486 | </td> |
| 487 | </tr> |
| 488 | <tr> |
| 489 | <td>Linux (loongarch64)</td> |
| 490 | <td></td> |
| 491 | <td> |
| 492 | |
| 493 | [<img src="https://img.shields.io/github/actions/workflow/status/Tencent/ncnn/linux-loongarch64-cpu-gcc.yml?branch=master&style=for-the-badge&label=build">](https://github.com/Tencent/ncnn/actions?query=workflow%3Alinux-loongarch64-cpu-gcc) |
| 494 | |
| 495 | </td> |
| 496 | </tr> |
| 497 | |
| 498 | </table> |
| 499 | |
| 500 | |
| 501 | --- |
| 502 | |
| 503 | ## Support most commonly used CNN network |
| 504 | |
| 505 | ## 支持大部分常用的 CNN 网络 |
| 506 | |
| 507 | - Classical CNN: |
| 508 | [VGG](https://github.com/BVLC/caffe/wiki/Model-Zoo#models-used-by-the-vgg-team-in-ilsvrc-2014) |
| 509 | [AlexNet](https://github.com/BVLC/caffe/tree/9b891540183ddc834a02b2bd81b31afae71b2153/models/bvlc_alexnet) |
| 510 | [GoogleNet](https://github.com/BVLC/caffe/tree/9b891540183ddc834a02b2bd81b31afae71b2153/models/bvlc_googlenet) |
| 511 | Inception |
| 512 | ... |
| 513 | - Practical CNN: |
| 514 | [ResNet](https://github.com/tornadomeet/ResNet) |
| 515 | [DenseNet](https://github.com/liuzhuang13/DenseNet) |
| 516 | [SENet](https://github.com/hujie-frank/SENet) |
| 517 | [FPN](https://github.com/unsky/FPN) |
| 518 | ... |
| 519 | - Light-weight CNN: |
| 520 | [SqueezeNet](https://github.com/forresti/SqueezeNet) |
| 521 | [MobileNetV1](https://github.com/tensorflow/models/blob/master/research/slim/nets/mobilenet_v1.md) |
| 522 | [MobileNetV2/V3](https://github.com/tensorflow/models/blob/master/research/slim/nets/mobilenet/README.md) |
| 523 | [ShuffleNetV1](https://github.com/farmingyard/ShuffleNet) |
| 524 | [ShuffleNetV2](https://github.com/opconty/keras-shufflenetV2) |
| 525 | [MNasNet](https://github.com/tensorflow/models/tree/master/research/slim/nets/nasnet) |
| 526 | ... |
| 527 | - Face Detection: |
| 528 | [MTCNN](https://github.com/ipazc/mtcnn) |
| 529 | [RetinaFace](https://github.com/biubug6/Pytorch_Retinaface) |
| 530 | [scrfd](https://github.com/nihui/ncnn-android-scrfd) |
| 531 | ... |
| 532 | - Detection: |
| 533 | [VGG-SSD](https://github.com/lzx1413/CAFFE_SSD) |
| 534 | [MobileNet-SSD](https://github.com/chuanqi305/MobileNet-SSD) |
| 535 | [SqueezeNet-SSD](https://github.com/chuanqi305/SqueezeNet-SSD) |
| 536 | [MobileNetV2-SSDLite](https://github.com/chuanqi305/MobileNetv2-SSDLite) |
| 537 | [MobileNetV3-SSDLite](https://github.com/XiaoyuHuang96/MobilenetV3SSDLite-tfkeras) |
| 538 | ... |
| 539 | - Detection: |
| 540 | [Faster-RCNN](https://github.com/rbgirshick/py-faster-rcnn) |
| 541 | [R-FCN](https://github.com/daijifeng001/R-FCN) |
| 542 | ... |
| 543 | - Detection: |
| 544 | [YOLOv2](https://github.com/longcw/yolo2-pytorch) |
| 545 | [YOLOv3](https://github.com/ultralytics/yolov3) |
| 546 | [MobileNet-YOLOv3](https://github.com/eric612/MobileNet-YOLO) |
| 547 | [YOLOv4](https://github.com/Tianxiaomo/pytorch-YOLOv4) |
| 548 | [YOLOv5](https://github.com/ultralytics/yolov5) |
| 549 | [YOLOv7](https://github.com/WongKinYiu/yolov7) |
| 550 | [YOLOX](https://github.com/Megvii-BaseDetection/YOLOX) |
| 551 | ... |
| 552 | - Detection: |
| 553 | [NanoDet](https://github.com/RangiLyu/nanodet) |
| 554 | - Segmentation: |
| 555 | [FCN](https://github.com/unsky/FPN) |
| 556 | [PSPNet](https://github.com/hszhao/PSPNet) |
| 557 | [UNet](https://github.com/zhixuhao/unet) |
| 558 | [YOLACT](https://github.com/dbolya/yolact) |
| 559 | ... |
| 560 | - Pose Estimation: |
| 561 | [SimplePose](https://github.com/dog-qiuqiu/Ultralight-SimplePose) |
| 562 | ... |
| 563 | |
| 564 | --- |
| 565 | |
| 566 | ## HowTo |
| 567 | |
| 568 | **[use ncnn with alexnet](https://github.com/Tencent/ncnn/wiki/use-ncnn-with-alexnet) with detailed steps, recommended for beginners :)** |
| 569 | |
| 570 | **[ncnn 组件使用指北 alexnet](https://github.com/Tencent/ncnn/wiki/use-ncnn-with-alexnet.zh) 附带详细步骤,新人强烈推荐 :)** |
| 571 | |
| 572 | **[use netron for ncnn model visualization](https://netron.app)** |
| 573 | |
| 574 | **[use ncnn with pytorch or onnx](https://github.com/Tencent/ncnn/wiki/use-ncnn-with-pytorch-or-onnx)** |
| 575 | |
| 576 | [ncnn low-level operation api](https://github.com/Tencent/ncnn/wiki/low-level-operation-api) |
| 577 | |
| 578 | [ncnn param and model file spec](https://github.com/Tencent/ncnn/wiki/param-and-model-file-structure) |
| 579 | |
| 580 | [ncnn operation param weight table](https://github.com/Tencent/ncnn/wiki/operation-param-weight-table) |
| 581 | |
| 582 | [how to implement custom layer step by step](https://github.com/Tencent/ncnn/wiki/how-to-implement-custom-layer-step-by-step) |
| 583 | |
| 584 | --- |
| 585 | |
| 586 | ## FAQ |
| 587 | |
| 588 | **[ncnn throw error](https://github.com/Tencent/ncnn/wiki/FAQ-ncnn-throw-error)** |
| 589 | |
| 590 | **[ncnn produce wrong result](https://github.com/Tencent/ncnn/wiki/FAQ-ncnn-produce-wrong-result)** |
| 591 | |
| 592 | **[ncnn vulkan](https://github.com/Tencent/ncnn/wiki/FAQ-ncnn-vulkan)** |
| 593 | |
| 594 | --- |
| 595 | |
| 596 | ## Features |
| 597 | |
| 598 | - Supports convolutional neural networks, supports multiple input and multi-branch structure, can calculate part of the branch |
| 599 | - No third-party library dependencies, does not rely on BLAS / NNPACK or any other computing framework |
| 600 | - Pure C++ implementation, cross-platform, supports Android, iOS and so on |
| 601 | - ARM NEON assembly level of careful optimization, calculation speed is extremely high |
| 602 | - Sophisticated memory management and data structure design, very low memory footprint |
| 603 | - Supports multi-core parallel computing acceleration, ARM big.LITTLE CPU scheduling optimization |
| 604 | - Supports GPU acceleration via the next-generation low-overhead Vulkan API |
| 605 | - Extensible model design, supports 8bit quantization and half-precision floating point storage, can import caffe/pytorch/mxnet/onnx/darknet/keras/tensorflow(mlir) models |
| 606 | - Support direct memory zero copy reference load network model |
| 607 | - Can be registered with custom layer implementation and extended |
| 608 | - Well, it is strong, not afraid of being stuffed with 卷 QvQ |
| 609 | |
| 610 | ## 功能概述 |
| 611 | |
| 612 | - 支持卷积神经网络,支持多输入和多分支结构,可计算部分分支 |
| 613 | - 无任何第三方库依赖,不依赖 BLAS/NNPACK 等计算框架 |
| 614 | - 纯 C++ 实现,跨平台,支持 Android / iOS 等 |
| 615 | - ARM Neon 汇编级良心优化,计算速度极快 |
| 616 | - 精细的内存管理和数据结构设计,内存占用极低 |
| 617 | - 支持多核并行计算加速,ARM big.LITTLE CPU 调度优化 |
| 618 | - 支持基于全新低消耗的 Vulkan API GPU 加速 |
| 619 | - 可扩展的模型设计,支持 8bit [量化](tools/quantize) 和半精度浮点存储,可导入 caffe/pytorch/mxnet/onnx/darknet/keras/tensorflow(mlir) 模型 |
| 620 | - 支持直接内存零拷贝引用加载网络模型 |
| 621 | - 可注册自定义层实现并扩展 |
| 622 | - 恩,很强就是了,不怕被塞卷 QvQ |
| 623 | |
| 624 | --- |
| 625 | |
| 626 | ## supported platform matrix |
| 627 | |
| 628 | - ✅ = known work and runs fast with good optimization |
| 629 | - ✔️ = known work, but speed may not be fast enough |
| 630 | - ❔ = shall work, not confirmed |
| 631 | - / = not applied |
| 632 | |
| 633 | | | Windows | Linux | Android | macOS | iOS | |
| 634 | | ---------- | ------- | ----- | ------- | ----- | --- | |
| 635 | | intel-cpu | ✔️ | ✔️ | ❔ | ✔️ | / | |
| 636 | | intel-gpu | ✔️ | ✔️ | ❔ | ❔ | / | |
| 637 | | amd-cpu | ✔️ | ✔️ | ❔ | ✔️ | / | |
| 638 | | amd-gpu | ✔️ | ✔️ | ❔ | ❔ | / | |
| 639 | | nvidia-gpu | ✔️ | ✔️ | ❔ | ❔ | / | |
| 640 | | qcom-cpu | ❔ | ✔️ | ✅ | / | / | |
| 641 | | qcom-gpu | ❔ | ✔️ | ✔️ | / | / | |
| 642 | | arm-cpu | ❔ | ❔ | ✅ | / | / | |
| 643 | | arm-gpu | ❔ | ❔ | ✔️ | / | / | |
| 644 | | apple-cpu | / | / | / | ✔️ | ✅ | |
| 645 | | apple-gpu | / | / | / | ✔️ | ✔️ | |
| 646 | | ibm-cpu | / | ✔️ | / | / | / | |
| 647 | |
| 648 | --- |
| 649 | |
| 650 | ## Project examples |
| 651 | |
| 652 | - <https://github.com/nihui/ncnn-android-squeezenet> |
| 653 | - <https://github.com/nihui/ncnn-android-styletransfer> |
| 654 | - <https://github.com/nihui/ncnn-android-mobilenetssd> |
| 655 | - <https://github.com/moli232777144/mtcnn_ncnn> |
| 656 | - <https://github.com/nihui/ncnn-android-yolov5> |
| 657 | - <https://github.com/xiang-wuu/ncnn-android-yolov7> |
| 658 | - <https://github.com/nihui/ncnn-android-scrfd> 🤩 |
| 659 | - <https://github.com/shaoshengsong/qt_android_ncnn_lib_encrypt_example> |
| 660 | |
| 661 | <img src="https://github.com/nihui/ncnn-assets/raw/master/20181217/ncnn-2.jpg" height ="230"/><img src="https://github.com/nihui/ncnn-assets/raw/master/20181217/4.jpg" height ="230"/><img src="https://github.com/nihui/ncnn-assets/raw/master/20181217/ncnn-33.jpg" height ="230"/><img src="https://github.com/nihui/ncnn-assets/raw/master/20181217/ncnn-m.png" height ="230"/><img src="https://github.com/nihui/ncnn-android-yolov5/raw/master/screenshot.jpg" height ="230"/><img src="https://github.com/nihui/ncnn-android-scrfd/raw/master/screenshot.jpg" height ="230"/><br> |
| 662 | |
| 663 | - <https://github.com/magicse/ncnn-colorization-siggraph17><br> |
| 664 | <img src="https://user-images.githubusercontent.com/13585785/189326958-f5a8d6f8-caef-49bf-88da-ae494371195d.jpg" width ="700"/> |
| 665 | |
| 666 | - <https://github.com/mizu-bai/ncnn-fortran> Call ncnn from Fortran |
| 667 | |
| 668 | - <https://github.com/k2-fsa/sherpa> Use ncnn for real-time speech |
| 669 | recognition (i.e., speech-to-text); also support embedded devices and provide |
| 670 | mobile Apps (e.g., Android App) |
| 671 | |
| 672 | --- |
| 673 | |
| 674 | ## License |
| 675 | |
| 676 | [BSD 3 Clause](LICENSE.txt) |