bboxencoding
bboxencoding ¶
Module for functions regarding bounding box encoding
Functions¶
decode_boxes ¶
Decodes the incoming array to target boxes
Parameters:
-
anchor_boxes_xywh
(ndarray
) –Anchor boxes in x,y,width,height format
-
encoded_array_xywh
(ndarray
) –Encoded boxes in x,y,width,height format
-
box_variances
(ndarray
) –Box variance to scale by
Returns:
-
ndarray
–The decoded boxes x,y,width,height format
Source code in niceml/utilities/boundingboxes/bboxencoding.py
encode_boxes ¶
Encodes the anchor boxes to a numpy array
Parameters:
-
anchor_boxes_xywh
(ndarray
) –Anchor boxes in x,y,width,height format
-
gt_boxes_xywh
(ndarray
) –Ground truth boxes in x,y,width,height format
-
box_variances
(ndarray
) –Box variance to scale by
Returns:
-
ndarray
–A scaled and encoded box as a numpy array of shape (num_anchors, 4)