clip_to_window#

clip_to_window(boxlist: NpBoxList, window: ndarray) NpBoxList[source]#

Clip bounding boxes to a window.

This op clips input bounding boxes (represented by bounding box corners) to a window, optionally filtering out boxes that do not overlap at all with the window.

Parameters:
  • boxlist (BoxList) – A BoxList holding M_in boxes

  • window (ndarray) – a numpy array of shape [4] representing the [y_min, x_min, y_max, x_max] window to which the op should clip boxes.

Returns:

A BoxList holding M_out boxes where M_out <= M_in

Return type:

BoxList