//clika-runtime/io.clika.modelverse/VisionListener
VisionListener
[common]
interface VisionListener
The outcome of one vision request. The calls arrive on the model's own worker thread: the one result callback the request's task answers with (a detection request calls onDetections, a depth request onDepth, a text reading onText, an embedding onEmbedding, a classification onScores), then exactly one of onDone or onError. The result callbacks default to nothing, so a listener implements the one its request needs.
Functions
| Name | Summary |
|---|---|
| onDepth | [common] open fun onDepth(depth: DepthMap) |
| onDetections | [common] open fun onDetections(detections: List<Detection>) |
| onDone | [common] abstract fun onDone(report: VisionReport) The request ended; report says what it cost. |
| onEmbedding | [common] open fun onEmbedding(embedding: FloatArray) |
| onError | [common] abstract fun onError(message: String) The request failed, or was refused before the model ran; nothing follows. |
| onScores | [common] open fun onScores(scores: List<LabelScore>) |
| onText | [common] open fun onText(text: String) |