Comments (10)
Here is a working PKGBUILD that downloads the release version and does not use git at all. Feel free to use it without attribution, I consider it public domain / CC0.
The changes in prepare should probably fixed directly. Maybe skip version_from_git
if VERSION is set or let it fail gracefully. The models listed in CMakeLIsts have to be fixed as well.
pkgname=obs-backgroundremoval
pkgver=0.2.4_beta
_ONNXRUNTIME_FILE=onnxruntime-linux-x64-1.7.0.tgz
_onnxdir=onnxruntime-linux-x64-1.7.0
_bgdir=$pkgname-${pkgver//_/-}
pkgrel=1
arch=(x86_64)
url='https://github.com/royshil/obs-backgroundremoval'
pkgdesc="Background removal plugin for OBS studio (precomopiled onnxruntime)"
license=(MIT custom)
depends=(obs-studio opencv)
makedepends=(cmake)
source=("${_bgdir}.tar.gz::https://github.com/royshil/$pkgname/archive/refs/tags/v${pkgver//_/-}.tar.gz"
"https://github.com/microsoft/onnxruntime/releases/download/v1.7.0/$_ONNXRUNTIME_FILE")
sha256sums=('5e66cfc45827581bc8da50a775d3e8601beb4aec72d42f0efc4d3e403161ddc1'
'0345f45f222208344406d79a6db3280ed2ccc884dc1e064ce6e6951ed4c70606')
prepare() {
# build from archive, not git. Version set during build()
sed -i "s/^version_from_git/#&/" $_bgdir/CMakeLists.txt
# fix models listed in cmake
sed -i '/^.*file(GLOB/i file(GLOB onnxmodels data/*.onnx)' $_bgdir/CMakeLists.txt
sed -i 's/"data\/SINet_Softmax.onnx"/${onnxmodels}/' $_bgdir/CMakeLists.txt
}
build() {
cd "$_bgdir"
# no way to set beta suffix
# set rpath to avoid installing onnxruntime globally
cmake -B build -DVERSION="${pkgver//_*/.0}" -DobsIncludePath=/usr/include/obs/ \
-DCMAKE_INSTALL_PREFIX:PATH=/usr \
-DOnnxruntime_INCLUDE_DIRS="$srcdir/$_onnxdir/include/" -DOnnxruntime_LIBRARIES="$srcdir/$_onnxdir/lib/libonnxruntime.so" \
-DOnnxruntime_INCLUDE_DIR="$srcdir/$_onnxdir/include/" \
-DCMAKE_INSTALL_RPATH="/usr/lib/obs-backgroundremoval"
cd build
make
}
package() {
make -C "$_bgdir/build" DESTDIR="$pkgdir" install
install -Dt "$pkgdir/usr/share/licenses/obs-backgroundremoval" "$_bgdir/LICENSE"
# install onnxruntimey
cd "$_onnxdir"
install -Dt "$pkgdir/usr/share/licenses/obs-backgroundremoval/onnxruntime" \
LICENSE Privacy.md README.md ThirdPartyNotices.txt
install -Dt "$pkgdir/usr/lib/obs-backgroundremoval" lib/*
}
from obs-backgroundremoval.
you can always give cmake the directories explicitly e.g.
$ cmake .. -DobsIncludePath=/usr/local/include/libobs -DobsLibPath=/usr/local/lib
from obs-backgroundremoval.
Remove external/FindLibObs.cmake
and try again, this file should only be required for osx.
from obs-backgroundremoval.
Hi,
This is what happens when I try to build on Archlinux following the README instructions:
Hi, do let me know if you were successful (or better yet try to provide a PKGBUILD). Haven't tried it myself due to time constraints but I will get round to it at some point.
from obs-backgroundremoval.
I am getting the same error on Ubuntu 21.04
from obs-backgroundremoval.
I've added a PKGBUILD for making the package
@ngoonee ☝️
from obs-backgroundremoval.
Awesome work @royshil !
However I had to
sudo ln -s /usr/local/share/obs/obs-plugins/obs-backgroundremoval /usr/share/obs/obs-plugins/obs-backgroundremoval
sudo ln -s /usr/local/lib/obs-plugins/obs-backgroundremoval.so /usr/lib/obs-plugins/obs-backgroundremoval.so
Because apparently OBS plugins in Archlinux are loaded from /usr/lib
rather than /usr/local
so you might want to correct that in the Makefile or add those two lines in the pkgbuild IDK.
Thanks for the awesome work :)
from obs-backgroundremoval.
@morrolinux can you plz make a PR with changes to the PKGBUILD?
from obs-backgroundremoval.
The provided PKGBUILD by @progandy works for me. Thanks!
from obs-backgroundremoval.
the changes have been incorporated into the PKGBUILD. Thank you everyone!
from obs-backgroundremoval.
Related Issues (20)
- 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
- Plugin loads, but doesn't do anything HOT 5
- be able to capture full dody and hands as they extend out to point HOT 3
- Background color setting is missing from background removal advanced settings HOT 1
- Build issue on Fedora 40: failed to set dynamic section sizes: bad value HOT 7
- Feature request: Face tracking HOT 2
- fail to build on arm64 ubuntu jammy HOT 8
- OBS launch error after installing plugin HOT 3
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.