MultiTaskYOLOView class

A Flutter widget that runs two detection models plus a classification model simultaneously on a single camera stream — no JPEG round-trip, no MethodChannel per frame. Each model runs concurrently on its own queue.

Pass secondDetectModelPath to enable a second detection model running in parallel with the primary detect + classify models. The onStreamingData callback fires for every result; route on data["modelId"] ("detect", "detect2", "classify") since both detection models report data["type"] == "detect".

Inheritance

Constructors

MultiTaskYOLOView({Key? key, required String detectModelPath, required String classifyModelPath, required String? secondDetectModelPath, MultiTaskYOLOController? controller, MultiTaskStreamCallback? onStreamingData, String lensFacing = 'back', bool useGpu = true, double confidenceThreshold = 0.25, double iouThreshold = 0.7, double? detectConfidenceThreshold, double? detectIouThreshold, double? classifyConfidenceThreshold, double? secondDetectConfidenceThreshold, double? secondDetectIouThreshold})
const

Properties

classifyConfidenceThreshold double?
final
classifyModelPath String
final
confidenceThreshold double
Default confidence threshold, applied to any model without a per-model override.
final
controller MultiTaskYOLOController?
final
detectConfidenceThreshold double?
Per-model overrides. When null, the corresponding model falls back to the global confidenceThreshold / iouThreshold. Classification only uses a confidence threshold (IoU does not apply to it).
final
detectIouThreshold double?
final
detectModelPath String
Primary detection model. Results arrive with data["modelId"] == "detect".
final
hashCode int
The hash code for this object.
no setterinherited
iouThreshold double
Default IoU (NMS) threshold, applied to any model without a per-model override.
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
lensFacing String
final
onStreamingData MultiTaskStreamCallback?
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
secondDetectConfidenceThreshold double?
final
secondDetectIouThreshold double?
final
secondDetectModelPath String?
Second detection model. When non-null, runs in parallel with the primary detect + classify models; pass null to run only detect + classify. Results arrive via onStreamingData with data["type"] == "detect" and data["modelId"] == "detect2".
final
useGpu bool
final

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() State<MultiTaskYOLOView>
Creates the mutable state for this widget at a given location in the tree.
override
debugDescribeChildren() List<DiagnosticsNode>
Returns a list of DiagnosticsNode objects describing this node's children.
inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) String
A string representation of this object.
inherited
toStringDeep({String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) String
Returns a string representation of this node and its descendants.
inherited
toStringShallow({String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) String
Returns a one-line detailed description of the object.
inherited
toStringShort() String
A short, textual description of this widget.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited