3

I am not able to generate the image whose background is removed

from rembg import remove
from PIL import Image

input_path = "crop.jpeg"
output_path = 'crop1.png'

input = Image.open(input_path)
output = remove(input)
output.save(output_path)

I have the error as : RuntimeError: D:\a_work\1\s\onnxruntime\core\session\provider_bridge_ort.cc:1069 onnxruntime::ProviderLibrary::Get [ONNXRuntimeError] : 1 : FAIL : LoadLibrary failed with error 126 "" when trying to load "C:\users\lib\site-packages\onnxruntime\capi\onnxruntime_providers_tensorrt.dll"

Christoph Rackwitz
  • 11,317
  • 4
  • 27
  • 36

1 Answers1

3

This is a onnxruntime package issue. Just reinstalling the onnxruntime will help.

pip uninstall rembg //uninstall rembg
pip uninstall onnxruntime //uninstall onnxruntime
pip install rembg[gpu] onnxruntime-gpu //install rembg with GPU support
blacktheon
  • 31
  • 2