occ-ai/obs-backgroundremoval

OBS Freezes for Several Seconds if "GPU - TensorRT" is selected

MadMartian opened this issue · 3 comments

I just built and installed OpenCV 4.8.0, having the same issue (as referenced) with the freezing, although I don't think it's crashing anymore. OBS freezes for several seconds before start-up (probably due to camera being last active with the background removal plugin turned on).

  • It also freezes for several seconds and/or crashes (as I said, I don't think it's crashing anymore after installing OpenCV @ 4.8.0) after changing from GPU - TensorRTCPUGPU - TensorRT.
  • Similar behaviour changing the segmentation model from SINetMediaPipe (and I would assume the same behaviour for any other segmentation model selection).

I see this in the logs after a change:

info: Model models/mediapipe.onnx input 0: name input_1:0 shape (4 dim) 1 x 144 x 256 x 3
info: Model models/mediapipe.onnx output 0: name segment:0 shape (4 dim) 1 x 144 x 256 x 2
info: Allocated 110592 sized float-array for input 0
info: Allocated 73728 sized float-array for output 0

It's not clear to me whether it's falling back to CPU or not.

Originally posted by @MadMartian in #418 (comment)

OBS Background Removal: v1.1.6

The freezing happens because the models are being loaded to the GPU memory. It's expected, although annoying. So you may expect it to happen on startup as well as when switching models.

Okay great! so I will assume it is working as expected.
I suspected I may have installed packages incorrectly, I will assume that is not the case.

Closing this as resolved