ultralytics_yolo library

Classes

CameraToolbar
Bottom action toolbar (play/pause, switch camera, share, info). Matches yolo-ios-app/Sources/UltralyticsYOLO/YOLOView.swift's toolbar layout:
ChannelConfig
Centralized channel naming and construction for YOLO platform interop.
DownloadProgress
Progress snapshot for an in-flight model download.
FocusReticle
Animated tap-to-focus reticle. Sits in the parent Stack; whenever position flips to a new non-null offset it fades in (100 ms) then back out (300 ms). Renders the plugin's assets/focus_reticle.png.
Keypoint
A single 2D pose keypoint (joint) in image/pixel space.
LensInfo
Describes a discoverable camera lens (e.g. ultra-wide, wide, telephoto).
LensPicker
Lens picker mirroring yolo-ios-app/Sources/UltralyticsYOLO/YOLOView.swift#setupLensControl.
LogoOverlay
Watermark Ultralytics logotype. Bundled inside the plugin so consumers don't have to copy the asset into their own app.
MapConverter
Helpers for adapting loosely-typed platform-channel data (Map<dynamic,dynamic>, List<dynamic>) to strongly-typed Dart values.
ModelSizeSegmentedControl
Picks the active YOLO26 model size using a CupertinoSlidingSegmentedControl styled to match yolo-ios-app's Main.storyboard modelSegmentedControl. Chips read YOLO26n / YOLO26s / YOLO26m / YOLO26l / YOLO26x; sizes not yet on disk get a prefix to signal a download-on-tap. When downloadingSize matches a chip a thin LinearProgressIndicator tracks downloadFraction under the label.
PerformanceLabel
Top HUD: model name (YOLO26n) over an FPS / inference-time line.
TaskSegmentedControl
Picks the active YOLOTask using a CupertinoSlidingSegmentedControl styled to match yolo-ios-app's task control (Det Seg Sem Depth Cls Pose OBB).
ThresholdSliderRow
One labeled slider row — the prefix (0.25 Confidence Threshold) shows the live value with the label baked in.
YOLO
YOLO (You Only Look Once) is a class that provides machine learning inference capabilities for object detection, segmentation, semantic segmentation, depth estimation, classification, pose estimation, and oriented bounding box detection.
YOLODepthMap
Dense row-major metric depth output.
YOLODetectionResults
Complete output from a YOLO inference.
YOLOErrorHandler
Centralized error handling utility for YOLO operations.
YOLOInstanceManager
Manages multiple YOLO instances with unique IDs
YOLOMethodChannel
An implementation of YOLOPlatform that uses method channels.
YOLOPerformanceMetrics
Real-time performance data for a YOLO inference: frame rate, processing time, frame counter, and timestamp. Delivered via YOLOView.onPerformanceMetrics.
YOLOPlatform
The plugin uses method channels for communication between Flutter and native code. Each platform (iOS, Android) provides its own implementation of the YOLO inference engine.
YOLOResult
Represents a detection result from YOLO models.
YOLOSemanticMask
Dense full-image semantic segmentation result.
YOLOShowcase
One-import camera UI matching the iOS showcase layout. Composes every widget under lib/widgets/, owns gestures (pinch + tap-to-focus), drives the controller, and persists the last task across launches.
YOLOStreamingConfig
Configuration class for customizing YOLO streaming behavior.
YOLOView
A Flutter widget that displays a real-time camera preview with YOLO object detection.
YOLOViewController
Controls a YOLOView imperatively: thresholds, camera, zoom, streaming.
ZoomIndicator
Two-line zoom HUD: numeric zoom factor on top, human-readable lens label below (e.g. Wide camera, Ultra wide camera). Sits above the lens picker in YOLOShowcase.

Enums

LensFacing
Enum for camera lens selection.
YOLOTask
Represents the different types of tasks that can be performed by YOLO models.

Extensions

YOLOTaskParsing on YOLOTask

Exceptions / Errors

InferenceException
Exception thrown when an error occurs during model inference.
InvalidInputException
Exception thrown when invalid input is provided to YOLO methods.
ModelLoadingException
Exception thrown when a model fails to load.
ModelNotLoadedException
Exception thrown when attempting to perform inference without loading a model.
YOLOException
Base exception class for all YOLO-related exceptions.