getImagePredictionListProbabilities method
Returns the predicted image probabilities using the given imageAsBytes
.
The mean
and std
parameters are optional and default to the values of torchVisionNormMeanRGB and torchVisionNormSTDRGB.
The preProcessingMethod
parameter is optional and defaults to PreProcessingMethod.imageLib.
Returns a Future that completes with a List<double> representing the predicted probabilities.
Implementation
Future<List<double>> getImagePredictionListProbabilities(
Uint8List imageAsBytes,
{List<double> mean = torchVisionNormMeanRGB,
List<double> std = torchVisionNormSTDRGB,
PreProcessingMethod preProcessingMethod =
PreProcessingMethod.imageLib}) async {
List<double> prediction = await getImagePredictionList(imageAsBytes,
mean: mean, std: std, preProcessingMethod: preProcessingMethod);
return getProbabilities(prediction);
}