官方源码构建脚本目前只支持 Debian Forky(x86_64 和 arm64),Windows/Mac 构建脚本尚在计划中;Linux 上要用 CUDA/MIGraphX 加速需自行从源码构建并确保 ONNX Runtime 带对应支持;Apple Silicon 上不能靠 Rosetta2 转译运行,跨架构二进制会崩溃。
obs-backgroundremoval
royshilGPL-3.0活跃维护OBS 直播/录屏插件,用 ONNX Runtime 做实时人像背景分割,一键抠掉摄像头背景换成任意画面。
An OBS plugin for removing background in portrait images (video), making it easy to replace the background when recording or streaming.
git clone https://github.com/royshil/obs-backgroundremoval.git
cd obs-backgroundremoval
sudo ./bin/bootstrap
./bin/setup
./bin/build
sudo dpkg -i release/obs-backgroundremoval-*-linux-gnu.debREADME 未给出具体显存要求;目标是在没有 GPU 的系统上也能用,CPU 可跑。Mac 支持 CoreML 加速(Apple Silicon 高效,不支持 Rosetta2 跨架构);Linux 从源码构建时支持 CUDA、MIGraphX,ROCM 自 ONNX Runtime 1.23.0 起被移除。
OBS 插件,用神经网络抠掉人像背景,直播录屏时一键换背景
OBS 直播/录屏插件,用 ONNX Runtime 做实时人像背景分割,一键抠掉摄像头背景换成任意画面。
核心能力
- 用神经网络预测人像掩码并去除背景像素
- 可与其它 OBS 插件组合替换成图片或透明色
- 内置低光照增强模型改善暗场景画面
- UI 可调 CPU 线程数,2 线程效果最佳
- Mac 上用 CoreML 加速,Apple Silicon 上高效
容易踩的坑
- 1.5.01.5.0: OBS 32+ and Fix deb packagespre-release2026-08-30 · 2026-08-30 14:49 UTC
查看更新说明
- OBS 32 or later is required from version 1.5.0
- A first-run About dialog is shown after installation or update
- Debian and Ubuntu packaging has been overhauled
INSTALL.htmlis included in the Windows ZIP
- Bump actions/attest from 4.1.1 to 4.2.0 by @dependabot[bot] in https://github.com/royshil/obs-backgroundremoval/pull/926
- Bump actions/setup-node from 6.4.0 to 7.0.0 by @dependabot[bot] in https://github.com/royshil/obs-backgroundremoval/pull/927
- Bump actions/checkout from 7.0.0 to 7.0.1 by @dependabot[bot] in https://github.com/royshil/obs-backgroundremoval/pull/928
- Update CI, dependencies and pages by @umireon in https://github.com/royshil/obs-backgroundremoval/pull/940
- Fix CI errors by @umireon in https://github.com/royshil/obs-backgroundremoval/pull/941
- Fix GPU support again by @umireon in https://github.com/royshil/obs-backgroundremoval/pull/942
- Add build-plugin-macos.yml by @umireon in https://github.com/royshil/obs-backgroundremoval/pull/944
- Bump actions/attest from 4.2.0 to 4.2.2 by @dependabot[bot] in https://github.com/royshil/obs-backgroundremoval/pull/946
- Refactor build workflows by @umireon in https://github.com/royshil/obs-backgroundremoval/pull/949
- Improve self-service support by @umireon in https://github.com/royshil/obs-backgroundremoval/pull/951
- Bump actions/setup-python from 6.3.0 to 7.0.0 by @dependabot[bot] in https://github.com/royshil/obs-backgroundremoval/pull/929
- Add download buttons by @umireon in https://github.com/royshil/obs-backgroundremoval/pull/952
- Update OBS deps to 32.2.1 by @umireon in https://github.com/royshil/obs-backgroundremoval/pull/954
- Add a new download trends chart by @umireon in https://github.com/royshil/obs-backgroundremoval/pull/956
- Add star-history.svg by @umireon in https://github.com/royshil/obs-backgroundremoval/pull/957
- Bump actions/attest from 4.2.0 to 4.2.2 by @dependabot[bot] in ht
- 1.4.11.4.1: OpenCV 5 compatibility and Debian最新正式版2026-07-26 · 2026-07-26 07:35 UTC
What's Changed
- OpenCV 5 compatibility
- Debian
See also the Official Documentation for installing our plugin into your OBS Studio on Windows, macOS, or Linux.
- 1.4.01.4.0: Maintaining High Standards for Supply Chain Securitypre-release2026-04-07 · 2026-04-07 13:10 UTC
查看更新说明
We confirmed that this release have critical issues for video quality. Please wait for a next release if you are not a developer.
We're proud to provide our plugin's users with the highest security.
What's Changed
- Renew CI/CD workflows for SLSA (Supply-chain Levels for Software Artifacts) compliance
- Clarify the contributing rules so that everyone can join our development
- Conform to new OBS standards such as ProgramData installation in Windows and manifest.json for Plugin Manager.
See also the Official Documentation for installing our plugin into your OBS Studio on Windows, macOS, or Linux.
What's Changed
- workflow: attest artifacts and use gh release by @umireon in https://github.com/royshil/obs-backgroundremoval/pull/784
- Clarify contributing policy by @umireon in https://github.com/royshil/obs-backgroundremoval/pull/789
- Add license headers for C/C++ files by @umireon in https://github.com/royshil/obs-backgroundremoval/pull/791
- Add Pull Request Validator by @umireon in https://github.com/royshil/obs-backgroundremoval/pull/792
- REUSE compliance by @umireon in https://github.com/royshil/obs-backgroundremoval/pull/795
- Use a second-level heading for the PR template by @umireon in https://github.com/royshil/obs-backgroundremoval/pull/798
- Improve PR Validation by @umireon in https://github.com/royshil/obs-backgroundremoval/pull/797
- Extract necessary fields from commit list on PR by @umireon in https://github.com/royshil/obs-backgroundremoval/pull/800
- Replace pages workflow with a more secure one by @umireon in https://github.com/royshil/obs-backgroundremoval/pull/799
- Rewrite plugin build workflows to be robust and secure by @umireon in https://github.com/royshil/obs-backgroundremoval/pull/805
- Remove interactive-help by @umireon in https://github.com/royshil/obs-backgroundremoval/pull/813
- Fix ORT cache building by @umireon in https://github.com/royshil/obs-backgroundremoval/pull/814
- Bump actions/download-artifact from 8.0.0 to 8.0.1 by @dependabot[bot] in https://github.com/royshil/obs-backgroundremoval/pull/806
- Update vcpkg baseline with kaito-tokyo/vcpkg-obs-kaito-tokyo by @umireon in https://github.com/royshil/obs-backgroundremoval/pull/817
- Improve PR Validation by @umireon in https://github.com/royshil/obs-backgroundremoval/pull/816
- Add manifest.json for Plugin Manager by @umireon in https://github.com/royshil/obs-backgroundremoval/pull/818
- Add dependencies-vcpkg.md to keep dependencies on vcpkg up to date by @umireon in https://github.com/royshil/obs-backgroundremoval/pull/820
- [dependencies vcpkg] Sync vcpkg baselines and add upstream ASAN triplets by @github-actions[bot] in https://github.com/royshil/obs-backgroundremoval/pull/826
- Enable grouping settings for Dependabot by @umireon in https://github.com/royshil/obs-backgroundremoval/pull/827
- Fix dependabot.yml and update dependencies as well by @umireon in https://github.com/royshil/obs-backgroundremoval/pull/828
- Bump version to 1.4.0 by @umireon in https://github.com/royshil/obs-backgroundremoval/pull/836
- Add notes for deprecated Program Files installation and link to my new video guide playlist by @umireon in https://github.com/royshil/obs-backgroundremoval/pull/837
- Fix create-release by @umireon in https://github.com/royshil/obs-backgroundremoval/pull/842
- Fix script errors on create-release by @umireon in https://github.com/royshil/obs-backgroundremoval/pull/843
- Hermetic build by @umireon in https://github.com/royshil/obs-backgroundremoval/pull/846
- Rework CI for stable build and cache consistency by @umireon in https://github.com/royshil/obs-backgroundremoval/pull/849
- Fix gh release create call by @umireon in https://github.com/royshil/obs-backgroundremoval/pull/850
New Contributors
- @dependabot[bot] made their first contribution in https://github.com/royshil/obs-backgroundremoval/pull/806
- @github-acti
- 1.3.7OBS Background Removal 1.3.72026-02-25 · 2026-02-25 22:22 UTC
查看更新说明
New installation for Windows, and statically linked ONNX Runtime
- Add version history pages on GitHub Pages by @umireon in https://github.com/royshil/obs-backgroundremoval/pull/762
- Delete winget-update.yaml by @umireon in https://github.com/royshil/obs-backgroundremoval/pull/763
- Migrate to the new install recommendation for OBS plugins by @umireon in https://github.com/royshil/obs-backgroundremoval/pull/764
- Switch to runtime-optimized .ort model files by @umireon in https://github.com/royshil/obs-backgroundremoval/pull/766
- Static-linking ONNX Runtime on Mac to avoid duplicate symbols by @umireon in https://github.com/royshil/obs-backgroundremoval/pull/765
- Update Mac Build CI to preserve ccache correctly by @umireon in https://github.com/royshil/obs-backgroundremoval/pull/767
- Static-linking ONNX Runtime on Windows CPU build by @umireon in https://github.com/royshil/obs-backgroundremoval/pull/768
- Enable ccache for Windows by @umireon in https://github.com/royshil/obs-backgroundremoval/pull/769
- Static-linking ONNX Runtime on Ubuntu CPU build by @umireon in https://github.com/royshil/obs-backgroundremoval/pull/771
- Enable ccache for ONNX Runtime on Ubuntu by @umireon in https://github.com/royshil/obs-backgroundremoval/pull/772
- Remove source tarball packaging and upload by @umireon in https://github.com/royshil/obs-backgroundremoval/pull/773
- Add ccache variables for correct caching on Ubuntu by @umireon in https://github.com/royshil/obs-backgroundremoval/pull/774
- Fix old repo names by @umireon in https://github.com/royshil/obs-backgroundremoval/pull/780
- Improve vcpkg dependency installation by @umireon in https://github.com/royshil/obs-backgroundremoval/pull/776
- Add an independent workflow to build ONNX Runtime periodically and keep its cache clean by @umireon in https://github.com/royshil/obs-backgroundremoval/pull/781
- chore: bump version to 1.3.7 for release by @umireon in https://github.com/royshil/obs-backgroundremoval/pull/783
Full Changelog: https://github.com/royshil/obs-backgroundremoval/compare/1.3.6...1.3.7
- 1.3.6OBS Background Removal 1.3.62026-01-25 · 2026-01-25 13:28 UTC
查看更新说明
MIGraphX, new model, new option!
- Add MIGraphX execution provider (#740)
- Add MediaPipe multi-class selfie segmentation model (#742)
- Add option to keep the filter enabled when scene becomes inactive (#747)
- Fix wolfSSL not to crash (#735)
- Fix AVX2 not to be required for better compatibility (#754)
- Add link to the Lite version (#753)
Thank you for your all the feedback!
用户点评
登录用户的真实使用记录,可按版本和硬件筛选还没有人点评。第一个说出真实体验的人最有价值。
OBS Plugin: Portrait Background Removal / Virtual Green-screen and Low-Light Enhancement
A plugin for OBS Studio that allows you to replace the background in portrait images and video, as well as enhance low-light scenes.
Or, browse versions on releases page.
Not working? Please try the Lite version (Live Background Removal Lite) developed by one of us (Kaito Udagawa).
Usage
Check out the usage guide page for usage walkthrough and recommendations.
Additional tutorial videos:
- ▶︎ Official guide to the Background Removal plugin for OBS Studio on YouTube
- Depth of Field effect: https://youtu.be/jC3EKSpNjQk
- Low-light enhancement: https://youtu.be/WSBLYWFrn2Q
- Remove background from ANY object (not just human): https://youtu.be/N74VCDCToX8
How to build from source
Windows:
git clone https://github.com/royshil/obs-backgroundremoval.git
Platforms we support building from source officially:
git clone https://github.com/royshil/obs-backgroundremoval.git
cd obs-backgroundremoval
sudo ./bin/bootstrap
./bin/setup
./bin/build
sudo dpkg -i release/obs-backgroundremoval-*-linux-gnu.deb
The supported platforms are:
- Debian Forky (x86_64 and arm64)
We plan to add building scripts for popular platforms such as Windows, Mac, and various distributions of Linux.
Introduction
This plugin is meant to make it easy to replace the background in portrait images and video. It is using a neural network to predict the mask of the portrait and remove the background pixels. It's easily composable with other OBS plugins to replace the background with e.g. an image or a transparent color.
If you like this work, which is given to you completely free of charge, please consider supporting it by sponsoring us on GitHub:
Support and Help
Reach out to us on GitHub Discussions or the OBS Plugins forum for online / immediate help.
If you found a bug or want to suggest a feature or improvement please open an issue.
If you are looking for hands-on help or private consultation please select a sponsorship tier.
Technical Details
GPU support:
- On Windows, we plan to support WinML acceleration.
- On Mac we support CoreML for acceleration, which is efficient on Apple Silicon. Note: This plugin does not support cross-architecture translation (Rosetta2). Intel binaries on Apple Silicon or Apple Silicon binaries on Intel will crash.
- On Linux CUDA, ROCM (deprecated in ONNX Runtime 1.23.0), and MIGraphX are supported if this plugin is built from source. Ensure your ONNX Runtime installation has CUDA, ROCM, or MIGraphX support. For AMD GPUs, MIGraphX is recommended as ROCM was removed from ONNX Runtime starting with version 1.23.0.
- The goal of this plugin is to be available for everyone on every system, even if they don't own a GPU.
Number of CPU threads is controllable through the UI settings. A 2-thread setting works best.
The pretrained model weights used for portrait foreground segmentation are taken from:
- https://github.com/anilsathyan7/Portrait-Segmentation/tree/master/SINet
- https://github.com/PaddlePaddle/PaddleSeg/tree/release/2.7/contrib/PP-HumanSeg
- https://github.com/PINTO0309/PINTO_model_zoo/tree/main/082_MediaPipe_Meet_Segmentation
- https://github.com/PeterL1n/RobustVideoMatting
- https://github.com/PINTO0309/PINTO_model_zoo/tree/main/384_TCMonoDepth and https://github.com/yu-li/TCMonoDepth
Image enhancement (low light) models are taken from:
- https://github.com/PINTO0309/PINTO_model_zoo/tree/main/213_TBEFN
- https://github.com/PINTO0309/PINTO_model_zoo/tree/main/372_URetinex-Net
- https://github.com/PINTO0309/PINTO_model_zoo/tree/main/370_Semantic-Guided-Low-Light-Image-Enhancement
Some more information about how I built it: https://www.morethantechnical.com/2021/04/15/obs-plugin-for-portrait-background-removal-with-onnx-sinet-model/ and https://www.morethantechnical.com/2023/05/20/building-an-obs-background-removal-plugin-a-walkthrough/
Code Walkthrough
This video on YouTube will take you through the major parts of the code and explain them.
Download Trends and Star History