asus4 / tf-lite-unity-sample

TensorFlow Lite Samples on Unity
834 stars 249 forks source link

BlazePose runs slow (~ 10 fps) in Windows on Unity Editor #283

Closed SusheelNath closed 1 year ago

SusheelNath commented 1 year ago

Environment (please complete the following information):

Describe the bug BlazePose when in Play Mode, runs around 10 fps (not consistent). It does this even on high end windows systems. This was tested even in older commits of master (dating back 1 year)

To Reproduce Steps to reproduce the behavior:

  1. Open BlazePose scene
  2. Run Scene
  3. Check Stats and Profiler for performance

Expected behavior Windows performance should match as it does for Mac (with similar specs)

asus4 commented 1 year ago

Hi @SusheelNath,

On MacOS, BlazePose runs on the metal delegate. On Windows, however, it runs on the CPU, even if you select a GPU option because the TensorFlow Lite does not support GPU acceleration on Windows.

If you choose the XNNPack option on Windows, it works much better than the CPU. However, it will still be slower than the GPU delegate.

SusheelNath commented 1 year ago

Hi @asus4,

The above works. Thank you.