
    FPh                     J    d dl mZ d dlmZ ddlmZ ddlmZ  G d de      Zy)	    )Path)Model   )FastSAMPredictor)FastSAMValidatorc                   4     e Zd ZdZd fd	Zed        Z xZS )FastSAMz
    FastSAM model interface.

    Example:
        ```python
        from ultralytics import FastSAM

        model = FastSAM('last.pt')
        results = model.predict('ultralytics/assets/bus.jpg')
        ```
    c                     t        |      dk(  rd}t        |      j                  dvsJ d       t        |   |d       y)zSCall the __init__ method of the parent class (YOLO) with the updated default model.z
FastSAM.ptFastSAM-x.pt)z.yamlz.ymlz/FastSAM models only support pre-trained models.segment)modeltaskN)strr   suffixsuper__init__)selfr   	__class__s     kC:\Users\daisl\Desktop\realtime-object-detection\venv\Lib\site-packages\ultralytics/models/fastsam/model.pyr   zFastSAM.__init__   sE    u:%"EE{!!)::m<mm:u95    c                      dt         t        diS )z[Returns a dictionary mapping segment task to corresponding predictor and validator classes.r   )	predictor	validator)r   r   )r   s    r   task_mapzFastSAM.task_map   s     )9HXYZZr   )r   )__name__
__module____qualname____doc__r   propertyr   __classcell__)r   s   @r   r	   r	      s#    
6 [ [r   r	   N)	pathlibr   ultralytics.engine.modelr   predictr   valr   r	    r   r   <module>r&      s!     * % ![e [r   