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
Please give an example how to inference image with pre-trained *.onnx model using your package?
At the beginning I've trained YoloV8 model and got *.pt trained model, then exported it to *.onnx format with opset13.
[1, 6, 2100] in Outputs - 6 means TWO objects to detect, 5 means ONE objects to detect
I've tried inference in Python with onnxruntime package and it works great, but I can't get any results with your package. How to read/prepare image bytes to pass them as argument to createTensorWithDataList method?
Here is my chunk of a code:
Int16List _transformBuffer(Uint8List bytes) => Int16List.view(bytes.buffer);
Future<void> inference() async {
final List<int> shape = [1, 3, 320, 320];
final floatBuffer = _transformBuffer(imageBytesList).map((e) => e / 255).toList();
array = Float32List.fromList(floatBuffer);
final OrtValueTensor inputOrt = OrtValueTensor.createTensorWithDataList(array, shape);
final Map<String, OrtValueTensor> inputs = {'images': inputOrt};
final runOptions = OrtRunOptions();
final List<OrtValue?>? outputs = await session.runAsync(runOptions, inputs, ['output0']);
}
Thank you in advance
The text was updated successfully, but these errors were encountered:
Please give an example how to inference image with pre-trained
*.onnx
model using your package?At the beginning I've trained
YoloV8
model and got*.pt
trained model, then exported it to*.onnx
format withopset13
.[1, 6, 2100] in
Outputs
- 6 means TWO objects to detect, 5 means ONE objects to detectI've tried inference in Python with
onnxruntime
package and it works great, but I can't get any results with your package. How to read/prepare image bytes to pass them as argument tocreateTensorWithDataList
method?Here is my chunk of a code:
Thank you in advance
The text was updated successfully, but these errors were encountered: