class_docstr: Box collection.
  
  BoxList represents a list of bounding boxes as numpy array, where each
  bounding box is represented as a row of 4 numbers,
  [y_min, x_min, y_max, x_max].  It is assumed that all bounding boxes within a
  given list correspond to a single image.
  
  Optionally, users can add additional related fields (such as
  objectness/classification scores).
docstr: Constructs box collection.
  
  Args:
    data: a numpy array of shape [N, 4] representing box coordinates
  
  Raises:
    ValueError: if bbox data is not a numpy array
    ValueError: if invalid dimensions for bbox data
code: def __init__(self, data):
      """Constructs box collection.
  
      Args:
        data: a numpy array of shape [N, 4] representing box coordinates
  
      Raises:
        ValueError: if bbox data is not a numpy array
        ValueError: if invalid dimensions for bbox data
      """
      if not isinstance(data, np.ndarray):
          raise ValueError("data must be a numpy array.")
      if len(data.shape) != 2 or data.shape[1] != 4:
          raise ValueError("Invalid dimensions for box data.")
      if data.dtype != np.float32 and data.dtype != np.float64:
          raise ValueError(
              "Invalid data type for box data: float is required."
          )
      if not self._is_valid_boxes(data):
          raise ValueError(
              "Invalid box data. data must be a numpy array of "
              "N*[y_min, x_min, y_max, x_max]"
          )
      self.data = {"boxes": data}
  
file_path: SlowFast/ava_evaluation/np_box_list.py
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  import numpy
label_desc: Use image node_id 1 to create a new BoxList object  with example: obj = BoxList(data)