YOLOStreamingConfig class
Configuration class for customizing YOLO streaming behavior.
This class allows fine-grained control over what data is included in real-time YOLO detection streams. It provides options to balance performance with data richness based on application needs.
Example usage:
// Lightweight configuration for high FPS
final lightConfig = YOLOStreamingConfig.lightweight();
// Detailed configuration with all data
final detailedConfig = YOLOStreamingConfig.detailed();
// Custom configuration
final customConfig = YOLOStreamingConfig.custom(
includeOriginalImage: true,
maxFPS: 20,
includeMasks: false,
);
Constructors
- YOLOStreamingConfig.new({bool includeDetections = true, bool includeClassifications = true, bool includeProcessingTimeMs = true, bool includeFps = true, bool includeMasks = false, bool includePoses = false, bool includeOBB = false, bool includeOriginalImage = false, int? maxFPS, Duration? throttleInterval, int? inferenceFrequency, int? skipFrames})
-
Creates a YOLOStreamingConfig with custom settings.
const
- YOLOStreamingConfig.custom({bool? includeDetections, bool? includeClassifications, bool? includeProcessingTimeMs, bool? includeFps, bool? includeMasks, bool? includePoses, bool? includeOBB, bool? includeOriginalImage, int? maxFPS, Duration? throttleInterval, int? inferenceFrequency, int? skipFrames})
-
Creates a custom configuration with specified parameters.
const
- YOLOStreamingConfig.debug()
-
Creates a debug configuration with all data and images.
const
- YOLOStreamingConfig.full()
-
Creates a full configuration with all data included.
const
- YOLOStreamingConfig.highPerformance({int inferenceFrequency = 30})
-
Creates a performance configuration optimized for high frame rates.
factory
- YOLOStreamingConfig.minimal()
-
Creates a minimal configuration optimized for maximum performance.
const
- YOLOStreamingConfig.powerSaving({int inferenceFrequency = 10, int maxFPS = 15})
-
Creates a power-saving configuration with reduced inference frequency.
factory
- YOLOStreamingConfig.throttled({required int maxFPS, bool includeDetections = true, bool includeClassifications = true, bool includeProcessingTimeMs = true, bool includeFps = true, bool includeMasks = false, bool includePoses = false, bool includeOBB = false, bool includeOriginalImage = false, int? inferenceFrequency, int? skipFrames})
-
Creates a throttled configuration with specified FPS limit.
factory
- YOLOStreamingConfig.withMasks()
-
Creates a configuration with segmentation masks.
const
- YOLOStreamingConfig.withPoses()
-
Creates a configuration with pose keypoints.
const
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- includeClassifications → bool
-
Whether to include classification results.
final
- includeDetections → bool
-
Whether to include basic detection results (bounding boxes, confidence, class).
final
- includeFps → bool
-
Whether to include frames per second (FPS) metrics.
final
- includeMasks → bool
-
Whether to include segmentation masks in the results.
final
- includeOBB → bool
-
Whether to include oriented bounding box (OBB) data.
final
- includeOriginalImage → bool
-
Whether to include original camera frames without annotations.
final
- includePoses → bool
-
Whether to include pose estimation keypoints.
final
- includeProcessingTimeMs → bool
-
Whether to include processing time metrics in milliseconds.
final
- inferenceFrequency → int?
-
Target inference frequency in frames per second.
final
- maxFPS → int?
-
Maximum frames per second for streaming output.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- skipFrames → int?
-
Skip frames between inferences for power saving.
final
- throttleInterval → Duration?
-
Minimum interval between result transmissions.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited