Ë
    ðŸ|ht  ã                   ó   — dd„Z y)é   c                 ó¤   — |\  }}d| | dd…df   |k  df<   d| | dd…df   |k  df<   || | dd…df   ||z
  kD  df<   || | dd…df   ||z
  kD  df<   | S )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        ú_/var/www/html/test/engine/venv/lib/python3.12/site-packages/ultralytics/models/fastsam/utils.pyÚadjust_bboxes_to_image_borderr      sŒ   € ð D€A€qð )*€Eˆ%’1‰+˜	Ñ
! 1Ð
$Ñ%Ø()€Eˆ%’1‰+˜	Ñ
! 1Ð
$Ñ%Ø,-€Eˆ%’1‰+˜˜I™Ñ
% qÐ
(Ñ)Ø,-€Eˆ%’1‰+˜˜I™Ñ
% qÐ
(Ñ)Ø€Ló    N)r   )r   r   r   r   ú<module>r      s
   ðôr   