Skip to main content
nncase

GitHub repository Gitee repository GitHub release

切换中文

nncase is a neural network compiler for AI accelerators.

Telegram: nncase community Technical Discussion QQ Group: 790699378 . Answer: 人工智能


K230

Install

  • Linux:

    pip install nncase nncase-kpu
    
  • Windows:

    1. pip install nncase
    2. Download `nncase_kpu-2.x.x-py2.py3-none-win_amd64.whl` in below link.
    3. pip install nncase_kpu-2.x.x-py2.py3-none-win_amd64.whl
    

All version of nncase and nncase-kpu in Release.

Supported operators

benchmark test

kind model shape quant_type(If/W) nncase_fps tflite_onnx_result accuracy info
Image Classification mobilenetv2 [1,224,224,3] u8/u8 600.24 top-1 = 71.3%
top-5 = 90.1%
top-1 = 71.1%
top-5 = 90.0%
dataset(ImageNet 2012, 50000 images)
tflite
resnet50V2 [1,3,224,224] u8/u8 86.17 top-1 = 75.44%
top-5 = 92.56%
top-1 = 75.11%
top-5 = 92.36%
dataset(ImageNet 2012, 50000 images)
onnx
yolov8s_cls [1,3,224,224] u8/u8 130.497 top-1 = 72.2%
top-5 = 90.9%
top-1 = 72.2%
top-5 = 90.8%
dataset(ImageNet 2012, 50000 images)
yolov8s_cls(v8.0.207)
Object Detection yolov5s_det [1,3,640,640] u8/u8 23.645 bbox
mAP50-90 = 0.374
mAP50 = 0.567
bbox
mAP50-90 = 0.369
mAP50 = 0.566
dataset(coco val2017, 5000 images)
yolov5s_det(v7.0 tag, rect=False, conf=0.001, iou=0.65)
yolov8s_det [1,3,640,640] u8/u8 9.373 bbox
mAP50-90 = 0.446
mAP50 = 0.612
mAP75 = 0.484
bbox
mAP50-90 = 0.404
mAP50 = 0.593
mAP75 = 0.45
dataset(coco val2017, 5000 images)
yolov8s_det(v8.0.207, rect = False)
Image Segmentation yolov8s_seg [1,3,640,640] u8/u8 7.845 bbox
mAP50-90 = 0.444
mAP50 = 0.606
mAP75 = 0.484
segm
mAP50-90 = 0.371
mAP50 = 0.578
mAP75 = 0.396
bbox
mAP50-90 = 0.444
mAP50 = 0.606
mAP75 = 0.484
segm
mAP50-90 = 0.371
mAP50 = 0.579
mAP75 = 0.397
dataset(coco val2017, 5000 images)
yolov8s_seg(v8.0.207, rect = False, conf_thres = 0.0008)
Pose Estimation yolov8n_pose_320 [1,3,320,320] u8/u8 36.066 bbox
mAP50-90 = 0.6
mAP50 = 0.843
mAP75 = 0.654
keypoints
mAP50-90 = 0.358
mAP50 = 0.646
mAP75 = 0.353
bbox
mAP50-90 = 0.6
mAP50 = 0.841
mAP75 = 0.656
keypoints
mAP50-90 = 0.359
mAP50 = 0.648
mAP75 = 0.357
dataset(coco val2017, 2346 images)
yolov8n_pose(v8.0.207, rect = False)
yolov8n_pose_640 [1,3,640,640] u8/u8 10.88 bbox
mAP50-90 = 0.694
mAP50 = 0.909
mAP75 = 0.776
keypoints
mAP50-90 = 0.509
mAP50 = 0.798
mAP75 = 0.544
bbox
mAP50-90 = 0.694
mAP50 = 0.909
mAP75 = 0.777
keypoints
mAP50-90 = 0.508
mAP50 = 0.798
mAP75 = 0.54
dataset(coco val2017, 2346 images)
yolov8n_pose(v8.0.207, rect = False)
yolov8s_pose [1,3,640,640] u8/u8 5.568 bbox
mAP50-90 = 0.733
mAP50 = 0.925
mAP75 = 0.818
keypoints
mAP50-90 = 0.605
mAP50 = 0.857
mAP75 = 0.666
bbox
mAP50-90 = 0.734
mAP50 = 0.925
mAP75 = 0.819
keypoints
mAP50-90 = 0.604
mAP50 = 0.859
mAP75 = 0.669
dataset(coco val2017, 2346 images)
yolov8s_pose(v8.0.207, rect = False)

