Using Tensorflow's inference graph in Unity
First, let me clarify somethings, I don't know python. I am currently working on my final year project and I needed a good Object detection technique, after trying many methods (color threshold, Haar-Classifiers), I stumbled around tensorflow, found myself a good tutorial, followed it and got the detector I want. The problem: I need and I want to work on Unity, Unity only supports C#. I found an asset called TensorflowSharp but didn't know how to use it. The fact is I don't want to train on Unity, I trained on python I just need to use the "frozen inference graph" (as named in the tutorial) in unity to detect the object I want.
Please, I have to present in a month, any help is appreciated.
Answer by off99555 · Oct 29, 2018 at 07:56 AM
I am an ML engineer like you. I used to export TensorFlow graph and import using TensorFlowSharp in Unity. But now I just run everything in Python and send the output to Unity using networking library called ZeroMQ.
I've gone through a lot of trouble regarding this Unity-Python communication issue. I've tried a lot and eventually settled down to ZeroMQ approach.
See Getting Started section and clone my repository here. You are going to like it https://github.com/off99555/Unity3D-Python-Communication
Your answer
