Syn-McJ / TFClassify-Unity-Barracuda

An example of using Tensorflow and ONNX models with Unity Barracuda inference engine for image classification and object detection.
MIT License
124 stars 32 forks source link

tensorflow model to Barracuda or Onnx #10

Closed JonasX99 closed 4 years ago

JonasX99 commented 4 years ago

I would like to know if it would be possible to get a Teachable Machine model into Unity and use it with Barracuda Currently I have tried to convert a Tensorflow model with tensorflow_to_barracuda.py which I get this error: google.protobuf.message.DecodeError: Error parsing message

I have also tried to convert the model with the tf2onnxt but when I have successfully convert the model and import it the model has warnings

also when I import any model of my own the camera is responding every second

-Unity version 2020.1 -Barracuda version have tried with 0.4.0 and 0.6.3

Hope Teachable Machine models is possible to use since it's fast and easy for the project i am working on

Syn-McJ commented 4 years ago

@JonasX99 I haven't tried teachable machine, but importing tensorflow model and convering it should work fine, but keep in mind that I only managed to do it with a limited number of architectures (see blogpost). If you provide more details about your model (or the model itself), I can see what might be wrong with it.


From: JonasX99 notifications@github.com Sent: Tuesday, May 5, 2020 11:56:44 PM To: Syn-McJ/TFClassify-Unity-Barracuda TFClassify-Unity-Barracuda@noreply.github.com Cc: Subscribed subscribed@noreply.github.com Subject: [Syn-McJ/TFClassify-Unity-Barracuda] tensorflow model to Barracuda or Onnx (#10)

I would like to know if it would be possible to get a Teachable Machinehttps://teachablemachine.withgoogle.com/ model into Unity and use it with Barracuda Currently I have tried to convert a Tensorflow model with tensorflow_to_barracuda.py which I get this error: google.protobuf.message.DecodeError: Error parsing message

I have also tried to convert the model with the tf2onnxthttps://github.com/onnx/tensorflow-onnx but when I have successfully convert the model and import it the model has warnings

also when I import any model of my own the camera is responding every second

-Unity version 2020.1 -Barracuda version have tried with 0.4.0 and 0.6.3

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/Syn-McJ/TFClassify-Unity-Barracuda/issues/10, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AB3AFZO5EG5IYYSQSJOFGRDRQBAMZANCNFSM4MZXVXNA.

JonasX99 commented 4 years ago

@Syn-McJ This is the model but on Teachable Machine it is possible to export the model in many ways but I haven't had any luck with it yet. I just wanted to know if it is even possible with Teachable Machine :)