Demo

eye gaze space_resize face pose
gif gif

K210/K510

Supported operators


Features

  • Supports multiple inputs and outputs and multi-branch structure
  • Static memory allocation, no heap memory acquired
  • Operators fusion and optimizations
  • Support float and quantized uint8 inference
  • Support post quantization from float model with calibration dataset
  • Flat model with zero copy loading

Architecture

nncase arch

Build from source

It is recommended to install nncase directly through pip. At present, the source code related to k510 and K230 chips is not open source, so it is not possible to use nncase-K510 and nncase-kpu (K230) directly by compiling source code.

If there are operators in your model that nncase does not yet support, you can request them in the issue or implement them yourself and submit the PR. Later versions will be integrated, or contact us to provide a temporary version. Here are the steps to compile nncase.

git clone https://github.com/kendryte/nncase.git
cd nncase
mkdir build && cd build

# Use Ninja
cmake .. -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=./install
ninja && ninja install

# Use make
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=./install
make && make install

Resources

Canaan developer community

Canaan developer community contains all resources related to K210, K510, and K230.

  • 资料下载 --> Pre-compiled images available for the development boards corresponding to the three chips.
  • 文档 --> Documents corresponding to the three chips.
  • 模型库 --> Examples and code for industrial, security, educational and other scenarios that can be run on the K210 and K230.
  • 模型训练 --> The model training platform for K210 and K230 supports the training of various scenarios.

Bilibili

K210 related repo

K230 related repo


Release files for nncase 2.11.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distributions (wheels)

Table of built distributions (wheels) for nncase 2.11.0
File
nncase-2.11.0-cp313-cp313-win_amd64.whl CPython 3.13 CPython 3.13 Windows x86-64 Details
nncase-2.11.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl CPython 3.13 CPython 3.13 Linux glibc 2.17+ x86-64 Details
nncase-2.11.0-cp313-cp313-macosx_12_0_arm64.whl CPython 3.13 CPython 3.13 macOS 12.0+ ARM64 Details
nncase-2.11.0-cp312-cp312-win_amd64.whl CPython 3.12 CPython 3.12 Windows x86-64 Details
nncase-2.11.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.17+ x86-64 Details
nncase-2.11.0-cp312-cp312-macosx_12_0_arm64.whl CPython 3.12 CPython 3.12 macOS 12.0+ ARM64 Details
nncase-2.11.0-cp311-cp311-win_amd64.whl CPython 3.11 CPython 3.11 Windows x86-64 Details
nncase-2.11.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.17+ x86-64 Details
nncase-2.11.0-cp311-cp311-macosx_12_0_arm64.whl CPython 3.11 CPython 3.11 macOS 12.0+ ARM64 Details
nncase-2.11.0-cp310-cp310-win_amd64.whl CPython 3.10 CPython 3.10 Windows x86-64 Details
nncase-2.11.0-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl CPython 3.10 CPython 3.10 Linux glibc 2.17+ x86-64 Details
nncase-2.11.0-cp310-cp310-macosx_12_0_arm64.whl CPython 3.10 CPython 3.10 macOS 12.0+ ARM64 Details
nncase-2.11.0-cp39-cp39-win_amd64.whl CPython 3.9 CPython 3.9 Windows x86-64 Details
nncase-2.11.0-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.whl CPython 3.9 CPython 3.9 Linux glibc 2.17+ x86-64 Details
nncase-2.11.0-cp39-cp39-macosx_12_0_arm64.whl CPython 3.9 CPython 3.9 macOS 12.0+ ARM64 Details

