Skip to main content

NNIE Python Interface

Python remote interface for Huawei HiSilicon's NNIE NPUs.

Introduction

This repo provides interface for using NNIE's wk models remotely with the nnie_transfer_server authored by me running on the Hi3516/Hi3519 platforms.

Usage

  • Build the nnie_transfer_server following the instructions and run it on the remote board.
  • Install the NNIE python interface by executing pip3 install nnie
  • Make sure your device can reach your HiSilicon board through network.
  • Sample codes are provided below:
import cv2
from nnie.nnie import NNIE
net = NNIE(file='path/to/your/model.wk',ipaddr='192.168.31.20',port=7777)
image = cv2.imread("path/to/your/image.jpg")
network_input_width = 320
network_input_height = 240
image = cv2.resize(image, (network_input_width, network_input_height))
result = net(data=image) # You may change 'data' into other names according 
result = net(image=image) # to the name of your model's input layer

Release files for nnie 0.1

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

Source distribution (sdist)

Source distribution for nnie 0.1
File Size Uploaded
nnie-0.1.tar.gz 3.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for nnie 0.1
File Interpreter ABI Platform
nnie-0.1-py3-none-any.whl Python 3 none any Details

Total release size: 8.1 kB

Release files / nnie-0.1.tar.gz

Download URL nnie-0.1.tar.gz
Size 3.4 kB
Tags Source
SHA-256 checksum
How to use checksums
c31b66ecd414bc0c8db447de9e86a9243f542c862f3a6193d7289efabc9ffd26
BLAKE2b-256 checksum
How to use checksums
292e6bac6aaf888761b810fe1c695161e2effeceadaf9be42e3c84df59d333bb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.28.1 CPython/3.6.7

Release files / nnie-0.1-py3-none-any.whl

Download URL nnie-0.1-py3-none-any.whl
Size 4.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
cb1b275bc5ff47033e83c8cc82ca7d96fed2d17370cfa5aebcc4ae00b3284a8d
BLAKE2b-256 checksum
How to use checksums
3c84bad8dda9c1bd66e7a2b68307edd2e264f66c08fac5cc3663a1835154a3bf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.28.1 CPython/3.6.7

Release history Release notifications | RSS feed

This release

0.1 This release

2 release files

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