predictTopKObjects

fun ImageRecognitionModelBase<Bitmap>.predictTopKObjects(imageProxy: ImageProxy, topK: Int = 5): List<Pair<String, Float>>

Predicts topK objects for the given imageProxy. Internal preprocessing is updated to rotate image to match target orientation. After prediction, internal preprocessing is restored to the original state.

Return

The list of pairs sorted from the most probable to the lowest probable.

Parameters

imageProxy

Input image.

topK

Number of top ranked predictions to return