tensorflow / tensorflow/tflite-support

Error getting native address of native library: task_vision_jni

Open
#936 6 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
441
Forks
146
PR merge metrics
No merged PRs in 30d

Description

I tried to export tflite using a custom model trained by yolov8 and run it on my Android app, but I got an error
S30805-18022056_org autojs autojspro
I am confident that I will be able to use the model provided by the hub
S30805-18045004_org autojs autojspro
MetaData

Metadata populated:
{
  "name": "ObjectDetector",
  "description": "Identify which of a known set of objects might be present and provide information about their positions within the given image or a video stream.",
  "subgraph_metadata": [
    {
      "input_tensor_metadata": [
        {
          "name": "image",
          "description": "Input image to be detected.",
          "content": {
            "content_properties_type": "ImageProperties",
            "content_properties": {
              "color_space": "RGB"
            }
          },
          "process_units": [
            {
              "options_type": "NormalizationOptions",
              "options": {
                "mean": [
                  127.5
                ],
                "std": [
                  127.5
                ]
              }
            }
          ],
          "stats": {
            "max": [
              1.0
            ],
            "min": [
              -1.0
            ]
          }
        }
      ],
      "output_tensor_metadata": [
        {
          "name": "location",
          "description": "The locations of the detected boxes.",
          "content": {
            "content_properties_type": "BoundingBoxProperties",
            "content_properties": {
              "index": [
                1,
                0,
                3,
                2
              ],
              "type": "BOUNDARIES"
            },
            "range": {
              "min": 2,
              "max": 2
            }
          },
          "stats": {
          }
        }
      ],
      "output_tensor_groups": [
        {
          "name": "detection_result",
          "tensor_names": [
            "location",
            "category",
            "score"
          ]
        }
      ]
    }
  ],
  "min_parser_version": "1.2.0"
}

Associated file(s) populated:
file name:  temp_meta.txt
file content:
b"{'description': 'Ultralytics best model (untrained)', 'author': 'Ultralytics', 'license': 'AGPL-3.0 https://ultralytics.com/license', 'date': '2023-08-05T07:56:12.447707', 'version': '8.0.147', 'stride': 32, 'task': 'detect', 'batch': 1, 'imgsz': [320, 320], 'names': {0: 'EXP', 1: 'GoldCoin', 2: 'RedDharma'}}"
file name:  mobilenet_labels.txt
file content:
b'EXP\nGoldCoin\nRedDharma\n'
  • i verify that the application has sufficient permissions and can read the file properly
  • 'org.tensorflow:tensorflow-lite-task-vision:0.4.4'

Contributor guide

No contributing guide indexed for this repository

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.

Research direction

Start by reproducing the Android failure with org.tensorflow:tensorflow-lite-task-vision:0.4.4, comparing the custom YOLOv8-exported model with the hub model and the supplied metadata and associated files. Done means identifying why the native library address cannot be obtained for the custom model and validating a fix or clear diagnosis.

Written by the indexing model from the issue text.

Assessment

Tech stack
android
Domain
machine-learning, mobile-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.