def unique_boxes(boxes, scale=1.0):
 v = np.array([1, 1000.0, 1000000.0, 1000000000.0])
 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 , 1000.0 , 1000000.0 , 1000000000.0 ] ) hashes = np . round ( ( boxes * scale ) ) . dot ( v ) ( _ , index ) = np . unique ( hashes , return_index = True ) return np . sort ( index )
return indices of unique boxes .