python-3.x NO_SUCHFILE.\u2net.onnx.u2net\u2net.onnx失败,您访问的页面不存在

3zwtqj6y  于 2023-10-21  发布在  Python
关注(0)|答案(1)|浏览(113)
from rembg import remove
from PIL import Image
input_path = 'input.png'
output_path = 'output.png'
input = Image.open(input_path)
output = remove(input)
output.save(output_path)

我得到一个错误

sess = C.InferenceSession(session_options, self._model_path, True, self._read_config_from_model)
onnxruntime.capi.onnxruntime_pybind11_state.NoSuchFile: [ONNXRuntimeError] : 3 : NO_SUCHFILE : Load model from C:\Users\User\.u2net\u2net.onnx failed:Load model C:\Users\User\.u2net\u2net.onnx failed. File doesn't exist

我不知道怎么回事,我检查了所有的东西

lhcgjxsq

lhcgjxsq1#

https://github.com/danielgatis/rembg/releases/download/v0.0.0/u2net.onnx
确保下载完成后,将U2Net.onnx复制到C:\ Users <your username>. u2net \此文件夹然后重新打开代码。

相关问题