What is it¶
nnio is a light-weight python package for easily running neural networks.
It supports running models on CPU as well as some of the edge devices:
Intel integrated GPUs
For each device there exists an own library and a model format. We wrap all those in a single well-defined python package.
Look at this simple example:
import nnio
# Create model and put it on a Google Coral Edge TPU device
model = nnio.EdgeTPUModel(
model_path='path/to/model_quant_edgetpu.tflite',
device='TPU',
)
# Create preprocessor
preproc = nnio.Preprocessing(
resize=(224, 224),
batch_dimension=True,
)
# Preprocess your numpy image
image = preproc(image_rgb)
# Make prediction
class_scores = model(image)
nnio was developed for the Fast Sense X microcomputer. It has six neural accelerators, which are all supported by nnio:
2 x Intel Myriad VPU
an Intel integrated GPU
Installation¶
nnio is simply installed with pip, but it requires some additional libraries. See Installation.
Usage¶
There are 3 ways one can use nnio:
Loading your saved models for inference - Basic Usage
Using already prepared models from our model zoo: Model Zoo
Using our API to wrap around your own custom models. Extending nnio