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
我不知道怎么回事,我检查了所有的东西
1条答案
按热度按时间lhcgjxsq1#
https://github.com/danielgatis/rembg/releases/download/v0.0.0/u2net.onnx
确保下载完成后,将U2Net.onnx复制到C:\ Users <your username>. u2net \此文件夹然后重新打开代码。