ImageRecognitionModel
open class ImageRecognitionModel(internalModel: OnnxInferenceModel, channelsFirst: Boolean, preprocessor: Operation<Pair<FloatArray, TensorShape>, Pair<FloatArray, TensorShape>>, modelKindDescription: String?, classLabels: Map<Int, String>) : ImageRecognitionModelBase<Bitmap> , ExecutionProviderCompatible, CameraXCompatibleModel
Content copied to clipboard
The light-weight API for Classification task with one of the Model Hub models.
Constructors
ImageRecognitionModel
Link copied to clipboard
fun ImageRecognitionModel(internalModel: OnnxInferenceModel, channelsFirst: Boolean, preprocessor: Operation<Pair<FloatArray, TensorShape>, Pair<FloatArray, TensorShape>> = Identity(), modelKindDescription: String? = null, classLabels: Map<Int, String> = Imagenet.V1k.labels())
Content copied to clipboard
Functions
initializeWith
Link copied to clipboard
open override fun initializeWith(vararg executionProviders: ExecutionProvider)
Content copied to clipboard
Initialize the model with the specified executions providers.
predict
Link copied to clipboard
predictObject
Link copied to clipboard
predictSoftly
Link copied to clipboard
open override fun predictSoftly(inputData: FloatArray, predictionTensorName: String): FloatArray
Content copied to clipboard
predictTopKObjects
Link copied to clipboard
summary
Link copied to clipboard