Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Investigate using other AIs #78

Open
Kariaro opened this issue Mar 17, 2023 · 4 comments
Open

Investigate using other AIs #78

Kariaro opened this issue Mar 17, 2023 · 4 comments

Comments

@Kariaro
Copy link
Owner

Kariaro commented Mar 17, 2023

To reduce CPU usage check if other projects than mediapipe gives better performance

This is in response to #66

@Kariaro
Copy link
Owner Author

Kariaro commented Apr 10, 2023

After testing https://github.com/creativeIKEP/HolisticBarracuda
I found some pros and cons:

  • Much better CPU usage
    • By doing computations on the GPU the cpu usage goes from 30% to 10%
      But this also reduces the framerate to 20 fps instead of 100 fps
  • Worse face tracking
    • The face tracking is good but at 1 meter from the screen the
      high detail face tracking stops working and freezes
  • Very easy to switch to
    • It is easy to install and the API is very easy to follow
      Converting it to the current project would not be hard

Before I make any changes I would like to ask the maintainer if it is possible
to fix the face tracking and increase the framerate.

@Kariaro
Copy link
Owner Author

Kariaro commented May 9, 2023

I've found a way to implement these models myself but there are some problems.

  • The standard MediaPipe calculator uses a lot of code that includes some pre/post processing steps.
    Without these steps the output becomes significantly more jittery and random and will not be good enough for mocap.
    Therefore, for each AI model I would need to reimplement all the code from each calculator and make sure everything is still working properly.
  • I'm not sure how much performance would be saved from using these models because of the amount of pre/post processing steps. I'm going to have to learn more about this before I can say how long it would take to implement.

Though with enough time this method would increase the performance of the app by a lot but it would take a really long time to implement and test.

@TheFlightSimsOfficial
Copy link

I think there's no reason to implement the HolisticBarracuda replacing the good-old MediaPipe, just look how good the code and MediaPipe.

Maybe, you need to optimize the code only, since MediaPipe doesn't always the reason for low performance.

@Kariaro
Copy link
Owner Author

Kariaro commented Jun 12, 2023

I think there's no reason to implement the HolisticBarracuda replacing the good-old MediaPipe, just look how good the code and MediaPipe.

Maybe, you need to optimize the code only, since MediaPipe doesn't always the reason for low performance.

Most of the performance loss comes from running MediaPipe on the CPU.

The problem with MediaPipe is that I cannot run it on the GPU. For low end computers this makes the app hard to use. (If you are playing a game that also uses a lot of CPU)

HolisticBarracuda runs on GPU and is multiplatform but the problem I have with HolisticBarracuda is that it’s not async meaning that it slows down the render thread. (Low CPU but terrible fps)

This is why I want to replace MediaPipe.

If MediaPipe had support for GPU I would keep using it though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants