You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When trying test_onnx.py with the model from https://huggingface.co/onnx-community/metric3d-vit-large I got the following error: ValueError: Required inputs (['pixel_values']) are missing from input feed (['image'])
due to mismatch between the onnx_input dictionary used in the script and the input dictionary expected by the model.
Changing the key name from "image" to "pixel_values" in the code below will solve the issue.
onnx_input = {
"image": np.ascontiguousarray(
np.transpose(rgb, (2, 0, 1))[None], dtype=np.float32
), # 1, 3, H, W
}
to
onnx_input = {
"pixel_values": np.ascontiguousarray(
np.transpose(rgb, (2, 0, 1))[None], dtype=np.float32
), # 1, 3, H, W
}
The text was updated successfully, but these errors were encountered:
When trying test_onnx.py with the model from https://huggingface.co/onnx-community/metric3d-vit-large I got the following error: ValueError: Required inputs (['pixel_values']) are missing from input feed (['image'])
due to mismatch between the onnx_input dictionary used in the script and the input dictionary expected by the model.
Changing the key name from "image" to "pixel_values" in the code below will solve the issue.
onnx_input = {
"image": np.ascontiguousarray(
np.transpose(rgb, (2, 0, 1))[None], dtype=np.float32
), # 1, 3, H, W
}
to
onnx_input = {
"pixel_values": np.ascontiguousarray(
np.transpose(rgb, (2, 0, 1))[None], dtype=np.float32
), # 1, 3, H, W
}
The text was updated successfully, but these errors were encountered: