ClassificationModel class

Constructors

ClassificationModel(int _index, List<String> labels, int imageWidth, int imageHeight)

Properties

hashCode int
The hash code for this object.
no setterinherited
imageHeight int
final
imageWidth int
final
labels List<String>
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

getCameraImagePrediction(CameraImage cameraImage, int rotation, {List<double> mean = torchVisionNormMeanRGB, List<double> std = torchVisionNormSTDRGB, CameraPreProcessingMethod cameraPreProcessingMethod = CameraPreProcessingMethod.imageLib, PreProcessingMethod preProcessingMethod = PreProcessingMethod.imageLib}) Future<String>
Retrieves the top prediction label for a camera image.
getCameraImagePredictionList(CameraImage cameraImage, int rotation, {List<double> mean = torchVisionNormMeanRGB, List<double> std = torchVisionNormSTDRGB, CameraPreProcessingMethod cameraPreProcessingMethod = CameraPreProcessingMethod.imageLib, PreProcessingMethod preProcessingMethod = PreProcessingMethod.imageLib}) Future<List<double>>
Retrieves a list of predictions for a camera image.
getCameraImagePredictionProbabilities(CameraImage cameraImage, int rotation, {List<double> mean = torchVisionNormMeanRGB, List<double> std = torchVisionNormSTDRGB, CameraPreProcessingMethod cameraPreProcessingMethod = CameraPreProcessingMethod.imageLib, PreProcessingMethod preProcessingMethod = PreProcessingMethod.imageLib}) Future<List<double>>
Retrieves the probabilities of predictions for a camera image.
getImagePrediction(Uint8List imageAsBytes, {List<double> mean = torchVisionNormMeanRGB, List<double> std = torchVisionNormSTDRGB, PreProcessingMethod preProcessingMethod = PreProcessingMethod.imageLib}) Future<String>
Returns the predicted image label using the given imageAsBytes.
getImagePredictionFromBytesList(List<Uint8List> imageAsBytesList, int imageWidth, int imageHeight, {List<double> mean = torchVisionNormMeanRGB, List<double> std = torchVisionNormSTDRGB}) Future<String>
Returns the predicted label for an image as a bytes list.. The image are passed as a list of Uint8List objects. The imageWidth and imageHeight parameters specify the dimensions of the image. The optional mean and std parameters can be used to normalize the image. Returns a Future that resolves to a String representing the predicted label.
getImagePredictionList(Uint8List imageAsBytes, {List<double> mean = torchVisionNormMeanRGB, List<double> std = torchVisionNormSTDRGB, PreProcessingMethod preProcessingMethod = PreProcessingMethod.imageLib}) Future<List<double>>
Returns the predicted image as a list of scores using the given imageAsBytes.
getImagePredictionListFromBytesList(List<Uint8List> imageAsBytesList, int imageWidth, int imageHeight, {List<double> mean = torchVisionNormMeanRGB, List<double> std = torchVisionNormSTDRGB}) Future<List<double>>
Returns a list of predictions for an image as a bytes list. The image are passed as a list of Uint8List objects. The imageWidth and imageHeight parameters specify the dimensions of the image. The optional mean and std parameters can be used to normalize the image. Returns a Future that resolves to a list of double values representing the predictions.
getImagePredictionListProbabilities(Uint8List imageAsBytes, {List<double> mean = torchVisionNormMeanRGB, List<double> std = torchVisionNormSTDRGB, PreProcessingMethod preProcessingMethod = PreProcessingMethod.imageLib}) Future<List<double>>
Returns the predicted image probabilities using the given imageAsBytes.
getImagePredictionListProbabilitiesFromBytesList(List<Uint8List> imageAsBytesList, int imageWidth, int imageHeight, {List<double> mean = torchVisionNormMeanRGB, List<double> std = torchVisionNormSTDRGB}) Future<List<double>>
Returns a list of probabilities for an image as a bytes list. The image are passed as a list of Uint8List objects. The imageWidth and imageHeight parameters specify the dimensions of the image. The optional mean and std parameters can be used to normalize the image. Returns a Future that resolves to a list of double values representing the probabilities.
getProbabilities(List<double> prediction) List<double>
Returns the probabilities of each element in the prediction list using the softmax function.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
softMax(List<double?> prediction) int
Returns the index of the maximum value in the prediction list using the softmax function.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited