def flip_boxes(boxes, im_width):
	"""Flip boxes horizontally."""
	boxes_flipped = boxes.copy()
	boxes_flipped[:, 0::4] = im_width - boxes[:, 2::4] - 1
	boxes_flipped[:, 2::4] = im_width - boxes[:, 0::4] - 1
	return boxes_flipped