fruit_project.config ==================== .. py:module:: fruit_project.config .. autoapi-nested-parse:: Shared configuration for fruit detection models. This module provides a single source of truth for model configs, class labels, and related settings. Attributes ---------- .. autoapisummary:: fruit_project.config._THIS_DIR fruit_project.config._WORKSPACE_ROOT fruit_project.config.CONF_DIR fruit_project.config.MODEL_CONF_DIR fruit_project.config.DATA_YAML_PATH fruit_project.config.CHECKPOINT_DIR fruit_project.config.SUPPORTED_MODELS fruit_project.config.CLASS_NAMES fruit_project.config.NUM_CLASSES fruit_project.config.ID2LABEL fruit_project.config.LABEL2ID fruit_project.config.COLORS fruit_project.config.HF_FRUIT_MODELS Functions --------- .. autoapisummary:: fruit_project.config.get_model_config fruit_project.config.get_do_normalize fruit_project.config.get_hf_checkpoint fruit_project.config.get_input_size fruit_project.config.load_class_names_from_yaml Module Contents --------------- .. py:data:: _THIS_DIR .. py:data:: _WORKSPACE_ROOT .. py:data:: CONF_DIR .. py:data:: MODEL_CONF_DIR .. py:data:: DATA_YAML_PATH .. py:data:: CHECKPOINT_DIR .. py:data:: SUPPORTED_MODELS :type: Dict[str, str] .. py:data:: CLASS_NAMES :type: List[str] :value: ['Apple', 'Cherry', 'Figs', 'Olive', 'Pomegranate', 'Orange', 'Rockmelon', 'Strawberry',... .. py:data:: NUM_CLASSES :type: int :value: 12 .. py:data:: ID2LABEL :type: Dict[int, str] .. py:data:: LABEL2ID :type: Dict[str, int] .. py:data:: COLORS :type: List[str] :value: ['#FF6B6B', '#C0392B', '#8E44AD', '#2ECC71', '#E74C3C', '#F39C12', '#F1C40F', '#E91E63',... .. py:function:: get_model_config(model_name: str) -> Dict Load model configuration from YAML file. :param model_name: Name of the model (e.g., 'rtdetrv2_50') :returns: Dictionary with model configuration .. py:function:: get_do_normalize(model_name: str) -> bool Get whether a model requires image normalization. :param model_name: Name of the model :returns: True if model requires normalization .. py:function:: get_hf_checkpoint(model_name: str) -> Optional[str] Get the HuggingFace checkpoint ID for a model. :param model_name: Name of the model :returns: HuggingFace checkpoint string or None .. py:function:: get_input_size(model_name: str) -> tuple Get the input size for a model. :param model_name: Name of the model :returns: Tuple of (height, width) .. py:data:: HF_FRUIT_MODELS :type: Dict[str, str] .. py:function:: load_class_names_from_yaml(yaml_path: Optional[pathlib.Path] = None) -> List[str] Load class names from data.yaml file. :param yaml_path: Path to the yaml file (defaults to DATA_YAML_PATH) :returns: List of class names