deepjavalibrary / djl

An Engine-Agnostic Deep Learning Framework in Java
https://djl.ai
Apache License 2.0
4.17k stars 663 forks source link

tflite-engine do not support windows system well #1006

Closed hongyaohongyao closed 4 months ago

hongyaohongyao commented 3 years ago

I try to use tflite-engine in my projects and it threw a exception like the following while other engine would download the library automaticlly

SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
Exception in thread "main" java.lang.UnsatisfiedLinkError: Can't load library: D:\cache\djl\tflite\2.4.1-cpu-win-x86_64\tensorflowlite_jni.dll
    at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1820)
    at java.lang.Runtime.load0(Runtime.java:810)
    at java.lang.System.load(System.java:1086)
    at ai.djl.tflite.engine.LibUtils.loadLibrary(LibUtils.java:59)
    at ai.djl.tflite.engine.TfLiteEngine.<init>(TfLiteEngine.java:38)
    at ai.djl.tflite.engine.TfLiteEngine.newInstance(TfLiteEngine.java:42)
    at ai.djl.tflite.engine.TfLiteEngineProvider.getEngine(TfLiteEngineProvider.java:40)
    at ai.djl.engine.Engine.getEngine(Engine.java:152)
    at ai.djl.engine.Engine.getInstance(Engine.java:117)
    at ai.djl.onnxruntime.engine.OrtEngine.getAlternativeEngine(OrtEngine.java:65)
    at ai.djl.onnxruntime.engine.OrtEngine.newBaseManager(OrtEngine.java:108)
    at ai.djl.onnxruntime.engine.OrtEngine.newModel(OrtEngine.java:90)
    at ai.djl.Model.newInstance(Model.java:98)
    at ai.djl.repository.zoo.BaseModelLoader.createModel(BaseModelLoader.java:176)
    at ai.djl.repository.zoo.BaseModelLoader.loadModel(BaseModelLoader.java:139)
    at ai.djl.repository.zoo.ModelZoo.loadModel(ModelZoo.java:190)
    at xyz.hyhy.scai.Yolov5WithMask.main(Yolov5WithMask.java:61)

Process finished with exit code 1
frankfliu commented 3 years ago

@hongyaohongyao We don't support TFLite for windows currently. Can you tell me more about your use case?

hongyaohongyao commented 3 years ago

@hongyaohongyao We don't support TFLite for windows currently. Can you tell me more about your use case?

I want to use the weights in mediapipe. It has a bad support for windows too. Now I transform the weights file into a onnx file

frankfliu commented 4 months ago

TFLite is deprecated in DJL