o
    ĎiR                     @   s.   d dl mZ G dd dZd	defddZdS )
    )Pathc                   @   s   e Zd ZdZdZdZdS )Detectron2TestConstantsz+COCO-Detection/faster_rcnn_R_50_FPN_3x.yamlz)COCO-Detection/retinanet_R_50_FPN_3x.yamlz4COCO-InstanceSegmentation/mask_rcnn_R_50_FPN_3x.yamlN)__name__
__module____qualname__FASTERCNN_MODEL_ZOO_NAMERETINANET_MODEL_ZOO_NAMEMASKRCNN_MODEL_ZOO_NAME r
   r
   Q/home/jeff/fluffinator/venv/lib/python3.10/site-packages/sahi/utils/detectron2.pyr      s    r   config.yamlexport_pathc                 C   sR   t |jjddd t|d}||   W d   dS 1 s"w   Y  dS )a\  Exports Detectron2 config object in yaml format so that it can be used later.

    Args:
        cfg (detectron2.config.CfgNode): Detectron2 config object.
        export_path (str): Path to export the Detectron2 config.
    Related Detectron2 doc: https://detectron2.readthedocs.io/en/stable/modules/config.html#detectron2.config.CfgNode.dump
    T)exist_okparentswN)r   parentmkdiropenwritedump)cfgr   fr
   r
   r   export_cfg_as_yaml
   s   "r   N)r   )pathlibr   r   strr   r
   r
   r
   r   <module>   s    