class_docstr: Bounding Box representation.
  
  Should **not** be instantiated directly, instead use `from_*` methods.
  e.g. `from_xyxy`, `from_xywh`.
  Is able to transform coordinates into different formats,
  e.g. `xyxy`, `xywh`.
  
  # Examples
  
  Create from `xywh` format, and get `xyxy` coordinates.
  ```python
  bbox = BBox.from_xywh(1, 1, 4, 4)
  xyxy = bbox.xyxy
  ```
class_docstr_tok: ["Bounding","Box","representation",".","Should","*","*","not","*","*","be","instantiated","directly",",","instead","use","`","from_","*","`","methods",".","e.g",".","`","from_xyxy","`",",","`","from_xywh","`",".","Is","able","to","transform","coordinates","into","different","formats",",","e.g",".","`","xyxy","`",",","`","xywh","`",".","#","Examples","Create","from","`","xywh","`","format",",","and","get","`","xyxy","`","coordinates",".","``","`","python","bbox","=","BBox.from_xywh","(","1",",","1",",","4",",","4",")","xyxy","=","bbox.xyxy","``","`"]
code: def from_rle(cls, rle, h, w):
      a = np.array(rle.counts, dtype=int)
      a = a.reshape((-1, 2))  # an array of (start, length) pairs
      a[:, 0] -= 1  # `start` is 1-indexed
      y0 = a[:, 0] % h
      y1 = y0 + a[:, 1]
      if np.any(y1 > h):
          # got `y` overrun, meaning that there are a pixels in mask on 0 and shape[0] position
          y0 = 0
          y1 = h
      else:
          y0 = np.min(y0)
          y1 = np.max(y1)
      x0 = a[:, 0] // h
      x1 = (a[:, 0] + a[:, 1]) // h
      x0 = np.min(x0)
      x1 = np.max(x1)
      if x1 > w:
          # just went out of the image dimensions
          raise ValueError(
              f"invalid RLE or image dimensions: x1={x1} > shape[1]={w}"
          )
      return cls.from_xyxy(x0, y0, x1, y1)
  
file_path: icevision/icevision/core/bbox.py
imports: from icevision.imports import *
  from icevision.utils import *
  from .exceptions import *
label_desc: Use image node_id 16 for calling the BBox obj's underlying member method code with example usage: obj.from_rle(cls, rle, h, w) and returns: cls