occ-ai / obs-backgroundremoval

An OBS plugin for removing background in portrait images (video), making it easy to replace the background when recording or streaming.
GNU General Public License v2.0
2.7k stars 185 forks source link

"Failed to create ONNXRuntime session. Error code: 5" error. #491

Closed universitystudentdesu closed 7 months ago

universitystudentdesu commented 7 months ago

hello. Im Japanese. Imnot good at wiritiong English.

I was building the obs pluguin(background removal), but when I tried the built version, the following error appeared in the log. Is there any solution. image

umireon commented 7 months ago

僕はメンテナですが日本人なので日本語で書いてもらって大丈夫です

universitystudentdesu commented 7 months ago

background removalをビルドして、機能を試してみたのですが、画像の一番上に出ているonnxruntimeのエラーが出てしまっていて改善がわからないです。 スクリーンショット (14) また、ログが以下のようになってしまいます。 スクリーンショット (15) 原因が全く分からないのです。

umireon commented 7 months ago

どうやってインストールしたか手順をできるだけ詳細に書いてください。またOBSのログファイルを添付してください。OBSのログファイルはヘルプメニューから取得できます。ログファイルのスクリーンショットはやめてください。 OBSのバージョン、Windowsのバージョン、CUDAが入っているならCUDAのバージョンも記載してください。

universitystudentdesu commented 7 months ago

windows powershell でリポジトリのクローンを作成し、それをCMakeでビルドしました。 obsのlogです https://obsproject.com/logs/RPRBNQE1reRuVDwr 2023-11-22 15-15-55.txt

obs:29.1.3 windous:22H2 になっています。 backgroundremovalのソースコードを一部変更しています。 変更後のソースコードです。 background-filter.txt

universitystudentdesu commented 7 months ago

background removalのバージョンは1.1.7です

umireon commented 7 months ago

こちらにビルド済みのバイナリのインストーラーがありますので、まずは自力でビルドするのではなくインストーラーを試してもらえますか? SmartScreenの警告とかが出るかもしれませんが、無効化はできるはずなので試してみてください。 https://github.com/occ-ai/obs-backgroundremoval/releases/download/1.1.7/obs-backgroundremoval-1.1.7-windows-x64-Installer.exe

umireon commented 7 months ago

原因としては機械学習のモデルファイルが正しくdata以下にインストールされていないのだと思います。Windowsで自力でビルドするメリットは特にないので、ビルド済みバイナリが使えるならそちらの方が良いです。

universitystudentdesu commented 7 months ago

ありがとうございました。解決いたしました。