Search Unity

Question How to run tensorflow model in unity background app?

Discussion in 'ML-Agents' started by sonwanderson, Jan 29, 2024.

  1. sonwanderson

    sonwanderson

    Joined:
    Jan 14, 2024
    Posts:
    18
    hello everybody. I wanted to ask for help with a unity project. I want to run an ML model in the background of an android device using foregroundservice but I'm having a lot of difficulties. My intention is to modify an existing github project (https://github.com/nintendaii/unity-background-service)and forecast the steps for the next day. I created the tflite model and it is importing correctly into the unity project, but it does not work in the generated apk. only the notification from the original github project "Counting your steps.." appears. nor does the exception notification appear. Could anyone give me a suggestion as to what it could be? I will provide the github repository for my custom project:

    https://github.com/sonwander/unity-tensorflow

    Appreciate it!
     
    Last edited: Jan 31, 2024
  2. sonwanderson

    sonwanderson

    Joined:
    Jan 14, 2024
    Posts:
    18
    UPDATE: the tflite model is being incorporated into the apk correctly, in the Assets folder, but the device seems to be unable to find it. I have created several logs in the codes, but there is no exception in logcat about this. I can't resolve it if the error doesn't appear.
     
  3. sonwanderson

    sonwanderson

    Joined:
    Jan 14, 2024
    Posts:
    18
    Anyone?
     
    Last edited: Jan 31, 2024