GPU Acceleration in Live Background Removal Lite
Live Background Removal Lite consists of three main components:
- Background Segmentation: Detects and separates the foreground (person) from the background using AI.
- Guided Filter: Refines the segmentation mask to produce smooth and accurate edges.
- Temporal Averaging Filter: Stabilizes the mask over time to reduce flicker and noise.
These components work together to deliver high-quality real-time background removal.
Live Background Removal Lite leverages GPU acceleration for optimal performance in several key areas. Both GPU and CPU execution enable real-time processing, so users can enjoy smooth background removal regardless of their hardware.
- Guided Filter & Temporal Averaging Filter: These filters are fully GPU-accelerated, ensuring fast and efficient processing.
- Background Segmentation (MediaPipe SelfieSegmenter): The segmentation model shows little difference in computation time between CPU and GPU. (See model card for details). To make installation easy for everyone, the plugin defaults to CPU inference.
Why Default to CPU?
Most users can install and use the plugin without any special hardware or configuration. By defaulting to CPU inference, we avoid compatibility issues and ensure a smooth experience for all users.
GPU Offloading Plans
For users who need to minimize CPU load—such as gamers or those running other demanding applications—we plan to provide GPU offloading implementations.
Currently, GPU inference support is available for Linux and macOS. You can enable GPU inference by building the plugin from source for your environment.
How to Enable GPU Inference
- Build the plugin from source with GPU support enabled (Linux and macOS are supported).
- In the plugin settings, select the GPU you want to use for inference.
We aim to expand GPU offloading support to other platforms in future releases.