You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

README.md 27 kB

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