GithubHelp home page GithubHelp logo

Comments (20)

SBeyer6 avatar SBeyer6 commented on May 19, 2024 1

Ok I checked, it seemed like the latest vc 2019 redistributable was installed.

from tf-lite-unity-sample.

SBeyer6 avatar SBeyer6 commented on May 19, 2024 1

@vaibhav-suri I managed to fix this error by installing both the x86 and x64 Visual C++ 2019 Redistributable.
Hope this works for you as well.

from tf-lite-unity-sample.

asus4 avatar asus4 commented on May 19, 2024 1

@Cipher-zzz
I haven't tried building it. But I think you can cross-compile it by adding build options in bazel.
https://www.tensorflow.org/lite/guide/build_arm

To build a dll for Windows, please refer to the build script build_tflite.py

def build_windows(enable_xnnpack = False):
# Main
option_xnnpack = 'true' if enable_xnnpack else 'false'
run_cmd(f'bazel build -c opt --define tflite_with_xnnpack={option_xnnpack} tensorflow/lite/c:tensorflowlite_c')
copy('bazel-bin/tensorflow/lite/c/tensorflowlite_c.dll', 'Windows/libtensorflowlite_c.dll')

from tf-lite-unity-sample.

Cipher-zzz avatar Cipher-zzz commented on May 19, 2024 1

@siri-sinthawat I am temporarily working on another project, haven't tried it yet. I will comment here if there is any update.

from tf-lite-unity-sample.

asus4 avatar asus4 commented on May 19, 2024

Hmm, it seems to be a dependency error. but I couldn't reproduce it. Are there any other error messages? Can you share the UnityEditor's log?

from tf-lite-unity-sample.

cyraxchel avatar cyraxchel commented on May 19, 2024

Hello.
I got this same dependency issue. I decided to rebuild the tflite libraries myself. Prepared the build environment ... and after that the message about dependencies in Unity disappeared.

from tf-lite-unity-sample.

asus4 avatar asus4 commented on May 19, 2024

@cyraxchel Thanks for your report. Just to clarify, Did the error disappear before you built the library yourself?

from tf-lite-unity-sample.

cyraxchel avatar cyraxchel commented on May 19, 2024

@cyraxchel Thanks for your report. Just to clarify, Did the error disappear before you built the library yourself?

I failed rebuild library (some error in VC). I keep using your library. :)

UPD: win 10, Unity: 2019.1.6f1 and Unity 2019.4.8f1

from tf-lite-unity-sample.

SBeyer6 avatar SBeyer6 commented on May 19, 2024

I seem to get this issue as well; It works on two different PCs but on another PC it the plugin fails to load, with the same error.

from tf-lite-unity-sample.

asus4 avatar asus4 commented on May 19, 2024

Could you check which dependencies are missing using app like this?
https://kb.froglogic.com/misc/using-dependency-walker/

from tf-lite-unity-sample.

cwule avatar cwule commented on May 19, 2024

Trying to build for Windows 10 UWP Arm64 application leads to the same error:
Exception thrown at 0x00007FFDF75539EC in tf-lite-unity-sample.exe: Microsoft C++ exception: Il2CppExceptionWrapper at memory location 0x0000009FF8CFCA60. DllNotFoundException: Unable to load DLL 'libtensorflowlite_c': The specified module could not be found. at TensorFlowLite.InterpreterOptions.TfLiteInterpreterOptionsCreate () [0x00000] in <00000000000000000000000000000000>:0 at TensorFlowLite.InterpreterOptions..ctor () [0x00000] in <00000000000000000000000000000000>:0 at TensorFlowLite.BaseImagePredictor1[T]..ctor (System.String modelPath, System.Boolean useGPU) [0x00000] in <00000000000000000000000000000000>:0 at TensorFlowLite.PoseNet..ctor (System.String modelPath) [0x00000] in <00000000000000000000000000000000>:0 at PoseNetSample.Start () [0x00000] in <00000000000000000000000000000000>:0

Would be great to add support for UWP Arm64 as well (needed for Hololens 2 development).

from tf-lite-unity-sample.

vaibhav-suri avatar vaibhav-suri commented on May 19, 2024

Plugins: Failed to load 'V:/HandTracking/tflite/tf-lite-unity-sample-master/Packages/com.github.asus4.tflite/Plugins/Windows/libtensorflowlite_c.dll' because one or more of its dependencies could not be loaded.

Getting this error,any idea how to fix?

from tf-lite-unity-sample.

vaibhav-suri avatar vaibhav-suri commented on May 19, 2024

@SBeyer6 Thanks a lot! That worked.

from tf-lite-unity-sample.

Cipher-zzz avatar Cipher-zzz commented on May 19, 2024

@cwule got the same error when developing Hololens 2 App, did you solve that issue? Or if there is any idea to approach. Thanks in advance.

from tf-lite-unity-sample.

cyraxchel avatar cyraxchel commented on May 19, 2024

@cwule got the same error when developing Hololens 2 App, did you solve that issue? Or if there is any idea to approach. Thanks in advance.

Please, check corerct version VC installed. When I install VS 2019, it fix error. Before was VS 2017.. Sorry, I don't remember, which versions on both Visual Studio on.

from tf-lite-unity-sample.

Cipher-zzz avatar Cipher-zzz commented on May 19, 2024

@cyraxchel Thanks for your response. I have tried both VS 2019 and VS 2022, with VC 2019 redistributable installed, same error:

DllNotFoundException: Unable to load DLL 'libtensorflowlite_c': The specified module could not be found.
  at TensorFlowLite.InterpreterOptions.TfLiteInterpreterOptionsCreate () [0x00000] in <00000000000000000000000000000000>:0 
  at TensorFlowLite.InterpreterOptions..ctor () [0x00000] in <00000000000000000000000000000000>:0 
  at TensorFlowLite.BaseImagePredictor`1[T]..ctor (System.String modelPath, System.Boolean useGPU) [0x00000] in <00000000000000000000000000000000>:0 
  at TensorFlowLite.SSD..ctor (System.String modelPath) [0x00000] in <00000000000000000000000000000000>:0 
  at SsdSample.Start () [0x00000] in <00000000000000000000000000000000>:0 

I think the reason for this error could be different from the one in the origin post. I checked the DLL file 'libtensorflowlite_c' in Unity, it seems only support x86 and x64. However, I am building the project into HoloLens 2 which is ARM64, which should be the reason why this happened.

I don't have much experience in Unity development, I am not sure what does that DLL file is for and how to make it support ARM64 devices. I will appreciate that if you can give me some ideas. @asus4

from tf-lite-unity-sample.

Cipher-zzz avatar Cipher-zzz commented on May 19, 2024

@asus4 Thank you! I will have a try.

from tf-lite-unity-sample.

siri-sinthawat avatar siri-sinthawat commented on May 19, 2024

@Cipher-zzz The same error is happening to me. Can it be fixed?

from tf-lite-unity-sample.

fatlinlin avatar fatlinlin commented on May 19, 2024

the same error happen on my mac pro

from tf-lite-unity-sample.

asus4 avatar asus4 commented on May 19, 2024

Did you pull Git LFS files? All libs are in Git LFS.

from tf-lite-unity-sample.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.