File size: 1,886 Bytes
bc1fb7d
b46360a
bc1fb7d
b46360a
 
 
 
 
 
 
 
bc1fb7d
b46360a
 
 
 
bc1fb7d
 
b46360a
 
bc1fb7d
b46360a
 
 
 
 
 
 
 
bf08742
b46360a
 
bc1fb7d
 
b46360a
bc1fb7d
b46360a
bc1fb7d
b46360a
bc1fb7d
 
b46360a
 
 
bc1fb7d
b46360a
bc1fb7d
b46360a
 
 
bc1fb7d
b46360a
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
"""Configuration settings for MelanoScope AI application."""
import os
from typing import List
from pathlib import Path

PROJECT_ROOT = Path(__file__).parent.parent.parent
DATA_FILE = PROJECT_ROOT / "data.json"
MODEL_FILE = PROJECT_ROOT / "NFNetL0-0.961.onnx"
EXAMPLES_DIR = PROJECT_ROOT / "examples"

class ModelConfig:
    """Model configuration parameters."""
    ORT_PROVIDERS: List[str] = ["CPUExecutionProvider"]
    IMAGE_SIZE: tuple[int, int] = (100, 100)
    NORMALIZATION_MEAN: List[float] = [0.7611, 0.5869, 0.5923]
    NORMALIZATION_STD: List[float] = [0.1266, 0.1487, 0.1619]
    PROBABILITY_PRECISION: int = 1
    PROBABILITY_SUM: int = 100

class UIConfig:
    """UI configuration parameters."""
    THEME_PRIMARY_HUE: str = "rose"
    THEME_SECONDARY_HUE: str = "slate"
    IMAGE_HEIGHT: int = 420
    PLOT_WIDTH: int = 520
    PLOT_HEIGHT: int = 320
    TEXTBOX_LINES: int = 4
    LEFT_COLUMN_SCALE: int = 5
    RIGHT_COLUMN_SCALE: int = 5
    THEME_TOGGLE_MIN_WIDTH: int = 140

class AppConfig:
    """Application metadata."""
    TITLE: str = "MelanoScope AI - Skin Lesion Classification"
    VERSION: str = "1.0"
    LAST_UPDATE: str = "2025-09"
    INSTITUTION: str = "Universidad Central de Venezuela"
    DISCLAIMER: str = "Demo • Not for medical diagnosis"
    MEDICAL_DISCLAIMER: str = (
        "This tool is for educational purposes only and does not replace "
        "professional medical evaluation."
    )

class LogConfig:
    """Logging configuration."""
    LOG_LEVEL: str = os.getenv("LOG_LEVEL", "INFO")
    LOG_FORMAT: str = "%(asctime)s | %(name)s | %(levelname)s | %(message)s"
    LOG_FILE: str = "melanoscope.log"

class EnvConfig:
    """Environment settings."""
    DEBUG: bool = os.getenv("DEBUG", "False").lower() == "true"
    ENVIRONMENT: str = os.getenv("ENVIRONMENT", "production")