Package Details: obs-backgroundremoval 1.1.13-1

Git Clone URL: https://aur.archlinux.org/obs-backgroundremoval.git (read-only, click to copy)
Package Base: obs-backgroundremoval
Description: Background removal plugin for OBS studio
Upstream URL: https://github.com/occ-ai/obs-backgroundremoval
Keywords: background chroma-key obs opencv removal
Licenses: GPL2
Submitter: PedroHLC
Maintainer: umireon
Last Packager: umireon
Votes: 14
Popularity: 2.33
First Submitted: 2021-08-13 14:15 (UTC)
Last Updated: 2024-03-27 18:48 (UTC)

Latest Comments

1 2 3 Next › Last »

mvforell commented on 2025-03-24 13:52 (UTC)

I'm wondering why we're not using the system ONNX runtime for this package? Currently, with the dependency on onxxruntime 1.17.1 I'm getting errors when OBS tries to load the plugin, because it depends on outdated .so files.

To get the system runtime to work, I had to make some tweaks to upstream's CMake config: 1. Don't depend on a specific ONNX runtime version; and 2. Fix some issues with the imported config - /usr/lib/cmake/onnxruntime/ only has onnxruntimeConfig.cmake, not OnnxruntimeConfig.cmake, so we need to use the lowercase version in find_package(), and the include and library paths don't seem to work for some reason (I don't really use CMake, so no idea why).

diff --git a/obs-backgroundremoval-1.1.13/CMakeLists.txt b/src/obs-backgroundremoval-1.1.13/CMakeLists.txt
index d140acb..d690069 100644
--- a/obs-backgroundremoval-1.1.13/CMakeLists.txt
+++ b/src/obs-backgroundremoval-1.1.13/CMakeLists.txt
@@ -48,11 +48,12 @@ endif()

 if(USE_SYSTEM_ONNXRUNTIME)
   if(OS_LINUX)
-    find_package(Onnxruntime 1.16.3 REQUIRED)
+    find_package(onnxruntime REQUIRED)
+    set(Onnxruntime_INCLUDE_DIR /usr/include)
     set(Onnxruntime_INCLUDE_PATH
         ${Onnxruntime_INCLUDE_DIR} ${Onnxruntime_INCLUDE_DIR}/onnxruntime
         ${Onnxruntime_INCLUDE_DIR}/onnxruntime/core/session ${Onnxruntime_INCLUDE_DIR}/onnxruntime/core/providers/cpu)
-    target_link_libraries(${CMAKE_PROJECT_NAME} PRIVATE "${Onnxruntime_LIBRARIES}")
+    target_link_libraries(${CMAKE_PROJECT_NAME} PRIVATE /usr/lib/libonnxruntime.so)
     target_include_directories(${CMAKE_PROJECT_NAME} SYSTEM PUBLIC "${Onnxruntime_INCLUDE_PATH}")
   else()
     message(FATAL_ERROR "System ONNX Runtime is only supported on Linux!")

Then I replaced the -DCUSTOM_ONNXRUNTIME_URL=... and -DCUSTOM_ONNXRUNTIME_HASH=... in the PKGBUILD with -DUSE_SYSTEM_ONNXRUNTIME=ON. For my machine, I also had to add -DDISABLE_ONNXRUNTIME_GPU=ON as I don't have a dedicated GPU, and without it I'd get "undefined symbol" errors when OBS tries to load the plugin.

Hopefully this is useful to someone else (or future me, when my setup stops working again in a few months due to a new version of the onnxruntime package) :) Or maybe we could integrate these changes into this package? I'd be open to helping with that, and also (co-)maintaining the changes.

Bitals commented on 2023-10-18 13:53 (UTC)

@ngoonee I don't really care about my status in this, I just use this package and want to keep it maintained in a centralized location. Being a co-maintainer is fine for this purpose.

ngoonee commented on 2023-10-18 13:44 (UTC)

@Bitals I have added you as co-maintainer. Let me know if you want to be maintainer, that's perfectly fine too.

Bitals commented on 2023-10-18 10:29 (UTC)

@jetexe I've made a pkgbuild for it and fired an orphan request against this package in order to adopt it, but it's still on review. For now you can get a new pkgbuild on my Github: https://github.com/Bitals/obs-backgroundremoval-aur

jetexe commented on 2023-10-18 10:13 (UTC)

1.1.7 has been released

wustdsh commented on 2023-10-03 11:24 (UTC)

1.1.6 has been released

8bitbuddhist commented on 2023-07-29 18:00 (UTC)

Just a heads up: I had to add ninja to makedepends=('cmake'), otherwise the build fails with this error message:

CMake Error: CMake was unable to find a build program corresponding to "Ninja".  CMAKE_MAKE_PROGRAM is not set.  You probably need to select a different build tool.
CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
-- Configuring incomplete, errors occurred!

My guess is many folks already have ninja installed, but just in case someone else runs into this issue.

ngoonee commented on 2023-07-26 00:46 (UTC)

Agreed, good catch. Have updated accordingly.

callmejoe commented on 2023-07-25 22:39 (UTC)

@BadBone2k nice catch with the "v" missing. thanks

BadBone2k commented on 2023-07-24 06:02 (UTC)

The *.tar.gz is up, but the download URL is https://github.com/royshil/obs-backgroundremoval/archive/refs/tags/1.1.2.tar.gz WITHOUT a "v" before ${pkgver}