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

Suggestion: switch to new async interface for segmentation (>50% drop in CPU usage) #198

Open
stephematician opened this issue Nov 8, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@stephematician
Copy link

I would recommend switching to the asynchronous MediaPipe interface. I've been working on a similar (but fundamentally different) effect and I found that CPU usage dropped dramatically when switching to MediaPipe's new segment_async.

As an example, here's htop output when running Linux-Fake-Background-Webcam script doing no composition whatsoever (just segmenting) 1280x720, 30FPS, MJPG colour:

image

And here's the htop result when I'm running my own effect that uses segment_async (same input/output):

image

@fangfufu
Copy link
Owner

fangfufu commented Nov 9, 2023

Feel free to submit a patch. I will review it and probably merge it.

@stephematician
Copy link
Author

I won't have the time to work on this effect as well as my own - so feel free to close this issue.

@fangfufu fangfufu added the enhancement New feature or request label Nov 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants