Faking your webcam background under GNU/Linux, now supports background blurring, animated background, colour map effect, hologram effect and on-demand processing.
GNU General Public License v3.0
1.6k
stars
161
forks
source link
Suggestion: switch to new async interface for segmentation (>50% drop in CPU usage) #198
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:
And here's the htop result when I'm running my own effect that uses segment_async (same input/output):
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:And here's the
htop
result when I'm running my own effect that usessegment_async
(same input/output):