Closed jamjamjon closed 5 months ago
I'd imagine this just happens when there's no detections (N
is 0). In that case (with ort v2.0.0-rc.1
) just check .shape()
first and make sure N
is > 0 before trying to extract.
let t = ys["batchno_classid_y1x1y2x2"].upcast_ref::<Tensor<i64>>()?;
let n_detections = t.shape()?[0];
if n_detections > 0 {
...
}
Problem
Error:
GetTensorMutableData
should not be a null pointerThis onnx model has 4 outputs. When fetch the "batchno_classid_y1x1y2x2" output, error occurs.
Version
version = "2.0.0-alpha.4"
Model
https://github.com/jamjamjon/assets/releases/download/v0.0.1/yolopv2_dyn-480x800-f16.onnx
Code