Giter Site home page Giter Site logo

Comments (4)

BlueprintBen avatar BlueprintBen commented on May 30, 2024 1

My apologies - I think you're absolutely right that Deep Profiling used with Barracuda produces flawed results and that a non-deep-profiling build appears to match your numbers more closely. Will see if the code change makes a difference but I'm much happier with the performance now.

from blazeposebarracuda.

creativeIKEP avatar creativeIKEP commented on May 30, 2024

Hello, @BlueprintBen !

Currently, BlazePoseBarracuda is optimized for GPU inference.
In my environment, BlazePoseBarracuda is running at about 200 FPS or more performance on the high performance GPU (ex: RTX2080 super).
On the other hand, BlazePoseBarracuda is running at about 20 FPS or less performance on the not high performance computer (ex: Macbook Pro Early 2015).
Thus, depending on the GPU performance of the computer, there are cases where real-time operation is difficult.

Thanks.

from blazeposebarracuda.

BlueprintBen avatar BlueprintBen commented on May 30, 2024

Is there anything that I have to enable in the example scene to utilize the GPU rather than the CPU? I'm using an RTX 6000 but am seeing ~30ms of Barracuda.Execute.

image (8)

Edit: Actually taking ~45ms on Full, ~30ms on Lite (had to count the PoseDetector and the PoseLandmarker). My CPU is an i7-7700k.

Edit 2: Numbers only drop a few ms if in a Standalone build with Deep Profiling. When running in Editor or Standalone, my CPU usage is 30% while my GPU usage is 15%.

Edit 3: On my laptop I'm seeing (i7-6700HQ / GTX960M), I'm seeing 70ms of CPU time per frame (Full model) used by Barracuda.Execute.

from blazeposebarracuda.

creativeIKEP avatar creativeIKEP commented on May 30, 2024

FPS drops when using Deep Profile not only in Standalone build but also in Unity Editor.
Therefore, try to check the FPS from the Stats in the Game Window without using the Deep Profile.

Also, in PoseDetectionBarracuda and PoseLandmarkBarracuda, the device used for inference is not explicitly specified, but is automatically set by Unity Barracuda.
Therefore, can you please clone PoseDetectionBarracuda and PoseLandmarkBarracuda to your local PC and explicitly specify GPU inference?
The changes in the source code are as follows.
Change lines:

Code change:

woker = model.CreateWorker();

woker = model.CreateWorker(WorkerFactory.Device.GPU);

Reference: https://docs.unity3d.com/Packages/[email protected]/api/Unity.Barracuda.ModelExtensions.html#Unity_Barracuda_ModelExtensions_CreateWorker_Unity_Barracuda_Model_Unity_Barracuda_WorkerFactory_Device_System_Boolean_

from blazeposebarracuda.

Related Issues (17)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.