Comments (9)
Hi,
I am running ubuntu 21.04 and I had to do the following to be able to build and install the plugin:
- Remove OBS-Studio installed via snap and install OBS-Studio via ppa (
sudo apt install obs
) [this was required due to dependency conflicts with libobs-dev] - Install dependencies as mentioned in README
apt install -y libobs-dev libopencv-dev language-pack-en wget git build-essential cmake
wget https://github.com/microsoft/onnxruntime/releases/download/v1.7.0/onnxruntime-linux-x64-1.7.0.tgz
tar xzvf onnxruntime-linux-x64-1.7.0.tgz --strip-components=1 -C /usr/local/ --wildcards "*/include/*" "*/lib*/"
- Run:
cmake -S . -B build -DobsIncludePath=/usr/include/obs
to configure the build [this was required since LibObs could not be found (missing: LIBOBS_INCLUDE_DIR) ] - Run build and install
cmake --install build && sudo cmake --install build
[sudo was required for installation since we are installing to /usr/...] - Last but not least I found that the plugin was installed to the wrong directories (my OBS installation did not load the plugin). So, I had to do the following in addition:
sudo mv /usr/local/share/obs/obs-plugins/obs-backgroundremoval /usr/share/obs/obs-plugins
sudo mv /usr/local/lib/obs-plugins/obs-backgroundremoval.so /usr/lib/obs-plugins
I was not able to find an official statement about the correct plugin install directory, but the information written in this forum helped me: https://forums.linuxmint.com/viewtopic.php?t=278509
If people agree that this is the correct installation procedure/location, I am happy to create a PR.
from obs-backgroundremoval.
@ysalmon THX alot for the hint regarding correct branch. This solved it for me. I also use PPA on Ubuntu 20.04 and cloned the repository for the headers.
I did not install to /usr
, instead i moved to the following structure, which i prefer for my obs-installation:
~/.config/obs-studio/plugins/obs-backgroundremoval/
├── bin
│ └── 64bit
│ └── obs-backgroundremoval.so
└── data
├── SINet_Softmax.onnx
└── SINet_Softmax_simple.onnx
In my case i did not need to sudo ldconfig
.
from obs-backgroundremoval.
@ysalmon @Wurschdbude can y'all plz make a PR with fixes to the README?
from obs-backgroundremoval.
@ysalmon THX alot for the hint regarding correct branch. This solved it for me. I also use PPA on Ubuntu 20.04 and cloned the repository for the headers.
I did not install to
/usr
, instead i moved to the following structure, which i prefer for my obs-installation:~/.config/obs-studio/plugins/obs-backgroundremoval/ ├── bin │ └── 64bit │ └── obs-backgroundremoval.so └── data ├── SINet_Softmax.onnx └── SINet_Softmax_simple.onnx
In my case i did not need to
sudo ldconfig
.
I was not able to use the snap configuration
for some reason is not finding the libonnxruntime
error: os_dlopen(/home/bb8/snap/obs-studio/1195/.config/obs-studio/plugins/obs-backgroundremoval/bin/64bit/obs-backgroundremoval.so->/home/bb8/snap/obs-studio/1195/.config/obs-studio/plugins/obs-backgroundremoval/bin/64bit/obs-backgroundremoval.so): libonnxruntime.so.1.7.0: cannot open shared object file: No such file or directory
warning: Module '/home/bb8/snap/obs-studio/1195/.config/obs-studio/plugins/obs-backgroundremoval/bin/64bit/obs-backgroundremoval.so' not loaded
ldd obs-backgroundremoval.so | grep onnx
libonnxruntime.so.1.7.0 => /usr/local/lib/libonnxruntime.so.1.7.0 (0x00007f794a5d3000)
however, the file is there
ls /usr/local/lib/libonnxruntime.so.1.7.0
/usr/local/lib/libonnxruntime.so.1.7.0
from obs-backgroundremoval.
@marcelotrevisani , curious if you figured out the issue you were having with OBS not finding libonnxruntime.so.1.7.0
? I'm running into the same error using a flatpak installation...
from obs-backgroundremoval.
I am attempting to build this on Debian stable (11 Bullseye released in 2021), following the current Linux directions with some minor changes.
# # language-pack-en is missing,
$ sudo apt install -y libobs-dev libopencv-dev wget git build-essential cmake libonnx-dev
$ git clone https://github.com/royshil/obs-backgroundremoval.git .
$ mkdir obs-backgroundremoval/build && cd obs-backgroundremoval/build && \
cmake .. && cmake --build . && cmake --install .
-- Found Git: /usr/bin/git (found version "2.30.2")
-- The C compiler identification is GNU 10.2.1
-- The CXX compiler identification is GNU 10.2.1
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Error at /usr/share/cmake-3.18/Modules/FindPackageHandleStandardArgs.cmake:165 (message):
Could NOT find LibObs (missing: LIBOBS_INCLUDE_DIR)
Call Stack (most recent call first):
/usr/share/cmake-3.18/Modules/FindPackageHandleStandardArgs.cmake:458 (_FPHSA_FAILURE_MESSAGE)
external/FindLibObs.cmake:97 (find_package_handle_standard_args)
CMakeLists.txt:69 (find_package)
-- Configuring incomplete, errors occurred!
See also ".../src-obs-backgroundremoval/build/CMakeFiles/CMakeOutput.log".
dpkg -l *onnx*
ii libonnx-dev:amd64 1.7.0+dfsg-3 amd64 Open Neural Network Exchange (ONNX) (dev)
ii libonnx1:amd64 1.7.0+dfsg-3 amd64 Open Neural Network Exchange (ONNX) (libs)
ii libonnxifi:amd64 1.7.0+dfsg-3 amd64 Open Neural Network Exchange (ONNX) (ONNXIFI)
dpkg -l '*obs*'
ii libobs-dev:amd64 1:27.0.1-dmo2 amd64 recorder and streamer for live video content (development files)
ii libobs0:amd64 1:27.0.1-dmo2 amd64 recorder and streamer for live video content (shared library)
ii obs-plugins 1:27.0.1-dmo2 amd64 recorder and streamer for live video content (plugins)
ii obs-studio 1:27.0.1-dmo2 amd64 recorder and streamer for live video content
Didn't get there yet, but in case it does...
find /usr -iname '*libonnx*'
/usr/lib/x86_64-linux-gnu/libonnx.so.1
/usr/lib/x86_64-linux-gnu/libonnx_proto.so.1
/usr/lib/x86_64-linux-gnu/libonnxifi_dummy.so
/usr/lib/x86_64-linux-gnu/libonnxifi_loader.a
/usr/lib/x86_64-linux-gnu/libonnx.so
/usr/lib/x86_64-linux-gnu/libonnx_proto.so
/usr/lib/libonnxifi.so
/usr/share/doc/libonnx1
/usr/share/doc/libonnxifi
/usr/share/doc/libonnx-dev
/usr/share/lintian/overrides/libonnxifi
find /usr -iname '*libobs*'
/usr/lib/x86_64-linux-gnu/pkgconfig/libobs.pc
/usr/lib/x86_64-linux-gnu/cmake/LibObs
/usr/lib/x86_64-linux-gnu/cmake/LibObs/LibObsConfig.cmake
/usr/lib/x86_64-linux-gnu/cmake/LibObs/LibObsConfigVersion.cmake
/usr/lib/x86_64-linux-gnu/cmake/LibObs/LibObsTarget-release.cmake
/usr/lib/x86_64-linux-gnu/cmake/LibObs/LibObsTarget.cmake
/usr/lib/x86_64-linux-gnu/libobs-frontend-api.so.0.0
/usr/lib/x86_64-linux-gnu/libobs-opengl.so.0.0
/usr/lib/x86_64-linux-gnu/libobs.so.0
/usr/lib/x86_64-linux-gnu/libobsglad.so.0
/usr/lib/x86_64-linux-gnu/libobs-frontend-api.so.0
/usr/lib/x86_64-linux-gnu/libobs-opengl.so.0
/usr/lib/x86_64-linux-gnu/libobs-scripting.so
/usr/lib/x86_64-linux-gnu/libobs-frontend-api.so
/usr/lib/x86_64-linux-gnu/libobs-opengl.so
/usr/lib/x86_64-linux-gnu/libobs.so
/usr/lib/x86_64-linux-gnu/libobsglad.so
/usr/share/doc/libobs0
/usr/share/doc/libobs-dev
/usr/share/obs/libobs
from obs-backgroundremoval.
Rebased instructions based on the archlinux package build
#8 (comment)
src-obs-backgroundremoval$ cmake -B build -DobsIncludePath=/usr/include/obs -DCMAKE_INSTALL_PREFIX:PATH=/usr -DCMAKE_INSTALL_RPATH="/usr/lib/obs-backgroundremoval" -DOnnxruntime_INCLUDE_DIRS=/usr/include/onnx/ -DOnnxruntime_INCLUDE_DIR=/usr/include/onnx/ -DOnnxruntime_LIBRARIES=/usr/lib/x86_64-linux-gnu/libonnx.so
cd build ; make
... onnxruntime_cxx_api.h isn't included in any package shipped by Debian
https://github.com/microsoft/onnxruntime/releases
Current version
wget https://github.com/microsoft/onnxruntime/releases/download/v1.8.1/onnxruntime-linux-x64-1.8.1.tgz
tar -axf onnxruntime-linux-x64-1.8.1.tgz
$ cmake -B build -DobsIncludePath=/usr/include/obs -DCMAKE_INSTALL_PREFIX:PATH=/usr -DCMAKE_INSTALL_RPATH="/usr/lib/obs-backgroundremoval"
-DOnnxruntime_INCLUDE_DIRS="$srcdir/$_onnxdir/include/"
-DOnnxruntime_LIBRARIES="$srcdir/$_onnxdir/lib/libonnxruntime.so"
-DOnnxruntime_INCLUDE_DIR="$srcdir/$_onnxdir/include/"
cd build
make
sudo cmake --install
sudo cp -v ../onnxruntime*/lib/* /usr/lib/obs-backgroundremoval/
obs
Now to figure out the v4l2loopback camera...
from obs-backgroundremoval.
Hi,
I am running ubuntu 21.04 and I had to do the following to be able to build and install the plugin:* Remove OBS-Studio installed via snap and install OBS-Studio via ppa (`sudo apt install obs`) [this was required due to dependency conflicts with libobs-dev] * Install dependencies as mentioned in README
apt install -y libobs-dev libopencv-dev language-pack-en wget git build-essential cmake wget https://github.com/microsoft/onnxruntime/releases/download/v1.7.0/onnxruntime-linux-x64-1.7.0.tgz tar xzvf onnxruntime-linux-x64-1.7.0.tgz --strip-components=1 -C /usr/local/ --wildcards "*/include/*" "*/lib*/"
* Run: `cmake -S . -B build -DobsIncludePath=/usr/include/obs` to configure the build [this was required since LibObs could not be found (missing: LIBOBS_INCLUDE_DIR) ] * Run build and install `cmake --install build && sudo cmake --install build` [sudo was required for installation since we are installing to /usr/...] * Last but not least I found that the plugin was installed to the wrong directories (my OBS installation did not load the plugin). So, I had to do the following in addition:
sudo mv /usr/local/share/obs/obs-plugins/obs-backgroundremoval /usr/share/obs/obs-plugins sudo mv /usr/local/lib/obs-plugins/obs-backgroundremoval.so /usr/lib/obs-plugins
I was not able to find an official statement about the correct plugin install directory, but the information written in this forum helped me: https://forums.linuxmint.com/viewtopic.php?t=278509
If people agree that this is the correct installation procedure/location, I am happy to create a PR.
That worked for me, I just needed to change the location of the plugins to
/usr/lib/x86_64-linux-gnu/obs-plugins/
from obs-backgroundremoval.
new build scripts in place for linux
from obs-backgroundremoval.
Related Issues (20)
- [NixOS] Unable to get model filename models/mediapipe.onnx HOT 3
- Keeps crashing OBS HOT 5
- It doesn't show up in any Filter. HOT 13
- Cache TensorRT modules HOT 5
- I could not understand how to use the new version of this plugin. HOT 7
- Upgrade to ONNXRuntime v1.17.1 HOT 2
- Even if you check Disable update check, it will be displayed every time you start OBS. HOT 2
- Background removal doesn't work nicely with the Source Clone plugin from Exeldro. HOT 7
- Can this plugin remove the background of a game card instead of a human portrait? HOT 18
- The latest update for OBS Back ground removal will not load because of Microsoft Defender SmartScreen HOT 6
- Latest update seems to break silhouette coherence HOT 2
- Huge latency issue in Linux HOT 6
- Support more than one person HOT 3
- DirectML not working with AMD RX 7800 XT
- Obs does not start after installing the background removal tool HOT 8
- Tremendous latency apon diabling source HOT 13
- Version 1.1.13 doesn't work HOT 16
- Background removal
- Not able to update the obs on `linux` HOT 3
- OBS does not load plugin HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from obs-backgroundremoval.