
    |h                     &    d dl mZ  G d de      Zy)    )SegmentationValidatorc                   $     e Zd ZdZd fd	Z xZS )FastSAMValidatora  
    Custom validation class for Fast SAM (Segment Anything Model) segmentation in Ultralytics YOLO framework.

    Extends the SegmentationValidator class, customizing the validation process specifically for Fast SAM. This class
    sets the task to 'segment' and uses the SegmentMetrics for evaluation. Additionally, plotting features are disabled
    to avoid errors during validation.

    Attributes:
        dataloader (torch.utils.data.DataLoader): The data loader object used for validation.
        save_dir (Path): The directory where validation results will be saved.
        args (SimpleNamespace): Additional arguments for customization of the validation process.
        _callbacks (list): List of callback functions to be invoked during validation.
        metrics (SegmentMetrics): Segmentation metrics calculator for evaluation.

    Methods:
        __init__: Initialize the FastSAMValidator with custom settings for Fast SAM.
    c                 n    t         |   ||||       d| j                  _        d| j                  _        y)a\  
        Initialize the FastSAMValidator class, setting the task to 'segment' and metrics to SegmentMetrics.

        Args:
            dataloader (torch.utils.data.DataLoader, optional): Dataloader to be used for validation.
            save_dir (Path, optional): Directory to save results.
            args (SimpleNamespace, optional): Configuration for the validator.
            _callbacks (list, optional): List of callback functions to be invoked during validation.

        Notes:
            Plots for ConfusionMatrix and other related metrics are disabled in this class to avoid errors.
        segmentFN)super__init__argstaskplots)self
dataloadersave_dirr
   
_callbacks	__class__s        ]/var/www/html/test/engine/venv/lib/python3.12/site-packages/ultralytics/models/fastsam/val.pyr	   zFastSAMValidator.__init__   s.     	XtZ@"				    )NNNN)__name__
__module____qualname____doc__r	   __classcell__)r   s   @r   r   r      s    $   r   r   N)ultralytics.models.yolo.segmentr   r    r   r   <module>r      s    B" , " r   