BoxList#
- class BoxList[source]#
Bases:
object
- __init__(boxes: torch.Tensor, format: str = 'xyxy', **extras) None [source]#
Representation of a list of bounding boxes and associated data.
Internally, boxes are always stored in the xyxy format.
- Parameters
boxes (torch.Tensor) – tensor<n, 4>
format (str) – format of input boxes.
extras – dict with values that are tensors with first dimension corresponding to boxes first dimension
- Return type
None
Methods
__init__
(boxes[, format])Representation of a list of bounding boxes and associated data.
cat
(box_lists)clip_boxes
(img_height, img_width)convert_boxes
(out_fmt)copy
()equal
(other)get_field
(name)ind_filter
(inds)nms
([iou_thresh])scale
(yscale, xscale)Scale box coords by the given scaling factors.
score_filter
([score_thresh])to
(*args, **kwargs)- __init__(boxes: torch.Tensor, format: str = 'xyxy', **extras) None [source]#
Representation of a list of bounding boxes and associated data.
Internally, boxes are always stored in the xyxy format.
- Parameters
boxes (torch.Tensor) – tensor<n, 4>
format (str) – format of input boxes.
extras – dict with values that are tensors with first dimension corresponding to boxes first dimension
- Return type
None
- convert_boxes(out_fmt: str) torch.Tensor [source]#
- Parameters
out_fmt (str) –
- Return type
- nms(iou_thresh: float = 0.5) torch.Tensor [source]#
- Parameters
iou_thresh (float) –
- Return type
- scale(yscale: float, xscale: float) BoxList [source]#
Scale box coords by the given scaling factors.