View Source YOLO.Utils (YOLO v0.2.0)
Utils to transform the model input and output.
Summary
Functions
Maps [cx, cy, w, h, prob, class_idx]
rows to YOLO.Model.detected_object()
Functions
@spec to_detected_objects([[float()]], YOLO.Model.classes()) :: [ YOLO.Model.detected_object() ]
Maps [cx, cy, w, h, prob, class_idx]
rows to YOLO.Model.detected_object()
Example
iex> YOLO.Utils.to_detected_objects([ [100, 200, 20, 30, 0.7, 2] ], yolov8n_model.classes)
[%{
bbox: %{cx: 100, cy: 200, w: 20, h: 30},
prob: 0.7,
class_idx: 2,
class: "car"
}]