ncnn

2025-12-10 0 788

ncnn

ncnn is a highperformance 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 是一个为手机端极致优化的高性能神经网络前向计算框架。
ncnn 从设计之初深刻考虑手机端的部署和使用。
无第三方依赖,跨平台,手机端 cpu 的速度快于目前所有已知的开源框架。
基于 ncnn,开发者能够将深度学习算法轻松移植到手机端高效执行,
开发出人工智能 APP,将 AI 带到你的指尖。
ncnn 目前已在腾讯多款应用中使用,如:QQ,Qzone,微信,天天 P 图等。


技术交流 QQ 群
637093648 (超多大佬)
答案:卷卷卷卷卷(已满)
Telegram Group

https://t.*me/n**cnnyes

Discord Channel

https://d*isco**rd.gg/YRsxgmF

Pocky QQ 群(MLIR YES!)
677104663 (超多大佬)
答案:multi-level intermediate representation
他们都不知道 pnnx 有多好用群
818998520 (新群!)

Download & Build status

https://github**.c*om/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
  • Build for Android
  • Build for Termux on Android
Android

Android shared

  • Build for HarmonyOS with cross-compiling
HarmonyOS
HarmonyOS shared
  • Build for iOS on macOS with xcode
iOS

iOS-Simulator

  • Build for macOS
macOS

Mac-Catalyst

watchOS
watchOS-Simulator
tvOS

tvOS-Simulator

visionOS

visionOS-Simulator

Apple xcframework

  • Build for Linux / NVIDIA Jetson / Raspberry Pi3, Pi4 / POWER
Ubuntu 22.04

Ubuntu 24.04

  • Build for Windows x64 using VS2017
  • Build for Windows x64 using MinGW-w64
VS2015

VS2017

VS2019

VS2022

  • Build for WebAssembly
WebAssembly
  • Build for ARM Cortex-A family with cross-compiling
  • Build for Hisilicon platform with cross-compiling
  • Build for AllWinner D1
  • Build for Loongson 2K1000
  • Build for QNX
Linux (arm)
Linux (aarch64)
Linux (mips)
Linux (mips64)
Linux (ppc64)
Linux (riscv64)
Linux (loongarch64)

Support most commonly used CNN network

支持大部分常用的 CNN 网络

  • 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
    YOLOv8
  • Detection:
    NanoDet
  • Segmentation:
    FCN
    PSPNet
    UNet
    YOLACT
  • Pose Estimation:
    SimplePose

HowTo

use ncnn with alexnet with detailed steps, recommended for beginners 🙂

ncnn 组件使用指北 alexnet 附带详细步骤,新人强烈推荐 🙂

use netron for ncnn model visualization

use ncnn with pytorch or onnx

ncnn low-level operation api

ncnn param and model file spec

ncnn operation param weight table

how to implement custom layer step by step


FAQ

ncnn deepwiki LLM Answering Questions 😉

ncnn throw error

ncnn produce wrong result

ncnn vulkan


Features

  • 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

supported platform matrix

  • ✅ = 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 / ✔️ / / /

Project examples

  • https://g*it*h*ub.com/nihui/ncnn-android-squeezenet
  • https://git*hub*.*com/nihui/ncnn-android-styletransfer
  • https://gi*t*h*ub.com/nihui/ncnn-android-mobilenetssd
  • https://gith*ub.c*o*m/moli232777144/mtcnn_ncnn
  • https://g*it*h*ub.com/nihui/ncnn-android-yolov5
  • https://github**.c*om/xiang-wuu/ncnn-android-yolov7
  • https://git*hub.co*m*/nihui/ncnn-android-scrfd ?
  • https://*github.c**om/shaoshengsong/qt_android_ncnn_lib_encrypt_example

  • https://gith*ub*.com*/magicse/ncnn-colorization-siggraph17
  • https://gi*thub*.com*/mizu-bai/ncnn-fortran Call ncnn from Fortran

  • https://githu*b.c**om/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)


License

BSD 3 Clause

下载源码

通过命令行克隆项目:

git clone https://github.com/Tencent/ncnn.git

收藏 (0) 打赏

感谢您的支持,我会继续努力的!

打开微信/支付宝扫一扫,即可进行扫码打赏哦,分享从这里开始,精彩与您同在
点赞 (0)

申明:本文由第三方发布,内容仅代表作者观点,与本网站无关。对本文以及其中全部或者部分内容的真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。本网发布或转载文章出于传递更多信息之目的,并不意味着赞同其观点或证实其描述,也不代表本网对其真实性负责。

左子网 编程相关 ncnn https://www.zuozi.net/33444.html

常见问题
  • 1、自动:拍下后,点击(下载)链接即可下载;2、手动:拍下后,联系卖家发放即可或者联系官方找开发者发货。
查看详情
  • 1、源码默认交易周期:手动发货商品为1-3天,并且用户付款金额将会进入平台担保直到交易完成或者3-7天即可发放,如遇纠纷无限期延长收款金额直至纠纷解决或者退款!;
查看详情
  • 1、描述:源码描述(含标题)与实际源码不一致的(例:货不对板); 2、演示:有演示站时,与实际源码小于95%一致的(但描述中有”不保证完全一样、有变化的可能性”类似显著声明的除外); 3、发货:不发货可无理由退款; 4、安装:免费提供安装服务的源码但卖家不履行的; 5、收费:价格虚标,额外收取其他费用的(但描述中有显著声明或双方交易前有商定的除外); 6、其他:如质量方面的硬性常规问题BUG等。 注:经核实符合上述任一,均支持退款,但卖家予以积极解决问题则除外。
查看详情
  • 1、左子会对双方交易的过程及交易商品的快照进行永久存档,以确保交易的真实、有效、安全! 2、左子无法对如“永久包更新”、“永久技术支持”等类似交易之后的商家承诺做担保,请买家自行鉴别; 3、在源码同时有网站演示与图片演示,且站演与图演不一致时,默认按图演作为纠纷评判依据(特别声明或有商定除外); 4、在没有”无任何正当退款依据”的前提下,商品写有”一旦售出,概不支持退款”等类似的声明,视为无效声明; 5、在未拍下前,双方在QQ上所商定的交易内容,亦可成为纠纷评判依据(商定与描述冲突时,商定为准); 6、因聊天记录可作为纠纷评判依据,故双方联系时,只与对方在左子上所留的QQ、手机号沟通,以防对方不承认自我承诺。 7、虽然交易产生纠纷的几率很小,但一定要保留如聊天记录、手机短信等这样的重要信息,以防产生纠纷时便于左子介入快速处理。
查看详情

相关文章

猜你喜欢
发表评论
暂无评论
官方客服团队

为您解决烦忧 - 24小时在线 专业服务