ó
    œþöh  ã                   ó@   • S SK r S SKJr  S SKJr  S/r " S S\5      rg)é    N)ÚDetectionValidator)ÚopsÚNASValidatorc                   ó,   ^ • \ rS rSrSrU 4S jrSrU =r$ )r   é   a[  
Ultralytics YOLO NAS Validator for object detection.

Extends DetectionValidator from the Ultralytics models package and is designed to post-process the raw predictions
generated by YOLO NAS models. It performs non-maximum suppression to remove overlapping and low-confidence boxes,
ultimately producing the final detections.

Attributes:
    args (Namespace): Namespace containing various configurations for post-processing, such as confidence and IoU
        thresholds.
    lb (torch.Tensor): Optional tensor for multilabel NMS.

Examples:
    >>> from ultralytics import NAS
    >>> model = NAS("yolo_nas_s")
    >>> validator = model.validator
    >>> # Assumes that raw_preds are available
    >>> final_preds = validator.postprocess(raw_preds)

Notes:
    This class is generally not instantiated directly but is used internally within the NAS class.
c                 ó¸   >• [         R                  " US   S   5      n[        R                  " X!S   S   4S5      R	                  SSS5      n[
        TU ]  U5      $ )z4Apply Non-maximum suppression to prediction outputs.r   é   éÿÿÿÿé   )r   Ú	xyxy2xywhÚtorchÚcatÚpermuteÚsuperÚpostprocess)ÚselfÚpreds_inÚboxesÚpredsÚ	__class__s       €ÚT/home/james-whalen/.local/lib/python3.13/site-packages/ultralytics/models/nas/val.pyr   ÚNASValidator.postprocess#   sS   ø€ ä—’˜h q™k¨!™nÓ-ˆÜ—	’	˜5¨1¡+¨a¡.Ð1°2Ó6×>Ñ>¸qÀ!ÀQÓGˆÜ‰wÑ" 5Ó)Ð)ó    © )Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__r   Ú__static_attributes__Ú__classcell__)r   s   @r   r   r      s   ø† ñ÷.*ó *r   )r   Úultralytics.models.yolo.detectr   Úultralytics.utilsr   Ú__all__r   r   r   r   Ú<module>r%      s%   ðó å =Ý !àÐ
€ô*Ð%õ *r   