def xyxy_to_xywh(boxes):
 return np.hstack((boxes[:, 0:2], ((boxes[:, 2:4] - boxes[:, 0:2]) + 1)))

def xyxy_to_xywh ( boxes ) : return np . hstack ( ( boxes [ : , 0 : 2 ] , ( ( boxes [ : , 2 : 4 ] - boxes [ : , 0 : 2 ] ) + 1 ) ) )
convert [x1 y1 x2 y2] box format to [x y w h] format .