NNIE Python Interface
Project description
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
nnie-0.1.tar.gz
(3.4 kB
view hashes)
Built Distribution
nnie-0.1-py3-none-any.whl
(4.7 kB
view hashes)