MultiTaskStreamCallback typedef
Callback fired on the main thread for each inference result from one of the active YOLO tasks.
data contains:
"type":"detect"|"classify"— the task kind"modelId": which configured model produced this result. Use this (not"type") to route results, since two detection models both report"type": "detect":"detect"(primary detect model),"detect2"(second detect model),"classify"(classify model)"fps": per-model FPS"cameraFps": raw camera feed FPS"processingTimeMs": inference time in ms"detections": list of detection maps (detect models)"classification": map withtop1,top1Confidence,top5(classify model)
Implementation
typedef MultiTaskStreamCallback = void Function(Map<String, dynamic> data);