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)Recursively apply
torch.Tensor.to()to Tensors.- __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
- to(*args, **kwargs) BoxList[source]#
Recursively apply
torch.Tensor.to()to Tensors.- Parameters
*args – Args for
torch.Tensor.to().**kwargs – Keyword args for
torch.Tensor.to().
- Returns
New BoxList with to’d Tensors.
- Return type