fruit_project.config¶
Shared configuration for fruit detection models. This module provides a single source of truth for model configs, class labels, and related settings.
Attributes¶
Functions¶
|
Load model configuration from YAML file. |
|
Get whether a model requires image normalization. |
|
Get the HuggingFace checkpoint ID for a model. |
|
Get the input size for a model. |
|
Load class names from data.yaml file. |
Module Contents¶
- fruit_project.config.CLASS_NAMES: List[str] = ['Apple', 'Cherry', 'Figs', 'Olive', 'Pomegranate', 'Orange', 'Rockmelon', 'Strawberry',...[source]¶
- fruit_project.config.COLORS: List[str] = ['#FF6B6B', '#C0392B', '#8E44AD', '#2ECC71', '#E74C3C', '#F39C12', '#F1C40F', '#E91E63',...[source]¶
- fruit_project.config.get_model_config(model_name: str) Dict[source]¶
Load model configuration from YAML file.
- Parameters:
model_name – Name of the model (e.g., ‘rtdetrv2_50’)
- Returns:
Dictionary with model configuration
- fruit_project.config.get_do_normalize(model_name: str) bool[source]¶
Get whether a model requires image normalization.
- Parameters:
model_name – Name of the model
- Returns:
True if model requires normalization
- fruit_project.config.get_hf_checkpoint(model_name: str) str | None[source]¶
Get the HuggingFace checkpoint ID for a model.
- Parameters:
model_name – Name of the model
- Returns:
HuggingFace checkpoint string or None