0
\$\begingroup\$

Some backstory: currently using a Asus x555la so not the fastest laptop. Computing power is kind of the problem.

Hi there. I am currently doing hand tracking in Unity. I have developed a half-and-half approach to cut down lag and CPU stress (using one half image processing and one half good old fashioned neural nets). I am trying to embed an object detection neural net in Unity, and I have done so using TensorFlowSharp, but I can't figure out how to cut down lag. It's currently managing around 1FPS. How do I speed up neural nets in Unity. It doesn't have to be loads, just around 30FPS.

Has anyone had any experience using neural nets in Unity, and how did you make it work well?

\$\endgroup\$
6
  • 1
    \$\begingroup\$ How large is your neural net, how many hidden layers do you have, and does it run on every frame? \$\endgroup\$ Commented Jun 5, 2018 at 15:51
  • \$\begingroup\$ I am using this hand-object detection model. I believe it is SSD which means it is more lightweight than R-CNN's: github.com/victordibia/handtracking \$\endgroup\$ Commented Jun 5, 2018 at 15:53
  • \$\begingroup\$ It doesn't have to run on every frame, but this would be ideal \$\endgroup\$ Commented Jun 5, 2018 at 15:53
  • 1
    \$\begingroup\$ I'm not familiar with TensorFlowSharp, but it looks like a way to call the Python from C#? This could be a significant performance degradation as Python is (in general) far slower than compiled C#. If you can verify that you are calling into the Python itself I can give an answer as my job is literally a job about taking neural nets from python output and translating them into C# models. \$\endgroup\$ Commented Jun 5, 2018 at 15:59
  • \$\begingroup\$ Use the profiler to find out the bottlenecks and post them here, otherwise, we all would be just speculating. \$\endgroup\$ Commented Jun 5, 2018 at 16:10

0

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.