Total release size: 358.8 MB

Release files / nncase-2.11.0-cp313-cp313-win_amd64.whl

Download URL nncase-2.11.0-cp313-cp313-win_amd64.whl
Size 19.7 MB
Tags CPython 3.13 Windows x86-64
SHA-256 checksum
How to use checksums
73750f039bd68897cbdcff302cc7f68e6dd78a87568d0ef5b872a3c2ddfd4074
BLAKE2b-256 checksum
How to use checksums
71877b294803d61f3e25e284bfded1c84561fe1a7dea6dd3a3e423af4335c039
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.12

Release files / nncase-2.11.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl

Download URL nncase-2.11.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Size 30.1 MB
Tags CPython 3.13 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
fb0e9a7dabdc1c312ffbd341bb0be6ca60e703d8832a9ed014799790ffc7f946
BLAKE2b-256 checksum
How to use checksums
cd17075c8dda8b70aec8c53a3e54ff65e23d49fd4098ae48e3fb2446eedb9f61
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.12

Release files / nncase-2.11.0-cp313-cp313-macosx_12_0_arm64.whl

Download URL nncase-2.11.0-cp313-cp313-macosx_12_0_arm64.whl
Size 22.0 MB
Tags CPython 3.13 macOS 12.0+ ARM64
SHA-256 checksum
How to use checksums
6fa1a3e97e8e2e612ed19aa30ed31704c7f6ca7a5b75837b91bf4f466d3da009
BLAKE2b-256 checksum
How to use checksums
afc4e7e1464370ef2ad5ad195e1e939843d8c4f34dfb002afebcedb4a36bcb99
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.12

Release files / nncase-2.11.0-cp312-cp312-win_amd64.whl

Download URL nncase-2.11.0-cp312-cp312-win_amd64.whl
Size 19.7 MB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
68beb2b3e7d46fc1d7f185c7a6619e40995160ae9f5d94bfd3965be1e980b193
BLAKE2b-256 checksum
How to use checksums
26654d2cf669e77286b52c6a5237cda84fb7f4be220110c127a627364680f04f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.12

Release files / nncase-2.11.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl

Download URL nncase-2.11.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Size 30.1 MB
Tags CPython 3.12 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
016addd4fbdca88ff99da4198323812244a09414960e88190f6ea83432b23cc6
BLAKE2b-256 checksum
How to use checksums
780b5e0020490d6a43f9e54b8821fed1adaa85b9a67c8bc624483e90dcf9a249
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.12

Release files / nncase-2.11.0-cp312-cp312-macosx_12_0_arm64.whl

Download URL nncase-2.11.0-cp312-cp312-macosx_12_0_arm64.whl
Size 22.0 MB
Tags CPython 3.12 macOS 12.0+ ARM64
SHA-256 checksum
How to use checksums
feeb2c9b38bd57a432b6228c29184299d40de3170c24a332b95226c223b61536
BLAKE2b-256 checksum
How to use checksums
541ae7333a7fa4f36a939be96175e24bbce5c3c5f4af5d0c5c6965ce595b91e1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.12

Release files / nncase-2.11.0-cp311-cp311-win_amd64.whl

Download URL nncase-2.11.0-cp311-cp311-win_amd64.whl
Size 19.7 MB
Tags CPython 3.11 Windows x86-64
SHA-256 checksum
How to use checksums
864a8fed26d7291cbe488e7a05a3dba480cb0d691967a957b60d78947d42d467
BLAKE2b-256 checksum
How to use checksums
09f0f2adb930af31079aaff38b56fe0b4922e91035b4a72926097261c13cfc17
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.12

Release files / nncase-2.11.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl

