getCameraImagePredictionProbabilities method
Future<List<double> >
getCameraImagePredictionProbabilities(
- CameraImage cameraImage,
- int rotation, {
- List<
double> mean = torchVisionNormMeanRGB, - List<
double> std = torchVisionNormSTDRGB, - CameraPreProcessingMethod cameraPreProcessingMethod = CameraPreProcessingMethod.imageLib,
- PreProcessingMethod preProcessingMethod = PreProcessingMethod.imageLib,
Retrieves the probabilities of predictions for a camera image.
Takes a cameraImage
and rotation
as input. Optional parameters include mean
, std
,
cameraPreProcessingMethod
, and preProcessingMethod
.
Returns a Future that resolves to a List
of double values representing the prediction probabilities.
Implementation
Future<List<double>> getCameraImagePredictionProbabilities(
CameraImage cameraImage, int rotation,
{List<double> mean = torchVisionNormMeanRGB,
List<double> std = torchVisionNormSTDRGB,
CameraPreProcessingMethod cameraPreProcessingMethod =
CameraPreProcessingMethod.imageLib,
PreProcessingMethod preProcessingMethod =
PreProcessingMethod.imageLib}) async {
// Retrieve the prediction list for the camera image
final List<double> prediction = await getCameraImagePredictionList(
cameraImage, rotation,
mean: mean,
std: std,
cameraPreProcessingMethod: cameraPreProcessingMethod,
preProcessingMethod: preProcessingMethod);
return getProbabilities(prediction);
}