
    ht                         SS jr g)   c                     Uu  p4SX SS2S4   U:  S4'   SX SS2S4   U:  S4'   X@U SS2S4   XB-
  :  S4'   X0U SS2S4   X2-
  :  S4'   U $ )a  
Adjust bounding boxes to stick to image border if they are within a certain threshold.

Args:
    boxes (torch.Tensor): Bounding boxes with shape (N, 4) in xyxy format.
    image_shape (tuple): Image dimensions as (height, width).
    threshold (int): Pixel threshold for considering a box close to the border.

Returns:
    (torch.Tensor): Adjusted bounding boxes with shape (N, 4).
    N          )boxesimage_shape	thresholdhws        Z/home/james-whalen/.local/lib/python3.13/site-packages/ultralytics/models/fastsam/utils.pyadjust_bboxes_to_image_borderr      s~     DA )*E1+	
!1
$%()E1+	
!1
$%,-%1+
%q
(),-%1+
%q
()L    N)r   )r   r   r   r   <module>r      s
   r   