Reputation: 753
I'm trying to use the Google Coral edgetpu_compiler to combine two existing tflite models into a single model following Google's directions. I'm using two of Google's pre-compiled models. The error indicates the the models are already compiled for the Coral device. These models are in fact already compiled for the Edge TPU, but I'm trying to combine the two models. Am I doing something wrong or is combining Edge TPU models not supported?
Here is the command I'm running and the output:
$ edgetpu_compiler \
mobilenet_ssd_v2_coco_quant_postprocess_edgetpu.tflite \
mobilenet_ssd_v2_face_quant_postprocess_edgetpu.tflite
Edge TPU Compiler version 2.0.267685300
Invalid model: mobilenet_ssd_v2_coco_quant_postprocess_edgetpu.tflite
Model already compiled for Edge TPU
Im running this on the Coral board OS version: Mendel GNU/Linux 3 (Chef)
.
Any guidance appreciated.
Thanks, John
Upvotes: 1
Views: 1550
Reputation: 863
The models that you are trying to combine are already compiled for edgetpu and cannot be compiled again.
To compile both the models again, you can download the 'All model files' of "MobileNet SSD v2 (COCO)" and "MobileNet SSD v2 (Faces)" from https://coral.withgoogle.com/models/. After extracting these compressed files, you will find tflite_graph.pb files for both the models. You will have to convert these .pb files into .tflite (CPU version) files. After getting CPU version of .tflite files, you should be able to compile two models together.
Please see the model requirements in detail at : https://coral.withgoogle.com/docs/edgetpu/models-intro/#compatibility-overview
Please read about co-compiling the model at : https://coral.withgoogle.com/docs/edgetpu/compiler/#co-compiling-multiple-models. Please also note that co-compiling n models will produce n models, not just one. The benefit is that the compiler support parameter data cached together in TPU RAM
Upvotes: 2