R2Inference - EdgeTPU Examples
< R2Inference | Examples
![]() | Make sure you also check R2Inference's companion project: GstInference |
R2Inference |
---|
![]() |
Introduction |
Getting started |
Supported backends |
Examples |
Model Zoo |
Contact us |
![]() |
Contents
R2Inference provides several examples to highlight its usage with different architectures and frameworks. The models used for these examples can be downloaded from our Model Zoo.
Preparation
To test the EdgeTPU example you will need a Tensorflow-Lite C++ API and EdgeTPU API compatible graph file. You can obtain the model from the Model Zoo.
Inception v2
This example is located in r2inference/examples/r2i/edgetpu
.
To use this example run:
./inception -i [JPG input Image] -m [Tflite Model] -s [Model Input Size]
For example, evaluating this image:
Should produce the following output:
./inception -i Plane_example_input.jpg -m inception_v2_224_quant_edgetpu.tflite -s 224
Loading Model: inception_v2_224_quant_edgetpu.tflite
Setting model to engine
Loading image: Plane_example_input.jpg
Configuring frame
Starting engine
Predicting...
Highest probability is label 405 (0.730469)
Stopping engine
According to the ImageNet labels 405 corresponds to an 'airship'.