使用 TensorflowLite 进行目标检测小样本训练

时间:2020-12-23 21:13:44

标签: tensorflow2.0 object-detection tensorflow-lite

我正在尝试创建一个使用对象检测来检测特定类型对象的移动应用程序。为此,我从使用 TF2 和 Tensorflow object detection example Android appssd_mobilenet_v1 开始。

我想尝试 Few-Shot training(Colab 链接),所以我首先用 Colab 的输出文件 model.tflite 替换示例应用程序的 SSD Mobilenet v1 下载,但这会导致应用程序崩溃以下错误:

java.lang.IllegalStateException: This model does not contain associated files, and is not a Zip file.
        at org.tensorflow.lite.support.metadata.MetadataExtractor.assertZipFile(MetadataExtractor.java:313)
        at org.tensorflow.lite.support.metadata.MetadataExtractor.getAssociatedFile(MetadataExtractor.java:164)
        at org.tensorflow.lite.examples.detection.tflite.TFLiteObjectDetectionAPIModel.create(TFLiteObjectDetectionAPIModel.java:126)
        at org.tensorflow.lite.examples.detection.DetectorActivity.onPreviewSizeChosen(DetectorActivity.java:99)

我意识到 Colab 使用了 ssd_mobilenet_v2_fpnlite_320x320_coco17_tpu-8.tar.gz - 这是否意味着需要对应用代码进行更改 - 还是我的方法存在更根本的错误?

更新:我还尝试了 Colab tf2_image_retraining 的 Lite 输出并得到了同样的错误。

0 个答案:

没有答案