o
    ™ÄŽi‹	  ã                   @   s^   d Z ddgZddlZddlmZ G dd„ deejƒZG dd„ deejƒZG dd	„ d	ej	ƒZ
dS )
zUseful constants.ÚClassificationÚ	Detectioné    N)ÚOptionalc                   @   s$   e Zd ZdZdZdZdZdZdZdS )r   zÛEnum of common classification values.

    The classifier is not limited to these and can predict other string values as well.
    This enum only contains values with a special meaning during the inference process.
    z/f1856211-cfb7-4a5b-9158-c0f72fd09ee6;;;;;;blankz01f689929-883d-4dae-958c-3d57ab5b6c16;;;;;;animalzS990ae9dd-7a59-4344-afcb-1b7b21368000;mammalia;primates;hominidae;homo;sapiens;humanz1e2895ed5-780b-48f6-8a11-9e27cb594511;;;;;;vehiclezrf2efdae9-efb8-48fb-8a91-eccf79ab4ffb;no cv result;no cv result;no cv result;no cv result;no cv result;no cv resultN)	Ú__name__Ú
__module__Ú__qualname__Ú__doc__ÚBLANKÚANIMALÚHUMANÚVEHICLEÚUNKNOWN© r   r   úP/home/jeff/fluffinator/venv/lib/python3.10/site-packages/speciesnet/constants.pyr      s    c                   @   s6   e Zd ZdZdZdZdZedede	d  fdd„ƒZ
d	S )
r   z&Enum of all possible detection values.ÚanimalÚhumanÚvehicleÚcategoryÚreturnc                 C   s   t jt jt jdœ}| |¡S )as  Transforms a numeric category from the detector into an enum value.

        Args:
            category: Numeric category from the detector, provided as a string (e.g.
            "1", "2", "3").

        Returns:
            Enum detection value corresponding to the given numeric category. If
            category is not one of "1", "2" or "3", returns `None`.
        )Ú1Ú2Ú3)r   r
   r   r   Úget)Úclsr   Úcategory_to_labelr   r   r   Úfrom_category0   s
   ý
zDetection.from_categoryN)r   r   r   r   r
   r   r   ÚclassmethodÚstrr   r   r   r   r   r   r   )   s    c                   @   s(   e Zd ZdZe ¡ Ze ¡ Ze ¡ ZdS )ÚFailurezNEnum of flags used to indicate which model components failed during inference.N)	r   r   r   r   ÚenumÚautoÚ
CLASSIFIERÚDETECTORÚGEOLOCATIONr   r   r   r   r   E   s
    r   )r   Ú__all__r   Útypingr   r   ÚEnumr   r   ÚFlagr   r   r   r   r   Ú<module>   s   þ