imageModelInference static method
Implementation
static Future<List<double>> imageModelInference(
int modelIndex,
Uint8List imageAsBytes,
int imageHeight,
int imageWidth,
List<double> mean,
List<double> std,
bool objectDetectionYolov5,
int outputLength) async {
PytorchFfi.init();
return (await imageModelInferenceManager.compute([
modelIndex,
imageAsBytes,
imageHeight,
imageWidth,
mean,
std,
objectDetectionYolov5,
outputLength
]) as TransferableTypedData)
.materialize()
.asFloat32List()
.toList();
// return _imageModelInference(
// [
// modelIndex,
// imageAsBytes,
// imageHeight,
// imageWidth,
// mean,
// std,
// objectDetectionYolov5
// ]
// );
}