lib/datasets/ds_utils.py
def unique_boxes(boxes, scale=1.0):
  """Return indices of unique boxes."""
  v = np.array([1, 1e3, 1e6, 1e9])
  hashes = np.round(boxes * scale).dot(v)
  _, index = np.unique(hashes, return_index=True)
  return np.sort(index)
Return indices of unique boxes.
Return indices of unique boxes.
Return indices of unique boxes .
def unique_boxes(boxes, scale=1.0):
  v = np.array([1, 1e3, 1e6, 1e9])
  hashes = np.round(boxes * scale).dot(v)
  _, index = np.unique(hashes, return_index=True)
  return np.sort(index)
def unique_boxes ( boxes , scale = 1.0 ) : v = np . array ( [ 1 , 1e3 , 1e6 , 1e9 ] ) hashes = np . round ( boxes * scale ) . dot ( v ) _ , index = np . unique ( hashes , return_index = True ) return np . sort ( index )
Return indices of unique boxes.
Return indices of unique boxes .
"""Return indices of unique boxes."""
boxes
scale