ncnn is a high-performance neural network inference computing framework optimized for mobile platforms. ncnn is deeply considerate about deployment and uses on mobile phones from the beginning of design. ncnn does not have third-party dependencies. It is cross-platform and runs faster than all known open-source frameworks on mobile phone cpu. 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. ncnn is currently being used in many Tencent applications, such as QQ, Qzone, WeChat, Pitu, and so on.
ncnn
637093648 ( |
Telegram Group | Discord Channel |
Pocky QQ 677104663 ( |
||
818998520 ( |
https://github.com/Tencent/ncnn/releases/latest
how to build ncnn library on Linux / Windows / macOS / Raspberry Pi3, Pi4 / POWER / Android / NVIDIA Jetson / iOS / WebAssembly / AllWinner D1 / Loongson 2K1000 |
||||
Source | ||||
Android | ||||
Android shared | ||||
HarmonyOS | ||||
HarmonyOS shared | ||||
iOS | ||||
iOS-Simulator | ||||
macOS | ||||
Mac-Catalyst | ||||
watchOS | ||||
watchOS-Simulator | ||||
tvOS | ||||
tvOS-Simulator | ||||
visionOS | ||||
visionOS-Simulator | ||||
Apple xcframework | ||||
Ubuntu 20.04 | ||||
Ubuntu 22.04 | ||||
Ubuntu 24.04 | ||||
VS2015 | ||||
VS2017 | ||||
VS2019 | ||||
VS2022 | ||||
WebAssembly | ||||
Linux (arm) | ||||
Linux (aarch64) | ||||
Linux (mips) | ||||
Linux (mips64) | ||||
Linux (ppc64) | ||||
Linux (riscv64) | ||||
Linux (loongarch64) |
- Classical CNN: VGG AlexNet GoogleNet Inception ...
- Practical CNN: ResNet DenseNet SENet FPN ...
- Light-weight CNN: SqueezeNet MobileNetV1 MobileNetV2/V3 ShuffleNetV1 ShuffleNetV2 MNasNet ...
- Face Detection: MTCNN RetinaFace scrfd ...
- Detection: VGG-SSD MobileNet-SSD SqueezeNet-SSD MobileNetV2-SSDLite MobileNetV3-SSDLite ...
- Detection: Faster-RCNN R-FCN ...
- Detection: YOLOv2 YOLOv3 MobileNet-YOLOv3 YOLOv4 YOLOv5 YOLOv7 YOLOX ...
- Detection: NanoDet
- Segmentation: FCN PSPNet UNet YOLACT ...
- Pose Estimation: SimplePose ...
use ncnn with alexnet with detailed steps, recommended for beginners :)
ncnn 组件
use netron for ncnn model visualization
ncnn param and model file spec
ncnn operation param weight table
how to implement custom layer step by step
- Supports convolutional neural networks, supports multiple input and multi-branch structure, can calculate part of the branch
- No third-party library dependencies, does not rely on BLAS / NNPACK or any other computing framework
- Pure C++ implementation, cross-platform, supports Android, iOS and so on
- ARM NEON assembly level of careful optimization, calculation speed is extremely high
- Sophisticated memory management and data structure design, very low memory footprint
- Supports multi-core parallel computing acceleration, ARM big.LITTLE CPU scheduling optimization
- Supports GPU acceleration via the next-generation low-overhead Vulkan API
- Extensible model design, supports 8bit quantization and half-precision floating point storage, can import caffe/pytorch/mxnet/onnx/darknet/keras/tensorflow(mlir) models
- Support direct memory zero copy reference load network model
- Can be registered with custom layer implementation and extended
- Well, it is strong, not afraid of being stuffed with
卷 QvQ
支持 卷 积神经网络,支持 多 输入和 多分 支 结构,可 计算部分 分 支 - 无任
何 第 三 方 库依赖,不 依 赖 BLAS/NNPACK等 计算框 架 - 纯 C++ 实现,
跨 平台 ,支持 Android / iOS等 - ARM Neon 汇编级良
心 优化,计算速度 极快 精 细的内 存 管理 和 数 据 结构设计,内 存 占 用 极低支持 多核 并行计算加速 ,ARM big.LITTLE CPU 调度优化支持 基 于全新 低 消耗 的 Vulkan API GPU加速 可 扩展的 模型 设计,支持 8bit量 化 和 半 精度 浮点存 储,可 导入 caffe/pytorch/mxnet/onnx/darknet/keras/tensorflow(mlir)模型 支持 直接 内 存 零 拷贝引用 加 载网络模型 可 注 册 自 定 义层实现并扩展 恩 ,很强就是了 ,不 怕被塞 卷 QvQ
- ✅ = known work and runs fast with good optimization
- ✔️ = known work, but speed may not be fast enough
- ❔ = shall work, not confirmed
- / = not applied
Windows | Linux | Android | macOS | iOS | |
---|---|---|---|---|---|
intel-cpu | ✔️ | ✔️ | ❔ | ✔️ | / |
intel-gpu | ✔️ | ✔️ | ❔ | ❔ | / |
amd-cpu | ✔️ | ✔️ | ❔ | ✔️ | / |
amd-gpu | ✔️ | ✔️ | ❔ | ❔ | / |
nvidia-gpu | ✔️ | ✔️ | ❔ | ❔ | / |
qcom-cpu | ❔ | ✔️ | ✅ | / | / |
qcom-gpu | ❔ | ✔️ | ✔️ | / | / |
arm-cpu | ❔ | ❔ | ✅ | / | / |
arm-gpu | ❔ | ❔ | ✔️ | / | / |
apple-cpu | / | / | / | ✔️ | ✅ |
apple-gpu | / | / | / | ✔️ | ✔️ |
ibm-cpu | / | ✔️ | / | / | / |
- https://github.com/nihui/ncnn-android-squeezenet
- https://github.com/nihui/ncnn-android-styletransfer
- https://github.com/nihui/ncnn-android-mobilenetssd
- https://github.com/moli232777144/mtcnn_ncnn
- https://github.com/nihui/ncnn-android-yolov5
- https://github.com/xiang-wuu/ncnn-android-yolov7
- https://github.com/nihui/ncnn-android-scrfd 🤩
- https://github.com/shaoshengsong/qt_android_ncnn_lib_encrypt_example
-
https://github.com/mizu-bai/ncnn-fortran Call ncnn from Fortran
-
https://github.com/k2-fsa/sherpa Use ncnn for real-time speech recognition (i.e., speech-to-text); also support embedded devices and provide mobile Apps (e.g., Android App)