def apply_boxes(self, boxes: np.ndarray,
                    original_size: Tuple[int, ...]) -> np.ndarray:
        """
        Expects a numpy array shape Bx4. Requires the original image size
        in (H, W) format.
        """
        boxes = self.apply_coords(boxes.reshape([-1, 2, 2]), original_size)
        return boxes.reshape([-1, 4])

        Expects a numpy array shape Bx4. Requires the original image size
        in (H, W) format.
        
contrib/SegmentAnything/segment_anything/utils/transforms.py