ncnn
ncnn is a high-performance neural network inference framework optimized for the mobile platform
Decision gist · record as of 2026-08-14
Yes, if you have pre-trained models to deploy and need efficient inference on mobile or embedded hardware. The permissive BSD-3 license and active maintenance are favorable. Install friction is moderate due to compiled wheels, but pre-built binaries for common platforms reduce friction. Not suitable if you need to train models or require a high-level training API—ncnn is inference-only. Verify that your target platform and model architecture are supported before committing.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires pre-converted ncnn model files (.param and .bin); use pnnx to convert PyTorch or ONNX models first.
- Medium install friction due to compiled wheels across many platforms (macOS, Linux, Windows, various architectures).
- Active maintenance with recent releases; last commit 2026-08-13.
License · maintenance · safety
BSD-3 (permissive) — BSD-3 permissive license allows commercial and private use with minimal restrictions; you must include the license text in distributions.
last release 2026-05-26 (80 days) · last repo commit 2026-08-13 · 23,698 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 242,789 downloads/mo, #8,839 on PyPI
Alternatives
Verify before relying
pip install ncnn
import ncnn
import numpy as np
net = ncnn.Net()
net.load_param("model.ncnn.param")
net.load_model("model.ncnn.bin")
x = np.zeros((3, 224, 224), np.float32)
mat = ncnn.Mat(x)
ex = net.create_extractor()
ex.input("in0", mat)
ret, out = ex.extract("out0")- Whether Vulkan GPU acceleration is available on all supported platforms or requires additional system libraries.
- Performance benchmarks compared to other inference frameworks on target hardware.
- Supported model architectures and any limitations in layer coverage.
What it is and what it does
ncnn is a C++-based neural network inference engine with Python bindings that specializes in running pre-trained deep learning models efficiently on mobile, embedded, and desktop hardware. It provides CPU and Vulkan GPU backends and is designed to minimize latency and memory footprint for deployment scenarios where model training is not needed—only inference. The typical workflow involves converting a PyTorch or ONNX model to ncnn format using the pnnx tool, then loading and executing the converted model files (.param and .bin) through the Python API.
The package depends on numpy for array handling, opencv-python for image operations, and utility libraries (tqdm, requests, portalocker) for model downloading and progress tracking. It is actively maintained by Tencent and widely used in production applications. Pre-built wheels are available for many platforms and Python versions, though installation involves compiled binaries that may require platform-specific dependencies.
Use it for
- Deploy trained PyTorch or ONNX models to mobile phones or edge devices for real-time inference without model training.
- Run computer vision models (image classification, object detection) on resource-constrained hardware with minimal latency.
- Accelerate inference on desktop or server CPUs using optimized C++ execution with Python control.
- Build inference pipelines that load and execute multiple pre-converted models sequentially or in parallel.
- Integrate deep learning inference into applications targeting iOS, Android, or embedded Linux platforms.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you have pre-trained models to deploy and need efficient inference on mobile or embedded hardware.
The permissive BSD-3 license and active maintenance are favorable. Install friction is moderate due to compiled wheels, but pre-built binaries for common platforms reduce friction. Not suitable if you need to train models or require a high-level training API—ncnn is inference-only. Verify that your target platform and model architecture are supported before committing.
Install
ncnn on PyPI
Before you install
Medium install friction due to compiled wheels across many platforms (macOS, Linux, Windows, various architectures). Active maintenance with recent releases; last commit 2026-08-13. Depends on numpy, opencv-python, tqdm, requests, and portalocker.
Requires pre-converted ncnn model files (.param and .bin); use pnnx to convert PyTorch or ONNX models first.
License in practice
BSD-3 permissive license allows commercial and private use with minimal restrictions; you must include the license text in distributions.
Quickstart
pip install ncnn
import ncnn
import numpy as np
net = ncnn.Net()
net.load_param("model.ncnn.param")
net.load_model("model.ncnn.bin")
x = np.zeros((3, 224, 224), np.float32)
mat = ncnn.Mat(x)
ex = net.create_extractor()
ex.input("in0", mat)
ret, out = ex.extract("out0")
Verify before relying
- Whether Vulkan GPU acceleration is available on all supported platforms or requires additional system libraries.
- Performance benchmarks compared to other inference frameworks on target hardware.
- Supported model architectures and any limitations in layer coverage.
Package facts
| License | BSD-3 permissive |
| Python support | Supports the current Python release >=3.5 |
| Install friction | Medium. Platform-specific wheel |
| Runtime dependencies | 5 packagesnumpytqdmrequestsportalockeropencv-python |
| Maintenance | Actively maintained 80 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 242,789 / month, #8,839 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | License :: OSI Approved :: BSD LicenseOperating System :: OS IndependentProgramming Language :: C++Programming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: Scientific/Engineering :: Artificial Intelligence |
Evidence: ncnn-1.0.20260526-cp310-cp310-macosx_11_0_arm64.whl; ncnn-1.0.20260526-cp310-cp310-macosx_11_0_x86_64.whl; ncnn-1.0.20260526-cp310-cp310-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl; ncnn-1.0.20260526-cp310-cp310-manylinux_2_24_i686.manylinux_2_28_i686.whl; ncnn-1.0.20260526-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl; ncnn-1.0.20260526-cp310-cp310-manylinux_2_31_armv7l.whl; ncnn-1.0.20260526-cp310-cp310-manylinux_2_39_riscv64.whl; ncnn-1.0.20260526-cp310-cp310-musllinux_1_2_aarch64.whl; ncnn-1.0.20260526-cp310-cp310-musllinux_1_2_armv7l.whl; ncnn-1.0.20260526-cp310-cp310-musllinux_1_2_i686.whl; ncnn-1.0.20260526-cp310-cp310-musllinux_1_2_riscv64.whl; ncnn-1.0.20260526-cp310-cp310-musllinux_1_2_x86_64.whl; ncnn-1.0.20260526-cp310-cp310-win32.whl; ncnn-1.0.20260526-cp310-cp310-win_amd64.whl; ncnn-1.0.20260526-cp310-cp310-win_arm64.whl; ncnn-1.0.20260526-cp311-cp311-macosx_11_0_arm64.whl; ncnn-1.0.20260526-cp311-cp311-macosx_11_0_x86_64.whl; ncnn-1.0.20260526-cp311-cp311-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl; ncnn-1.0.20260526-cp311-cp311-manylinux_2_24_i686.manylinux_2_28_i686.whl; ncnn-1.0.20260526-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “neural network inference framework”
- ncnnncnn is a neural network inference framework that loads and runs…
- mnnMNN is a lightweight deep learning inference and training framework…
- mxnetMXNet is a deep learning framework that enables you to build and…
Give your agent the search over MCP, or paste the wish link into any chat.
More Artificial Intelligence packages
LiteLLM provides a unified Python interface to call 100+ LLM providers (OpenAI, Anthropic, Gemini, Bedrock, Azure, and others) using OpenAI-compatible API format, available as both a Python SDK and a self-hosted AI Gateway proxy server.
Install it if you need to work with multiple LLM providers or want to centralize LLM routing in your organization.
Client library and CLI tool for downloading, uploading, and managing models, datasets, and repositories on the Hugging Face Hub platform.
Install it if you work with Hugging Face Hub models or datasets.
LangChain provides a framework for building agents and LLM-powered applications by composing language models, tools, and memory through a unified API that abstracts over multiple model providers.
hf-xet provides chunk-based deduplication and efficient file transfer for the Hugging Face Hub, enabling faster uploads and downloads of large files with local disk caching.
Tokenizers converts raw text into token sequences for NLP models, with support for training custom vocabularies and using pre-built tokenizers (BPE, WordPiece) optimized for speed via Rust.
Transformers provides a unified framework for loading, fine-tuning, and running state-of-the-art pretrained models across text, vision, audio, video, and multimodal tasks using PyTorch, JAX, or TensorFlow.
Install it if you need to run or train any transformer-based model for NLP, vision, audio, or multimodal tasks.
See also mnn · pnnx · executorch · nvidia-cudnn-cu13 · nvidia-cudnn-cu12 · nvidia-cudnn-cu11 · sit4onnx · tensorflow · realesrgan · spandrel