MapConverter class
Centralized map conversion utilities for YOLO operations.
This class provides a unified way to handle map conversions and data parsing that was previously duplicated across multiple files in the codebase.
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
convertBoundingBox(
Map boxMap) → Rect - Converts a bounding box map to a Rect object.
-
convertBoxesList(
List boxes) → List< Map< String, dynamic> > - Converts detection boxes from dynamic format to typed format.
-
convertKeypoints(
List keypointsData) → ({List< double> confidences, List<Point> keypoints}) - Converts a list of keypoint data to Point objects.
-
convertMapsList(
List maps) → List< Map< String, dynamic> > - Converts a list of dynamic maps to a list of typed maps.
-
convertMaskData(
List maskData) → List< List< double> > - Converts mask data from dynamic format to typed format.
-
convertToTypedMap(
Map map) → Map< String, dynamic> - Converts a dynamic map to a typed String-dynamic map.
-
convertToTypedMapSafe(
Map? map) → Map< String, dynamic> ? - Converts a map to a typed map with null safety.
-
safeGetDouble(
Map map, String key, {double fallback = 0.0}) → double - Safely extracts a double value from a map with fallback.
-
safeGetInt(
Map map, String key, {int fallback = 0}) → int - Safely extracts an int value from a map with fallback.
-
safeGetString(
Map map, String key, {String fallback = ''}) → String - Safely extracts a string value from a map with fallback.
-
safeGetUint8List(
Map map, String key) → Uint8List? - Safely extracts a Uint8List from a map.