Download URL nncase-2.11.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Size 30.1 MB
Tags CPython 3.11 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
7d5fd66134484a3eb6cf452646e3d0a3df134869b7a03532e74103dfa189b616
BLAKE2b-256 checksum
How to use checksums
ea1654c41ed69ce91fca3a64d9577e792a45a57cfd89861f3e2b28e3cb341264
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.12

Release files / nncase-2.11.0-cp311-cp311-macosx_12_0_arm64.whl

Download URL nncase-2.11.0-cp311-cp311-macosx_12_0_arm64.whl
Size 22.0 MB
Tags CPython 3.11 macOS 12.0+ ARM64
SHA-256 checksum
How to use checksums
9b0c86b8e3828fb69b8906d9b8de518720d0bbf561ce5e708ed50461da352d78
BLAKE2b-256 checksum
How to use checksums
36a20f44413617999061d0a6fc7e76ff81e38de60b3ca7c339e29e467cfd4c07
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.12

Release files / nncase-2.11.0-cp310-cp310-win_amd64.whl

Download URL nncase-2.11.0-cp310-cp310-win_amd64.whl
Size 19.7 MB
Tags CPython 3.10 Windows x86-64
SHA-256 checksum
How to use checksums
3a32fd1ce6525c238a3b2f96d12cd20d9f4454b73236bb591bc9413751bceac8
BLAKE2b-256 checksum
How to use checksums
a43759ccb193503f6fca5ecc8e9ff473ac599794b2d34b1850504d5c98fd84be
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.12

Release files / nncase-2.11.0-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl

Download URL nncase-2.11.0-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Size 30.1 MB
Tags CPython 3.10 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
c49dfd48b668d45c44230eac7d18eac4e03a13b6b573af3e01ea39baa48903fd
BLAKE2b-256 checksum
How to use checksums
e126f56a80a0b4867ab636eb23431abe9a964a70c2afe1acceb0af784688212c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.12

Release files / nncase-2.11.0-cp310-cp310-macosx_12_0_arm64.whl

Download URL nncase-2.11.0-cp310-cp310-macosx_12_0_arm64.whl
Size 22.0 MB
Tags CPython 3.10 macOS 12.0+ ARM64
SHA-256 checksum
How to use checksums
e981426c4e20a1293ba08675cbe3c35568383a541deb47afb73ed847a39691d6
BLAKE2b-256 checksum
How to use checksums
9a5a16d7b41e6fbc18c9d4d63629afe5248e4507ba6eaa72e82b371424238a72
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.12

Release files / nncase-2.11.0-cp39-cp39-win_amd64.whl

Download URL nncase-2.11.0-cp39-cp39-win_amd64.whl
Size 19.7 MB
Tags CPython 3.9 Windows x86-64
SHA-256 checksum
How to use checksums
0708c862c7d8cdb933c9e5a20cd62e284dbe70eebc0fdaf1107170e9864861d5
BLAKE2b-256 checksum
How to use checksums
6a8c4426524042bfbd43c7da9de23a4af3289cf2d618237abe9003d51c969721
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.12

Release files / nncase-2.11.0-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.whl

Download URL nncase-2.11.0-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Size 30.1 MB
Tags CPython 3.9 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
b49938bda3bd6a0a15f712486b5ec60d0d0d23d58d0df2ba7574910aa0e326b5
BLAKE2b-256 checksum
How to use checksums
8f3c3ccf43cd8a20c5bf391b9eeb9fbb08d32eebae5f5473902958d8099d7349
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.12

Release files / nncase-2.11.0-cp39-cp39-macosx_12_0_arm64.whl

Download URL nncase-2.11.0-cp39-cp39-macosx_12_0_arm64.whl
Size 22.0 MB
Tags CPython 3.9 macOS 12.0+ ARM64
SHA-256 checksum
How to use checksums
1adcaf6e0f0d78a5aa4f24925fba406291494397aa2dcfa964787c5473d77367
BLAKE2b-256 checksum
How to use checksums
a3be705de14c74b32bfbeeae05fc471f2d0e002dbf3ee02740cfd7b5d8ec872b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.12
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page