tensorflow / tensorflow/models

Object Detection: tflite conversion documentation missing metadata adding instructions for Android deployment added in new commit

Open
#9,341 12 comments 1 reaction 3 assignees View on GitHub

Nobody has claimed this yet.

models:research:odapi type:docs
Dominant language
Python
Stars
77.7k
Forks
44.8k
PR merge metrics
No merged PRs in 30d

Description

Prerequisites

Please answer the following question for yourself before submitting an issue.

  • [ x ] I checked to make sure that this issue has not been filed already.

1. The entire URL of the documentation with the issue

https://github.com/tensorflow/models/blob/master/research/object_detection/g3doc/running_on_mobile_tensorflowlite.md

https://github.com/tensorflow/models/blob/master/research/object_detection/g3doc/running_on_mobile_tf2.md

https://github.com/tensorflow/examples/tree/master/lite/examples/object_detection/android

2. Describe the issue

The links above point to Android example where latest change in code is not reflected in documentation.

https://github.com/tensorflow/examples/tree/master/lite/examples/object_detection/android

Current example code expects zip based tflite with metadata, but documentation does not provide instruction for it.

https://github.com/tensorflow/examples/commit/de42482b453de6f7b6488203b20e7eec61ee722e#diff-0cf980453f18b3cc1368f8eb16a803f9L113

Without this step it gives error when deploying to android,

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:325)
        at org.tensorflow.lite.support.metadata.MetadataExtractor.getAssociatedFile(MetadataExtractor.java:165)
        at org.tensorflow.lite.examples.detection.tflite.TFLiteObjectDetectionAPIModel.create(TFLiteObjectDetectionAPIModel.java:116)

I have commented on this issue below with detailed information on error,

https://github.com/tensorflow/tensorflow/issues/43583

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.