toCategories

fun FloatArray.toCategories(labels: List<String>, threshold: Float = 0.0f): List<LiteRTExt.Category>

Converts the FloatArray scores into a list of LiteRTExt.Category.

Return

A sorted list of categories.

Parameters

labels

The labels corresponding to each index.

threshold

The minimum score to include a category.